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.
Let ∣s⟩=H⊗n∣0n⟩, let Uf be the marked-state phase oracle, and replace reflection about ∣0n⟩ by reflection about a known computational basisvector ∣y⟩. Define Ty=⨂j=0n−1Zjyj, so Ty∣x⟩=(−1)x⋅y∣x⟩ and H⊗n∣y⟩=Ty∣s⟩. The resulting Grover iterate obeys
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.
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 ∣⟨ϕ∣ψ⟩∣.
The data state receives a minus sign precisely on the basisvectors spanning G, while the ancilla remains unchanged and unentangled. One oracle call realizes the reflection. By linearity it is the marked-state phase oracle
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
Interpret a function collisionas two distinct inputs with equal outputs. Without distinctness the request is vacuous, since an input paired with itself always qualifies. Set m=⌈N1/3⌉ (handling small N by direct queries), choose a known set A of size m, and query all its inputs. Store a classical table of their outputs and corresponding inputs. If this table contains a function collision, return it immediately.
Otherwise the table contains m distinct outputs. Because g is exactly two-to-one, each a∈A has exactly one partner in B, the known complement of A. None lies in A, and different table outputs have different partners. Thus exactly m inputs in B, of size L=N−m, satisfy the known-table membership predicate
Build a marked-state phase oracle for this predicate by a compute-phase-uncompute construction: use Ug on a clean answer quantum register, reversibly compare its output against the classical table, apply the conditional minus sign, undo the comparison, and apply Ug again. Since the answer operation is bitwise exclusive or, Ug−1=Ug. All workspace returns to zero, and each phase query costs two calls to Ug.
Perform known-subset Grover search in the span of the computational basis states labelled by B, starting in their uniform superposition state. Reflection about this known state uses no Ug queries; choosing Aas an initial interval makes Ba known interval that can also be encoded by its own L labels. Its marked fraction is m/L, so the previous Grover rotation angleanalysisuses O(L/m) phase queries. On measuring b, one further Ug query checks the output and retrieves its partner a from the table. The inputs are distinct because the two sets are disjoint.