The Exercise
Grover’s algorithm on two qubits searches the four basis states , , and for the one that an oracle marks, and a single iteration finds it. The iteration applies the oracle , which changes the sign of the marked state, then Hadamard gates on both qubits, then the conditional phase shift , which changes the sign of every basis state except , and Hadamard gates on both qubits once more.✦
In a nuclear magnetic resonance experiment the qubits are two coupled nuclear spins. Every gate becomes a sequence of radio frequency pulses, each a rotation of one spin about the axis or the axis, and of periods in which the spins evolve freely under their coupling. The exercise is to show that, for each of the four marked states, the iteration shortens to two periods of free evolution, each followed on every spin by a pulse about the axis and then a pulse about the axis.
Pulses on Two Spins
The library defines each gate of the iteration as a pulse sequence and states the shortening as four identities between operators on the two spins, one for each marked state.
For a real vector in three dimensions and a real angle , the rotation about is the operator on one qubit (1) where , and are the Pauli matrices. The pulses are the rotations about and , written and .
In a product of operators the rightmost factor acts first. For a real angle , the sandwich is the operator on one spin that places a rotation by about between two rotations about , (2)✦ On one spin the Hadamard pulse is the operator (3) and on the two spins the Hadamard pair is (4) the first factor of a tensor product acting on spin 1 and the second on spin 2.
Fix an operator on the two spins, in the experiment the free evolution over one period. For real angles and the oracle pulse and the conditional phase shift are the operators on the two spins (5) (6) With the oracle pulse , the Grover iteration in pulse form is the operator on the two spins (7)
For real angles and the shortened sequence is the operator on the two spins (8)✦
The Claim
The oracle that marks takes where and where .
Theorem 1. Let be any operator on the two spins. For the marked states , , and in turn, the Grover iteration in pulse form and the shortened sequence satisfy (9)✦ (10)✦ (11)✦ (12)✦
What Is Checked
The claim is stated over the Grover iteration in pulse form (7), assembled from the pulses (2) to (6), and over the shortened sequence (8).