Quantum circuits simulating fundamental QM experiments. This is for a lecture I'm teaching.
  • OpenQASM 59.2%
  • Python 28.8%
  • Just 9.4%
  • Shell 2.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-07 14:06:46 +02:00
01_sg_spin.qasm feat: init 2026-07-07 14:06:46 +02:00
02_sg_path.qasm feat: init 2026-07-07 14:06:46 +02:00
03_sg_wigner_coherent.qasm feat: init 2026-07-07 14:06:46 +02:00
04_chsh.qasm feat: init 2026-07-07 14:06:46 +02:00
justfile feat: init 2026-07-07 14:06:46 +02:00
README.md feat: init 2026-07-07 14:06:46 +02:00
requirements.txt feat: init 2026-07-07 14:06:46 +02:00
shell.fish feat: init 2026-07-07 14:06:46 +02:00
visualize_circuit.py feat: init 2026-07-07 14:06:46 +02:00

Fundamental QM experiments

Prerequisites

You will need Python 3, Just and Fish installed.

Upon first download of this repository, run:

just install

Upon subsequent uses, run just shell to spin up the shell with the correct Python environment.

Running the experiments

To run an experiment a 100 times, execute oqi followed by the filename, for example:

oqi 01_sg_spin.qasm

Sometimes, you might need better precision and less fluctuation in results. To do that, run the experiment with more iterations, for example:

oqi 04_chsh.qasm 10000

Visualization

To visualize the quantum circuits, open IBM's quantum composer, enable Freeform alignment and then copy-paste the OpenQASM code to the editor.

Alternatively, run just visualize followed by the filename of the circuit you want to visuialize.