# 2D Quantum Mechanics: Using Python to Solve Non-Trivial Potentials

I’m not really an expert with quantum mechanics calculations — but I need to do some stuff for the class I’m teaching. If I don’t write out my methods, I will forget the next time I teach this course. So, maybe you will find this useful — but future me will certainly like this.

Here’s the situation. Imagine I have a particle on a 2D surface with some type of potential energy function. How can we find the energy eigenvalues and the wave function for something like this? I’m going to show you some python magic — it’s magic because I only partly understand it.

Yes, there are some prerequisites for this method. First, you need to understand how to find analytical solutions for 2D wave functions. We can do this for some situations — like an infinite 2D square well.

You should also be familiar with a numerical method to solve for 1D wave functions. The idea is to break the space into finite elements and then write the Schrödinger equation as a series of linear equations. That can then be represented a system of linear…