The Shor Circuit
We'll take a look at how we can implement Shor's Algorithm through a quantum circuit that is similar to QPE.
Modular exponentiation
The first step to implementing Shor’s Algorithm would be to create a quantum circuit to calculate Modular Exponentiation. Let’s recall our function .
As, quantum operations are reversible, we will implement as a quantum oracle with and an ancilla register as input, defined as follows:
We need to operate on a random value that we have picked, using quantum gates.
The number can be represented in the binary form as . We can use this binary representation to understand how we can apply a gate to each input qubit in our register making up .
...