The Exercise
Two qubits pass through a controlled-NOT (CNOT) gate , the first qubit as control and the second as target. Write for the Pauli applied to the first qubit with the second left alone, for applied to the second, and , , , in the same way. The exercise asks what each of these six operators becomes when it is sandwiched between two CNOTs, as in ; in every case the answer is a Pauli on one qubit or a product of Paulis on the two. It also asks for two rotations that commute with the CNOT: the rotation about the axis applied to the control, and the rotation about the axis applied to the target.
The library states all eight identities as equalities between unitaries of the two qubits.
Two Qubits
A quantum system is a physical system whose state space is a finite dimensional complex Hilbert space.✦ For such a space there is the quantum system whose state space is , and the qubit is the quantum system whose state space is . The composite system of two systems and is the quantum system whose state space is the tensor product of their state spaces; the exercise takes place in .✦
A pure state of is a unit vector in the state space of , determined physically up to a global phase.✦ The computational basis states and of the qubit are the pure states given by the standard basis vectors and of .✦
A unitary of is an operator on the state space of with , the evolution of as a closed system.✦ The identity evolution of is the unitary .✦ For two unitaries and of , the unitary after is , first and then ; a product such as is a composite in this sense.✦ For a unitary of and a unitary of , the product unitary is the unitary of whose operator is the tensor product of the operators of and .✦
A gate on one factor of a composite system is a product unitary of that acts as the identity evolution on the other factor. For a unitary of and a second system , the gate on the first factor is the unitary of ; for a unitary of , the gate on the second factor is .
The Gates
The Pauli matrices are the complex matrices (1) The Pauli gates , and of the qubit are the unitaries whose operators have the matrices (1) in the computational basis; is the quantum NOT, or bit flip, and the phase flip.
For a real vector in three dimensions, the matrix is , the combination of the Pauli matrices with the components of as coefficients.✦ The rotation about by a real angle is the complex matrix (2)✦ written when the axis is a unit vector . The rotations about the axes and are and . For a real angle , the rotation gates and are the unitaries of the qubit whose operators have these matrices in the computational basis.
For a unitary of a system , the controlled gate is the unitary of , a control qubit together with the target , whose operator is (3) The CNOT gate is the controlled gate on two qubits, which flips the second qubit exactly when the first is .✦
The Claim
A subscript names the wire a gate of the qubit acts on: is on the control, is on the target, and in the same way and .
Theorem 1. Let be the CNOT gate on two qubits, the first the control and the second the target. A Pauli gate on either qubit, placed between two CNOTs, becomes (4)✦ (5)✦ (6)✦ (7)✦ (8)✦ (9)✦ and for every real angle the rotations and commute with : (10)✦ (11)✦
What Is Checked
The identities are stated over the CNOT gate, the controlled gate , and over the Pauli gates and the rotation gates and on either qubit.
About these constructions the library proves that the controlled gate is unitary: for every unitary of a system , the operator (3) satisfies .✦ It proves the same of the composite and of the tensor product of two unitaries.