← Quantum Store · Guides · Lessons · Glossary · About · Türkçe

Quantum computing glossary

What is the Bernstein–Vazirani algorithm?

The Bernstein–Vazirani algorithm finds the hidden bit string s inside a function f(x) = s·x in a single query, instead of the n queries needed classically.

In the problem defined by Ethan Bernstein and Umesh Vazirani in 1993, the function returns the sum (mod 2) of the bitwise products of a hidden string s and the input. Classically each bit has to be queried separately.

The quantum circuit has the same skeleton as Deutsch–Jozsa. The oracle is built with one CNOT from each input qubit where s has a 1 to the helper qubit; after the final H gates the inputs read s directly.

Try it yourself

The lesson Bernstein–Vazirani: find the hidden string in one go lets you try this concept in the browser, with no installation.

Related packages

Related concepts

Share: X · LinkedIn