Quantum, Qiskit, Quantum Mechanics, Python, Programming.
range(n): splitOp.p(phi/2**(n-3+i), n-i) for i in range(n): for j in range(i+1,n): splitOp.cx(n-j,0) splitOp.cx(n-i,0) splitOp.p(phi*(2**(2-i-j)),0) splitOp.cx(n-i,0) splitOp.cx(n-j,0) '''inverse QFT''' splitOp.append(QFT(n,inverse=True),qubits[1:]) #inverse QFT splitOp.barrier()