Computer science Randomized, circuit, counting and interactive complexity Theorem
Shor's algorithm
Builds on Quantum complexity class BQPInteger factorizationOrder of an element
Statement
There is a quantum algorithm with the following property. Given an integer with binary digits, it outputs the prime factorization of with probability at least . Its running time is bounded by a polynomial in .
In particular, the decision version of integer factorization lies in BQP.
Remarks
The algorithm reduces factoring to order finding. For an odd that is not a prime power, pick a random with and let be the order of modulo . With probability at least , is even and , and then is a nontrivial factor of . The quantum part finds : it prepares a superposition over exponents , computes , applies the quantum Fourier transform, and measures. The exponents range over with . The measured value is close to a multiple of , and is recovered from it with continued fractions.
Example: for and , the powers of modulo are , so . Then and , , which gives .
With schoolbook arithmetic the algorithm uses gates, the cost being dominated by modular exponentiation. The same method computes discrete logarithms in polynomial time.
Going deeper
For a student
The classical part is elementary number theory: a period of gives a square root of modulo , and a nontrivial square root of yields a factor. The quantum Fourier transform is the quantum version of the discrete Fourier transform, and it turns periodicity into peaks of probability. The method generalizes to the hidden subgroup problem for finite abelian groups. It breaks RSA, Diffie–Hellman and elliptic curve cryptography, which motivates post-quantum cryptography.
Reading path
To understand this page from the ground up, read these 35 pages in order. The foundations come first.
Show the path as a graph
- no evidence level
- Composite number concept
- Divisibility definition
- Euler's totient function concept
- Group concept
- Modular exponentiation concept
- Multiplicative order concept
- Order of an element concept
- Polynomial ring concept
- Prime factorization concept
- Prime number concept
- Quantum complexity class BQP concept
- Quotient ring concept
- Congruence modulo n definition
- Greatest common divisor definition
- Prime number definition
- Ring definition
- Modular multiplicative inverse definition
- Coprime integers definition
- Fermat's little theorem statement
- Euclid's lemma statement
- Existence of a prime divisor statement
- Primality test concept
- Prime factorization definition
- Characteristic of a ring definition
- Commutative ring definition
- Euler's totient function definition
- Miller–Rabin primality test concept
- Existence of prime factorization statement
- Freshman's dream statement
- Euler's theorem statement
- Fundamental theorem of arithmetic statement
- AKS primality test statement
- RSA cryptosystem example
- Integer factorization problem
- Shor's algorithm statement
Further reading
About this page
| Tag | 83G4EPJ3EJ |
|---|---|
| URI | m2://83G4EPJ3EJ |
| Kind | statement, theorem |
| Writing | W0 stub |
| MSC | 68Q12, 81P68, 11Y05 |
| Status | This copy of the site has no build data. Run m2 status 83G4EPJ3EJ. |
| About | Integer factorization, Quantum complexity class BQP |
| Uses | Quantum complexity class BQP, Integer factorization, Order of an element |
| Same as | |
| Changed | 3 November 2026 |
Markdown · JSON · Edit on GitHub
What this page needs for W1
- an inventory row: the row of the inventory that the node accounts for (0 of 1)
- a source with a locator (0 of 1)
The writing levels say how complete the text of a page is. They do not measure its truth.
What links here
No page links to this page yet.