The Exercise
Let be any unitary acting on one qubit. The gate acts on three qubits and applies to the third exactly when the first two are both in the state .✦ The exercise asks for a circuit that builds , for every , from at most eight one qubit gates and at most six controlled NOT (CNOT) gates.
Qubits and Unitaries
A quantum system is described by its state space, a finite dimensional complex Hilbert space.✦ The composite system of two systems and is the quantum 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 , .✦
The qubit is the two level system whose state space is itself, the standard two dimensional complex Euclidean space.✦ Its computational basis states and are the pure states given by the standard basis vectors and of .✦ Three qubits form the composite system .
A unitary of a system is a closed system evolution of : an operator on the state space of with (1)✦ The identity evolution of is the unitary whose operator is .✦ For unitaries of and of , the product unitary is the unitary of whose operator is the tensor product of the two operators.✦ Acting on the first factor of , a unitary of becomes , with the identity evolution on ; acting on the last factor, a unitary of becomes .
Controlled Gates
For a unitary of a system , the controlled gate is the unitary of , a control qubit followed by the target , with operator (2)✦
The Pauli gate, the quantum NOT, is the unitary of whose operator is the matrix (3) and the CNOT gate is the controlled gate of , with the first qubit as control.
For a unitary of the qubit , the doubly controlled gate is the unitary of obtained by controlling the controlled gate once more, (4)
Three Qubit Circuits
A three qubit circuit is a finite sequence of gates on , whose factors are its wires , and . Each of its gates is either a one qubit gate, a unitary of on one of the wires, or a CNOT from a control wire to a target wire .✦ On the three qubits, a one qubit gate on wire , or is the unitary (5)✦ respectively. The CNOTs from wire to wire , from to and from to are (6)✦ and a CNOT on any other pair of wires is the identity.
If are the unitaries of the gates of a circuit in order, the evolution of the circuit is the product (7) and its gate counts are , the number of its one qubit gates, and , the number of its CNOTs.
The Claim
Theorem 1. Let be a unitary of the qubit . Then there is a three qubit circuit with evolution and gate counts and such that (8)✦
What Is Checked
The claim is stated over the doubly controlled gate (4), built from the controlled gate (2), and over the evolution (7) of a circuit whose gates are the one qubit gates (5) and the CNOTs (6), together with the two counts of its gates.
The library proves that these constructions are unitaries.