Quantum Computing, Quantum, Quantum Physics, Shors Algorithm, Qiskit.
QuantumCircuit(4) for _iteration in range(power): if a in [2,13]: U.swap(2,3) U.swap(1,2) U.swap(0,1) if a in [7,8]: U.swap(0,1) U.swap(1,2) U.swap(2,3) if a in [4, 11]: U.swap(1,3) U.swap(0,2) if a in [7,11,13]: for q in range(4): U.x(q) U = U.to_gate() U.name = f"{a}^{power} mod 15" c_U =