Syndrome explorer
A stabilizer code never looks at the state it protects — measuring it would destroy the superposition. It measures only whether each of its generators was disturbed. Apply an error below and follow what happens: which generators fire, what the decoder concludes from that alone, and whether the correction restored the logical state or silently changed it.
Code
Five-qubit perfect code, error XXIII
Miscorrected — logical error introduced
The syndrome is consistent with the lower-weight error IIIZI, so that is what the decoder applied. The residual is a logical operator, so the correction did not merely fail -- it introduced the logical error the code exists to prevent.
What each generator measured
Each row is a stabilizer generator, each column a qubit. A cell is marked when the error and the generator disagree on that qubit in a way that costs a sign. The syndrome bit is the parity of the marked cells in that row — so two marks cancel and read 0.
| Generator | q0 | q1 | q2 | q3 | q4 | Marks | Bit |
|---|---|---|---|---|---|---|---|
| Error | X | X | · | · | · | weight 2 | — |
| XZZXI | X | [Z] | Z | X | · | 1 | 1 |
| IXZZX | · | X | Z | Z | X | 0 | 0 |
| XIXZZ | X | · | X | Z | Z | 0 | 0 |
| ZXIXZ | [Z] | X | · | X | Z | 1 | 1 |
Syndrome 1001 — 2 of 4 generators were disturbed.
Decode and correct
| Error applied | XXIII | weight 2; never observed by the decoder |
|---|---|---|
| Syndrome measured | 1001 | the only thing the decoder sees |
| Correction inferred | IIIZI | a different operator with the same syndrome |
| Residual | XXIZI | a logical operator, so the encoded state has changed |
Success is the residual being a stabilizer, not the decoder naming the error. Those differ: on a degenerate code the decoder routinely names a different operator and restores the state perfectly, and scoring by equality would count that as a failure.
Every error of weight 1 and 2
| Weight | Errors | Corrected | Miscorrected | Undetected | Trivial |
|---|---|---|---|---|---|
| 1 | 15 | 15 | 0 | 0 | 0 |
| 2 | 90 | 0 | 90 | 0 | 0 |
“Trivial” counts operators that are themselves stabilizers — they act as the identity, so there is nothing to detect. Every weight-1 error here has its own syndrome, so the decoder can always name the operator that occurred.
The decoder’s lookup table
| Syndrome | Correction applied | Weight |
|---|---|---|
| 0000 | IIIII | 0 |
| 0001 | XIIII | 1 |
| 0010 | IIZII | 1 |
| 0011 | IIIIX | 1 |
| 0100 | IIIIZ | 1 |
| 0101 | IZIII | 1 |
| 0110 | IIIXI | 1 |
| 0111 | IIIIY | 1 |
| 1000 | IXIII | 1 |
| 1001← measured | IIIZI | 1 |
| 1010 | ZIIII | 1 |
| 1011 | YIIII | 1 |
| 1100 | IIXII | 1 |
| 1101 | IYIII | 1 |
| 1110 | IIYII | 1 |
| 1111 | IIIYI | 1 |
Decoder benchmarks measured under identical conditions live in the QEC Lab. This page computes exactly and exhaustively on codes small enough for that to be honest; it is a way to see what a syndrome is, not a decoder benchmark.