In computational complexity theory and quantum computing, Simon's problem is a computational problem that is proven to be solved exponentially faster on a quantum computer 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. Both problems are special cases of the abelian hidden subgroup problem, which is now known to have efficient quantum algorithms. The problem is set in the model of decision tree complexity or query complexity and was conceived by Daniel R. Simon in 1994. Simon exhibited a quantum algorithm that solves Simon's problem exponentially faster with exponentially fewer queries than the best probabilistic (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 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, 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.
Problem description Simon's problem considers access to a function f:{0,1}n→{0,1}m,m≥n as implemented by a black box or an oracle. This function is promised to be either a one-to-one function, or a two-to-one function; if f is two-to-one, it is furthermore promised that two inputs x and x′ evaluate to the same value if and only if x and x′ differ in a fixed set of bits. I.e.,
If f is not one-to-one, it is promised that there exists a non-zero s such that, for all x≠x′, f(x)=f(x′) if and only if x′=x⊕s where ⊕ denotes bitwise exclusive-or. Simon's problem asks, in its decision version, whether f is one-to-one or two-to-one. In its non-decision version, Simon's problem asks whether f is one-to-one or what is the value of s (as defined above). The goal is to solve this task with the least number of queries (evaluations) of f. Note that if x′=x, then f(x′)=f(x) and x′=x⊕s with s=0. On the other hand (because a⊕b⊕b=a for all a and b), x′=x⊕s⟺x′⊕x=s. Thus, Simon's problem may be restated in the following form:
Given black-box or oracle access to f, promised to satisfy, for some s and all x,x′, f(x)=f(x′) if and only if x′⊕x∈{0,s}, determine whether s≠0 (decision version), or output s (non-decision version). Note also that the promise on f implies that if f is two-to-one then it is a periodic function: f(x)=f(x⊕s).
Example The following function is an example of a function that satisfies the required property for n=3:
In this case, s=110 (i.e. the solution). Every output of f occurs twice, and the two input strings corresponding to any one given output have bitwise XOR equal to s=110. For example, the input strings 010 and 100 are both mapped (by f) to the same output string 000. That is, f(010)=000 and f(100)=000. Applying XOR to 010 and 100 obtains 110, that is 010⊕100=110=s. s=110 can also be verified using input strings 001 and 111 that are both mapped (by f) to the same output string 010. Applying XOR to 001 and 111 obtains 110, that is 001⊕111=110=s. This gives the same solution s=110 as before. In this example the function f is indeed a two-to-one function where s≠0n.
Problem hardness Intuitively, this is a 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 x and y for which f(x)=f(y). There is not necessarily any structure in the function f that would help us to find two such inputs: more specifically, we can discover something about f (or what it does) only when, for two different inputs, we obtain the same output. In any case, we would need to guess Ω(2n) different inputs before being likely to find a pair on which f takes the same output, as per the birthday problem. Since, classically to find s with a 100% certainty it would require checking Θ(2n) inputs, Simon's problem seeks to find s using fewer queries than this classical method.
Simon's algorithm The algorithm as a whole uses a subroutine to execute the following two steps: Run the quantum subroutine an expected O(n) times to get a list of linearly independent bitstrings y1,...,yn−1. Each yk satisfies yk⋅s=0, so we can solve the system of equations this produces to get s.
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 transformH⊗n|k⟩=12n∑j=02n−1(−1)k⋅j|j⟩where k⋅j=k1j1⊕…⊕knjn, where ⊕ denotes XOR. First, the algorithm starts with two registers, initialized to |0⟩⊗n|0⟩⊗n. Then, we apply the Hadamard transform to the first register, which gives the state
12n∑k=02n−1|k⟩|0⟩⊗n. Query the oracle Uf to get the state
12n∑k=02n−1|k⟩|f(k)⟩. Apply another Hadamard transform to the first register. This will produce the state
12n∑k=02n−1[12n∑j=02n−1(−1)j⋅k|j⟩]|f(k)⟩=∑j=02n−1|j⟩[12n∑k=02n−1(−1)j⋅k|f(k)⟩]. Finally, we measure the first register (the algorithm also works if the second register is measured before the first, but this is unnecessary). The probability of measuring a state |j⟩ is||12n∑k=02n−1(−1)j⋅k|f(k)⟩||2This is due to the fact that taking the magnitude of this vector and squaring it sums up all the probabilities of all the possible measurements of the second register that must have the first register as |j⟩. There are two cases for our measurement:
… excerpt ends here. Continue reading the full article.

