Quantum Dice
Fair dice by construction · play in your browser

Quantum Dice
provably-fair dice from a quantum computer.

Take three qubits, apply a Hadamard gate to each, and measure: you get a uniform integer in {0..7}. Reject the outcomes 0 and 7, keep {1..6} — and you have a mathematically exactly fair six-sided die. Play standard Tavla (backgammon) in your browser with those quantum dice.

The one-die pipeline
  1. 1
    H⊗³ |000⟩
    uniform superposition over the 8 states {0..7}
  2. 2
    measure
    each outcome 0..7 with probability 1/8
  3. 3
    reject 0 & 7
    condition onto {1..6} (accept prob 3/4)
  4. 4
    fair d6
    exactly 1/6 per face
Two dice = a six-qubit product circuit H⊗⁶|000000⟩, exactly uniform over the 6×6 grid.
Why it's fair

Rejection, not modulo

Mapping a raw value with mod 6 makes two faces twice as likely. Rejecting the two extra outcomes instead keeps the remaining six exactly equiprobable — no bias by construction.

Transparent

See every measurement

The game shows the raw 3-bit draws behind each roll and marks which were rejected (0 or 7) and which accepted (1–6) — the quantum provenance of every die, live.

Playable

Standard Tavla vs. an AI

Full backgammon — bar re-entry, hitting, bearing off, doubles — you (cyan) versus a greedy AI (magenta), entirely in your browser.

Honest framing. This is not a cryptographic randomness primitive and makes nocertification claim. For ordinary play a local CSPRNG is cheaper and stronger. It’s a transparent, fun demonstration of producing mathematically fair dice from quantum measurements — and here the dice run as an ideal simulator in your browser.