Alphabeta Math
Pipeline-generated
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.

✓ 8 results · all verified · 4 also independently AI-judged
Every result on this page is machine-checked by a proof checker and read in full and owner-audited; the judge is an additional, independent cross-model AI review of the proofs. The 4 not AI-judged were verified by owner audit (typically over a confirmed judge false positive), not failures.

Quantum-Walk Search and Element Distinctness

1 · Prerequisites

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 r-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 O(N2/3) 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

DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (gpt-6-luna)Open item page →

Marked sets, stationary mass, and walk-search tasks

Definition

Let (X,P,π) be a finite reversible Markov chain with positive stationary law, as in Finite reversible Markov chain with positive stationary law, and let M⊆X be a set of marked states. Its stationary marked mass is

ε:=π(M)=∑x∈Mπx.

For a specified threshold ε0∈(0,1], the marked-set detection promise problem has yes-instances with M≠∅ and ε≥ε0, and no-instances with M=∅. 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, πx=1/∣X∣, so ε=∣M∣/∣X∣.

The marked-state finding promise problem has inputs with ε≥ε0 and requires a classical output x∈M. 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 X, the coherent marked predicate, and all state-preparation and transition circuits are supplied input data, not consequences of the finite chain matrix.

DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (gpt-6-luna)Open item page →

Finite-chain hitting time and survival law

Definition

Let X be the finite state set, P its row-transition matrix, M⊆X the marked set, U=X∖M, and PUU the principal submatrix indexed by U. For an initial probability row vector μ, the hitting-time survival law is

Pr⁡μ(τM>t):=μUPUU t1U,t∈N0,

where μU is the restriction of μ to U and 1U is the all-ones column vector on U. This is the finite sum of probabilities of all length-t paths that remain in U; it does not require a path-space construction. For U=∅ the right side is 0; for M=∅ it is 1.

The hitting time τM:=inf⁡{t≥0:Xt∈M} is the N0∪{∞}-valued variable determined by this survival law. Its extended expectation is EμτM=∑t≥0Pr⁡μ(τM>t), and a constant-success hitting bound is a specified integer t for which Pr⁡μ(τM≤t) is bounded below by a positive constant. These resource conventions are kept separate.

LemmaStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (gpt-6-luna)Open item page →

Discriminant of the marked-state absorbing walk

Statement

Let P be a finite symmetric row-stochastic matrix on X, and let M⊆X, U=X∖M. Define the row-stochastic absorbing matrix

