Grover search rotates a uniform state toward a marked subspace and finds one of marked entries using order oracle calls.
For both oracle phases equal to , the good/bad matrix is . Acting times on the initial vector yields success . For , the first crossing of one half is the displayed integer, since the rounded angle stays between and . With this is asymptotic to . Iterating indefinitely is incorrect: the success oscillates after its first maximum.
Take normalized states with real positive overlap . The eigenvectors proportional to have energies . With , their relative phase changes by after the displayed time, giving . For a uniform search state and one marked basis vector in dimension , , so the time is proportional to . Implementing the marked projector assumes access to a search oracle; the formula does not supply oracle information for free.
Let , let be the marked-state phase oracle, and replace reflection about by reflection about a known computational basis vector . Define , so and . The resulting Grover iterate obeysbecause the two diagonal operators commute. Thus the good and bad uniform vectors are replaced by their signed vectors , with exactly the same Grover rotation angle. Initializing in gives . Computational-basis measurement probabilities are unchanged because only multiplies amplitudes by signs.
Under the promise of either no marked entry or one marked entry in an -element Boolean quantum oracle search space, run the Grover search algorithm for the displayed number of iterations, measure a candidate, and make one additional oracle query to check it. Since , the marked-entry success probability is at least . For this is at least . If no entry is marked the verification never accepts, so there is no false positive. The query count is because . Measuring a candidate without verification would not determine whether a marked entry exists.
For a permutation of an -element set and a known marked output subset of size , exactly inputs have marked outputs. The uniform quantum superposition thus has good probability , independent of which permutation the oracle represents. This allows a known-angle amplitude amplification schedule without counting unknown preimages.
To find an input of a permutation whose output lies in a known -element subset, compute the output, apply its marked-state phase oracle, and use uncomputation. A modular-addition quantum oracle costs two forward queries per marked reflection, because modular-oracle inversion by negation supplies its inverse. Amplitude amplification then uses queries for fixed success probability. Positive-square outputs have and hence query cost .
For a known finite set , prepare the uniform superposition state and implement its reflection operator . If exactly basis states in are marked, the same two-dimensional Grover rotation angle argument uses phase queries. Preparation and reflection are known operations with no calls to the unknown predicate. Their gate cost must be accounted for separately. The success guarantee requires , and choosing the optimal iteration number uses a known .
Suppose a known list of distinct -bit strings is available and computational basis transpositions on qubits have polynomial-size implementations. Start with the uniform superposition state of index labels , leaving the data zero. First swap with for each nonzero . Next, for each , swap with . Distinct index labels separate the first-stage pairs, and distinct data strings separate the second-stage pairs. Thus no later transposition disturbs an earlier term. At most transpositions prepare the uniform data state and return the quantum ancilla to zero. For the quantum circuit has polynomial size. This assumes the list is available; a membership predicate alone does not supply it.
The diffusion operator sends every computational-basis amplitude to , where is their arithmetic mean.
If of items are marked and , each Grover iteration rotates the state by in the marked--unmarked plane, so after iterations the marked amplitude is .
If the marked fraction is and , the success probability after Grover search algorithm iterations is . For , its first value at least occurs atBefore this integer the angle is below , so success is below . At this integer, the angle lies in , contained in , where squared sine is at least . If , no iteration is needed. For small , is asymptotic to .
For one marked element among candidates, set . The first nonnegative Grover search algorithm iteration count attaining marked probability at least is the displayed integer. Before the first success interval, the angle is below ; entering that interval requires . Rounding up gives an angle less than , so it cannot skip the interval. Moreover . For , the known candidate is already the answer and no iteration is needed; the two-dimensional marked--unmarked plane degenerates.
Articles by others on the same topic
Grover's algorithm is a quantum algorithm developed by Lov Grover in 1996. It provides a way to search an unsorted database or an unordered list of \( N \) items in \( O(\sqrt{N}) \) time, which is a significant speedup compared to classical algorithms that require \( O(N) \) time in the worst case. The basic idea of Grover's algorithm is to use quantum superposition and interference to efficiently find a specific item from the database.