In
computational complexity theory
In theoretical computer science and mathematics, computational complexity theory focuses on classifying computational problems according to their resource usage, and relating these classes to each other. A computational problem is a task solved ...
and
quantum computing
Quantum computing is a type of computation whose operations can harness the phenomena of quantum mechanics, such as superposition, interference, and entanglement. Devices that perform quantum computations are known as quantum computers. Thou ...
, Simon's problem is a
computational problem
In theoretical computer science, a computational problem is a problem that may be solved by an algorithm. For example, the problem of factoring
:"Given a positive integer ''n'', find a nontrivial prime factor of ''n''."
is a computational probl ...
that is proven to be solved exponentially faster on a
quantum computer
Quantum computing is a type of computation whose operations can harness the phenomena of quantum mechanics, such as superposition, interference, and entanglement. Devices that perform quantum computations are known as quantum computers. Thoug ...
than on a classical (that is, traditional) computer. The quantum algorithm solving Simon's problem, usually called Simon's algorithm, served as the inspiration for
Shor's algorithm
Shor's algorithm is a quantum computer algorithm for finding the prime factors of an integer. It was developed in 1994 by the American mathematician Peter Shor.
On a quantum computer, to factor an integer N , Shor's algorithm runs in polynomial ...
. Both problems are special cases of the abelian
hidden subgroup problem
The hidden subgroup problem (HSP) is a topic of research in mathematics and theoretical computer science. The framework captures problems such as factoring, discrete logarithm, graph isomorphism, and the shortest vector problem. This makes it esp ...
, which is now known to have efficient quantum algorithms.
The problem is set in the model of
decision tree complexity
In computational complexity the decision tree model is the model of computation in which an algorithm is considered to be basically a decision tree, i.e., a sequence of ''queries'' or ''tests'' that are done adaptively, so the outcome of the previ ...
or query complexity and was conceived by
Daniel Simon in 1994. Simon exhibited 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 seq ...
that solves Simon's problem exponentially faster and with exponentially fewer queries than the best
probabilistic
Probability is the branch of mathematics concerning numerical descriptions of how likely an event is to occur, or how likely it is that a proposition is true. The probability of an event is a number between 0 and 1, where, roughly speaking, ...
(or deterministic) classical algorithm. In particular, Simon's algorithm uses a linear number of queries and any classical probabilistic algorithm must use an exponential number of queries.
This problem yields an
oracle separation
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 ''or ...
between the complexity classes
BPP (bounded-error classical query complexity) and
BQP (bounded-error quantum query complexity). This is the same separation that the
Bernstein–Vazirani algorithm achieves, and different from the separation provided by 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 ...
, which separates
P and
EQP. Unlike the
Bernstein–Vazirani algorithm, Simon's algorithm's separation is ''exponential''.
Because this problem assumes the existence of a highly-structured "black box" oracle to achieve its speedup, this problem has little practical value. However, without such an oracle, exponential speedups cannot easily be proven, since this would prove that
P is different from
PSPACE
In computational complexity theory, PSPACE is the set of all decision problems that can be solved by a Turing machine using a polynomial amount of space.
Formal definition
If we denote by SPACE(''t''(''n'')), the set of all problems that can b ...
.
Problem description
Given a function (implemented by a
black box
In science, computing, and engineering, a black box is a system which can be viewed in terms of its inputs and outputs (or transfer characteristics), without any knowledge of its internal workings. Its implementation is "opaque" (black). The te ...
or oracle)
with the promise that, for some unknown
, for all
,
:
if and only if
,
where
denotes bitwise XOR. The goal is to identify
by making as few queries to
as possible. Note that
:
if and only if
Furthermore, for some
and
in
,
is unique (not equal to
) if and only if
. This means that
is two-to-one when
, and
one-to-one when
. It is also the case that
implies
, meaning that
which shows how
is periodic.
The associated
decision problem
In computability theory and computational complexity theory, a decision problem is a computational problem that can be posed as a yes–no question of the input values. An example of a decision problem is deciding by means of an algorithm whethe ...
formulation of Simon's problem is to distinguish when
(
is one-to-one), and when
(
is two-to-one).
Example
For example, if
, then the following function is an example of a function that satisfies the required and just mentioned property:
In this case,
(i.e. the solution). It can easily be verified that every output of
occurs twice, and the two input strings corresponding to any one given output have bitwise XOR equal to
.
For example, the input strings
and
are both mapped (by
) to the same output string
.
and
. If we apply XOR to 010 and 100 we obtain 110, that is
can also be verified using input strings 001 and 111 that are both mapped (by f) to the same output string 010. If we apply XOR to 001 and 111, we obtain 110, that is
. This gives the same solution
we solved for before.
In this example the function ''f'' is indeed a two-to-one function where
.
Problem hardness
Intuitively, this is a very hard problem to solve in a "classical" way, even if one uses randomness and accepts a small probability of error. The intuition behind the hardness is reasonably simple: if you want to solve the problem classically, you need to find two different inputs
and
for which
. There is not necessarily any structure in the function
that would help us to find two such inputs: more specifically, we can discover something about
(or what it does) only when, for two different inputs, we obtain the same output. In any case, we would need to guess
different inputs before being likely to find a pair on which
takes the same output, as per the
birthday problem
In probability theory, the birthday problem asks for the probability that, in a set of randomly chosen people, at least two will share a birthday. The birthday paradox is that, counterintuitively, the probability of a shared birthday exceeds 5 ...
. Since, classically to find ''s'' with a 100% certainty it would require checking up to
inputs, Simon's problem seeks to find ''s'' using fewer queries than this classical method.
Simon's algorithm
The algorithm as a whole uses this subroutine in the following two steps:
# Run the quantum subroutine an expected
times to get a list of
linearly independent
In the theory of vector spaces, a set of vectors is said to be if there is a nontrivial linear combination of the vectors that equals the zero vector. If no such linear combination exists, then the vectors are said to be . These concepts ...
bitstrings
.
# Each
satisfies
, so we can solve the system of equations this produces to get
.
Quantum subroutine
The quantum circuit (see the picture) is the implementation of the quantum part of Simon's algorithm. The quantum subroutine of the algorithm makes use of the
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 ...
where
, where
denotes
XOR
Exclusive or or exclusive disjunction is a logical operation that is true if and only if its arguments differ (one is true, the other is false).
It is symbolized by the prefix operator J and by the infix operators XOR ( or ), EOR, EXOR, , , ...
.
First, the algorithm starts with two registers, initialized to
. Then, we apply the Hadamard transform to the first register, which gives the state
:
Query the oracle
to get the state
:
.
Apply another Hadamard transform to the first register. This will produce the state
: