|q⟩ Bad Qubits

advanced · Physics · Fault-Tolerant Quantum Computing

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 pp. We ask for the largest pp 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 0000|0\rangle \to |000\rangle, 1111|1\rangle \to |111\rangle, 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 pp,

pL=(32)p2(1p)+(33)p3=3p2(1p)+p3=3p22p3.p_L = \binom{3}{2} p^2 (1-p) + \binom{3}{3} p^3 = 3p^2(1-p) + p^3 = 3p^2 - 2p^3 .

For small pp, pL3p2pp_L \approx 3p^2 \ll p: the code helps. But as pp grows the cubic catches up.

Solving for the crossover

The break-even condition is pL=pp_L = p — the encoded qubit is no better than a bare one:

3p22p3=p    3p2p2=1    2p23p+1=0.3p^2 - 2p^3 = p \;\Longrightarrow\; 3p - 2p^2 = 1 \;\Longrightarrow\; 2p^2 - 3p + 1 = 0 .

Factoring, (2p1)(p1)=0(2p - 1)(p - 1) = 0, so p=12p = \tfrac12 or p=1p = 1. The physically meaningful crossing is

pth=12.\boxed{\,p_{\text{th}} = \tfrac12\,.}

Below p=12p = \tfrac12 we have pL<pp_L < p, 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 p=12p = \tfrac12 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 pL(p)=3p22p3p_L(p) = 3p^2 - 2p^3 and locate the nonzero crossing of pL(p)=pp_L(p) = p by solving the quadratic 2p23p+1=02p^2 - 3p + 1 = 0 for the root in (0,1)(0,1). Return that root as a plain number. (Compute it — do not hardcode 0.50.5.)

Run your code to see the quantum state.

Sign in on the full site to ask questions and join the discussion.