|q⟩ Bad Qubits

advanced · Physics · Magic States & Distillation

Checkpoint: Distillation Math

This checkpoint pulls together the quantitative core of the module: the 1515-to-11 error map, the threshold, and the suppression that makes distillation worthwhile.

The map, once more

A single round of 1515-to-11 distillation transforms the input error into

εout=35εin3+O(εin4).\varepsilon_{\text{out}} = 35\,\varepsilon_{\text{in}}^{3} + O(\varepsilon_{\text{in}}^4).

The cubic power comes from the distance-33 punctured Reed–Muller code: post-selecting on a trivial syndrome rejects every weight-11 and weight-22 input error, so the leading surviving failure is a weight-33 correlated event, of which there are 3535 relevant patterns.

Working the numbers

Take a factory operating at εin=0.01\varepsilon_{\text{in}} = 0.01, comfortably below the threshold ε=1/350.169\varepsilon^{*} = 1/\sqrt{35} \approx 0.169. One round gives

εout=35(0.01)3=35×106=3.5×105.\varepsilon_{\text{out}} = 35\,(0.01)^3 = 35\times10^{-6} = 3.5\times10^{-5}.

The suppression factor is

εinεout=εin35εin3=135εin2=135×104285.7,\frac{\varepsilon_{\text{in}}}{\varepsilon_{\text{out}}} = \frac{\varepsilon_{\text{in}}}{35\,\varepsilon_{\text{in}}^3} = \frac{1}{35\,\varepsilon_{\text{in}}^2} = \frac{1}{35\times10^{-4}} \approx 285.7,

so a single round improves the magic-state error by nearly a factor of 300300 at this input quality. Note how the suppression factor grows as εin\varepsilon_{\text{in}} shrinks — distillation gets relatively more effective the cleaner your raw states already are, which is the quantitative face of "operate well below threshold."

Your task

Compute the single-round output error εout=35εin3\varepsilon_{\text{out}} = 35\,\varepsilon_{\text{in}}^3 for εin=0.01\varepsilon_{\text{in}} = 0.01 and return it. The grader also verifies that your value is an improvement (εout<εin\varepsilon_{\text{out}} < \varepsilon_{\text{in}}) and that the implied suppression factor matches 1/(35εin2)1/(35\,\varepsilon_{\text{in}}^2). Derive everything from the map — nothing is hard-coded.

Run your code to see the quantum state.

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