For known good probability , choose . A known reversible preparation of one state with good probability permits ordinary amplitude amplification iterations to reach the good subspace exactly. With ancillary marking access, prepare a flag with one-probability and define joint success as good data and flag one. Reflection about the prepared product state is known, while the joint phase test requires a controlled marking oracle or a computed Boolean output. This changes the success projector and enlarges the state space; it does not evade the obstruction to uniform probability lowering by a unitary. Query costs of preparation, its inverse and marking must all be counted.
For a permutation of an -element set and a known marked output subset of size , exactly inputs have marked outputs. The uniform quantum superposition thus has good probability , independent of which permutation the oracle represents. This allows a known-angle amplitude amplification schedule without counting unknown preimages.
Under the usual reversible-circuit interpretation, there is a genuine obstruction to uniform probability lowering by a unitary in the printed premise. The universal assertion cannot hold for arbitrary : it fails already at the search density .
An explicit counterexample uses , one good basis state , and . The six pure states
all have good probability . Their equally weighted density operator is , a maximally mixed state. Every unitary operator leaves this mixture unchanged, so its average output good probability remains . The printed assertion would instead make all six output probabilities , a contradiction. More generally, averaging states uniformly over good and bad basis vectors and two opposite phases gives , proving the same obstruction at the actual search density .
The intended conditional construction needs only a supplied reversible preparation that lowers the success probability of the particular starting state, not of every state. Here is the complete argument under that weaker resource assumption. Count and as supplied, query-free operations, as required for the claimed input-oracle bound. Let and choose
If equality holds, use the original preparation. Otherwise use the stipulated preparation on to obtain with good probability . Its reflection operator is implementable by
The good and bad components may be nonuniform, but amplitude amplification applies to this same two-dimensional decomposition. After iterations of , its good probability is
Thus the stated exact-query conclusion follows from accessible preparation of one known-overlap state and its inverse. If the supplied preparation uses oracle queries, those costs cannot be omitted.
A physically realizable known-state success dilution for exact amplitude amplification is available in the standard enlarged marking-oracle model. Append a flag in , where , and call a joint state good only when and the flag is one. This prepared state's success probability is exactly . Reflect about this known product preparation and mark the joint good subspace; ordinary iterations then succeed with certainty. A supplied controlled phase oracle gives one marking query per iteration, or a Boolean bit oracle computes , applies the joint phase and uncomputes in two queries. Measuring the data therefore returns a good with certainty in queries. This changes the state space and marking test, and does not assert the impossible universal -qubit circuit. Controlled access is an additional resource in a bare phase-oracle model, so it is made explicit rather than silently assumed.
The amplitude amplification theorem concerns a known preparation quantum circuit and a good-subspace projector . Write , with . Let and . Then
The reflection operators preserve the two-dimensional good-bad plane and rotate it by , so iterations amplify a small known success probability to a constant close to one. Each iteration uses one good-subspace phase test and one use each of , together with a known reflection. Amplitude amplification provides a quadratic improvement in the number of repetitions of a successful preparation. The query cost of the preparation and its inverse must be included when they themselves use the input oracle. Exact amplitude amplification uses additional known-overlap preparation or phase matching to avoid integer-iteration overshoot.
Prepare the two data qubits in and a phase ancilla qubit in . A single Boolean quantum oracle query flips only the marked amplitude. Its success fraction is , so in amplitude amplification. The fixed diffusion reflection gives after one iteration.
Directly, after the query the marked amplitude is and the other three are . Their mean is . The diffusion reflection replaces each amplitude by , yielding one at the marked input and zero elsewhere. Thus
Here is understood with its target ancilla qubit, and acts only on the data. It is independent of : , with the central diagonal gate implementable using two Pauli Z gates and one Controlled-Z gate. Measuring the data in the computational basis therefore finds the unique marked string with certainty after one oracle query.
Take to be normalized and let be the orthogonal projection onto the good subspace. The two reflection operators are
The first fixes the hyperplane orthogonal to and negates its normal direction. The second fixes and negates . Both are Hermitian operators and unitary operators, since their defining projectors square to themselves. For a non-normalized nonzero vector, divide by .
Put , with , and define normalized orthogonal good and bad vectors
Then . The amplitude amplification theorem states that the iterate satisfies, for every nonnegative integer ,
To prove it, the span of is invariant under both reflection operators. In that ordered orthonormal basis,
Multiplying the second matrix into advances the angle by . Induction proves the formula, and projecting onto gives . The minus sign in is just a global phase choice, but it makes the displayed state formula exact.
If is known, choose nearest to , with . The final angle is within of , so . For , this is at least after iterations, and is close to one when is small. For , measuring the initial state already has success above . Repeated independent attempts with a success test give any fixed desired success probability. This is the quadratic improvement of amplitude amplification over repeated sampling, which takes attempts. At there is no good component to amplify, and at the initial state is already entirely good; these endpoint cases do not require the undefined normalized component vectors.
For a positive Hermitian matrix,
The HHL algorithm phase-estimates , performs a controlled rotation with amplitude proportional to , uncomputes the estimate, and postselects the rotation ancilla. Resolving the smallest eigenvalue requires phase-estimation precision and evolution time . Since , this contributes a dependence at least linear in .
The controlled rotation must use a scale . In the worst input direction its success probability is of order
so obtaining constant success by amplitude amplification costs another factor. Thus a runtime polynomial in requires
An exponentially ill-conditioned matrix would require exponentially fine phase resolution or exponentially many amplification steps.
Let the spectral decomposition of the Hermitian matrix be
The HHL algorithm proceeds as follows.
Efficiently prepare the normalized amplitude encoding .
Apply quantum phase estimation to the simulated evolution , producing an approximation of each eigenvalue:
Add one ancilla and perform an eigenvalue-controlled rotation
where .
Uncompute the eigenvalue register. Conditional on measuring the ancilla as , the system register is
The postselection probability can be increased with amplitude amplification.
The ingredients used here are efficient sparse Hamiltonian simulation of and quantum phase estimation, which converts an eigenphase of that evolution into a binary approximation of . For sparsity , condition number , and error , the cost is polynomial in , , , and under the stated access assumptions.
Finally estimate by repeated measurement of an efficient observable decomposition of , or by a Hadamard test when is unitary. A general efficiently block-encoded Hermitian can similarly be measured through its block encoding. Repetition and a concentration inequality give additive sampling error after independent preparations.
If some integer obeys , ordinary amplitude amplification already gives exactly. For a general known , use exact amplitude amplification. Choose so that
and put . Append an ancilla and coherently arrange that its designated good value has amplitude conditional on the original register being good. With the enlarged good subspace defined by
the starting state's total good amplitude is .
Apply the amplitude amplification theorem times to this enlarged problem. Its final good amplitude is
The Boolean quantum oracle implements the reflection by phase kickback, and the known state-preparation circuit implements the reflection about the starting state by prepare--reflect--unprepare. A final computational-basis measurement therefore yields an with with certainty.
Let be the orthogonal projection onto the good linear subspace and write
where the two displayed states are normalized projections into and . Define the reflections
The amplitude amplification iterate preserves the good-bad plane, and its th iterate satisfies
Thus repeated reflections rotate amplitude toward the good subspace, reaching constant success probability after iterations.
Attach a quantum ancilla prepared with amplitude
on ; this is possible because . Mark a state as good only when both the original success qubit and this ancilla equal one. The enlarged state's good probability is , so its good amplitude is . One amplitude amplification iteration rotates the angle from to . It therefore prepares exactly, after which the flag and ancillary qubits may be discarded. This is an instance of exact amplitude amplification.
The amplitude amplification success probability is
Choose to be the nearest integer to . Then differs from by at most , so . Since , this uses
iterations and makes the good amplitude arbitrarily close to one when is small.
Choose an integer large enough that
Prepare an ancillary qubit in and declare only to be good. The initial good amplitude of
is . Applying amplitude amplification iterations gives good amplitude
The final state is therefore up to a global phase. Discarding the ancilla prepares exactly; this is exact amplitude amplification.
Normalization gives . Write , with , and set . Define the two Householder reflections
The amplitude amplification iterate preserves and rotates that plane through . Consequently
In particular, iterations raise the success probability to a constant close to one.
Prepare in the second register by part (ii), while preserving the first register . Applying the diagonal unitary from part (iii) gives
The preparation can be made coherent using amplitude amplification in place of postselection when this map is needed as a subroutine.
To find an input of a permutation whose output lies in a known -element subset, compute the output, apply its marked-state phase oracle, and use uncomputation. A modular-addition quantum oracle costs two forward queries per marked reflection, because modular-oracle inversion by negation supplies its inverse. Amplitude amplification then uses queries for fixed success probability. Positive-square outputs have and hence query cost .