Skip to main content
Create your own
Lesson illustration

Stabilizer Codes: Definition and Construction

Hello! Welcome to the fifth lesson in our module on Quantum Error Correction Fundamentals.

In our last two lessons, we constructed codes to handle specific errors: the 3-qubit bit-flip code and the 3-qubit phase-flip code. We saw that they relied on measuring stabilizers like and , respectively. This ad-hoc approach, while instructive, isn't scalable for creating more powerful codes that can handle arbitrary errors. We need a more systematic and powerful language.

Today, we will develop that language. Our learning outcome is to define the stabilizer formalism and construct a stabilizer code from a set of commuting Pauli group generators. This elegant framework, developed by Daniel Gottesman, unifies the description of a vast class of important quantum codes, including the ones we've studied and many more we will encounter. It provides the essential theoretical machinery for designing and analyzing quantum error correction.

1. From Specific States to a General Principle

Let's start by reconsidering a familiar state, the Bell state . We can describe this state not just by its coefficients but also by the operators for which it is a +1 eigenvector. For instance:

  • Applying :
  • Applying :

The state is stabilized by the operators and . This is the core idea. Instead of defining a code by explicitly writing out its basis states (like ), we can define it implicitly as the set of all states that are stabilized by a chosen group of operators.

2. The Pauli Group and the Stabilizer

The operators we use for this are drawn from the n-qubit Pauli group, . This group consists of all -fold tensor products of the Pauli matrices , including multiplicative factors of . For our purposes, we can simplify this to .

A key property of the Pauli group, which is fundamental to your physics background with spin matrices, is that any two of its elements either commute or anti-commute. This binary relationship is central to the formalism.

A stabilizer code is defined by a special subgroup of called the stabilizer, denoted by . This subgroup must satisfy two conditions:

  1. It is abelian (commutative): For any two elements , we must have . This ensures that the operators share a common set of eigenvectors.
  2. It does not contain -I: . If it did, any state in the code would have to satisfy , which is only possible for the zero vector.

The code space, , is then defined as the simultaneous +1 eigenspace of all operators in the stabilizer group :

Any state is called a codeword or stabilizer state.

3. Generators and the Code Space Dimension

Writing down every element of is impractical. Instead, we specify using a minimal set of generators, . These are elements of such that every element in can be written as a product of the generators, and no generator can be written as a product of the others (i.e., they are independent).

A crucial result of the formalism is that if we use physical qubits and our stabilizer has independent generators, the resulting code space has dimension . This means the code encodes logical qubits. Each independent generator you add to the stabilizer halves the dimension of the Hilbert space it defines.

Given your preference for foundational sources, it's worth noting that this entire framework originates from Daniel Gottesman.

Daniel Gottesman's Papers

The stabilizer formalism was introduced by Daniel Gottesman. His website provides access to his foundational papers. We'll use it to acknowledge the source before turning to a more pedagogical text.

Briefly scan the page, particularly the sections on 'Stabilizer codes' and 'Stabilizer States'. Note that Gottesman himself recommends his PhD thesis ('Stabilizer codes and quantum error correction') as a good introduction to the topic. We won't read it now, but it is the definitive reference.

Now, let's dive into a formal development of these ideas.

Chapter 7 Quantum Error Correction

For a structured and clear explanation, we will use John Preskill's highly-regarded lecture notes. This section formally defines the Pauli group, the stabilizer, the code space, and derives the relationship between the number of generators and the number of encoded qubits.

Please read section 7.9.1, 'General formulation' (pages 34-38). Focus on understanding three key points: The definition of the n-qubit Pauli group \mathcal{G}_n and its properties. The definition of a stabilizer code \mathcal{H}_S (what we're calling \mathcal{C}) as the simultaneous +1 eigenspace of an abelian subgroup S. The argument for why n-k independent generators define a 2^k-dimensional code space.

4. How to Construct a Stabilizer Code

The reading provides the theory; let's make it practical. To construct a valid stabilizer code (encoding logical qubits into physical qubits), you need to choose generators that satisfy a few simple rules.

The Rules for Generators :

  1. Pauli Group Elements: Each must be an element of .
  2. Commutativity: All generators must commute with each other: for all .
    • Practical Trick: Two Pauli strings commute if they anti-commute on an even number of qubit positions. For example, and . On the first qubit, and anti-commute. On the second, and anti-commute. The total number of anti-commutations is 2 (even), so .
  3. Independence: The generators must be independent. You cannot create one generator by multiplying others (e.g., if you have and , you cannot add as a third independent generator).
  4. No -I: The group generated by the cannot contain . This means no product of a subset of generators can equal .

Example 1: The 3-Qubit Bit-Flip Code

Let's formalize the code from our previous lesson.

  • Physical Qubits:
  • Generators: Let's choose and .
  • Check the rules:
    1. Pauli Elements: Yes.
    2. Commute: and are products of only and operators, so they trivially commute.
    3. Independent: Yes, .
    4. No -I: The group is . None of these is .
  • Result: We have qubits and generators. This implies . It is a code, as we knew. The code space is the set of states where and , which you can verify are spanned by and .

Example 2: The 5-Qubit Perfect Code

This code is a preview of our next lesson. It is a code, so it uses physical qubits to encode logical qubit, and requires generators. Here they are:

Let's check if and commute using our trick:

  • Qubit 1: and (commute)
  • Qubit 2: and (anti-commute)
  • Qubit 3: and (commute)
  • Qubit 4: and (anti-commute)
  • Qubit 5: and (commute)
    There are two positions where the operators anti-commute. Since 2 is an even number, and commute overall. You can (and should!) verify this for other pairs.
Test your understanding!

Consider the following set of two operators on three qubits:

Do these operators form a valid set of generators for a stabilizer code? If so, what are the parameters of the code?

Show answer

Let's check the rules:

  1. Pauli Elements: Yes.
  2. Commutativity:
    • Qubit 1: and (anti-commute)
    • Qubit 2: and (anti-commute)
    • Qubit 3: and (commute)
      The operators anti-commute on 2 positions. Since 2 is even, and commute. So this rule is satisfied.
  3. Independence: Yes, is not a multiple of .
  4. No -I: The group is . None of these is .

Yes, they form a valid set of generators. The parameters are physical qubits and generators, which means it is a code, encoding logical qubit.

Conclusion

Today we have made a significant leap from constructing specific codes to understanding the general principles that govern them. The stabilizer formalism is a cornerstone of quantum error correction.

Key Takeaways:

  • A quantum code can be defined as the common +1 eigenspace of a set of commuting operators, called the stabilizer group .
  • The stabilizer is an abelian subgroup of the n-qubit Pauli group that does not contain .
  • A stabilizer is conveniently described by a minimal set of independent generators.
  • For a code on physical qubits, a set of independent generators defines a -dimensional code space, thus encoding logical qubits. This is an code.
  • To construct a code, one must choose a set of generators that are independent and mutually commuting.

Preview of the next lesson:
Now that we have the theoretical language to describe a code like the 5-qubit perfect code, our next step is to use it. We will see how measuring the stabilizer generators reveals a syndrome that diagnoses which error has occurred, allowing us to correct it. We will implement the syndrome measurement circuits for the 5-qubit code and use the outcome to restore the quantum state.

Can't find a good explanation? Sign up and we'll make it for you

Sign up