Checkpoint: One Surface-Code Round
This checkpoint ties the module together: you will run one round of stabilizer measurements on a small chain, inject a single error, and read off a syndrome that pinpoints it — exactly the input a matching decoder consumes.
The setup
Take a one-dimensional chain of three data qubits, — the bit-flip "spine" of a small surface-code patch. Two neighbouring -type checks watch it:
The middle data qubit is shared by both checks. This is the key structural feature of the surface code: an error on a shared qubit lights up both adjacent checks, which is how the decoder localises it.
What a middle error does
Suppose a bit-flip strikes the middle data qubit, leaving the data in . Then
Both checks fire — syndrome . Compare with an error on an end qubit, say , which would give syndrome since only touches qubit . The pattern of which checks fire is therefore a fingerprint of where the error is:
| Error | | | |--------|-------|-------| | none | 0 | 0 | | | 1 | 0 | | | 1 | 1 | | | 0 | 1 |
A decoder reads the syndrome column and infers the most likely error. Here unambiguously points at the middle qubit.
Try it
Build the full round in one circuit on five qubits: data , ancilla for ,
ancilla for . Inject the error with c.x(1), extract each check with a pair of
CNOTs into its ancilla, then measure both ancillas. The grader checks that the only outcome with
non-zero probability is — data , syndrome .
After running, the Probabilities tab should show a single bar at : the middle qubit is flipped and both syndrome bits read , exactly localising the error.
Sign in on the full site to ask questions and join the discussion.