Short answer: Grover's algorithm searches an unordered set in about the square root of N queries, and lower-bound proofs show no quantum algorithm can do better. Course notes show a bound of order the square root of N queries using the adversary and polynomial methods, so Grover is optimal up to a constant. A 2008 paper gives a bound proving Grover's algorithm is exactly optimal, meaning no routine can be even a fraction faster. This is query-complexity theory in the black-box model.
The search problem
The 2023 course notes from the University of Wisconsin describe the task: given a black-box function f on n-bit strings, find an x with f(x) equal to 1, or report that none exists. Grover's algorithm solves this with bounded error using order the square root of N queries. The notes say that after seeing quantum gains from polynomial to exponential, the natural question is whether better quantum algorithms exist.
An asymptotic lower bound
The notes discuss two methods for quantum query lower bounds, the adversary method and the polynomial method, and use either to establish a lower bound of order the square root of N queries for quantum search. This matches Grover's upper bound up to a constant factor. They add that both techniques give the same bound even for the weaker problem of distinguishing a function with no marked element from one with exactly one.
Exact optimality
A 2008 arXiv paper recalls that the optimality of Grover's algorithm has been established through many approaches: adversarial arguments, degree of polynomials, hybrid arguments, Kolmogorov complexity and spectral decompositions. It points out that these show only asymptotic optimality. They do not exclude, for example, another quantum algorithm that is 10 percent faster than Grover's. The paper says exact optimality was already known through earlier work by Zalka, and gives a new lower bound in the query model that proves it. Like existing methods, it bounds the information gained from a single oracle query, but does so in terms of angles. The authors say this makes the proof simple, self-contained and based on elementary mathematics, while giving an exact bound.
Why this matters
The 2008 paper observes that because Grover's algorithm has so many positive applications, it is natural to ask whether a faster routine could replace it, and it states that the unanimous answer is that no better algorithm exists for searching unordered structures on a quantum computer.
What this does not tell you
The bounds are in the query model, where a function is a black box and only queries are counted. They do not apply to structured search problems where a specific algorithm can use the structure, and they say nothing about how many gates a real machine needs per query.
FAQ
How many queries does Grover's algorithm use?
Order the square root of N for an unordered set of N items.
Can a quantum algorithm do better?
Not in the black-box model, according to the lower bounds.
What does exactly optimal mean?
No algorithm can be even a constant fraction faster, as opposed to only matching up to a constant factor.
Which methods prove the bound?
The adversary and polynomial methods in course notes, and an angle-based argument in a 2008 paper.
Does this cover all search problems?
No. It covers unstructured search with a black-box oracle.
All field notes