! Educational demonstration only. Keys, moduli, and RSA sizes here are intentionally tiny so classical/quantum attacks finish in seconds — today's classical hardware cannot run Shor's algorithm against real production RSA keys. See Security & Limitations.
Shor's Lab

Qubits, superposition, and entanglement -- run against this project's own from-scratch statevector simulator (quantum/statevector.py), not a canned illustration.

Registers here are capped at 4 qubits (16 amplitudes) so every amplitude table stays readable at a glance. Real registers grow to 2n2^n amplitudes for n qubits -- Shor's algorithm against a real RSA key would need dozens of qubits, which is exactly why this project's own honest simulator can only reach small N. See the Shor's Algorithm Lab and Resource Estimation pages for what that scaling actually looks like.

0. What's a qubit, and what's a gate?

A qubit's state is a length-2 complex vector α0+β1\alpha|0\rangle + \beta|1\rangle with α2+β2=1|\alpha|^2 + |\beta|^2 = 1. n qubits together are a single length-2n2^n vector, not n separate length-2 vectors -- that exponential blowup is why simulating a real quantum computer classically gets hard fast, and it's exactly what the controls below let you watch happen directly. A gate is just a unitary matrix applied to that vector.

1. Apply a gate and watch the full state

Creates equal superposition of |0⟩ and |1⟩

2. Entanglement: the Bell state

H on qubit 0, then a controlled-X (control=0, target=1): the two qubits become correlated so that measuring one instantly determines the other, even though neither has a definite value on its own.

Go deeper: Quantum Basics