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