LearnViz CompSci
Home / Learn / Emerging & Frontier Topics / Shor's Algorithm

Intermediate Topic 27 of 51 Emerging & Frontier Topics

Shor's Algorithm

Quantum method factoring integers efficiently.

How it works

Shor's 1994 algorithm factors an integer N in polynomial time on a quantum computer. It reduces factoring to finding the period r of the function a to the x modulo N for a random a. A quantum circuit puts the input register in superposition, computes the function, and applies the quantum Fourier transform, so measurement reveals a multiple of 1/r with high probability. Classical post-processing with continued fractions recovers r, and gcd calculations then give factors of N. The best classical methods need super-polynomial time.

Where it is used

Its importance is that it would break RSA and elliptic-curve cryptography, motivating post-quantum cryptography standards.

Common pitfall

Running it on numbers of cryptographic size needs thousands of error-corrected logical qubits, far beyond today's machines, so current demonstrations factor tiny numbers. Organizations should plan migration to quantum-resistant algorithms now, since encrypted data can be stored and decrypted later.

Where it fits in the course

Shor's Algorithm is topic 27 of 51 in Emerging & Frontier Topics, rated Intermediate. It follows Entanglement. The next topic is Grover's Algorithm.

Practice and explore

How to study this topic

  1. Read the explanation above and restate the definition in your own words.
  2. Open the interactive lesson and answer its mini quiz.
  3. Read the common pitfall, then write a short example that avoids it.
  4. Check your understanding in the Emerging & Frontier Topics quiz, and revisit the topic if you miss a question.

Frequently asked questions

What is Shor's Algorithm?
Quantum method factoring integers efficiently. It belongs to Emerging & Frontier Topics and is an intermediate-level topic.
Where do people use Shor's Algorithm?
Its importance is that it would break RSA and elliptic-curve cryptography, motivating post-quantum cryptography standards.
What is the most common mistake with Shor's Algorithm?
Running it on numbers of cryptographic size needs thousands of error-corrected logical qubits, far beyond today's machines, so current demonstrations factor tiny numbers.
What should I learn before this topic?
Start with Entanglement, the topic just before it in Emerging & Frontier Topics.
How can I practice it?
Answer the mini quiz in the interactive lesson, then take the Emerging & Frontier Topics quiz.
Is Shor's Algorithm hard to learn?
It is an Intermediate topic. Be comfortable with the Beginner topics in this area first, then read the common pitfall carefully, since it is where most mistakes happen.
How long does it take to learn Shor's Algorithm?
Most learners can read the explanation and finish the interactive lesson in under an hour. Fluency comes from applying the idea, so plan a few short practice sessions with the quiz.
Which topics are related to Shor's Algorithm?
Entanglement, Grover's Algorithm, Quantum Gates are closely connected. The full list is in the related topics section of this page.
What should I study after Shor's Algorithm?
Continue with Grover's Algorithm, the next topic in Emerging & Frontier Topics.

Related topics