CPE 645 / CS 685
Applied Cryptography
Calculators

Shor's Quantum Step

Simulate the circuit that finds the period for N up to 63. The Fourier transform turns a comb into peaks, and continued fractions turn a peak into r.

Quantum algorithmsFactoringdemo
Objectives
  • Size the input register so that Q = 2^q is at least N^2.

  • Explain why the measured y lands near a multiple of Q/r.

  • Recover r from y/Q with continued fractions, and explain why a few runs are enough.


Static site. Every demo computes in your browser, and nothing you type is sent anywhere.