quantum calculators

Quantum Error Correction Threshold Calculator

Estimate the logical error rate of surface, Steane, or generic quantum error-correcting codes given physical error rate, code distance, and decoder choice. Use this when evaluating whether a quantum device is below the fault-tolerance threshold.

About this calculator

Quantum error correction (QEC) encodes a single logical qubit into many physical qubits so that errors can be detected and corrected without measuring the logical state. The key figure of merit is the logical error rate p_L, which should fall exponentially with code distance d when the physical error rate p is below the code's threshold. For the surface code with minimum-weight perfect matching (MWPM) decoding, the logical error rate scales as p_L ≈ 0.5 · (p/0.01)^((d+1)/2) · √rounds, reflecting the polynomial suppression of errors with distance. The Steane [[7,1,3]] code gives p_L ≈ p² · (7/d), reflecting its lower threshold and concatenation structure. The threshold for the surface code with MWPM is approximately 1% physical error rate, meaning devices below this level can achieve arbitrarily low logical error rates by increasing d.

How to use

Consider a surface code with physical error rate p = 0.005 (0.5%), code distance d = 5, MWPM decoding, and 10 error-correction rounds. First compute (p/0.01)^((5+1)/2) = (0.5)^3 = 0.125. Apply the decoder factor of 0.5: 0.5 · 0.125 = 0.0625. Multiply by √rounds = √10 ≈ 3.162: p_L ≈ 0.0625 · 3.162 ≈ 0.198. This logical error rate of ~20% over 10 rounds suggests the code distance should be increased or the physical error rate reduced further to achieve reliable logical qubit operation.

Frequently asked questions

What is the fault-tolerance threshold for quantum error correction codes?

The fault-tolerance threshold is the maximum physical error rate below which increasing code distance monotonically reduces the logical error rate. Above the threshold, adding more qubits makes things worse because error correction introduces more errors than it removes. The surface code has one of the highest known thresholds at approximately 1% per gate with MWPM decoding, making it the leading candidate for near-term fault-tolerant quantum computing. Other codes such as the Steane code have lower thresholds (~10⁻⁴) but require fewer physical qubits per logical qubit.

How does code distance affect the logical error rate in surface codes?

Code distance d determines how many simultaneous physical errors are needed to cause an undetectable logical error; the surface code can correct up to ⌊(d−1)/2⌋ errors. The logical error rate suppresses as p_L ∝ p^((d+1)/2), so each step up in distance (e.g., d = 3 → 5 → 7) dramatically reduces logical errors when p < p_threshold. A distance-3 surface code requires 9 data qubits plus ancillas, while a distance-7 code requires 49, illustrating the steep qubit overhead of fault tolerance. Current hardware experiments have demonstrated distance-3 and distance-5 surface codes with logical error rates below the physical error rate.

Why does the choice of decoder matter for quantum error correction performance?

The decoder processes the error syndrome — the pattern of stabiliser measurement outcomes — to identify and correct the most likely error. A perfect decoder represents an ideal minimum-distance decoder and achieves the best possible logical error rate for a given code distance, but is computationally intractable at scale. MWPM (minimum-weight perfect matching) is a near-optimal polynomial-time algorithm widely used for surface codes, achieving roughly half the logical error rate of a naive decoder. Union-Find and neural-network decoders offer faster runtime or better performance in specific noise models, and the choice affects both the effective threshold and the real-time classical processing requirements for a quantum processor.