⌘ QUANTUM LOCKPICK
EXPERIMENT 001 / BROWSER QUANTUM LAB
SHOR’S ALGORITHM · REAL STATEVECTOR SIMULATION

A small number.
A quantum way in.

Factor 15 with seven simulated qubits. Watch interference reveal a hidden period, then turn that period into the two factors.

NUMBER TO FACTOR
15
7 qubits · 128 complex amplitudes
3 counting + 4 target
Initializing circuit…

01 / The quantum circuit

EXACT · NO NOISE
|000⟩─H ⊗ 3─c-Uₐ²ʲ─QFT⁻¹→Measure

Target starts in |0001⟩. Three controlled modular multiplications entangle the registers; the inverse QFT makes the period visible.

Counting-register probabilities

|AMPLITUDE|²
Outcome / 3-bit registerΣ p = …

02 / Unlocking the factors

CLASSICAL POSTPROCESSING
SIMULATING SHOR’S ALGORITHM
15 = 3 × 5

Preparing the quantum measurement distribution.

03 / Measurement notebook

24 independent circuit measurements. Zero outcomes and trivial roots stay in the record.

24 SHOTS
ShotMeasuredPhase / fractionPeriod checkgcd(x − 1, 15) / gcd(x + 1, 15)Outcome
THE SHORTCUT, DISCLOSED

Controlled multiplication is a permutation unitary: |y⟩ → |a·y mod 15⟩ for y < 15; |15⟩ stays fixed. We simulate its action directly instead of decomposing arithmetic into elementary gates. Superposition, interference and measurement all use the actual statevector.

A LOCKPICK, NOT A KEY TO RSA

This is a noiseless, seven-qubit educational simulation for N = 15 only. Shor’s algorithm threatens RSA at a vastly larger, fault-tolerant scale. This demo cannot factor real RSA keys. Try a = 14 to see an honest failure: an even period can still give a trivial root.