Quantum Computing, Quantum, Quantum Physics, Shors Algorithm, Qiskit.
Fraction(phase).limit_denominator(15) rows.append([phase, f"{frac.numerator}/{frac.denominator}", frac.denominator]) # Print as a table headers=["Phase", "Fraction", "Guess for r"] df = pd.DataFrame(rows, columns=headers) print(df) Phase Fraction Guess for r 0 0.00 0/1 1 1 0.75 3/4 4 2 0.50 1/2 2 3