The Exercise
A unitary acting on some data is measured with an ancilla qubit. The ancilla, prepared in , passes through a Hadamard gate, controls on the data, passes through a second Hadamard and is read out in the computational basis. In the fault tolerant version the ancilla is a cat state of three qubits, each of which controls a copy of the gate on its own block of data, and the result is read from the sign of the cat state under .
The exercise is about phase flips on the ancilla qubits. The data is untouched.
Qubits and Gates
A quantum system is a physical system whose state space is a finite dimensional complex Hilbert space.✦ 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 ✦, and a nonzero vector of that space has the normalized pure state .✦ For pure states of and of , the product state is the pure state of whose vector is the tensor product of the two.✦
The qubit is the two level system whose state space is .✦ Its basis states and are the pure states with the standard basis vectors and .✦
A unitary of is an operator on the state space of with ✦; it carries a pure state of to the pure state .✦ For two unitaries and of , is the unitary of that applies first and then ✦, and the identity is a unitary of every system.✦ For unitaries of and of , the product unitary is the unitary of whose operator is the tensor product of theirs.✦ The gate applies to the first factor alone.✦
The gates of the qubit come from the Pauli matrices and the Hadamard matrix, (1) The Hadamard and the phase flip are the unitaries of the qubit with these matrices. For a unitary of , the controlled gate is the unitary of , a control qubit and the target , given by (2)✦
The Measurement Circuit
For a unitary of , the measurement circuit with a phase error is the unitary of that applies a Hadamard on the ancilla, the controlled gate , a phase flip on the ancilla and a second Hadamard on the ancilla, in that order: (3)✦
Theorem 1. Let be a unitary of a system and a pure state of that leaves fixed, . Then (4)✦
The Cat State
The three qubit register is the composite system .✦ For bits , , , its basis state is the product state .✦ For a bit , the cat state of the register is the normalization of the vector , (5)✦
An observable of is a self adjoint operator on the state space of .✦ A pure state of is an eigenstate of with eigenvalue , a real number, when .✦ For observables of and of , the observable of has for its operator the tensor product of theirs.✦ For a real vector in three dimensions with components , , , the Pauli observable of the qubit is the observable with matrix ✦, and the observable is the Pauli observable of the unit vector .✦ The block observable of the register measures on each of its three qubits.✦
The phase flip on qubit of the register, for , is the unitary of that applies to that qubit and the identity to the other two.✦
Theorem 2. Let be a bit and one of the three qubits of the register. Then (6)✦
The Transversal Coupling
In the fault tolerant measurement each ancilla qubit sits in a block with its own data system. For a unitary of a system , the transversal coupling is the unitary of three such blocks, , in which each ancilla qubit controls on the data of its block: (7)✦ For , the phase error on ancilla qubit is the unitary of that applies to that qubit and the identity everywhere else: (8)
Theorem 3. Let be a unitary of a system and one of the three ancilla qubits. Then (9)✦
What Is Checked
The claim (4) is stated over the circuit , built from the gates and and the controlled gate ; the claim (6) over the cat states, the block observable and the phase flips of the register; and the claim (9) over the transversal coupling and the phase errors .
The library proves that the vector is nonzero for both values of , which makes its normalization, the cat state , a pure state.✦