The Exercise
The fault tolerant Toffoli circuit consumes an ancilla, a fixed state of three qubits prepared ahead of time. The exercise asks for its expansion in the computational basis and for two facts about three gates on the three qubits, each a Pauli operator on one qubit times a controlled operation on the other two. Each of the three leaves unchanged, and up to a global phase no other pure state of the three qubits is left unchanged by all of them.✦
Three Qubits
A quantum system is a physical system whose state space is a finite dimensional complex Hilbert space.✦ The qubit is the two level system with state space .✦ For two systems and , the composite is the system whose state space is the tensor product of theirs.✦ Three qubits form the register , the first qubit composed with the pair of the other two, and the qubits are numbered from the left.
A pure state of is a unit vector in the state space of .✦ A state of is a positive operator of unit trace on the state space of ✦, and each pure state determines the state , the rank one projector onto it.✦ The basis states and of the qubit are the pure states given by the standard basis vectors and of .✦ For pure states of and of , the product is the pure state of whose vector is the tensor product of the two✦, and the computational basis of the register consists of the products (1)✦
Gates
A unitary of is an operator on the state space of with ✦, where is the identity operator; it carries a pure state of to the pure state .✦ For two unitaries and of , the product is the unitary that applies first and then .✦ A pure state of is an eigenstate of a unitary of , with eigenvalue , when , and stabilizes when .✦
The Pauli or quantum NOT, the Pauli or phase flip, and the Hadamard are the unitaries of the qubit with the matrices (2)
For a unitary of and a unitary of , the product unitary of is the one whose operator is the tensor product of the operators of and .✦ With the identity unitary in one of the two places it puts a gate on a single factor: applies to and leaves alone✦, and applies to .✦ On the register a gate on one qubit carries that qubit’s number, (3) and and are formed in the same way.
For a unitary of , the controlled gate is the unitary of , a control qubit followed by the target , given by (4)✦ The CNOT gate is on two qubits✦, and is the CNOT on qubits 2 and 3 of the register, with qubit 2 as control. Taking qubit 1 as control and the pair as target, flips qubit 3 when qubit 1 is ✦, and the controlled on qubits 1 and 2, , takes to .✦ Iterated, the construction gives the doubly controlled gate of a unitary of the qubit, which applies to qubit 3 exactly when qubits 1 and 2 are both ✦; the Toffoli gate is .✦
The Ancilla and Its Stabilizers
The preparation circuit is the unitary of the register that applies a Hadamard to each of qubits 1 and 2 and then the Toffoli gate✦, and the ancilla is the pure state it makes from : (5)✦
The three gates of the exercise are the unitaries of the register (6)✦ (7)✦ (8)✦
The Claim
Theorem 1. The ancilla is (9)✦ and each of the gates , , stabilizes it: (10)✦ (11)✦ (12)✦ If a pure state of the register is stabilized by , and , then (13)✦
What Is Checked
The claim is stated over the ancilla (5), the three gates (6), (7) and (8), the eigenstate condition with eigenvalue , and the state of a pure state; the gates are built from (2), (3) and (4).
About these constructions the library proves that the operator (4) is unitary for every unitary , ✦, and that the matrices (2) are unitary and so give unitaries of the qubit. A product of unitaries is unitary, both and .