Playground

Quantum Arcade

Twenty-one games, labs, and demos. Nothing here is a canned animation: every bar, dial, and verdict is computed live by the same from-scratch statevector and density-matrix engine that powers the VQE suite. One card runs an analytic textbook formula instead of a simulation — it says so on the card.

One qubit, no mercy

The fundamentals — every widget drives a real statevector.

Gate Mixer

lab
|0⟩
100.0%
|1⟩
0.0%

apply a gate…

Computes: one real statevector; every button multiplies it by that gate's actual 2×2 unitary

State Match

game

A hidden state is drawn. Steer yours (cyan) onto the ghost (dim) — fidelity ≥ 99% wins.

fidelity76.1%
Computes: |⟨target|yours⟩|² between two real single-qubit states

Born Casino

game

Set the odds with θ, then call the collapse. Long streaks get exponentially unlikely — that is the Born rule doing its job.

|0⟩
75.0%
|1⟩
25.0%
streak0
best0
Computes: a fresh statevector each round; the collapse is a genuine inverse-CDF sample of |amplitude|²

π-Pulse Trainer

game

Drive the qubit with a rotation pulse. A perfect π pulse lands the whole amplitude on |1⟩ — this is exactly how real qubits get flipped.

P(|1⟩)31.88%
Computes: P(|1⟩) from RY(θ) applied to a real statevector — the textbook sin²(θ/2), earned honestly

Interference Lab

lab

Split one qubit onto two paths (H), twist the phase between them, recombine (H). The output probability swings from certain to impossible — with nothing removed, only phase.

|0⟩
100.0%
|1⟩
0.0%
Computes: H · RZ(φ) · H on a real statevector — the fringe is computed, not drawn

Measurement Duel

lab

One fixed state, two questions. Ask in Z: pure coin-flip. Ask in X: dead certain. The state didn't change — your question did.

Z→0
0.0%
Z→1
0.0%
X→+
0.0%
X→−
0.0%
Computes: 20 real sampled shots per press on the same |+⟩ state — only the measurement basis differs

Bloch Detective

game

Before and after. Which gate did it?

score0/0
Computes: each round applies the secret gate's real unitary; both dials are computed Bloch vectors

Entanglement & protocols

Two qubits, one wavefunction — the part with no classical story.

Entanglement Dial

lab

Turn one knob from “two separate qubits” to “one inseparable pair.” Watch qubit A's purity drop to ½ — alone, it becomes a pure coin flip, because the information lives in the pair.

|00⟩
50.0%
|01⟩
0.0%
|10⟩
0.0%
|11⟩
50.0%
purity of qubit A0.500

maximally entangled territory

Computes: RY(θ)+CNOT on a real 2-qubit statevector; purity Tr(ρ²) of the actual reduced density matrix

Entangled Dice

demo

Two dice, one wavefunction. Each roll is individually 50/50 random — and they always agree. Randomness and perfect correlation, at the same time.

Computes: each roll samples a real Bell state in matching bases — agreement is computed, not scripted

CHSH — Beat the Classical Bound

game

Classical physics caps |S| at 2. A Bell pair reaches 2√2 ≈ 2.83. Collect rounds and watch your sampled S climb past what any local hidden-variable story allows.

rounds0
S (sampled)
quantum max2.828
Computes: every round rotates a real Bell state's measurement bases and samples the joint outcome; S is estimated from those samples only

Teleportation Walkthrough

demo

A message qubit, an entangled pair, and two classical bits — the state moves without any qubit traveling. Step through the actual amplitudes.

Message ⊗ |00⟩
|000⟩
72.7%
|001⟩
27.3%
|010⟩
0.0%
|011⟩
0.0%
|100⟩
0.0%
|101⟩
0.0%
|110⟩
0.0%
|111⟩
0.0%
Computes: the real 3-qubit statevector at each protocol stage; bars are its live probabilities

Superdense Coding

demo

Share a Bell pair in advance, and one qubit can carry two classical bits. Pick the bits; the decoder lands on the matching basis state with certainty.

sending “00
decode 00
100.0%
decode 01
0.0%
decode 10
0.0%
decode 11
0.0%
Computes: encode on a real Bell pair (I/X/Z/XZ), decode with CNOT+H — the bars are the decoded statevector

Phase Kickback

demo

CNOT is supposed to change the target. Put the target in |−⟩ and fire: the target shrugs — the control flips from |+⟩ to |−⟩. This backwards kick powers Deutsch, Grover, and phase estimation.

ctrl |+⟩
100.0%
ctrl |−⟩
0.0%
Computes: a real CNOT on |+⟩⊗|−⟩; the control's X-basis probabilities are read from the actual state

The Cloning Button

game

One button. It copies an unknown qubit. Try it.

Computes: nothing — that is the point; the linearity argument below is the whole result

Algorithms, noise & spies

Where quantum computing earns its keep — and fights for its life.

Grover Searchlight

game

Eight drawers, one prize. Classically you open ~4. Grover finds it in 2 iterations — and if you keep going past the sweet spot, the amplitude rotates away again. Try over-searching.

prize in drawer:
iterations0 / 2 optimal
|000⟩
12.5%
|001⟩
12.5%
|010⟩
12.5%
|011⟩
12.5%
|100⟩
12.5%
|101⟩
12.5%
|110⟩
12.5%
|111⟩
12.5%
Computes: a real 3-qubit statevector; each press applies the actual oracle phase-flip + inversion about the mean

Deutsch's One-Question Oracle

game

A mystery coin function: constant (same answer always) or balanced (half and half). Classically you must ask twice. The Deutsch circuit asks once — and is never wrong.

Computes: the full Deutsch circuit runs on a real 2-qubit statevector; the verdict is read from its output probabilities

Born-Rule Randomness

lab

Hardware quantum RNGs sell exactly this: prepare |+⟩, measure, repeat. Sample away — entropy should hug 1 bit/bit.

bits0
entropy0.0000 b/bit
Computes: each bit is an inverse-CDF sample of a real H|0⟩ statevector — the model's randomness is genuine Born-rule sampling

Decoherence Dial

lab

This is the enemy every quantum computer fights. Turn up the noise on a crisp |+⟩ and watch its off-diagonal coherence — the part that interferes — bleed away into a classical coin.

coherence 2|ρ01|1.000
purity Tr(ρ²)1.000
Computes: a real density matrix under the actual depolarizing channel; coherence is 2|ρ01| off that matrix

Repetition Rescue

game

Encode one bit into three qubits; majority vote fixes any single flip. Below ~50% noise the code beats the bare qubit — the same idea, scaled up, is how Willow-class processors reach below-threshold error correction.

encoded
0.0%
bare
0.0%
Computes: Monte-Carlo rounds of the 3-qubit bit-flip code with true majority-vote decoding, against an unprotected qubit at the same noise

BB84 — Catch Eve

game

Alice sends key bits in random bases; Bob measures in his own. Toggle an eavesdropper: her measurements must disturb the states (no-cloning, two cards up), and the error rate betrays her at ~25%.

sifted key bits0
QBER0.0%
Computes: every round draws real random bits/bases; Eve's wrong-basis measurements scramble states exactly as the protocol predicts

Tunneling Odds

model

Classically, a ball below the wall's height never crosses. Quantum mechanically the odds are small — but never zero. Thinner or lower walls help exponentially.

P(tunnel)15.58%
Computes: the idealized rectangular-barrier formula T ≈ e^(−2κL) — an analytic textbook model, not a simulation