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.
Exact Oracle Algorithms
1 · Prerequisites
- Absolute and Conditional Convergence; Rearrangement; Products
- Algebraic Closure, Embeddings, and Separability
- Algebraic Extensions, Extension Degree, and Finite Fields
- Binary Operations, Monoids, Groups and Subgroups
- Boolean Circuits and Nonuniform Complexity
- Bounded Linear Operators and Quotient Spaces
- Circuit Syntax, Denotational Semantics, and Measurement
- Clifford+T Exact and Approximate Synthesis
- Compactness in Metric Spaces
- Completeness, Completion, and Uniform Continuity
- Complex Norms and Realification
- Complexification, Realification and Real Structures
- Composition Series, the Jordan–Hölder Theorem and Solvable Groups
- Computational Problems, Promises, and Cost Models
- Congruences, the Integers Modulo n and the Chinese Remainder Theorem
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Continuity, IVT, EVT, and Uniform Continuity
- Continuous-Gate Universality and Exact Synthesis
- Controlled Gates, Phase, and Entanglement
- Cosets, Index and Lagrange's Theorem
- Countability and Uncountability
- Cyclic Groups and Direct Products
- Determinants of Matrices over a Commutative Ring
- Diagonalisation and the Minimal Polynomial
- Divisibility, Euclidean Domains, Principal Ideal Domains and Unique Factorisation
- Divisibility, Greatest Common Divisors and Bézout's Identity
- Dual Spaces, Bilinear and Quadratic Forms, and Sylvester's Law of Inertia
- Effective Numberings, Reductions, Resources, and Randomness
- Eigenvalues, Eigenvectors and the Characteristic Polynomial
- Filters and Ultrafilters
- Finite Counting, Factorials and Binomial Coefficients
- Finite Dimensional Normed Spaces and Riesz Lemma
- Finite Probability Spaces and Random Variables
- Finite-Dimensional Complex Inner-Product Spaces and Matrix Interfaces
- Formal Languages, Encodings, and Decision Problems
- Foundations of the Real Numbers for Analysis
- Free Modules, Exact Sequences, Projective and Injective Modules
- Fundamental Trigonometric Identities
- Group Actions, Orbits, Stabilisers and Cayley's Theorem
- Group Homomorphisms and the Isomorphism Theorems
- Hilbert Space Geometry and Riesz Representation
- Ideals, Quotient Rings and the Isomorphism Theorems for Rings
- Inner Product Spaces, Gram-Schmidt, Projections and Adjoints
- Limits of Real Functions
- limsup, liminf, and Subsequential Limits
- Linear Independence, Bases and Dimension
- Linear Recurrences and Rational Generating Functions
- Linear Transformations, Rank-Nullity and Quotient Spaces
- Matrices, the Matrix of a Linear Map, and Change of Basis
- Measurements, POVMs, and Instruments
- Metric Spaces
- Modules, Submodules, Quotient Modules and the Isomorphism Theorems
- Monotone Functions, Discontinuities, and Continuity Sets
- Monotone Sequences, Bolzano-Weierstrass, and Cauchy Completeness
- Normal Subgroups and Quotient Groups
- Normed and Banach Spaces
- Order, Zorn's Lemma, and the Axiom of Choice
- Polynomial Rings, the Division Algorithm and Roots
- Power Series and Real-Analytic Functions
- Primes, Euclid's Lemma and the Fundamental Theorem of Arithmetic
- Properties of the Integral and the Working FTC
- Pure and Mixed States, Ensembles, and Schmidt Decomposition
- Qubits, Bloch Sphere, Pauli Algebra, and One-Qubit Gates
- Registers, Tensor Products, and Partial Trace
- Relations, Functions, and Quotients
- Resource Bounds and Machine Invariance
- Reversible Arithmetic and Oracle Conversion
- Reversible Computation, Ancillas, and Coherent Oracles
- Rings, Subrings, Integral Domains and Fields
- Rⁿ as a Normed Space; Vector-Valued Functions
- Roots, Rational Powers, and Classical Inequalities
- Sequences and Limits
- Sequences and Series of Functions; Uniform Convergence
- Series: Convergence and the Nonnegative Tests
- Simple Field Extensions and the Construction of the Complex Numbers
- Sine, Cosine, and the Definition of Pi
- Splitting Fields
- Strongly Continuous Semigroups and Hille Yosida
- Suprema and Infima
- Sylow's Theorems, p-Groups and Nilpotent Groups
- Symmetric Groups, Cycle Decomposition and the Sign Homomorphism
- Tensor Products of Modules
- The Complex Exponential and Euler's Formula
- The Derivative and the Mean Value Theorems
- The Determinant of a Linear Operator, Cofactors and Cramer's Rule
- The Exponential Function
- The Fundamental Theorem of Algebra
- The Fundamental Theorem of Finite Abelian Groups
- The Galois Correspondence
- The Polynomial Hierarchy and Relativization
- The Riemann Integral: Definition and Integrability
- The Spectral Theorem, Positive Operators and Singular Value Decomposition
- The ZFC Axioms and the Basic Set Constructions
- Topology of ℝ
- Triangularisation, Generalised Eigenspaces and Jordan Canonical Form
- Turing Machines, Configurations, and Computation
- Uniform Circuit Families, Promise Problems, and Complexity
- Vector Spaces, Linear Subspaces, Span and Direct Sums
2 · Summary
This page fixes the constant-versus-balanced Deutsch promise, the Deutsch–Jozsa promise on -bit addresses (encoded by an -bit truth table), and the no-offset Bernstein–Vazirani promise. It defines the exact one-query circuits with their and Hadamard preparation gates and proves the measured output laws from the finite 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 (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
Hadamard character sum on F_2^n
Statement
For and , with the binary dot product of Binary dot product as parity,
Consequently, for every ,
where 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 and binary strings .
Binary dot product as parity: is the parity , a bit.
Exact one-qubit gates and rotations: in the ordered basis , .
Finite registers and their ordered computational bases and Big-endian encoding of ordered bit strings: the -qubit basis is the ordered product basis indexed by bit strings in lexicographic order, with the first wire most significant.
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.
Tensor products of finitely many linear maps: sends an elementary tensor to .
Dirac Notation Conversion: denotes the vector in the finite-dimensional register.
Proof
By [F1], , since the exponent parity is the sum of the coordinate products modulo two. Distributivity over the finite Cartesian product gives Each factor is when and when . Thus the product is when all coordinates of vanish and is otherwise.
By [F2], on each factor . Applying [F5] to the ordered product basis [F3] gives a coefficient at , by [F1]. Summing these coefficients proves the tensor-Hadamard formula in the Statement.
Deutsch constant-versus-balanced promise
Definition
Let be the total Boolean function of a Promise query instance and oracle family. Encode by its hidden length-two truth table , whose associated oracle function is . The Deutsch promise is the decision task with YES set and NO set . The required output is on (constant, ) and on (balanced, ). All four Boolean functions on one bit are promised. The truth table labels the hidden instance; the query interface supplies oracle access to .
Facts & Assumptions
Given: A total function .
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.
Promise query instance and oracle family: each promised instance supplies a total function on its entire address domain.
Verification
Writing the two function values in order gives exactly the four strings . By the Definition, and are in , while and are in . These two sets are disjoint and cover all four possible tables, so the promised output is well-defined.
The totality in [F2] makes both evaluations and available. Equality gives the constant case and inequality gives the balanced case by the two disjoint rows of the table in step 1.1.
Deutsch–Jozsa promise
Definition
Let , let , and let 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 and exactly times. The required output is constant or balanced, respectively. Here is the address width, and is the number of addresses, as supplied by Big-endian bit-string indices are bijective and The cardinality of a finite set. Encode an instance by its -bit truth table in lexicographic address order; its encoded input size is therefore , not , under Input encoding and size for algorithmic tasks. In the query-instance convention, the length- family has address width and reply width ; the public parameter 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: and a total Boolean function on the -bit address set.
QA task and promise domain: a decision promise has disjoint YES and NO sets and no correctness obligation outside their union.
Promise query instance and oracle family: the oracle function is total on the address domain, even though the task promise restricts the legal instances.
Input encoding and size for algorithmic tasks: the declared truth-table encoding has length ; is the address width, not the encoded input size.
Big-endian bit-string indices are bijective and The cardinality of a finite set: the -bit address set has cardinality .
Verification
Since , is even and . A constant function has either or addresses with value , whereas a balanced function has such addresses. These counts differ, so the YES and NO sets are disjoint.
Both promise classes are nonempty: the zero function is constant, and the function has exactly 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 .
Bernstein–Vazirani no-offset promise
Definition
Let . The Bernstein–Vazirani no-offset promise consists of the total functions
for an unknown secret , using Binary dot product as parity. The task is to output . This version has no additive offset: the oracle is exactly , not .
Facts & Assumptions
Given: and a secret .
QA task and promise domain: a search task requires a witness in the declared relation on each promised input.
Promise query instance and oracle family: a query function is total on every address string in its domain.
Verification
For every , [F3] is a finite XOR of bits, hence defines one bit; therefore is a total Boolean function and satisfies the query-instance requirement [F2].
For each coordinate , let be the string with a single at position . Then by [F3]. If , evaluation at every gives , so . Thus the secret is uniquely determined by the function table.
One classical query cannot solve Deutsch exactly
Statement
On the Deutsch promise, the exact deterministic classical query complexity is . Every randomized classical algorithm making at most one query has worst-case success probability at most 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.
Deutsch constant-versus-balanced promise: the four truth tables are promised, with equal pairs constant and unequal pairs balanced.
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.
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
Fix a deterministic one-query procedure and let be its queried address. The constant-zero function and the balanced function defined by , give the same reply. The procedure therefore has the same transcript and output on two functions requiring different answers, so it cannot be exact.
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.
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 , then for each possible reply there are exactly two promised functions with : 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 ; by [F3] some promised input has success at most .
Exact deterministic Deutsch–Jozsa needs N/2+1 queries
Statement
For and , the exact deterministic classical query complexity of the Deutsch–Jozsa promise is .
Facts & Assumptions
Given: A total Boolean function on promised constant or exactly balanced, with addresses.
Deutsch–Jozsa promise: is the address count; a balanced function has exactly zeros and ones.
Classical query algorithm: the next query address may depend on earlier replies, and a deterministic algorithm has a fixed output for each transcript.
The cardinality of a finite set: finite sets have a natural-number cardinality, invariant under bijection.
Proof
Suppose a deterministic procedure makes at most queries in the worst case. Run it on the constant-zero function and let be the set of distinct queried addresses. Write and list the complement in lexicographic order, with . Concatenating the lexicographic lists of and lists every address exactly once: the sets are disjoint and cover the domain. Indexing this concatenated list gives a bijection from to the -element address set, so by [F3]. Thus . Choose to be the first addresses of and define to be on and elsewhere. Then is balanced and agrees with the constant-zero function on every address in . 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.
Query any fixed set of distinct addresses. If all replies are equal, the function cannot be balanced because each value occurs only 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 queries; combined with step 1.1 the exact complexity is .
Three classical samples solve Deutsch–Jozsa with bounded error
Statement
For , 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 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 , using exactly random bits and three value queries. For , 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: , , and a total Boolean function promised constant or exactly balanced; consider both the uniform without-replacement experiment and the independent with-replacement algorithm.
Deutsch–Jozsa promise: a balanced function has addresses of each output value.
Classical query algorithm: randomized addresses may be chosen from the random tape, and query cost counts each returned function value once.
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.
The cardinality of a finite set: the address and ordered-triple sample sets have their finite cardinalities.
Proof
For a constant function, all three replies agree, so the procedure outputs constant correctly with probability one. For a balanced function write . The ordered sample space has triples. If , no three distinct samples can have the same reply, so the error probability is zero. If , the error event consists of an ordered triple all drawn from the zero class or all from the one class; its probability is This is at most , since .
The without-replacement experiment has success at least by step 1.1. For an implementation in the finite fair-bit model, take three independent blocks of fair bits as addresses, allowing repetitions. On a balanced input the three replies are independent fair bits, so they all agree with probability ; on a constant input they always agree. Thus this algorithm uses exactly random bits and three value queries and has success at least . When , 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.
Classical Bernstein–Vazirani needs n queries for bounded error
Statement
For the no-offset Bernstein–Vazirani promise on bits, every randomized classical algorithm with worst-case success at least needs at least queries. Querying the standard basis addresses recovers the secret exactly, so the bounded-error and exact classical query complexities are both .
Facts & Assumptions
Given: A uniformly sampled secret and a classical algorithm making at most queries to .
Bernstein–Vazirani no-offset promise: is total and the required output is the unique secret .
Binary dot product as parity: the reply is the parity of the coordinate products .
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.
Finite probability spaces, outcome weights, events, and event probabilities and The cardinality of a finite set: the uniform secret law averages success over the finite set of possible secrets.
Proof
Fix a random tape. The algorithm is a deterministic adaptive binary decision tree of depth at most , since each query reply is one bit by [F2]. A binary tree of depth at most has at most 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 secrets reaching that leaf can be correctly recovered. Hence success averaged uniformly over secrets is at most .
For fixed and , there are finitely many deterministic depth-at-most- decision trees on the finite address set, with output labels in . 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 . If worst-case success is at least on every secret, its average under the uniform secret law is at least . For , the upper bound is at most , a contradiction; therefore .
For each coordinate , query , the string with one at and zeros elsewhere. By [F2], the reply is . These replies give the entire secret, so queries suffice exactly.
One-query Deutsch algorithm
Definition
Input. A one-bit total Boolean oracle satisfying the Deutsch promise of Deutsch constant-versus-balanced promise, with an address qubit and target qubit initialized to .
Output. One classical bit: output for constant and for balanced.
Gate model. The declared nonoracle gate alphabet permits exact callable and 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 to , then apply to and to . Invoke the standard XOR oracle once on the ordered pair . Apply to , measure 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.
One-query Deutsch–Jozsa algorithm
Definition
Input. An integer and a total Boolean oracle satisfying the Deutsch–Jozsa promise of Deutsch–Jozsa promise, with an ordered -qubit address register and one target qubit initialized to .
Output. One classical bit: output (constant) exactly when the measured address is ; otherwise output (balanced).
Gate model. The declared nonoracle gate alphabet permits exact callable and 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 to . Apply and then to . Invoke the standard XOR oracle once on . Apply to , measure 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.
One-query Bernstein–Vazirani algorithm
Definition
Input. An integer and an oracle satisfying the no-offset Bernstein–Vazirani promise of Bernstein–Vazirani no-offset promise, on an ordered -qubit address register and one target qubit initialized to .
Output. The measured -bit address, interpreted as the secret .
Gate model. The declared nonoracle gate alphabet permits exact callable and 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 to . Apply and then to . Invoke the standard XOR oracle once on . Apply to , measure 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.
Deutsch algorithm is exact
Statement
For either promised one-bit function , the final measurement of One-query Deutsch algorithm outputs with probability one when is constant and with probability one when is balanced. In the algorithm's declared exact gate model, it uses exactly one oracle query and one and three 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.
One-query Deutsch algorithm: the circuit prepares , invokes once, then applies to and measures .
Deutsch constant-versus-balanced promise: constant means and balanced means .
One standard query implements one phase query: with a one-bit target , the XOR query applies phase to each address basis state and leaves the target unchanged.
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.
A unit-vector outer product is a density operator: if is a unit vector, is a density operator, with root pairing linear in the first argument.
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.
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
By [F1], the address is initially and the target is . By [F3], after the query and final address Hadamard, the output amplitude at is The target remains the same unit vector [F3].
For , ; for , . If , these are respectively and ; if they differ, they are and , by [F2].
In each case the address amplitudes have squared moduli at the correct output and 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.
The procedure [F1] contains one oracle invocation. Its target preparation has one and one , and its address has Hadamard gates before and after the query. Thus [F8] gives exactly one query and one and three gates, totaling four one-qubit gates; the terminal measurement is counted separately.
Deutsch–Jozsa algorithm is exact
Statement
For every 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 gate model, it uses exactly one oracle query and one and gates, totaling one-qubit gates. The terminal measurement is a separate resource.
Facts & Assumptions
Given: , , and a total Boolean function that is constant or exactly balanced.
One-query Deutsch–Jozsa algorithm: prepare , query once, apply to the address, and output constant exactly at measured address .
Deutsch–Jozsa promise: constant functions have one value everywhere; balanced functions have zeros and ones.
One standard query implements one phase query: the target stays unchanged and the address acquires phase after one XOR query.
Hadamard character sum on F_2^n: , and the sum is for and otherwise.
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.
A unit-vector outer product is a density operator: a unit vector's rank-one projector is a density operator.
Ordered tensor registers, their inner product, and wire permutations: ordered product basis vectors use the product inner product and retain the displayed register order.
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
By [F1] and [F3], after the oracle and final Hadamards the amplitude at address is For constant , factor out and apply [F4] with : if and otherwise.
For balanced , [F2] gives equally many and terms in , so . For every , the terminal output weight is after summing the target coordinates: the state is , the target has squared coordinate moduli 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 surely, while in the balanced case the probability of is zero.
The output weights sum to one by [F5]. Hence, when is balanced, all output probability is on strings other than , which the output rule of [F1] labels balanced; in the constant case step 1.1 places all probability at .
The procedure [F1] contains one oracle invocation. Its target preparation has one and one , and its address has Hadamard gates before and after the query. Thus [F8] gives exactly one query and one and gates, totaling one-qubit gates; the terminal measurement is counted separately.
Bernstein–Vazirani algorithm returns the secret exactly
Statement
For every and every no-offset Bernstein–Vazirani function , One-query Bernstein–Vazirani algorithm outputs the secret with probability one. In the algorithm's declared exact gate model, it uses exactly one oracle query and one and gates, totaling one-qubit gates. The terminal measurement is a separate resource.
Facts & Assumptions
Given: , , and the total function .
One-query Bernstein–Vazirani algorithm: the algorithm prepares , invokes the standard XOR query once, applies to the address, then measures and outputs it.
Bernstein–Vazirani no-offset promise and Binary dot product as parity: is the bitwise parity of the products , with no additive offset.
One standard query implements one phase query: one query with target maps each address basis state to .
Hadamard character sum on F_2^n: for , when and otherwise.
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.
A unit-vector outer product is a density operator: the rank-one projector of a unit vector is a density operator.
Ordered tensor registers, their inner product, and wire permutations: the address and target product basis retains the declared factor order and product inner product.
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
By [F1]–[F3], after phase kickback and the final address Hadamards the amplitude at is where is coordinatewise addition modulo two; the parity formula in [F2] gives the exponent identity coordinate by coordinate.
By [F4], for and for . The target remains the unit vector by [F3], so [F5]–[F7] give output weight at each measured address. Therefore the output distribution is concentrated at .
The procedure [F1] contains one oracle invocation. Its target preparation has one and one , and its address has Hadamard gates before and after the query. Thus [F8] gives exactly one query and one and gates, totaling one-qubit gates; the terminal measurement is counted separately.
5 · Examples, counterexamples and false statements
None yet.