Grover's Algorithm: Unstructured Database Search
Explore the quantum search algorithm that provides a quadratic speedup over classical searches.
QWiki Team 1 min read
#algorithms#search#grovers#speedup
Explore LabsIntroduction
Grover's algorithm, designed by Lov Grover in 1996, is a quantum algorithm that solves the problem of searching an unstructured database or solving an inverted function with entries in steps.
The Speedup
- Classical: Searching an unsorted database of size requires checking entries one by one, resulting in a linear time complexity of on average.
- Quantum: Grover's algorithm solves this in evaluations, representing a quadratic speedup.
Core Steps
Grover's algorithm does not look at all entries at once, but rather amplifies the probability amplitude of the correct state through iterative geometry:
- State Initialization: Prepare an equal superposition of all database indices.
- Grover Iteration (repeated times):
- Oracle: Flips the phase of the target state ().
- Diffusion Operator (Inversion about the mean): Reflects all amplitudes about the average amplitude, amplifying the target and dampening the others.
- Measurement: Measures the register, yielding the target index with near-100% probability.