You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixed
MR, MRX, and MRY no longer double-count their measurement flip probability as both a pre-measurement Pauli error and a measurement-result flip. (#124)
Fixed a bug where M(p) instructions incorrectly flipped the qubit, not just the measurement record. This would affect circuits where qubits were measured and not immediately reset. (#138)
Fixed a bug where MR !q instructions (with measurement record inversion) produced wrong measurement results. (#138)
Out-of-order OBSERVABLE_INCLUDE indices now produce the correct sampler column order and output shape. Missing indices below the maximum mentioned id appear as deterministic-zero columns, and columns are emitted in sorted logical-index order. (#127)
matmul_gf2 no longer silently corrupts parity for inner products with more than 255 set bits. The float32→uint8 cast in JAX saturates at 255, which previously made % 2 always return 1 once a row-sum reached 256. The modulo is now applied on float32 before the uint8 cast. (#130)
CompiledDetectorSampler.sample now raises ValueError when separate_observables=True is combined with prepend_observables=True or append_observables=True (matching Stim). Previously these combinations silently dropped observable columns. The prepend_observables=True + append_observables=True combination is now supported and returns columns in [obs, det, obs] order, matching Stim. (#134, #140)
OBSERVABLE_INCLUDE with Pauli targets (e.g. OBSERVABLE_INCLUDE(0) X1) now raises ValueError instead of silently producing wrong observable bits or crashing with IndexError. tsim only supports measurement-record targets (rec[-k]). (#140)
Empty DETECTOR and OBSERVABLE_INCLUDE annotations (without targets) no longer crash the parser; they now produce zero detector/observable bits, matching Stim semantics. (#127)
CompiledDetectorSampler.sample with use_detector_reference_sample=True or use_observable_reference_sample=True no longer returns fewer rows than shots when called with an explicit batch_size that exactly divides shots. (#131)
Incorrect visualization of CORRELATED_ERROR and ELSE_CORRELATED_ERROR instructions in the pyzx diagram renderer. Previously, error vertices were rendered as classical spiders instead of bold quantum spiders. (#133)
Sweep-bit targets (e.g. CX sweep[0] 1) were silently parsed as unconditional gates. The parser now raises NotImplementedError, since sweep parameters are not supported by Tsim. (#136)
Added
TPP and TPP_DAG instructions — applies exp(-i pi/8 P) or exp(+i pi/8 P) (up to global phase) for a Pauli product P, i.e., phases the -1 eigenspace of P by exp(i pi/4) or exp(-i pi/4). (#121)
Circuit.is_clifford now supports REPEAT blocks. (#128)