Quantum Oscillator

Every Friday evening the graduate students at SFU have a problem solving session where we try to solve a problem as a group that one of the faculty proposed. This week we were asked to numerically compute the solution to the quantum oscillator. The solution to the problem is really neat and it is something that you don’t usually get to see. Most physics programs don’t bother to show you how the quantum oscillator moves.

For those of you that care, we were solving the following equation:

 i \epsilon u_t + \epsilon^2 u_{xx} = (x^2) u

with periodic boundary conditions, and an off-centered Gaussian as the initial conditions. We ended up using a spectral method to solve the problem using python. You can check out the code here.