Skip to content

Import Stim detector error models for Pauli-frame-style sampling#749

Closed
Oishi1029 wants to merge 1 commit into
QuantumSavory:masterfrom
Oishi1029:import-stim-dem-728
Closed

Import Stim detector error models for Pauli-frame-style sampling#749
Oishi1029 wants to merge 1 commit into
QuantumSavory:masterfrom
Oishi1029:import-stim-dem-728

Conversation

@Oishi1029

Copy link
Copy Markdown

Closes #728.

What this adds

read_detector_error_model(path) (and parse_detector_error_model(string) /
an IO method) import a Stim detector error model and return a
DetectorErrorModelCircuit — an AbstractVector{AbstractOperation} accepted
directly by the existing pftrajectories methods, per the issue's core
requirement (no separate sampling backend):

circuit = read_detector_error_model("surface_code.dem")
frames = pftrajectories(circuit; trajectories=10_000)
measurements(frames)              # trajectories × (n_detectors + n_logicals) Bool matrix
detectorview(circuit, frames)     # the detector block      (columns 1:D, Dk → k+1)
observableview(circuit, frames)   # the observable block    (columns D+1:D+L, Lk → D+k+1)

Two new operations carry the .dem semantics, exactly as suggested in the issue:

  • DetectorError(p, detector_bits, logical_bits) — one independent Bernoulli
    mechanism per error(p) line; when it fires it XORs its measurement bits into
    the frame (mechanisms with identical targets stay independent, as in Stim's sampler);
  • DemDeclaration(n_detectors, n_logicals) — the anticipated no-op declaration
    whose affectedbits makes pftrajectories allocate output columns even for
    declared-but-never-flipped detectors/observables.

Both implement affectedbits/affectedqubits/apply! for PauliFrame and
Register, so the same imported circuit also runs under mctrajectories (used
in the tests as an independent cross-check of the sampling statistics). Both are
plain concrete structs picked up automatically by the gate-compactification sum
type — no changes to sumtypes.jl, and no compactification warning.

Parser coverage

error (with ^ separators), detector, logical_observable,
shift_detectors, and (nested) repeat blocks; plus instruction tags,
coordinate arguments, comments, blank lines, and case-insensitive names.
Malformed/unsupported syntax raises an ArgumentError naming the offending line
(23 cases tested). Semantics were matched against Stim's implementation
(detector_error_model.cc), not just the format doc — in particular:
num_detectors = largest mentioned/declared absolute index + 1 (a trailing
shift_detectors does not pad), repeat 0 is legal, and targets repeated
within one instruction cancel by parity while still counting toward model size.
Coordinates and tags are parsed and discarded (the issue marks them optional).
repeat blocks are unrolled at import time; the docs' folded
repetition-code model (d=4, r=1000) imports to the expected 3003 detectors /
13 000 mechanisms and is part of the test suite.

Tests (test/test_stim_dem_import.jl)

  • Statistical validation on small hand-written models with fixed seeds and
    tolerances of 5 standard errors (SE = √(p(1−p)/n), n = 20 000; false-failure
    ≈ 6e-7 per assertion for any seed — the math is in the test comments).
  • Exact cross-column invariants that marginal frequencies cannot see
    (per-trajectory D1 == L0; P(D0 ⊻ D1)), pinning correct mechanism wiring.
  • An in-suite falsification power guard: a deliberately corrupted model
    (0.2 → 0.3) must land outside the acceptance bands (≈26 SE away), proving on
    every CI run that the tests can detect a miscalibrated import.
  • Exact shape pins for the documented output dimensions, including
    declared-but-unused detectors, implicit declarations, trailing shifts,
    repeat 0, nested repeats, parity cancellation, and the empty model.
  • A mctrajectories/Register cross-backend statistical check.
  • File-path and IO reading, plus error-message tests.

Docs

New page "Stim Detector Error Models" (docs/src/stim_dem.md) with a
deterministic imported example and the expected output shape, linked docstrings
for all new names, and a CHANGELOG entry.

Test evidence

$ julia --project=. -e 'using Pkg; Pkg.test()'
Test Summary: |   Pass  Broken   Total      Time
Package       | 369206       9  369215  13m38.2s
     Testing QuantumClifford tests passed

Julia 1.12.6, macOS arm64 (M1 Pro). The 9 broken are pre-existing markers; the
new testitem alone passes 119/119. I also verified the statistical tests detect
injected bugs — I broke the implementation three ways (sampling probability
scaled by 0.9, logical-observable columns shifted by one, XOR replaced by
overwrite) and the suite caught each one, with deviations matching the
theoretically predicted magnitudes. (Local note: the PyTesseractDecoder
extension failed to precompile on my machine due to a missing local Python
wheel — unrelated to this change; the suite passed regardless.)


Disclosure: I used Claude (Anthropic) to help draft the implementation and
tests, which I then reviewed, manually verified, and tested locally. Per the
maintainer's note on AI use: I have contributed to open source before, including
during this unitaryHACK (harmoniqs/Legato.jl#27, harmoniqs/Piccolo.jl#238).
unitaryHACK 2026 submission.

Add read_detector_error_model and parse_detector_error_model, which lower
the useful subset of Stim's .dem format (error, detector, logical_observable,
shift_detectors, nested repeat blocks, tags, comments) to a circuit of new
DetectorError and DemDeclaration operations sampled by the existing
pftrajectories machinery. Includes detectorview/observableview accessors,
documentation with the expected output shapes, and statistical tests with
5-sigma tolerances and an in-suite falsification power guard.
@github-actions

Copy link
Copy Markdown
Contributor

Benchmark Results (Julia v1)

Time benchmarks
master 1c3b02c... master / 1c3b02c...
circuitsim/compactification/compact 5.85 ± 0.034 ms 5.84 ± 0.031 ms 1 ± 0.0079
circuitsim/compactification/no_compact 5.95 ± 0.042 ms 5.94 ± 0.045 ms 1 ± 0.01
circuitsim/mctrajectories/q1001_r1 12.1 ± 0.36 ms 12 ± 0.59 ms 1.01 ± 0.058
circuitsim/mctrajectories/q101_r1 0.146 ± 0.0074 ms 0.148 ± 0.0079 ms 0.987 ± 0.072
circuitsim/mctrajectories_sumtype/q1001_r1 11.4 ± 0.12 ms 11.4 ± 0.42 ms 1.01 ± 0.039
circuitsim/mctrajectories_sumtype/q101_r1 0.105 ± 0.002 ms 0.105 ± 0.0016 ms 0.997 ± 0.024
circuitsim/mctrajectories_union/q1001_r1 11.6 ± 0.24 ms 11.4 ± 0.39 ms 1.01 ± 0.041
circuitsim/mctrajectories_union/q101_r1 0.103 ± 0.0014 ms 0.104 ± 0.0013 ms 0.995 ± 0.018
circuitsim/pftrajectories/q1001_r1 0.0679 ± 0.031 ms 0.0666 ± 0.032 ms 1.02 ± 0.67
circuitsim/pftrajectories/q1001_r100 0.139 ± 0.011 ms 0.14 ± 0.011 ms 0.995 ± 0.11
circuitsim/pftrajectories/q1001_r10000 0.678 ± 0.013 ms 0.681 ± 0.01 ms 0.996 ± 0.024
circuitsim/pftrajectories/q101_r1 6.82 ± 2.9 μs 6.77 ± 2.9 μs 1.01 ± 0.61
circuitsim/pftrajectories_sumtype/q1001_r1 0.081 ± 0.00099 ms 0.0857 ± 0.0012 ms 0.944 ± 0.018
circuitsim/pftrajectories_sumtype/q1001_r100 0.147 ± 0.0024 ms 0.152 ± 0.0033 ms 0.969 ± 0.026
circuitsim/pftrajectories_sumtype/q1001_r10000 0.687 ± 0.011 ms 0.691 ± 0.0094 ms 0.993 ± 0.021
circuitsim/pftrajectories_sumtype/q1001_r10000_fastrow 4.97 ± 0.032 ms 4.96 ± 0.027 ms 1 ± 0.0083
circuitsim/pftrajectories_sumtype/q101_r1 8.11 ± 0.13 μs 8.63 ± 0.14 μs 0.94 ± 0.021
circuitsim/pftrajectories_union/q1001_r1 18.2 ± 0.13 μs 18.2 ± 0.13 μs 1 ± 0.01
circuitsim/pftrajectories_union/q1001_r100 0.0855 ± 0.0015 ms 0.0854 ± 0.0014 ms 1 ± 0.023
circuitsim/pftrajectories_union/q1001_r10000 0.621 ± 0.01 ms 0.621 ± 0.011 ms 1 ± 0.024
circuitsim/pftrajectories_union/q101_r1 1.89 ± 0.02 μs 1.88 ± 0.02 μs 1 ± 0.015
clifford/dense/cnot250_on_dense500_destab 9.22 ± 0.032 ms 9.15 ± 0.036 ms 1.01 ± 0.0053
clifford/dense/cnot250_on_dense500_stab 4.68 ± 0.024 ms 4.5 ± 0.025 ms 1.04 ± 0.0079
clifford/dense/cnot250_on_diag500_destab 0.854 ± 0.0021 ms 0.853 ± 0.0024 ms 1 ± 0.0038
clifford/dense/cnot250_on_diag500_stab 0.423 ± 0.0085 ms 0.424 ± 0.0082 ms 0.998 ± 0.028
clifford/dense/cnot_on_dense500_destab 0.0367 ± 0.00029 ms 0.0377 ± 0.00034 ms 0.974 ± 0.012
clifford/dense/cnot_on_dense500_stab 16.9 ± 0.18 μs 18.8 ± 0.18 μs 0.896 ± 0.013
clifford/dense/cnot_on_diag500_destab 24.2 ± 0.45 μs 24.3 ± 0.5 μs 0.998 ± 0.028
clifford/dense/cnot_on_diag500_stab 11.4 ± 0.26 μs 12.5 ± 0.33 μs 0.909 ± 0.032
clifford/dense/dense500_on_dense500_destab 9.27 ± 0.035 ms 9.14 ± 0.041 ms 1.01 ± 0.0059
clifford/dense/dense500_on_dense500_stab 4.68 ± 0.028 ms 4.5 ± 0.026 ms 1.04 ± 0.0087
clifford/dense/dense500_on_diag500_destab 0.989 ± 0.0025 ms 0.85 ± 0.0027 ms 1.16 ± 0.0048
clifford/dense/dense500_on_diag500_stab 0.423 ± 0.0084 ms 0.424 ± 0.0082 ms 0.998 ± 0.028
clifford/symbolic/cnot250_on_dense500_destab 1.27 ± 0.01 ms 1.27 ± 0.011 ms 1 ± 0.012
clifford/symbolic/cnot250_on_dense500_stab 0.615 ± 0.0097 ms 0.614 ± 0.0088 ms 1 ± 0.021
clifford/symbolic/cnot250_on_diag500_destab 1.05 ± 0.0099 ms 1.05 ± 0.012 ms 1 ± 0.015
clifford/symbolic/cnot250_on_diag500_stab 0.541 ± 0.011 ms 0.54 ± 0.011 ms 1 ± 0.029
clifford/symbolic/cnot_on_dense500_destab 4.24 ± 0.031 μs 4.24 ± 0.031 μs 1 ± 0.01
clifford/symbolic/cnot_on_dense500_stab 2.18 ± 0.04 μs 2.18 ± 0.04 μs 1 ± 0.026
clifford/symbolic/cnot_on_diag500_destab 4.26 ± 0.061 μs 4.28 ± 0.11 μs 0.995 ± 0.029
clifford/symbolic/cnot_on_diag500_stab 2.23 ± 0.079 μs 2.22 ± 0.081 μs 1 ± 0.051
ecc/evaluate_decoder/shor_bp_comm 1.73 ± 0.058 ms 1.76 ± 0.056 ms 0.982 ± 0.046
ecc/evaluate_decoder/shor_bp_naivesyn 3.78 ± 0.14 ms 3.82 ± 0.13 ms 0.989 ± 0.051
ecc/evaluate_decoder/shor_bp_shorsyn 4.12 ± 0.15 ms 4.11 ± 0.11 ms 1 ± 0.045
ecc/evaluate_decoder/shor_pybp_comm 14.1 ± 1.1 ms 15 ± 1.1 ms 0.941 ± 0.1
ecc/evaluate_decoder/shor_pybp_naivesyn 28.8 ± 1.5 ms 28.6 ± 1.5 ms 1 ± 0.074
ecc/evaluate_decoder/shor_pybp_shorsyn 0.0345 ± 0.0018 s 30.7 ± 2.1 ms 1.12 ± 0.096
ecc/evaluate_decoder/shor_pybposd_comm 16.4 ± 1.1 ms 14.9 ± 1.1 ms 1.1 ± 0.11
ecc/evaluate_decoder/shor_pybposd_naivesyn 29.9 ± 3.5 ms 30.1 ± 2.1 ms 0.994 ± 0.13
ecc/evaluate_decoder/shor_pybposd_shorsyn 30 ± 2.7 ms 30.7 ± 2.4 ms 0.975 ± 0.12
ecc/evaluate_decoder/shor_table_comm 0.26 ± 0.042 ms 0.245 ± 0.013 ms 1.06 ± 0.18
ecc/evaluate_decoder/shor_table_naivesyn 0.828 ± 0.0059 ms 0.832 ± 0.0059 ms 0.996 ± 0.01
ecc/evaluate_decoder/shor_table_shorsyn 1.19 ± 0.067 ms 1.14 ± 0.0087 ms 1.04 ± 0.059
ecc/evaluate_decoder/toric8_bp_comm 0.557 ± 0.034 s 0.551 ± 0.046 s 1.01 ± 0.1
ecc/evaluate_decoder/toric8_bp_naivesyn 1.1 ± 0.044 s 1.07 ± 0.026 s 1.03 ± 0.048
ecc/evaluate_decoder/toric8_bp_shorsyn 1.13 ± 0.11 s 1.12 ± 0.055 s 1.01 ± 0.11
ecc/evaluate_decoder/toric8_pybp_comm 0.0453 ± 0.0014 s 0.0452 ± 0.002 s 1 ± 0.055
ecc/evaluate_decoder/toric8_pybp_naivesyn 0.0955 ± 0.0039 s 0.0946 ± 0.003 s 1.01 ± 0.053
ecc/evaluate_decoder/toric8_pybp_shorsyn 0.103 ± 0.0022 s 0.102 ± 0.0034 s 1.01 ± 0.04
ecc/evaluate_decoder/toric8_pybposd_comm 0.0494 ± 0.0023 s 0.0456 ± 0.0016 s 1.08 ± 0.063
ecc/evaluate_decoder/toric8_pybposd_naivesyn 0.0961 ± 0.0046 s 0.0955 ± 0.0034 s 1.01 ± 0.06
ecc/evaluate_decoder/toric8_pybposd_shorsyn 0.103 ± 0.0026 s 0.102 ± 0.0042 s 1 ± 0.048
ecc/evaluate_decoder/toric8_pymatch_comm 2.87 ± 0.04 ms 2.87 ± 0.039 ms 1 ± 0.02
ecc/evaluate_decoder/toric8_pymatch_naivesyn 12 ± 0.72 ms 10.5 ± 0.12 ms 1.14 ± 0.07
ecc/evaluate_decoder/toric8_pymatch_shorsyn 18.2 ± 0.94 ms 17.5 ± 1 ms 1.04 ± 0.08
ecc/evaluate_decoder/toric8_table_comm 2.76 ± 0.027 ms 2.77 ± 0.027 ms 0.996 ± 0.014
ecc/evaluate_decoder/toric8_table_naivesyn 10.7 ± 0.74 ms 10.1 ± 0.057 ms 1.06 ± 0.074
ecc/evaluate_decoder/toric8_table_shorsyn 17.2 ± 0.08 ms 17.1 ± 0.067 ms 1.01 ± 0.0061
pauli/mul/100 0.04 ± 0.01 μs 0.04 ± 0.01 μs 1 ± 0.35
pauli/mul/1000 0.04 ± 0.01 μs 0.04 ± 0.01 μs 1 ± 0.35
pauli/mul/100000 0.631 ± 0.05 μs 0.631 ± 0.06 μs 1 ± 0.12
pauli/mul/20000000 0.179 ± 0.014 ms 0.171 ± 0.018 ms 1.05 ± 0.14
stabilizer/canon/cano500 2.54 ± 0.017 ms 2.42 ± 0.022 ms 1.05 ± 0.012
stabilizer/canon/diag_cano500 0.57 ± 0.0089 ms 0.57 ± 0.0085 ms 1 ± 0.022
stabilizer/canon/diag_gott500 2.19 ± 0.044 ms 2.14 ± 0.047 ms 1.02 ± 0.03
stabilizer/canon/diag_rref500 0.527 ± 0.0083 ms 0.527 ± 0.0085 ms 0.999 ± 0.022
stabilizer/canon/gott500 4.19 ± 0.21 ms 4.01 ± 0.2 ms 1.04 ± 0.074
stabilizer/canon/md_cano500 0.976 ± 0.012 ms 1.03 ± 0.0093 ms 0.95 ± 0.015
stabilizer/canon/md_rref500 0.945 ± 0.012 ms 1.01 ± 0.011 ms 0.941 ± 0.016
stabilizer/canon/rref500 2.59 ± 0.017 ms 2.45 ± 0.018 ms 1.06 ± 0.011
stabilizer/project/destabilizer 12.3 ± 0.15 μs 12.2 ± 0.14 μs 1.01 ± 0.017
stabilizer/project/stabilizer 6.25 ± 0.079 μs 5.8 ± 0.09 μs 1.08 ± 0.022
stabilizer/tensor/diag_pow5_20 1.03 ± 0.71 ms 1.12 ± 0.85 ms 0.92 ± 0.95
stabilizer/tensor/pow5_20 2.82 ± 0.27 μs 2.6 ± 0.29 μs 1.08 ± 0.16
stabilizer/trace/destabilizer 16.3 ± 0.36 μs 18.3 ± 0.3 μs 0.889 ± 0.025
stabilizer/trace/stabilizer 18.9 ± 0.19 μs 17.2 ± 0.16 μs 1.1 ± 0.015
time_to_load 1.16 ± 0.0018 s 1.18 ± 0.014 s 0.983 ± 0.012
Memory benchmarks
master 1c3b02c... master / 1c3b02c...
circuitsim/compactification/compact 0 allocs: 0 B 0 allocs: 0 B
circuitsim/compactification/no_compact 6 k allocs: 0.275 MB 6 k allocs: 0.275 MB 1
circuitsim/mctrajectories/q1001_r1 18 k allocs: 0.489 MB 18 k allocs: 0.489 MB 1
circuitsim/mctrajectories/q101_r1 1.82 k allocs: 0.0493 MB 1.82 k allocs: 0.0493 MB 1
circuitsim/mctrajectories_sumtype/q1001_r1 9 allocs: 0.484 kB 9 allocs: 0.484 kB 1
circuitsim/mctrajectories_sumtype/q101_r1 8 allocs: 0.25 kB 8 allocs: 0.25 kB 1
circuitsim/mctrajectories_union/q1001_r1 9 allocs: 0.484 kB 9 allocs: 0.484 kB 1
circuitsim/mctrajectories_union/q101_r1 8 allocs: 0.25 kB 8 allocs: 0.25 kB 1
circuitsim/pftrajectories/q1001_r1 2 k allocs: 0.0916 MB 2 k allocs: 0.0916 MB 1
circuitsim/pftrajectories/q1001_r100 2 k allocs: 0.0916 MB 2 k allocs: 0.0916 MB 1
circuitsim/pftrajectories/q1001_r10000 2 k allocs: 0.0916 MB 2 k allocs: 0.0916 MB 1
circuitsim/pftrajectories/q101_r1 0.201 k allocs: 9.42 kB 0.201 k allocs: 9.42 kB 1
circuitsim/pftrajectories_sumtype/q1001_r1 0 allocs: 0 B 0 allocs: 0 B
circuitsim/pftrajectories_sumtype/q1001_r100 0 allocs: 0 B 0 allocs: 0 B
circuitsim/pftrajectories_sumtype/q1001_r10000 0 allocs: 0 B 0 allocs: 0 B
circuitsim/pftrajectories_sumtype/q1001_r10000_fastrow 0 allocs: 0 B 0 allocs: 0 B
circuitsim/pftrajectories_sumtype/q101_r1 0 allocs: 0 B 0 allocs: 0 B
circuitsim/pftrajectories_union/q1001_r1 2 allocs: 0.0938 kB 2 allocs: 0.0938 kB 1
circuitsim/pftrajectories_union/q1001_r100 2 allocs: 0.0938 kB 2 allocs: 0.0938 kB 1
circuitsim/pftrajectories_union/q1001_r10000 2 allocs: 0.0938 kB 2 allocs: 0.0938 kB 1
circuitsim/pftrajectories_union/q101_r1 2 allocs: 0.0938 kB 2 allocs: 0.0938 kB 1
clifford/dense/cnot250_on_dense500_destab 0 allocs: 0 B 0 allocs: 0 B
clifford/dense/cnot250_on_dense500_stab 0 allocs: 0 B 0 allocs: 0 B
clifford/dense/cnot250_on_diag500_destab 0 allocs: 0 B 0 allocs: 0 B
clifford/dense/cnot250_on_diag500_stab 0 allocs: 0 B 0 allocs: 0 B
clifford/dense/cnot_on_dense500_destab 3 allocs: 0.0938 kB 3 allocs: 0.0938 kB 1
clifford/dense/cnot_on_dense500_stab 3 allocs: 0.0938 kB 3 allocs: 0.0938 kB 1
clifford/dense/cnot_on_diag500_destab 3 allocs: 0.0938 kB 3 allocs: 0.0938 kB 1
clifford/dense/cnot_on_diag500_stab 3 allocs: 0.0938 kB 3 allocs: 0.0938 kB 1
clifford/dense/dense500_on_dense500_destab 0 allocs: 0 B 0 allocs: 0 B
clifford/dense/dense500_on_dense500_stab 0 allocs: 0 B 0 allocs: 0 B
clifford/dense/dense500_on_diag500_destab 0 allocs: 0 B 0 allocs: 0 B
clifford/dense/dense500_on_diag500_stab 0 allocs: 0 B 0 allocs: 0 B
clifford/symbolic/cnot250_on_dense500_destab 0 allocs: 0 B 0 allocs: 0 B
clifford/symbolic/cnot250_on_dense500_stab 0 allocs: 0 B 0 allocs: 0 B
clifford/symbolic/cnot250_on_diag500_destab 0 allocs: 0 B 0 allocs: 0 B
clifford/symbolic/cnot250_on_diag500_stab 0 allocs: 0 B 0 allocs: 0 B
clifford/symbolic/cnot_on_dense500_destab 0 allocs: 0 B 0 allocs: 0 B
clifford/symbolic/cnot_on_dense500_stab 0 allocs: 0 B 0 allocs: 0 B
clifford/symbolic/cnot_on_diag500_destab 0 allocs: 0 B 0 allocs: 0 B
clifford/symbolic/cnot_on_diag500_stab 0 allocs: 0 B 0 allocs: 0 B
ecc/evaluate_decoder/shor_bp_comm 0.0394 M allocs: 1.6 MB 0.0393 M allocs: 1.59 MB 1.01
ecc/evaluate_decoder/shor_bp_naivesyn 0.0746 M allocs: 3.14 MB 0.0747 M allocs: 3.14 MB 0.999
ecc/evaluate_decoder/shor_bp_shorsyn 0.075 M allocs: 3.2 MB 0.0755 M allocs: 3.21 MB 0.995
ecc/evaluate_decoder/shor_pybp_comm 0.0935 M allocs: 3.29 MB 0.0935 M allocs: 3.29 MB 1
ecc/evaluate_decoder/shor_pybp_naivesyn 0.182 M allocs: 6.49 MB 0.182 M allocs: 6.49 MB 1
ecc/evaluate_decoder/shor_pybp_shorsyn 0.182 M allocs: 6.55 MB 0.182 M allocs: 6.55 MB 1
ecc/evaluate_decoder/shor_pybposd_comm 0.0935 M allocs: 3.29 MB 0.0935 M allocs: 3.29 MB 1
ecc/evaluate_decoder/shor_pybposd_naivesyn 0.182 M allocs: 6.49 MB 0.182 M allocs: 6.49 MB 1
ecc/evaluate_decoder/shor_pybposd_shorsyn 0.182 M allocs: 6.55 MB 0.182 M allocs: 6.55 MB 1
ecc/evaluate_decoder/shor_table_comm 3.98 k allocs: 0.17 MB 3.98 k allocs: 0.17 MB 1
ecc/evaluate_decoder/shor_table_naivesyn 2.8 k allocs: 0.185 MB 2.8 k allocs: 0.185 MB 1
ecc/evaluate_decoder/shor_table_shorsyn 3.28 k allocs: 0.247 MB 3.28 k allocs: 0.247 MB 1
ecc/evaluate_decoder/toric8_bp_comm 1.01 M allocs: 0.165 GB 1.03 M allocs: 0.169 GB 0.981
ecc/evaluate_decoder/toric8_bp_naivesyn 2.04 M allocs: 0.333 GB 2.1 M allocs: 0.342 GB 0.975
ecc/evaluate_decoder/toric8_bp_shorsyn 2.09 M allocs: 0.34 GB 2.07 M allocs: 0.337 GB 1.01
ecc/evaluate_decoder/toric8_pybp_comm 0.103 M allocs: 4.18 MB 0.103 M allocs: 4.18 MB 1
ecc/evaluate_decoder/toric8_pybp_naivesyn 0.218 M allocs: 9.04 MB 0.218 M allocs: 9.04 MB 1
ecc/evaluate_decoder/toric8_pybp_shorsyn 0.233 M allocs: 10.7 MB 0.233 M allocs: 10.7 MB 1
ecc/evaluate_decoder/toric8_pybposd_comm 0.103 M allocs: 4.18 MB 0.103 M allocs: 4.18 MB 1
ecc/evaluate_decoder/toric8_pybposd_naivesyn 0.218 M allocs: 9.04 MB 0.218 M allocs: 9.04 MB 1
ecc/evaluate_decoder/toric8_pybposd_shorsyn 0.233 M allocs: 10.7 MB 0.233 M allocs: 10.7 MB 1
ecc/evaluate_decoder/toric8_pymatch_comm 14 k allocs: 1.05 MB 14 k allocs: 1.05 MB 1
ecc/evaluate_decoder/toric8_pymatch_naivesyn 0.0389 M allocs: 2.71 MB 0.0389 M allocs: 2.71 MB 1
ecc/evaluate_decoder/toric8_pymatch_shorsyn 0.054 M allocs: 4.41 MB 0.054 M allocs: 4.41 MB 1
ecc/evaluate_decoder/toric8_table_comm 13.9 k allocs: 0.835 MB 13.9 k allocs: 0.835 MB 1
ecc/evaluate_decoder/toric8_table_naivesyn 0.0388 M allocs: 2.28 MB 0.0388 M allocs: 2.28 MB 1
ecc/evaluate_decoder/toric8_table_shorsyn 0.0538 M allocs: 3.98 MB 0.0538 M allocs: 3.98 MB 1
pauli/mul/100 0 allocs: 0 B 0 allocs: 0 B
pauli/mul/1000 0 allocs: 0 B 0 allocs: 0 B
pauli/mul/100000 0 allocs: 0 B 0 allocs: 0 B
pauli/mul/20000000 0 allocs: 0 B 0 allocs: 0 B
stabilizer/canon/cano500 0 allocs: 0 B 0 allocs: 0 B
stabilizer/canon/diag_cano500 0 allocs: 0 B 0 allocs: 0 B
stabilizer/canon/diag_gott500 14.5 k allocs: 0.853 MB 14.5 k allocs: 0.853 MB 1
stabilizer/canon/diag_rref500 0 allocs: 0 B 0 allocs: 0 B
stabilizer/canon/gott500 14.5 k allocs: 0.854 MB 14.5 k allocs: 0.854 MB 1
stabilizer/canon/md_cano500 0 allocs: 0 B 0 allocs: 0 B
stabilizer/canon/md_rref500 0 allocs: 0 B 0 allocs: 0 B
stabilizer/canon/rref500 0 allocs: 0 B 0 allocs: 0 B
stabilizer/project/destabilizer 5 allocs: 0.281 kB 5 allocs: 0.281 kB 1
stabilizer/project/stabilizer 2 allocs: 0.0781 kB 2 allocs: 0.0781 kB 1
stabilizer/tensor/diag_pow5_20 0.032 k allocs: 24 MB 0.032 k allocs: 24 MB 1
stabilizer/tensor/pow5_20 29 allocs: 5.48 kB 29 allocs: 5.48 kB 1
stabilizer/trace/destabilizer 2 allocs: 0.0781 kB 2 allocs: 0.0781 kB 1
stabilizer/trace/stabilizer 3 allocs: 0.109 kB 3 allocs: 0.109 kB 1
time_to_load 0.149 k allocs: 11.1 kB 0.149 k allocs: 11.1 kB 1

@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.05213% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.67%. Comparing base (0729e6d) to head (1c3b02c).

Files with missing lines Patch % Lines
src/stim_dem_import.jl 99.05% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #749      +/-   ##
==========================================
+ Coverage   74.01%   74.67%   +0.66%     
==========================================
  Files         111      112       +1     
  Lines        7778     7989     +211     
==========================================
+ Hits         5757     5966     +209     
- Misses       2021     2023       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Krastanov

Copy link
Copy Markdown
Member

We do not accept LLM-generated PRs by unknown developers for our bounties.

@Krastanov Krastanov closed this Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import Stim detector error models for Pauli-frame-style sampling

2 participants