StabMps/StabVec: stabilizer+MPS simulator, Python bindings, Selene pl…#295
Merged
StabMps/StabVec: stabilizer+MPS simulator, Python bindings, Selene pl…#295
Conversation
25d3366 to
9c2f658
Compare
…ugins
Comprehensive stabilizer tensor network simulation crate (exp/pecos-stab-tn)
plus Python/Selene integration and repo-wide naming cleanup.
## Naming (Stab{Variant} convention)
- CliffordRz → StabVec (sum of stabilizer states)
- Stn/CliffordMps → StabMps (stabilizer tableau + MPS)
- S/Sdg → SZ/SZdg in enums
- Selene plugins: pecos-selene-stab-vec, pecos-selene-stab-mps, pecos-selene-mast
## StabMps simulator (exp/pecos-stab-tn)
- Hybrid stabilizer-tableau + MPS for Clifford+rotation circuits
- MAST magic state injection (deferred ancilla projection)
- Lazy virtual-frame measurement with DeferredOp queue
- Pauli frame tracking (Y-direct rep, exact decomposition-based flush)
- merge_rz: same-qubit RZ batching with Clifford commutation
- QEC API: reset_qubit, pz/px, extract_syndromes, inject_paulis_in_frame
- Builder: for_qec() preset, auto_grow_bond_dim, pauli_frame_tracking
- Diagnostics: pragmatic_drift_count, is_state_exact, StabMpsStats, OFD nullity
- 238 lib tests + 81 verification tests (tiered: quick + ignored deep fuzz)
## Python bindings (python/pecos-rslib-exp)
- PyO3/maturin: StabMps and Mast classes
- Gate dispatch (run_gate/run_1q_gate/run_2q_gate), QEC helpers
- Qubit bounds checking on all methods
## Selene plugins
- pecos-selene-stab-mps, pecos-selene-mast: SimulatorInterface impls
- Conformance tests pass
- Added to CI workflow matrix, Justfile, workspace configs
## Merge reconciliation
- QuantumSimulator::num_qubits() added to all impls across repo
- StabilizerTableauSimulator stale num_qubits removed
- ForeignSimulator/PyForeignSimulator: num_qubits threaded through FFI
## Code quality
- Zero clippy warnings, zero rustc warnings
- All .unwrap() in production code replaced with .expect()
- design/ docs stubbed (moved to pecos-docs vault)
- Python backward-compat aliases: CliffordRz = StabVec
9c2f658 to
8594f89
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ugins
Comprehensive stabilizer tensor network simulation crate (exp/pecos-stab-tn) plus Python/Selene integration and repo-wide naming cleanup.
Naming (Stab{Variant} convention)
StabMps simulator (exp/pecos-stab-tn)
Python bindings (python/pecos-rslib-exp)
Selene plugins
Merge reconciliation
Code quality