Quiz: Quantum Error Correction in Code
Answers with explanations at the end.
1. State the two obstacles that make classical error correction impossible to translate directly, and the single idea that resolves both.
2. Why is $\alpha|000\rangle + \beta|111\rangle$ not a violation of no-cloning?
3. What does the syndrome measurement learn, and what does it deliberately not learn?
4. The three-qubit code's encoded error rate is $3p^2 - 2p^3$. Where is the crossover, and what happens above it?
5. A noise study reports a logical error rate of exactly 0.0000 at every physical error rate including $p = 0.6$. Give the one-line diagnostic that identifies this as broken, and the most likely cause.
6. Why does transpile(qc, sim) break a noise experiment that uses id gates as noise slots?
7. A phase-flip test storing $|+\rangle$ reports zero logical error. The code is correct. What is wrong?
8. Name the two mechanisms that can make a QEC test unable to fail, and give an example of each.
9. Why is there no blind cell in the $Y$ column of the grid?
10. At $p = 0.05$ the bit-flip code storing $|+_L\rangle$ under $Z$ noise gives 0.1346 against an unencoded 0.0500. Explain the number.
11. What is the honest single-number summary of a code's performance, and why is it the worst case rather than the average?
12. The Shor code corrects all 54 single-qubit Pauli injections exactly. Why does it nonetheless stop helping at a lower noise rate than the three-qubit code?
13. The Shor code's $X$ breakeven is exactly three times its $Z$ breakeven. Derive both.
14. Define a stabilizer code. Why must the generators commute?
15. Steane is $[[7,1,3]]$ and Shor is $[[9,1,3]]$. What does each number mean, and which code is better?
16. Why are all the repetition-code simulations in this chapter fast even at distance 9?
17. Describe the fan in §25.8's table, above and below $p = 0.5$, and say what the crossing point is called.
18. $\Lambda$ is 28 at $p = 0.01$ and 1.7 at $p = 0.20$. What is $\Lambda$, and what does the collapse imply for hardware that is barely below threshold?
19. With data error at 0.01 and syndrome-extraction gate error at Chapter 12's measured median of 0.0078, what is the logical error rate, and what does it mean?
20. Give three reasons the surface code is the leading candidate, and the one thing it cannot do natively.
Answers
1. No-cloning forbids copying an unknown qubit, and measurement collapses superposition, so you cannot compare copies. Both are resolved by entangling rather than copying: the linear map $|0\rangle \to |000\rangle$, $|1\rangle \to |111\rangle$ creates redundancy in the correlations, and parity observables like $Z_0Z_1$ compare qubits without inspecting them.
2. Because it is not three copies of $|\psi\rangle$. Three copies would be $(\alpha|0\rangle+\beta|1\rangle)^{\otimes 3}$. In the encoded state each individual qubit is maximally mixed and carries no information about $\alpha$ or $\beta$ — the information lives entirely in the correlations between them.
3. It learns which qubits disagree — the $n-k$ generator eigenvalues, which identify the error. It learns nothing about $\alpha$ and $\beta$, because every stabilizer generator acts trivially on the codespace. That is precisely why measuring a syndrome is safe and measuring a qubit is not.
4. $3p^2 - 2p^3 = p$ gives $2p^2 - 3p + 1 = 0$, so $p = 1/2$ (and $p=1$). Above it, the encoded state is worse than the unencoded one — 0.6494 against 0.6000 at $p = 0.6$. Correcting adds error.
5. Check the regime where you know the answer must be non-zero. At $p = 0.6$ a distance-3 code
must fail about 65% of the time, because it cannot correct two errors. A result that is impossible in
principle is a broken measurement. Most likely cause: the noise is not in the circuit — the
transpiler deleted the id noise slots.
6. Aer attaches noise to gates, and id gates mean "do nothing," so the transpiler removes
them at optimization_level ≥ 1, which is the default. The noise model then has nothing to attach
to and the simulator faithfully executes a noiseless circuit. Fix: optimization_level=0 and
assert the id count survived.
7. The test, not the code. Conjugating a physical $Z$ back through the decoder gives
ZII → IIX — the decoded logical error is an $X$, and $X|+\rangle = |+\rangle$. The stored state
is an eigenstate of the very failure being measured, so the experiment cannot fail.
8. (a) The stored state is an eigenstate of the physical error — $|000\rangle$ under $Z$, or $|{+}{+}{+}\rangle$ under $X$. (b) The residual logical error stabilizes the stored state — $X_L$ acting on $|+_L\rangle$ in the case above. Note blindness depends on the code as well: the phase-flip code is blind exactly where the bit-flip code sees.
9. Because $Y = iXZ$ has both a bit-flip and a phase-flip component, so it damages every logical basis state. No stabilizer state of a $Z$-type or $X$-type code is a $Y$ eigenstate.
10. The bit-flip code does not correct phase errors, and encoding gives three qubits, so three chances at one: $1-(1-p)^3 = 0.1426$ at $p = 0.05$, which is what is measured. The code made the error rate 2.7× worse. A code that fixes one error type amplifies the other — encoding is not a neutral act.
11. The worst case over both logical basis states and all three error types. A code must preserve an arbitrary state, so its guarantee is only as good as its weakest direction. Averaging would let the blind cells' zeros dilute the real failures — which is exactly how a code that is worse than nothing can look acceptable.
12. Because "corrects any single-qubit error" is a claim about ONE error. With nine qubits under independent noise, multi-qubit errors are common. A phase error anywhere in a block of three flips that whole block, so the block rate is $\approx 3p$ — the inner layer concentrates phase errors threefold before the outer layer can correct them.
13. $Z$: block rate $q = 3p-3p^2+p^3 \approx 3p$, outer code fails at $3q^2 \approx 27p^2$; breakeven $27p^2 = p \Rightarrow$ $p = 1/27$. $X$: the inner code corrects, failing only on two-in-a-block at $3p^2$, and the outer phase-flip layer does not protect against $X$, so three blocks give $9p^2$; breakeven $p = 1/9$. Ratio exactly 3.
14. A set of commuting Pauli operators whose simultaneous $+1$ eigenspace is the codespace: $S_i|\psi\rangle = +|\psi\rangle$. They must commute so they can be measured simultaneously — non-commuting observables cannot have simultaneous eigenvalues, so there would be no well-defined syndrome, and measuring one would disturb the other.
15. $[[n,k,d]]$ = $n$ physical qubits, $k$ logical qubits, distance $d$. Both correct any single-qubit error ($d=3$), but Steane does it with 7 qubits instead of 9 — better. Finding codes like that systematically is what the stabilizer formalism is for.
16. Because QEC circuits are Clifford circuits, and by the Gottesman–Knill theorem
(Chapter 11) they are classically simulable in polynomial time. Aer's stabilizer method exploits
this, so distance 9 at 40,000 shots is instant where a statevector simulation would not be.
17. Below $p = 0.5$ the curves fan downward — more distance, lower logical error, gap widening. Above $p = 0.5$ they fan upward — more distance, higher error. At $p = 0.5$ all distances give 0.5 and the curves cross. The crossing point is the threshold.
18. $\Lambda = P_L(d)/P_L(d+2)$ — the factor by which two extra units of distance divide the logical error. Its constancy in $d$ is exponential suppression. The collapse means being barely below threshold is nearly as bad as being above it: at $\Lambda = 1.7$ you need enormous distance to buy anything useful, which is where Chapter 15's millions of physical qubits come from.
19. 0.0238 — 2.4× worse than the unencoded 0.01, using three times the qubits. Breakeven is a syndrome gate error of about 0.0035, and real hardware is at 0.0078. The circuitry that fixes errors is made of the gates that cause them, which is why QEC is not deployed today and why real thresholds (~$10^{-2}$ for the surface code) are so much more demanding than the naive 0.5.
20. (a) It needs only nearest-neighbour connectivity on a 2D grid, which is what real hardware provides (Chapter 17). (b) Its threshold is around $10^{-2}$, in the neighbourhood of current gate fidelities. (c) Its stabilizers are weight-4 and local, so syndrome extraction is shallow and repeatable — which §25.9 shows is what actually sets the threshold. It cannot do $T$ gates natively, which is why magic state distillation dominates Chapter 15's resource estimates.