Stackademic

Stackademic is a learning hub for programmers, devs, coders, and engineers. Our goal is to democratize free coding education for the world.

Follow publication

Quantum Mechanics: Particle in a 2D Infinite Square Well

Rhett Allain
Stackademic
Published in
9 min readNov 14, 2023

--

Python Output: Particle in a 2D Well

Yes, you have seen a particle in a 1D square well. But what about a particle in a 2D well? Can we find the wave function that solves Schrodinger’s equation for that case? Yes we can.

I’ll be honest, if you understand the 1D well then this is fairly straightforward. However, what’s different is the plotting. In order to plot this function, we going to have to use some new tools in python. OK, before I get started I’m going to assume that you already know about the 1D well. If not, I have you covered — check this out.

Schrödinger’s Equation in 2D (and 3D).

We need to write a different version of Schrödinger’s equation. It looks like this:

Instead of the second derivative with respect to x, we have the Laplacian. Here is the Laplacian in Cartesian coordinates.

Before we get into the space derivatives, let’s do the same thing we did with the 1D well. The first step is to assume that the wave function (Ψ) can be written as a product of a space function (ψ) and a time function (f).

When we plug this into the Schrödinger equation, it’s possible to separate the space (ψ) and time (f) into two separate differential equations. The time equation is quite simple to solve. This is exactly the same thing that happens with the 1D infinite square well.

Now we just have to solve that differential equation for the space function.

2D Infinite Square Well

Imagine that we have a particle of mass m that is constrained to move in the x-y plane. There are infinite potential barriers at x = 0 and x = a (some constant). Also, a barrier at y = 0 and y = b (where a does not have to be the same as b).

Inside this 2D box, the potential V is equal to zero. However, since I want a general solution — let’s say that we can break the potential into a part that only depends on x and a part that only depends on y.

--

--

Published in Stackademic

Stackademic is a learning hub for programmers, devs, coders, and engineers. Our goal is to democratize free coding education for the world.

Written by Rhett Allain

Physics faculty, science blogger of all things geek. Technical Consultant for CBS MacGyver and MythBusters. WIRED blogger.

No responses yet

Write a response