Quantum Computing, Quantum, Quantum Physics, Quantum Mechanics, Quantum Computer.
the definition of the QFT. We will combine this into the final function qft(): def swap_registers(circuit, n): for qubit in range(n//2): circuit.swap(qubit, n-qubit-1) return circuit def qft(circuit, n): """QFT on the first n qubits in circuit""" qft_rotations(circuit, n) swap_registers(circuit, n)