Skip to content

toqito 1.2.0

Choose a tag to compare

@vprusso vprusso released this 02 Jul 10:56
· 235 commits to master since this release
3e6de70

toqito 1.2.0

This release includes breaking API changes, new features, and a large batch of correctness fixes since 1.1.8.

Breaking changes

  • Channel constructors (amplitude_damping, bitflip, phase_damping, depolarizing, dephasing, pauli_channel) now return a Choi matrix by default, with a uniform return_kraus_ops flag for the Kraus form (#1699). The common apply_channel(rho, constructor(...)) pattern is unaffected.
  • channel_distinguishability now returns a (value, operators) tuple instead of a bare float, aligning it with channel_exclusion and the state_* functions; its prior p argument is renamed to probs, defaults to a uniform prior, and accepts unnormalized weights (#1702).
  • channel_exclusion accepts unnormalized weights (normalized internally) instead of requiring them to sum to 1 (#1704, #1702).
  • is_positive now tests block positivity, so it is no longer identical to is_completely_positive; a positive-but-not-completely-positive map such as the transpose map is now reported as positive (#1700).
  • is_rank_one, is_totally_positive, and is_k_incoherent now use rtol/atol (with tol kept as a deprecated alias), matching the other predicates (#1701, #1623).
  • The toqito.helper package was removed; its modules now live in toqito.matrix_ops (#1651). Renyi entropy helpers were promoted to public matrix_ops/matrix_props modules (#1648).
  • state_exclusion_locc was folded into state_exclusion(measurement="locc") (#1673).
  • Python 3.11 is no longer supported; Python 3.12+ is required (#1628).

New features

  • is_channel_antidistinguishable in channel_props (#1705).
  • channel_gram_matrix in channel_ops (#1706).
  • is_isometry in matrix_props (#1707).
  • channel_exclusion (min-error primal and dual, unambiguous primal) in channel_metrics (#1570).
  • PPT state exclusion support (#1576).
  • A space-optimized quantum relative entropy SDP (#1644).
  • Closed-form antidistinguishability criterion for circulant Gram matrices (#1564).

Correctness fixes

  • trace_distance is computed from the trace norm of the difference (#1605), and hilbert_schmidt from the Frobenius norm rather than the spectral norm (#1604).
  • von_neumann_entropy and concurrence use Hermitian eigensolvers (#1608); is_pure is determined from matrix rank rather than the largest eigenvalue (#1607).
  • antisymmetric_projection sign and partial-projection output corrected (#1606).
  • is_k_incoherent SDP fallback now returns feasibility instead of always False (#1698); guards added for None solver returns (#1612).
  • matsumoto_fidelity regularizes singular states; fidelity metrics clamp to avoid NaN from floating-point overshoot (#1678, #1679).
  • NonlocalGame see-saw converges correctly and reproducibly (#1614).
  • Random generators sample from Gaussian rather than uniform distributions where appropriate (#1611); w_state coefficients are no longer rounded (#1609).
  • Complex data preserved in functions that previously used real-dtype arrays (#1613).
  • is_orthonormal handles column/row vectors (#1677); is_separable passes resolved dimensions to is_ppt (#1681).
  • The flat Kraus format is accepted in is_trace_preserving and is_quantum_channel (#1622); is_extremal guards non-CP Choi input and channel_fidelity dimension inference is fixed (#1625).

Validation and API hygiene

  • Input validation added or tightened across POVMs, pretty measurements, distinguishability/exclusion, measure completeness, Werner/isotropic ranges, and dephasing parameters (#1624, #1615, #1621, #1683, #1675, #1690).
  • SDP helpers check solver status (#1626); is_quantum_channel only catches ValueError (#1682).
  • Scale-aware tolerances in null_space, is_rank_one, and is_diagonal (#1620).

Performance

  • Direct Choi construction in kraus_to_choi for the default subsystem (#1643); single-call Pauli-channel Choi (#1642).
  • Vectorized Gram-matrix and frame-operator construction (#1639), classical_value (#1638), and the commutant construction is built sparsely (#1696).
  • The unused environment-dimension computation is skipped in channel metrics (#1641).

Docs, packaging, and CI

  • Example gallery subsections reordered pedagogically on both the index page and the sidebar (#1703, #1708).
  • Manual docs deploy of a chosen version as latest via workflow_dispatch (#1709).
  • PyPI license classifier corrected from BSD to MIT (#1684).
  • Numerous docstring, reference, and strict-build fixes; ruff enforced in CI (#1688).

See the full commit history for the complete list.