GO-V.ORG
As seen in

Bernstein–Vazirani algorithm

The Bernstein–Vazirani algorithm, which solves the Bernstein–Vazirani problem, is a quantum algorithm invented by Ethan Bernstein and Umesh Vazirani in 1997.[src] It is a restricted version of the Deutsch–Jozsa algorithm where instead of distinguishing between two different classes of functions, it tries to learn a string encoded in a function.[src] The Bernstein–Vazirani algorithm was designed to prove an oracle separation between complexity classes BQP and BPP.[src]

The Bernstein–Vazirani algorithm, which solves the Bernstein–Vazirani problem, is a quantum algorithm invented by Ethan Bernstein and Umesh Vazirani in 1997.[src] It is a restricted version of the Deutsch–Jozsa algorithm where instead of distinguishing between two different classes of functions, it tries to learn a string encoded in a function.[src] The Bernstein–Vazirani algorithm was designed to prove an oracle separation between complexity classes BQP and BPP.[src] Given an oracle that implements a function f\colon\{0,1\}^n\rightarrow \{0,1\} in which f(x) is promised to be the dot product between x and a secret string s \in \{0,1\}^n modulo 2, f(x) = x \cdot s = x_1s_1 \oplus x_2s_2 \oplus \cdots \oplus x_ns_n , find s .[src] Classically, the most efficient method to find the secret string is by evaluating the function n times with the input values x = 2^{i} for all i \in \{0, 1, \dots, n-1\} : \begin{align} f(1000\cdots0_n) & = s_1 \\ f(0100\cdots0_n) & = s_2 \\ f(0010\cdots0_n) & = s_3 \\ & \,\,\,\vdots \\ f(0000\cdots1_n) & = s_n \\ \end{align} In contrast to the classical solution which needs at least n queries of the function to find s , only one query is needed using quantum computing.[src] The quantum algorithm is as follows: Apply a Hadamard transform to the n qubit state |0\rangle^{\otimes n} to get \frac{1}{\sqrt{2^{n}}}\sum_{x=0}^{2^n-1} |x\rangle.[src] Next, apply the oracle U_f which transforms |x\rangle \to (-1)^{f(x)}|x\rangle .[src] This can be simulated through the standard oracle that transforms |b\rangle|x\rangle \to |b \oplus f(x)\rangle |x\rangle by applying this oracle to \frac{|0\rangle - |1\rangle}{\sqrt{2}}|x\rangle .[src] ( \oplus denotes addition mod two.) This transforms the superposition into \frac{1}{\sqrt{2^{n}}}\sum_{x=0}^{2^n-1} (-1)^{f(x)} |x\rangle.[src] Another Hadamard transform is applied to each qubit which makes it so that for qubits where s_i = 1 , its state is converted from |-\rangle to |1\rangle and for qubits where s_i = 0 , its state is converted from |+\rangle to |0\rangle .[src] To obtain s , a measurement in the standard basis ( \{|0\rangle, |1\rangle\} ) is performed on the qubits.[src] Graphically, the algorithm may be represented by the following diagram, where H^{\otimes n} denotes the Hadamard transform on n qubits: |0\rangle^n \xrightarrow{H^{\otimes n }} \frac{1}{\sqrt{2^n}} \sum_{x \in \{0,1\}^n} |x\rangle \xrightarrow{U_f} \frac{1}{\sqrt{2^n}}\sum_{x \in \{0,1\}^n}(-1)^{f(x)}|x\rangle \xrightarrow{H^{\otimes n}} \frac{1}{2^n} \sum_{x,y \in \{0,1\}^n}(-1)^{f(x) + x\cdot y}|y\rangle = |s\rangle The reason that the last state is |s\rangle is because, for a particular y , \frac{1}{2^n}\sum_{x \in \{0,1\}^n}(-1)^{f(x) + x\cdot y} Since s \oplus y = \vec{0} is only true when s = y , this means that the only non-zero amplitude is on |s\rangle .[src] So, measuring the output of the circuit in the computational basis yields the secret string s .[src] A generalization of Bernstein–Vazirani problem has been proposed that involves finding one or more secret keys using a probabilistic oracle.[src] This is an interesting problem for which a quantum algorithm can provide efficient solutions with certainty or with a high degree of confidence, while classical algorithms completely fail to solve the problem in the general case.[src] ==Classical vs.[src] quantum complexity== The Bernstein-Vazirani problem is usually stated in its non-decision version.[src] In this form, it is an example of a problem solvable by a Quantum Turing machine (QTM) with O(1) queries to the problem's oracle, but for which any Probabilistic Turing machine (PTM) algorithm must make \Omega(n) queries.[src] To provide a separation between BQP and BPP, the problem must be reshaped into a decision problem (as these complexity classes refer to decision problems).[src] This is accomplished with a recursive construction and the inclusion of a second, random oracle.[src] The resulting decision problem is solvable by a QTM with O(n) queries to the problem's oracle, while a PTM must make \Omega(n^{\log n}) queries to solve the same problem.[src] Therefore, Bernstein-Vazirani provides a super-polynomial separation between BPP and BQP.[src] ==See also== Hidden Linear Function problem Simon's problem ==References==[src]

26 sentences · 26 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Bernstein–Vazirani algorithm." encyclopegia.org, 2026, https://encyclopegia.org/wiki/bernstein-vazirani-algorithm. Accessed 04 December 2026.

Chicago

"Bernstein–Vazirani algorithm." encyclopegia.org. Accessed December 4, 2026. https://encyclopegia.org/wiki/bernstein-vazirani-algorithm.

APA

encyclopegia.org. (2026). Bernstein–Vazirani algorithm. Retrieved December 4, 2026, from https://encyclopegia.org/wiki/bernstein-vazirani-algorithm

Accessed December 4, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Aaron Bernstein

stub · references available

Eduard Bernstein

stub · references available

Georg Heinrich Bernstein

stub · references available

F. W. Bernstein

stub · references available

μ-law algorithm

stub · references available

bitap algorithm

stub · references available

QR algorithm

stub · references available

Ossip Bernstein

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1371471620 · 0.5 · snapshot enwiki-001371471620

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.