Quantum Computing, Quantum, Quantum Physics, Quantum Mechanics, Quantum Computer.
function, we can use the same code to repeat the process on the next n-1 qubits: def qft_rotations(circuit, n): """Performs qft on the first n qubits in circuit (without swaps)""" if n == 0: return circuit n -= 1 circuit.h(n) for qubit in range(n): circuit.cp(pi/2**(n-qubit), qubit, n) # At the end