5  Quantum Error Correction Basics

TipLearning Objectives

After completing this chapter, you will be able to: - Describe the Pauli error model and depolarizing channel - Define stabilizer codes using the stabilizer formalism - Compute syndromes from stabilizer measurements - Construct CSS codes from classical linear codes - Explain degeneracy and why it benefits quantum codes

NotePrerequisites

This chapter assumes familiarity with: - Classical linear codes (Chapter 1) - Quantum mechanics basics (qubits, superposition, measurement) - Linear algebra (tensor products, eigenvalues)

Quantum computers are fundamentally different from classical computers: they operate on quantum bits (qubits) that can exist in superpositions of states and become entangled with each other. These quantum properties enable powerful new algorithms, but they also make quantum information extremely fragile. Unlike classical bits, which can be copied and measured without disturbance, qubits cannot be copied (no-cloning theorem) and measurement destroys quantum information.

The solution is quantum error correction (QEC): encode logical qubits into highly entangled states of many physical qubits such that errors can be detected and corrected without disturbing the encoded quantum information. This chapter develops the mathematical foundations of QEC, building on the classical coding theory from Chapters 1-2.

5.1 Quantum Error Model

Before we can correct errors, we must understand what errors occur in quantum systems. The fundamental differences between classical and quantum information lead to fundamentally different error models.

5.1.1 Single-Qubit Pauli Errors

The Pauli matrices play the same role in quantum error correction that bit flips play in classical coding theory.

NoteDefinition: Pauli Matrices

The single-qubit Pauli matrices are: $ pauliI = mat(1, 0; 0, 1), quad pauliX = mat(0, 1; 1, 0), quad pauliY = mat(0, -i; i, 0), quad pauliZ = mat(1, 0; 0, -1) $

  • \(pauliI\) (identity): no error
  • \(pauliX\) (bit-flip): \(ket(0) ↔ ket(1)\)
  • \(pauliZ\) (phase-flip): \(ket(+) ↔ ket(-)\)
  • \(pauliY = i pauliX pauliZ\): combined bit and phase flip

The Pauli matrices have key properties: - Each is Hermitian (P equals its conjugate transpose) - Each is unitary (P times its conjugate transpose equals identity) - They anticommute: \(P Q = -Q P\) for \(P \neq Q\) - They square to identity: \(P^2 = I\)

5.2 Example: Bit-Flip Error

The Pauli-X error flips the computational basis states: $ pauliX ket(0) = ket(1), quad pauliX ket(1) = ket(0) $

In superposition states: $ pauliX (alpha ket(0) + beta ket(1)) = alpha ket(1) + beta ket(0) $

5.3 Example: Phase-Flip Error

The Pauli-Z error introduces a relative phase: $ pauliZ ket(0) = ket(0), quad pauliZ ket(1) = -ket(1) $

This changes the relative phase of superpositions: $ pauliZ (alpha ket(0) + beta ket(1)) = alpha ket(0) - beta ket(1) $

The states \(ket(+) = (ket(0) + ket(1))/sqrt(2)\) and \(ket(-) = (ket(0) - ket(1))/sqrt(2)\) are interchanged by Z errors.

5.3.1 The Pauli Group

For multi-qubit systems, we need the full Pauli group.

NoteDefinition: Pauli Group

The \(n\)-qubit Pauli group \(P_n\) consists of all tensor products of Pauli matrices with possible phases \(± 1, ± i\): $ P_n = {±1, ±i} × {I, X, Y, Z}^{n} $

Elements are written as \(P = i^k P_1 ⊗ P_2 ⊗ ... ⊗ P_n\) where each \(P_i \in \{I, X, Y, Z\}\).

5.4 Example: 3-Qubit Pauli Operator

\(pauliX ⊗ pauliZ ⊗ pauliY\) acts as: - X on qubit 1, Z on qubit 2, Y on qubit 3 - Weight: 3 (number of non-identity Paulis)

This error flips qubit 1, phase-flips qubit 2, and does both on qubit 3.

Two important concepts: - Weight: Number of non-identity Paulis in the tensor product - Support: Set of qubit positions where the Pauli is not identity

