Bit-flip repetition code Created 2026-09-28 Updated 2026-10-14
The -qubit bit-flip repetition code stores one logical qubit in and . Its stabilizer generators are for , and its logical operators are and . Interchanging the Pauli X gate and Pauli Z gate gives the phase-flip repetition code. For odd , majority-vote decoding of a repetition code corrects up to physical Pauli X gate errors, assuming ideal operations and a noise family containing only these bit flips.
For , prepare two quantum ancillas in and apply controlled-NOT gates from the input qubit to each of them. By linearity, encoding sendsThis does not produce , which would contain cross terms. For example, encoding produces , whereas three independent copies would have eight equal computational basis amplitudes. The encoding creates quantum entanglement when both coefficients are nonzero and respects the no-cloning theorem.
The three-qubit bit-flip syndrome table corrects the family and its entire linear span, as specified by the Knill--Laflamme condition. It cannot correct arbitrary errors on one physical qubit: the phase flipcommutes with both checks and acts as logical . In particular, it takes the encoded to the orthogonal encoded with error syndrome . Thus its full quantum code distance is one, despite correcting one error of the restricted Pauli X gate type. The Shor code, Steane code and five-qubit error correcting code provide protection against arbitrary one-qubit errors.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 342 2 b Solution 2026-09-28
A syndrome determines a phase-error set only up to multiplication by : an error of weight and its complement of weight have the same error syndrome. Their probability ratio isFor , maximum likelihood therefore chooses the representative of smaller weight. This is exactly majority-vote decoding of a repetition code: correction succeeds when fewer than half the qubits are flipped, with a random tie-break at when is even.
If , then and . For every fixed , the distance from the mean to the decision boundary in standard deviations isThus the logical failure probability tends to zero, in fact exponentially by a Chernoff bound. At the two representatives are equiprobable and decoding cannot improve with . Hence