The Exercise
One qubit is in an unknown pure state and a second is prepared in . Two controlled NOT gates swap them: one controlled by the first qubit flips the second, then one controlled by the second flips the first, and the pair ends in .✦
The same transfer can be made in either of two circuits, each with a single controlled NOT, a Hadamard gate, a measurement of the first qubit in the computational basis and a Pauli gate on the second qubit applied when the outcome is . In the first, the controlled NOT is followed by a Hadamard on the first qubit, and the correction is . In the second, a Hadamard on the second qubit precedes a NOT on the first controlled by it, and the correction is . Whichever outcome is observed, the first qubit is left in and the second carries .
Two Qubits
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.✦ The qubit is the two level system whose state space is itself, and a pair of qubits is the composite system .✦
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 ✦; a pure state determines the state , the projector onto its vector.✦ The computational basis states and of are the pure states whose vectors are 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 vectors.✦
Gates and Circuits
A unitary of is an operator on the state space of with , where is the identity operator.✦ It carries a pure state of to ✦, and a state of to (1)✦
For unitaries and of , the unitary applies first and then .✦ For a unitary of and a unitary of , the product unitary of is the tensor product of the two operators✦; with the identity unitary , the gate acts with on the first factor alone✦ and with on the second.✦ The SWAP of is the unitary of that exchanges the two factors, .✦
The Hadamard , the NOT and the phase flip are the unitaries of whose matrices in the computational basis are (2)
For a unitary of , the controlled gate is the unitary of , with the qubit as control and as target, given by (3)✦ The controlled NOT on is , with its control on the first qubit and its target on the second.✦ The controlled NOT on , with its control on the second qubit and its target on the first, is the controlled NOT conjugated by the SWAP of the two qubits, (4)✦
The swap circuit of two controlled NOTs and the circuits and with a single controlled NOT are the unitaries of (5)✦ (6)✦ (7)✦
Measurement and Correction
A measurement on with a finite set of outcomes is a family of measurement operators on the state space of , one for each outcome , satisfying the completeness relation .✦ Its effects are positive and form the positive operator valued measure (POVM) of the measurement.✦ On a state of the outcome occurs with probability (8)✦ and when the state after the outcome is (9)✦
The projective measurement of in an orthonormal basis of its state space is the measurement whose operators are the projectors .✦ For a measurement on and a further system , the measurement on the first factor of is the measurement with the same outcomes and the operators .✦ The measurement of the control qubit on is the projective measurement of in the computational basis, made on the first factor; its operators are (10)✦ For a unitary of , the classically controlled gate is the unitary of that is the identity when the measured bit is and when it is .✦
The Claim
Theorem 1. Let be a pure state of . Then (11)✦ For , let and let be its state. Let be an outcome of the measurement (10) of the control qubit whose probability on , as in (8), is not zero, and let be the state after it, as in (9). Then (12)✦ (13)✦
What Is Checked
The claim is stated over the pair of qubits and the product pure state ; over the circuits (5), (6) and (7), built from the gates (2), the controlled NOTs and the SWAP; and over the measurement (10) of the control qubit, the state (9) after its outcome and the classically controlled corrections and .
The library proves that in (3) is unitary for every unitary of every system, , so that and in (4) are unitaries of .✦ It proves too that a state conjugated by a unitary as in (1) is again a state, and that the state (9) after an outcome of nonzero probability is a positive operator of unit trace.