Quantum Computing, Quantum, Quantum Physics, Quantum Mechanics, Quantum Computer.
circuit.h(n) # Apply the H-gate to the most significant qubit for qubit in range(n): # For each less significant qubit, we need to do a # smaller-angled controlled rotation: circuit.cp(pi/2**(n-qubit), qubit, n) Let’s see how this looks: qc = QuantumCircuit(4) qft_rotations(qc,4) qc.draw('mpl')