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.
Quantum-Walk Search and Element Distinctness
1 · Prerequisites
- Absolute and Conditional Convergence; Rearrangement; Products
- Algebraic Closure, Embeddings, and Separability
- Algebraic Extensions, Extension Degree, and Finite Fields
- Binary Operations, Monoids, Groups and Subgroups
- Boolean Circuits and Nonuniform Complexity
- Bounded Linear Operators and Quotient Spaces
- Channels, Kraus, Choi, and Stinespring Representations
- 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
- Complexification, Realification and Real Structures
- Composition Series, the Jordan–Hölder Theorem and Solvable Groups
- Conditional Distributions and Regular Conditional Probability
- 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
- Discrete Quantum Walks and Szegedy Theory
- 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
- Eigenvalues, Eigenvectors and the Characteristic Polynomial
- Filters and Ultrafilters
- Finite Counting, Factorials and Binomial Coefficients
- Finite Dimensional Normed Spaces and Riesz Lemma
- Finite Fourier Analysis and the Fast Fourier Transform
- 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
- 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
- Markov Kernels and Markov Chains
- 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
- pi: the Equivalent Characterizations
- Polynomial Rings, the Division Algorithm and Roots
- Power Series and Real-Analytic Functions
- Primes, Euclid's Lemma and the Fundamental Theorem of Arithmetic
- 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
- Recurrence Transience and Hitting Times for Markov Chains
- Registers, Tensor Products, and Partial Trace
- Relations, Functions, and Quotients
- Resource Bounds and Machine Invariance
- 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
- Stationary Markov Chains and Ergodic Limits
- 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 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
Finite reversible chains give the stationary mass and marked-state promises used by both classical and quantum search. A lazy symmetric chain admits a direct compression estimate for survival outside the marked set; absorbing marked rows turn this estimate into a discriminant decomposition for Szegedy phase detection. The page distinguishes a decision bit from a measured marked label and records state preparation, row access, controlled access, checking, gate operations, precision, and query counts as separate costs.
For element distinctness, the fixed-size lazy Johnson walk stores the function values on an -subset. Its spectrum is proved locally from finite incidence maps, so the absolute gap and the probability of including a fixed colliding pair are explicit. A local stored-data construction supplies coherent row preparation, its controlled inverse, and the proved row-reflection and walk-query bounds. These quantities combine with reversible-walk finding to give the value-query bound. A separate QRAM theorem defines canonical hash-bucket and nested skip-list storage, proves its bounded lookup and update subroutines, and records the uniform-subset and complete row-access gate costs as explicit inputs. An ordinary Boolean-circuit value oracle retains its own reversible gate and explicit-depth costs.
3 · Logical flowchart
4 · Definitions, theorems and proofs
Marked sets, stationary mass, and walk-search tasks
Definition
Let be a finite reversible Markov chain with positive stationary law, as in Finite reversible Markov chain with positive stationary law, and let be a set of marked states. Its stationary marked mass is
For a specified threshold , the marked-set detection promise problem has yes-instances with and , and no-instances with . The required classical output is one bit distinguishing these two cases; its permitted failure probability is a separate algorithm input. In the uniform-chain case, , so .
The marked-state finding promise problem has inputs with and requires a classical output . It is a different output relation from detection. A claimed output is checked by the declared finite projective measurement and marked predicate; the corresponding outcome law is Finite projective measurements and Finite POVMs and their outcome law. The encoding of , the coherent marked predicate, and all state-preparation and transition circuits are supplied input data, not consequences of the finite chain matrix.
Finite-chain hitting time and survival law
Definition
Let be the finite state set, its row-transition matrix, the marked set, , and the principal submatrix indexed by . For an initial probability row vector , the hitting-time survival law is
where is the restriction of to and is the all-ones column vector on . This is the finite sum of probabilities of all length- paths that remain in ; it does not require a path-space construction. For the right side is ; for it is .
The hitting time is the -valued variable determined by this survival law. Its extended expectation is , and a constant-success hitting bound is a specified integer for which is bounded below by a positive constant. These resource conventions are kept separate.
Discriminant of the marked-state absorbing walk
Statement
Let be a finite symmetric row-stochastic matrix on , and let , . Define the row-stochastic absorbing matrix
For the general row-stochastic discriminant of Szegedy row-preparation map and discriminant,
where is the principal submatrix on . In general need not be symmetric or reversible.
Facts & Assumptions
Given: A finite symmetric row-stochastic matrix , a marked set , and the stated row convention.
Finite row-stochastic kernel: each row of is nonnegative and sums to .
Szegedy row-preparation map and discriminant: the discriminant of a row-stochastic matrix has entries .
The Szegedy discriminant is self-adjoint and contractive: the discriminant entry formula holds for every finite row-stochastic kernel, without reversibility.
Proof
If , row of equals row of and sums to one by [F1]. If , row has a single at and zeros elsewhere. Thus is row-stochastic.
For , and , so [F2] gives . If , the product is exactly when and otherwise, giving the identity block. If exactly one of is marked, the transition from the marked state to the unmarked state is zero, so . These three disjoint cases give the displayed direct sum.
Spectral bound for a symmetric lazy walk killed on a marked set
Statement
Let be a finite set of size , and let where is a symmetric row-stochastic matrix. Let . Assume the second-largest eigenvalue of is at most , where . For , put , , and let be the coordinate orthogonal projection defined by for and for . Let restricted to vectors supported on . Then has spectrum in and
The empty compression has norm by convention.
Facts & Assumptions
Given: The finite symmetric lazy transition matrix , its uniform unit vector , the marked set , and the second-eigenvalue bound.
Finite row-stochastic kernel: and for every row.
Marked sets, stationary mass, and walk-search tasks: in the uniform case .
Complex spectral theorem: a normal endomorphism of a finite-dimensional complex inner product space has an orthonormal eigenbasis, and conversely: a finite-dimensional self-adjoint endomorphism has an orthonormal eigenbasis.
Self-adjoint and normal endomorphisms of a finite-dimensional real or complex inner product space: a self-adjoint endomorphism equals its adjoint.
The operator norm is zero on the zero domain and otherwise is max_{||v||=1} ||Tv||: on a nonzero domain, ; the zero-domain norm is .
Cauchy–Schwarz: , with equality exactly for linearly dependent vectors: in a real or complex inner-product space.
Proof
For any vector , weighted Cauchy–Schwarz, obtained by applying [F6] to and , gives . Summing over and using symmetry, so that every column sum is also , yields . Since is self-adjoint by its real symmetric matrix and [F4], [F3] gives a real orthonormal eigenbasis; the contraction inequality forces every eigenvalue of into . Thus is self-adjoint with spectrum in . Its row sums are , so .
If , then and the conclusion follows from [F5]. Otherwise choose a unit vector supported on and write with . [F6] applied to gives , so .
The orthogonal complement is invariant under by self-adjointness and . Its eigenvalues are at most by the stated second-eigenvalue hypothesis. Therefore .
The compression is positive semidefinite because for every vector supported on , by the nonnegative spectrum in step 1.1. It is self-adjoint, so its operator norm is its largest eigenvalue; equivalently it is the maximum of its unit-vector Rayleigh quotients. Step 2.1 bounds each such quotient by , proving the result.
Classical marked-set hitting bound from a spectral gap
Statement
Under the hypotheses of Spectral bound for a symmetric lazy walk killed on a marked set, suppose and start uniformly on . Then
so and steps give constant success probability. If , the hitting time is .
Facts & Assumptions
Given: The finite symmetric lazy chain and marked set from Spectral bound for a symmetric lazy walk killed on a marked set, and the survival-law definition of Finite-chain hitting time and survival law.
Spectral bound for a symmetric lazy walk killed on a marked set: , and the compression is positive semidefinite.
Cauchy–Schwarz: , with equality exactly for linearly dependent vectors: in a finite-dimensional inner-product space.
Proof
Let . For the uniform initial law on , [F2] gives . Since is positive semidefinite, it has eigenvalues in by [F1]; its th power therefore has operator norm at most . [F3] and prove the survival bound, including .
Put . For , the nonnegative-integer tail formula in [F2] and the finite geometric partial sums give . For the constant-success bound choose . Since , we have ; the finite binomial expansion gives . Hence . If , step 1.1 gives zero no-hit probability for every , so one step suffices. The case is immediate from the definition.
Random-access quantum-memory gate model
Definition
Let a QRAM contain an ordered classical memory word , with . Its random-access quantum-memory gate acts on an address register encoding , a target bit , and the memory register by
For address superpositions, this basis action is extended linearly. On valid addresses it swaps the target with the addressed memory bit, so the gate is an involutive permutation of the ordered computational basis and hence unitary; unused address encodings, if any, are fixed. One call has cost one QRAM gate-time unit by this model's convention. A read into a clean scratch target followed by copying and restoring the addressed bit uses the corresponding additional calls. The memory word itself, its address width, the circuit used to construct or update it, and the other ordinary gates are separate charged resources. This is a quantum random-access memory model; it does not assert an implementation by a bounded-arity ordinary circuit of the same gate count.
MNRS finite reversible-walk finding
Definition
This is the finite-generation and execution procedure OP2 in research/quantum-algorithms-planning/operational-contracts.md, section “OP2 — MNRS approximate reflection and finite tolerant recursive finding”, transcribed with its declared constants and charged branches.
Input. A finite ergodic reversible row chain with , a supplied positive dyadic rational lower absolute-gap bound , a dyadic rational marked-mass lower bound with promise or , a coherent marked-bit check of cost , and a dyadic rational failure target . These finite parameter encodings suffice for real positive promises: choose dyadic lower bounds within a factor of two of the gap and nonzero marked-mass bounds, and a dyadic target in for desired failure probability . Write and let be the row isometry of Szegedy row-preparation map and discriminant. The supplied clean preparation maps its specified blank input to the stationary edge state returns all its work registers to their specified blank states, and has charged cost . The row-access interface of Finite row-preparation access model for a Szegedy walk supplies the row-preparation unitary , its inverse, controlled forward and inverse calls, the clean-state reflection and its controlled call, and the swap and its controlled call. On the clean-work logical walk space these implement , , and , with each constituent charged. Supply controlled calls to and for the coherent QPE circuits and an exact controlled for the all-zero branch. A single bound covers each controlled or call and the controlled call, including their factorwise implementation costs. A matrix alone supplies none of these circuits.
Marked check and retained-state instrument. Write . The supplied exact coherent check is a unitary with separately supplied inverse and specified fresh flag and scratch . On the declared logical encoding it satisfies, for every , , and vector of all existing remaining registers, Its unitary extension outside the logical encoding is supplied too. Thus it preserves the first label and every existing walk, phase, data, and work auxiliary on clean new scratch. In the relevant query/check cost coordinates, bounds each forward and inverse check call; declare the flag-readout cost separately and include it in in any coordinate that counts readout as a check. A flag readout uses no value-oracle query. Gate, output-bit, and new flag/scratch costs are separately priced.
On the whole existing register space set and , with identity on every existing auxiliary, including every retained . Every marked/unmarked test below uses the specified Lüders instrument in the sense of Finite instruments and conditional states: its positive-probability conditional density is ; no conditional state is assigned when that trace is zero. Execute the test by appending , applying , reading only the fresh flag with the explicitly chosen computational-basis Lüders maps , where , storing in the classical output record, and applying to return the fresh flag and scratch to zero. Retain every pre-existing register; on an unmarked result read no finer first-label information. A marked result may then be followed by label readout and verification for output. Charge one forward check, one inverse check, and one flag readout per test, hence in the stated query/check profile. The recursive marked phase flip is implemented by , a phase on flag , and , also with both calls charged.
Approximate stationary reflection . Set and , using exact integer/rational comparisons. With , these comparisons give using from The Gregory-Leibniz series: pi over four equals 1-1/3+1/5-1/7+.... Append separate -bit zero phase registers. Coherently execute the finite QPE circuit prefix from Quantum phase estimation on in each register, using the declared controlled powers. This prefix is a unitary circuit on the full walk register and is executed on arbitrary walk states, including superpositions; the eigenvector input in the QPE analysis is not a restriction on the circuit's action. Do not measure these phase registers. If at least one phase register is nonzero, apply to the walk state. If all are zero, apply the exact controlled row-space reflection using the charged row-preparation, inverse, and clean-state reflection calls. Reverse the coherent QPE prefixes in reverse chronological order, using the supplied controlled inverse powers. Charge controlled and calls, the controlled branch, all-zero comparisons, phase-register gates, and the allocated classical arithmetic. The all-zero branch is required: has the extra zero-phase subspace , where , while on the stationary state.
Recursive circuit . Let , for , and . For , allocate a fresh for and execute chronologically: (i) , the marked phase flip, and ; (ii) coherently test every older , , applying if any is nonzero and otherwise applying on the walk and fresh ; compute and uncompute the control predicate; (iii) apply . Each is rational, and the loop in is an exact rational comparison. An inverse means the exact reversed finite gate list, not a reset of measured work.
Tolerant finding wrapper. If , take fresh stationary samples, verify each label, return the first marked label, and output NO MARKED if all fail. Otherwise, let be the least integer such that . Determine it by the exact algebraic threshold comparison ; equality takes the branch. Let , found by exact rational comparisons. In each outer trial:
- Prepare a fresh stationary sample, test its first label, and return it if marked.
- Prepare a fresh stationary walk state with all zero.
- For , apply , execute the marked/unmarked Lüders test specified above, and on a marked outcome read, verify, and return the label. On an unmarked outcome retain the conditional current state and all auxiliary registers, and continue; do not reprepare or reset them.
- If no level succeeds, discard the trial and begin the next fresh outer trial.
If all trials fail, output NO MARKED. Every loop has a finite cap; all confidence calculations, comparisons, reversible predicates, retained auxiliary space, state preparation, update, inverse, controlled, reflection, and check costs are charged. In the branch, the cap above gives false-negative probability at most ; in the other branch correctness and the sharper cost are proved separately in Finite reversible-walk finding cost.
Element-distinctness Johnson walk and value access
Definition
Let , let be a finite nonempty value set, and let , where . A coherent value oracle is a supplied finite unitary with an explicitly specified injective encoding for some finite , and action on valid addresses and target strings, as in Coherent XOR function oracle. Injectivity ensures that stored encodings compare equal exactly when the underlying values do. Oracle-query cost and ordinary gate-occurrence cost are separate coordinates under Finite circuit resource accounting. The function table or name alone supplies no oracle circuit.
For and , the lazy Johnson walk has state space and transitions
with all other entries zero. Its marked vertices are
The stored data at are the labeled values . Preparing the uniform -subset state and loading these values has value-query cost , with subset preparation gates charged separately. A neighbor update erases the removed value and loads the added value, so its value-query cost is ; the XOR oracle is its own inverse. Checking whether the stored subset is marked uses no further value queries, so , but comparison gates and memory accesses are charged. After measuring a marked subset, scanning its stored values outputs a colliding pair with no additional value query; the scan's gate/time cost remains separate. For , use direct pairwise comparison rather than the -subset walk. The lower bound is essential: a one-element subset cannot contain a collision pair.
Canonical hash-bucket and nested skip-list storage
Definition
Let , , and with the injective value encoding in Element-distinctness Johnson walk and value access. Put , , , and , and assume . Fix as part of the representation a monic irreducible polynomial of degree over and its polynomial-basis field ; the storage is canonical relative to this fixed field representation and the hash seed. Choose independent uniform coefficient tuples in and use them as coefficients of degree-at-most- polynomials . For each , let be the field element whose -bit polynomial-basis coordinate string is the -bit binary encoding of ; these elements are distinct. Let be the integer represented by the low bits of , and let be the low bit of . The height of is the number of consecutive bits starting at , capped at ; equivalently, exactly when .
For a subset , the fixed memory word has hash buckets, each with slots, and one overflow bit. If no bucket exceeds capacity, every is stored in bucket ; occupied slots are sorted by index, and each record contains , , and its skip-list fields. A node identifier is the input index ; resolving it means computing and scanning that bucket. If any bucket would exceed capacity, set the overflow bit and put the same fixed sentinel in the data slots. Thus the represented word is a total, unique function of the subset and seed; the skip-list structure is valid exactly when the overflow bit is zero.
The storage also contains two nested skip lists, one in increasing index order and one in lexicographic order of . Level of either list, for , contains exactly the keys with height at least ; level contains all keys. Each forward pointer names a node identifier and stores its span, the difference between the source and target ranks in level (the head sentinel has rank ). These spans support rank and select operations. The two lists, bucket positions, pointers, and spans are the unique ones determined by ; they do not depend on the path used to reach . A capped search inspects at most forward entries at each level before raising an overrun flag. This definition specifies a finite representation and search convention; it does not assert a probability or cost bound.
Spectrum of the lazy Johnson walk
Statement
Let and . For the lazy Johnson transition matrix on the -subsets of from Element-distinctness Johnson walk and value access, all eigenvalues, counted with multiplicity, are
with multiplicity , where . They are nonnegative, and for the uniform stationary law the absolute spectral gap, in the sense of Absolute spectral gap of a finite reversible chain, is
Facts & Assumptions
Given: The finite state space and the lazy transition probabilities of Element-distinctness Johnson walk and value access.
Element-distinctness Johnson walk and value access: stays at a subset with probability and replaces one of its elements by one of the elements outside with probability for each replacement.
Rank-nullity: : for a linear map with finite-dimensional domain, .
For a subspace of a finite-dimensional inner product space, : for a subspace of a finite-dimensional inner-product space , .
The adjoint is characterised by : for every .
Adjoints satisfy , , , and : for compatible finite-dimensional maps, ; also and .
Finite reversible Markov chain with positive stationary law and Absolute spectral gap of a finite reversible chain: a positive stationary law and detailed balance make the chain reversible, and its absolute gap is on the mean-zero subspace.
Proof
For , let with the standard coordinate inner product, linear in the first argument as in Real and complex inner product spaces, with the inner product linear in the first argument. For , define the up map by and the down map by . Expanding the finite sums with this convention gives by [F4], . Put equal to zero. For and , the diagonal terms in occur times, the diagonal terms in occur times, and both have the same off-diagonal replacement terms. Hence , where the second term is zero for .
Taking the inner product of the identity in step 1.1 with gives . Since for , is injective, so [F2] gives . By [F4] and [F5], . Apply [F3] to ; the projection onto along is linear, with image and kernel , so [F2] gives . Applying [F2] to then yields , so is onto. Put and for ; [F2] gives .
If , repeated use of step 1.1 gives, for with , For this is the commutator identity and . Empty products of raising maps mean the identity. If it holds at and , apply the commutator at level ; the coefficient becomes , proving the formula for .
On , the Johnson adjacency operator is : the diagonal choices in return the same subset, and every other term replaces exactly one element. Since by step 1.1, [F6] gives . For , applying step 3.1 with shows that is an eigenspace of with eigenvalue . For , the empty raising product is the identity on , and gives directly, the same formula. The raising maps are injective by step 2.1, so this eigenspace has dimension . These eigenvalues are distinct because consecutive values differ by for . For in eigenspaces with distinct eigenvalues , self-adjointness gives ; hence the eigenspaces are mutually orthogonal. Their dimensions sum telescopically to , so their direct sum is all of .
The nonlazy transition is by [F1], and the lazy transition is its average with the identity. Therefore its eigenvalue on the th eigenspace is The transitions are symmetric and row-stochastic, so the uniform positive law is stationary and satisfies detailed balance; [F7] makes this a finite reversible chain and defines its absolute gap on the mean-zero subspace. The eigenspace has multiplicity one and is spanned by the constant vector. The other eigenspaces are orthogonal to it by self-adjointness, and their eigenvalues are nonnegative and decreasing in , since increases for . If is the orthogonal decomposition into these eigenspaces, then , with equality on a nonzero vector in the eigenspace. Hence the norm of on the mean-zero subspace is . The smallest eigenvalue is , since . Therefore the absolute gap is , as stated.
Finite reversible-walk finding cost
Statement
Let be a finite ergodic reversible chain with actual absolute spectral gap . Supply the algorithm with a dyadic rational lower bound and suppose the marked set is empty or has stationary mass at least the dyadic rational lower bound . Let the dyadic rational failure target be . Let be the cost of preparing the stationary walk state, a common upper bound for one controlled or update and the exact controlled row-space reflection used by the construction, and the cost of a coherent marked check. For , one outer trial of MNRS finite reversible-walk finding with gap input has one-sided error, finds a marked state with probability at least when one exists, and uses
in the corresponding query/update/check cost coordinates. The capped wrapper with failure target uses in that profile. When , its direct-sampling branch uses . If the actual gap is dyadic and supplied exactly, one may set ; otherwise a dyadic lower bound within a factor of two gives the same asymptotic bound in the actual gap. For gate, width, precision, and bit-time coordinates, the phase-register gates, controlled reflection, comparisons, numerical generation, and retained workspace are charged separately.
Facts & Assumptions
The finite dyadic inputs retain all real promise cases: for any positive real lower bounds and desired failure target, choose dyadic lower bounds within a factor of two and a dyadic target no larger than the desired failure probability.
Given: The finite reversible chain and marked promise, the finite access model of MNRS finite reversible-walk finding, and the constants in its displayed algorithm.
Marked sets, stationary mass, and walk-search tasks: is the actual stationary mass; on a promised nonempty instance , and finding returns a marked label.
Absolute spectral gap of a finite reversible chain and Absolute gap equals one minus the largest nonconstant eigenvalue modulus: a one-state chain has actual absolute gap ; for an ergodic chain with at least two states, . The supplied algorithm parameter satisfies .
Szegedy spectral mapping for one and two reflections: on the signal planes of , a discriminant eigenvalue contributes phases ; the stationary eigenline has phase zero and the orthogonal complement has phase zero but lies in .
Quantum phase estimation and Eigenphase estimation access model: an -bit QPE uses controlled powers of the stated unitary and its forward phase-register convention.
Phase-estimation finite outcome law: on an eigenphase , outcome has probability .
Finite geometric sum for phase-estimation amplitudes and Sine chord and linear bounds: for , , and for .
Exact phase recovery on the QPE grid: phase is returned as with certainty.
Phase estimation on a superposition of eigenspaces: a coherent phase-estimation circuit acts blockwise on the finite orthogonal eigenspaces, so a uniform eigenphase bound holds on their superpositions.
Phase-estimation query and gate costs: an -bit QPE made from one controlled-step oracle uses controlled-step calls; its phase-register gates are counted separately.
For , , so every finite partial sum is at most by telescoping.
The Gregory-Leibniz series: pi over four equals 1-1/3+1/5-1/7+...: for , with , hence .
Sine and cosine are -Lipschitz on : , in particular for .
Finite projective measurements specifies orthogonal outcome projections, and Projective measurement outcome weights are probabilities establishes only their outcome weights . The marked test in MNRS finite reversible-walk finding explicitly selects the Lüders branch on all existing registers; its conditional state when is by Finite instruments and conditional states. For any orthogonal projection , the vectors and are orthogonal and sum to , so and . This contractivity is an orthogonal-decomposition identity, independent of a state-update rule.
Signs, monotonicity intervals, and ranges of sine and cosine, Quarter-turn values and shifts by pi/2 and pi, and [F14]: , obtained from and at , with sine positive there.
The inner-product norm is definite, homogeneous, and satisfies the triangle inequality: the induced inner-product norm satisfies the triangle inequality.
The Szegedy discriminant is self-adjoint and contractive: , and in the reversible case , so the discriminant and transition operator have the same eigenvalues; is the orthogonal projection onto the row range.
Non-negative and positive operators defines nonnegative operators by self-adjointness and nonnegative quadratic forms; Finite POVMs and their outcome law defines a POVM as such effects summing to identity. A non-negative operator has a unique non-negative square root gives the unique nonnegative square root, and The square-root Lüders maps form an instrument makes the corresponding square-root branch maps a finite instrument. Conditional state for a projective measurement proves that is a density operator supported on the projected range when ; it is used here for the selected Lüders instrument. Dirac Notation Conversion gives the outer-product coordinate matrix , and The basis-independent trace of an endomorphism of a finite-dimensional vector space identifies its trace with the coordinate trace.
Proof
By [F2], the stationary eigenvalue is simple and every other eigenvalue of the reversible transition operator has . By [F20], the discriminant is similar to this transition operator and has the same eigenvalues; the stationary eigenvector corresponds to . In the two-reflection Szegedy walk, the circular phase distance of a nonstationary signal eigenvalue is . For , [F14] and [F15] give , so . Thus every nonstationary signal phase has circular distance at least . The only additional zero-phase subspace is the walk-space orthogonal complement in [F3], on which the exact row-space reflection equals ; on the stationary vector it equals .
In , the QPE scale satisfies by the algorithm's exact integer test and from [F11]. On the stationary phase , [F7] returns outcome in every register, so the all-zero branch applies and uncomputes; the stationary state is fixed exactly. For a nonzero signal phase at circular distance , the outcome-kernel [F5] and the geometric sum [F6] give . The first inequality follows because and . Repeating QPE coherently in fresh phase registers makes the all-zero branch norm at most . On a nonzero signal eigenvector, the actual reflection differs from the ideal only on that branch, where it applies ; before QPE uncomputation the difference is on the all-zero component. By [F20], for the orthogonal projection , so and orthogonal decomposition gives ; hence the coherent state error is at most . Reversing the QPE prefixes is unitary and preserves this norm bound. For each nonzero eigenphase, the QPE circuits use fresh registers and leave the walker eigenvector unchanged, so the joint all-zero probability is the product of the single-register bounds and is at most . For a superposition of eigenspaces, the joint all-zero branch is still block-diagonal in the orthogonal eigenspaces; expanding its squared norm gives the eigenspace-weighted average of these joint probabilities (the same orthogonal calculation as [F8]). Its branch norm is therefore at most times the input norm, and the same estimate applies. On , the phase is exactly zero and , so the algorithm also agrees exactly with the ideal reflection there. Thus the bound is a coherent state-vector bound, not just an outcome-probability statement.
The projectors of the algorithm are self-adjoint idempotents summing to identity. For each , , so they form a POVM by [F21]; each is its own nonnegative square root. The square-root-instrument theorem in [F21] therefore proves that the selected maps are a finite instrument, and its projective conditional-state theorem applies on positive-probability branches. For a unit vector of the whole existing register space, the algorithm's clean check sends to . The specified computational Lüders readout of the fresh flag selects precisely ; after recording , the inverse check maps this vector to . The resulting branch on the original registers is thus exactly . Its coordinate trace is by [F16] and [F21]. If , division gives the pure conditional vector ; if , the branch has zero weight and no conditional state. The identities hold on all retained auxiliary registers, even when entangled with the first label; only the fresh flag and scratch are cleared. Each test uses one forward check, one inverse check and one separately priced flag readout, so it costs in the algorithm's query/check profile. The same compute/phase/uncompute word implements the exact marked phase flip with two check calls and its separately priced phase gate.
Let be any orthogonal projection and let be unit vectors with . Put and . By [F16], is contractive, so ; [F19] gives . If and the actual projected branch has positive probability (so ), [F18] yields The same estimate applies when one input is an ideal state and the other differs by a known reflection-error vector.
For the recursive branch suppose and put . If , the initial stationary sample already succeeds with probability at least , by [F1] and [F16], so no angle analysis is needed. In an exact recursive amplitude-amplification step, the marked phase flip followed by reflection about the current state triples its marked angle. In the ordered marked/unmarked basis, write and . The reflection matrix is . Multiplying it by gives first coordinate and second coordinate , using [F13] and [F14]. At level , let be the actual angle after , let , and put . Let be the first ideal index with ; then and, if , every has . Inductively implies . By [F11] and [F15], the right side is less than , while by [F17]; hence both angles lie in . On the input to the level- approximate stationary reflection, after conjugating by , the component orthogonal to the stationary vector has norm . By step 1.2 the reflection error on that component has norm at most . The marked-amplitude change is no larger than this norm: the marked projector is orthogonal by [F16], so its orthogonal decomposition makes it contractive, and [F19] bounds the change in projected norms by the vector error. To compare triple angles, set for , so by [F14]. The identity shows that the absolute difference of the two double-angle values is at most : for , the function is increasing because its square difference is , while The case is symmetric. By [F13], the triple-angle difference is , whose coefficient has absolute value at most because . Therefore, for , For these indices by [F15], so the last inequality follows.
Define and . Suppose inductively that ; then step 2.1 gives . Also satisfies . Since and for , telescoping by [F10] gives . Thus by [F11]. It follows that for , closing the induction and giving when . At the last step, . By [F13], and ; for the coefficient has absolute value at most . Therefore , since . If , and . Finally , so on a fresh stationary state has marked amplitude at least .
In the tolerant wrapper, after an unsuccessful marked measurement at level , let be the normalized unmarked component and let be the normalized unmarked component of the ideal recursive state . The actual state differs from by the previous input discrepancy , since the same unitary is applied to both inputs. By the explicit Lüders realization in step 1.3, the positive-probability branches are the normalized projected components on all retained registers, and [F16] gives their squared-norm probabilities. For , and , so and the unmarked norm exceeds (since ). Projecting the two states onto the unmarked subspace and normalizing gives : the projected vectors differ by at most , their norms differ by at most , and the ideal norm is at least . The ideal unmarked directions drift by at most : the error vector in the recursive reflection has norm at most , and normalizing its unmarked projection costs at most a factor . Also ; the equality follows from the inner product and the inequality from [F15]. Let . The preceding bounds give, for , Iterating this recurrence gives For the second inequality, interchange the finite sums: for fixed , , so its coefficient becomes less than . For the last inequality, by minimality and by the telescoping bound in step 3.1.
Therefore at the unknown successful level , the retained-state wrapper's marked amplitude is at least . Since , by [F11], and , this lower bound exceeds , whose square exceeds . By [F16], the next projective marked measurement succeeds with probability at least without resetting after earlier failed measurements.
If , every verified marked-output branch is impossible, so the algorithm never returns a false marked label. For , the least in the wrapper satisfies : minimality gives , and [F12, F15] imply for because . For any nonempty instance with , monotonicity of gives . When , the initial stationary sample succeeds with probability ; after its failure, the fresh stationary walk state in step 2 gives conditional success probability at least by step 5.1. Hence the whole trial succeeds with probability at least . If , the first sample alone succeeds with probability at least . Thus each outer trial succeeds with probability at least , so the exact rational-power definition of gives and the independent trials fail with probability at most . If , each direct stationary sample succeeds with probability at least by [F1, F16], and the exact rational-power definition of gives . Thus the error is one-sided and at most .
At level , the reflection uses QPE copies and controlled steps per copy by [F9]; its query/update cost is including the marked phase flip. Each wrapper marked/unmarked test has the compute/readout/uncompute cost in step 1.3. The recursion satisfies , so because . Summing for is geometric. The first stationary sample can be prepared by one call to and testing its first label, at setup cost at most ; if that test fails, step 2 makes one further fresh stationary edge-state preparation at cost . Since and the recursive and their actual adjoints contain only checks, walk reflections and controlled updates, they make no stationary-state preparation calls. Thus one outer trial uses at most two preparations, with both occurring on the empty-marked-set branch, and costs . Multiplying by the outer cap gives the low-mass statement; the direct-sampling branch costs . For other resource coordinates, [F9] separately charges QPE phase gates and registers, while the procedure separately charges , comparisons, coefficient precision, and classical arithmetic.
Szegedy-walk marked-set detection
Definition
Input. A finite symmetric lazy row-stochastic matrix on nonempty , with uniform stationary law and, when , real promised lower gap satisfying ; a marked predicate with promise or for real ; and a real failure target . Supply an exact two-outcome projective test on the first register with its Lüders instrument and declared cost ; this cost includes the marked-branch label readout and verification. The finite classical input supplies, for each , a certified dyadic bracket encoded by finite binary numerators and exponents, with The bracket containments are input promises; every endpoint bit and all subsequent comparison, precision, and bit-time costs are charged. Such a finite bracket exists for every real parameter in the stated interval. The numerical input model also supplies terminating exact comparisons for rational values and the algebraic real parts of roots of unity used below; it declares and charges their bit-time and description costs. Write , , and . Also supply a circuit preparing with its cost and a row-preparation access model for the absorbing chain of Discriminant of the marked-state absorbing walk. The model supplies , its inverse and controlled forms, the clean-state reflection and its controlled form, and the swap and controlled swap needed for the one-reflection walk; each constituent is separately charged. If , the procedure measures its sole label with the marked predicate and terminates exactly, without using the gap parameter or walk. Marked-check, preparation, controlled-walk, inverse, gate, precision, comparison, and description-bit costs are separate declared inputs. A matrix alone supplies none of these circuits.
Output. NONEMPTY if a marked label is found or the phase test accepts; otherwise EMPTY. A found label is returned and checked against the supplied predicate.
Instructions.
- If , measure its only label, evaluate the supplied predicate and return the exact answer. Otherwise set . Start at and increment until the exact comparison and set . Since the compared cosine is the real part of a root of unity, this is a finite exact algebraic comparison; it is equivalent to . Start at and increment until the exact rational comparison holds, equivalently . Both loops terminate because and . All comparisons and their bit costs are part of the declared input cost model.
- Repeat the following fresh-state run times, stopping early if
NONEMPTYis returned. - Prepare with and apply the supplied row preparation to obtain the two-register row state. On the first register, use the supplied two-outcome projective measurement with and , with Lüders branch maps . These maps form a valid instrument: the projections are non-negative, sum to identity, and equal their own non-negative square roots, so The square-root Lüders maps form an instrument applies. If outcome occurs, measure the first register in its computational basis, verify the resulting label , and output
NONEMPTYand immediately. If outcome occurs with positive probability, continue with its normalized projected state; this preserves coherence among all unmarked labels. Outcome is impossible when , so no conditional state is needed there. - On the unmarked branch, apply the coherent QPE circuit prefix from Quantum phase estimation to the conditioned two-register state for the one-reflection walk , where is the row-preparation map for . The QPE prefix is a finite unitary circuit and acts on this arbitrary conditioned superposition; its eigenvector input in the outcome analysis does not restrict the circuit's input domain. Measure the phase register only after the controlled-power and inverse-QFT circuit has run. Use supplied controlled powers if available; otherwise implement each controlled by sequential controlled one-step calls. The factorwise controlled call charges controlled , controlled , the controlled clean-state reflection, and controlled swap. No controlled inverse of is used.
- For the measured integer , compute using exact rational arithmetic. Since , the principal inverse-cosine convention and cosine monotonicity give . Return
NONEMPTYexactly when ; equality takes theEMPTYbranch. This strict comparison is finite: if accept, and if compare the algebraic numbers and , accepting exactly when the former is strictly smaller. Here is a rational multiple of , so its cosine is the real part of a root of unity; monotonicity of cosine on gives the stated comparison. Charge the exact comparison and all phase-register/inverse-QFT gates. - If all fresh runs fail to return
NONEMPTY, outputEMPTY. A run uses one marked check, the supplied uniform-state and one row-preparation costs, one -bit QPE, and its explicitly charged controlled-walk calls. With only one-step controlled access, QPE uses exactly controlled calls. Gate synthesis, bracket-description bits, exact comparison arithmetic, and classical threshold bits are additional charged costs.
Coherent Johnson row access with stored values
Statement
For the lazy Johnson chain and XOR value oracle in Element-distinctness Johnson walk and value access, write for the values at the indices of , in increasing index order. In the pure value-query model, encoded vertex preparation costs queries. Coherent row preparation and its inverse, including controlled versions, cost at most two queries each. The corresponding controlled row-space reflection costs at most four queries, and a controlled step and its inverse cost at most eight. A stationary two-register walk state costs at most queries, and its marked check uses zero value queries. Gates, memory, uniform generation, and exact coefficient preparation are separate resources; no gate-time bound is asserted.
Facts & Assumptions
Given: , , the lazy Johnson transition matrix, and the XOR value oracle, with its full valid-address action.
Element-distinctness Johnson walk and value access: a vertex stores labeled values; a neighbor replaces one selected index by one unselected index; markedness is decidable from stored values.
Coherent XOR function oracle: a query XORs the encoded value into its target; applying it twice cancels it.
Controlled Unitary Access and Inverse Unitary Access: controlled actions are identity/operation blocks and inverses reverse the complete circuit word.
Finite row-preparation access model for a Szegedy walk and Exact row-preparation access count for one and two walk steps: a row isometry implemented by a clean row-preparation unitary gives its range reflection by preparation, clean-input reflection, and inverse; uses four preparation/inverse calls and two swaps.
Gram–Schmidt turns every finite independent list into an orthonormal list with the same successive spans: a finite independent list can be orthonormalized with its successive spans unchanged.
Proof
Encode a vertex by the computational basis vector . Distinct subsets have orthogonal encodings, so replacing each logical vertex basis vector by this encoding is an isometry, as is its two-register tensor square. Subset arithmetic, label permutations, copying computational-basis data by XOR, and finite unitaries depending only on issue no value queries. A specified unit vector can be completed to an orthonormal basis as follows: append the computational basis in fixed order, retain each vector outside the preceding span, and apply [F5]. The resulting list spans and retains the initial unit vector; the linear map between the computational basis and this basis preserves squared coordinate norms and is invertible, hence unitary. In particular, prepare the uniform subset superposition with this exact finite unitary as its first column, then load the ordered values by queries. The claim is a query bound only: neither the number of gates of that unitary nor a uniform generator is being bounded.
From the encoded source vertex and a blank target register, a finite unitary depending only on prepares the second subset label in the Johnson row distribution: amplitude for and for every . For each source label this is a unit vector, and different sources stay orthogonal because the source register is unchanged; use the finite completion from step 1.1 in each source-label block to define a unitary on the padded registers. Reversible label arithmetic identifies the unique new index on a non-loop branch, and uses the fixed valid address on the loop branch. Copy to the target all values whose indices lie in , using the source stored values. Query into clean scratch, XOR it into the target new-value slot only on a non-loop branch, and query again to erase scratch. For a loop, copy the entire stored list and leave the computed scratch unused before erasing it. Uncompute the address and index-arithmetic scratch from . Thus two queries implement the encoded row isometry with all scratch clean. The row operation extends unitarily outside the valid-data subspace; no oracle-dependent table is hardwired into the nonquery gates.
Initialize the address scratch to the fixed valid address . To control this circuit, control its nonquery gates, leaving that address at on the control-zero branch, and still compute and erase it with the same two unconditional oracle calls; the middle XOR into the new-value slot is controlled by both the outer control and the non-loop flag. On control zero the two queries cancel and all other registers are fixed. Thus controlled row preparation costs two queries. Reverse the complete word for either inverse; it also costs two queries. Let the whole target-and-work register have a specified blank vector . The query-free reflection acts on the entire source register, including invalid source encodings; it performs no test for membership in the function-dependent set of valid encodings. Conjugating it by the row-preparation unitary gives the reflection about the image of all blank-target source states. The row-preparation unitary preserves the source register, so images of invalid source basis encodings stay orthogonal to logical encoded walk states. On the logical encoded subspace, the conjugated reflection therefore restricts to the range reflection transported by the isometry in step 1.1. Possible invalid data encodings never enter a logical walk state.
By [F4], one row reflection costs four queries, since its middle blank-state phase is query-free. Swapping both vertex-and-data blocks is query-free and preserves the valid encoding. Hence one controlled costs four queries and controlled costs eight; their inverses have the same counts. Preparing the encoded uniform first vertex costs , and one row call adds two, giving stationary edge-state setup at most . Markedness depends only on the stored first-vertex values and requires no further value query. All control predicates, comparisons, state preparation gates and retained registers remain separate charged resources.
Element-distinctness O(N^{2/3}) query bound
Statement
Let , be given by the coherent value oracle in Element-distinctness Johnson walk and value access, and suppose some distinct satisfy . For any , the lazy Johnson walk has absolute gap , marked stationary mass at least , stored-vertex setup value-query cost , elementary replacement-update cost , and check cost . The controlled row-access construction of Coherent Johnson row access with stored values supplies stationary edge-state setup at most , controlled row reflection at most , and controlled two-reflection walk/inverse at most value queries. The reversible-walk finding theorem therefore gives a marked-subset finder with success probability at least , using one outer trial (failure input ), and with
value queries. Taking gives queries. A measured marked subset contains a colliding pair among its stored values, which can be output without further value queries; comparison gates are separate resources.
Facts & Assumptions
Given: The Johnson walk and stored-value query convention of Element-distinctness Johnson walk and value access, its spectrum, and the reversible-walk finding guarantee.
Spectrum of the lazy Johnson walk: for , the lazy Johnson walk has nonnegative eigenvalues and absolute gap .
Element-distinctness Johnson walk and value access: states are uniform -subsets; the marked condition is that some pair in the subset has equal function values; setup costs value queries, a replacement update costs , and checking the stored values costs no value queries.
Finite reversible-walk finding cost: with a supplied gap lower bound and marked stationary-mass lower bound , one outer trial succeeds with probability at least on a nonempty instance and costs , where prepares the stationary edge state and bounds controlled , controlled , and the controlled row-space reflection.
Coherent Johnson row access with stored values: encoded Johnson row preparation, inverse and controlled access use at most two value queries per call; controlled row reflection uses at most four, controlled and its inverse at most eight, stationary edge setup at most , and checking zero.
Proof
The total number of -subsets is . The number containing a fixed pair is , so its uniform probability is Every subset containing this colliding pair is marked, so the marked stationary mass is at least this value.
Apply [F1] to the lazy walk in [F2]. Its stationary law is uniform and its absolute gap is the displayed ; the nonnegative spectrum rules out a negative-eigenvalue obstruction to the absolute gap. For any positive rational , let for the least integer with ; exact rational comparisons compute it and give . Supply the dyadic lower gap bound . The initial stored list requires one query for each of its values. Replacing one selected index by one unselected index erases the old stored value with one inverse value query and loads the new value with one forward value query. The marked check compares the already stored values, so it costs no additional value query. Explicitly, the basis permutation , where is the collision bit of the stored list, is a clean coherent check: it preserves the list, needs no value-oracle call, and is its own inverse. Tensoring identity on every other existing register gives exactly the check interface in [F3]; its fresh-flag Lüders readout and inverse therefore add zero value queries as well, with gates and readout resources separate. These are stored-vertex setup and elementary replacement costs. The coherent row construction [F4] separately supplies the stronger access inputs required by [F3], with stationary edge setup , common controlled-walk/inverse/row-reflection bound , and .
Put and supply the dyadic lower marked-mass bound . For and , and , hence and . Also gives , so by step 2.1. Since , , so [F3] applies even if the actual marked mass is larger. Run the wrapper with the dyadic failure target . Since , its cap is exactly , and [F3] gives success probability at least . Its two fresh stationary preparations use at most value queries by [F4], while the recursive search uses . The total is therefore , with the additive absorbed since . The measured set is marked; by [F2] it contains two indices with equal stored values, and scanning those stored values identifies such a pair without a new value-oracle query.
For , ; for , the displayed clamp selects an admissible integer in . The clamp differs from by only fixed factors over this finite range and is for all . Therefore both and are . If , the definition specifies direct pairwise value comparison instead of a Johnson walk; querying each value once uses at most value queries.
Walk detection correctness and cost
Statement
Let be a finite symmetric lazy transition matrix on a nonempty finite set , with uniform stationary law. Fix real promise parameters and . When , suppose ; the marked-set promise is or . The finite algorithm input includes certified dyadic brackets for with ; the containment is an input promise and every endpoint bit and comparison cost is charged separately. Such brackets exist for every allowed real parameter. For , the promise parameters are unused. Write , , and . Give the algorithm the stated uniform-state circuit, a row-preparation access model for the absorbing chain , its controlled and inverse calls needed for the one-reflection walk, the marked check, and all their separate costs. Put
where the least-integer formulas are exactly the finite comparisons used by the algorithm. Then Szegedy-walk marked-set detection has no false positive on an empty marked set and outputs NONEMPTY with probability at least on every promised nonempty instance. For , let , where the terms are the supplied uniform-state and one row-preparation costs, an upper bound for the initial marked/unmarked Lüders test and its marked-branch label readout and verification, the cost of one controlled one-reflection walk call, and the phase-register preparation and inverse-QFT gate cost. Its worst-case charged quantum cost is at most
when only one-step controlled-walk access is supplied. The factorwise implementation of charges one controlled row-preparation inverse, one controlled row preparation, the controlled clean-state reflection, and the controlled swap. With separately supplied controlled powers, replace by the sum of their declared costs. The bracket ratios imply and , so the approved all-real parameter scope retains the same asymptotic resource bound. This is a detection result; a NONEMPTY phase-test outcome does not supply a marked label. Synthesis, endpoint bits, exact algebraic/rational comparisons, description bits and precision remain separate coordinates.
Facts & Assumptions
Given: The symmetric lazy chain and promise, the absorbing-row access and marked predicate in Szegedy-walk marked-set detection, and the QPE cutoff and repetition parameters above.
Spectral bound for a symmetric lazy walk killed on a marked set: is positive semidefinite and when the uniform chain has second eigenvalue at most and . The actual gap satisfies ; on a promised nonempty instance .
Discriminant of the marked-state absorbing walk: is row-stochastic and its Szegedy discriminant is .
Szegedy spectral mapping for one and two reflections: for the one-reflection walk , a discriminant eigenvalue gives walk eigenvalues ; at the corresponding row-space line has eigenvalue .
Phase-estimation nearest-grid and tail bounds: for and , QPE has probability at most of circular phase-estimation error at least .
Phase estimation on a superposition of eigenspaces: QPE outcome probabilities on an orthogonal eigenspace superposition are the mixture of the eigenphase outcome laws with the squared eigenspace norms as weights.
Exact phase recovery on the QPE grid: a zero phase is returned as outcome with certainty.
Phase-estimation query and gate costs: an -bit QPE from one controlled-step oracle makes exactly controlled-step calls; phase-register gates are charged separately.
Exact row-preparation access count for one and two walk steps: the factorwise controlled implementation of one charges one controlled inverse row preparation, one controlled forward row preparation, one controlled clean-state reflection, and one controlled swap.
Dirac Notation Conversion: orthogonal computational-basis labels define the finite register measurement and its projected outcome branches.
The Szegedy discriminant is self-adjoint and contractive: the transition-state map is an isometry, so distinct basis row states are orthogonal and each has norm one.
Circular phase distance modulo one: for , distance to zero is , equivalently the distance from to its nearest integer.
Finite projective measurements and Projective measurement outcome weights are probabilities give the projectors and their outcome probabilities. The algorithm explicitly supplies the Lüders instrument for the binary marked/unmarked projectors; The square-root Lüders maps form an instrument validates its branch maps, and Conditional state for a projective measurement identifies each positive-probability conditional state as the normalized projected state.
Signs, monotonicity intervals, and ranges of sine and cosine: cosine is strictly decreasing on .
Sine and cosine are -Lipschitz on : for , .
Proof
If , the supplied predicate is evaluated on the sole label and the procedure returns the exact answer. Assume henceforth . In the empty case , , and the prepared row state is , where . Symmetry of gives , so [F3] places it on the eigenline and its phase is exactly zero. The first marked check cannot accept, and [F6] makes QPE output , for which the strict cutoff fails. Thus neither branch falsely accepts.
In a nonempty instance write . The first-register check measures a uniformly distributed label; if it is marked, the algorithm accepts immediately, including the endpoint . Otherwise is nonempty and the conditional row state is , with . By [F10], each first-register outcome has squared norm under , and [F12] projects onto the sum of exactly the unmarked row vectors and normalizes it.
On , [F1] and the promises give . Hence its eigenvalues are at most and their one-reflection phases have circular distance from zero at least . The state lies in and is orthogonal to every marked row vector , , because those vectors have a distinct first-register label; the orthogonality also follows from the isometry [F10]. It therefore has no marked component and no component in . The decomposition [F2] and spectral mapping [F3] show that all its spectral components are the nonzero-phase signal components just bounded.
The choice of gives . By [F13], , and [F14] with and therefore gives , or . Also , so by [F13] and [F17]; [F14] gives . Thus the branch comparison in algorithm step 5 is exact: implies , while for both angles lie in and strict decrease of cosine makes equivalent to ; equality takes the rejected branch. Set . Then , so [F4] bounds the probability of a circular QPE error at least by . To justify the needed distance comparison from the definition [F11], take and . Choose nearest integers to , respectively, so and . Since , its distance to the nearest integer is at most its distance to the particular integer ; hence Thus . On every outcome with estimation error , step 2.1 gives Thus the algorithm accepts on that outcome. By [F5] the same failure bound holds for the whole conditional state, so a phase-test run accepts with probability at least . Including the initial marked-label branch can only raise its success probability.
Each fresh run therefore misses a promised nonempty set with probability at most . Independent fresh preparations make the probability that all runs miss at most by the definition of and the certified bracket. The empty case remains exact by step 1.1. The output relation only asserts the decision bit, since the phase-test branch measured no marked label.
For , a run makes one supplied uniform-state preparation, one row preparation, one initial marked check, one -bit QPE, and then at most controlled calls by [F7]. If each controlled walk is expanded factorwise, [F8] supplies its four separately charged calls. Multiplying this worst-case per-run sum by proves the cost upper bound; early stopping only reduces it. For , the exact branch uses only the sole-label predicate check. The named gate, query, synthesis, precision and bit coordinates are not combined, by the stated input accounting. To relate the finite parameters to the real promises, put . Then by [F15]–[F16], so . The least-power-of-two choice gives ; since , . Also , so .
Element-distinctness gate cost in the QRAM model
Statement
Fix an injective encoding of values in by bits and take the parameter from Element-distinctness O(N^{2/3}) query bound. For , the finite canonical storage of Canonical hash-bucket and nested skip-list storage has hash-table lookup, rank/select, complement-unranking, value insertion/deletion, and collision-check subroutines with QRAM gate-time when their bounded searches do not overrun; the table uses memory bits. A fixed threshold is chosen below; the search uses this storage for and direct value comparison for the finite range .
For , let be the gate-time of the supplied uniform -subset preparation. Assume an explicit compatible realization of the controlled/inverse Johnson-walk access used by reversible finding exists on this canonical storage, uses the local operations proved below with their reversible overflow/overrun caps, and preserves the hash seed. Let be the maximum gate-time of one charged walk-update unit in that realization, including the forward, inverse, controlled, reflection, and swap capabilities supplied for the lazy Johnson walk in Finite row-preparation access model for a Szegedy walk and any encoding conversion. Under this explicit interface assumption, the complete search has value-query cost and gate-time
The local storage operations are proved below; this item does not construct the compatible full row-access circuit or derive polylogarithmic bounds for and . The unconditional gate-time conclusion requires and .
The phase-estimation part of this gate-time profile uses the ideal continuous-rotation submodel of Phase-estimation query and gate costs, where each exact controlled phase is one gate occurrence. Any synthesis overhead for a fixed finite gate alphabet is a separate cost.
For a Boolean value circuit with non-input nodes, including constants, input-port uses counted with multiplicity, and output bits, the serial compiler Reversible embedding of a Boolean circuit implements one reversible XOR value query using at most ordinary gate occurrences. With the full DAG-layer parameters of Parallel depth of reversible Boolean embedding (including any non-output nodes), its alternative parallel implementation uses at most occurrences and has depth at most
This bounds the written depth of the supplied parallel schedule under Finite circuit resource accounting. It does not claim minimum-layer depth or include the other ordinary gates used by the walk data structure.
Facts & Assumptions
Given: The query search and its marked-subset promise, the lazy Johnson update, the stated finite QRAM gate, and the explicit reversible Boolean compiler.
Element-distinctness O(N^{2/3}) query bound: for , the walk has , marked mass at least , stored-vertex setup value-query cost , elementary replacement-update cost , and check cost ; its controlled row construction has stationary edge setup at most , controlled row reflection at most , and controlled access at most value queries.
Element-distinctness Johnson walk and value access: a vertex stores an -subset and injectively encoded values; a neighbor replaces one selected index by one unselected index; its marked predicate is the presence of an equal-value pair.
Random-access quantum-memory gate model: an addressed call swaps the target bit with the addressed memory bit, is its own inverse, and costs one QRAM gate-time unit.
Coherent XOR function oracle: a value query is the supplied reversible action , so the same oracle erases a stored value.
Reversible embedding of a Boolean circuit: the Boolean input is a topologically ordered DAG with constants and NOT/AND/OR nodes, and an ordered list of output ports, which may repeat input or non-input nodes. Here counts every non-input node, including constants, and counts gate input-port uses with multiplicity.
Gate, workspace, and serial-depth costs of reversible embedding: the serial compute-copy-reverse compiler implements one clean XOR query using at most gate occurrences, where includes constants.
Parallel depth of reversible Boolean embedding: a fanout-aware explicit schedule has depth for and .
Finite circuit resource accounting: size counts gate occurrences; depth in this profile is the number of written layers; query and QRAM costs are distinct coordinates.
For every prime and , a field with elements exists and For every finite field and every , a monic irreducible polynomial of degree exists: for every there is a field of order with a polynomial-basis representation from an irreducible degree- polynomial.
Toffoli and Fredkin gates: a Fredkin gate swaps its two targets exactly when its control is one.
Finite reversible-walk finding cost: with supplied dyadic gap and marked-mass lower bounds and fixed dyadic target , the complete capped wrapper succeeds with probability at least when a marked state exists, has one-sided error, charges every fresh stationary-state preparation, and assigning unit cost to each controlled walk update and mark check bounds their total number by .
Canonical hash-bucket and nested skip-list storage: hash buckets store stable input-index identifiers; two nested skip lists store index and orders with rank spans; each level is determined by independent promotion bits; a capped search tests at most entries per level.
Projective measurement outcome weights are probabilities: the probability of a projective outcome with projection on unit state is .
Phase-estimation query and gate costs: an -bit phase-estimation run has phase-register and inverse-QFT gate occurrences in the ideal continuous-rotation submodel; each run uses at least one controlled-walk query.
The inner-product norm is definite, homogeneous, and satisfies the triangle inequality: the inner-product norm satisfies the triangle inequality.
Finite instruments can be coherently deferred: a finite instrument followed by finitely many outcome-controlled unitary suffixes has an exact coherent implementation retaining an outcome record, with the same complete branch maps.
Proof
For , the clamp in [F1] is . Set , , , , and . The function decreases for , because its logarithmic derivative is ; indeed there. Since , this gives . Also , so and . Finally . By [F9], fix a polynomial-basis representation of ; its irreducible polynomial is a finite hardwired setup description whose generation time is separate.
For fixed and seed, place each in its hash bucket and build the two canonical lists of [F12]. Pad each list to a power-of-two length with sentinels. A bitonic sorting network recursively sorts the two halves in opposite directions and merges them by comparing pairs at distance , then recursively merging both halves. A bitonic sequence becomes, after thresholding its keys at any fixed threshold, a circular interval of bits; the half-distance compare-exchanges place either all bits in the low half or all bits in the high half, leaving each half bitonic. Induction proves merge correctness, and thresholding between any alleged inverted output pair would give a Boolean failure, so the network sorts the original keys. A merge uses comparisons and the sorting recurrence gives compare-exchanges. Each comparison of -bit records uses Boolean gates; compute its decision bit into clean history, conditionally swap the records using Fredkin gates, copy the sorted list records, and reverse the network to erase the comparison history. This gives a reversible compute-copy-uncompute sort using gate-time. A scan of the sorted lists computes all level links and spans in writes and computes the collision counter from the equal-value runs. If an insertion would exceed a bucket's slots, use the fixed overflow sentinel of [F12]. The resulting storage is a deterministic function of , so it is independent of the history of the walk.
Choose independent uniform coefficient vectors in and use them for in [F12]. For any distinct addresses, the first columns of their Vandermonde evaluation matrix have determinant , so the evaluations are uniform on . Thus the bucket labels are -wise independent and uniform in , and each promotion-bit family is -wise independent and fair. Preparing the coefficient strings uniformly with Hadamards uses seed bits.
The index-list spans select the -th member of and compute by one bounded skip-list search. Define for , where . It is nondecreasing and increases by one exactly at an unselected index. Binary search for the least with therefore gives the -th element of and uses rank searches. Each list search has at most forward entries per level, and each stable node identifier resolves by evaluating and scanning at most slots in its bucket. Here is a finite bit-cost implementation of these operations. For -bit field elements, addition is bitwise XOR. A polynomial-basis multiplication forms the pairwise bit products and reduces their carryless product modulo the fixed degree- irreducible polynomial using Boolean gates; it has serial depth when evaluated by the direct nested-loop circuit. Horner evaluation of one degree-< polynomial therefore uses Boolean gates and depth, since . Evaluating computes a bucket address within this cost; computing the height of a newly inserted index evaluates at most promotion polynomials and costs gates and depth. Compute-copy-uncompute using [F6] makes these deterministic calculations reversible with constant-factor gate overhead; the multiplication scratch can be reused. Each stored record has bits. Scanning a bucket costs at most addressed swaps, while its hash computation uses the field-evaluation circuit above. A lexicographic key comparison on the index/value bits uses Boolean gates and depth by a sequential bit comparison. A rank traversal visits at most entries; span accumulation adds or compares -bit integers, so one rank search has QRAM calls and ordinary gates. Complement unranking consequently has such costs. These bounds establish finite polylogarithmic lookup, selected-index, and complement-unranking procedures whenever the capped searches do not overrun.
The QRAM table has slots. Each slot stores an index, a -bit value, and pointers and spans of bits each, hence bits. The seed, counters, rank registers, arithmetic workspace, and comparator-history scratch add bits. Therefore total table and workspace memory is . The finite initial table and both sorted lists can be built by the reversible networks in step 1.2 using gate-time after the value loads.
To update the stored subset, delete the removed index from the index and value lists, apply one inverse XOR query to erase its value, apply one forward XOR query to load the inserted value, and insert its record into both lists. The predecessor search on each level supplies the crossing edge and its old span. If a list has length and insertion is at base rank , old keys of rank at least move up by one. At each level containing the new key , replace the crossing span by the two exact differences and , where and are its predecessor and successor in the old level list; if is absent at that level, increment the crossing span by one. For deletion of a key of base rank , if is present at a level, replace spans and by ; if it is absent, decrement the unique crossing span by one. The head has rank and a missing successor is treated as a virtual tail of rank equal to the current list length, so the same formulas cover both endpoints. Each updated span is an integer at most and fits in bits. Ripple-carry addition, subtraction, and comparison use Boolean gates and depth per operation; at most predecessor paths of at most entries and span writes are needed. Their arithmetic, record reads, and writes therefore have polylogarithmic gate and QRAM costs. Two bounded searches in the value list, at and , give the multiplicity of a value ; maintain the number of value classes with multiplicity at least two, decrementing when a deletion changes multiplicity two to one and incrementing when an insertion changes one to two. This counter makes the marked check an exact zero test with no value query. Compute its nonzero bit into the fresh check flag by reversible XOR and undo the comparison scratch, leaving the canonical memory and every other existing register fixed; the reversed circuit supplies the inverse check at the same polylogarithmic gate/QRAM cost. The fresh-flag Lüders readout and inverse specified by the finding algorithm then implement its required retained-state instrument, with both check calls and the readout charged separately. Reversing these finite operations restores the canonical table. A controlled memory-bit access uses two addressed swaps with clean scratch and a Fredkin between them, so it has constant-factor QRAM overhead by [F3, F10]. Thus the local update and marked-check subroutines use QRAM time and gates whenever their searches fit the cap.
For fixed and a bucket , let count its selected indices. The -wise hash family from step 2.1 gives, with , . Since , , and (each factor is at least ), this is at most . With and , . A union bound over buckets gives probability at most .
Put . For either fixed key order and each level , condition on the seeds for levels below ; this fixes the level- list and its key order. Among at most consecutive windows of nodes, -wise independence makes the chance that the promotion bits are all zero or all one equal to . A union bound over two lists and levels gives probability at most . These events control the traversals below level ; the initial traversal at level needs a separate occupancy bound.
Let count nodes of with height ; it is the same count in both key orders. For any distinct nodes, step 2.1 and independence of the promotion seeds give probability that all reach level . Thus , since , , and . Outside this event, the top list has fewer than nodes, and deleting and inserting one node leaves at most there. Below the top level, absence of the run events in step 3.3 bounds every run of unpromoted nodes by . Deleting a promoted node can merge two such runs, and the subsequent insertion can add at most one unpromoted node, giving at most consecutive unpromoted nodes. A search descends from the predecessor found at the next level and inspects only such a run and its boundary entries. Hence every search before, during, or after one replacement fits entries at each lower level; the top traversal also fits this cap.
Call a seed bad for if some bucket has occupancy at least or a run event of step 3.3 or the top-level event of step 4.1 occurs. Its probability is by steps 3.2, 3.3, and 4.1. Cap every bounded lookup, rank, select, and collision check after the prescribed bucket/level limits: a failed read writes a fixed invalid sentinel to its clean output and leaves the canonical table unchanged; a failed check returns the non-marked bit. For a Johnson replacement, compute all endpoint and search flags before modifying the table and apply the toggle only if both endpoint loads are below and every search fits; otherwise act as the identity. This update cap is symmetric in its endpoints, so the accepted toggle is an involution and the rejected basis states are fixed. A coherent row access applies the same cap to each coin-labelled replacement branch, retaining the coin label so distinct source/successor blocks remain orthogonal. Read/check caps are reversible XORs into clean outputs. Thus each cap is a finite unitary and agrees with the ideal operation on every good configuration. The initial table is a deterministic isometry; it agrees with the ideal stored representation on good seeds and can differ only on the bad-seed block.
For a fixed subset and neighbor, either endpoint is bad with probability at most by the union bound. The retained logical labels make distinct subset/neighbor blocks orthogonal, so on a state whose seed is uniform conditional on each logical history, the squared norm of the bad block for one logical data-access unit is at most . Since the capped and ideal operations are unitary and agree off that block, their state-vector difference on that prefix is at most . The same estimate covers the initial table encoding, a one-subset check, and the final capped scan. The finding algorithm has only finitely many Lüders tests and outcome-controlled unitary suffixes. By [F17], defer those measurements to outcome-record registers; the ideal search and its recorded branch controls are independent of the hash seed, while the canonical table is a deterministic encoding of the current subset and seed. Hence each ideal prefix keeps the seed uniform conditional on its logical labels and recorded outcomes, as required for the bad-block bound.
Write and . For , define for the least integer with , determined by exact rational comparisons; then . Supply , , and to [F11]. Since , ; since and , . Thus and . Counting each capped walk update and mark check as one logical operation, [F11] gives such operations. The complete wrapper makes only fresh stationary preparations at this fixed failure target. Each uses value queries by [F1], so all setups together use queries; table encoding and final reading occur only times. Thus even counting every setup query, . A hybrid over these data-dependent operations gives state-vector error at most . The final success probability changes by at most twice this error: [F13] writes it as for the success projection, [F16] bounds by , and [F15] bounds the difference of squares. Since , this probability error tends to zero; choose fixed large enough that it is at most for all . The fixed target includes only a constant number of fresh outer trials in the complete wrapper, so all its calls are included in . By [F11], the ideal wrapper succeeds with probability at least ; its capped-storage implementation therefore succeeds with probability at least . Verify any reported pair directly with two value queries; this preserves one-sided error and adds only queries.
On the walk branch , the actual gap is by [F1] and the marked mass is at least by [F1]. Use the dyadic bounds fixed in step 7.1; they satisfy . By [F1], the coherent Johnson row preparation has stationary edge setup at most , controlled row reflection at most , and controlled access at most value queries; thus the complete fixed-target wrapper in [F11], with all its fresh setups counted as in step 7.1, gives value queries. Moreover and , so the phase-register lengths in the reversible-finding algorithm are . Each phase-estimation run therefore uses phase-register and inverse-QFT gates by [F14]; the number of such runs is at most the number of controlled-walk calls because each run uses at least one. Reversible arithmetic and local checks add gate-time per charged update. Each fresh stationary preparation charges for its uniform subset, for value loading and table construction, and for its edge-row preparation. There are only fresh preparations by step 7.1, so their total cost is . The final stored-value scan costs . Charging each of the walk-access units at gives the stated formula; direct verification of a reported pair costs at most two further value queries and polylogarithmic gate-time. For , direct pair comparison uses value queries and gates; since is a fixed constant, this finite branch is absorbed by the asymptotic bounds. The phase-gate bound is in the ideal continuous-rotation submodel; fixed-alphabet synthesis and a polylogarithmic bound for are not proved here.
For the optional Boolean value circuit, [F5] counts every non-input node, including unused constants, in , so [F6] gives the serial bound . The parallel construction in [F7] instead uses at most evaluation/reversal gates, input fanout/unfanout gates across the two passes, output fanout/unfanout gates, and output CNOTs, totaling at most . Its stated depth follows by substituting and in [F7]. These are separate implementations of the same XOR query; their occurrence and written-depth bounds do not assert minimum depth or bound the other walk gates.
5 · Examples, counterexamples and false statements
None yet.
Sources
- Andrew M. Childs, Lecture Notes on Quantum Algorithms, Chapters 18 and 20
- Ronald de Wolf, Quantum Computing: Lecture Notes, Chapter 8
- Frédéric Magniez, Ashwin Nayak, Jérémie Roland, and Miklos Santha, Search via Quantum Walk
- Andrew M. Childs, Lecture Notes on Quantum Algorithms, Chapter 18, §18.4
- Ronald de Wolf, Quantum Computing: Lecture Notes, Chapter 8, §8.1
- Frédéric Magniez, Ashwin Nayak, Jérémie Roland, and Miklos Santha, Search via Quantum Walk, §2
- Andrew M. Childs, Lecture Notes on Quantum Algorithms, Chapter 18, §18.4, Lemma 18.2
- Frédéric Magniez, Ashwin Nayak, Jérémie Roland, and Miklos Santha, Search via Quantum Walk, Proposition 1 and §3
- Frédéric Magniez, Ashwin Nayak, Jérémie Roland, and Miklos Santha, Search via Quantum Walk, Proposition 1
- Andris Ambainis, Quantum walk algorithm for element distinctness, §6.2
- Frédéric Magniez, Ashwin Nayak, Jérémie Roland, and Miklos Santha, Search via Quantum Walk, §§3.2–4
- Andrew M. Childs, Lecture Notes on Quantum Algorithms, Chapter 20, §20.3
- Ronald de Wolf, Quantum Computing: Lecture Notes, Chapter 8, §8.2
- Andris Ambainis, Quantum walk algorithm for element distinctness, §§2–4
- Andrew M. Childs, Lecture Notes on Quantum Algorithms, Chapter 20, §§20.1–20.3
- Ronald de Wolf, Quantum Computing: Lecture Notes, Chapter 8, §8.3.2
- Andris Ambainis, Quantum walk algorithm for element distinctness, §6.2 and Lemmas 5–6
- Andrew M. Childs, Lecture Notes on Quantum Algorithms, Chapter 20, §20.2
- Andris Ambainis, Quantum walk algorithm for element distinctness, §§3–4
- Frédéric Magniez, Ashwin Nayak, Jérémie Roland, and Miklos Santha, Search via Quantum Walk, Theorem 3, §3.2 Theorem 6, and §4 Lemmas 1–2
- Ronald de Wolf, Quantum Computing: Lecture Notes, Chapter 8, §§8.1–8.2
- Frédéric Magniez, Ashwin Nayak, Jérémie Roland, and Miklos Santha, Search via Quantum Walk, §§2–3
- Magniez, Nayak, Roland, Santha, Search via Quantum Walk, Section 1.3 and Proposition 2
- Ambainis, Quantum walk algorithm for element distinctness, Sections 3-4
- Andris Ambainis, Quantum walk algorithm for element distinctness, Theorems 4–5 and §§3–4