Back to Learn
Intermediate
AlgorithmsGrover's Algorithm: Quadratic Speedup for Search
11 min read 9 views 0
Grover's algorithm, proposed by Lov Grover in 1996, provides a quadratic speedup for unstructured database search.
The Problem
Given an unsorted database of N items, find the one marked item. Classically, this requires O(N) queries on average. Grover's algorithm needs only O(√N) queries.
How It Works
- ▸Initialize n qubits in equal superposition: |s⟩ = (1/√N) Σ|x⟩
- ▸Apply the Grover operator O(√N) times:
- ▸Oracle: marks the solution by flipping its phase
- ▸Diffusion: reflects the state about the average amplitude
- ▸Measure — the solution is found with high probability
Amplitude Amplification
Each Grover iteration rotates the state vector ~2/√N radians toward the solution. After √(N)·(π/4) iterations, the solution amplitude is maximized.
Applications
Grover's algorithm provides quadratic speedup for any problem solvable by checking each candidate — including NP problems like SAT and optimization.
grover
search
amplitude amplification
oracle