Follow the printed examples by counting positive squares, so zero is not marked. For , the marked output set is
A one-to-one map from the finite set to itself is a permutation, so exactly inputs have outputs in . In the uniform quantum superposition , the initial good probability is therefore . For permutation-preimage quantum search, this known marked density under a permutation is .
Define the efficiently computable predicate to be one if and only if is a positive square. The assumed Boolean quantum oracle for , acting on and a ancilla, implements its diagonal sign operation . Compute the modular-addition quantum oracle into a zero output register, apply this sign operation, and uncompute:
This implements for , with the work registers clean. Only forward calls to were promised, but its inverse costs one such call: if on the second register, then
Indeed the output addition is changed into subtraction. Thus each marked reflection costs exactly two queries to ; all other operations used here are independent of the unknown .
Use the amplitude amplification theorem with , whose reflection is allowed by the assumptions. With , choose nearest to . Here for every , so a trial succeeds with probability at least . Also
Measure and use one additional query to evaluate and check . On failure, restart with fresh registers. Four independent trials have failure probability at most , so the required confidence and query bound are
This is an upper bound on quantum query complexity, not a claim that arbitrary reflections or every classical gate have constant cost. Including zero as a square would change to without changing the asymptotic bound. With the printed positive-square interpretation, has no valid output and no algorithm can satisfy the success requirement; the intended asymptotic task necessarily has .
Interpret a function collision as two distinct inputs with equal outputs. Without distinctness the request is vacuous, since an input paired with itself always qualifies. Set (handling small by direct queries), choose a known set of size , and query all its inputs. Store a classical table of their outputs and corresponding inputs. If this table contains a function collision, return it immediately.
Otherwise the table contains distinct outputs. Because is exactly two-to-one, each has exactly one partner in , the known complement of . None lies in , and different table outputs have different partners. Thus exactly inputs in , of size , satisfy the known-table membership predicate
Build a marked-state phase oracle for this predicate by a compute-phase-uncompute construction: use on a clean answer quantum register, reversibly compare its output against the classical table, apply the conditional minus sign, undo the comparison, and apply again. Since the answer operation is bitwise exclusive or, . All workspace returns to zero, and each phase query costs two calls to .
Perform known-subset Grover search in the span of the computational basis states labelled by , starting in their uniform superposition state. Reflection about this known state uses no queries; choosing as an initial interval makes a known interval that can also be encoded by its own labels. Its marked fraction is , so the previous Grover rotation angle analysis uses phase queries. On measuring , one further query checks the output and retrieves its partner from the table. The inputs are distinct because the two sets are disjoint.
Consequently the quantum query complexity is
For large , rounding the optimal Grover search algorithm iteration count gives success at least . An internal table function collision already gives certain success. The balance explains the cube-root choice. This is the Brassard–Høyer–Tapp collision algorithm: its table uses classical bits. The bound counts calls to , as requested; it does not charge table lookup and its reversible implementation as constant-time gates, or claim an overall polynomial time in .
An injective self-map of the finite set is a bijection. For sufficiently large , exactly
outputs satisfy the integer comparison, so there are exactly good inputs. Prepare the uniform superposition state , whose good probability is
Use the phase oracle from the previous part and the reflection . The amplitude amplification theorem requires iterations; each uses two queries, while the state preparation and its reflection are independent of . With the nearest-integer iteration count from that theorem, the failure probability is at most , tending to zero. Therefore the success probability eventually exceeds , with
This is a bound on quantum query complexity; implementation costs of the known gates are not counted as oracle queries.
Quantum collision finding 2026-10-06
Given a function with an -bit output, accessed through the unitary operator , quantum collision finding asks for distinct inputs with equal outputs. Here is bitwise exclusive or on the -bit answer quantum register. The distinctness requirement excludes the uninformative pair . For a two-to-one function on inputs, Grover search algorithm methods yield a cube-root quantum query complexity, despite a square-root cost for finding a partner of just one preselected input.
Quantum complexity theory Created 2026-10-05 Updated 2026-10-06
Quantum complexity theory studies resources needed by quantum circuits and quantum algorithms, including time, workspace, and quantum query complexity. Its models specify which input oracles and gate implementations are available; counting oracle calls is different from counting all elementary gates.