Commit fa15304
authored
Dem polish (#314)
* Add DetectorErrorModel.from_guppy and rework lowered QIS replay to strict global-order MeasId pairing
* Trace Guppy result() tags to MeasIds for reorder-robust tag-referenced detectors in from_guppy
* Accept D0/L0 id form in from_guppy detectors/observables (normalized to int)
* Document tracked-Pauli qubit-numbering limitation in from_guppy
* Add sound HUGR-based result()-tag to measurement extraction in pecos-hugr-qis
* Excise proven-unsound runtime result()-tag linkage; keep sound HUGR extractor and positional from_guppy
* Remove diagnostic dump scaffolding from result_tags tests
* Make result_tags clippy-clean (doc backticks, elide lifetime)
* Wire sound HUGR-backed result_tags into from_guppy (Rust-centric, loop-guarded fail-loud)
* Address external review: harden HUGR extractor, fix replay (#5/#6), revert gap-4 wiring, fail-loud schema, correct docs
* Revert broken dynamic-control guard, fail-loud on out-of-range metadata refs, add regression tests
* Route all circuit-ingest and public DEM paths through fallible try_build, reject inconsistent num_measurements
* Enforce num_measurements/influence-map consistency in try_build, closing the public-builder bypass
* Replace TRY004 noqas with a private _MetadataError type; drop stray ccengine blank line
* Consolidate detector/observable schema validation into the Rust DEM builder; thin from_guppy wrapper
* Tolerate redundant records+meas_ids co-presence, fail loud on non-redundant; fix logical_circuit regression
* Correct stale proposal 001 and try_build rustdoc to match redundancy-tolerant meas_ids semantics
* Wire sound result_tags into from_guppy for the straight-line case; commit cross-check that HUGR ordinal == trace MeasId order
* Fix result_tags rewriter: strict-parse + redundancy-check instead of mask + additive; make correspondence test load-bearing
* Round-10 doc nits: clarify result_tags is from_guppy-only and alternatives-not-additive
* Add proposal 002: runtime-loop result_tags via dataflow-bound measurement provenance
* Add proposals 003 (hand-authored tracked Paulis) and 004 (sound DEM for measurement-dependent control)
* Add proposals 005 (array-valued result) and 006 (linear-combination result); index relationships
* Move docs/proposals/ to pecos-docs; update code refs to by-name-only; fix stale qalloc.py docs path
* Fix typos pre-commit hook flag in reject_tracked_pauli rustdoc (mis-ingested -> parsed as the wrong thing)
* Drop "in pecos-docs" pointer from public code refs; refresh uv.lock for pymdown-extensions
* Remove all 'see proposal' / pecos-docs references from public source; pecos-docs is private by design
* Remove stale doc stubs and the in-source pointer to a moved future-work note
* Extract _batched_stabilizers and _normalize_ancilla_budget into pecos.qec.surface._ancilla_batching
* Add ancilla_budget kwarg to get_num_qubits with same clamping as normalize_ancilla_budget
* Support ancilla-budgeted surface-code memory in from_guppy via batched Guppy codegen
* Address round-4 review: fix ruff/black format conflict, add concrete batch-order pin tests, type-validate ancilla_budget kwarg, add PECOS-native decoder smoke
* Add constrained-surface mismatched-num_measurements fail-loud test through the generic Rust validation path
* Harden constrained-ancilla from_guppy path: fail-loud trace contract, constrained topology caching, honest measurement-order check, and regression tests
* Generalize surface/sampler DEM paths: patch-faithful traced_qis + cache identity, unified distance validation, de-duplicated geometry helpers, and DemBuilder-parity sampler JSON validation
Sampler JSON now shares DemBuilder-style stamped-MeasId resolution, duplicate-ID rejection, records/meas_ids redundancy, and measurement-order frame validation.
* Apply just lint: rustfmt, black, doc-markdown backticks, and typo fix1 parent aad8293 commit fa15304
39 files changed
Lines changed: 3878 additions & 816 deletions
File tree
- crates
- pecos-hugr-qis
- src
- tests/fixtures
- pecos-qec
- src/fault_tolerance
- dem_builder
- tests
- docs/proposals
- exp/pecos-stab-tn
- docs
- src/stab_mps
- python
- pecos-rslib/src
- quantum-pecos
- src/pecos
- guppy
- qec
- surface
- slr
- tests/qec
- surface
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| 78 | + | |
| 79 | + | |
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
0 commit comments