Detecting vs Correcting
Error correction and error detection are often used interchangeably in conversation, but they represent genuinely different capabilities with different resource requirements. Telling them apart is essential before studying codes of any complexity.
Two distinct goals
A quantum error-correcting code does two things: it senses that an error has occurred (detection) and then it reverses that error (correction). Detection alone is cheaper — a code can signal "something went wrong here" without having enough information to undo the damage.
More precisely:
- Error detection: after measuring the syndrome, the decoder knows whether an error occurred. If it did, the logical state is discarded (or a new round is started), but nothing is claimed about the value of the corrupted data.
- Error correction: from the syndrome alone, the decoder identifies which error occurred and applies a recovery operation to restore the logical state, without ever learning the encoded data.
The same syndrome circuit can serve both purposes — the difference is in what the decoder does with the outcome.
Code distance ties the two together
Every stabilizer code has a distance , the minimum weight of any undetectable error (i.e., the smallest number of single-qubit errors that map one codeword to another without triggering any syndrome flag).
A distance- code can:
The asymmetry arises because correction requires the decoder to assign every detected syndrome to a unique error — and that assignment breaks down as soon as two distinct errors produce the same syndrome. Detection is more forgiving: it only needs to distinguish "inside the codespace" from "outside."
A concrete comparison: distance-3 vs distance-5
Consider two codes protecting one logical qubit against bit-flip errors only.
| Code | Physical qubits | Distance | Detects | Corrects | |------|----------------|----------|---------|---------| | Three-qubit repetition | 3 | 3 | 2 errors | 1 error | | Five-qubit repetition | 5 | 5 | 4 errors | 2 errors |
The five-qubit code uses two more physical qubits per logical qubit to buy a factor-of-two improvement in both thresholds. This trade-off — more redundancy for stronger guarantees — is the central design tension of quantum error correction.
When detection is enough
Detection without correction is useful in several practical settings:
- Post-selection: if the syndrome flags an error, discard that run entirely. For low error rates this wastes few shots and keeps the surviving data clean. Many near-term quantum experiments use this strategy.
- Heralded errors: some hardware (e.g., ion traps with fluorescence detection) can announce that a qubit was lost or depolarised, converting a random error into a known erasure. An erasure is easier to correct than an unknown Pauli, so heralded detection enables correction with a smaller code.
- Threshold arguments: fault-tolerant thresholds for concatenated codes often assume that errors detected below the threshold are either corrected locally or removed by post-selection before being passed up the concatenation hierarchy.
What syndrome measurement actually gives you
Recall that a syndrome measurement projects the physical state onto an eigenspace of each stabiliser generator without disturbing the encoded logical information. The syndrome bits form a syndrome vector for an code (encoding logical qubits into physical qubits).
- If : no detectable error has occurred (the state is in the codespace). This is not the same as saying no error occurred — a weight- undetectable error would also give .
- If : an error has been detected. The decoder maps to its best guess for the error operator, then applies the corresponding recovery.
For a distance-3 code, each single-qubit error pattern produces a unique non-zero syndrome, so the mapping from syndrome to recovery is unambiguous — correction works. For a distance-2 code, only detection is guaranteed: the syndromes can tell you that something went wrong, but not uniquely which qubit was affected.
The code: a detection-only example
The smallest quantum code that detects any single-qubit error but cannot correct it is the code, encoding 2 logical qubits into 4 physical qubits with distance 2. Its stabilisers are and . Any single-qubit Pauli anticommutes with at least one stabiliser, so a single error is always detected. However, two-qubit errors can map one codeword to another, so correction is impossible with this code alone.
The code is widely used in near-term experiments precisely because it catches single errors cheaply — it is a minimal "smoke alarm" for the logical subspace, even though it cannot put out the fire.
Summary
| Property | Detection | Correction | |----------|-----------|-----------| | What it requires | | | | What it delivers | Flags an error | Reverses the error | | Typical response | Discard the shot | Apply recovery gate | | Minimum overhead | Cheaper (smaller ) | More physical qubits |
Every quantum error-correcting code is also a quantum error-detecting code, but not vice versa. When you see a code described by its distance, the two formulas above immediately tell you both what it can detect and what it can correct.
Sign in on the full site to ask questions and join the discussion.