Quantum RingsQuantum Rings
Simulation
Large-scale simulation on your own hardware
Open Quantum
Real QPUs from leading providers, one API
Quantum 101
A free 14-lesson course, from qubits to QAOA
For Researchers
For Developers
For Educators
For Students
For Startups
For Enterprise
Documentation
Sample Notebooks
Quantum 101
Community
Research
GitHub
NewsPricing
Log inGet started free
NewsPricing
Log inGet started free
Quantum 101 overview

Quantum Foundations

  • 1.Welcome, Math Prerequisites & SDK Setup
  • 2.Single-Qubit Gates, Bloch Sphere & Measurement
  • 3.Entanglement & Multi-Qubit Gates

Starting to Code

  • 4.Circuit Composition & Control Flow
  • 5.Quantum Oracles & Amplitude Amplification
  • 6.“Toy” Algorithms: Deutsch–Jozsa, BV, Simon
  • 7.Grover’s Search Algorithm
  • 8.QFT & Phase Estimation

Continue to Grow

  • 9.Shor’s Factoring Algorithm
  • 10.Noise & Error Mitigation
  • 11.Variational Algorithms I—VQE
  • 12.Variational Algorithms II—QAOA
  • 13.Quantum Error Correction
  • 14.Capstone: 100-Qubit QAOA & Road Ahead

Continue to Grow · Lesson 9

Shor’s Factoring Algorithm

Witness the power of Shor's Factoring Algorithm, a quantum breakthrough that combines classical and quantum processing to efficiently factor large numbers. Explore its core mechanics, from modular exponentiation and phase estimation to post-processing, and understand its critical need for fault-tolerance.

Welcome back, quantum coders! In Episode 9, we're tackling the legendary Shor's Factoring Algorithm – the quantum algorithm that fundamentally challenges classical cryptography. Get ready to see how a quantum computer can factor large numbers with unprecedented efficiency!

Shor's Hybrid Structure: Classical & Quantum Synergy

Shor's algorithm isn't a purely quantum endeavor; it's a brilliant classical/quantum hybrid masterpiece. We'll begin by outlining this elegant two-part structure, showing how classical pre-processing reduces the factoring problem to order-finding, which is then solved by the quantum core. This highlights how quantum computers will integrate with classical systems in practice, leveraging each's strengths for optimal performance.

The Quantum Core: Modular Exponentiation and Order-Finding

The true power of Shor's algorithm resides in its quantum subroutine, which efficiently solves the order-finding problem. We'll examine the high-level modular exponentiation circuit block, a complex unitary operation at its heart. You'll then see how Quantum Phase Estimation (QPE), building on concepts from Episode 8, is applied to this modular exponentiation, combined with repeated measurements, to efficiently determine the period (or order) of a specific function. This is truly where the quantum advantage for factoring shines, leveraging superposition and interference.

From Quantum Output to Prime Factors: Post-Processing and Practical Demos

Once the quantum computer provides a measurement result related to the period, the computational task transitions back to the classical domain. We'll delve into the continued-fraction algorithm, a clever and efficient classical technique used to precisely derive the prime factors from the period found by QPE. To solidify your understanding, we'll discuss resource estimates (qubits and gate depth) for factoring small numbers like N=15 and N=21. Then, you'll get a hands-on demonstration: we'll factor 15 on a noise-free backend, teaching you how to interpret the measurement histogram and subsequently derive the factors.

The Imperative for Fault-Tolerance in Practice

Finally, we'll address one of the most critical practical considerations for Shor's algorithm: why it fundamentally needs fault-tolerance to be effective for cryptographically relevant numbers. We'll discuss the severe challenges posed by quantum noise and decoherence in complex, deep circuits like modular exponentiation, emphasizing that current noisy intermediate-scale quantum (NISQ) devices are not yet capable of executing Shor's algorithm for breaking real-world encryption. This highlights the ongoing efforts in quantum error correction and the future requirements for practical quantum computing.

Today's lesson culminates in understanding one of quantum computing's most profound achievements, showing its immense power and the significant engineering and scientific challenges that remain. Make sure to complete all your notebook exercises to solidify these concepts! We're excited to see what you build next.

Code & notes

Open the notebookCourse repositoryAsk in Discord
Lesson 8Complete & continue

Stay Updated

SDK updates, webinars, and quantum industry news — straight to your inbox.

Quantum Rings

Large-scale quantum simulation on your own hardware — and access to real QPUs when you need them.

info@quantumrings.com

5555 Central Ave, Suite 110, Boulder, CO 80301

Products

  • Simulation
  • Quantum 101
  • Open Quantum
  • Pricing

Developers

  • Documentation
  • Research
  • GitHub

Solutions

  • For Researchers
  • For Developers
  • For Educators
  • For Students
  • For Startups
  • For Enterprise

Company

  • About
  • Community
  • Investors
  • Careers
  • Ambassadors
  • Press Kit
  • News
  • Contact

Legal

  • Terms of Use
  • Privacy Policy
© 2026 Quantum Rings, Inc. All rights reserved.