Inspiration

I'm a complete beginner to quantum computing. In AP Physics 2, I learned about the double-slit experiment, how a single particle can behave like a wave and created an interference pattern. I thought: what if I could simulate that using an actual quantum circuit?

What I Built

A fully interactive quantum simulator built with Qiskit that models the double-slit experiment through real quantum gates. The circuit uses superposition and phase kickback to generate genuine quantum interference, with live visualizations including:

  • An interactive interference pattern with a detector toggle demonstrating the observer effect
  • A 3D surface plot showing how the pattern shifts across wavelengths
  • A particle-by-particle animation showing the pattern emerge from randomness

The phase shift applied at each screen position follows the real physics formula:

$$\delta(x) = \frac{2\pi}{\lambda} \cdot \frac{d \cdot x}{L}$$

How I Built It

  • Qiskit + AerSimulator for the quantum circuit and simulation
  • Matplotlib + Plotly for 2D and 3D visualizations
  • ipywidgets for the interactive Colab dashboard
  • Packaged as a single Google Colab notebook — no setup required

Challenges

As a first-time Qiskit user, understanding how phase kickback converts phase differences into measurable probabilities was the hardest part. Parsing Qiskit's bitstring output format also took debugging. But seeing the interference pattern appear for the first time made it all worth it.

What I Learned

Quantum gates aren't just abstract math, but they can encode real physical phenomena. Superposition, phase, and measurement are the same concepts in both physics class and quantum computing. This project made both fit together.

Built With

Share this project:

Updates