Repository navigation
stabilizer-qec 1.7.0
The Python package and the Rust crate both at 1.7.0, "faster": error models in 0.4 to 0.6 of
Stim's time, measurement conversion in 0.1 to 0.25, the graph-like distance in 0.1 to 0.2 and
now as Stim's own answer, and matching at or below PyMatching's time on Apple silicon (about 1.1
times on Linux arm64 and 1.2 on x86_64), with every result unchanged and fingerprinted on every
platform. Benchmarks run on Linux arm64 as well as x86_64, and at 4 threads and every core.
Changed
shortest_graphlike_error, on circuits and on models, now runs Stim's own search (one
breadth-first search over pairs of detection events from every edge that flips an
observable) and so returns Stim's own faults, in Stim's order: its model text, and its
explained errors with and withoutcanonicalize_circuit_errors, equal Stim's character for
character (checked on Stim's generated codes, 300 random models and 100 random circuits;
1.6 matched Stim's length only). It takes 0.11 to 0.12 of Stim's time from d = 11 to 19,
where 1.6 took 0.71 to 1.82.- Error models are built in 0.6 of Stim's time on Apple silicon (1.6: 2.0): the walk no longer
allocates for every combination of a noise channel's errors, and the pass that looks ahead
for a loop's period skips noise, which it never collects. The models are unchanged (their
text is fingerprinted on each platform). - Measurements are converted to detection events 64 shots at a time, as Stim converts them
(each detector the XOR of its records' words, rows moved in and out by 64×64 bit
transposes): 0.24 of Stim's time on Apple silicon (1.6: 1.26), the output unchanged. - Matching is 14% faster plain and 12% correlated, every decision unchanged (the matcher's
fingerprints): a reminder for a node with nothing ahead is passed over without a scan while
nothing that could change that has happened, no scan at all when no region grows, the scan
reads one array with no selects, and reminders compare as integers. Against PyMatching,
plain matching now takes 0.98 of its time on Apple silicon, 1.08 on Linux arm64 and about
1.2 on Linux x86_64 (whose spare registers the loop exhausts); correlated matching 0.91 to
0.98, 0.85 and about 1.2. tools/bench.pyadds sampling and decoding at 4 threads and on every core (no reference:
Stim's sampler and PyMatching's batch decoding are single-threaded), and records the core
count.
Added
tools/fingerprints.pyandtests/test_fingerprints.py: a hash of 152 results (error models,
shots for a seed at any thread count, raw measurements, model samples, m2d, every decoder,
the distance searches), checked on Linux, macOS and Windows, so work on speed cannot change
a result unnoticed.examples/hot.rsruns each benchmark's job natively for a profiler;
benchmarks run on Linux arm64 as well as x86_64 (.github/workflows/bench.yml).