Oracle Algorithms
Bernstein-Vazirani Algorithm: quick reference
Reveals an entire hidden bit string s from the function f(x) = s·x with a single oracle query, where any classical method needs n queries.
- Topic
- Oracle Algorithms
- Level
- Beginner
- Circuit size
- 4 Qubits
- Key result
- 1 query vs n classical queries
Concepts covered: Bernstein-Vazirani Algorithm, Phase Kickback, Quantum Oracles, Hadamard Transform
Frequently asked questions
What is Bernstein-Vazirani Algorithm?
Reveals an entire hidden bit string s from the function f(x) = s·x with a single oracle query, where any classical method needs n queries. It is a beginner-level topic in oracle algorithms.
How many qubits does the Bernstein-Vazirani circuit use?
The QuanBit tutorial uses a 4 qubits circuit. Key result: 1 query vs n classical queries.
Can I simulate Bernstein-Vazirani online for free?
Yes. The interactive Bernstein-Vazirani tutorial at https://www.quanbit.tech/learn/bernstein-vazirani runs free in the browser with nothing to install. You can step through the circuit gate by gate, watch the probabilities, statevector and Bloch spheres update, build the circuit yourself and take a short quiz.