Shor's Algorithm
A quantum algorithm for integer factorization
Shor’s algorithm is a quantum algorithm for finding the prime factors of an integer. It was developed by Peter Shor in 1994 and demonstrates that quantum computers could theoretically break widely used cryptographic systems like RSA.
Exponentially faster than classical factorization algorithms Uses quantum Fourier transform to find the period of a function Can factor large integers in polynomial time on a quantum computer Threatens current RSA encryption if large-scale quantum computers become practical Combines classical and quantum computation steps
Choose a random integer a that is coprime to N (the number to factor) Use quantum period finding to determine the period r of the function f(x) = a^x mod N If r is even and a^(r/2) ≠ ±1 mod N, compute gcd(a^(r/2) ± 1, N) to find factors The quantum speedup comes from efficiently finding the period using quantum Fourier transform
Demonstrates the potential power of quantum computing for specific problems Motivates research into post-quantum cryptography Shows quantum advantage for number-theoretic problems Requires error correction and large qubit counts for practical implementation