Repository navigation
toqito 1.2.0
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 uniformreturn_kraus_opsflag for the Kraus form (#1699). The commonapply_channel(rho, constructor(...))pattern is unaffected. channel_distinguishabilitynow returns a(value, operators)tuple instead of a bare float, aligning it withchannel_exclusionand thestate_*functions; its priorpargument is renamed toprobs, defaults to a uniform prior, and accepts unnormalized weights (#1702).channel_exclusionaccepts unnormalized weights (normalized internally) instead of requiring them to sum to 1 (#1704, #1702).is_positivenow tests block positivity, so it is no longer identical tois_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, andis_k_incoherentnow usertol/atol(withtolkept as a deprecated alias), matching the other predicates (#1701, #1623).- The
toqito.helperpackage was removed; its modules now live intoqito.matrix_ops(#1651). Renyi entropy helpers were promoted to publicmatrix_ops/matrix_propsmodules (#1648). state_exclusion_loccwas folded intostate_exclusion(measurement="locc")(#1673).- Python 3.11 is no longer supported; Python 3.12+ is required (#1628).
New features
is_channel_antidistinguishableinchannel_props(#1705).channel_gram_matrixinchannel_ops(#1706).is_isometryinmatrix_props(#1707).channel_exclusion(min-error primal and dual, unambiguous primal) inchannel_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_distanceis computed from the trace norm of the difference (#1605), andhilbert_schmidtfrom the Frobenius norm rather than the spectral norm (#1604).von_neumann_entropyandconcurrenceuse Hermitian eigensolvers (#1608);is_pureis determined from matrix rank rather than the largest eigenvalue (#1607).antisymmetric_projectionsign and partial-projection output corrected (#1606).is_k_incoherentSDP fallback now returns feasibility instead of always False (#1698); guards added forNonesolver returns (#1612).matsumoto_fidelityregularizes 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_statecoefficients are no longer rounded (#1609). - Complex data preserved in functions that previously used real-dtype arrays (#1613).
is_orthonormalhandles column/row vectors (#1677);is_separablepasses resolved dimensions tois_ppt(#1681).- The flat Kraus format is accepted in
is_trace_preservingandis_quantum_channel(#1622);is_extremalguards non-CP Choi input andchannel_fidelitydimension inference is fixed (#1625).
Validation and API hygiene
- Input validation added or tightened across POVMs, pretty measurements, distinguishability/exclusion,
measurecompleteness, Werner/isotropic ranges, anddephasingparameters (#1624, #1615, #1621, #1683, #1675, #1690). - SDP helpers check solver status (#1626);
is_quantum_channelonly catchesValueError(#1682). - Scale-aware tolerances in
null_space,is_rank_one, andis_diagonal(#1620).
Performance
- Direct Choi construction in
kraus_to_choifor 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
latestviaworkflow_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.