RustQEC 0.3 · Development

Compare the surface-code sampling paths

Pinned release measurements for named fixtures; these results are case-scoped and are not a general performance claim.

Five surface-code sampling paths

One-time precompilation is shown separately. Sample + output is the worker-local Sample phase plus b8 output and excludes both precompilation and pipe transport. Precompiled rows reuse a sampler; direct rows include their per-batch setup in the Sample column. Samples/s is calculated from Sample + output.

ImplementationPrecompile onceSampleb8 outputSample + outputSamples/s
rstim precompiled2.925 ms4.208 ms0.273 ms4.481 ms228,545
Stim precompiled1.115 ms16.093 ms0.035 ms16.128 ms63,493
rstim interpreted—7.330 ms0.199 ms7.529 ms136,015
Stim direct—16.775 ms0.040 ms16.815 ms60,896
rstim precompiled + atom loss2.979 ms4.002 ms0.264 ms4.266 ms240,053

All rows use the surface d=11, r=100 fixture with 1,024 shots. Each phase is the breakdown of the same median-total call selected from 7 calls after 2 warmups; precompile is one observed setup. Stim produces an already bit-packed array inside sample, so its packing work appears under “Sample” and its b8 step is only byte serialization. In this recorded run, rstim is 3.60× faster in the precompiled comparison. The precompiled atom-loss path is in the same 4 ms range as rstim precompiled; its small lead is within run-to-run variation and is not treated as an atom-loss speedup claim.

For the atom-loss case, one depolarization event and two independent per-atom loss events after each two-qubit gate all use p = 1 - 0.999^(1/3) ≈ 0.0003334445062, keeping the probability of at least one error at 0.001.

Checked simulator results

Inspect checked runs, limitations, and reproduction commands

Loading simulator evidence.

Historical measurements and CI regression checks

Detection and DEM sampling

These are separate, recorded workloads. Compare implementations only within the same workload and metric; reproduction details and limits are below.

WorkloadImplementationMetricResult
Surface d=13, r=13 detectrstim compiledElapsed time · lower is better34.339 ms
Surface d=13, r=13 detectStim CLIElapsed time · lower is better266.172 ms
Surface d=11, r=100 DEM samplerstimThroughput · higher is better329 shots/s
Surface d=11, r=100 DEM sampleStimThroughput · higher is better2,669 shots/s

Checked DEM results

Loading detector-model evidence.