5.4.1 The Depolarizing Channel

The standard model for quantum noise is the depolarizing channel.

NoteDefinition: Depolarizing Channel

The depolarizing channel on a single qubit with error probability \(p\) is: $ cal(E)(rho) = (1 - p) rho + (p/3) (pauliX rho pauliX + pauliY rho pauliY + pauliZ rho pauliZ) $

With probability \(1-p\), the state is unchanged. With probability \(p/3\) each, an X, Y, or Z error occurs.

The depolarizing channel is useful because: 1. It’s symmetric in X, Y, Z (no preferred error direction) 2. It can be approximated by many physical noise sources 3. It simplifies analysis while capturing essential features

For independent noise on \(n\) qubits, the probability of a specific Pauli error \(P\) of weight \(w\) is approximately \((p/3)^w (1-p)^{n-w}\).

NoteRemark

The factor of 1/3 in the depolarizing channel means \(p\) is the total error probability. If we want the probability of any non-identity error to be \(p\), we use \(p' = 4p/3\) and renormalize. This distinction matters when comparing theory to experiments.

5.4.2 Discretization of Errors

A crucial insight in quantum error correction is that continuous errors can be corrected by correcting a discrete set of errors.

ImportantProposition: Discretization

Any single-qubit operation can be written as: $ U = a pauliI + b pauliX + c pauliZ + d pauliY $ with \(|a|^2 + |b|^2 + |c|^2 + |d|^2 = 1\).

For any Kraus operator \(E\) of a quantum channel, we can decompose: $ E = sum_k c_k P_k $ where \(P_k \in \{I, X, Y, Z\}\).

If a code can correct errors \(\{P_k\}\), it corrects any linear combination \(sum_k c_k P_k\) by linearity of quantum mechanics.

This is the quantum analogue of the classical observation that we only need to correct the most likely error patterns. In quantum mechanics, this becomes especially powerful because the discrete set \(\{I, X, Y, Z\}\) spans the space of all possible single-qubit operations.

Warning

A common mistake is thinking quantum error correction requires measuring the qubits directly to find errors. Actually, measuring qubits would destroy the quantum information we’re trying to protect! Instead, we measure stabilizer operators—multi-qubit observables that reveal error syndromes without collapsing the encoded logical state. The stabilizers are carefully chosen so their measurement outcomes depend only on which errors occurred, not on the encoded quantum data.

The Pauli X, Y, Z errors form a basis ∀ possible single-qubit errors. Any error can be expressed as a linear combination of these discrete errors.

5.5 Stabilizer Formalism

The stabilizer formalism, introduced by Gottesman [@gottesman1997], provides an elegant framework for quantum error-correcting codes analogous to classical linear codes.

5.5.1 Stabilizer Groups

The key idea is to define the code space as the simultaneous +1 eigenspace of a set of commuting operators.

NoteDefinition: Stabilizer Group

A stabilizer group \(S\) is a subgroup of \(P_n\) such that: - \(S\) is abelian (all elements commute) - \(-I\) is not in \(S\) (no element is \(-I\))

The stabilizer code \(cal(C)\) defined by \(S\) is the set of states satisfying \(P ket(psi) = ket(psi)\) ∀ generators \(P\) in \(S\). The code space is the simultaneous +1 eigenspace of all operators in \(S\).

TipIntuition

Think of stabilizers as “secret handshakes” that identify club members. The code space contains all quantum states that respond correctly to every handshake (eigenvalue +1). When an error occurs, the state fails some handshakes (eigenvalue -1), revealing which error happened—without revealing the actual quantum information. It’s like detecting an intruder by checking ID badges without reading anyone’s private documents.

The stabilizer group is generated by \(n-k\) independent generators: $ S = g_1, g_2, …, g_{n-k} $

where \(g_i\) commute and \(g_i^2 = I\). The code encodes \(k\) logical qubits in \(n\) physical qubits.

5.6 Example: 3-Qubit Bit-Flip Code Stabilizers

The 3-qubit bit-flip code uses stabilizers: $ g_1 = pauliZ ⊗ pauliZ ⊗ pauliI, quad g_2 = pauliZ ⊗ pauliI ⊗ pauliZ $

The code space consists of states satisfying: $ g_1 ket(psi) = ket(psi), quad g_2 ket(psi) = ket(psi) $

These are the states \(ket(000)\) and \(ket(111)\) (up to normalization), encoding the logical states: $ ket(0)_L = ket(000), quad ket(1)_L = ket(111) $

ImportantProposition: Code Dimension

If \(S\) has \(r\) independent generators, the stabilizer code encodes \(k = n - r\) logical qubits into \(n\) physical qubits.

5.6.1 Stabilizer Generators and Parity Checks

Stabilizer generators play the same role as parity-check matrices in classical coding theory.

NoteDefinition: Stabilizer Generator Matrix

Represent each generator as a binary vector of length \(2n\): $ g = (x_1, z_1, x_2, z_2, …, x_n, z_n) $ where the generator acts as \(X^{x_i} Z^{z_i}\) on qubit \(i\).

A set of generators defines a stabilizer matrix \(H_S\) of size \(r × 2n\).

The stabilizer matrix has the same role as the classical parity-check matrix: it tells us which measurements to perform to detect errors.

5.7 Example: Stabilizer Matrix for 3-Qubit Code

For \(g_1 = Z ⊗ Z ⊗ I\) and \(g_2 = Z ⊗ I ⊗ Z\): - \(g_1\): \((z, z, 0)\) on qubits (1,2,3) → \((0,1, 0,1, 0,0)\) in \((x,z)\) pairs - \(g_2\): \((z, 0, z)\)\((0,1, 0,0, 0,1)\)

Stabilizer matrix: $ H_S = mat( 0, 1, 0, 1, 0, 0; 0, 1, 0, 0, 0, 1; ) $

5.7.1 Syndrome Measurement

The syndrome tells us which error occurred without disturbing the encoded quantum information.

NoteDefinition: Syndrome

For an error \(E\) acting on a code state, the syndrome is the vector of measurement outcomes. Each stabilizer generator \(g_i\) gives a syndrome bit: - If \(g_i\) and \(E\) commute, the measurement gives \(+1\) - If \(g_i\) and \(E\) anticommute, the measurement gives \(-1\)

Equivalently, \(s_i = +1\) if \([g_i, E] = 0\) and \(s_i = -1\) if \(\{g_i, E\} = 0\).

The syndrome depends only on the error, not on the logical state. This is the quantum analogue of classical syndrome decoding.

5.8 Example: Error Detection in 3-Qubit Code

For the 3-qubit bit-flip code with stabilizers \(g_1 = Z ⊗ Z ⊗ I\), \(g_2 = Z ⊗ I ⊗ Z\):

  • No error: commutes with both (\(s = (+1, +1)\))
  • X on qubit 1: anticommutes with \(g_1\), anticommutes with \(g_2\)\(s = (-1, -1)\)
  • X on qubit 2: anticommutes with \(g_1\), commutes with \(g_2\)\(s = (-1, +1)\)
  • X on qubit 3: commutes with \(g_1\), anticommutes with \(g_2\)\(s = (+1, -1)\)

Each single-qubit X error has a unique syndrome!

5.8.1 Worked Example: Stabilizer Syndrome Measurement and Correction

Let us walk through a complete error correction cycle for the 3-qubit bit-flip code, showing each step in detail.

Step 1: Prepare the logical state. Alice encodes a logical qubit in the state \(ket(psi)_L = alpha ket(0)_L + beta ket(1)_L\): $ ket(psi) = alpha ket(000) + beta ket(111) $

Step 2: Error occurs on the channel. A bit-flip error (Pauli X) occurs on qubit 2: $ ket(psi)_“err” = X_2 ket(psi) = alpha ket(010) + beta ket(101) $

Step 3: Measure the first stabilizer \(g_1 = Z ⊗ Z ⊗ I\). The stabilizer \(g_1\) checks the parity of qubits 1 and 2: - For \(ket(010)\): qubits 1,2 have values 0,1 → parity is odd → eigenvalue \(-1\) - For \(ket(101)\): qubits 1,2 have values 1,0 → parity is odd → eigenvalue \(-1\)

Measurement outcome: \(s_1 = -1\)

Step 4: Measure the second stabilizer \(g_2 = Z ⊗ I ⊗ Z\). The stabilizer \(g_2\) checks the parity of qubits 1 and 3: - For \(ket(010)\): qubits 1,3 have values 0,0 → parity is even → eigenvalue \(+1\) - For \(ket(101)\): qubits 1,3 have values 1,1 → parity is even → eigenvalue \(+1\)

Measurement outcome: \(s_2 = +1\)

Step 5: Decode the syndrome. The syndrome is \(bold(s) = (-1, +1)\), which corresponds to an X error on qubit 2:

Error Syndrome \((s_1, s_2)\) Location
None \((+1, +1)\)
\(X_1\) \((-1, -1)\) Qubit 1
\(X_2\) \((-1, +1)\) Qubit 2
\(X_3\) \((+1, -1)\) Qubit 3

Step 6: Apply the correction. Apply \(X_2\) to flip qubit 2 back: $ X_2 ket(psi)_“err” = X_2 (alpha ket(010) + beta ket(101)) = alpha ket(000) + beta ket(111) = ket(psi) $

Step 7: Verify the logical state is recovered. The corrected state \(alpha ket(000) + beta ket(111)\) is exactly the original encoded state. The quantum information \((alpha, beta)\) has been preserved without ever measuring it directly.

Stabilizer measurement circuit for the 3-qubit code. Ancilla qubits measure the stabilizer generators Z ⊗ Z ⊗ I and Z ⊗ I ⊗ Z without disturbing the encoded logical states.

5.8.2 The 3-Qubit Codes

Two simple codes illustrate the stabilizer formalism.

5.9 Example: 3-Qubit Bit-Flip Code

Stabilizers: \(S = \langle Z ⊗ Z ⊗ I, Z ⊗ I ⊗ Z \rangle\)

Encodes: \(ket(0)_L = ket(000)\), \(ket(1)_L = ket(111)\)

Corrects: Any single X error (bit-flip)

Distance: \(d = 3\) (minimum weight of logical operator, which is X ⊗ X ⊗ X)

5.10 Example: 3-Qubit Phase-Flip Code

Stabilizers: \(S = \langle X ⊗ X ⊗ I, I ⊗ X ⊗ X \rangle\)

Encodes: \(ket(0)_L = ket(+++)\), \(ket(1)_L = ket(---)\)

Corrects: Any single Z error (phase-flip)

Distance: \(d = 3\)

NoteRemark

The bit-flip and phase-flip codes are dual to each other (replace X with Z). The full 3-qubit code can correct arbitrary single-qubit errors by combining both: stabilizers \(\langle Z ⊗ Z ⊗ I, Z ⊗ I ⊗ Z, X ⊗ X ⊗ I, I ⊗ X ⊗ X \rangle\) with distance 3.

5.11 CSS Code Construction

The Calderbank-Shor-Steane (CSS) construction provides a systematic way to build quantum codes from classical codes.

5.11.1 From Classical to Quantum Codes

CSS codes use two classical linear codes with specific properties.

NoteDefinition: CSS Code

Let \(C_1\) and \(C_2\) be classical binary linear codes with \(C_2\) contained in \(C_1\). The CSS code constructed from \((C_1, C_2)\) has: - X-type stabilizers from the dual of \(C_1\) - Z-type stabilizers from \(C_2\)

Parameters: \([[n, k_1 - k_2, d]]\) where \(k_i = dim(C_i)\) and \(d = min(d(C_1), d(C_2^⊥))\).

TipIntuition

CSS codes are like building a quantum house from classical bricks. You take two classical codes—one handles bit-flips (X errors), the other handles phase-flips (Z errors). The trick is choosing codes that “fit together” (\(C_2 ⊂ C_1\)) so the X and Z checks don’t interfere. It’s divide-and-conquer: separate the quantum problem into two classical problems you already know how to solve.

The condition \(C_2 ⊂ C_1\) ensures that X-type and Z-type stabilizers commute.

ImportantProposition: CSS Commutation

The condition \(C_2 ⊂ C_1\) is equivalent to \(C_1^⊥ ⊂ C_2^⊥\). For any \(h_x \in C_1^⊥\) (X-type generator) and \(h_z \in C_2\) (Z-type generator): $ h_x h_z = (-1)^{h_x · h_z} h_z h_x = h_z h_x $ since \(h_x · h_z = 0\) (orthogonality from \(C_1^⊥ ⊂ C_2^⊥\)).

CSS code construction: X-type stabilizers from \(C_1^⊥\) and Z-type stabilizers from \(C_2\). The classical codes must satisfy \(C_2 ⊂ C_1\).

5.11.2 Steane [7, 1, 3] Code

The Steane code is the simplest CSS code with good parameters.

5.12 Example: Steane Code

Let \(C_1\) be the classical \([7, 4, 3]\) Hamming code with dual \(C_1^⊥\) being the \([7, 3, 4]\) simplex code. Since the Hamming code is self-dual (\(C_1 = C_1^⊥\)), we have \(C_2 = C_1^⊥ ⊂ C_1\).

Steane code parameters: \([[7, 1, 3]]\)

X-type stabilizers (from \(C_1^⊥\)): $ g_1 = X X X X I I I, quad g_2 = X X I I X X I, quad g_3 = X I X I X I X $

Z-type stabilizers (from \(C_2 = C_1^⊥\)): $ g_4 = Z Z Z Z I I I, quad g_5 = Z Z I I Z Z I, quad g_6 = Z I Z I Z I Z $

The Steane code encodes 1 logical qubit in 7 physical qubits and corrects any single-qubit error.

The Steane code has the remarkable property of being self-dual (CSS of a self-dual classical code), giving it additional symmetry.

ImportantProposition: Steane Code Properties

The \([[7, 1, 3]]\) Steane code: - Corrects any single-qubit error (t = 1) - Has 6 stabilizer generators (n-k = 6) - Logical operators: \(X_L = X X X X X X X\), \(Z_L = Z Z Z Z Z Z Z\) - Can be decoded using classical Hamming code decoding for both X and Z errors

NoteRemark

The Steane code’s connection to the classical Hamming code makes it especially pedagogical: we can use all the classical decoding algorithms we developed in Chapter 2 for quantum error correction!

5.12.1 General CSS Construction

More generally, CSS codes can be constructed from pairs of classical codes:

Classical Codes Quantum Code Properties
\(C_2 ⊂ C_1\) \([[n, k_1 - k_2, d]]\) Standard CSS
\(C_1^⊥ ⊂ C_2\) \([[n, k_1 - k_2, d]]\) Dual CSS
\(C_1 = C_2\) (self-dual) \([[n, 0, d]]\) Self-dual (classical-like)

The CSS construction is powerful because it leverages all of classical coding theory for quantum error correction.

5.13 Logical Operators and Code Distance

The final piece of quantum coding theory defines what it means for a code to correct errors and introduces the unique quantum concept of degeneracy.

5.13.1 Logical Operators

Logical operators are operators that map the code space to itself.

NoteDefinition: Logical Operator

An operator \(L\) is a logical operator for code \(cal(C)\) if ∀ \(ket(psi) \in cal(C)\), \(L ket(psi) \in cal(C)\). The set of logical operators forms a group called the normalizer \(N(S)\).

Logical Pauli operators are those in \(N(S) without S\): - Commute with all stabilizers: \([L, g] = 0\)\(g \in S\) - Not in \(S\): \(L ∉ S\)

Logical \(X\) and \(Z\) operators for each encoded qubit satisfy: $ X_L^{(i)} Z_L^{(j)} = (-1)^{δ_(i,j)} Z_L^{(j)} X_L^{(i)} $

5.14 Example: Steane Code Logical Operators

For the \([[7, 1, 3]]\) Steane code, the logical operators are: $ X_L = X^{⊗ 7} = X X X X X X X $ $ Z_L = Z^{⊗ 7} = Z Z Z Z Z Z Z $

These operators map the code space to itself and anticommute: $ X_L Z_L = -Z_L X_L $

Any other logical operator can be written as \(P = S' X_L^a Z_L^b\) for some stabilizer \(S' \in S\) and \(a, b \in \{0, 1\}\).

5.14.1 The Centralizer and Logical Operator Group

The relationship between stabilizers and logical operators is given by the centralizer.

NoteDefinition: Centralizer

The centralizer \(C(S)\) of stabilizer \(S\) is the set of all operators that commute with every element of \(S\): $ C(S) = { P P_n : [P, g] = 0 ∀ g S } $

The logical operator group is \(C(S) / S\).

ImportantProposition: Logical Qubits

If \(S\) has \(n-k\) generators, then \(C(S) / S\) is generated by \(2k\) logical Pauli operators: \(k\) independent \(X_L\) operators and \(k\) independent \(Z_L\) operators. These correspond to the \(k\) encoded logical qubits.

5.14.2 Code Distance

The distance of a quantum code measures its error-correcting capability.

NoteDefinition: Quantum Code Distance

The distance \(d\) of a stabilizer code is the minimum weight of a logical operator: $ d = min { wt(P) : P in C(S) without S } $

A code with parameters \([[n, k, d]]\) encodes \(k\) logical qubits in \(n\) physical qubits and can correct up to \(t = floor((d-1)/2)\) errors.

ImportantProposition: Distance and Correction

A \([[n, k, d]]\) code can: - Detect up to \(d-1\) errors (any error of weight \(< d\) has non-trivial syndrome) - Correct up to \(t = floor((d-1)/2)\) errors - The minimum distance is the smallest weight of a non-trivial logical operator

5.15 Example: Code Distances

  • 3-qubit code: \([[3, 1, 3]]\), logical \(X_L = X⊗X⊗X\), logical \(Z_L = Z⊗Z⊗Z\), \(d = 3\)
  • Steane code: \([[7, 1, 3]]\), logical operators weight 7, \(d = 3\)
  • Shor code: \([[9, 1, 3]]\), \(d = 3\)

5.15.1 Degeneracy: A Quantum Phenomenon

Degeneracy is a uniquely quantum phenomenon where different errors have the same effect on the encoded information.

NoteDefinition: Degeneracy

Two errors \(E_1\) and \(E_2\) are degenerate if they differ by a stabilizer: \(E_1 = E_2 S\) for some \(S \in S\). They have the same syndrome and act identically on the code space.

A code is degenerate if it has degenerate errors, non-degenerate otherwise.

TipIntuition

Degeneracy is like two different typos that produce the same misspelling. If “hello” becomes “hallo” by changing ‘e’→‘a’, or by changing ‘e’→‘o’ then ‘o’→‘a’, both routes end at “hallo.” In quantum codes, errors that differ by a stabilizer are indistinguishable—and that’s a feature, not a bug! It means we don’t need to identify the exact error, just its equivalence class. This “don’t care” freedom makes quantum codes more powerful than classical ones.

5.16 Example: Degenerate Errors

In the Steane code, consider: - \(E_1 = X_1\) (X on qubit 1) - \(E_2 = X_1 (Z_2 Z_3)\) (X on qubit 1, Z on qubits 2 and 3)

Since \(Z_2 Z_3 \in S\) (it’s a stabilizer), \(E_1\) and \(E_2\) are degenerate: - Same syndrome: both anticommute with \(g_4 = Z_1 Z_2\), commute with others - Same action on code space: \(E_1 ket(psi) = E_2 ket(psi)\) for \(ket(psi) \in cal{C}\)

The error \(E_2\) has weight 3 but is equivalent to a weight-1 error!

ImportantProposition: Degeneracy Advantage

Degeneracy helps in two ways: 1. Fewer distinct error patterns to consider for decoding 2. Errors of different weights can be equivalent, effectively reducing the error rate for a given physical error mechanism

For a degenerate code, the “effective” number of correctable errors is less than the combinatorial bound would suggest.

NoteRemark

Degeneracy makes quantum codes potentially more powerful than classical codes with the same parameters. Classical codes cannot have degenerate errors because codewords are orthogonal states—measuring the syndrome never destroys information. In quantum mechanics, the code space is a subspace, and different error operators can act identically within that subspace.

This is one reason quantum LDPC codes with good parameters can exist even though the classical Singleton bound would suggest otherwise.

Degenerate errors \(E_1\) and \(E_2\) have the same syndrome and act identically on the code space. They differ by a stabilizer \(S\), so \(E_1 ket(psi) = E_2 S ket(psi) = E_2 ket(psi)\)\(ket(psi) \in cal(C)\).
Code \([[n, k, d]]\) Logical X Logical Z
3-qubit bit-flip \([[3, 1, 3]]\) \(X_1 X_2 X_3\) \(Z_1 Z_2 Z_3\)
3-qubit phase-flip \([[3, 1, 3]]\) \(X_1 X_2 X_3\) \(Z_1 Z_2 Z_3\)
Steane \([[7, 1, 3]]\) \(X^(⊗ 7)\) \(Z^(⊗ 7)\)
Shor \([[9, 1, 3]]\) \(X^(⊗ 3) ⊗ Z^(⊗ 3)\) \(Z^(⊗ 3) ⊗ X^(⊗ 3)\)

The quantum codes we have studied form the foundation for understanding quantum LDPC codes, which extend the classical LDPC construction to the stabilizer formalism.

TipKey Takeaways
  • Pauli errors \(\{I, X, Y, Z\}\) form a basis for all single-qubit errors; correcting discrete Paulis corrects arbitrary continuous errors
  • Stabilizer codes define code space as +1 eigenspace of commuting Pauli operators; \(n-k\) generators encode \(k\) logical qubits in \(n\) physical qubits
  • Syndrome measurement reveals which stabilizers anticommute with the error, without disturbing encoded quantum information
  • CSS codes combine two classical codes: X-stabilizers from \(C_1^perp\), Z-stabilizers from \(C_2\), requiring \(C_2 subset C_1\) for commutativity
  • Code distance \(d\) is minimum weight of logical operators; \([[n,k,d]]\) code corrects \(t = floor((d-1)/2)\) errors
  • Degeneracy allows different physical errors to have identical effect on logical information—a uniquely quantum advantage

5.17 Exercises

Pauli Operators. Consider the single-qubit Pauli operators \(I\), \(X\), \(Y\), \(Z\).

  1. Verify that \(X Z = -Z X\) by computing both matrix products explicitly.

  2. Show that \(Y = i X Z\) by computing the matrix product \(i X Z\).

  3. For the state \(ket(psi) = (ket(0) + ket(1))/sqrt(2)\), compute \(X ket(psi)\), \(Z ket(psi)\), and \(Y ket(psi)\). Which Pauli error leaves this state unchanged?

Stabilizer Syndrome. Consider the 3-qubit bit-flip code with stabilizers \(g_1 = Z ⊗ Z ⊗ I\) and \(g_2 = Z ⊗ I ⊗ Z\).

  1. Verify that \(g_1\) and \(g_2\) commute by showing \(g_1 g_2 = g_2 g_1\).

  2. Compute the syndrome for the error \(E = X ⊗ X ⊗ I\) (X errors on qubits 1 and 2). Does this error have the same syndrome as any single-qubit error?

  3. Can the 3-qubit bit-flip code correct the error from part (b)? Explain why or why not based on the code’s distance.

CSS Code Construction. The Steane code is constructed from the classical \([7,4,3]\) Hamming code.

  1. Explain why the condition \(C_2 ⊂ C_1\) is necessary for the X-type and Z-type stabilizers to commute.

  2. The Steane code has parameters \([[7, 1, 3]]\). How many physical qubits encode how many logical qubits? How many errors can it correct?

  3. If we wanted to construct a CSS code that corrects 2 errors, what minimum distance would we need? Using the Singleton bound, what is the minimum number of physical qubits required for a \([[n, 1, 5]]\) code?

We have established the stabilizer formalism and CSS construction for quantum error-correcting codes. These small codes (3-qubit, Steane, Shor) demonstrate the principles but are not scalable for fault-tolerant quantum computing. The next chapter introduces surface codes, a family of topological codes with local stabilizer measurements that can be implemented on 2D qubit arrays. Surface codes achieve high thresholds and are the leading candidate for near-term quantum error correction, though they require many physical qubits per logical qubit.