Pxy′={1,x=y∈M,0,x∈M, y≠x,Pxy,x∈U.

For the general row-stochastic discriminant D(P′)xy=Pxy′Pyx′ of Szegedy row-preparation map and discriminant,

D(P′)=PUU⊕IM,

where PUU is the principal submatrix on U. In general P′ need not be symmetric or reversible.

Facts & Assumptions

Given: A finite symmetric row-stochastic matrix P, a marked set M, and the stated row convention.

[F1]

Finite row-stochastic kernel: each row of P is nonnegative and sums to 1.

[F2]

Szegedy row-preparation map and discriminant: the discriminant of a row-stochastic matrix has entries Dxy=PxyPyx.

[F3]

The Szegedy discriminant is self-adjoint and contractive: the discriminant entry formula holds for every finite row-stochastic kernel, without reversibility.

Proof

1.1givenF1construct

If x∈U, row x of P′ equals row x of P and sums to one by [F1]. If x∈M, row x has a single 1 at y=x and zeros elsewhere. Thus P′ is row-stochastic.

2.1F2F3step 1.1algebra∎

For x,y∈U, Pxy′=Pxy and Pyx′=Pyx=Pxy, so [F2] gives D(P′)xy=Pxy. If x,y∈M, the product Pxy′Pyx′ is 1 exactly when x=y and 0 otherwise, giving the identity block. If exactly one of x,y is marked, the transition from the marked state to the unmarked state is zero, so D(P′)xy=0. These three disjoint cases give the displayed direct sum.

LemmaStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (gpt-6-luna)Open item page →

Spectral bound for a symmetric lazy walk killed on a marked set

Statement

Let X be a finite set of size n≥2, and let P=(I+Q)/2 where Q is a symmetric row-stochastic matrix. Let u=n−1/21X. Assume the second-largest eigenvalue of P is at most 1−δ, where 0<δ≤1. For M⊆X, put ε=∣M∣/n, U=X∖M, and let ΠU be the coordinate orthogonal projection defined by ΠUex=ex for x∈U and ΠUex=0 for x∉U. Let PU=ΠUPΠU restricted to vectors supported on U. Then P has spectrum in [0,1] and

∥PU∥≤1−δε.

The empty compression has norm 0 by convention.

Facts & Assumptions

Given: The finite symmetric lazy transition matrix P=(I+Q)/2, its uniform unit vector u, the marked set M, and the second-eigenvalue bound.

[F1]

Finite row-stochastic kernel: Qxy≥0 and ∑yQxy=1 for every row.

[F2]

Marked sets, stationary mass, and walk-search tasks: in the uniform case ε=∣M∣/n.

[F5]

The operator norm is zero on the zero domain and otherwise is max_{||v||=1} ||Tv||: on a nonzero domain, ∥T∥=max⁡∥z∥=1∥Tz∥; the zero-domain norm is 0.

[F6]

Cauchy–Schwarz: ∣⟨u,v⟩∣≤∥u∥∥v∥, with equality exactly for linearly dependent vectors: ∣⟨v,w⟩∣≤∥v∥∥w∥ in a real or complex inner-product space.

Proof

1.1F1F3F4F6algebra

For any vector z∈CX, weighted Cauchy–Schwarz, obtained by applying [F6] to (Qxy)y and (Qxyzy)y, gives ∣(Qz)x∣2≤∑yQxy∣zy∣2. Summing over x and using symmetry, so that every column sum is also 1, yields ∥Qz∥2≤∥z∥2. Since Q is self-adjoint by its real symmetric matrix and [F4], [F3] gives a real orthonormal eigenbasis; the contraction inequality forces every eigenvalue of Q into [−1,1]. Thus P=(I+Q)/2 is self-adjoint with spectrum in [0,1]. Its row sums are 1, so Pu=u.

1.2F2F6givenalgebra

If U=∅, then PU=0 and the conclusion follows from [F5]. Otherwise choose a unit vector z supported on U and write z=αu+v with v⊥u. [F6] applied to ⟨z,u⟩=⟨z,ΠUu⟩ gives ∣α∣2≤∥ΠUu∥2=∣U∣/n=1−ε, so ∥v∥2=1−∣α∣2.

2.1F3givenstep 1.2algebra

The orthogonal complement u⊥ is invariant under P by self-adjointness and Pu=u. Its eigenvalues are at most 1−δ by the stated second-eigenvalue hypothesis. Therefore ⟨z,Pz⟩=∣α∣2+⟨v,Pv⟩≤∣α∣2+(1−δ)∥v∥2≤1−δε.

3.1F3F4F5step 1.1step 2.1∎

The compression PU is positive semidefinite because ⟨z,PUz⟩=⟨z,Pz⟩≥0 for every vector supported on U, 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 1−δε, proving the result.

TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (gpt-6-luna)Open item page →

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 ∅≠M≠X and start uniformly on U=X∖M. Then

Pr⁡(τM>t)≤(1−δε)t(t∈N0),

so EτM≤1/(δε) and O(1/(δε)) steps give constant success probability. If M=X, the hitting time is 0.

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.

[F1]

Spectral bound for a symmetric lazy walk killed on a marked set: ∥PUU∥≤1−δε, and the compression is positive semidefinite.

[F2]

Finite-chain hitting time and survival law: Pr⁡μ(τM>t)=μUPUU t1U.

[F3]

Cauchy–Schwarz: ∣⟨u,v⟩∣≤∥u∥∥v∥, with equality exactly for linearly dependent vectors: ∣⟨v,w⟩∣≤∥v∥∥w∥ in a finite-dimensional inner-product space.

Proof

1.1F1F2F3algebra

Let uU=∣U∣−1/21U. For the uniform initial law on U, [F2] gives Pr⁡(τM>t)=⟨uU,PUU tuU⟩. Since PUU is positive semidefinite, it has eigenvalues in [0,1−δε] by [F1]; its tth power therefore has operator norm at most (1−δε)t. [F3] and ∥uU∥=1 prove the survival bound, including t=0.

2.1F1F2step 1.1algebra∎

Put a=δε. For 0<a<1, the nonnegative-integer tail formula in [F2] and the finite geometric partial sums give EτM=∑t≥0Pr⁡(τM>t)≤∑t≥0(1−a)t=1/a. For the constant-success bound choose t=⌈1/a⌉. Since (1−a)(1+a)=1−a2≤1, we have 1−a≤(1+a)−1; the finite binomial expansion gives (1+a)t≥1+ta≥2. Hence (1−a)t≤(1+a)−t≤1/2. If a=1, step 1.1 gives zero no-hit probability for every t≥1, so one step suffices. The case M=X is immediate from the definition.

DefinitionDefinition: Literature-sourcedProof: Not applicableOpen item page →

Random-access quantum-memory gate model

Definition

Let a QRAM contain an ordered classical memory word z=(z0,…,zL−1)∈{0,1}L, with L≥1. Its random-access quantum-memory gate acts on an address register encoding i∈{0,…,L−1}, a target bit b, and the memory register by

∣i,b,z0⋯zL−1⟩⟼∣i,zi,z0⋯zi−1bzi+1⋯zL−1⟩.

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.

AlgorithmAlgorithm: Literature-sourcedProof: Not applicableOpen item page →

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 (X,P,π) with πx>0, a supplied positive dyadic rational lower absolute-gap bound δ0, a dyadic rational marked-mass lower bound ε0>0 with promise π(M)=0 or π(M)≥ε0, a coherent marked-bit check of cost C, and a dyadic rational failure target ρ∈(0,1). 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 (ρ∗/2,ρ∗] for desired failure probability ρ∗. Write ∣π⟩=∑x∈Xπx∣x⟩ and let T∣x⟩=∣x⟩∑yPxy∣y⟩ be the row isometry of Szegedy row-preparation map and discriminant. The supplied clean preparation Aπ maps its specified blank input to the stationary edge state ∣πedge⟩=T∣π⟩=∑x∈Xπx∣x⟩∑y∈XPxy∣y⟩, returns all its work registers to their specified blank states, and has charged cost S. The row-access interface of Finite row-preparation access model for a Szegedy walk supplies the row-preparation unitary VP, its inverse, controlled forward and inverse calls, the clean-state reflection R0 and its controlled call, and the swap S and its controlled call. On the clean-work logical walk space these implement RA=2TT∗−I=VPR0VP∗, U=SRA, and W=U2, with each constituent charged. Supply controlled calls to W and W∗ for the coherent QPE circuits and an exact controlled RA for the all-zero branch. A single bound U0 covers each controlled W or W∗ call and the controlled RA call, including their factorwise implementation costs. A matrix P alone supplies none of these circuits.

Marked check and retained-state instrument. Write m(x)=1M(x). The supplied exact coherent check is a unitary BM with separately supplied inverse and specified fresh flag F and scratch J. On the declared logical encoding it satisfies, for every x∈X, b∈{0,1}, and vector η of all existing remaining registers, BM(∣x⟩∣η⟩∣b⟩F∣0⟩J)=∣x⟩∣η⟩∣b⊕m(x)⟩F∣0⟩J. 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, C bounds each forward and inverse check call; declare the flag-readout cost separately and include it in C 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 Π1=ΠM=(∑x∈M∣x⟩⟨x∣)⊗Irest and Π0=I−ΠM, with identity on every existing auxiliary, including every retained Kj. Every marked/unmarked test below uses the specified Lüders instrument Ia(Z)=ΠaZΠa,a∈{0,1}, in the sense of Finite instruments and conditional states: its positive-probability conditional density is Ia(Z)/tr⁡(Ia(Z)); no conditional state is assigned when that trace is zero. Execute the test by appending ∣0⟩F∣0⟩J, applying BM, reading only the fresh flag with the explicitly chosen computational-basis Lüders maps Y↦QaYQa, where Qa=I⊗∣a⟩⟨a∣F⊗IJ, storing a in the classical output record, and applying BM∗ 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 O(C) in the stated query/check profile. The recursive marked phase flip is implemented by BM, a phase −1 on flag 1, and BM∗, also with both calls charged.

Approximate stationary reflection R(β). Set s=min⁡{q≥1:4qδ0≥64} and k=min⁡{j≥1:2jβ≥2}, using exact integer/rational comparisons. With Q=2s, these comparisons give Q≥8/δ0>2π/δ0 using π<4 from The Gregory-Leibniz series: pi over four equals 1-1/3+1/5-1/7+.... Append k separate s-bit zero phase registers. Coherently execute the finite QPE circuit prefix from Quantum phase estimation on W 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 −I to the walk state. If all are zero, apply the exact controlled row-space reflection RA=2TT∗−I using the charged row-preparation, inverse, and clean-state reflection calls. Reverse the k coherent QPE prefixes in reverse chronological order, using the supplied controlled inverse powers. Charge 2k(2s−1) controlled W and W∗ calls, the controlled RA branch, all-zero comparisons, phase-register gates, and the allocated classical arithmetic. The all-zero branch is required: W has the extra zero-phase subspace A⊥∩B⊥, where RA=−I, while RA=+I on the stationary state.

Recursive circuit Ai. Let γ=1/120, βi=γ/(16i2) for i≥1, and A0=I. For i>0, allocate a fresh Ki for R(βi) and execute chronologically: (i) Ai−1, the marked phase flip, and Ai−1†; (ii) coherently test every older Kj, j<i, applying −I if any is nonzero and otherwise applying R(βi) on the walk and fresh Ki; compute and uncompute the control predicate; (iii) apply Ai−1. Each βi is rational, and the ki loop in R(βi) is an exact rational comparison. An inverse means the exact reversed finite gate list, not a reset of measured work.

Tolerant finding wrapper. If ε0≥1/2, take ns=min⁡{n≥1:2−n≤ρ} fresh stationary samples, verify each label, return the first marked label, and output NO MARKED if all fail. Otherwise, let tmax⁡ be the least integer t≥0 such that 3tarcsin⁡ε0≥π/4. Determine it by the exact algebraic threshold comparison ε0≥sin⁡2(π/(4⋅3t)); equality takes the ≥ branch. Let nout=min⁡{n≥1:(19/20)n≤ρ}, found by exact rational comparisons. In each outer trial:

  1. Prepare a fresh stationary sample, test its first label, and return it if marked.
  2. Prepare a fresh stationary walk state with all K1,…,Ktmax⁡ zero.
  3. For i=1,…,tmax⁡, apply Ai, 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.
  4. 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 ε0≥1/2 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.

DefinitionDefinition: Literature-sourcedProof: Not applicableOpen item page →

Element-distinctness Johnson walk and value access

Definition

Let N≥2, let V be a finite nonempty value set, and let f:[N]→V, where [N]={1,…,N}. A coherent value oracle is a supplied finite unitary Of with an explicitly specified injective encoding enc⁡:V→{0,1}b for some finite b, and action ∣i,z⟩↦∣i,z⊕enc⁡(f(i))⟩ 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 N≥4 and 2≤r≤⌊N/2⌋, the lazy Johnson walk has state space Ωr={S⊆[N]:∣S∣=r} and transitions

P(S,S)=12,P(S,S∖{i}∪{j})=12r(N−r)(i∈S, j∉S),

with all other entries zero. Its marked vertices are

Mf:={S∈Ωr:∃i,j∈S, i≠j, f(i)=f(j)}.

The stored data at S are the r labeled values (f(i))i∈S. Preparing the uniform r-subset state and loading these values has value-query cost S0=r, with subset preparation gates charged separately. A neighbor update erases the removed value and loads the added value, so its value-query cost is U0=2; the XOR oracle is its own inverse. Checking whether the stored subset is marked uses no further value queries, so C0=0, 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 N≤3, use direct pairwise comparison rather than the r-subset walk. The lower bound r≥2 is essential: a one-element subset cannot contain a collision pair.

DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (gpt-6-luna)Open item page →

Canonical hash-bucket and nested skip-list storage

Definition

Let N≥4096, 2≤r≤⌊N/2⌋, and f:[N]→[M] with the injective value encoding in Element-distinctness Johnson walk and value access. Put H=⌈log⁡2N⌉, d=C=16⌈log⁡2(N+2)⌉, R=2⌈log⁡2r⌉, and q=2H, and assume d≤N. Fix as part of the representation a monic irreducible polynomial of degree H over F2 and its polynomial-basis field Fq; the storage is canonical relative to this fixed field representation and the hash seed. Choose H+1 independent uniform coefficient tuples in Fqd and use them as coefficients of degree-at-most-(d−1) polynomials p−1,p0,…,pH−1. For each i∈[N], let enc(i) be the field element whose H-bit polynomial-basis coordinate string is the H-bit binary encoding of i−1; these elements are distinct. Let h(i) be the integer represented by the low log⁡2R bits of p−1(enc(i)), and let bℓ(i) be the low bit of pℓ(enc(i)). The height of i is the number of consecutive 1 bits starting at b0(i), capped at H; equivalently, height⁡(i)≥ℓ exactly when b0(i)=⋯=bℓ−1(i)=1.

For a subset S∈([N]r), the fixed memory word has R hash buckets, each with C slots, and one overflow bit. If no bucket exceeds capacity, every i∈S is stored in bucket h(i); occupied slots are sorted by index, and each record contains i, f(i), and its skip-list fields. A node identifier is the input index i; resolving it means computing h(i) 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 (f(i),i). Level ℓ of either list, for 0≤ℓ≤H, contains exactly the keys with height at least ℓ; level 0 contains all keys. Each forward pointer names a node identifier and stores its span, the difference between the source and target ranks in level 0 (the head sentinel has rank −1). These spans support rank and select operations. The two lists, bucket positions, pointers, and spans are the unique ones determined by (S,f∣S,p−1,p0,…,pH−1); they do not depend on the path used to reach S. A capped search inspects at most D=2⌊d/2⌋+1 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.

LemmaStatement: Literature-sourcedProof: AI-adaptedprecheck passOpen item page →

Spectrum of the lazy Johnson walk

Statement

Let N≥4 and 2≤r≤⌊N/2⌋. For the lazy Johnson transition matrix P on the r-subsets of [N] from Element-distinctness Johnson walk and value access, all eigenvalues, counted with multiplicity, are

λj=1−j(N+1−j)2r(N−r),0≤j≤r,

with multiplicity (Nj)−(Nj−1), where (N−1)=0. 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

δ(P)=1−λ1=N2r(N−r).

Facts & Assumptions

Given: The finite state space Ωr={S⊆[N]:∣S∣=r} and the lazy transition probabilities of Element-distinctness Johnson walk and value access.

[F1]

Element-distinctness Johnson walk and value access: P stays at a subset with probability 1/2 and replaces one of its r elements by one of the N−r elements outside with probability 1/(2r(N−r)) for each replacement.

[F2]

Rank-nullity: dim⁡FV=nullity⁡T+rank⁡T: for a linear map T with finite-dimensional domain, dim⁡V=dim⁡ker⁡T+dim⁡im⁡T.

[F3]

For a subspace W of a finite-dimensional inner product space, V=W⊕W⊥: for a subspace W of a finite-dimensional inner-product space V, V=W⊕W⊥.

[F5]

The orthogonal complement W⊥={v:⟨v,w⟩=0 for all w∈W}: W⊥={v:⟨w,v⟩=0 for all w∈W}.

[F6]

Adjoints satisfy (S+T)∗=S∗+T∗, (λT)∗=λ‾T∗, (ST)∗=T∗S∗, and T∗∗=T: for compatible finite-dimensional maps, (ST)∗=T∗S∗; also (λT)∗=λ‾T∗ and I∗=I.

[F7]

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 1−∥P∣H0∥ on the mean-zero subspace.

Proof

1.1F1F4constructalgebra

For 0≤k≤r, let Vk=C([N]k) 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 0≤k<r, define the up map Rk:Vk→Vk+1 by (Rkf)(B)=∑a∈Bf(B∖{a}) and the down map Lk+1:Vk+1→Vk by (Lk+1g)(A)=∑b∉Ag(A∪{b}). Expanding the finite sums with this convention gives ⟨Rkf,g⟩=∑Af(A) ∑b∉Ag(A∪{b})‾=⟨f,Lk+1g⟩; by [F4], Lk+1=Rk∗. Put L0:V0→{0} equal to zero. For 0≤k<r and f∈Vk, the diagonal terms in Lk+1Rkf occur N−k times, the diagonal terms in Rk−1Lkf occur k times, and both have the same off-diagonal replacement terms. Hence Lk+1Rk−Rk−1Lk=(N−2k)IVk, where the second term is zero for k=0.

2.1F2F3F4F5step 1.1algebra

Taking the inner product of the identity in step 1.1 with f gives ∥Rkf∥2=∥Lkf∥2+(N−2k)∥f∥2. Since k<N/2 for 0≤k<r, Rk is injective, so [F2] gives dim⁡ran⁡Rk=dim⁡Vk. By [F4] and [F5], ker⁡Lk+1=ker⁡Rk∗=(ran⁡Rk)⊥. Apply [F3] to W=ran⁡Rk; the projection onto W along W⊥ is linear, with image W and kernel ker⁡Lk+1, so [F2] gives dim⁡Vk+1=dim⁡ran⁡Rk+dim⁡ker⁡Lk+1. Applying [F2] to Lk+1 then yields dim⁡ran⁡Lk+1=dim⁡Vk, so Lk+1:Vk+1→Vk is onto. Put H0=V0 and Hj=ker⁡Lj for 1≤j≤r; [F2] gives dim⁡Hj=(Nj)−(Nj−1).

3.1step 1.1step 2.1inductionalgebra

If h∈Hj, repeated use of step 1.1 gives, for t≥1 with j+t≤r, Lj+tRj+t−1⋯Rjh=t(N−2j−t+1)Rj+t−2⋯Rjh. For t=1 this is the commutator identity and Ljh=0. Empty products of raising maps mean the identity. If it holds at t and j+t<r, apply the commutator at level j+t; the coefficient becomes t(N−2j−t+1)+(N−2j−2t)=(t+1)(N−2j−t), proving the formula for t+1.

4.1F1F6step 1.1step 2.1step 3.1algebra

On Vr, the Johnson adjacency operator is A=Rr−1Lr−rI: the r diagonal choices in Rr−1Lr return the same subset, and every other term replaces exactly one element. Since Lr=Rr−1∗ by step 1.1, [F6] gives A∗=A. For j<r, applying step 3.1 with t=r−j shows that Rr−1⋯RjHj is an eigenspace of A with eigenvalue (r−j)(N−r−j+1)−r. For j=r, the empty raising product is the identity on Hr, and LrHr=0 gives A∣Hr=−rI directly, the same formula. The raising maps are injective by step 2.1, so this eigenspace has dimension dim⁡Hj. These eigenvalues are distinct because consecutive values differ by N−2j>0 for j<r≤N/2. For v,w in eigenspaces with distinct eigenvalues α,β, self-adjointness gives (α−β)⟨v,w⟩=⟨Av,w⟩−⟨v,Aw⟩=0; hence the eigenspaces are mutually orthogonal. Their dimensions sum telescopically to (Nr)=dim⁡Vr, so their direct sum is all of Vr.

5.1F1F7step 4.1algebra∎

The nonlazy transition is A/[r(N−r)] by [F1], and the lazy transition is its average with the identity. Therefore its eigenvalue on the jth eigenspace is 12(1+(r−j)(N−r−j+1)−rr(N−r))=1−j(N+1−j)2r(N−r). 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 j=0 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 j, since j(N+1−j) increases for 0≤j≤r≤N/2. If v=∑j=1rvj is the orthogonal decomposition into these eigenspaces, then ∥Pv∥2=∑j=1rλj2∥vj∥2≤λ12∥v∥2, with equality on a nonzero vector in the j=1 eigenspace. Hence the norm of P on the mean-zero subspace is λ1. The smallest eigenvalue is λr=(N−r−1)/(2(N−r))≥0, since N−r≥2. Therefore the absolute gap is 1−λ1=N/[2r(N−r)], as stated.

TheoremStatement: AI-adaptedProof: AI-adaptedprecheck passOpen item page →

Finite reversible-walk finding cost

Statement

Let (X,P,π) be a finite ergodic reversible chain with actual absolute spectral gap δact∈(0,1]. Supply the algorithm with a dyadic rational lower bound δ0∈(0,δact] and suppose the marked set is empty or has stationary mass at least the dyadic rational lower bound ε0∈(0,1]. Let the dyadic rational failure target be ρ∈(0,1). Let S0 be the cost of preparing the stationary walk state, U0 a common upper bound for one controlled W or W∗ update and the exact controlled row-space reflection RA used by the construction, and C the cost of a coherent marked check. For 0<ε0<1/2, one outer trial of MNRS finite reversible-walk finding with gap input δ0 has one-sided error, finds a marked state with probability at least 1/20 when one exists, and uses

2S0+O ⁣(1ε0(U0δ0+C)).

in the corresponding query/update/check cost coordinates. The capped wrapper with failure target ρ∈(0,1) uses O((S0+ε0−1/2(U0/δ0+C))(1+ln⁡(1/ρ))) in that profile. When ε0≥1/2, its direct-sampling branch uses O((S0+C)(1+ln⁡(1/ρ))). If the actual gap is dyadic and supplied exactly, one may set δ0=δact; 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.

[F1]

Marked sets, stationary mass, and walk-search tasks: ε=π(M) is the actual stationary mass; on a promised nonempty instance ε≥ε0, and finding returns a marked label.

[F2]

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 δact=1; for an ergodic chain with at least two states, δact=1−max⁡λ≠1∣λ∣. The supplied algorithm parameter satisfies 0<δ0≤δact.

[F3]

Szegedy spectral mapping for one and two reflections: on the signal planes of W=U2, a discriminant eigenvalue λ contributes phases exp⁡(±2iarccos⁡λ); the stationary eigenline has phase zero and the orthogonal complement has phase zero but lies in A⊥.

[F4]

Quantum phase estimation and Eigenphase estimation access model: an s-bit QPE uses controlled powers of the stated unitary and its forward phase-register convention.

[F5]

Phase-estimation finite outcome law: on an eigenphase θ, outcome y has probability Q−2∣∑j<Qexp⁡(2πij(θ−y/Q))∣2.

[F6]

Finite geometric sum for phase-estimation amplitudes and Sine chord and linear bounds: for z≠1, ∑j<Qzj=(1−zQ)/(1−z), and sin⁡(πd)≥2d for 0≤d≤1/2.

[F7]

Exact phase recovery on the QPE grid: phase 0 is returned as y=0 with certainty.

[F8]

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.

[F9]

Phase-estimation query and gate costs: an s-bit QPE made from one controlled-step oracle uses 2s−1 controlled-step calls; its phase-register gates are counted separately.

[F10]

For j≥2, j−2≤[j(j−1)]−1=(j−1)−1−j−1, so every finite partial sum ∑j=1nj−2 is at most 2 by telescoping.

[F11]

The Gregory-Leibniz series: pi over four equals 1-1/3+1/5-1/7+...: for N=2, π/4=1−1/3+1/5+R2 with R2<0, hence π<52/15<7/2.

[F12]

Principal inverse sine and inverse cosine: arcsin⁡:[−1,1]→[−π/2,π/2] and sin⁡(arcsin⁡x)=x.

[F13]

Triple-angle identities for sine, cosine, and tangent: sin⁡(3x)=3sin⁡x−4sin⁡3x for real x.

[F14]

Parity and the Pythagorean identity for sine and cosine and Double-angle and quadratic power-reduction identities: sin⁡2x+cos⁡2x=1, sin⁡2x=2sin⁡xcos⁡x, cos⁡2x=cos⁡2x−sin⁡2x, and 1−cos⁡x=2sin⁡2(x/2).

[F15]

Sine and cosine are 1-Lipschitz on R: ∣sin⁡x−sin⁡y∣≤∣x−y∣, in particular sin⁡x≤x for x≥0.

[F16]

Finite projective measurements specifies orthogonal outcome projections, and Projective measurement outcome weights are probabilities establishes only their outcome weights pa=tr⁡(ρΠa). The marked test in MNRS finite reversible-walk finding explicitly selects the Lüders branch Ia(Z)=ΠaZΠa on all existing registers; its conditional state when pa>0 is Ia(ρ)/pa by Finite instruments and conditional states. For any orthogonal projection Π, the vectors Πv and (I−Π)v are orthogonal and sum to v, so ∥v∥2=∥Πv∥2+∥(I−Π)v∥2 and ∥Πv∥≤∥v∥. This contractivity is an orthogonal-decomposition identity, independent of a state-update rule.

[F17]

Signs, monotonicity intervals, and ranges of sine and cosine, Quarter-turn values and shifts by pi/2 and pi, and [F14]: sin⁡(π/4)=1/2>1/2, obtained from cos⁡(π/2)=0 and cos⁡(2x)=1−2sin⁡2x at x=π/4, with sine positive there.

[F18]

The inner-product norm is definite, homogeneous, and satisfies the triangle inequality: the induced inner-product norm satisfies the triangle inequality.

[F19]

The reverse triangle inequality in a normed space: ∣∥u∥−∥v∥∣≤∥u−v∥.

[F20]

The Szegedy discriminant is self-adjoint and contractive: T∗T=I, and in the reversible case D=diag⁡(π) P diag⁡(1/π), so the discriminant and transition operator have the same eigenvalues; TT∗ is the orthogonal projection onto the row range.

[F21]

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 ΠaρΠa/pa is a density operator supported on the projected range when pa>0; it is used here for the selected Lüders instrument. Dirac Notation Conversion gives the outer-product coordinate matrix [u][u]†, and The basis-independent trace of an endomorphism of a finite-dimensional vector space identifies its trace with the coordinate trace.

Proof

1.1F2F3F14F15F20algebra

By [F2], the stationary eigenvalue 1 is simple and every other eigenvalue of the reversible transition operator has ∣λ∣≤1−δact≤1−δ0. 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 dT(arccos⁡(λ)/π)=arccos⁡(∣λ∣)/π. For t=arccos⁡(1−δ0)∈[0,π/2], [F14] and [F15] give δ0=1−cos⁡t=2sin⁡2(t/2)≤t2/2, so t≥2δ0. Thus every nonstationary signal phase has circular distance at least 2δ0/π. The only additional zero-phase subspace is the walk-space orthogonal complement in [F3], on which the exact row-space reflection RA equals −I; on the stationary vector it equals +I.

1.2F4F5F6F7F8F11F20givenalgebra

In R(β), the QPE scale satisfies Q=2s≥8/δ0>2π/δ0 by the algorithm's exact integer test and π<4 from [F11]. On the stationary phase 0, [F7] returns outcome 0 in every register, so the all-zero branch applies RA=+I and uncomputes; the stationary state is fixed exactly. For a nonzero signal phase at circular distance d≥δ0/π, the outcome-kernel [F5] and the geometric sum [F6] give Pr⁡(y=0)≤14Q2d2<116. The first inequality follows because ∣1−exp⁡(2πiθ)∣=2sin⁡(πd)≥4d and ∣1−exp⁡(2πiQθ)∣≤2. Repeating QPE coherently in k=min⁡{j≥1:2jβ≥2} fresh phase registers makes the all-zero branch norm at most 4−k. On a nonzero signal eigenvector, the actual reflection differs from the ideal −I only on that branch, where it applies RA; before QPE uncomputation the difference is (RA+I) on the all-zero component. By [F20], RA=2ΠA−I for the orthogonal projection ΠA=TT∗, so RA+I=2ΠA and orthogonal decomposition gives ∥ΠAw∥≤∥w∥; hence the coherent state error is at most 2⋅4−k≤21−k≤β. Reversing the QPE prefixes is unitary and preserves this norm bound. For each nonzero eigenphase, the k 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 16−k. 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 4−k times the input norm, and the same estimate applies. On A⊥∩B⊥, the phase is exactly zero and RA=−I, 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.

1.3F16F21givenconstructalgebra

The projectors Π0,Π1 of the algorithm are self-adjoint idempotents summing to identity. For each a, ⟨Πav,v⟩=∥Πav∥2≥0, so they form a POVM by [F21]; each Πa is its own nonnegative square root. The square-root-instrument theorem in [F21] therefore proves that the selected maps Z↦ΠaZΠa 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 ψ∣0⟩F∣0⟩J to ∑a=01(Πaψ)∣a⟩F∣0⟩J. The specified computational Lüders readout of the fresh flag selects precisely (Πaψ)∣a⟩F∣0⟩J; after recording a, the inverse check maps this vector to (Πaψ)∣0⟩F∣0⟩J. The resulting branch on the original registers is thus exactly Πa∣ψ⟩⟨ψ∣Πa=∣Πaψ⟩⟨Πaψ∣. Its coordinate trace is ∑j∣(Πaψ)j∣2=∥Πaψ∥2=pa by [F16] and [F21]. If pa>0, division gives the pure conditional vector Πaψ/∥Πaψ∥; if pa=0, 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 O(C) 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.

1.4F16F18F19

Let Π be any orthogonal projection and let ξ,ζ be unit vectors with ∥ξ−ζ∥≤Δ. Put a=Πξ and b=Πζ. By [F16], Π is contractive, so ∥a−b∥≤Δ; [F19] gives ∣∥a∥−∥b∥∣≤Δ. If ∥b∥≥2/3 and the actual projected branch has positive probability (so ∥a∥>0), [F18] yields ∥a∥a∥−b∥b∥∥≤∥a−b∥+∣∥a∥−∥b∥∣∥b∥≤3Δ. The same estimate applies when one input is an ideal state and the other differs by a known reflection-error vector.

2.1F1step 1.2F11F12F13F14F15F16F17F19givenalgebra

For the recursive branch suppose 0<p:=π(M)<1/2 and put ϕ0=arcsin⁡p. If p≥1/2, the initial stationary sample already succeeds with probability at least 1/2, 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 s=sin⁡ϕ,c=cos⁡ϕ and ∣ψ⟩=(s,c). The reflection matrix is (2s2−12sc2sc2c2−1)=(−cos⁡2ϕsin⁡2ϕsin⁡2ϕcos⁡2ϕ). Multiplying it by diag⁡(−1,1)(s,c)=(−s,c) gives first coordinate scos⁡2ϕ+csin⁡2ϕ=3s−4s3=sin⁡3ϕ and second coordinate −ssin⁡2ϕ+ccos⁡2ϕ=4c3−3c=cos⁡3ϕ, using [F13] and [F14]. At level i, let ϕi be the actual angle after Ai, let ϕˉi=3iϕ0, and put ei=∣sin⁡ϕi−sin⁡ϕˉi∣. Let t be the first ideal index with ϕˉt≥π/4; then ϕˉt<3π/4 and, if t≥2, every i≤t−1 has ϕˉi−1<π/12. Inductively ei−1≤γϕˉi−1/π implies sin⁡ϕi−1≤sin⁡(π/12)+γ/12. By [F11] and [F15], the right side is less than 7/24+1/1440<1/2, while sin⁡(π/4)>1/2 by [F17]; hence both angles lie in [0,π/4]. On the input to the level-i approximate stationary reflection, after conjugating by Ai−1†, the component orthogonal to the stationary vector has norm ∣sin⁡(2ϕi−1)∣. By step 1.2 the reflection error on that component has norm at most βi∣sin⁡(2ϕi−1)∣. 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 x=sin⁡a,y=sin⁡b for a,b∈[0,π/4], so x,y∈[0,1/2] by [F14]. The identity sin⁡2a=2x1−x2 shows that the absolute difference of the two double-angle values is at most 2∣x−y∣: for x≥y, the function 2x1−x2 is increasing because its square difference is 4(x2−y2)(1−x2−y2)≥0, while 2x1−x2−2y1−y2=2(x−y)1−x2+2y(1−x2−1−y2)≤2(x−y). The case y≥x is symmetric. By [F13], the triple-angle difference is (x−y)(3−4(x2+xy+y2)), whose coefficient has absolute value at most 3 because 0≤x2+xy+y2≤3/2. Therefore, for i≤t−1, ei≤βi(sin⁡(2ϕˉi−1)+2ei−1)+3ei−1≤2βi(ϕˉi−1+ei−1)+3ei−1. For these indices sin⁡(2ϕˉi−1)≤2ϕˉi−1 by [F15], so the last inequality follows.

3.1F10F11F13F14step 2.1algebra

Define e~0=0 and e~i=4βiϕˉi−1+3e~i−1. Suppose inductively that ei−1≤e~i−1≤ϕˉi−1; then step 2.1 gives ei≤e~i. Also ui:=e~i/(γϕˉi) satisfies ui=(4/(3γ))∑j=1iβj. Since βj=γ/(16j2) and j−2≤(j−1)−1−j−1 for j≥2, telescoping by [F10] gives ∑j=1iβj≤γ/8. Thus ui≤1/6<1/π by [F11]. It follows that e~i≤γϕˉi/π≤ϕˉi for i≤t−1, closing the induction and giving et−1≤γϕˉt−1/π<γ/4 when t≥2. At the last step, sin⁡ϕt−1≤1/2+γ/4<18/25. By [F13], g(s)=sin⁡(3arcsin⁡s)=3s−4s3 and g(s)−g(u)=(s−u)(3−4(s2+su+u2)); for s,u∈[0,18/25] the coefficient has absolute value at most 13/4. Therefore et≤βt+134et−1<γ8+13γ16<γ, since βt≤γ/16. If t=1, e0=0 and e1≤β1<γ. Finally ϕˉt∈[π/4,3π/4], so At on a fresh stationary state has marked amplitude at least 1/2−γ.

4.1F15F16F18F19step 1.3step 3.1step 1.4givenalgebra

In the tolerant wrapper, after an unsuccessful marked measurement at level i, let ∣νi⊥⟩ be the normalized unmarked component and let ∣μi⊥⟩ be the normalized unmarked component of the ideal recursive state ∣ϕi⟩=Ai∣π⟩. The actual state differs from Ai∣π⟩ by the previous input discrepancy Δi=∥νi−1⊥−π∥, since the same unitary Ai 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 i<t, ϕˉi<π/4 and ei≤γ/4, so sin⁡ϕi≤1/2+γ/4<18/25 and the unmarked norm exceeds 2/3 (since 1−(18/25)2>4/9). Projecting the two states onto the unmarked subspace and normalizing gives ∥νi⊥−μi⊥∥≤3Δi: the projected vectors differ by at most Δi, their norms differ by at most Δi, and the ideal norm is at least 2/3. The ideal unmarked directions drift by at most 12βi+1ϕˉi: the error vector in the recursive reflection has norm at most 4βi+1ϕˉi, and normalizing its unmarked projection costs at most a factor 3. Also ∥μ0⊥−π∥=2sin⁡(ϕ0/2)≤ϕ0; the equality follows from the inner product ⟨μ0⊥,π⟩=cos⁡ϕ0 and the inequality from [F15]. Let Δ1=0. The preceding bounds give, for 1≤i<t, Δi+1≤3Δi+12ϕ0∑j=1i3j−1βj+ϕ0. Iterating this recurrence gives Δt≤ϕ0∑i=1t−13t−1−i+12ϕ0∑i=1t−13t−1−i∑j=1i3j−1βj≤123t−1ϕ0+2 3tϕ0∑j=1t−1βj≤π8+3γ4. For the second inequality, interchange the finite sums: for fixed j, ∑i=jt−13t−1−i<(1/2)3t−j, so its coefficient becomes less than 12⋅3j−1⋅3t−j/2=2⋅3t. For the last inequality, 3tϕ0<3π/4 by minimality and ∑jβj≤γ/8 by the telescoping bound in step 3.1.

5.1F11F16step 4.1algebra

Therefore at the unknown successful level t, the retained-state wrapper's marked amplitude is at least 1/2−γ−Δt≥1/2−π/8−7γ/4. Since 1/2>7/10, π<7/2 by [F11], and γ=1/120, this lower bound exceeds 119/480, whose square exceeds 1/20. By [F16], the next projective marked measurement succeeds with probability at least 1/20 without resetting after earlier failed measurements.

6.1F1F12F15F16step 5.1givenalgebra

If M=∅, every verified marked-output branch is impossible, so the algorithm never returns a false marked label. For 0<ε0<1/2, the least tmax⁡ in the wrapper satisfies 3tmax⁡=O(1/ε0): minimality gives 3tmax⁡−1arcsin⁡ε0<π/4, and [F12, F15] imply arcsin⁡x≥x for x∈[0,1] because x=sin⁡(arcsin⁡x)≤arcsin⁡x. For any nonempty instance with p≥ε0, monotonicity of arcsin⁡ gives t(p)≤tmax⁡. When 0<p<1/2, the initial stationary sample succeeds with probability p; after its failure, the fresh stationary walk state in step 2 gives conditional success probability at least 1/20 by step 5.1. Hence the whole trial succeeds with probability at least p+(1−p)/20≥1/20. If p≥1/2, the first sample alone succeeds with probability at least 1/2. Thus each outer trial succeeds with probability at least 1/20, so the exact rational-power definition of nout gives (19/20)nout≤ρ and the independent trials fail with probability at most ρ. If ε0≥1/2, each direct stationary sample succeeds with probability at least 1/2 by [F1, F16], and the exact rational-power definition of ns gives 2−ns≤ρ. Thus the error is one-sided and at most ρ.

7.1F4F9givenstep 1.3step 6.1algebra∎

At level i, the reflection R(βi) uses ki=O(log⁡(i+1)) QPE copies and Q=O(1/δ0) controlled W steps per copy by [F9]; its query/update cost is O((U0/δ0)log⁡(i+1)+C) including the marked phase flip. Each wrapper marked/unmarked test has the O(C) compute/readout/uncompute cost in step 1.3. The recursion satisfies Ci=3Ci−1+O((U0/δ0)log⁡(i+1)+C), so Ci=O(3i(U0/δ0+C)) because ∑j≥13−jlog⁡(j+1)<∞. Summing Ci for i≤tmax⁡ is geometric. The first stationary sample can be prepared by one call to Aπ and testing its first label, at setup cost at most S0; if that test fails, step 2 makes one further fresh stationary edge-state preparation at cost S0. Since A0=I and the recursive Ai 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 2S0+O(3tmax⁡(U0/δ0+C))=2S0+O(ε0−1/2(U0/δ0+C)). Multiplying by the O(1+ln⁡(1/ρ)) outer cap gives the low-mass statement; the direct-sampling branch costs O((S0+C)(1+ln⁡(1/ρ))). For other resource coordinates, [F9] separately charges QPE phase gates and registers, while the procedure separately charges RA, comparisons, coefficient precision, and classical arithmetic.

AlgorithmAlgorithm: Literature-sourcedProof: Not applicableOpen item page →

Szegedy-walk marked-set detection

Definition

Input. A finite symmetric lazy row-stochastic matrix P on nonempty X, with uniform stationary law and, when ∣X∣≥2, real promised lower gap δ0∈(0,1] satisfying δ(P)=1−λ2(P)≥δ0; a marked predicate with promise M=∅ or ∣M∣/∣X∣≥ε0 for real ε0∈(0,1]; and a real failure target β∈(0,1). Supply an exact two-outcome projective test on the first register with its Lüders instrument and declared cost Cmark; this cost includes the marked-branch label readout and verification. The finite classical input supplies, for each z∈{δ0,ε0,β}, a certified dyadic bracket [z−,z+] encoded by finite binary numerators and exponents, with 0<z−≤z≤z+≤min⁡(1,2z−). 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 δ‾=(δ0)−, ε‾=(ε0)−, and β‾=β−. Also supply a circuit Aunif preparing ∣s⟩=∣X∣−1/2∑x∈X∣x⟩ with its cost and a row-preparation access model for the absorbing chain P′ of Discriminant of the marked-state absorbing walk. The model supplies VP′, 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 ∣X∣=1, 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.

  1. If ∣X∣=1, measure its only label, evaluate the supplied predicate and return the exact answer. Otherwise set γ0=arccos⁡(1−δ‾ ε‾). Start at m=6 and increment until the exact comparison 1−δ‾ ε‾≤cos⁡(π25−m), and set Q=2m. Since the compared cosine is the real part of a root of unity, this is a finite exact algebraic comparison; it is equivalent to m=⌈log⁡2(32π/γ0)⌉. Start at k=1 and increment until the exact rational comparison 6kβ‾≥1 holds, equivalently k=⌈ln⁡(1/β‾)/ln⁡6⌉. Both loops terminate because δ‾ ε‾>0 and β‾>0. All comparisons and their bit costs are part of the declared input cost model.
  2. Repeat the following fresh-state run k times, stopping early if NONEMPTY is returned.
  3. Prepare ∣s⟩ with Aunif and apply the supplied row preparation VP′ to obtain the two-register row state. On the first register, use the supplied two-outcome projective measurement with Π1=∑x∈M∣x⟩⟨x∣⊗Irest and Π0=I−Π1, with Lüders branch maps Z↦ΠaZΠa. 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 1 occurs, measure the first register in its computational basis, verify the resulting label x∈M, and output NONEMPTY and x immediately. If outcome 0 occurs with positive probability, continue with its normalized projected state; this preserves coherence among all unmarked labels. Outcome 0 is impossible when M=X, so no conditional state is needed there.
  4. 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 U′=S(2T′T′∗−I), where T′ is the row-preparation map for P′. 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 U′2j by 2j sequential controlled one-step U′ calls. The factorwise controlled call charges controlled VP′†, controlled VP′, the controlled clean-state reflection, and controlled swap. No controlled inverse of U′ is used.
  5. For the measured integer y∈{0,…,Q−1}, compute d(y)=min⁡(y/Q,1−y/Q) using exact rational arithmetic. Since 0<δ‾ ε‾≤1, the principal inverse-cosine convention and cosine monotonicity give 0<γ0≤π/2. Return NONEMPTY exactly when d(y)>γ0/(4π); equality takes the EMPTY branch. This strict comparison is finite: if d(y)>1/8 accept, and if d(y)≤1/8 compare the algebraic numbers cos⁡(4πd(y)) and 1−δ‾ ε‾, accepting exactly when the former is strictly smaller. Here 4πd(y) is a rational multiple of π, so its cosine is the real part of a root of unity; monotonicity of cosine on [0,π] gives the stated comparison. Charge the exact comparison and all phase-register/inverse-QFT gates.
  6. If all k fresh runs fail to return NONEMPTY, output EMPTY. A run uses one marked check, the supplied uniform-state and one row-preparation costs, one m-bit QPE, and its explicitly charged controlled-walk calls. With only one-step controlled access, QPE uses exactly Q−1 controlled U′ calls. Gate synthesis, bracket-description bits, exact comparison arithmetic, and classical threshold bits are additional charged costs.
LemmaStatement: Literature-sourcedProof: AI-adaptedjudge pass (gpt-6-luna)Open item page →

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 df(S) for the values at the indices of S, in increasing index order. In the pure value-query model, encoded vertex preparation costs r 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 W=U2 step and its inverse cost at most eight. A stationary two-register walk state costs at most r+2 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: N≥4, 2≤r≤⌊N/2⌋, the lazy Johnson transition matrix, and the XOR value oracle, with its full valid-address action.

[F1]

Element-distinctness Johnson walk and value access: a vertex stores r labeled values; a neighbor replaces one selected index by one unselected index; markedness is decidable from stored values.

[F2]

Coherent XOR function oracle: a query XORs the encoded value into its target; applying it twice cancels it.

[F3]

Controlled Unitary Access and Inverse Unitary Access: controlled actions are identity/operation blocks and inverses reverse the complete circuit word.

[F4]

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; W uses four preparation/inverse calls and two swaps.

[F5]

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

1.1givenF1F2F5construct

Encode a vertex by the computational basis vector ∣S,df(S)⟩. 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 N,r 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 r ordered values by r queries. The claim is a query bound only: neither the number of gates of that unitary nor a uniform generator is being bounded.

2.1givenF1F2step 1.1construct

From the encoded source vertex and a blank target register, a finite unitary depending only on N,r prepares the second subset label in the Johnson row distribution: amplitude 1/2 for T=S and 1/2r(N−r) for every T=S−{i}+{j}. 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 j on a non-loop branch, and uses the fixed valid address 1 on the loop branch. Copy to the target all values whose indices lie in S∩T, using the source stored values. Query f(j) 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 S,T. 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.

3.1F2F3F4step 1.1step 2.1construct

Initialize the address scratch to the fixed valid address 1. To control this circuit, control its nonquery gates, leaving that address at 1 on the control-zero branch, and still compute f(j) 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 ∣0tgt⟩. The query-free reflection Isrc⊗(2∣0tgt⟩⟨0tgt∣−Itgt) 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.

4.1F1F3F4step 1.1step 2.1step 3.1algebradischarge-construct∎

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 U costs four queries and controlled W=U2 costs eight; their inverses have the same counts. Preparing the encoded uniform first vertex costs r, and one row call adds two, giving stationary edge-state setup at most r+2. 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.

TheoremStatement: AI-adaptedProof: AI-adaptedprecheck passOpen item page →

Element-distinctness O(N^{2/3}) query bound

Statement

Let N≥4, f:[N]→V be given by the coherent value oracle in Element-distinctness Johnson walk and value access, and suppose some distinct a,b satisfy f(a)=f(b). For any 2≤r≤⌊N/2⌋, the lazy Johnson walk has absolute gap δ=N/[2r(N−r)], marked stationary mass at least ε=r(r−1)/[N(N−1)], stored-vertex setup value-query cost r, elementary replacement-update cost 2, and check cost 0. The controlled row-access construction of Coherent Johnson row access with stored values supplies stationary edge-state setup at most r+2, controlled row reflection at most 4, and controlled two-reflection walk/inverse at most 8 value queries. The reversible-walk finding theorem therefore gives a marked-subset finder with success probability at least 1/20, using one outer trial (failure input ρ=31/32), and with

2r+O ⁣(Nr)

value queries. Taking r=min⁡{⌊N/2⌋,max⁡{2,⌊N2/3⌋}} gives O(N2/3) 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.

[F1]

Spectrum of the lazy Johnson walk: for 2≤r≤N/2, the lazy Johnson walk has nonnegative eigenvalues and absolute gap N/[2r(N−r)].

[F2]

Element-distinctness Johnson walk and value access: states are uniform r-subsets; the marked condition is that some pair in the subset has equal function values; setup costs r value queries, a replacement update costs 2, and checking the stored values costs no value queries.

[F3]

Finite reversible-walk finding cost: with a supplied gap lower bound δ0≤δ and marked stationary-mass lower bound 0<ε0<1/2, one outer trial succeeds with probability at least 1/20 on a nonempty instance and costs 2S0+O(ε0−1/2(δ0−1/2U0+C)), where S0 prepares the stationary edge state and U0 bounds controlled W, controlled W∗, and the controlled row-space reflection.

[F4]

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 W and its inverse at most eight, stationary edge setup at most r+2, and checking zero.

Proof

1.1givenalgebra

The total number of r-subsets is (Nr). The number containing a fixed pair {a,b} is (N−2r−2), so its uniform probability is (N−2r−2)(Nr)=r(r−1)N(N−1). Every subset containing this colliding pair is marked, so the marked stationary mass is at least this value.

2.1F1F2F3F4step 1.1algebra

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 q≤1, let dyad⁡(q)=2−j for the least integer j≥0 with 2−j≤q; exact rational comparisons compute it and give q/2≤dyad⁡(q)≤q. Supply the dyadic lower gap bound δ0=dyad⁡(δ). The initial stored list requires one query for each of its r 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 ∣S,d,b⟩↦∣S,d,b⊕c(d)⟩, where c(d) 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 S0≤r+2, common controlled-walk/inverse/row-reflection bound U0=8, and C=0.

3.1F2F3F4step 2.1algebra

Put ε∗=r(r−1)/[N(N−1)] and supply the dyadic lower marked-mass bound ε0=dyad⁡(ε∗). For r≥2 and N≥4, r−1≥r/2 and N(N−1)≤N2, hence ε∗≥r2/(2N2) and ε0≥ε∗/2≥r2/(4N2). Also r≤N/2 gives δ=N/[2r(N−r)]≥1/(2r), so δ0≥δ/2≥1/(4r) by step 2.1. Since r≤N/2, ε∗≤(N−2)/(4(N−1))<1/2, so [F3] applies even if the actual marked mass is larger. Run the wrapper with the dyadic failure target ρ=31/32. Since 19/20≤31/32, its cap is exactly nout=1, and [F3] gives success probability at least 1/20. Its two fresh stationary preparations use at most 2(r+2) value queries by [F4], while the recursive search uses O ⁣(1ε08δ0). The total is therefore 2r+4+O ⁣(Nrr)=2r+O(N/r), with the additive 4 absorbed since N/r≥1. The measured set is marked; by [F2] it contains two indices with equal stored values, and scanning those r stored values identifies such a pair without a new value-oracle query.

4.1F2step 3.1algebra∎

For N≥8, N2/3≤N/2; for 4≤N≤7, the displayed clamp selects an admissible integer in [2,⌊N/2⌋]. The clamp differs from N2/3 by only fixed factors over this finite range and is Θ(N2/3) for all N≥4. Therefore both r and N/r are O(N2/3). If N≤3, the definition specifies direct pairwise value comparison instead of a Johnson walk; querying each value once uses at most N value queries.

TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (gpt-6-luna)Open item page →

Walk detection correctness and cost

Statement

Let P=(I+Q)/2 be a finite symmetric lazy transition matrix on a nonempty finite set X, with uniform stationary law. Fix real promise parameters δ0,ε0∈(0,1] and β∈(0,1). When ∣X∣≥2, suppose λ2(P)≤1−δ0; the marked-set promise is M=∅ or ∣M∣/∣X∣≥ε0. The finite algorithm input includes certified dyadic brackets [z−,z+] for z∈{δ0,ε0,β} with 0<z−≤z≤z+≤min⁡(1,2z−); 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 ∣X∣=1, the promise parameters are unused. Write δ‾=(δ0)−, ε‾=(ε0)−, and β‾=β−. Give the algorithm the stated uniform-state circuit, a row-preparation access model for the absorbing chain P′, its controlled and inverse calls needed for the one-reflection walk, the marked check, and all their separate costs. Put

γ0=arccos⁡(1−δ‾ ε‾),m=min⁡{j≥6:1−δ‾ ε‾≤cos⁡(π25−j)},Q=2m,k=min⁡{j≥1:6jβ‾≥1},

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 1−β on every promised nonempty instance. For ∣X∣≥2, let Cinit=Cunif+Crow, where the terms are the supplied uniform-state and one row-preparation costs, Cmark an upper bound for the initial marked/unmarked Lüders test and its marked-branch label readout and verification, Cwalk the cost of one controlled one-reflection walk call, and GQPE(m) the phase-register preparation and inverse-QFT gate cost. Its worst-case charged quantum cost is at most

k(Cinit+Cmark+(Q−1)Cwalk+GQPE(m)),

when only one-step controlled-walk access is supplied. The factorwise implementation of Cwalk 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 (Q−1)Cwalk by the sum of their m declared costs. The bracket ratios imply Q=O((δ0ε0)−1/2) and k=O(1+ln⁡(1/β)), 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.

[F1]

Spectral bound for a symmetric lazy walk killed on a marked set: PUU is positive semidefinite and ∥PUU∥≤1−δε when the uniform chain has second eigenvalue at most 1−δ and ε=∣M∣/∣X∣. The actual gap δ=1−λ2(P) satisfies δ≥δ0≥δ‾; on a promised nonempty instance ε≥ε0≥ε‾.

[F2]

Discriminant of the marked-state absorbing walk: P′ is row-stochastic and its Szegedy discriminant is D(P′)=PUU⊕IM.

[F3]

Szegedy spectral mapping for one and two reflections: for the one-reflection walk U′=S(2T′T′∗−I), a discriminant eigenvalue λ∈(−1,1) gives walk eigenvalues e±iarccos⁡λ; at λ=1 the corresponding row-space line has eigenvalue +1.

[F4]

Phase-estimation nearest-grid and tail bounds: for Q=2m and K=⌊Qη⌋≥2, QPE has probability at most 1/(2(K−1)) of circular phase-estimation error at least η.

[F5]

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.

[F6]

Exact phase recovery on the QPE grid: a zero phase is returned as outcome 0 with certainty.

[F7]

Phase-estimation query and gate costs: an m-bit QPE from one controlled-step oracle makes exactly 2m−1=Q−1 controlled-step calls; phase-register gates are charged separately.

[F8]

Exact row-preparation access count for one and two walk steps: the factorwise controlled implementation of one U′ charges one controlled inverse row preparation, one controlled forward row preparation, one controlled clean-state reflection, and one controlled swap.

[F9]

Dirac Notation Conversion: orthogonal computational-basis labels define the finite register measurement and its projected outcome branches.

[F10]

The Szegedy discriminant is self-adjoint and contractive: the transition-state map T′ is an isometry, so distinct basis row states are orthogonal and each has norm one.

[F11]

Circular phase distance modulo one: for x∈[−1,1], distance to zero is dT(x)=min⁡{∣x∣,1−∣x∣}, equivalently the distance from x to its nearest integer.

[F12]

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.

[F13]

Principal inverse sine and inverse cosine: arccos⁡:[−1,1]→[0,π] and cos⁡(arccos⁡x)=x.

[F14]

Signs, monotonicity intervals, and ranges of sine and cosine: cosine is strictly decreasing on [0,π].

[F15]

Double-angle and quadratic power-reduction identities: 1−cos⁡t=2sin⁡2(t/2).

[F16]

Sine and cosine are 1-Lipschitz on R: for u≥0, sin⁡u≤u.

[F17]

Proof

1.1F3F6givenalgebra

If ∣X∣=1, the supplied predicate is evaluated on the sole label and the procedure returns the exact answer. Assume henceforth ∣X∣≥2. In the empty case U=X, P′=P, and the prepared row state is T′∣s⟩, where ∣s⟩=∣X∣−1/2∑x∈X∣x⟩. Symmetry of P gives T′∣s⟩=ST′∣s⟩, so [F3] places it on the +1 eigenline and its phase is exactly zero. The first marked check cannot accept, and [F6] makes QPE output y=0, for which the strict cutoff fails. Thus neither branch falsely accepts.

1.2F2F9F10F12givenalgebra

In a nonempty instance write ε=∣M∣/∣X∣. The first-register check measures a uniformly distributed label; if it is marked, the algorithm accepts immediately, including the endpoint M=X. Otherwise U=X∖M is nonempty and the conditional row state is T′∣sU⟩, with ∣sU⟩=∣U∣−1/2∑x∈U∣x⟩. By [F10], each first-register outcome has squared norm 1/∣X∣ under T′, and [F12] projects onto the sum of exactly the ∣U∣ unmarked row vectors and normalizes it.

2.1F1F2F3F10step 1.2algebra

On U, [F1] and the promises give 0≤λ(PUU)≤1−δ‾ ε‾. Hence its eigenvalues are at most 1−δ‾ ε‾<1 and their one-reflection phases have circular distance from zero at least γ0/(2π). The state T′∣sU⟩ lies in ran⁡T′ and is orthogonal to every marked row vector T′∣x⟩, x∈M, because those vectors have a distinct first-register label; the orthogonality also follows from the isometry [F10]. It therefore has no marked λ=1 component and no component in (ran⁡T′+ran⁡(ST′))⊥. The decomposition [F2] and spectral mapping [F3] show that all its spectral components are the nonzero-phase signal components just bounded.

3.1F4F5F11step 2.1step 1.2algebra

The choice of m gives 1−δ‾ ε‾≤cos⁡(π25−m). By [F13], cos⁡γ0=1−δ‾ ε‾, and [F14] with γ0∈[0,π] and π25−m∈[0,π] therefore gives γ0≥π25−m, or Q≥32π/γ0. Also 0<δ‾ ε‾≤1, so cos⁡γ0≥0=cos⁡(π/2) by [F13] and [F17]; [F14] gives 0<γ0≤π/2. Thus the branch comparison in algorithm step 5 is exact: d(y)>1/8 implies d(y)>γ0/(4π), while for d(y)≤1/8 both angles lie in [0,π/2] and strict decrease of cosine makes d(y)>γ0/(4π) equivalent to cos⁡(4πd(y))<1−δ‾ ε‾; equality takes the rejected branch. Set η=γ0/(8π). Then K=⌊Qη⌋≥4, so [F4] bounds the probability of a circular QPE error at least η by 1/6. To justify the needed distance comparison from the definition [F11], take u=θ−y/Q∈(−1,1) and v=y/Q∈[0,1). Choose nearest integers a,b to u,v, respectively, so ∣u−a∣=dT(u) and ∣v−b∣=dT(v). Since θ=u+v∈[0,1), its distance to the nearest integer is at most its distance to the particular integer a+b; hence dT(θ)≤∣θ−(a+b)∣=∣(u−a)+(v−b)∣≤dT(u)+dT(v). Thus d(y):=dT(y/Q)≥dT(θ)−dT(θ−y/Q). On every outcome with estimation error dT(θ−y/Q)<η, step 2.1 gives d(y)>γ02π−γ08π=3γ08π>γ04π. 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 5/6. Including the initial marked-label branch can only raise its success probability.

4.1F6givenstep 1.1step 3.1algebra

Each fresh run therefore misses a promised nonempty set with probability at most 1/6. Independent fresh preparations make the probability that all k runs miss at most (1/6)k≤β‾≤β by the definition of k 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.

5.1F7F8F13F15F16givenstep 4.1algebra∎

For ∣X∣≥2, a run makes one supplied uniform-state preparation, one row preparation, one initial marked check, one m-bit QPE, and then at most Q−1 controlled U′ 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 k proves the cost upper bound; early stopping only reduces it. For ∣X∣=1, 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 x=δ‾ ε‾. Then x=1−cos⁡γ0=2sin⁡2(γ0/2)≤γ02/2 by [F15]–[F16], so γ0≥2x. The least-power-of-two choice gives Q<64π/γ0=O(x−1/2); since x≥δ0ε0/4, Q=O((δ0ε0)−1/2). Also β‾≥β/2, so k=O(1+ln⁡(1/β)).

TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passOpen item page →

Element-distinctness gate cost in the QRAM model

Statement

Fix an injective encoding of values in [M] by b=O(log⁡(M+1)) bits and take the parameter r from Element-distinctness O(N^{2/3}) query bound. For N≥4096, 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 polylog⁡(N+M) QRAM gate-time when their bounded searches do not overrun; the table uses O(N2/3log⁡3(N+M)) memory bits. A fixed threshold N0≥4096 is chosen below; the search uses this storage for N≥N0 and direct value comparison for the finite range 4≤N<N0.

For N≥N0, let Gsubset be the gate-time of the supplied uniform r-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 Grow 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 O(N2/3) and gate-time

O ⁣(Gsubset+rpolylog⁡(N+M)+N2/3(Grow+polylog⁡(N+M))).

The local storage operations are proved below; this item does not construct the compatible full row-access circuit or derive polylogarithmic bounds for Gsubset and Grow. The unconditional O(N2/3polylog⁡(N+M)) gate-time conclusion requires Gsubset=O(N2/3polylog⁡(N+M)) and Grow=O(polylog⁡(N+M)).

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 S non-input nodes, including constants, E input-port uses counted with multiplicity, and m output bits, the serial compiler Reversible embedding of a Boolean circuit implements one reversible XOR value query using at most 6S+4E+m ordinary gate occurrences. With the full DAG-layer parameters D,F of Parallel depth of reversible Boolean embedding (including any non-output nodes), its alternative parallel implementation uses at most 6S+4E+3m occurrences and has depth at most

2D(2⌈log⁡2(F+1)⌉+3)+2⌈log⁡2(m+1)⌉+1.

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.

[F1]

Element-distinctness O(N^{2/3}) query bound: for r=Θ(N2/3), the walk has δ=N/[2r(N−r)], marked mass at least ε=r(r−1)/[N(N−1)], stored-vertex setup value-query cost r, elementary replacement-update cost 2, and check cost 0; its controlled row construction has stationary edge setup at most r+2, controlled row reflection at most 4, and controlled W,W∗ access at most 8 value queries.

[F2]

Element-distinctness Johnson walk and value access: a vertex stores an r-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.

[F3]

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.

[F4]

Coherent XOR function oracle: a value query is the supplied reversible action ∣i,z⟩↦∣i,z⊕enc⁡(f(i))⟩, so the same oracle erases a stored value.

[F5]

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 m output ports, which may repeat input or non-input nodes. Here S counts every non-input node, including constants, and E counts gate input-port uses with multiplicity.

[F6]

Gate, workspace, and serial-depth costs of reversible embedding: the serial compute-copy-reverse compiler implements one clean XOR query using at most 6S+4E+m gate occurrences, where S includes constants.

[F7]

Parallel depth of reversible Boolean embedding: a fanout-aware explicit schedule has depth 2D(2L+3)+2Lm+1 for L=⌈log⁡2(F+1)⌉ and Lm=⌈log⁡2(m+1)⌉.

[F8]

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.

[F9]

For every prime p and n≥1, a field with pn elements exists and For every finite field Fq and every n≥1, a monic irreducible polynomial of degree n exists: for every k≥1 there is a field of order 2k with a polynomial-basis representation from an irreducible degree-k polynomial.

[F10]

Toffoli and Fredkin gates: a Fredkin gate swaps its two targets exactly when its control is one.

[F11]

Finite reversible-walk finding cost: with supplied dyadic gap and marked-mass lower bounds and fixed dyadic target ρ=1/2, the complete capped wrapper succeeds with probability at least 1/2 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 O(S0+ε0−1/2(δ0−1/2+1)).

[F12]

Canonical hash-bucket and nested skip-list storage: hash buckets store stable input-index identifiers; two nested skip lists store index and (f(i),i) orders with rank spans; each level is determined by independent promotion bits; a capped search tests at most D entries per level.

[F13]

Projective measurement outcome weights are probabilities: the probability of a projective outcome with projection Π on unit state ψ is ∥Πψ∥2.

[F14]

Phase-estimation query and gate costs: an m-bit phase-estimation run has O(m2) phase-register and inverse-QFT gate occurrences in the ideal continuous-rotation submodel; each run uses at least one controlled-walk query.

[F15]

The inner-product norm is definite, homogeneous, and satisfies the triangle inequality: the inner-product norm satisfies the triangle inequality.

[F16]

The reverse triangle inequality in a normed space: ∣∥u∥−∥v∥∣≤∥u−v∥.

[F17]

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

1.1F1F9givenalgebra

For N≥4096, the clamp in [F1] is r=⌊N2/3⌋. Set m=⌈log⁡2(N+2)⌉, H=⌈log⁡2N⌉, d=C=16m, R=2⌈log⁡2r⌉, and q=2H. The function (log⁡2(x+2)+1)/x2/3 decreases for x≥4096, because its logarithmic derivative is 1/((x+2)ln⁡2(log⁡2(x+2)+1))−2/(3x)<0; indeed 2(x+2)ln⁡2(log⁡2(x+2)+1)>3x there. Since log⁡2(4098)<13, this gives d≤16(log⁡2(N+2)+1)≤224N2/3/256=7N2/3/8. Also r≥N2/3−1≥255N2/3/256, so d≤r≤N/2 and d≤N≤q. Finally r≤R<2r≤N. By [F9], fix a polynomial-basis representation of Fq; its irreducible polynomial is a finite hardwired setup description whose generation time is separate.

1.2F2F3F10F12construct

For fixed S and seed, place each (i,f(i)) in its hash bucket and build the two canonical lists of [F12]. Pad each list to a power-of-two length L=O(r) with sentinels. A bitonic sorting network recursively sorts the two halves in opposite directions and merges them by comparing pairs at distance L/2, then recursively merging both halves. A bitonic sequence becomes, after thresholding its keys at any fixed threshold, a circular interval of 1 bits; the half-distance compare-exchanges place either all 0 bits in the low half or all 1 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 O(Llog⁡L) comparisons and the sorting recurrence gives O(Llog⁡2L) compare-exchanges. Each comparison of w=O(log⁡N+b)-bit records uses O(w) 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 O(rpolylog⁡(N+M)) gate-time. A scan of the sorted lists computes all level links and spans in O(rH) writes and computes the collision counter from the equal-value runs. If an insertion would exceed a bucket's C slots, use the fixed overflow sentinel of [F12]. The resulting storage is a deterministic function of (S,seed,f∣S), so it is independent of the history of the walk.

2.1F9F12step 1.1algebra

Choose H+1 independent uniform coefficient vectors in Fqd and use them for p−1,p0,…,pH−1 in [F12]. For any t≤d distinct addresses, the first t columns of their Vandermonde evaluation matrix have determinant ∏a<b(xb−xa)≠0, so the evaluations are uniform on Fqt. Thus the bucket labels are d-wise independent and uniform in [R], and each promotion-bit family is d-wise independent and fair. Preparing the coefficient strings uniformly with Hadamards uses (H+1)dH=O(log⁡3N) seed bits.

2.2F3F6F12step 1.1algebra

The index-list spans select the t-th member of S and compute ∣S∩[x]∣ by one bounded skip-list search. Define g(x)=x−∣S∩[x]∣ for 0≤x≤N, where [x]={1,…,x}. It is nondecreasing and increases by one exactly at an unselected index. Binary search for the least x with g(x)≥t+1 therefore gives the t-th element of [N]∖S and uses O(log⁡N) rank searches. Each list search has at most D forward entries per level, and each stable node identifier resolves by evaluating h(i) and scanning at most C slots in its bucket. Here is a finite bit-cost implementation of these operations. For H-bit field elements, addition is bitwise XOR. A polynomial-basis multiplication forms the H2 pairwise bit products and reduces their carryless product modulo the fixed degree-H irreducible polynomial using O(H2) Boolean gates; it has O(H2) serial depth when evaluated by the direct nested-loop circuit. Horner evaluation of one degree-<d polynomial therefore uses O(dH2)=O(H3) Boolean gates and depth, since d=O(H). Evaluating p−1 computes a bucket address within this cost; computing the height of a newly inserted index evaluates at most H promotion polynomials and costs O(H4) gates and depth. Compute-copy-uncompute using [F6] makes these deterministic calculations reversible with constant-factor gate overhead; the O(H2) multiplication scratch can be reused. Each stored record has w=O(log⁡2N+b) bits. Scanning a bucket costs at most Cw addressed swaps, while its hash computation uses the field-evaluation circuit above. A lexicographic key comparison on the O(log⁡N+b) index/value bits uses O(log⁡N+b) Boolean gates and depth by a sequential bit comparison. A rank traversal visits at most (H+1)D=O(log⁡2N) entries; span accumulation adds or compares O(log⁡N)-bit integers, so one rank search has O(log⁡5(N+M)) QRAM calls and ordinary gates. Complement unranking consequently has O(log⁡6(N+M)) such costs. These bounds establish finite polylogarithmic lookup, selected-index, and complement-unranking procedures whenever the capped searches do not overrun.

2.3F1F2F12step 1.2algebra

The QRAM table has RC=O(rlog⁡N) slots. Each slot stores an index, a b-bit value, and O(H) pointers and spans of O(log⁡N) bits each, hence O(log⁡2N+b) bits. The seed, counters, rank registers, arithmetic workspace, and comparator-history scratch add O(rlog⁡2N+log⁡3N) bits. Therefore total table and workspace memory is O(rlog⁡N(log⁡2N+b)+rlog⁡2N+log⁡3N)=O(rlog⁡3(N+M)). The finite initial table and both sorted lists can be built by the reversible networks in step 1.2 using O(rpolylog⁡(N+M)) gate-time after the r value loads.

3.1F2F3F4F6F10F12step 2.2constructalgebra

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 r and insertion is at base rank t, old keys of rank at least t move up by one. At each level containing the new key x, replace the crossing span by the two exact differences t−rank⁡(p) and rank⁡(q)+1−t, where p and q are its predecessor and successor in the old level list; if x is absent at that level, increment the crossing span by one. For deletion of a key x of base rank t, if x is present at a level, replace spans s(p,x) and s(x,q) by s(p,x)+s(x,q)−1; if it is absent, decrement the unique crossing span by one. The head has rank −1 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 r+1≤N and fits in O(log⁡N) bits. Ripple-carry addition, subtraction, and comparison use O(log⁡N) Boolean gates and depth per operation; at most H+1 predecessor paths of at most D entries and O(H) 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 (v,1) and (v,N+1), give the multiplicity of a value v; 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 polylog⁡(N+M) QRAM time and gates whenever their searches fit the cap.

3.2F12step 2.1algebra

For fixed S and a bucket v, let Xv count its selected indices. The d-wise hash family from step 2.1 gives, with C≤d, Pr⁡(Xv≥C)≤E(XvC)=(rC)R−C. Since (rC)≤rC/C!, R≥r, and C!≥2C−1 (each factor 2,…,C is at least 2), this is at most 21−C. With C=16m and 2m≥N+2, 21−C≤2(N+2)−16. A union bound over R≤N buckets gives probability at most 2N(N+2)−16.

3.3F12step 2.1algebra

Put s=⌊d/2⌋=8m. For either fixed key order and each level ℓ<H, condition on the seeds for levels below ℓ; this fixes the level-ℓ list and its key order. Among at most r consecutive windows of s nodes, s-wise independence makes the chance that the promotion bits are all zero or all one equal to 21−s. A union bound over two lists and H levels gives probability at most 4rH2−s≤4rH(N+2)−8. These events control the traversals below level H; the initial traversal at level H needs a separate occupancy bound.

4.1F12step 1.1step 2.1step 3.3algebra

Let XH count nodes of S with height H; it is the same count in both key orders. For any s distinct nodes, step 2.1 and independence of the H promotion seeds give probability 2−Hs=q−s that all reach level H. Thus Pr⁡(XH≥s)≤E(XHs)=(rs)q−s≤(r/q)s/s!≤21−s≤2(N+2)−8, since s≤d≤r, r≤q, and s!≥2s−1. Outside this event, the top list has fewer than s nodes, and deleting and inserting one node leaves at most s there. Below the top level, absence of the run events in step 3.3 bounds every run of unpromoted nodes by s−1. Deleting a promoted node can merge two such runs, and the subsequent insertion can add at most one unpromoted node, giving at most 2s−1 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 D=2s+1 entries at each lower level; the top traversal also fits this cap.

5.1F12step 3.2step 3.3step 4.1construct

Call a seed bad for S if some bucket has occupancy at least C or a run event of step 3.3 or the top-level event of step 4.1 occurs. Its probability is ηN≤2N(N+2)−16+(4rH+2)(N+2)−8=O(N−7log⁡N) 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 C 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.

6.1F15F17step 5.1algebra

For a fixed subset and neighbor, either endpoint is bad with probability at most 2ηN 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 2ηN. Since the capped and ideal operations are unitary and agree off that block, their state-vector difference on that prefix is at most 22ηN. 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.

7.1F1F11F13F15F16step 1.1step 5.1step 6.1algebra

Write δ∗=N/[2r(N−r)] and ε∗=r(r−1)/[N(N−1)]. For 0<q≤1, define dyad⁡(q)=2−j for the least integer j≥0 with 2−j≤q, determined by exact rational comparisons; then q/2≤dyad⁡(q)≤q. Supply δ0=dyad⁡(δ∗), ε0=dyad⁡(ε∗), and ρ=1/2 to [F11]. Since r≤N/2, δ∗≥1/(2r); since r−1≥r/2 and N(N−1)≤N2, ε∗≥r2/(2N2). Thus δ0≥1/(4r) and ε0≥r2/(4N2). Counting each capped walk update and mark check as one logical operation, [F11] gives O(ε0−1/2(δ0−1/2+1))=O(N/r) such operations. The complete wrapper makes only O(1) fresh stationary preparations at this fixed failure target. Each uses O(r) value queries by [F1], so all setups together use O(r) queries; table encoding and final reading occur only O(1) times. Thus even counting every setup query, T=O(r+N/r)=O(N2/3). A hybrid over these T data-dependent operations gives state-vector error at most 2T2ηN. The final success probability changes by at most twice this error: [F13] writes it as ∥Πψ∥2 for the success projection, [F16] bounds ∣∥Πψ∥−∥Πϕ∥∣ by ∥ψ−ϕ∥, and [F15] bounds the difference of squares. Since ηN=O(N−7log⁡N), this probability error tends to zero; choose fixed N0 large enough that it is at most 1/40 for all N≥N0. The fixed target ρ=1/2 includes only a constant number of fresh outer trials in the complete wrapper, so all its calls are included in T. By [F11], the ideal wrapper succeeds with probability at least 1/2; its capped-storage implementation therefore succeeds with probability at least 19/40. Verify any reported pair directly with two value queries; this preserves one-sided error and adds only O(1) queries.

8.1F1F2F4F11F14step 1.1step 2.3step 3.1step 5.1algebrastep 7.1

On the walk branch N≥N0, 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 ε0<1/2. By [F1], the coherent Johnson row preparation has stationary edge setup at most r+2, controlled row reflection at most 4, and controlled W,W∗ access at most 8 value queries; thus the complete fixed-target wrapper in [F11], with all its fresh setups counted as in step 7.1, gives O ⁣(r+ε0−1/2(δ0−1/2+1))=O(r+N/r)=O(N2/3) value queries. Moreover δ0≥1/(4r)≥1/(2N) and ε0≥r2/(4N2)≥1/N2, so the phase-register lengths in the reversible-finding algorithm are O(log⁡N). Each phase-estimation run therefore uses O(log⁡2N) 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 polylog⁡(N+M) gate-time per charged update. Each fresh stationary preparation charges Gsubset for its uniform subset, O(rpolylog⁡(N+M)) for value loading and table construction, and O(Grow) for its edge-row preparation. There are only O(1) fresh preparations by step 7.1, so their total cost is O(Gsubset+rpolylog⁡(N+M)+Grow). The final stored-value scan costs O(rpolylog⁡(N+M)). Charging each of the O(N2/3) walk-access units at Grow gives the stated formula; direct verification of a reported pair costs at most two further value queries and polylogarithmic gate-time. For 4≤N<N0, direct pair comparison uses N value queries and O(N2log⁡(M+1)) gates; since N0 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 Grow are not proved here.

9.1F4F5F6F7F8step 8.1algebra∎

For the optional Boolean value circuit, [F5] counts every non-input node, including unused constants, in S, so [F6] gives the serial bound 6S+4E+m. The parallel construction in [F7] instead uses at most 6S evaluation/reversal gates, 4E input fanout/unfanout gates across the two passes, 2m output fanout/unfanout gates, and m output CNOTs, totaling at most 6S+4E+3m. Its stated depth follows by substituting L=⌈log⁡2(F+1)⌉ and Lm=⌈log⁡2(m+1)⌉ 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