Commit 8594f89
committed
StabMps/StabVec: stabilizer+MPS simulator, Python bindings, Selene plugins
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 = StabVec1 parent f01e083 commit 8594f89
File tree
162 files changed
+24696
-5298
lines changed- .github/workflows
- crates
- benchmarks
- benches
- modules
- pecos-cppsparsestab/src
- pecos-cuquantum/src
- pecos-engines
- src
- tests
- pecos-foreign
- src
- tests
- pecos-gpu-sims/src
- pecos-simulators
- examples
- src
- stab_vec
- tests
- pecos/src
- design
- proposals
- docs
- concepts
- development
- user-guide
- exp
- pecos-neo
- docs/design
- src/extensible
- pecos-stab-tn
- docs
- examples
- src
- mps
- stab_mps
- tests
- python
- pecos-rslib-exp
- src
- pecos-rslib
- src
- quantum-pecos/src/pecos
- simulators
- selene-plugins
- pecos-selene-mast
- python/pecos_selene_mast
- src
- pecos-selene-stab-mps
- python/pecos_selene_stab_mps
- src
- pecos-selene-stab-vec
- python/pecos_selene_stab_vec
- src
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
162 files changed
+24696
-5298
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
123 | | - | |
124 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
125 | 131 | | |
126 | 132 | | |
127 | 133 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
| 507 | + | |
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| 56 | + | |
| 57 | + | |
54 | 58 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
63 | | - | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
| 90 | + | |
| 91 | + | |
86 | 92 | | |
87 | 93 | | |
88 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments