The Exercise
A classical linear code on bits is described by a parity check matrix , a matrix of bits. The syndrome of a string of bits is the string of bits with entries (1) The exercise asks for a quantum circuit made of controlled NOT (CNOT) gates alone that takes data qubits in the basis state and ancilla qubits in to .
A Register of Qubits
A quantum system is a physical system whose state space is a finite dimensional complex Hilbert space.✦ A pure state of is a unit vector in the state space of .✦ The closed evolutions of are its unitaries: a unitary of is an operator on the state space of with ✦, and it acts on pure states by ✦.
The qubit is the two level system whose state space is .✦ The computational basis states and of the qubit are the two standard basis vectors of .✦
The composite system of systems , one for each in a finite index set, is the system whose state space is the tensor product of the state spaces of the .✦ The product of pure states of the factors is the pure state of the composite whose vector is the tensor product of theirs.✦ The register of qubits is the tensor power of the qubit, the composite of copies of .✦ The computational basis state of for a string of bits is the product (2)
Controlled NOT Gates
A multiply controlled NOT gate on wires, the positions of a string of bits, is a set of control wires together with a target wire .✦ The control bit of on a string of bits is when carries a on every wire of and otherwise, the product .✦ The gate takes to the string in which the control bit has been added to the bit on the target wire modulo : (3)✦ With one control it is the CNOT, and with two the Toffoli gate.
The classical action of a circuit of such gates on a string of bits applies the gates in turn, first: (4)✦
The Claim
The wires of a circuit on wires are the qubits of the register , the first holding the data and the last the ancillas. For a string of bits, is the basis state (2) of the string with on the data and zeros on the ancillas, and the one with the syndrome (1) on the ancillas.
Theorem 1. Let be a matrix of bits. There are a circuit on wires whose gates are CNOTs, each with a single control wire and a different target wire, and a unitary of the register that acts on every computational basis state as the circuit does, for every string of bits, and that computes the syndrome: for every string of bits, (5)✦
What Is Checked
The claim is stated over the register , the tensor power of the qubit, with its computational basis states (2) formed as products of the qubit states and , and over a unitary of the register acting on them.
The library proves that the composite of finitely many systems has a finite dimensional state space, the products of basis vectors of the factors forming a basis of it, and that a product of pure states is a unit vector there, its squared norm being the product of the squared norms of the factors. It proves as well that is a unit vector whenever is, since a unitary preserves norms.