A query is one evaluation of a black-box function or oracle on a supplied input. In quantum search, the goal is to find an input x₀ such that f(x₀) = 1 using as few queries as possible. section 7.0
Queries support generic search when the function's internal structure is unavailable:
- The oracle accepts an n-bit input and returns the deterministic value 0 or 1. section 7.0
- A constraint-satisfaction problem can encode each variable assignment as x, returning 1 when all constraints hold and 0 otherwise. section 7.0
- Query complexity measures how many function evaluations an algorithm needs while remaining independent of the oracle's internal implementation. section 7.0
