Amplitude + Amplitude −
drag to pan · scroll to zoom

Bernstein–Vazirani Algorithm 2D — Amplitude Bar Chart

The Bernstein–Vazirani algorithm is the cleanest demonstration that a quantum computer can beat any classical algorithm's query complexity — not by a constant factor, but by a full factor of n. Given oracle access to a hidden n-bit string s hidden inside the function f(x) = s·x mod 2, a classical computer needs n separate queries (one per bit) to learn s, while a quantum computer learns all of it from a single call. This 2D simulator renders every computational basis state 0..2ⁿ−1 as a bar in a live amplitude chart and steps through the four real stages of the algorithm — uniform superposition, oracle phase-kickback, the interfering final Hadamard transform, and measurement — so you can pan and zoom across the register and watch destructive interference erase every wrong answer, leaving probability 1 sitting exactly on the hidden string.