Error Correction Simulation
An error-correction simulation estimates a logical failure probability under a specified fault model and decoder. A syndrome is an input to that decoder, not a declaration that correction succeeded. The decisive test is whether the residual operation changes the encoded information.
Helpful background. Stabilizer simulation provides efficient Clifford propagation; noise models specifies faults.
Errors, syndromes, and residual logical operators
Section titled “Errors, syndromes, and residual logical operators”For stabilizer generators , a Pauli error gives syndrome bits through
A decoder chooses a recovery . With an error-free syndrome measurement, the residual has trivial syndrome when recovery has the same syndrome as . It may still be a nontrivial logical operator. Stabilizers act trivially on code states; a nontrivial logical Pauli commutes with all stabilizers but can change encoded information. Global phases do not count as logical errors. If the syndrome measurement itself is faulty, matching the reported syndrome need not remove the actual one.
Therefore count failures using the residual logical action, or by comparing decoded logical observables, rather than merely checking that the final syndrome vanishes. Include the intended final measurement basis in the experiment definition.
Three-qubit repetition benchmark
Section titled “Three-qubit repetition benchmark”Encode as and use stabilizers and . Under independent bit flips of probability , majority recovery corrects zero or one flip. Two or three flips cause a logical , so
Enumerate all eight error patterns with their exact probabilities and compare to Monte Carlo. This tests syndrome ordering, recovery lookup, and failure classification independently of a large simulator.
The code does not protect arbitrary qubit noise: a single error is a logical phase error on the encoded subspace. Calling the example a general quantum memory would misstate its scope.
Noise levels and measurement rounds
Section titled “Noise levels and measurement rounds”A code-capacity model has perfect syndrome extraction and faults on data. A phenomenological model also flips syndrome outcomes. A circuit-level model inserts faults in preparation, gates, idles, and measurement. Their logical failure rates and apparent thresholds are different quantities.
With noisy repeated measurements, detection events are often changes between consecutive syndromes. Boundary rounds require a specified initialization and final measurement rule. Omitting the last boundary can make a decoder appear better by discarding late faults.
Fault propagation through extraction circuits matters: a single ancilla fault can produce correlated data errors. A phenomenological independent-syndrome model cannot certify a circuit’s fault tolerance.
Statistical error and comparison
Section titled “Statistical error and comparison”For independent, identically distributed trials and failures, estimate and report a binomial interval. Zero failures gives an upper bound, not zero logical error. Since , the exact one-sided upper confidence limit at confidence is
At 95% confidence, failure-free trials give the one-sided upper bound ; they do not establish . Compute the expression as -expm1(log(alpha)/N) when cancellation matters. This fixed-sample interval does not automatically cover an adaptively stopped simulation.
Decoder comparisons can be more precise when the same fault samples are decoded by both methods, particularly when their failures are positively correlated. Let indicate their failures and . Report with standard error , where is the sample variance of these paired differences. Since
treating the two estimates as independent discards the pairing. If two decoders agree on every sampled fault, their paired differences are zero; that finite sample does not establish equality of their rare-event behavior outside the sample. Use adequate failure and disagreement counts or an appropriate discrete interval near this boundary.
Report the number of rounds and whether failure is per experiment, per round, or per unit time. The conversion assumes rare approximately independent failures and is not exact for arbitrary memory dynamics.
A crossing of finite-size curves can suggest a threshold, but its position may drift with size. Test multiple sizes, enough failures near the crossing, fixed noise definitions, and stability against finite-size corrections.
Exercise
Section titled “Exercise”Find where the repetition benchmark improves the bit-flip error probability: .
Solution
, which is negative for . At the output is random and no improvement occurs. This is a property of the three-bit example under independent flips, not a threshold claim for a fault-tolerant quantum architecture.
References
Section titled “References”- Dennis, E., Kitaev, A., Landahl, A., and Preskill, J., “Topological quantum memory,” Journal of Mathematical Physics 43, 4452–4505 (2002), arXiv:quant-ph/0110143 — repeated syndrome data and logical failure.
- Gidney, C., “Stim: a fast stabilizer circuit simulator,” Quantum 5, 497 (2021), doi:10.22331/q-2021-07-06-497 — circuit-level stabilizer sampling.
- National Institute of Standards and Technology, “Exact Binomial Confidence Limits”, Dataplot Reference Manual, accessed 12 October 2026 — binomial confidence procedures and boundary cases.