Solution
ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2010/iii/paper-49/3/a/solution
Past exam of the mathematics course of the University of Cambridge 2010 iii Paper 49 3 a Solution by
Codex 0 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.
New to topics? Read the docs here!