Simon's Algorithm
Part of Womanium Quantum + AI 2024 program
Definition
Simon's algorithm provides an exponential speed-up compared to known classical solutions to the same problem. The problem that algorithm solves has practical uses in the analysis of certain crypto-systems and inspired many other algorithms such as Shor's factoring algorithm.
Problem
The problem defines a function
With the promise that:
The goal of the problem is to determine the secret string
The symbol
It can also be said that it is a bitwise addition modulo 2.
The problem can also be defined as determining whether a function is two-to-one or one-to-one, in which case we need to determine whether
Classical Solution
Classically we would have either a deterministic or a probabilistic solution, where our goal is to find
Deterministically, we would need to cover a large area of the search space to be able to tell whether such strings exist or not, this would usually require
Probabilistically, we would cover a "large enough" area to solve the problem with high certainty, but less than 100% certainty.
The best classical solution has a complexity of
Simon's Algorithm
The proposed algorithm has two parts, a classical part and a quantum part. The quantum part works with a complexity of
We define the oracle
We also define
Let's start by applying the quantum part of the algorithm.
Now we measure the second half of the qubits, the one that we stored the oracle result in. We will observe a random result to one of the inputs
Let's assume we observe the result of
Two-To-One ( )
If the function is two-to-one then we know that two states could've resulted in the same outcome which are the state
Then after applying the Hadamard gate the system state will change to:
We know that
Using
Now we apply that as such
Let's plug that back in the system state
Therefore, all strings that satisfy
But the probability of measuring any string
One-To-One ( )
If the function
Now we apply the Hadamard gate
This means that all states have an equal probability of being measured.