Computing the Threshold
Threshold as a break-even point
A threshold is where encoding stops hurting and starts helping. The clearest place to see the arithmetic is the code-capacity model: errors strike only the data qubits (gates, measurement, and syndrome extraction are taken to be perfect), each qubit suffering an independent bit flip with probability . We ask for the largest below which a code, decoded optimally, makes the logical error rate smaller than the physical rate — and below which growing the code drives it to zero.
The three-qubit majority vote
Take the distance-3 repetition code , , which corrects a single bit flip by majority vote. A logical error occurs when two or three of the three qubits flip, since the majority then points the wrong way. With independent flips of probability ,
For small , : the code helps. But as grows the cubic catches up.
Solving for the crossover
The break-even condition is — the encoded qubit is no better than a bare one:
Factoring, , so or . The physically meaningful crossing is
Below we have , and concatenating the repetition code (re-encoding each qubit again) squares the suppression at every level — so logical errors vanish in the limit of many levels. Above the inequality flips and encoding amplifies the error. The threshold of the repetition code against independent bit flips is exactly one half, which is also the point where a single bit carries no information.
Try it
Find the repetition-code threshold yourself. Define and locate the nonzero crossing of by solving the quadratic for the root in . Return that root as a plain number. (Compute it — do not hardcode .)
Sign in on the full site to ask questions and join the discussion.