RustQEC 0.3 · Development

Compare the surface-code sampling paths

Release-build measurements on the surface-code fixture below.

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

Near-Clifford postselected counts

Frozen distillation and MSC-d5 comparisons, measured October 13–14, 2026; report published October 15.

The two original application circuits are distillation (magic-state distillation) and MSC-d5 injection/cultivation (distance 5, noise parameter p = 10-3). Each call attempts 1, 64 or 1,024 shots. Acceptance requires every raw detector to be zero; logical errors use the XOR of raw observable 0, without reference normalization. These are postselected-counts results, not full-record throughput or a comparison with Stim.

Every cell below shows Strict / Fused rstim speedup: peer warm latency / rstim warm latency. Values above 1 favor rstim; values below 1 favor the peer. Strict uses the default arithmetic policy; Fused is an explicit alternative. Clifft's default and active-width-scheduled paths and SymFT's compiled CPU path were tuned separately, then frozen before evaluation.

Independent fixed-policy repeat: paired geometric-mean speedup, Strict / Fused
Original circuitAttempted shots per callvs Clifft defaultvs Clifft scheduledvs SymFT compiled CPU
Distillation11.82× / 1.83×1.73× / 1.74×1.13× / 1.14×
Distillation641.02× / 1.03×0.86× / 0.87×0.39× / 0.39×
Distillation1,0240.70× / 0.68×0.60× / 0.58×0.33× / 0.32×
MSC-d511.18× / 1.16×1.10× / 1.08×3.97× / 3.91×
MSC-d5640.65× / 0.66×0.58× / 0.59×0.34× / 0.34×
MSC-d51,0240.63× / 0.61×0.59× / 0.57×0.32× / 0.31×

These are point estimates from 18 new process rounds, with seven warm observations of at least 50 ms per process. Each process contributes its median elapsed time per call; geometric means use matched round ratios. The repeat reuses all 18 peer tuning selections from the initial run without retuning. Compilation, preparation and first calls are separate. The linked CSV retains all 36 comparisons and their intervals; near-parity point estimates alone do not establish a win.

Outcome: one-shot point estimates favor rstim, while 64/1,024-shot counts remain slower than compiled SymFT. At 1,024 shots, rstim latency is approximately 2.99–3.18 times SymFT latency. Neither of the two measured optimization candidates established broad or 1,024-shot gains. The transition-memo candidate was correctness-reviewed but has no performance result.

Versions, host and test limits

All results are historical and revision-bound, not measurements of current master or today's peers. The recorded revisions below remain unchanged by the repository's subsequent history rewrite.

  • rstim: 9852a733afbde09bcfd668f0ddbc4675bbdaa753 (rewritten history: 5c8c7880a4e7fa1d6f11db0b76ede5e78a70f2c0).
  • SymFT compiled CPU: 3f718e9e0c58b277a8fb506b4170863db5c3dbe6.
  • Clifft, both paths: 847757e2bc8c4f7439b9e92011550fd61719eb85. Later Clifft runtime batching changes at 1dc3551dad02f3b098d041d5bdf8067531eaa588 are not measured here.

Host: OMEN Windows/Ubuntu WSL2; pinned CPU0; FP64; CPU execution without GPU; six threading environment variables set to one. The initial run retained 666 tuning, 30 functional and 648 evaluation workers; the independent repeat retained 648 evaluation workers in 18 new rounds. Initial and repeat results remain separate.

The bootstrap intervals are approximate; calibrated family-wise 95% coverage is not established. All failures and outliers remain retained. These two circuits do not cover the full workload suite, larger circuits or Tsim, and establish neither universal SOTA nor a memory advantage.

The pinned report preserves all 96 contrasts across four analyses, paired round ratios, 32 native counter populations and 96 CPU windows. It is a compact summary archive: full raw timing observations, command streams, binaries and correctness vectors remain in the local retained archive. The public report alone cannot replay the raw runs.

Detection and DEM sampling

Detection is measured as elapsed time; DEM sampling is measured as throughput. Compare implementations within each workload and metric.

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.