Bernstein–Vazirani Algorithm
   HOME

TheInfoList



OR:

The Bernstein–Vazirani algorithm, which solves the Bernstein–Vazirani problem, is a
quantum algorithm In quantum computing, a quantum algorithm is an algorithm which runs on a realistic model of quantum computation, the most commonly used model being the quantum circuit model of computation. A classical (or non-quantum) algorithm is a finite sequ ...
invented by
Ethan Bernstein Ethan may refer to: People * Ethan (given name) Places *Ethan, South Dakota * Fort Ethan Allen (Arlington, Virginia) Fiction *''Ethan of Athos'', 1986 novel by Lois McMaster Bujold *" Ethan Brand", 1850 short story by Nathaniel Hawthorne *''Eth ...
and
Umesh Vazirani Umesh Virkumar Vazirani is an Indian-American academic who is the Roger A. Strauch Professor of Electrical Engineering and Computer Science at the University of California, Berkeley, and the director of the Berkeley Quantum Computation Center. Hi ...
in 1992. It is a restricted version of the
Deutsch–Jozsa algorithm The Deutsch–Jozsa algorithm is a deterministic quantum algorithm proposed by David Deutsch and Richard Jozsa in 1992 with improvements by Richard Cleve, Artur Ekert, Chiara Macchiavello, and Michele Mosca in 1998. Although of little current p ...
where instead of distinguishing between two different classes of functions, it tries to learn a string encoded in a function. The Bernstein–Vazirani algorithm was designed to prove an oracle separation between
complexity classes In computational complexity theory, a complexity class is a set of computational problems of related resource-based complexity. The two most commonly analyzed resources are time and memory. In general, a complexity class is defined in terms of a ...
BQP and
BPP BPP may refer to: Education * BPP Holdings, a holding company based in the United Kingdom * BPP Law School, a law school based in the United Kingdom and a constituent school of BPP University * BPP University, a private university based in the ...
.


Problem statement

Given an
oracle An oracle is a person or agency considered to provide wise and insightful counsel or prophetic predictions, most notably including precognition of the future, inspired by deities. As such, it is a form of divination. Description The word '' ...
that implements a function f\colon\^n\rightarrow \ in which f(x) is promised to be the
dot product In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a scalar as a result". It is also used sometimes for other symmetric bilinear forms, for example in a pseudo-Euclidean space. is an algebra ...
between x and a secret string s \in \^n modulo 2, f(x) = x \cdot s = x_1s_1 \oplus x_2s_2 \oplus \cdots \oplus x_ns_n, find s.


Algorithm

Classically, the most efficient method to find the secret string is by evaluating the function n times with the input values x = 2^ for all i \in \: : \begin 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 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. The quantum algorithm is as follows: Apply a
Hadamard transform The Hadamard transform (also known as the Walsh–Hadamard transform, Hadamard–Rademacher–Walsh transform, Walsh transform, or Walsh–Fourier transform) is an example of a generalized class of Fourier transforms. It performs an orthogonal ...
to the n qubit state , 0\rangle^ to get :\frac\sum_^ , x\rangle. Next, apply the oracle U_f which transforms , x\rangle \to (-1)^, x\rangle. 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, x\rangle. (\oplus denotes addition mod two.) This transforms the superposition into :\frac\sum_^ (-1)^ , x\rangle. 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 . To obtain s, a measurement in the
standard basis In mathematics, the standard basis (also called natural basis or canonical basis) of a coordinate vector space (such as \mathbb^n or \mathbb^n) is the set of vectors whose components are all zero, except one that equals 1. For example, in the c ...
(\) is performed on the qubits. Graphically, the algorithm may be represented by the following diagram, where H^ denotes the Hadamard transform on n qubits: : , 0\rangle^n \xrightarrow \frac \sum_ , x\rangle \xrightarrow \frac\sum_(-1)^, x\rangle \xrightarrow \frac \sum_(-1)^, y\rangle = , s\rangle The reason that the last state is , s\rangle is because, for a particular y, : \frac\sum_(-1)^ = \frac\sum_(-1)^ = \frac\sum_(-1)^ = 1 \text s \oplus y = \vec,\, 0 \text. Since s \oplus y = \vec is only true when s = y, this means that the only non-zero amplitude is on , s\rangle. So, measuring the output of the circuit in the computational basis yields the secret string s.


See also

* Hidden Linear Function problem


References

{{DEFAULTSORT:Bernstein-Vazirani algorithm Quantum algorithms Quantum complexity theory Computational complexity theory