What the work claims
That integer factorisation lies in BQP—the class of problems efficiently solvable by a quantum computer.
Shor proposed several related algorithms, for the factoring problem, the discrete logarithm problem and the period-finding problem. “Shor’s algorithm” usually means the factoring one, and all three are instances of the hidden subgroup problem. For factoring, the quantum gate count is of order (log N)² (log log N)(log log log N) using fast multiplication, and a gate count of this kind shows integer factorisation is in BQP.
How it was done
Shor’s algorithm reduces integer factorisation to order-finding using classical computation, then solves order-finding on a quantum computer via quantum phase estimation and continued fractions.
The classical half is short. Euclid’s algorithm checks whether N is even, and a random integer a is tested with gcd(a, N); a shared factor ends the work. Otherwise a has a multiplicative order r modulo N, and the quantum subroutine exists only to find r. If r is odd, the algorithm restarts with a new a. The quantum circuit uses two registers and phase estimation, and a classical continued-fractions step then recovers the period from the measurements. The runtime bottleneck is quantum modular exponentiation, which is far slower than the quantum Fourier transform and the classical processing.
What holds up
The asymptotic speedup holds: it runs in polynomial time in log N, while the general number field sieve runs in sub-exponential time.
What does not
It does not run on any existing quantum computer. It assumes fault-tolerant, scalable quantum hardware with low error rates—none of which existed in 1994 or exists today.
The demonstrations so far are tiny. In 2001 an IBM group factored 15 into 3 × 5 on a seven-qubit NMR quantum computer. None of these meet the requirements of the algorithm: they compile the circuit using prior knowledge of the answer, and some oversimplify it until it is equivalent to coin flipping. As of 2026, laboratory runs give correct results in only a fraction of attempts, and beating classical computers may need millions of qubits because of the overhead of error correction.
Why it matters beyond the lab
It established a concrete cryptographic vulnerability: widely used public-key encryption (e.g., RSA) would collapse if large-scale quantum computers were built.
RSA is not the only target. Finite-field and elliptic-curve Diffie–Hellman key exchange are schemes the algorithm could also break, assuming a quantum computer with enough qubits that operates without succumbing to noise and decoherence. The result has been called a powerful motivator for building quantum computers, and it has also driven research on post-quantum cryptography: cryptosystems that are secure against quantum computers.
Is it worth your time
Yes—if you need to understand why quantum computing threatens RSA cryptography, or why factoring is not provably hard for quantum machines.





