This is a factoring algorithm reserved for Quantum Computing, used to factor numbers exponentially faster than Classical Computers. Converts a NP problem into a polynomial time problem.
Algorithm
We want to find , where , Given
- We know that the factors for is: by Fermatâs Little Theorem
- Estimates the period
- We can accurately guess what could be by calculating the remainder away from the expected in Parallel
- With QFT, we can remove bad guesses to find the Frequency
- Uses Quantum Phase Estimation to use modular exponentiation and the inverse of QFTâs to estimate the phase of the quantum state
Intuition
- Given a random guess of a factor, shors algorithm finds a better factor via Fermatâs Little Theorem