Quantum Fourier Transform, Quantum Phase Estimation, Shors Algorithm, Quantum Computing, Qiskit.
#Step 3. Use the Fraction object to find the guess for r frac = Fraction(phase).limit_denominator(N) s, r = frac.numerator, frac.denominator #Step 4. Now that r has been found, use the builtin greatest common deonominator # function to determine the guesses for a factor of N guesses =