Bit-Flip Errors
A bit-flip error applies the Pauli X operator, swapping |0> and |1> while preserving the relative phase of a superposition.
The X error
The bit-flip is the Pauli X operator, the quantum analog of a classical bit flip. Acting on the computational basis it sends X|0> = |1> and X|1> = |0>. On a superposition it gives X(a|0> + b|1>) = a|1> + b|0>, swapping the two amplitudes.
X is Hermitian and unitary, with X^2 = I, eigenvalues +1 and -1, and eigenvectors |+> = (|0>+|1>)/sqrt(2) and |-> = (|0>-|1>)/sqrt(2). Note the important fact that X leaves |+> unchanged and only flips the sign of |->. So an X error is invisible in the Hadamard (X) basis but maximally visible in the computational (Z) basis.
Detecting a bit flip
Because measuring the qubit directly would collapse a superposition, a code detects bit flips by measuring the parity of pairs of qubits. The operator Z_1 Z_2 has eigenvalue +1 when two qubits agree (00 or 11) and -1 when they disagree (01 or 10), without revealing which basis state they are in. This is the core idea of the three-qubit bit-flip code.
- X|0> = |1>, X|1> = |0>: swaps basis states.
- X|+> = |+>, X|-> = -|->: acts as a phase in the Hadamard basis.
- X = H Z H: a bit flip is a phase flip conjugated by Hadamard.
- Parity operators Z Z detect disagreement without measuring individual values.
The identity X = H Z H is why a code that corrects phase flips can be turned into one that corrects bit flips by surrounding it with Hadamard gates. This duality underlies the construction of the Shor code and the CSS family.
In a general noise model, both X and Z errors occur; a full code must handle both plus their product Y = iXZ.