Past exam of the mathematics course of the University of Cambridge 2007 iii Paper 58 3 a Solution Created 2026-10-03 Updated 2026-10-14
The first two CNOT gates encode asthe three-qubit bit-flip repetition code. In the printed detection circuit the first quantum ancilla records and the second records . Both start in . For an incoming bit-error pattern , the two logical basis branches give the same error syndromeAdding to a computational string leaves both parities unchanged, so the ancillas acquire no information about or . The joint state after extraction isThe syndrome measurement therefore preserves the unknown logical amplitudes. For zero or one bit flip the corrections areEach indicated correction squares to the identity and restores the encoded state. The order of the two ancilla labels matters: the printed first ancilla is the parity, not the parity. This is coherent syndrome extraction for the three-qubit repetition code with the circuit's specific parity choices.
For later use, an error pattern and its complement have the same syndrome. Minimum-weight recovery corrects patterns of weight zero or one. Patterns of weight two or three instead leave , the logical bit flip that exchanges the two codewords. The code protects against the stated bit-flip channel, not arbitrary single-qubit phase errors.
Past exam of the mathematics course of the University of Cambridge 2010 iii Paper 49 3 a Solution Created 2026-10-03 Updated 2026-10-14
Number the wires from top to bottom as . The first two controlled-NOT gates encode into the bit-flip repetition codeon data wires . The lower two zero ancillas store an error syndrome. Reading the PDF's four detection CNOTs givesThe syndrome and the data qubit to be flipped are thereforeThis is coherent syndrome extraction for the three-qubit repetition code. The recovery Toffoli gates implement these conditions; the intervening Pauli X gates temporarily turn zero-valued controls into one-valued controls and then restore the syndrome wires. Finally, inverse encoding returns the logical state to the top wire and resets data wires 2 and 3 to zero.
For the specified error , the encoded data becomes . Both terms have syndrome , so detection factors out without revealing the logical amplitudes. Recovery flips data wire 1, restoring , and decoding yieldsThe lower four wires need not all return to zero: their syndrome record is independent of the logical state, which is what the correction requirement needs.
Three-qubit bit-flip syndrome table 2026-10-14
Measure the commuting stabilizer generators and in that order. Use error syndrome bit for eigenvalue and bit for eigenvalue . For the Pauli X gate on physical qubit , every row holds for arbitrary normalized . This ordered parity-check convention follows [ref]
https://www.preskill.caltech.edu/ph229/notes/chap7.pdf. Preskill, §7.1
:| Error | State before recovery | eigenvalues | Error syndrome | Recovery |
|---|---|---|---|---|
Each pair of computational basis words within a row has the same two parities. Consequently the projective measurement reveals the row without distinguishing its two amplitudes. For example, becomes under . Both checks give with probability one, and applying restores both coefficients exactly, including the relative phase .
One implementation uses two quantum ancillas initialized to . Two controlled-NOT gates from data qubits 1 and 2 to the first quantum ancilla write their parity; two more from data qubits 2 and 3 to the second quantum ancilla write the other parity. Measuring only the quantum ancillas in the computational basis gives . Measuring the individual data qubits instead would reveal the encoded computational basis value and destroy the unknown quantum superposition. The existing coherent syndrome extraction for the three-qubit repetition code uses the alternative ordered checks , so its bit labels differ from this table.
The recovery also handles coherent errors. Put . Their images of the code are mutually orthogonal, giving , the Knill--Laflamme condition for this family. For any linear combination , its component in sector is . Measuring that error syndrome has probability on the normalized erroneous state, and recovery returns . More generally one recovery quantum channel corrects every noise quantum channel whose Kraus operators belong to this span. The assumption concerns the whole jointly correctable family; it does not extend to the span of arbitrary single-site Pauli errors. [ref]
https://www.preskill.caltech.edu/ph229/notes/chap7.pdf. Preskill, §7.2: correction of an error span
.A fully computed coherent example is the unitary operator . At it givesThe error syndromes and occur with probabilities and , independently of . Doing nothing for and applying for restores the same logical qubit in both branches; the scalar in the second branch is an irrelevant global phase. This is an example of linearity of coherent quantum error correction, rather than an assumption that the original error was a classical random bit flip.
