Syndrome Extraction Circuits
Syndrome extraction is the heart of the QEC cycle. It answers the question "did an error occur, and where?" without revealing the encoded data — no individual data qubit is ever measured. The tool is the stabilizer: a multi-qubit Pauli operator whose eigenvalue we read out through an ancilla.
Stabilizers of the bit-flip code
The codewords and are both eigenstates of the two operators
These are the stabilizer generators. Any superposition of the codewords is also stabilized: . A operator measures the parity of qubits and — it returns when they agree and when they differ — while saying nothing about whether they are both or both . That is exactly the data-blind information we need.
What an error does to the syndrome
An error on a single data qubit flips that qubit, changing one or two parities:
| Error | | | Syndrome | |-------|----------|----------|----------------------| | none | | | | | | | | | | | | | | | | | | |
Here we write a eigenvalue as the bit . Each single-qubit error has its own unique two-bit syndrome — the property that makes the code correctable.
Measuring a parity with an ancilla
We cannot apply and "look at" its eigenvalue directly. Instead we copy the parity onto a fresh ancilla. Starting the ancilla in , two CNOTs do the job:
The first writes qubit 0 into the ancilla; the second XORs qubit 1 on top. The ancilla ends in — precisely the parity bit. A second ancilla collects the same way.
Try it
A bit-flip error has been injected on data qubit 0. Wire up the two parity measurements onto the ancillas and measure the register. The grader checks the measurement distribution: the syndrome must come out as with certainty.
Open the Probabilities tab after running: a single outcome should carry all the weight — the
bitstring 10010, whose last two bits 10 are the syndrome pointing at qubit 0.
Sign in on the full site to ask questions and join the discussion.