Danny Teo Yong Song

Danny Teo Yong Song

Software Developer | Data Enthusiast | Tech Explorer

← Back to Projects

Quantum Dice

Personal project — quqntum_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

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).

Visitor Statistics

Overall visitors

--

Overall likes

--

This page visitors

--

This page likes

--