Simon's algorithm
Die Siite isch nonig ibersetzt worre. Ihr luege d englischi Originalversion aa.
Simon's algorithm is a quantum query algorithm for a problem known as Simon's problem. This is a promise problem with a flavor similar to the Deutsch-Jozsa and Bernstein-Vazirani problems, but the specifics are different.
Simon's algorithm is significant because it provides an exponential advantage of quantum over classical (including probabilistic) algorithms, and the technique it uses inspired Peter Shor's discovery of an efficient quantum algorithm for integer factorization.
Simon's problem
The input function for Simon's problem takes the form
for positive integers and We could restrict our attention to the case in the interest of simplicity, but there's little to be gained in making this assumption — Simon's algorithm and its analysis are basically the same either way.
We'll unpack the promise to better understand what it says momentarily, but first let's be clear that it requires that has a very special structure — so most functions won't satisfy this promise. It's also fitting to acknowledge that this problem isn't intended to have practical importance. Rather, it's a somewhat artificial problem tailor-made to be easy for quantum computers and hard for classical computers.
There are two main cases: the first case is that is the all-zero string and the second case is that is not the all-zero string.
-
Case 1: If is the all-zero string, then we can simplify the if and only if statement in the promise so that it reads This is equivalent to being a one-to-one function.
-
Case 2: If is not the all-zero string, then the promise being satisfied for this string implies that is two-to-one, meaning that for every possible output string of there are exactly two input strings that cause to output that string. Moreover, these two input strings must take the form and for some string
It's important to recognize that there can only be one string that works if the promise is met, so there's always a unique correct answer for functions that satisfy the promise.
Here's an example of a function taking the form that satisfies the promise for the string
There are different input strings and different output strings, each of which occurs twice — so this is a two-to-one function. Moreover, for any two different input strings that produce the same output string, we see that the bitwise XOR of these two input strings is equal to which is equivalent to saying that either one of them equals the other XORed with
Notice that the only thing that matters about the actual output strings is whether they're the same or different for different choices of input strings. For instance, in the example above, there are four strings and that appear as outputs of We could replace these four strings with different strings, so long as they're all distinct, and the correct solution would not change.
Algorithm description
Here's a quantum circuit diagram representing Simon's algorithm.
To be clear, there are qubits on the top that are acted upon by Hadamard gates and qubits on the bottom that go directly into the query gate. It looks very similar to the algorithms we've already discussed in the lesson, but this time there's no phase kickback; the bottom qubits all go into the query gate in the state
To solve Simon's problem using this circuit will actually require several independent runs of it followed by a classical post-processing step, which will be described later after the behavior of the circuit is analyzed.
Analysis
The analysis of Simon's algorithm begins along similar lines to the Deutsch-Jozsa algorithm. After the first layer of Hadamard gates is performed on the top qubits, the state becomes
When the is performed, the output of the function is XORed onto the all-zero state of the bottom qubits, so the state becomes
When the second layer of Hadamard gates is performed, we obtain the following state by using the same formula for the action of a layer of Hadamard gates as before.
At this point, the analysis diverges from the ones for the previous algorithms in this lesson.
We're interested in the probability for the measurements to result in each possible string Through the rules for analyzing measurements described in the Multiple systems lesson of the Basics of quantum information course, we find that the probability to obtain the string is equal to
To get a better handle on these probabilities, we'll need just a bit more notation and terminology. First, the range of the function is the set containing all of its output strings.
Second, for each string we can express the set of all input strings that cause the function to evaluate to this output string as
The set is known as the preimage of under We can define the preimage under of any set in place of in an analogous way — it's the set of all elements that maps to that set. (This notation should not be confused with the inverse of the function which may not exist. The fact that the argument on the left-hand side is the set rather than the element is the clue that allows us to avoid this confusion.)
Using this notation, we can split up the sum in our expression for the probabilities above to obtain
Every string is represented exactly once by the two summations — we're basically just putting these strings into separate buckets depending on which output string they produce when we evaluate the function and then summing separately over all the buckets.
We can now evaluate the Euclidean norm squared to obtain
To simplify these probabilities further, let's take a look at the value
for an arbitrary selection of
If it happens to be the case that then is a one-to-one function and there's always just a single element for every The value of the expression is in this case.
If, on the other hand, then there are exactly two strings in the set To be precise, if we choose to be any one of these two strings, then the other string must be by the promise in Simon's problem. Using this observation we can simplify as follows.
So, it turns out that the value is independent of the specific choice of in both cases.
We can now finish off the analysis by looking at the same two cases as before separately.
-
Case 1: In this case the function is one-to-one, so there are strings and we obtain
In words, the measurements result in a string chosen uniformly at random.
-
Case 2: In this case is two-to-one, so there are elements in Using the formula from above we conclude that the probability to measure each