Quantum Fourier Transform, Quantum Phase Estimation, Shors Algorithm, Quantum Computing, Qiskit.
matplotlib.pyplot as plt from math import gcd Defining QFT and QFT-dagger functions: #QFT Circuit def qft(n): """Creates an n-qubit QFT circuit""" circuit = QuantumCircuit(n) def swap_registers(circuit, n): for qubit in range(n//2): circuit.swap(qubit, n-qubit-1) return circuit def