Logical failure of the three-qubit phase-flip repetition code (source code)

= Logical failure of the three-qubit phase-flip repetition code
{title2=$p_L=3\epsilon^2-2\epsilon^3$}

The <phase-flip repetition code> with codewords $|+++\rangle,|---\rangle$ corrects any one physical <Pauli Z gate> error. Its two adjacent-pair <error syndromes> cannot distinguish an error pattern from its three-bit complement. Minimum-weight recovery therefore leaves no residual error at weight zero or one, and leaves $Z_1Z_2Z_3$ at weight two or three. This residual operator exchanges the codewords, so inverse encoding gives a logical <Pauli X gate>. For independent physical phase errors of probability $\epsilon$, the decoded <quantum channel> is $(1-p_L)\rho+p_LX\rho X$, where $p_L=3\epsilon^2(1-\epsilon)+\epsilon^3$. For $0<\epsilon<1/2$, $\epsilon-p_L=\epsilon(1-\epsilon)(1-2\epsilon)>0$.