Quantum Fourier Transform, Quantum Phase Estimation, Shors Algorithm, Quantum Computing, Qiskit.
such that a^r mod N = 1. Step 3: Obtain the factor of N by computing the greatest common divisor of a^(r/2) ± 1 and N. We will implement a circuit to factor a very simple number N = 15 and we will start with a = 7. The function will take an argument for k (the number of qubits) and compose, run,