Quantum Computing Glossary

Stabilizer code

What are stabilizer codes?

Quantum stabilizer codes are a particular instance of Quantum Error Correcting codes. They generalize the idea of classical linear error-correcting codes to the quantum domain. 

Formally, a stabilizer code is constructed through a set \(S\) of commuting Pauli operators, that does not contain \(-I\) (with \(I\) the identity matrix). These operators define the codespace, i.e. the set of \(n\)-qubit quantum states that encode logical information or logical states, as

$$C = \{|\psi\rangle, \forall g \in S, g|\psi\rangle=|\psi\rangle\}$$ 

Elements in the codespace are therefore stabilized by the operators in \(S\) which gives the name stabilizer code to the construction. The set \(S\) forms a group, in the mathematical sense, since products and inverses of stabilizers are also stabilizers. Remarkably we can exhibit a minimal set of \(n-k\) operators called the stabilizer generators that are enough to describe the entire group \(S\).  

Another group of interest is the normalizer group \(P\). It contains all the Pauli operators that commute with every element of \(S\), but that are not in \(S\) themselves. This group describes the logical information content of the stabilizer code. We can show that for a stabilizer group with \(n-k\) generators, the normalizer group is equivalent to a \(k\)-qubit Pauli group. Intuitively, this means that the stabilizer code encodes \(k\)-qubit worth of logical information into n physical qubits. 

A simple example: the \([[4,2,2]]\) Toric code 

The \([[4,2,2]]\) Toric code is defined on \(n=4\) physical qubits through 2 stabilizer generators \(X_1 X_2 X_3 X_4\) and \(Z_1 Z_2 Z_3 Z_4\). It encodes \(k=2\) logical qubits and a basis of the codespace is spanned by

$$|\overline{00}\rangle=(|0000\rangle+|1111\rangle)/\sqrt{2},$$ 

$$|\overline{01}\rangle=(|0011\rangle+|1100\rangle)/\sqrt{2},$$ 

$$|\overline{10}\rangle=(|0101\rangle+|1010\rangle)/\sqrt{2},$$ 

$$|\overline{11}\rangle=(|0110\rangle+|1001\rangle)/\sqrt{2}.$$   

You can check that the stabilizers leave these states unchanged. The logical Pauli \(X\) and \(Z\) operators are \(X_2 X_4\) and \(Z_1 Z_2\) for the first logical qubit and \(X_1 X_2\) and \(Z_2 Z_4\) for the second logical qubit. For instance, you can check that \(\|\overline{00}\rangle\) becomes \(\|\overline{10}\rangle\) when acted upon by \(X_2X_4\). 

Performing error-detection with stabilizer codes 

Logical states of stabilizer code are, by definition, stabilized by any element of \(S\). This property is highly powerful to detect errors. Indeed, because of the stabilization property, measuring an element of \(S\) should always yield +1. As soon as a -1 is recorded (note that, since elements of \(S\) are Pauli operators, measuring them will yield either +1 or -1), an error has somehow made our state exit the codespace. Measurements of stabilizer generators are called syndromes, and the procedure of measuring stabilizer generators is called syndrome extraction. Syndromes are then used by decoders [insert link to Decoder or decoding] to perform a recovery operation that sends the state back to the codespace.  

Detectable, benign and undetectable errors

Errors can be categorized into three categories with respect to a stabilizer code: 

  • Detectable errors are errors that anti-commute with at least one stabilizer generator. They will therefore flip the corresponding syndrome from +1 to -1 which is detectable. 
  • Benign errors are elements of the stabilizer group. Since these errors are stabilizer operators, they leave the quantum state unaffected and are therefore benign. 
  • Undetectable errors are errors that commute with every element of the stabilizer group, which makes them undetectable, but are not themselves stabilizer operators. These errors do not knock the state out of the codespace but can perturb the information content in an unretrievable way. 

Frequently Asked Questions

  1. How can we measure stabilizer without perturbing the quantum state? Of course, measuring qubits individually and recombining the measurement to deduce the stabilizer measurement is out-of-the-question in the middle of a quantum computation: this would collapse the quantum state. However, we can measure stabilizer indirectly by introducing an additional qubit, entangling the qubits in the support of the stabilizer of interest to the auxiliary qubit, and measuring the auxiliary qubit in the right basis. This performs a projective measurement of the stabilizer operators that does not perturb the quantum state.