Quantum Computing, Quantum, Quantum Physics, Shors Algorithm, Qiskit.
Initialize counting qubits in state |+> qc.x(3+N_COUNT) # And auxiliary register in state |1> for q in range(N_COUNT): # Do controlled-U operations qc.append(c_amod15(a, 2**q), [q] + [i+N_COUNT for i in range(4)]) qc.append(qft_dagger(N_COUNT), range(N_COUNT)) # Do inverse-QFT