Quantum Dice
A quantum circuit built with Qiskit and Qiskit Aer that models two fair six-sided dice. Each measurement yields independent faces 1–6 per die; the sum follows the classical two-dice distribution (2–12). The repo includes a CLI simulator, a Streamlit app, and a standalone browser page that reproduces the same statistics without running Qiskit in the browser.
Overview
Six qubits encode two dice: three per die, each prepared in a uniform superposition over the six basis states that map to faces 1–6 in binary. The joint state is measured many times; with enough shots, the sum histogram matches rolling two fair classical dice. A bundled index.html shows dice visuals and a histogram using the same outcome distribution for quick demos without Python.
Tech & Tools
- Python 3.10+
- Qiskit, Qiskit Aer
- Streamlit (interactive UI)
- Pandas
- Standalone HTML/JS for the browser demo
Links
You can also run locally: python quantum_two_dice.py, streamlit run streamlit_app.py, or open index.html in a browser. See the README for CLI options (--shots, --seed, --draw).