Shor’s algorithm is a quantum algorithm for factoring a number N in O((log N)3) time and O(log N) space, named after Peter Shor.
The problem we are trying to solve is that, given an integer N, we try to find another integer p between 1 and N that divides N. Shor’s algorithm consists of two parts:
- A reduction of the factoring problem to the problem of order-finding, which can be done on a classical computer.
- A quantum algorithm to solve the order-finding problem.
Note: For this you will need an API token which you can get by registering here: https://quantum-computing.ibm.com/
//run on IBM’s quantum computers with Python and Qiskit.
For detailed explanantion
visit blog : https://medium.com/@kush.aradhana007/shors-factoring-algorithm-cd70802e0544