= Bit-flip repetition code
{title2=$|0_L\rangle=|0\rangle^{\otimes m},\quad |1_L\rangle=|1\rangle^{\otimes m}$}
The $m$-<qubit> <bit-flip repetition code> stores one <logical qubit> in $|0_L\rangle=|0\rangle^{\otimes m}$ and $|1_L\rangle=|1\rangle^{\otimes m}$. Its <stabilizer generators> are $Z_jZ_{j+1}$ for $j=1,\ldots,m-1$, and its logical operators are $\overline X=X_1\cdots X_m$ and $\overline Z=Z_1$. Interchanging the <Pauli X gate> and <Pauli Z gate> gives the <phase-flip repetition code>. For odd $m$, <majority-vote decoding of a repetition code> corrects up to $(m-1)/2$ physical <Pauli X gate> errors, assuming ideal operations and a noise family containing only these bit flips.
For $m=3$, prepare two <quantum ancillas> in $|00\rangle$ and apply <controlled-NOT gates> from the input <qubit> to each of them. By <linearity>, encoding sends
$$
(\alpha|0\rangle+\beta|1\rangle)|00\rangle\longmapsto
|\psi_L\rangle=\alpha|000\rangle+\beta|111\rangle,\qquad |\alpha|^2+|\beta|^2=1.
$$
This does not produce $(\alpha|0\rangle+\beta|1\rangle)^{\otimes3}$, which would contain cross terms. For example, encoding $|+\rangle=(|0\rangle+|1\rangle)/\sqrt2$ produces $(|000\rangle+|111\rangle)/\sqrt2$, 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 $\{I,X_1,X_2,X_3\}$ and its entire <linear span>, as specified by the <Knill--Laflamme condition>. It cannot correct arbitrary errors on one physical <qubit>: the <phase flip>
$$
Z_1|\psi_L\rangle=\alpha|000\rangle-\beta|111\rangle
$$
commutes with both checks and acts as logical $\overline Z$. In particular, it takes the encoded $|+\rangle$ to the <orthogonal> encoded $|-\rangle$ with <error syndrome> $00$. 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.
Back to article page