The Exercise
The three qubit bit flip code stores a state of one qubit, with , in three qubits. Two more qubits, each prepared in , are placed beside it, and the encoding circuit acts on all three. The exercise is to verify that the circuit returns .
A Quantum System
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 , , determined physically up to a global phase.✦ The superposition of two orthogonal pure states and of , with complex amplitudes and such that , is again a pure state of .✦
The composite system of two systems and is the system whose state space is the tensor product of their state spaces.✦ Given pure states of and of , the product is the pure state of given by the tensor product of the two vectors.✦
The Qubit
The qubit is the two level system whose state space is .✦ The basis state of the qubit, for a bit , is the pure state given by the standard basis vector of ; and are the computational basis states.✦ With amplitudes and such that , the qubit state (1)✦ is the superposition of the two basis states.
The state space of three qubits is , and stands for the product state . The bit flip codeword with the amplitudes and of (1) is the pure state of three qubits (2)✦
Unitaries and Controlled Gates
A unitary of a quantum system is an operator on the state space of with , where is the identity; it is a closed system evolution of ✦, and it carries a pure state of to the pure state ✦. The identity is itself a unitary of , the identity evolution.✦ Two unitaries and of compose to the unitary , first then .✦ When is a unitary of and one of , the product unitary of is the tensor product of the two operators.✦
The Pauli of the qubit, the quantum NOT, is the unitary whose matrix in the computational basis is (3)✦
Let be a unitary of a system . The controlled gate on the composite of a control qubit and the target is (4)✦
The Encoding Circuit
The encoding circuit is the unitary of three qubits (5)✦ in which both controlled gates take the first qubit as control and the other two as target. The gate that acts first, , is a controlled NOT on the third qubit, and is a controlled NOT on the second.
The Claim
Theorem 1. Let and be complex numbers with . The encoding circuit , applied to the pure state of three qubits in which the first is in the state and the other two are in , gives the bit flip codeword: (6)✦
What Is Checked
The claim is stated over the encoding circuit (5), built from the controlled gate (4), the Pauli and the identity evolution, over the product input state and the codeword (2), and over the action of a unitary on a pure state.
The library proves that the matrix (3) is unitary, and that is unitary for every unitary of every system.