Kernel: Python 3 (system-wide)
Approximations worksheet, Part 5
Solving the Hamiltonian
using the truncated basis approximation, using the harmonic oscillator energy basis.
The size of the basis is set by changing the variable nmax
below.
The value of is set by changing the variable alpha
below.
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
Below, the lowering operator is defined in matrix form. The code is a shortcut to generate the matrix elements
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
Notice that the errors get larger with larger n, particularly for n > nmax/2
We'll define the error in the states by
In [0]:
In [0]:
Part 6, Numerical solution to the 1-dimensional Time Independent Schroedinger Equation
Based on the paper "Matrix Numerov method for solving Schroedinger's equation" by Mohandas Pillai, Joshua Goglio, and Thad G. Walker, American Journal of Physics 80 (11), 1017 (2012). doi:10.1119/1.4748813
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]: