Self-Assessment Quiz: Quantum Error-Correcting Codes
Twenty questions on the stabilizer formalism, the Shor and Steane codes, code parameters, and logical operators. Aim for 16+.
Question 1
A stabilizer code is defined by:
A) An abelian subgroup of the Pauli group not containing $-I$ B) A single unitary C) A classical code only D) A measurement basis
Question 2
For an $[[n,k,d]]$ stabilizer code, the number of independent generators is:
A) $n$ B) $k$ C) $n-k$ D) $d$
Question 3
The code space is:
A) The $+1$ eigenspace of all stabilizer generators B) The null space of the Hamiltonian C) All $2^n$ states D) A single state
Question 4
Stabilizer generators must:
A) Commute pairwise B) Anticommute C) Be unitary but not Hermitian D) Be classical
Question 5
The reason generators must commute is:
A) They must be simultaneously measurable B) To reduce qubit count C) To increase distance D) Convention only
Question 6
Logical operators are Pauli operators that:
A) Commute with all stabilizers but are not themselves in the stabilizer group B) Anticommute with all stabilizers C) Are in the stabilizer group D) Are non-Pauli
Question 7
The code distance $d$ is:
A) The minimum weight of a logical operator B) The number of stabilizers C) $n - k$ D) The number of qubits
Question 8
The Shor code has parameters:
A) $[[9,1,3]]$ B) $[[7,1,3]]$ C) $[[5,1,3]]$ D) $[[9,3,3]]$
Question 9
The smallest code correcting any single-qubit error uses:
A) 3 qubits B) 5 qubits C) 7 qubits D) 9 qubits
Question 10
The quantum Hamming bound for a code correcting $t$ errors requires:
A) $2^{n-k} \ge \sum_{j=0}^{t}\binom{n}{j}3^j$ B) $n \ge 3t$ C) $k \ge t$ D) $d = n$
Question 11
The factor $3^j$ appears because:
A) Each erred qubit can suffer $X$, $Y$, or $Z$ B) There are 3 qubits C) The code rate is 1/3 D) Convention
Question 12
A degenerate code is one where:
A) Distinct errors can produce the same syndrome yet act identically on the code space B) The code fails C) $k=0$ D) Distance is 1
Question 13
Transversal gates are desirable because:
A) They do not spread errors within a code block B) They are faster C) They need fewer qubits D) They are classical
Question 14
The Eastin–Knill theorem states:
A) No code has a transversal universal gate set B) All gates are transversal C) Codes cannot correct errors D) Thresholds do not exist
Question 15
Syndrome extraction requires ancillas because:
A) Measuring data qubits directly would collapse the logical state B) Ancillas are cheaper C) It is faster D) Stabilizers are non-Hermitian
Question 16
True or false: A stabilizer code's logical operators are unique.
Question 17
True or false: Larger distance always means better performance in practice.
Question 18
True or false: Every quantum code is a CSS code.
Question 19
Short answer. Explain why the code space is $2^k$-dimensional given $n-k$ stabilizer generators.
Question 20
Short answer. Why does the $[[5,1,3]]$ code achieve with 5 qubits what Shor needs 9 for?
Answer Key
| Q | Ans | Note |
|---|---|---|
| 1 | A | Abelian so generators are simultaneously measurable; excluding $-I$ so the code space is non-trivial. |
| 2 | C | Each independent generator halves the space. |
| 3 | A | The simultaneous $+1$ eigenspace. |
| 4 | A | Abelian by definition. |
| 5 | A | Non-commuting observables cannot be measured together, so syndrome extraction would be impossible. |
| 6 | A | They preserve the code space (commute with stabilizers) but act non-trivially on encoded information. |
| 7 | A | The lightest error that goes undetected and corrupts the logical state. |
| 8 | A | Nine qubits: three-qubit phase code concatenated with three-qubit bit code. |
| 9 | B | The perfect $[[5,1,3]]$ code, provably minimal. |
| 10 | A | The quantum sphere-packing bound. |
| 11 | A | Three non-identity Paulis per erred qubit — the quantum-specific factor. |
| 12 | A | Degeneracy lets a code beat naive counting bounds; the surface code is highly degenerate. |
| 13 | A | A bitwise gate cannot propagate a single-qubit error into a multi-qubit error inside one block — the essence of fault tolerance. |
| 14 | A | Which forces magic-state distillation for non-Clifford gates (Ch. 9). |
| 15 | A | Stabilizer eigenvalues are copied onto ancillas, which are measured instead. |
| 16 | False | Logical operators are defined up to multiplication by stabilizers, so there are many equivalent representatives. Choosing a minimum-weight one gives the distance. |
| 17 | False | Larger distance costs more qubits and more syndrome-extraction circuitry, and each extra round can introduce errors. Beyond the point where logical error is dominated by other factors, increasing $d$ wastes resources — there is an optimal distance for a given physical error rate and target logical error. |
| 18 | False | CSS codes are the subclass built from two classical codes with separated $X$ and $Z$ stabilizers. The $[[5,1,3]]$ code is a stabilizer code but not CSS — its generators mix $X$ and $Z$ on the same qubits. |
| 19 | — | Each independent stabilizer generator is a Hermitian operator with eigenvalues $\pm1$, and requiring $+1$ halves the dimension of the space. Starting from $2^n$ and imposing $n-k$ independent constraints gives $2^n/2^{n-k} = 2^k$ — exactly $k$ logical qubits' worth of space. |
| 20 | — | Shor's code is built by concatenation: a three-qubit phase-flip code whose every qubit is itself a three-qubit bit-flip code, giving $3\times3=9$ and treating the two error types separately and somewhat wastefully. The $[[5,1,3]]$ code instead uses stabilizers that mix $X$ and $Z$ on the same qubits, protecting against both error types simultaneously rather than in separate layers. Counting confirms 5 is minimal: correcting one error on $n$ qubits requires $2^{n-k} \ge 1 + 3n$, so for $k=1$, $2^{n-1}\ge 1+3n$, which first holds at $n=5$. |