The three unmarked amplitudes become 1/2−1/2=0, while the marked amplitude becomes 1/2−(−1/2)=1. All three stages have squared norm one. Here sinθ=1/2, so θ=π/6 and one iteration gives sin2(3θ)=1, agreeing with the explicit calculation.
The marked-state phase oracle is an assumed operation, whose implementation cost must be counted. Computational-basis measurement yields a candidate label, here 11; using it to retrieve a record requires the relevant data access. Preparing a quantum superposition does not make all its entries available as classical outputs. The improvement concerns the number of oracle queries needed to obtain an accepted label.
The reflection performs inversion about the mean, ax↦2μ−ax. It therefore sends every unmarked amplitude to zero and every marked amplitude to 2/N. The resulting normalized state is
Initialize the search register in ∣00⟩ and the output qubit in ∣1⟩, then apply H to all three. The search state becomes ∣s⟩=(∣00⟩+∣01⟩+∣10⟩+∣11⟩)/2, and the output becomes ∣−⟩. The oracle obeys
A promise restricts which Boolean functions may be supplied. For the exact one-iteration four-entry search here, promise exactly one marked input. The four functions are fjk(x)=1 precisely when x=jk, for jk∈{00,01,10,11}. Other known numbers of marked entries require a correspondingly chosen iteration count; uniqueness is the promise for this particular exact circuit.
In basis order 00,01,10,11, the requested explicit calculation is
where J is in hertz and Iz=Z1/2, Sz=Z2/2. Resonant pulses and refocusing separate local rotations from the scalarcoupling. For positive J, evolution for t=1/(2J) supplies e−iπZ1Z2/4. Combining it with local Z phases gives the phase oracle
Here ∣−⟩=(∣0⟩−∣1⟩)/2. Since X∣−⟩=−∣−⟩, phase kickback gives Uf(∣x⟩∣−⟩)=(−1)f(x)∣x⟩∣−⟩. The third qubit remains separable and unchanged. A direct marked-state phase oracleOf∣x⟩=(−1)f(x)∣x⟩ therefore replaces the three-qubit query using only two qubits:
This equality follows directly by evaluating the four diagonal entries: the first three are +1 and the 11 entry is −1. Negative J can be handled by refocusing or reversing the effective interaction sign. The global phase can be ignored.
The minus sign is an irrelevant global phase. These two reflections rotate the search state in the span of the marked vector and the unmarked uniform vector, with the Grover rotation angle controlled by the initial marked amplitude. Iterating them approximately π2N/4times gives high-probability search. The same pair of projectors appears additively in the continuous-timeHamiltonian, but the product of full reflections and evolution under their sum are distinct dynamics.
This is aplane rotation through angle −2θ in the displayed coordinate convention, with the invariant good-bad plane preserved by both operators. In particular its action sends (sina,cosa) to (sin(a+2θ),cos(a+2θ)). Induction therefore gives the Grover rotation angleformula
For a single marked entry this is the marked-state phase oracleOa=I−2∣a⟩⟨a∣ on the search register. The ancilla stays separate and unchanged throughout.
The inverse sine here is applied to the overlap of the two different states. The converted TeX's self-overlap in the angledefinition is a transcription error; the original PDF has ∣⟨ϕ∣ψ⟩∣.
Only the first nqubits are measured in the printed circuit. If the untouched ancilla were also measured in the computational basis, its bit would be an independent fair bit, givingprobability 1/(2N) for each joint outcome.
Agood item must exist, so assume 1≤k<N; if k=0, the requested search is impossible, while k=N makes every output good. Put p=k/N and θ=arcsinp. Normalize the good and bad components of the uniform superposition stateas
Thus the Born rule gives Pj=sin2((2j+1)θ). Choose a nonnegative integer j∗ nearest to π/(4θ)−1/2. Rounding changes the angle from π/2 by at most θ, so
is the product of two reflections. It acts asarotation through 2θ in the plane spanned by the marked state ∣x0⟩ and the normalized uniform superposition of unmarked states, where