The Exercise
The exercise concerns syndrome measurement for two codes, the five qubit code and Shor’s nine qubit code. Each code is given by a list of generators, tensor products of Pauli matrices on the code’s qubits, and the syndrome is read one generator at a time. An ancilla qubit is prepared in beside the code’s qubits, and a circuit acts on both. If the state of the code’s qubits is an eigenstate of the generator with eigenvalue , for a bit , the circuit must leave the ancilla in and the code’s qubits in . A measurement of the ancilla in the computational basis then gives the syndrome bit .
The library states this for every generator of both codes, with one circuit built the same way from each generator.
A Quantum System
A quantum system is a physical system whose state space is a finite dimensional complex Hilbert space.✦ Every such space is the state space of a system, the system modelled on .✦ The qudit with levels is the system modelled on with its standard inner product✦; the qubit is the qudit with two levels✦, and the qudit with levels is a register of qubits. The composite system of two systems and is the system whose state space is the tensor product of their state spaces.✦
A pure state of is a unit vector in the state space of , .✦ For pure states of and of , the product state is the pure state of whose vector is the tensor product of the two vectors.✦ The basis states and of the qubit are the pure states whose vectors are the standard basis vectors and of .✦
A unitary of is an operator on the state space of with .✦ It carries a pure state of to the pure state .✦ The identity evolution of is the unitary .✦ For two unitaries and of , the composite is the unitary of that applies first and then .✦ For a unitary of and a unitary of , the product unitary is the unitary of whose operator is the tensor product of the two operators✦; with it is the gate , which acts with on the first factor alone.✦
An observable on is a self adjoint operator on the state space of , .✦ A pure state of is an eigenstate of with eigenvalue , a real number, when .✦
Pauli Strings
The Pauli matrices are the four complex matrices (1)✦ For a choice of one label in for each of qubits, the Pauli string is the operator on the qubits whose matrix, with rows and columns labelled by strings and of bits, has the entries (2)✦ With and read as binary numbers from to , is a matrix on , the state space of the register of qubits.✦ A Pauli string is written as a word, for , or by the qubits on which it is not the identity, for .
A Pauli string is Hermitian. For a Pauli string on qubits and a real coefficient , the observable on the register of qubits is the operator whose matrix is times that of ; with it is the observable .✦
The Syndrome Circuits
The Hadamard gate is the unitary of the qubit whose matrix is (3)✦ For a unitary of a system , the controlled gate is the unitary of the composite system of a control qubit and the target whose operator is (4)✦
The measurement circuit of is the unitary of the control qubit and that applies a Hadamard gate to the control alone, then , then a second Hadamard gate to the control alone.✦ For a Pauli string on qubits, the syndrome circuit of is the measurement circuit of the observable , taken as a unitary of the register: (5)✦
The five qubit code has the four generators of Figure 10.12, each the one before it shifted cyclically one place to the right: (6)✦ Its syndrome circuits are the four unitaries of a control qubit and a register of five qubits (7)✦
Shor’s code has eight generators on nine qubits: six of type, against bit flips within each block of three qubits, and two of type, against phase flips between the blocks, (8)✦ On a control qubit and a register of nine qubits, the syndrome circuits of Shor’s code are (9)✦
The Claim
Theorem 1. Let be a bit. For each generator of the five qubit code, if a pure state of five qubits is an eigenstate of the observable with eigenvalue , then (10)✦ For each generator of Shor’s code, if a pure state of nine qubits is an eigenstate of the observable with eigenvalue , then (11)✦
What Is Checked
The two claims are stated over the syndrome circuits (7) and (9), each the circuit (5) of one generator, applied to the product state of the ancilla’s with a pure state of the code’s register, and over the eigenstates of each generator as an observable.
The library proves that every Pauli string squares to the identity, ✦, which makes the observable a unitary of the register, and that the controlled gate of (4) is unitary for every unitary .✦