How danieltheparasite/quantum-coin-flip works
Quantum Coin Lab combines a browser-based quantum-coin learning experience with an optional Python simulator and seven experiments. The main user journey is to explore the 3D room, click the coins in sequence to complete the eight-qubit tour, then unlock experiments and a glossary; users can also compare outcomes with ordinary coin flips or request plain-language explanations of selected text. README statements establish the website capabilities and tour, while the Python source excerpts show the command-line experiment runner, simulator layers, and plotting. Browser implementation details are not sampled, so those internal links are omitted.
Main entry points: main.py Experiment runner · register.py State-vector register · visualize.py Plot generation · index.html Learning interface
Components 23
Learning website
- Learning interface
index.html - 3D coin room
index.html - Experiment explorer
index.html - Coin comparison
index.html - Plain-words glossary
index.html
Quantum tour
- Eight-qubit tour
python/qiskit_ghz_coin.py
Python simulator
- State-vector register
python/qsim/register.py - Quantum gates
python/qsim/gates.py - Noise models
python/qsim/noise.py - Plot generation
python/qsim/visualize.py
Experiments and results
- Experiment runner
python/main.py - Fair coin
python/experiments/exp1_fair_coin.py - Biased coin
python/experiments/exp2_biased_coin.py - Eight coins
python/experiments/exp3_eight_coins.py - Entangled coins
python/experiments/exp4_entangled_coins.py - Quantum walk
python/experiments/exp5_quantum_walk.py - Penny flip game
python/experiments/exp6_penny_flip_game.py - Interference and noise
python/experiments/exp7_interference_noise.py
Text explanations
- Floating hand
index.html - Gemini helper
ai.js - Explanation endpoint
api/explain.js
Other components
- Learner
- Gemini API
Connections 35
- Learner → Learning interface: uses
README.md - Learning interface → 3D coin room: presents
README.md - Learner → 3D coin room: clicks coins
README.md - 3D coin room → Eight-qubit tour: guides through
README.md - Learning interface → Experiment explorer: unlocks
README.md - Experiment explorer → Coin comparison: offers comparison
README.md - Learning interface → Plain-words glossary: unlocks
README.md - Learner → Floating hand: selects text
README.md - Floating hand → Gemini helper: requests explanation
README.md - Gemini helper → Explanation endpoint: calls when deployed
README.md - Explanation endpoint → Gemini API: requests answer
README.md - Experiment runner → Fair coin: runs
python/main.py - Experiment runner → Biased coin: runs
python/main.py - Experiment runner → Eight coins: runs
python/main.py - Experiment runner → Entangled coins: runs
python/main.py - Experiment runner → Quantum walk: runs
python/main.py - Experiment runner → Penny flip game: runs
python/main.py - Experiment runner → Interference and noise: runs
python/main.py - Fair coin → State-vector register: uses
python/experiments/exp1_fair_coin.py - Biased coin → State-vector register: uses
python/experiments/exp2_biased_coin.py - Eight coins → State-vector register: uses
python/experiments/exp3_eight_coins.py - Entangled coins → State-vector register: uses
python/experiments/exp4_entangled_coins.py - Penny flip game → State-vector register: uses
python/experiments/exp6_penny_flip_game.py - Interference and noise → State-vector register: uses
python/experiments/exp7_interference_noise.py - Quantum walk → Plot generation: plots results
python/experiments/exp5_quantum_walk.py - Fair coin → Plot generation: plots results
python/experiments/exp1_fair_coin.py - Biased coin → Plot generation: plots results
python/experiments/exp2_biased_coin.py - Eight coins → Plot generation: plots results
python/experiments/exp3_eight_coins.py - Entangled coins → Plot generation: plots results
python/experiments/exp4_entangled_coins.py - Penny flip game → Plot generation: plots results
python/experiments/exp6_penny_flip_game.py - Interference and noise → Plot generation: plots results
python/experiments/exp7_interference_noise.py - State-vector register → Quantum gates: applies matrices from
python/qsim/register.py - Interference and noise → Noise models: runs noisy circuits
python/experiments/exp7_interference_noise.py - Noise models → State-vector register: creates registers
python/qsim/noise.py - Noise models → Quantum gates: applies errors from
python/qsim/noise.py