A single qubit forgets its state in microseconds; a useful computation needs it to survive far longer. Error correction buys that survival by spreading one logical qubit across many noisy physical ones, measuring the disagreement between them — the syndrome — without ever reading the data itself, and correcting. It works only below a threshold: cleaner than that, every layer of redundancy suppresses the error further; dirtier, and redundancy only adds more to go wrong. Find the threshold below.
The simplest code stores one bit in $d$ copies and takes a majority vote; it fails only if more than half the copies flip. With independent physical error $p$ per copy, the logical error is a tail of the binomial — and its behaviour flips sign at $p=\tfrac12$. Below that, more copies drive the logical error down exponentially in the code distance $d$; above it, more copies drive it up. That sign change is the threshold theorem in miniature.
The left plot is the logical error against the physical error, one curve per distance, with the unencoded diagonal $p_L=p$ for reference. Where a coded curve dips below the diagonal, the code is helping; the curves all cross the diagonal at $p=\tfrac12$, the threshold. The right plot fixes the physical error and sweeps the distance: below threshold it falls away exponentially, above threshold it climbs — adding qubits to a too-noisy device makes it worse, not better.
qec package builds — protect against both by measuring two families of stabiliser syndromes, and their threshold is a device property near a percent rather than the repetition code's clean $\tfrac12$. What the repetition code shows exactly is the shape every code shares: a threshold below which distance is your friend. This portal has a second angle on it — the parity sectors of the XY Hamiltonian are a naturally protected subspace, and the library studies encoding logical information there, where the dynamics themselves conserve the code. The curves here are exact binomial tails, checked against a reference to machine precision.Error correction is the layer that turns the mitigation of a single noisy run into the durability of a long computation. Mitigation cleans up an answer after the fact; correction keeps the state alive as it goes. The platform's interest is specific: the same parity symmetry that splits the XY dynamical Lie algebra also defines a subspace the noise struggles to leave, which is a route to protection that comes from the physics rather than bolted on top.
| Approach | What it does | Cost |
|---|---|---|
| Error mitigation | extrapolate noise away after the run | more shots, some bias |
| Repetition code | majority vote over copies (bit-flip only) | $d$ physical per logical |
| Surface code | 2-D stabilisers, both error types | $\sim d^2$ physical per logical |
| Parity-protected subspace | encode where the dynamics conserve the code | structural, XY-specific |
Evidence boundary: the panel computes the exact repetition-code logical error — a binomial tail — live in your browser, checked against a reference to machine precision. It is the threshold idea in its cleanest form, not a simulation of a specific code on specific hardware; real codes and their measured thresholds live in the library's qec package and the results pages.