Assume the three physical phase-flip channels act independently, with the same probability on each qubit, and encoding, recovery and decoding are ideal. Zero or one physical error is corrected. Hence
The probability of an uncorrectable two- or three-site error is .
One must also choose the logical convention consistently with the output phase error specified here. The usual phase-flip repetition code with codewords and has residual operator after two or three physical errors: their error syndrome equals that of the complementary zero- or one-error pattern. This operator exchanges those codewords, so plain inverse encoding would give logical , not .
To obtain the stated logical phase-flip convention, use the logical Hadamard convention for a phase-flip repetition code. Put a logical Hadamard gate before that encoding and after its decoding. The encoded state is
where the plus and minus states in these codewords are the real Hadamard basis states. The uncorrectable exchange is now conjugated to . With that convention the decoded density operator and its trace distance are exactly
For , , so coding reduces the trace distance. The displayed recovery probability means success of correction as a quantum operation on an arbitrary unknown input. If the particular input is a eigenstate, even the logical phase-error branch represents the same physical state, and the probability of recovering that particular state is one.
Independence is an extra noise assumption needed for the numerical probability. If all three physical qubits flip together with probability , each marginal still has the given phase-flip channel, but the logical failure probability is , not . More generally, for a classical joint phase-error distribution with a random number of flips, and ; the same decoded mixture holds in the stated logical convention. Thus marginal error probabilities alone do not determine the requested recovery probability. A complex environment overlap likewise requires the coherent rotation to be retained or separately compensated before this stochastic phase-error analysis applies.