How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Amplitude Estimation and Counting
1 · Prerequisites
- Absolute and Conditional Convergence; Rearrangement; Products
- Algebraic Closure, Embeddings, and Separability
- Algebraic Extensions, Extension Degree, and Finite Fields
- Amplitude Amplification
- Binary Operations, Monoids, Groups and Subgroups
- Boolean Circuits and Nonuniform Complexity
- Bounded Linear Operators and Quotient Spaces
- Circuit Syntax, Denotational Semantics, and Measurement
- Clifford+T Exact and Approximate Synthesis
- Compactness in Metric Spaces
- Completeness, Completion, and Uniform Continuity
- Complex Norms and Realification
- Complex Power Series and Analytic Functions
- Complexification, Realification and Real Structures
- Composition Series, the Jordan–Hölder Theorem and Solvable Groups
- Computational Problems, Promises, and Cost Models
- Congruences, the Integers Modulo n and the Chinese Remainder Theorem
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Continuity, IVT, EVT, and Uniform Continuity
- Continuous-Gate Universality and Exact Synthesis
- Controlled Gates, Phase, and Entanglement
- Cosets, Index and Lagrange's Theorem
- Countability and Uncountability
- Cyclic Groups and Direct Products
- Determinants of Matrices over a Commutative Ring
- Diagonalisation and the Minimal Polynomial
- Divisibility, Euclidean Domains, Principal Ideal Domains and Unique Factorisation
- Divisibility, Greatest Common Divisors and Bézout's Identity
- Dual Spaces, Bilinear and Quadratic Forms, and Sylvester's Law of Inertia
- Effective Numberings, Reductions, Resources, and Randomness
- Eigenvalues, Eigenvectors and the Characteristic Polynomial
- Equivalent Forms of Completeness
- Filters and Ultrafilters
- Finite Counting, Factorials and Binomial Coefficients
- Finite Dimensional Normed Spaces and Riesz Lemma
- Finite Fields and Cyclotomic Extensions
- Finite Fourier Analysis and the Fast Fourier Transform
- Finite Probability Spaces and Random Variables
- Finite-Dimensional Complex Inner-Product Spaces and Matrix Interfaces
- Formal Languages, Encodings, and Decision Problems
- Foundations of the Real Numbers for Analysis
- Free Modules, Exact Sequences, Projective and Injective Modules
- Fundamental Trigonometric Identities
- Further Trigonometric Identities and Inverse Functions
- Group Actions, Orbits, Stabilisers and Cayley's Theorem
- Group Homomorphisms and the Isomorphism Theorems
- Hilbert Space Geometry and Riesz Representation
- Ideals, Quotient Rings and the Isomorphism Theorems for Rings
- Independence Borel Cantelli and Zero One Laws
- Inner Product Spaces, Gram-Schmidt, Projections and Adjoints
- Limits of Real Functions
- limsup, liminf, and Subsequential Limits
- Linear Independence, Bases and Dimension
- Linear Recurrences and Rational Generating Functions
- Linear Transformations, Rank-Nullity and Quotient Spaces
- Matrices, the Matrix of a Linear Map, and Change of Basis
- Measurable Functions and Simple Approximation
- Measurements, POVMs, and Instruments
- Measures and Their Basic Properties
- Metric Spaces
- Modules, Submodules, Quotient Modules and the Isomorphism Theorems
- Monotone Functions, Discontinuities, and Continuity Sets
- Monotone Sequences, Bolzano-Weierstrass, and Cauchy Completeness
- Normal Subgroups and Quotient Groups
- Normed and Banach Spaces
- Order, Zorn's Lemma, and the Axiom of Choice
- Pointwise Extended-Real Function Products
- Polynomial Rings, the Division Algorithm and Roots
- Power Series and Real-Analytic Functions
- Primes, Euclid's Lemma and the Fundamental Theorem of Arithmetic
- Probability Spaces Random Variables and Expectation
- Product Measures and the Fubini Tonelli Theorems
- Properties of the Integral and the Working FTC
- Pure and Mixed States, Ensembles, and Schmidt Decomposition
- Quantum Fourier-Transform Circuits
- Quantum Phase Estimation
- Qubits, Bloch Sphere, Pauli Algebra, and One-Qubit Gates
- Registers, Tensor Products, and Partial Trace
- Relations, Functions, and Quotients
- Resource Bounds and Machine Invariance
- Reversible Arithmetic and Oracle Conversion
- Reversible Computation, Ancillas, and Coherent Oracles
- Rings, Subrings, Integral Domains and Fields
- Rⁿ as a Normed Space; Vector-Valued Functions
- Roots, Rational Powers, and Classical Inequalities
- Sequences and Limits
- Sequences and Series of Functions; Uniform Convergence
- Series: Convergence and the Nonnegative Tests
- Sigma Algebras and Borel Sets
- Simple Field Extensions and the Construction of the Complex Numbers
- Sine, Cosine, and the Definition of Pi
- Splitting Fields
- Strongly Continuous Semigroups and Hille Yosida
- Suprema and Infima
- Sylow's Theorems, p-Groups and Nilpotent Groups
- Symmetric Groups, Cycle Decomposition and the Sign Homomorphism
- Tensor Products of Modules
- The Complex Exponential and Euler's Formula
- The Derivative and the Mean Value Theorems
- The Determinant of a Linear Operator, Cofactors and Cramer's Rule
- The Exponential Function
- The Fundamental Theorem of Algebra
- The Fundamental Theorem of Finite Abelian Groups
- The Galois Correspondence
- The Lebesgue Integral and the Convergence Theorems
- The Logarithm and General Powers
- The Polynomial Hierarchy and Relativization
- The Riemann Integral: Definition and Integrability
- The Spectral Theorem, Positive Operators and Singular Value Decomposition
- The ZFC Axioms and the Basic Set Constructions
- Topological Spaces and Continuity
- Topology of ℝ
- Triangularisation, Generalised Eigenspaces and Jordan Canonical Form
- Trigonometric and Oscillatory Examples in One Variable
- Turing Machines, Configurations, and Computation
- Uniform Circuit Families, Promise Problems, and Complexity
- Vector Spaces, Linear Subspaces, Span and Direct Sums
2 · Summary
This page fixes the signed Grover iterate, the amplitude and counting input/output contracts, and separate controlled-power and repeated-controlled-unitary access modes. It proves the eigenphase relation and finite-grid error/confidence bounds, exact query counts, median confidence amplification, and the finite-grid likelihood schedule. Counting uses the uniform Hadamard state and explicitly supplied controlled membership reflection. The relative approximate-counting procedure has its own exact stopping rule, certified integer rounding, success theorem, and expected query cost in repeated controlled- access mode; the iterative likelihood variant is specified without a finite-sample success guarantee.
3 · Logical flowchart
4 · Definitions, theorems and proofs
Rational bounds for pi used in finite schedules
Statement
The circle constant satisfies .
Facts & Assumptions
Given: The principal inverse tangent and the usual positive constant .
and (Principal arctangent: derivative, integral, power series, and the Gregory–Leibniz series). The positive terms decrease to zero; the alternating-series test places the sum between consecutive partial sums and bounds the error by the first omitted term (The alternating series test: if is nonincreasing with then converges, the sum lies between any two consecutive partial sums, and the error after terms is at most , Every complete ordered field is Archimedean).
The definition identifies as the first positive zero of cosine and fixes the same circle constant used in the arctangent identity (Pi as twice the smallest positive zero of cosine).
Proof
Group the first eight terms of the alternating series in [F1] into four positive pairs. Their sum is , since . The alternating-series remainder after an even partial sum is positive, so and .
For , the integrand is positive. Polynomial division gives . Its integral over is by [F1]. The integral is strictly positive, hence .
Two nearest phase labels carry probability at least eight over pi squared
Statement
Let with , and let be an eigenphase measured by the -label QPE kernel. The two labels and reduced modulo (one label when is an integer) have total outcome probability at least .
Facts & Assumptions
Given: The QPE eigenphase outcome law with , , and phase .
For label , (Phase-estimation finite outcome law).
The finite geometric sum reduces to when (Finite geometric sum for phase-estimation amplitudes).
For , (Sine chord and linear bounds).
satisfies (Rational bounds for pi used in finite schedules).
Sine/cosine derivatives, tangent/secant derivatives, first-quadrant signs, and the Pythagorean identity are given by The derivatives of sine and cosine are cosine and minus sine, Derivatives and fundamental periods of tangent, cotangent, secant, and cosecant, Signs, monotonicity intervals, and ranges of sine and cosine, Pythagorean and parity identities for all six trigonometric functions on their natural domains, The chain rule, in one line from Carathéodory: if is differentiable at and is differentiable at , then is differentiable at with , and Sums, scalar multiples, products and quotients: , , , and when .
The mean value theorem converts a derivative sign into monotonicity on a compact interval (The mean value theorem, as the case of Cauchy's: for continuous on with and differentiable on there is with ).
Cofunction and supplementary identities give , , and on their domains (Cofunction, supplementary, quarter-turn, and reflection identities for the six trigonometric functions).
Proof
If , write . For label modulo , every summand in [F1] is , so its probability is ; for any other label, the geometric ratio in [F2] is not but its th power is , so the sum is zero. Otherwise , the floor and ceiling labels have exact probabilities and by [F1]–[F2]. Applying [F3] to each denominator shows their sum is at least , where .
The function is symmetric under . For , set , and . Differentiation gives , and direct substitution gives . Since , , and , exactly when . By [F7], this is .
Put on . Its second derivative is by [F5]. Thus is nondecreasing by [F6]; applying the mean value theorem on and for shows lies below the chord joining and . For endpoint values, let . By [F7]–[F8], , so and . Hence because its square is , so [F7] gives . Also by cofunction symmetry, hence .
For , the chord from to in step 1.3 gives . For , the right side of the inequality in step 1.2 is at least , using and ; at both sides are zero.
For , the chord from to in step 1.3 gives . Put . On this interval its denominator is positive, and differentiation gives , so . The right side in step 1.2 is therefore .
For , put . The function has and on , so [F5]–[F6] give . Hence . The function has derivative and , so and . After multiplying the desired comparison by , its right side minus this upper bound is , since and . This proves the inequality in step 1.2 on the last interval.
Steps 2.1–2.3 show is nonincreasing on ; symmetry then shows its minimum on is . Step 1.1 therefore gives probability at least , and the exact-grid case in step 1.1 already has probability one.
Amplitude estimation and counting input/output contract
Definition
Let be a nonzero finite-dimensional complex inner-product space, a specified unit vector, a supplied unitary, and an explicitly supplied orthogonal projection. Put Each classical instance has an injective encoding from its declared instance set into , with input size ; the promise domain and output obligation are stated for that task. Supplied operator or oracle access is a separate resource declaration.
The success amplitude is , and . Amplitude estimation returns an algebraically encoded estimate of ; its requested accuracy and failure probability are stated separately.
For counting, let be a nonnegative integer and set with address basis and a Boolean predicate . Write for the one-qubit Hadamard gate, distinct from the space , and set , , , and . Then the counting amplitude is . The preparation uses exactly ordinary Hadamard gates. Access to the controlled membership reflection is a separate explicit resource.
Two phase-estimation access modes are allowed. In the power-query mode, the model supplies each for as one declared query, with its individual cost recorded. In the repeated-unitary mode the model supplies and implements by sequential calls, for exactly controlled- calls. In repeated-unitary mode, each controlled- call expands as the composite ; controlled , controlled , controlled , controlled , and the control phase must all be supplied or implemented and charged. In power-query mode each supplied controlled power has its own declared cost vector, including any constituent implementations the model uses. An uncontrolled phase query does not supply any of them. Query, ordinary-gate, state-preparation, measurement, and classical bit costs are separate coordinates.
Facts & Assumptions
Given: The finite-dimensional space, supplied unitary and predicate-reflection accesses, task encoding, and one of the two access models just stated.
A decision or search task specifies its promise domain and output obligation; correctness outside the promise is not imposed (QA task and promise domain).
For an orthogonal projection , the sign convention is fixed, and controlled reflection access is separately declared (Orthogonal-Projector Reflection and Access Contract).
Controlled access means an explicit call to ; an ordinary black-box call does not silently grant it (Controlled Unitary Access).
Inverse-unitary access has its own declaration and cost (Inverse Unitary Access).
Gate and query costs are separate operation counts (Finite circuit resource accounting); this task also records measurement and classical-bit costs separately.
The one-qubit Hadamard matrix is (Exact one-qubit gates and rotations).
The reflections of orthogonal projections are self-adjoint unitaries with square (Projector Reflections Are Hermitian Unitary Involutions).
An input encoding is injective, and its string length is the input size (Input encoding and size for algorithmic tasks).
Query algorithms count designated oracle calls separately from gates, and controlled access is charged only when the contract supplies it (Quantum query algorithm).
Proof
The operators and are the sign-reversed reflections of the projectors and in [F2]. The reflection-involution result says each is self-adjoint and squares to ; since is unitary, is a product of unitaries and is unitary.
In the repeated-unitary mode, block multiplication gives for every integer . Summing the controlled powers gives calls; the power-query mode instead has exactly one declared query for each of the indices. These counts use [F3], the query convention [F9], and preserve the distinct costs in [F4]–[F5].
Since , tensoring its copies gives . The orthonormal address basis and the displayed projector then give . The circuit applies exactly one to each address wire, hence ordinary Hadamards.
The input encoding and promise obligation are the declared task data of [F1] and [F8]. The definition states its output and separate access costs before any accuracy claim. Thus neither a controlled reflection nor a free power construction is inferred from an uncontrolled oracle call; every use must satisfy [F3]–[F5] and [F9].
Grover eigenphases encode the good probability
Statement
Let , , and . If , define the unit vectors and . In the ordered basis , the Grover iterate of Amplitude estimation and counting input/output contract restricts to Its eigenvalues are and , and has squared overlap with each corresponding normalized eigenvector. At , is a eigenvector; at , it is a eigenvector.
Facts & Assumptions
Given: The unitary , the orthogonal good projection, the state , and the signed iterate .
The definitions of , , , , and are fixed in Amplitude estimation and counting input/output contract.
The signed iterate leaves the good/bad plane invariant and has matrix in the ordered basis (Amplitude-amplification invariant plane).
Proof
When , the definition in [F1] has and because . The supplier matrix in [F2] therefore applies to the same ordered basis and the same signed defined in [F1].
For that matrix, the characteristic polynomial is , with roots . The normalized vectors and are eigenvectors for these roots. Their inner products with have squared modulus .
At , [F2]’s endpoint statement gives , with phase modulo one. At , it gives , with phase . These are the remaining endpoint eigenphases and require no zero component normalization.
Finite exact comparison of real cyclotomic values
Statement
For an integer , let and let be given coefficient lists such that and are real. There is a terminating deterministic exact procedure to decide which of these two real numbers is larger, or whether they are equal. Its bit-operation cost is charged to the classical cost model; no polynomial bound is asserted.
Facts & Assumptions
Given: The integer , rational polynomials , and the promise that their values at are real.
The cyclotomic polynomial is irreducible over and is the minimal polynomial of a primitive th root ( is irreducible in for every ).
Write . The arctangent theorem gives , and the alternating-series test gives . For any rational width , increasing until gives the rational interval of width below containing ; exact rational comparisons suffice, and the loop terminates because the natural numbers are unbounded (Principal arctangent: derivative, integral, power series, and the Gregory–Leibniz series, The alternating series test: if is nonincreasing with then converges, the sum lies between any two consecutive partial sums, and the error after terms is at most , Every complete ordered field is Archimedean).
Sine and cosine are given by their convergent power series (Sine and cosine defined by their real power series).
Rational arithmetic and exact comparisons are part of the separately charged classical bit-operation model (Classical bit-operation cost).
for real (, , and ).
For an alternating series whose nonnegative terms decrease to zero, the remainder after terms is at most the first omitted term (The alternating series test: if is nonincreasing with then converges, the sum lies between any two consecutive partial sums, and the error after terms is at most ).
Proof
Form and divide it by over . By irreducibility in [F1], exactly when the remainder is the zero polynomial; that finite rational coefficient test decides equality.
If the remainder is nonzero, then is a nonzero real algebraic number. Put , using and . For any rational tolerance , refine the pi enclosure from [F2] until the scaled interval for lies in and has width below ; this terminates because . For and , successive cosine-term magnitudes have ratio at most , and successive sine-term magnitudes have ratio at most . Thus [F3] and [F6] bound the cosine and sine tails after truncation through index by and . The ratios of these bounds at successive are and , both below for , so exact rational comparisons find an with both bounds below . For this fixed , refine until the rational interval evaluations of both truncation polynomials have widths below ; this exact test terminates because they are fixed polynomials and interval addition and multiplication preserve shrinking widths. Use those intervals with the alternating remainders to enclose and , then evaluate using rational complex interval arithmetic and Euler's formula [F5]. The resulting real intervals contain and have widths tending to zero as , since each sine/cosine interval width and tail bound tends to zero and is a finite polynomial.
Because , its distance from zero is positive. Repeatedly refine the rational interval from step 2.1 until it lies strictly above or below zero; convergence of the interval widths guarantees finite termination, and its sign decides the strict order. Equality was already decided in step 1.1, so this procedure terminates on every promised input. Its finitely many rational operations are charged under [F4].
Iterative no-QFT amplitude estimation by finite-grid likelihood
Definition
Input. An instance of the task Amplitude estimation and counting input/output contract with the same supplied under the prepared-success-subspace access contract of Prepared unitary and success subspace for amplitude amplification. That contract supplies and charges the uncontrolled calls to . Additionally require supplied access to the good/bad projective measurement of Finite projective measurements, with each use charged in the measurement coordinate and any implementation costs charged separately; no controlled access is used. Also require integers .
Set and for . For each , perform repetitions: prepare a fresh , apply exactly signed Grover iterates using Amplitude amplification with a fixed integer iteration count, measure the good/bad projective measurement, and record the outcome. Let be the number of good outcomes at scale .
Set and . For an integer , let be its least residue in . For grid labels , put and define the likelihood where every zeroth power is . For each label and scale , set and form the rational polynomials Put , treating every zeroth power as . The polynomials are the exact comparison inputs for the likelihoods : compare and using Finite exact comparison of real cyclotomic values, and choose the least label attaining the maximum.
Set and return , encoded by the pair . Each shot uses a fresh state and ordinary measurement. This is a finite-grid likelihood procedure, not a finite-sample guarantee; no such guarantee is asserted here.
QFT-based amplitude estimation
Definition
Input. An instance from Amplitude estimation and counting input/output contract, an integer , , and either the declared controlled-power access mode or repeated controlled- access.
Instructions. Prepare , run the -label QPE circuit on using controlled powers , , and measure its phase register to obtain . Output the exact cyclotomic value with the real embedding specified by this root. A decimal approximation is postprocessing and is charged separately. The leading minus in is retained: on a controlled call it is the control phase , not a discarded standalone global phase.
Quantum counting by uniform-state amplitude estimation
Definition
Input. A Boolean predicate , an integer , , an explicitly supplied controlled membership reflection for , a power of two , and the other controlled accesses in Amplitude estimation and counting input/output contract.
Prepare , run the -qubit QPE circuit for with labels, measure , and output the exact algebraic fraction estimate and count estimate . For this is the QFT amplitude-estimation circuit of QFT-based amplitude estimation; for , use its one-phase-qubit QPE circuit directly, without invoking the error theorem. The fraction and count are real-valued algebraic outputs; integer rounding is optional postprocessing. The controlled membership reflection is an explicit access requirement. In repeated-unitary mode each controlled call charges one controlled membership reflection; in power-query mode each supplied controlled power carries its declared cost vector, including any membership-reflection implementations it uses. Neither access mode is inferred from the bare phase oracle .
Median confidence amplification for amplitude estimation
Definition
Input. The amplitude-estimation task, rational and rational .
Initialize and . Repeatedly increment and double while , using exact rational comparison, so that . Set and repeatedly increase by while , using exact rational comparisons. Run independent fresh copies of the QFT estimator with phase-register size , and return the middle order statistic of their exact algebraic estimates (ties are ordered by their exact value and identical values are interchangeable).
Rational-interval rounding of a counting output
Definition
Input. Public integers , even , and . The output is an integer . All sums, factorials, comparisons and ceiling operations below use exact rational or integer arithmetic, charged as classical bit work under Classical bit-operation cost.
If , return . Otherwise initialize . Compute ; while , increment by one and recompute . At the first with , set
Initialize . Compute These are the arctangent-series enclosures from Principal arctangent: derivative, integral, power series, and the Gregory–Leibniz series and The alternating series test: if is nonincreasing with then converges, the sum lies between any two consecutive partial sums, and the error after terms is at most . Set and . While either or , increment by one and recompute .
For the first accepted , compute Return , computing the rational ceiling by integer division. The termination and error guarantee are established in Terminating certified rounding for a counting estimate ↗.
Terminating certified rounding for a counting estimate
Statement
Given integers , even , and , let . There is a terminating deterministic rational-interval procedure that produces an integer with . Its arithmetic work is a classical bit cost; no polynomial bit bound is asserted.
Facts & Assumptions
Given: Integers , even , and a phase label .
, and . After terms, the alternating-series error gives , where . Increasing until is below a requested rational width yields the rational interval ; termination follows from the Archimedean property (Rational bounds for pi used in finite schedules, Principal arctangent: derivative, integral, power series, and the Gregory–Leibniz series, The alternating series test: if is nonincreasing with then converges, the sum lies between any two consecutive partial sums, and the error after terms is at most , Every complete ordered field is Archimedean).
Cosine is represented by its everywhere-convergent power series (Sine and cosine defined by their real power series).
Rational arithmetic, interval comparison, and output writing are charged classical bit operations (Classical bit-operation cost).
For and , the exponential addition law gives (, and the complex exponential extends the real exponential). Euler's formula, , and give (, , and ). Together with [F5], this proves for every integer , including and non-dyadic .
The cosine double-angle identity gives (Double-angle and quadratic power-reduction identities).
For and , factoring gives .
The alternating-series remainder bounds the tail by the first omitted term when magnitudes decrease to zero (The alternating series test: if is nonincreasing with then converges, the sum lies between any two consecutive partial sums, and the error after terms is at most ).
For , . The ratio test gives convergence of , and the term test then gives (Ratio test: gives absolute convergence and hence convergence, and gives divergence, If a series converges then its terms tend to ).
For every real , there is an integer with (Integer part: for every real there is exactly one integer with ).
The real absolute value is defined by for and for (Absolute value in an ordered field).
The exact rational-interval instructions, including the branch, the and enclosure-index loops, and the output for the final interval , are defined in Rational-interval rounding of a counting output.
Proof
If , [F11] returns , so assume . Since , the true argument lies in . For any accepted enclosure index in [F11], write , and for its output interval. For every , the cosine terms after index alternate with decreasing magnitudes, so the omitted tail is bounded by . For each integer , [F6] bounds by ; summing with the factorial coefficients gives . Thus , and the endpoints in [F11] enclose in .
The ratio of successive bounds tends to zero, so and a finite satisfies . For that , the enclosure-index loop in [F11] refines the alternating arctangent enclosure of until its propagated argument interval is contained in and : this terminates because the true argument is strictly inside , is finite, and the enclosures become arbitrarily narrow. The cosine interval has width at most , so its interval has width . Both loops terminate.
Apply [F9] to and set . Then , so and [F10] gives . If contains and has width below , every satisfies ; adding these bounds gives . Thus the closed radius- interval about contains all of , so an eligible integer exists. Eligibility is exactly , so the least eligible integer is , as returned by [F11]. It gives because . All rational operations and output work are charged by [F3]. The identity follows from the cosine double-angle identity, and its exact encoding is covered by [F4] using [F5].
Amplitude-estimation additive error and success probability
Statement
For the QFT-based estimator with and integer , its output satisfies with probability at least when , and with probability strictly greater than when . In particular the error is at most . At the output is exactly zero; at it is exactly one.
For every allowed access instance and , the prescribed signed controlled circuit and its exact real cyclotomic output are well-defined, retaining the controlled relative phase and separately charged classical output processing.
Facts & Assumptions
Given: The amplitude task, QFT estimator with , and integer .
The estimator returns after QPE on the Grover iterate (QFT-based amplitude estimation).
The Grover eigenphases are modulo one with equal weights, where (Grover eigenphases encode the good probability).
The floor and ceiling phase labels have combined probability at least (Two nearest phase labels carry probability at least eight over pi squared).
The QPE tail for is at most , and exact-grid phases are returned with certainty (Phase-estimation nearest-grid and tail bounds).
Sine is -Lipschitz, so (Sine and cosine are -Lipschitz on ).
The fundamental theorem of calculus evaluates increments of a continuously differentiable function by integrating its derivative (The first fundamental theorem: if is integrable on and continuous at , then ; in particular a continuous has as a primitive).
The finite QPE outcome probability is (Phase-estimation finite outcome law).
The geometric sum equals when (Finite geometric sum for phase-estimation amplitudes).
Circular phase distance takes values in and identifies the two arcs from a phase to a label (Circular phase distance modulo one).
For , (Sine chord and linear bounds).
Euler's identity gives and (, , and ).
The complex modulus is multiplicative and satisfies (Conjugation is an involutive real-field automorphism, , and modulus is definite, multiplicative, and subadditive).
Sine is odd, cosine is even, and (Parity and the Pythagorean identity for sine and cosine).
The integer part satisfies (Integer part: for every real there is exactly one integer with ).
On a superposition of eigenspaces, QPE outcome probabilities are the eigenphase-weighted mixture, with no cross terms (Phase estimation on a superposition of eigenspaces).
The complex exponential is -periodic and additive in its exponent (, and the complex exponential extends the real exponential, , and exactly when ).
Sine changes sign under a shift by , and the supplementary identity is ; iterating the shift gives for every integer (Quarter-turn values and shifts by pi/2 and pi, Cofunction, supplementary, quarter-turn, and reflection identities for the six trigonometric functions).
The two Grover eigenphases are and , with equal weights in the prepared state for (Grover eigenphases encode the good probability).
QPE uses controlled positive powers and a projective readout of its -label register (Quantum phase estimation).
Controlled and inverse access are explicit capabilities. In repeated-unitary mode the task expands into its controlled factors; in power-query mode each supplied is a declared query with its own cost vector, including any constituent implementations used (Controlled Unitary Access, Inverse Unitary Access, Amplitude estimation and counting input/output contract).
A standalone global phase leaves outcome probabilities invariant, but a controlled global phase is a relative phase on the control (Standalone Global Phase Leaves Pure-State POVM Probabilities Unchanged, A Controlled Global Phase Becomes a Relative Control Phase).
The signed reflections in are unitary involutions (Projector Reflections Are Hermitian Unitary Involutions).
The phase-estimation access theorem counts supplied controlled-power queries or repeated controlled- calls (Phase-estimation query and gate costs).
Classical algebraic encoding and any decimal refinement are charged separately (Classical bit-operation cost).
A real value with has the exact real cyclotomic representation and comparison interface of Finite exact comparison of real cyclotomic values.
Proof
By [F21], the input state lies in the span of eigenvectors of with phases and ; the endpoint cases are single eigenphases. QPE is therefore applied to its finite eigenphase decomposition, and the projective measurement returns a label in the finite set by [F22].
In repeated-unitary mode, the task contract expands each controlled as , with every factor supplied or implemented and charged. In power-query mode the estimator instead uses the supplied controlled powers as declared queries, each with its own cost vector; it does not require separately supplied controlled or . The scalar minus is invisible only in an uncontrolled call by [F24], while under control it is retained as a relative phase. The reflection factors are unitary by [F25]. Thus the circuit instructions are well-defined under either declared access mode.
For , Euler's formula gives . This is a real algebraic element of the cyclotomic field, so the stated output is exactly encoded; query counts are those in [F26] and decimal/bit processing is charged under [F27].
Let and first suppose . Fix one Grover eigenphase , put , and let . The difference belongs to , so there are an integer and with . Hence . By the integer -shift identity [F18], the estimator output is for . On either eigenphase, : the first has , and the second has and uses the supplementary identity [F18]. Also by [F5], and on both branches: the second branch has by [F14] and [F18], while and by [F14]. For any real , [F5] and [F7] give . By [F6], the integrand has absolute value at most , so either orientation gives absolute remainder at most . On the phase-success event , hence , and the displayed error bound follows.
Let and fix one Grover eigenphase . For a tail outcome at distance , write by [F10]. Integer periodicity [F17] and sine parity [F14] reduce the denominator to by Euler [F12] and the sine addition formula. Thus [F8]–[F9] and [F12]–[F14] give , since the numerator modulus is at most and the denominator is by [F10]–[F11]. In the tail , put ; [F15] gives . Each annulus has at most two arcs of length , each containing at most one label on the grid. Thus the tail probability is at most . An empty tail has probability zero, also strictly below this positive bound. This strengthens [F4], so success is strictly greater than for each phase and hence for their mixture.
For , both labels from [F3] have circular distance at most from the relevant Grover phase. Off-grid, floor and ceiling labels have distances strictly below ; on-grid the distance is zero. Thus the event used in step 1.4 has probability at least .
At the Grover phase is the exact grid phase ; at it is , whose label is integral because is even. Exact-grid recovery [F4] gives outputs and . Finally gives the stated simplification.
Exact query count for the finite-grid iterative estimator
Statement
Across the finite-grid schedule with and , forward calls equal , inverse calls equal , and both zero-input reflections and good-predicate reflections equal . Thus the total number of calls is . This count gives no finite-sample success guarantee.
For all integers , the finite-grid procedure terminates and returns a uniquely determined exact algebraic output under its least-label tie rule. Its displayed factors are the Bernoulli likelihood factors of the prescribed independent shots; no finite-sample accuracy guarantee is asserted.
Facts & Assumptions
Given: The finite-grid iterative schedule and its explicitly supplied and charged prepared-success-subspace access contract.
Stage has shots and uses Grover iterates after one fresh preparation (Iterative no-QFT amplitude estimation by finite-grid likelihood).
The signed iterate is , and the matching prepared-success-subspace contract supplies and charges one call to each of per uncontrolled iterate (Amplitude estimation and counting input/output contract, Prepared unitary and success subspace for amplitude amplification).
The query model counts these oracle uses separately from ordinary gates (Quantum query complexity).
The Grover iterate rotates the prepared state so that after iterates its good probability is (Grover eigenphases encode the good probability).
The measurement outcomes are the two orthogonal good/bad projections (Finite projective measurements).
The real likelihood values are finite cyclotomic algebraic numbers and admit terminating exact comparisons (Finite exact comparison of real cyclotomic values).
Each oracle/state-preparation call is an explicit query resource (Quantum query algorithm).
The fixed-count amplification procedure applies exactly the declared number of signed iterates and then the good/bad projective instrument, with no controlled- call (Amplitude amplification with a fixed integer iteration count).
The complex exponential is additive, and its kernel is (, and the complex exponential extends the real exponential, , and exactly when ).
For real , (, , and ).
Sine is odd and cosine is even (Parity and the Pythagorean identity for sine and cosine).
Proof
Suppose first that , so the normalized vectors are defined. Inductively applying the rotation matrix from [F21] to gives . Its good projection therefore has squared norm , so the listed good/bad measurement has the Bernoulli likelihood factors displayed in the definition.
If , then and . The endpoint clause of [F21]’s supplier gives , hence for every , including . The good/bad probabilities are therefore and , equal to and . Almost surely every ; any record with a good outcome has probability zero under this endpoint model. The displayed Bernoulli factors give exactly these probabilities: a positive good exponent gives a zero factor, while the prescribed zero-exponent convention makes when no good outcome occurs. No normalized good vector or conditional state on a zero-probability outcome is used.
Set and . For each , use the residues in the algorithm's polynomial factors and put . By [F26], and ; [F27]–[F28] give their sum as . Therefore [F29] gives and . It follows that for each . The comparison procedure [F23] decides every pair exactly, including equality; the nonempty finite set therefore has a maximizing label, and the least-label tie rule determines a unique output, including when all (then the chosen label is ). Its output polynomial is exactly by the same identity.
A shot in stage uses one initial and then iterates. Each iterate contributes one more , one , one zero-input reflection, and one good reflection by [F2]. Therefore the per-stage counts are respectively , , , and .
If , orthogonality gives , so and . The other endpoint clause of [F21]’s supplier gives , hence for every , including . Its good/bad probabilities are and , agreeing with and . Almost surely every ; a record containing a bad outcome has probability zero under this model. The bad factor is zero exactly when its exponent is positive, and the same convention applies when no bad outcome occurs. No normalized bad vector or conditional state on a zero-probability outcome is used. Together with step 1.1, these cases establish the claimed Bernoulli likelihood factors on the whole task domain.
Summing over gives the first four formulas. Since and for , for , yielding the stated total. The geometric sum is , so the total is .
Every stage has finitely many shots and iterates because are finite. Fresh state preparations and measurements are part of the instructions, so no controlled or QFT call is used. The likelihood selection is finite by step 1.3, but this argument establishes neither a sample-size error bound nor an guarantee.
The call totals established in step 1.4 and step 2.2 only tally explicitly invoked queries. By [F1], the analyzed procedure is a finite-grid likelihood schedule with no finite-sample success guarantee; [F3] counts its declared query actions but supplies no probability or approximation-error bound. Thus this resource count establishes no success theorem.
Exact zero-label probability for counting
Statement
For a fresh Count run with and , the QPE label is zero exactly when the raw count estimate is zero. If , then For this probability is ; when and it is .
Facts & Assumptions
Given: A fresh Count preparation, a Boolean predicate with marked elements, and an even power-of-two phase-grid size .
For , the prepared state has equal squared overlap with Grover eigenphases and ; at it is a eigenvector (Grover eigenphases encode the good probability).
QPE on an eigenphase has the finite outcome kernel of Phase-estimation finite outcome law.
For an eigenphase superposition, measurement probabilities are the eigenphase-weighted mixture with no cross terms (Phase estimation on a superposition of eigenspaces).
The geometric sum, Euler formula, and integer periodicity give the label-zero sine quotient (Finite geometric sum for phase-estimation amplitudes, , , and , , and exactly when ).
Sine vanishes exactly at integer multiples of (The zero sets of sine and cosine and the least positive common period 2 pi).
The raw Count estimate for label is (Quantum counting by uniform-state amplitude estimation).
Sine changes sign under an integer shift by , and (Quarter-turn values and shifts by pi/2 and pi, Cofunction, supplementary, quarter-turn, and reflection identities for the six trigonometric functions).
Proof
For a phase and label zero, the kernel in [F2] and geometric-sum fact [F4] give when , by Euler’s formula. At an integer phase all summands are , so the probability is one.
For , [F1]–[F3] average this expression over and with weights . For the second branch, [F8] gives and, by iterating the -shift, for the integer . Squaring these identities shows that both branches have the same squared numerator and denominator, so their mixture is the stated value. For , the phase is zero and label zero is certain.
When , [F5] gives , so the quotient in step 2.1 is . By [F6], for an integer label exactly when is a multiple of , hence exactly when . Fact [F7] identifies this with a zero raw count estimate.
Amplitude-estimation query and precision complexity
Statement
For , repeated controlled- access uses exactly controlled- applications in one run; each expands to one call each to controlled , controlled , controlled , controlled , and the control phase. Supplied controlled-power access uses exactly power queries and reports their separate costs. With fixed success probability, additive amplitude error is obtained with , hence repeated controlled- calls; state preparation, ordinary gates, and classical encoding are separate costs.
Facts & Assumptions
Given: The -label amplitude-estimation circuit and the access mode from Amplitude estimation and counting input/output contract.
The phase-estimation circuit uses one controlled power for each (QFT-based amplitude estimation).
QPE charges exactly supplied powers or repeated controlled-unitary calls (Phase-estimation query and gate costs).
The quantum query model counts only declared oracle actions (Quantum query complexity).
In repeated-unitary mode, each controlled expands into separately declared controlled , controlled , controlled , controlled , and control phase. In power-query mode each supplied controlled power has its own declared cost vector, including any constituent implementations used (Amplitude estimation and counting input/output contract).
The error guarantee is the inequality in Amplitude-estimation additive error and success probability.
Proof
In repeated access, the th power takes calls by [F2]. Summing gives . In supplied-power access, there is one call for each of indices, hence queries.
In repeated-unitary mode, [F4] makes each controlled- call the charged product listed in the Statement. In power-query mode, the model instead charges each supplied controlled power and its declared cost vector, without inferring any constituent capability from a bare uncontrolled call.
For , choose the least power of two at least . By [F5], the error is at most , with success probability at least . The least-power choice gives , so [F3] yields the repeated-call bound; other cost coordinates remain separate.
Quantum counting error and boundary cases
Statement
For an integer , , marked addresses among , and , the raw estimate satisfies with the same success probabilities as the amplitude-estimation theorem for integer . If , the raw estimate is zero with certainty. If , the raw estimate is with certainty because is even.
For every integer and dyadic , the counting procedure is well-defined, prepares the uniform state with exactly ordinary Hadamards, specializes the task amplitude to , and returns the exact algebraic pair with separately charged optional rounding. Its one-phase-qubit branch is included in this well-definedness claim; the error guarantee above concerns .
Facts & Assumptions
Given: an integer , , a predicate with exactly marked addresses, and the counting estimator with dyadic . The error bound is claimed when .
Counting uses fraction amplitude and raw count (Quantum counting by uniform-state amplitude estimation).
The amplitude-estimation error and confidence bound are stated in Amplitude-estimation additive error and success probability.
The endpoint Grover phases are exactly for and for (Grover eigenphases encode the good probability).
A phase on the QPE grid is returned at its exact label with probability one (Exact phase recovery on the QPE grid).
The amplitude task specializes to when the prepared state is uniform on addresses (Amplitude estimation and counting input/output contract).
QPE uses phase qubits and controlled powers of the supplied unitary (Quantum phase estimation); for the amplitude-estimator specialization has the output map (QFT-based amplitude estimation).
The Grover phase relation applies to the good-subspace projector defined by (Grover eigenphases encode the good probability).
The exact Hadamard matrix is fixed and each wire receives one ordinary Hadamard in the uniform preparation (Exact one-qubit gates and rotations, Finite circuit resource accounting).
Classical algebraic encoding and any integer rounding are charged separately (Classical bit-operation cost).
The task charges controlled- constituents in repeated-unitary mode and records each supplied controlled power with its own cost vector in power-query mode (Amplitude estimation and counting input/output contract).
Proof
For , the procedure is the one-qubit instance of [F22]; for it is [F22] specialized by the amplitude-estimation output map. The Hadamards turn into the uniform superposition; the definition of makes its squared projection norm by [F21] and [F24]. The eigenphase relation [F23] applies to this projector, and the amplitude-estimation instructions of [F22] use the corresponding output map. Thus the procedure estimates precisely this fraction and multiplying by gives the count estimate.
For , substitute in [F2] and multiply its error bound by . Since and , the result is the displayed inequality with unchanged event probability.
In repeated-unitary mode, each controlled call includes one explicitly supplied or implemented controlled membership reflection. In power-query mode, each supplied controlled power carries its declared cost vector, including any membership-reflection implementation it uses; neither mode infers controlled access from a bare phase query. The exact algebraic result has separate postprocessing cost by [F25].
The output remains the real-valued pair unless an integer is explicitly requested. Preparation uses exactly ordinary Hadamards by [F24]. The access-mode-specific query costs are those declared in [F26], while ordinary gate and bit costs remain separate by [F24]–[F25].
If , the phase is the exact grid phase zero, so QPE returns and . If , the phase is ; the even grid size has exact label , which returns .
Explicit median confidence guarantee for amplitude estimation
Statement
For rational and , the median procedure of Median confidence amplification for amplitude estimation returns with with probability at least .
Both rational scheduling loops terminate at their least prescribed values, and the odd finite list has a well-defined exact algebraic middle order statistic. Its phase-register size is admissible for the one-run estimator; preparations, queries and comparison bit work retain their separately declared costs.
Facts & Assumptions
Given: The median algorithm, its rational , and the one-run amplitude estimator.
The median algorithm uses and odd with (Median confidence amplification for amplitude estimation).
A one-run estimate has error at most with probability at least (Amplitude-estimation additive error and success probability).
Independent Bernoulli variables satisfy for trials (Chernoff bound for independent bernoulli trials).
The natural logarithm is strictly increasing, satisfies and for positive inputs, and is inverse to the exponential (Order, continuity, range, and the product, quotient, and reciprocal laws for the natural logarithm, The natural logarithm as the inverse of the exponential function).
The one-run QFT estimator has the finite output and access instructions stated in QFT-based amplitude estimation.
Exact rational comparisons and output processing are charged as classical bit operations (Classical bit-operation cost).
Independent repetitions mean separately prepared and measured runs in the quantum query model (Quantum query algorithm).
Exact comparisons of real cyclotomic values terminate (Finite exact comparison of real cyclotomic values).
The real field is Archimedean, natural powers obey , and induction holds on the naturals (Every complete ordered field is Archimedean, Exponentiation of natural numbers, , and its agreement with the integer power in , The principle of mathematical induction).
Proof
The threshold is rational and exceeds by [F22]. By [F26], powers of two are unbounded: choose a natural above any fixed real threshold by the Archimedean property and use induction to get . Thus the doubling loop for terminates, and its first value above the threshold is the least such power; since and , this value is at least , so it is an admissible phase-register size and satisfies the one-run precision requirement. The rational target is finite. Choose a natural by [F26]; if is odd take , and if is even take . Then is positive odd and , so the odd-increment loop for terminates at the least positive odd solution. Each comparison is exact rational arithmetic after clearing denominators.
Each run returns an algebraic estimate in the same real cyclotomic field . Exact finite comparisons determine the middle order statistic; repetitions use independent fresh preparations and readouts by [F24].
From [F1]–[F2] and , a good run has error at most . Its success probability is at least , so each failure indicator has mean at most .
The output is one of the finite run estimates, and the odd sample size makes its middle index unique. Thus the procedure is defined for all stated rational inputs, with query and classical comparison costs remaining separate under [F23].
If the median lies outside , at least runs are failures. For their sum , this entails . Applying the two-sided additive bound [F3] to this containing event gives probability at most .
Here and , so . By [F6], monotonicity and the logarithm product law turn into . Put . By [F5], , so and hence . The reciprocal law in [F6] gives , while the inverse identity gives . Strict increase of therefore implies . Step 2.2 bounds median failure by this quantity, proving success at least .
Relative approximate counting with unknown marked count
Definition
Input. A Boolean predicate on addresses with an integer , the fully declared controlled counting access model, and rational .
Set . Repeatedly increment , set , run a fresh Count, and stop exactly when its label is nonzero or . The test is an exact finite label test. Initialize and ; repeatedly increment and double while , using exact rational comparison, so that . Run a fresh Count and run Rational-interval rounding of a counting output on to output an integer within of its exact algebraic count estimate, as proved by Terminating certified rounding for a counting estimate. The scale loop returns the least power of two meeting its rational threshold; all scales are powers of two and the multiplier grows as times .
Quantum counting query complexity
Statement
For an integer , , and a power of two , Count uses exactly repeated controlled-Grover calls, or exactly supplied controlled-power queries, in addition to its ordinary Hadamards for uniform-state preparation. At fixed success probability, additive count error is obtained using repeated controlled-Grover calls; additive fraction error uses . The count-dependent error bound retains the terms and . Algebraic output encoding and integer rounding have separate classical bit costs.
Facts & Assumptions
Given: The counting algorithm, an integer , , a power-of-two , and the declared query mode.
The estimator has the phase-estimation circuit and uniform preparation specified in Quantum counting by uniform-state amplitude estimation.
Repeated controlled- access costs calls and supplied powers cost calls (Amplitude-estimation query and precision complexity).
The additive amplitude guarantee is the statement of Amplitude-estimation additive error and success probability.
Query counts and classical bit operations are separate resources (Quantum query complexity, Classical bit-operation cost).
Proof
The exact controlled-iterate counts follow from [F2]. The uniform address preparation applies one Hadamard to each of the wires by [F1], in addition to phase-register and QFT gates separately counted in [F4].
For fraction error , set amplitude precision ; for count error , set . Choosing the least power of two at least makes the error for by [F3]. The least-power bound is , giving the two asymptotic query bounds.
The count-dependent expression is [F3] multiplied by as in Quantum counting error and boundary cases. Multiplication by , exact cyclotomic representation, and optional integer rounding are classical bit work and remain separate under [F4].
Median amplitude-estimation query cost
Statement
In the repeated controlled- access mode, the median estimator uses exactly controlled- calls. With the explicit thresholds in Median confidence amplification for amplitude estimation, this is calls. For the conventional range , this is . Controlled , controlled , controlled predicate reflections, state preparation, gate counts, and classical order-statistic work are separately charged.
Facts & Assumptions
Given: The median procedure with its integer parameters and repeated controlled- access.
The procedure makes fresh runs with a common (Median confidence amplification for amplitude estimation).
Each run uses exactly repeated controlled- calls (Amplitude-estimation query and precision complexity).
The access model charges declared quantum query actions separately from ordinary gates and classical bits (Quantum query complexity).
The least power-of-two threshold is and the least odd sample size satisfies (Median confidence amplification for amplitude estimation).
The natural logarithm is strictly increasing and satisfies the product, reciprocal, and power laws on positive reals (Order, continuity, range, and the product, quotient, and reciprocal laws for the natural logarithm).
Proof
By [F1] and [F2], each of the runs makes calls, so the exact total is .
The least-power rule gives . Put . Since , the least positive odd with satisfies , so is a positive odd integer that fails the threshold: . By [F6], taking logarithms gives , hence by [F5]. Also by [F6], so [F5] gives . When , [F5]–[F6] give , so this simplifies to . Multiplying these bounds proves both asymptotic counts in the Statement.
Each controlled- call expands into the separately declared controlled constituents of the task definition; [F3] keeps their gate/query costs distinct, as well as the initial preparations and classical median work.
Relative approximate counting query complexity
Statement
For an integer , , a predicate with marked addresses, and rational , in the repeated controlled- access mode the dyadic relative-counting procedure uses expected controlled- calls when , and exactly one controlled membership-reflection call per such controlled Grover call. Each controlled additionally uses its declared controlled , controlled , controlled , and control phase. For , this implementation uses controlled- calls: the rough loop reaches its cutoff, and the final estimator still uses . State preparation, gates, and certified classical rounding are separate.
Facts & Assumptions
Given: The relative-counting algorithm with , an integer , , rational , and repeated controlled- access.
The loop uses dyadic rough scales and a final size (Relative approximate counting with unknown marked count).
For , the continuation probability at rough scale is ; for , the zero label is certain (Exact zero-label probability for counting).
One controlled Grover call includes the controlled good reflection as a separate supplied access (Amplitude estimation and counting input/output contract).
The declared query model counts each controlled call separately from gates and bit operations (Quantum query complexity).
In repeated controlled-unitary access, Count at any phase-register size uses exactly controlled- calls (Phase-estimation query and gate costs).
For every real , some dyadic scale exceeds : choose a natural by the Archimedean property, prove by induction using the recursion for natural powers, and take (Every complete ordered field is Archimedean, Exponentiation of natural numbers, , and its agreement with the integer power in , The principle of mathematical induction).
At , the prepared state is a Grover eigenvector with phase (Grover eigenphases encode the good probability).
An exact-grid phase is returned at its exact QPE label with probability one (Exact phase recovery on the QPE grid).
Count at scale runs QPE on the counting Grover iterate with phase labels, including the one-qubit circuit when (Quantum counting by uniform-state amplitude estimation).
Proof
If , [F7] gives phase ; at the first rough scale , [F9] and [F8] give label , so the loop stops at . For , , and [F2] gives . Once , this is at most .
Suppose and put . Choose a natural by [F6]. Induction using the natural-power recursion gives , so a dyadic scale exceeds ; scanning the rough scales in order reaches a first . Its preceding scale is smaller than , hence . By [F5], a rough Count at scale costs controlled- calls. The rough query costs below sum to less than . If the loop reaches , each later zero outcome has conditional probability at most by step 1.1; reaching the th later scale costs at most and has probability at most . Hence the expected tail is bounded by . If the cutoff occurs before , it only removes terms from these upper bounds. Thus the expected rough cost is . If is the actual stopping scale, its final rough Count costs calls since , so is at most twice the expected rough query cost and is also .
The final dyadic is less than twice its threshold, so . By [F5], the final Count uses calls; for , the bound on in step 2.1 therefore gives expected final controlled- calls, while the rough term is absorbed because . If , step 1.1 gives , so the rough cost is one call and the final size is , matching . If , the cutoff scale lies in , the geometric rough-call sum is , and the final schedule uses calls by [F5]. Thus the stated zero-case cost retains the factor.
Each repeated controlled- call contains exactly one controlled factor by [F3]; [F4] keeps that query count separate from controlled and other gates. Thus the stated membership-reflection and resource counts follow.
Relative approximate counting success guarantee
Statement
For the dyadic relative-counting procedure with rational , if its integer output is within of with probability at least . If , every rough and final Count output is exactly zero, the loop stops at its finite cutoff, and the output is zero with certainty.
For every stated input, both dyadic scheduling loops terminate and the final certified integer rounding terminates. The final scale is the least dyadic value at least , hence and . Fresh preparations and all controlled access and bit costs remain as declared.
Facts & Assumptions
Given: The relative-counting algorithm, , integer marked addresses, and rational .
The rough loop doubles , stops on nonzero label or , and uses final (Relative approximate counting with unknown marked count).
Fresh Count has zero-label probability , with exact zero endpoint (Exact zero-label probability for counting).
The final Count raw error has the bound and probability at least (Quantum counting error and boundary cases).
For , , and for , (Sine chord and linear bounds).
The cosine power series and alternating-series remainder apply at (Sine and cosine defined by their real power series, The alternating series test: if is nonincreasing with then converges, the sum lies between any two consecutive partial sums, and the error after terms is at most ).
, sine is nonnegative on , cosine is nonnegative and decreasing there, and the mean value theorem turns a nonnegative derivative into monotonicity (The derivatives of sine and cosine are cosine and minus sine, Signs, monotonicity intervals, and ranges of sine and cosine, The mean value theorem, as the case of Cauchy's: for continuous on with and differentiable on there is with ).
The sine double-angle formula is (The addition formulas for sine and cosine).
Count is defined for every power-of-two label size and uses the explicit controlled membership reflection (Quantum counting by uniform-state amplitude estimation).
The exact zero-label probability is the kernel in Exact zero-label probability for counting.
The rational upper bound exceeds (Rational bounds for pi used in finite schedules).
Certified integer rounding returns an integer within of the raw algebraic value (Terminating certified rounding for a counting estimate).
The exact label and interval operations are classical postprocessing (Classical bit-operation cost).
The real field is Archimedean, natural powers obey , and induction holds on the naturals (Every complete ordered field is Archimedean, Exponentiation of natural numbers, , and its agreement with the integer power in , The principle of mathematical induction).
Proof
The rough loop starts at and doubles each round. By [F26] choose a natural . Induction gives for every natural : it is equality at , and . Thus after at most rounds the scale has been reached, so ; the other stopping condition can only make the loop stop earlier. By [F21]–[F22], is exactly a nonzero raw estimate test.
Suppose and put . Let be the largest nonnegative index such that for every ; the condition is vacuous for . This index is finite because and the powers of two are unbounded by [F26]. For each rough scale with , one has and , because . Thus cutoff cannot occur during these rounds.
The threshold is a positive rational. By [F26] and the induction argument in step 1.1, some power of two exceeds , so the doubling loop terminates; its first value is the least such power and satisfies . Since and , , so is even and at least , as required by Count and the rounding lemma. Since , and . The rounding step [F24] terminates and makes the integer output explicit; its bit work is covered by [F25].
For , define . By [F7], and , so the mean value theorem gives . At each rough scale , this and yield by [F2]. Fresh runs make their zero events independent. If , then and [F8] gives , using , , , and the decrease of nonnegative cosine from [F7]. If , the empty product is .
On the event that the first rough labels are zero, the loop cannot terminate before rough scale : none of scales , , triggers the cutoff by step 1.2, and the first labels are zero. By maximality of , , so . The loop therefore terminates at some scale , whether by a nonzero label or by the cutoff. Thus [F1] gives , in particular . Applying [F3], using and , gives . The trigonometric inequality follows from [F4] with .
Each Count call uses a fresh preparation; the algorithm uses only the supplied access capabilities in [F21]. It is a finite procedure with exact finite stopping tests and certified final output, but no success or query-cost bound follows from this definition alone.
Since by the alternating cosine series [F6], [F5] gives , where the last comparison is after cross multiplication. The final Count is a fresh run, so conditionally on the rough outcomes it succeeds with probability at least ; multiplying by the rough-event probability proves joint probability greater than .
The output integer differs from by at most by [F1]. If , raw error plus rounding is at most , so the integer equals . If , then and , so total error is at most .
If , every Count phase is exactly zero by [F2], so rough labels are zero and cutoff eventually terminates. The final Count is also exactly zero, and certified rounding returns zero. This proves the zero-count branch and completes the success guarantee.
5 · Examples, counterexamples and false statements
None yet.
Sources
- Brassard, Høyer, Mosca, and Tapp, Quantum Amplitude Amplification and Estimation, complete article, §§4–5, Theorems 11–18
- Andrew M. Childs, Lecture Notes on Quantum Algorithms, complete lecture notes, §§19.1–19.3
- Ronald de Wolf, Quantum Computing: Lecture Notes, complete 239-page notes, §7.3
- Suzuki et al., Amplitude estimation without phase estimation, complete article, §§2–3.2
- Brassard, Høyer, Mosca, and Tapp, Quantum Amplitude Amplification and Estimation, §4, integer rounding after Theorem 13; rational-interval realization specified here