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.

✓ 11 results · all verified · 7 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.

Exact Oracle Algorithms

1 · Prerequisites

2 · Summary

This page fixes the constant-versus-balanced Deutsch promise, the Deutsch–Jozsa promise on n-bit addresses (encoded by an N=2n-bit truth table), and the no-offset Bernstein–Vazirani promise. It defines the exact one-query circuits with their X and Hadamard preparation gates and proves the measured output laws from the finite F2n Hadamard character sum. The classical results distinguish deterministic exact query complexity from randomized bounded-error cost; in particular, the Deutsch–Jozsa exact deterministic lower bound is not a bounded-error exponential lower bound because three independent uniform random samples with replacement already achieve success at least 3/4 (One classical query cannot solve Deutsch exactly, Exact deterministic Deutsch–Jozsa needs N/2+1 queries, Three classical samples solve Deutsch–Jozsa with bounded error, Classical Bernstein–Vazirani needs n queries for bounded error).

3 · Logical flowchart

4 · Definitions, theorems and proofs

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

Hadamard character sum on F_2^n

Statement

For n≥1 and z∈{0,1}n, with the binary dot product of Binary dot product as parity,

∑x∈{0,1}n(−1)x⋅z={2n,z=0n,0,z≠0n.

Consequently, for every x∈{0,1}n,

H⊗n∣x⟩=2−n/2∑y∈{0,1}n(−1)x⋅y∣y⟩,

where H is the exact one-qubit gate of Exact one-qubit gates and rotations and tensor factors follow the ordered register convention of Ordered tensor registers, their inner product, and wire permutations.

Facts & Assumptions

Given: An integer n≥1 and binary strings x,z∈{0,1}n.

[F1]

Binary dot product as parity: x⋅z is the parity ⨁i<n(xi∧zi), a bit.

[F2]

Exact one-qubit gates and rotations: in the ordered basis (∣0⟩,∣1⟩), H=2−1/2(111−1).

[F3]

Finite registers and their ordered computational bases and Big-endian encoding of ordered bit strings: the n-qubit basis is the ordered product basis indexed by bit strings in lexicographic order, with the first wire most significant.

[F4]

Ordered tensor registers, their inner product, and wire permutations: the tensor register keeps its displayed factor order and has the product inner product on elementary tensors.

[F5]

Tensor products of finitely many linear maps: H⊗n sends an elementary tensor v0⊗⋯⊗vn−1 to Hv0⊗⋯⊗Hvn−1.

[F6]

Dirac Notation Conversion: ∣v⟩ denotes the vector v in the finite-dimensional register.

Proof

1.1givenF1algebra

By [F1], (−1)x⋅z=∏i<n(−1)xizi, since the exponent parity is the sum of the coordinate products modulo two. Distributivity over the finite Cartesian product gives ∑x∈{0,1}n(−1)x⋅z=∏i<n(1+(−1)zi). Each factor is 2 when zi=0 and 0 when zi=1. Thus the product is 2n when all coordinates of z vanish and is 0 otherwise.

2.1givenF1F2F3F4F5F6algebra∎

By [F2], on each factor H∣xi⟩=2−1/2∑yi∈{0,1}(−1)xiyi∣yi⟩. Applying [F5] to the ordered product basis [F3] gives a coefficient 2−n/2∏i<n(−1)xiyi=2−n/2(−1)x⋅y at ∣y⟩, by [F1]. Summing these coefficients proves the tensor-Hadamard formula in the Statement.

DefinitionDefinition: Literature-sourcedProof: AI-generatedprecheck passOpen item page →

Deutsch constant-versus-balanced promise

Definition

Let f:{0,1}→{0,1} be the total Boolean function of a Promise query instance and oracle family. Encode f by its hidden length-two truth table z=f(0)f(1)∈{0,1}2, whose associated oracle function is fz=f. The Deutsch promise is the decision task with YES set Y={00,11} and NO set N={01,10}. The required output is 0 on Y (constant, f(0)=f(1)) and 1 on N (balanced, f(0)≠f(1)). All four Boolean functions on one bit are promised. The truth table labels the hidden instance; the query interface supplies oracle access to f.

Facts & Assumptions

Given: A total function f:{0,1}→{0,1}.

[F1]

QA task and promise domain: a decision task consists of disjoint YES and NO subsets of the encoded inputs; no answer is required outside their union.

[F2]

Promise query instance and oracle family: each promised instance supplies a total function on its entire address domain.

Verification

1.1givenF1F2algebra

Writing the two function values in order gives exactly the four strings 00,01,10,11. By the Definition, 00 and 11 are in Y, while 01 and 10 are in N. These two sets are disjoint and cover all four possible tables, so the promised output is well-defined.

2.1givenF2step 1.1algebra∎

The totality in [F2] makes both evaluations f(0) and f(1) available. Equality gives the constant case and inequality gives the balanced case by the two disjoint rows of the table in step 1.1.

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

Deutsch–Jozsa promise

Definition

Let n≥1, let N:=2n, and let f:{0,1}n→{0,1} be the total function of a Promise query instance and oracle family. The Deutsch–Jozsa promise is the decision task with YES set consisting of constant functions and NO set consisting of functions taking each value 0 and 1 exactly N/2 times. The required output is constant or balanced, respectively. Here n is the address width, and N is the number of addresses, as supplied by Big-endian bit-string indices are bijective and The cardinality ∣A∣ of a finite set. Encode an instance by its N-bit truth table in lexicographic address order; its encoded input size is therefore N, not n, under Input encoding and size for algorithmic tasks. In the query-instance convention, the length-N family has address width a(N)=n and reply width b(N)=1; the public parameter n determines the registers, while the unknown truth table is supplied through oracle queries. Lengths that are not powers of two at least two have empty promise.

Facts & Assumptions

Given: n≥1 and a total Boolean function on the n-bit address set.

[F1]

QA task and promise domain: a decision promise has disjoint YES and NO sets and no correctness obligation outside their union.

[F2]

Promise query instance and oracle family: the oracle function is total on the address domain, even though the task promise restricts the legal instances.

[F3]

Input encoding and size for algorithmic tasks: the declared truth-table encoding has length N=2n; n is the address width, not the encoded input size.

Verification

1.1givenF1F4algebra

Since n≥1, N=2n is even and 1≤N/2<N. A constant function has either 0 or N addresses with value 1, whereas a balanced function has N/2 such addresses. These counts differ, so the YES and NO sets are disjoint.

2.1givenF2F3F4constructalgebra∎

Both promise classes are nonempty: the zero function is constant, and the function f(x)=x0 has exactly N/2 inputs with each value because flipping its first bit pairs a zero-output address with a one-output address. Thus the stated promise is meaningful for every n≥1.

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

Bernstein–Vazirani no-offset promise

Definition

Let n≥1. The Bernstein–Vazirani no-offset promise consists of the total functions

fa:{0,1}n→{0,1},fa(x):=a⋅x,

for an unknown secret a∈{0,1}n, using Binary dot product as parity. The task is to output a. This version has no additive offset: the oracle is exactly fa, not x↦a⋅x⊕b.

Facts & Assumptions

Given: n≥1 and a secret a∈{0,1}n.

[F1]

QA task and promise domain: a search task requires a witness in the declared relation on each promised input.

[F2]

Promise query instance and oracle family: a query function is total on every address string in its domain.

[F3]

Binary dot product as parity: a⋅x=⨁i<n(ai∧xi).

Verification

1.1givenF2F3algebra

For every x∈{0,1}n, [F3] is a finite XOR of bits, hence defines one bit; therefore fa is a total Boolean function and satisfies the query-instance requirement [F2].

2.1givenF1F3step 1.1constructalgebra∎

For each coordinate i<n, let ei be the string with a single 1 at position i. Then fa(ei)=ai by [F3]. If fa=fb, evaluation at every ei gives ai=bi, so a=b. Thus the secret is uniquely determined by the function table.

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

One classical query cannot solve Deutsch exactly

Statement

On the Deutsch promise, the exact deterministic classical query complexity is 2. Every randomized classical algorithm making at most one query has worst-case success probability at most 1/2 under per-input correctness.

Facts & Assumptions

Given: A uniformly sampled one-bit Boolean function from the four functions in the Deutsch promise when averaging success; the query algorithm itself must work on every promised function.

[F1]

Deutsch constant-versus-balanced promise: the four truth tables 00,01,10,11 are promised, with equal pairs constant and unequal pairs balanced.

[F2]

Classical query algorithm: a classical query chooses an address from its random tape and prior replies; the query bound is worst-case over promised inputs and random tapes.

[F3]

Finite probability spaces, outcome weights, events, and event probabilities: a finite outcome set with nonnegative weights summing to one has event probability equal to the sum of its weights.

Proof

1.1givenF1F2construct

Fix a deterministic one-query procedure and let q be its queried address. The constant-zero function f0 and the balanced function g defined by g(q)=0, g(1−q)=1 give the same reply. The procedure therefore has the same transcript and output on two functions requiring different answers, so it cannot be exact.

2.1F1F2step 1.1algebra

Querying both addresses reveals the entire truth table; equal replies identify a constant and unequal replies identify a balanced function. Thus two queries suffice exactly, and step 1.1 proves the deterministic exact query complexity is two.

3.1givenF1F2F3algebra∎

Fix a random tape of an algorithm that makes at most one query. If it makes no query, its one output is correct on at most two of the four truth tables. If it queries address q, then for each possible reply b∈{0,1} there are exactly two promised functions with f(q)=b: one constant and one balanced. The fixed tape gives the same output for both, so it is correct on at most one of each such pair, hence on at most two of the four functions. There are finitely many deterministic one-query strategies on two addresses with binary outputs. The random-tape algorithm induces a probability weight on this finite strategy set by grouping tapes according to their resulting strategy. Averaging the fixed-strategy bound over that finite distribution and over the four functions preserves the bound 1/2; by [F3] some promised input has success at most 1/2.

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

Exact deterministic Deutsch–Jozsa needs N/2+1 queries

Statement

For n≥1 and N=2n, the exact deterministic classical query complexity of the Deutsch–Jozsa promise is N/2+1.

Facts & Assumptions

Given: A total Boolean function on {0,1}n promised constant or exactly balanced, with N addresses.

[F1]

Deutsch–Jozsa promise: N is the address count; a balanced function has exactly N/2 zeros and N/2 ones.

[F2]

Classical query algorithm: the next query address may depend on earlier replies, and a deterministic algorithm has a fixed output for each transcript.

[F3]

The cardinality ∣A∣ of a finite set: finite sets have a natural-number cardinality, invariant under bijection.

Proof

1.1givenF1F2F3chooseconstructalgebra

Suppose a deterministic procedure makes at most N/2 queries in the worst case. Run it on the constant-zero function and let S be the set of distinct queried addresses. Write s=∣S∣≤N/2 and list the complement C in lexicographic order, with c=∣C∣. Concatenating the lexicographic lists of S and C lists every address exactly once: the sets are disjoint and cover the domain. Indexing this concatenated list gives a bijection from {0,…,s+c−1} to the N-element address set, so s+c=N by [F3]. Thus c=N−s≥N/2. Choose T to be the first N/2 addresses of C and define g to be 1 on T and 0 elsewhere. Then g is balanced and agrees with the constant-zero function on every address in S. Inductively, each adaptive query and reply in the two executions is the same, so the final outputs agree despite the different correct answers. Thus no such procedure is exact.

2.1F1F2step 1.1algebra∎

Query any fixed set of N/2+1 distinct addresses. If all replies are equal, the function cannot be balanced because each value occurs only N/2 times in a balanced function, so it is constant. If the replies are not all equal, the function is not constant and is balanced by the promise. This gives an exact procedure using N/2+1 queries; combined with step 1.1 the exact complexity is N/2+1.

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

Three classical samples solve Deutsch–Jozsa with bounded error

Statement

For n≥2, the finite probability experiment that samples three distinct addresses uniformly without replacement and outputs constant exactly when all three replies agree has success probability at least 3/4 on every Deutsch–Jozsa input. In the finite fair-bit classical query model, sampling three independent uniform addresses with replacement and using the same output rule also succeeds with probability at least 3/4, using exactly 3n random bits and three value queries. For n=1, querying both addresses solves the promise exactly with two queries. Thus the deterministic exact lower bound is not a bounded-error exponential separation.

Facts & Assumptions

Given: n≥2, N=2n≥4, and a total Boolean function promised constant or exactly balanced; consider both the uniform without-replacement experiment and the independent with-replacement algorithm.

[F1]

Deutsch–Jozsa promise: a balanced function has N/2 addresses of each output value.

[F2]

Classical query algorithm: randomized addresses may be chosen from the random tape, and query cost counts each returned function value once.

[F3]

Finite probability spaces, outcome weights, events, and event probabilities: the uniform law on a finite set assigns each outcome reciprocal cardinality and event probability by finite summation.

[F4]

The cardinality ∣A∣ of a finite set: the address and ordered-triple sample sets have their finite cardinalities.

Proof

1.1givenF1F3F4algebra

For a constant function, all three replies agree, so the procedure outputs constant correctly with probability one. For a balanced function write m=N/2. The ordered sample space has N(N−1)(N−2) triples. If m=2, no three distinct samples can have the same reply, so the error probability is zero. If m≥3, the error event consists of an ordered triple all drawn from the zero class or all from the one class; its probability is 2m(m−1)(m−2)(2m)(2m−1)(2m−2)=m−22(2m−1)=N−44(N−1). This is at most 1/4, since N−4≤N−1.

2.1givenF1F2step 1.1algebra∎

The without-replacement experiment has success at least 3/4 by step 1.1. For an implementation in the finite fair-bit model, take three independent blocks of n fair bits as addresses, allowing repetitions. On a balanced input the three replies are independent fair bits, so they all agree with probability 2(1/2)3=1/4; on a constant input they always agree. Thus this algorithm uses exactly 3n random bits and three value queries and has success at least 3/4. When n=1, the domain has two addresses and querying both returns the full truth table, which classifies exactly. The claim concerns bounded-error upper cost and leaves the deterministic exact lower bound as a separate query measure.

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

Classical Bernstein–Vazirani needs n queries for bounded error

Statement

For the no-offset Bernstein–Vazirani promise on n≥1 bits, every randomized classical algorithm with worst-case success at least 2/3 needs at least n queries. Querying the n standard basis addresses recovers the secret exactly, so the bounded-error and exact classical query complexities are both n.

Facts & Assumptions

Given: A uniformly sampled secret a∈{0,1}n and a classical algorithm making at most q queries to fa(x)=a⋅x.

[F1]

Bernstein–Vazirani no-offset promise: fa(x)=a⋅x is total and the required output is the unique secret a.

[F2]

Binary dot product as parity: the reply is the parity of the coordinate products aixi.

[F3]

Classical query algorithm: an adaptive query chooses its next address from the random tape and earlier replies; the worst-case query bound applies to each tape and promised input.

[F4]

Finite probability spaces, outcome weights, events, and event probabilities and The cardinality ∣A∣ of a finite set: the uniform secret law averages success over the finite set of 2n possible secrets.

Proof

1.1givenF2F3F4algebra

Fix a random tape. The algorithm is a deterministic adaptive binary decision tree of depth at most q, since each query reply is one bit by [F2]. A binary tree of depth at most q has at most 2q leaves: this holds at depth zero, and at each added level every prior leaf creates at most two children. Each leaf outputs one candidate secret, so at most one of the 2n secrets reaching that leaf can be correctly recovered. Hence success averaged uniformly over secrets is at most 2q/2n=2q−n.

2.1F3F4step 1.1algebra

For fixed n and q, there are finitely many deterministic depth-at-most-q decision trees on the finite address set, with output labels in {0,1}n. The random-tape algorithm induces weights on this finite strategy set by grouping tapes according to their tree. Averaging step 1.1 over this finite distribution leaves average success at most 2q−n. If worst-case success is at least 2/3 on every secret, its average under the uniform secret law is at least 2/3. For q≤n−1, the upper bound is at most 1/2<2/3, a contradiction; therefore q≥n.

3.1F1F2F3construct∎

For each coordinate i<n, query ei, the string with one at i and zeros elsewhere. By [F2], the reply is fa(ei)=ai. These n replies give the entire secret, so n queries suffice exactly.

AlgorithmAlgorithm: AI-adaptedProof: Not applicableOpen item page →

One-query Deutsch algorithm

Definition

Input. A one-bit total Boolean oracle f satisfying the Deutsch promise of Deutsch constant-versus-balanced promise, with an address qubit A and target qubit T initialized to ∣0⟩A∣0⟩T.

Output. One classical bit: output 0 for constant and 1 for balanced.

Gate model. The declared nonoracle gate alphabet permits exact callable H and X gates, each occurrence charged as one nonoracle gate under Nonoracle quantum gate cost. The supplied standard bit query is charged separately as one oracle call.

Procedure. Apply X to T, then apply H to T and H to A. Invoke the standard XOR oracle Uf once on the ordered pair (A,T). Apply H to A, measure A in its ordered computational basis, and output the measured bit. There are no intermediate measurements, loops, or failure branches.

The terminal measurement is specified by Normalized output law for finite quantum query branches and is separate from the declared one-qubit gate resource. No circuit-uniformity or classical bit-time bound is asserted.

The standard bit query and its controlled-access conventions are those of Standard bit-flip query convention and Quantum query algorithm. The one-query phase action used by this procedure is verified by One standard query implements one phase query.

AlgorithmAlgorithm: AI-adaptedProof: Not applicableOpen item page →

One-query Deutsch–Jozsa algorithm

Definition

Input. An integer n≥1 and a total Boolean oracle f:{0,1}n→{0,1} satisfying the Deutsch–Jozsa promise of Deutsch–Jozsa promise, with an ordered n-qubit address register A and one target qubit T initialized to ∣0n⟩A∣0⟩T.

Output. One classical bit: output 0 (constant) exactly when the measured address is 0n; otherwise output 1 (balanced).

Gate model. The declared nonoracle gate alphabet permits exact callable H and X gates, each occurrence charged as one nonoracle gate under Nonoracle quantum gate cost. The supplied standard bit query is charged separately as one oracle call.

Procedure. Apply H⊗n to A. Apply X and then H to T. Invoke the standard XOR oracle Uf once on (A,T). Apply H⊗n to A, measure A in its ordered computational basis, and apply the output rule. There are no intermediate measurements, loops, or failure branches.

The terminal measurement is specified by Normalized output law for finite quantum query branches and is separate from the declared one-qubit gate resource. No circuit-uniformity or classical bit-time bound is asserted.

The standard XOR query and quantum-query algorithm conventions are those of Standard bit-flip query convention and Quantum query algorithm. The phase action used by the procedure is verified by One standard query implements one phase query.

AlgorithmAlgorithm: AI-adaptedProof: Not applicableOpen item page →

One-query Bernstein–Vazirani algorithm

Definition

Input. An integer n≥1 and an oracle fa(x)=a⋅x satisfying the no-offset Bernstein–Vazirani promise of Bernstein–Vazirani no-offset promise, on an ordered n-qubit address register A and one target qubit T initialized to ∣0n⟩A∣0⟩T.

Output. The measured n-bit address, interpreted as the secret a.

Gate model. The declared nonoracle gate alphabet permits exact callable H and X gates, each occurrence charged as one nonoracle gate under Nonoracle quantum gate cost. The supplied standard bit query is charged separately as one oracle call.

Procedure. Apply H⊗n to A. Apply X and then H to T. Invoke the standard XOR oracle Ufa once on (A,T). Apply H⊗n to A, measure A in its ordered computational basis, and output the measured string. There are no intermediate measurements, loops, or failure branches.

The terminal measurement is specified by Normalized output law for finite quantum query branches and is separate from the declared one-qubit gate resource. No circuit-uniformity or classical bit-time bound is asserted.

The standard XOR query and quantum-query algorithm conventions are those of Standard bit-flip query convention and Quantum query algorithm. The phase action used by the procedure is verified by One standard query implements one phase query.

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

Deutsch algorithm is exact

Statement

For either promised one-bit function f, the final measurement of One-query Deutsch algorithm outputs 0 with probability one when f is constant and 1 with probability one when f is balanced. In the algorithm's declared exact X,H gate model, it uses exactly one oracle query and one X and three H gates, totaling four one-qubit gates. The terminal measurement is a separate resource.

Facts & Assumptions

Given: A total Boolean function on one address bit satisfying the Deutsch promise.

[F1]

One-query Deutsch algorithm: the circuit prepares ∣+⟩A∣−⟩T, invokes Uf once, then applies H to A and measures A.

[F2]

Deutsch constant-versus-balanced promise: constant means f(0)=f(1) and balanced means f(0)≠f(1).

[F3]

One standard query implements one phase query: with a one-bit target ∣−⟩, the XOR query applies phase (−1)f(x) to each address basis state and leaves the target unchanged.

[F4]

Exact one-qubit gates and rotations: H∣0⟩=(∣0⟩+∣1⟩)/2 and H∣1⟩=(∣0⟩−∣1⟩)/2.

[F5]

Normalized output law for finite quantum query branches: at the terminal measured leaf, output weights are the sums of the diagonal state weights over unmeasured basis strings and form a normalized finite probability law.

[F6]

A unit-vector outer product is a density operator: if u is a unit vector, ∣u⟩⟨u∣ is a density operator, with root pairing linear in the first argument.

[F7]

Ordered tensor registers, their inner product, and wire permutations: the product basis retains the address-then-target order and its inner product is the product of factor inner products.

[F8]

Nonoracle quantum gate cost: each declared nonoracle gate occurrence, including preparation, is counted once; oracle calls and terminal measurement are separate resources under the algorithm's gate model.

Proof

1.1givenF1F3F4algebra

By [F1], the address is initially ∣+⟩=2−1/2∑x∈{0,1}∣x⟩ and the target is ∣−⟩. By [F3], after the query and final address Hadamard, the output amplitude at y∈{0,1} is αy=12∑x∈{0,1}(−1)f(x)+xy. The target remains the same unit vector [F3].

2.1givenF2step 1.1algebra

For y=0, α0=((−1)f(0)+(−1)f(1))/2; for y=1, α1=((−1)f(0)−(−1)f(1))/2. If f(0)=f(1), these are respectively ±1 and 0; if they differ, they are 0 and ±1, by [F2].

3.1F3F5F6F7step 2.1algebra

In each case the address amplitudes have squared moduli 1 at the correct output and 0 at the other. Since the terminal state is the product of that address vector and the unit target ∣−⟩, [F5] and [F7] sum the target's two squared coordinate moduli to one and give exactly the same address output law. Thus the measured output is correct with probability one.

4.1F1F8algebra∎

The procedure [F1] contains one oracle invocation. Its target preparation has one X and one H, and its address has 1 Hadamard gates before and 1 after the query. Thus [F8] gives exactly one query and one X and three H gates, totaling four one-qubit gates; the terminal measurement is counted separately.

TheoremStatement: AI-adaptedProof: AI-generatedprecheck passjudge pass (gpt-6-luna)Open item page →

Deutsch–Jozsa algorithm is exact

Statement

For every n≥1 and every function satisfying the Deutsch–Jozsa promise, One-query Deutsch–Jozsa algorithm outputs constant with probability one on constant inputs and balanced with probability one on balanced inputs. In the algorithm's declared exact X,H gate model, it uses exactly one oracle query and one X and 2n+1 H gates, totaling 2n+2 one-qubit gates. The terminal measurement is a separate resource.

Facts & Assumptions

Given: n≥1, N=2n, and a total Boolean function f:{0,1}n→{0,1} that is constant or exactly balanced.

[F1]

One-query Deutsch–Jozsa algorithm: prepare ∣+⟩⊗n∣−⟩, query once, apply H⊗n to the address, and output constant exactly at measured address 0n.

[F2]

Deutsch–Jozsa promise: constant functions have one value everywhere; balanced functions have N/2 zeros and N/2 ones.

[F3]

One standard query implements one phase query: the target ∣−⟩ stays unchanged and the address acquires phase (−1)f(x) after one XOR query.

[F4]

Hadamard character sum on F_2^n: H⊗n∣x⟩=2−n/2∑y(−1)x⋅y∣y⟩, and the sum ∑x(−1)x⋅z is 2n for z=0n and 0 otherwise.

[F5]

Normalized output law for finite quantum query branches: the terminal address measurement has nonnegative output weights summing to one, with each weight obtained by summing diagonal state weights over the remaining target register.

[F6]

A unit-vector outer product is a density operator: a unit vector's rank-one projector is a density operator.

[F7]

Ordered tensor registers, their inner product, and wire permutations: ordered product basis vectors use the product inner product and retain the displayed register order.

[F8]

Nonoracle quantum gate cost: each declared nonoracle gate occurrence, including preparation, is counted once; oracle calls and terminal measurement are separate resources under the algorithm's gate model.

Proof

1.1givenF1F3F4algebra

By [F1] and [F3], after the oracle and final Hadamards the amplitude at address y is αy=2−n∑x∈{0,1}n(−1)f(x)+x⋅y. For constant f(x)=c, factor out (−1)c and apply [F4] with z=y: αy=(−1)c if y=0n and 0 otherwise.

2.1givenF2F3F5F6F7step 1.1algebra

For balanced f, [F2] gives equally many +1 and −1 terms in α0n, so α0n=0. For every y, the terminal output weight is ∣αy∣2 after summing the target coordinates: the state is ∑yαy∣y⟩⊗∣−⟩, the target has squared coordinate moduli 1/2,1/2 by [F3]. Its unit-vector projector is a density operator by [F6], and [F5] and [F7] give the stated marginal. Thus the constant case outputs 0n surely, while in the balanced case the probability of 0n is zero.

3.1F1F5step 1.1step 2.1algebra

The output weights sum to one by [F5]. Hence, when f is balanced, all output probability is on strings other than 0n, which the output rule of [F1] labels balanced; in the constant case step 1.1 places all probability at 0n.

4.1F1F8algebra∎

The procedure [F1] contains one oracle invocation. Its target preparation has one X and one H, and its address has n Hadamard gates before and n after the query. Thus [F8] gives exactly one query and one X and 2n+1 H gates, totaling 2n+2 one-qubit gates; the terminal measurement is counted separately.

TheoremStatement: AI-adaptedProof: AI-generatedprecheck passjudge pass (gpt-6-luna)Open item page →

Bernstein–Vazirani algorithm returns the secret exactly

Statement

For every n≥1 and every no-offset Bernstein–Vazirani function fa(x)=a⋅x, One-query Bernstein–Vazirani algorithm outputs the secret a with probability one. In the algorithm's declared exact X,H gate model, it uses exactly one oracle query and one X and 2n+1 H gates, totaling 2n+2 one-qubit gates. The terminal measurement is a separate resource.

Facts & Assumptions

Given: n≥1, a∈{0,1}n, and the total function fa(x)=a⋅x.

[F1]

One-query Bernstein–Vazirani algorithm: the algorithm prepares ∣+⟩⊗n∣−⟩, invokes the standard XOR query once, applies H⊗n to the address, then measures and outputs it.

[F2]

Bernstein–Vazirani no-offset promise and Binary dot product as parity: fa(x)=a⋅x is the bitwise parity of the products aixi, with no additive offset.

[F3]

One standard query implements one phase query: one query with target ∣−⟩ maps each address basis state to (−1)fa(x)∣x⟩∣−⟩.

[F4]

Hadamard character sum on F_2^n: for z∈{0,1}n, ∑x(−1)x⋅z=2n when z=0n and 0 otherwise.

[F5]

Normalized output law for finite quantum query branches: terminal output probabilities sum the diagonal state weights over the unmeasured target register and form a normalized finite law.

[F6]

A unit-vector outer product is a density operator: the rank-one projector of a unit vector is a density operator.

[F7]

Ordered tensor registers, their inner product, and wire permutations: the address and target product basis retains the declared factor order and product inner product.

[F8]

Nonoracle quantum gate cost: each declared nonoracle gate occurrence, including preparation, is counted once; oracle calls and terminal measurement are separate resources under the algorithm's gate model.

Proof

1.1givenF1F2F3algebra

By [F1]–[F3], after phase kickback and the final address Hadamards the amplitude at y is αy=2−n∑x∈{0,1}n(−1)a⋅x+x⋅y=2−n∑x(−1)x⋅(a⊕y), where ⊕ is coordinatewise addition modulo two; the parity formula in [F2] gives the exponent identity coordinate by coordinate.

2.1F3F4F5F6F7step 1.1algebra

By [F4], αy=1 for y=a and 0 for y≠a. The target remains the unit vector ∣−⟩ by [F3], so [F5]–[F7] give output weight ∣αy∣2 at each measured address. Therefore the output distribution is concentrated at a.

3.1F1F8algebra∎

The procedure [F1] contains one oracle invocation. Its target preparation has one X and one H, and its address has n Hadamard gates before and n after the query. Thus [F8] gives exactly one query and one X and 2n+1 H gates, totaling 2n+2 one-qubit gates; the terminal measurement is counted separately.

5 · Examples, counterexamples and false statements

None yet.

Sources