Skip to content
Grover search

Grover search

April 1, 2025

Grover’s algorithm finds a marked item in an unstructured database of size NN using O(N)O(\sqrt{N}) oracle queries, classically O(N)O(N) in the worst case.

Oracle and diffusion

You implement an oracle that flips the phase of “good” states, then apply a diffusion operator that reflects amplitudes about the average.

The exact iteration count depends on the number of marked items. Too many Grover iterations can overshoot the desired state.

Next

Shor’s algorithm