Interactive · Four real decoders · Runs in your browser
Watch four decoders race to fix it
Inject an error, then hit Run race. The same syndrome goes to four different decoding algorithms (a lookup table, minimum-weight matching, belief propagation, and research-grade BP-OSD), and each guesses a correction on its own. See where they agree, where they diverge, and which ones actually return the code to safety.
Same error, same syndrome, four guesses. Click qubits on any panel below to paint the error; all four panels share the identical injected error and resulting syndrome. The colored dashed rings each decoder adds are its proposed correction.
X error
Z error
Y error
Lit syndrome
Proposed correction (dashed ring)
Lookup
Exhaustive syndrome table
Idle
Press “Run race”.
MWPM
Min-weight perfect matching
Idle
Press “Run race”.
Belief propagation
Iterative message passing
Idle
Press “Run race”.
BP + OSDresearch-grade
Belief propagation, then ordered-statistics cleanup
Idle
Press “Run race”.
Agreement
Run the race to compare the three corrections.
The point worth understanding
A decoder can never be sure it's right
Every decoder sees only the syndrome, never the actual error. But many different errors produce the same syndrome. A decoder picks the most likely explanation (usually the lowest-weight one), and most of the time that's correct. But when the real error is large, for instance a chain spanning the whole code, its syndrome can look identical to "nothing happened," and no decoder can tell the difference using syndrome information alone. That irreducible ambiguity is exactly why a code has a finite threshold: push the error rate too high and even a perfect decoder starts guessing wrong. Try a full-column X error below and watch all three "succeed" on the syndrome while a logical error silently slips through.
Paste into QuantumCircuit.from_qasm3_str(...) and run locally with Qiskit. The string below contains your injected errors plus the corrections proposed by Lookup, MWPM, BP, and BP-OSD, separated by headers. Qubit indices follow data[r·D + c].
Import a Pauli string
Paste a Pauli error for a d=3 code (9 data qubits, index r·D + c).
Two formats work:
Dense (like a Qiskit Pauli label): a string of I X Y Z of length 9, e.g. IXIIZIIIY.
Sparse: tokens like X0 Z4 Y8 (also accepts X_0, commas, or spaces).