The Exercise
In nuclear magnetic resonance, two qubits are two coupled spins, and two kinds of operation act on them. A pulse rotates one qubit about the axis or the axis by any angle. Between pulses the pair evolves under the coupling Hamiltonian , with the coupling constant and , the Pauli operators of the two qubits.
The exercise is to build the SWAP gate, which exchanges the states of the two qubits, from these operations alone: a sequence of pulses and periods of coupled evolution, each period lasting a time with , that acts on every state of the pair as SWAP does.
Two Qubits
A quantum system has as its state space a finite dimensional complex Hilbert space.✦ The qubit is the system whose state space is , with computational basis , .✦ The composite system of two systems and has as its state space the tensor product of theirs; in the pair of qubits, qubit 1 is the first factor and qubit 2 the second.✦
A state of is a positive operator of unit trace on the state space of .✦ A unitary of is an operator on the state space of with .✦ Under a unitary of , a state of evolves into the state (1)✦
For two unitaries and of , after is the unitary : first , then .✦ For a unitary of and a unitary of , the product unitary of is the tensor product of the two operators.✦ With the identity evolution on the other factor, a gate on the first factor is and a gate on the second is .
The SWAP of two copies of a system is the unitary of given by the isometry of its state space onto itself that exchanges the two factors: for vectors and of the state space of , (2)✦
Pulses and the Coupling
The Pauli matrices are (3) For a real vector in three dimensions, , and the rotation about by an angle is the matrix (4) written when the axis is a unit vector .
The pulses are the rotation gates and , the unitaries of the qubit whose matrices in the computational basis are and , with and .
An observable of a system is a self adjoint operator on the state space of .✦ For observables of and of , the tensor product is an observable of .✦ On the qubit every is an observable, the Pauli observable along , and along it is the observable . The coupling Hamiltonian of the two spins, with a real coupling constant , is the observable of the pair (5)✦
A Hamiltonian of a system generates its propagator from time to time , the unitary (6)✦ that takes the state at to the state at . Here is the reduced Planck constant; in units with , the coupling acting from time to time is .
The Circuit
Pulses alone give a Hadamard gate and a rotation about , (7) with products read from right to left, so that acts first. Up to a global phase, which the evolution (1) of a state does not see, these are the Hadamard gate of the book and the rotation .
The coupling, run for a time after a rotation of each qubit, gives (8)✦ For this is the controlled gate, up to the phase . Hadamards on the target turn it into a controlled NOT gate, with the control on qubit 1 or on qubit 2, (9) the first index naming the control. The circuit is built from three controlled NOT gates, the middle one with control and target reversed, (10)✦ a unitary of the pair for every and , which enter it through the three controlled gates.
The Claim
Theorem 1. Let and be real numbers with , and let be the circuit (10) with coupling constant and coupling time . Then every state of two qubits evolves under as under the SWAP: (11)✦
What Is Checked
The claim is stated over the circuit of (10) and the SWAP (2) of two qubits, each acting on a state of the pair by (1).
For a unitary and a state , the operator is again a state.