Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2007/iii/paper-58/3/a/solution

The first two CNOT gates encode as
the 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 syndrome
Adding to a computational string leaves both parities unchanged, so the ancillas acquire no information about or . The joint state after extraction is
The syndrome measurement therefore preserves the unknown logical amplitudes. For zero or one bit flip the corrections are
Each 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.

New to topics? Read the docs here!