Solution
ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2005/iii/paper-58/3/i/solution
Past exam of the mathematics course of the University of Cambridge 2005 iii Paper 58 3 i Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-14
Number the physical wires from top to bottom and write a computational basis ket in that order. The first four are ancilla qubits and the fifth carries the input. It is enough to follow the basis input , , because the encoding quantum circuit acts linearly.
The first fan-out consists of four controlled-NOT gates from wire 5 to wires 1–4. It sends to . The three Hadamard gates then giveThe two Pauli X gates on wires 2 and 3, followed by a Controlled-Z gate and the same two X gates, restore the bits but contribute : the sign is negative exactly when the original bits on both wires were zero. Finally, the right-hand controlled-NOT gates are , , and . They leave the first three bits unchanged and turn the last two into and . ThusExplicitly, the logical basis quantum states produced by the printed gates areEach has eight orthogonal terms of equal magnitude, and their supports are disjoint, so they are normalized and mutually orthogonal. The arbitrary input is therefore encoded asThis is a realization of the five-qubit error correcting code. The input amplitudes and their relative quantum phase are preserved in the logical subspace; the encoding is an entangled-state linear isometry, not five independent copies of the unknown input. The explicit signs and bit ordering above are fixed by this circuit, rather than by a convention for a different encoder.
New to topics? Read the docs here!