There is a quantum algorithm that, for every , outputs an index with with probability at least after queries (Dürr and Høyer, preprint).
The algorithm keeps a threshold index , initially uniformly random. It repeatedly runs the variant of Grover search for an unknown number of marked items (Boyer, Brassard, Høyer and Tapp) on the set and replaces by the index found whenever its value is smaller. Because each improvement is a uniformly random element of the improving set, the expected number of improvements is logarithmic, and the expected total cost of the searches sums to ; running for a fixed budget and repeating times gives the stated success probability.
Applied to optimization over (), the method finds an exact optimum with evaluations of the cost function instead of the of exhaustive search. The search lower bound shows that no quantum algorithm does better than queries without using the structure of , so this quadratic speed-up is the most that black-box quantum search provides; in particular it does not make NP-hard problems polynomial-time.