Quantum
Quest

Algorithms, Math, and Physics

Simulating the electron double-slit experiment

In this article, I explore the fundamental principles of quantum mechanics through the simulation of the electron double-slit experiment. This experiment is important in understanding the wave-particle duality of electrons.

Introduction

The double-slit experiment, first performed with light by Thomas Young, is equally illuminating when applied to electrons. By passing electrons through two slits and observing the resulting pattern on a screen, we see evidence of both particle and wave properties. This duality is one of the most fascinating aspects of quantum mechanics.

Theory and simulation

The wavefunction of an electron in a double-slit experiment is modeled by the 2D Schrödinger equation. My simulation uses this equation to propagate a wavepacket, representing the electron, through a configuration of slits to study the interference pattern. The wavepacket is defined as:

\Psi(x,t) = \int_{-\infty}^{\infty} A(k) e^{i(kx - \omega t)} , \mathrm{dk}

Here, A(k) is the amplitude function of the wavenumber k, and \omega(k) = \frac{\hbar k^2}{2m} describes the dispersion relation of a free particle. By choosing a Gaussian distribution for A(k), we localize the electron in space, leading to a clearer interpretation of its trajectory and interference pattern.

Implementing the simulation

For the numerical solution, I implemented the following potential function within the Schrödinger equation to simulate the double slit:


def V(self, x, y):
    V_real = np.zeros_like(x)
    if p.middle_barrier and not p.slits:
        V_real += (np.abs(x - p.barrier_center) < p.barrier_width) * p.barrier_height
    if p.middle_barrier and p.slits:
        for start, end in zip(p.barriers_start, p.barriers_end):
            V_real += ((np.abs(x - p.barrier_center) < p.barrier_width) &
                       (y >= min(start, end)) &
                       (y <= max(start, end))) * p.barrier_height

The grid settings for the simulation are finely tuned to ensure that the wavepacket is accurately represented both spatially and temporally:


p2 = SimpleNamespace(
    Nx_hr=500,                # number of grid points in x direction
    Ny_hr=500,                # number of grid points in y direction
    dt_hr=0.001,              # time step for the simulation
)

Observing the interference pattern

After the wavepacket passes through the slit setup, the simulation tracks its probability density on a screen positioned downstream. The accumulation of this density over many simulated electrons reveals the classic interference pattern, showcasing areas of constructive and destructive interference typical of wave behavior.

Conclusion

The simulation of the electron double-slit experiment vividly demonstrates quantum mechanical principles and provides a compelling visual of electron wave-particle duality. By manipulating the wavepacket and barrier parameters, I can examine various quantum phenomena, enhancing our understanding of the microscopic world.

For more insights into this topic, you can find the details here. If you’re interested in experimenting with the code and running your own simulations, you can access the full source on GitHub here.