Math 2.0

Computer science Randomized, circuit, counting and interactive complexity Theorem

Grover's algorithm

Builds on Quantum Turing machineFunction

Statement

Let N≥2N \ge 2 and let f ⁣:{0,1,…,N−1}→{0,1}f \colon \set{0, 1, \ldots, N-1} \to \set{0, 1} be a function with exactly one ww such that f(w)=1f(w) = 1. Suppose ff is given as a quantum oracle ∣x⟩↦(−1)f(x)∣x⟩\lvert x \rangle \mapsto (-1)^{f(x)} \lvert x \rangle. Let θ=arcsin⁡(1/N)\theta = \arcsin(1/\sqrt{N}), and let rr be the integer nearest to π/(4θ)−1/2\pi/(4\theta) - 1/2. Then a quantum algorithm makes rr queries to the oracle and finds ww with probability at least 1−1/N1 - 1/N. Here r≤πN/4r \le \pi \sqrt{N} / 4.

Remarks

The algorithm starts from the uniform superposition ∣s⟩=N−1/2∑x∣x⟩\lvert s \rangle = N^{-1/2} \sum_x \lvert x \rangle. Each iteration applies the oracle and then the reflection 2∣s⟩⟨s∣−I2 \lvert s \rangle\langle s \rvert - I. Together these two reflections rotate the state by an angle 2θ2\theta in the plane spanned by ∣s⟩\lvert s \rangle and ∣w⟩\lvert w \rangle. So after rr iterations the state makes angle (2r+1)θ(2r+1)\theta with the axis orthogonal to ∣w⟩\lvert w \rangle. The choice of rr makes this angle differ from π/2\pi/2 by at most θ\theta, so the success probability is at least cos⁡2θ=1−1/N\cos^2 \theta = 1 - 1/N.

Example: for N=4N = 4 one has θ=π/6\theta = \pi / 6, and a single iteration rotates ∣s⟩\lvert s \rangle from angle π/6\pi/6 to angle π/2\pi/2. So one query finds ww with certainty, while a classical search needs up to three queries.

Any classical algorithm needs about N/2N/2 queries on average. Bennett, Bernstein, Brassard and Vazirani proved that every quantum algorithm needs Ω(N)\Omega(\sqrt{N}) queries, so the speedup is optimal.

Going deeper

For a student

Grover's method is an instance of amplitude amplification: two reflections, one about the marked states and one about the start state, rotate the state toward the answer. The same idea speeds up any algorithm that succeeds with small probability pp, using about 1/p1/\sqrt{p} repetitions instead of 1/p1/p. Applied to brute-force search, it gives a quadratic speedup for NP problems such as SAT. It does not put NP inside BQP, because 2n\sqrt{2^n} is still exponential.

Reading path

To understand this page from the ground up, read these 15 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Element definition
  2. Proposition concept
  3. Quantum Turing machine concept
  4. Set definition
  5. Implication definition
  6. Predicate definition
  7. Ordered pair definition
  8. Existential quantifier definition
  9. Universal quantifier definition
  10. Cartesian product definition
  11. Subset definition
  12. Uniqueness quantifier definition
  13. Binary relation definition
  14. Function definition
  15. Grover's algorithm statement

Further reading

  1. Web https://en.wikipedia.org/wiki/Grover%27s_algorithm
About this page
TagK9QPQH4YKY
URIm2://K9QPQH4YKY
Kindstatement, theorem
WritingW0 stub
MSC68Q12, 81P68
StatusThis copy of the site has no build data. Run m2 status K9QPQH4YKY.
AboutQuantum complexity class BQP
UsesQuantum Turing machine, Function
Same as
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.