Test 1: Harmonic Oscillator
As a first test of our numerical procedure, we calculate eigenstates of a quantum harmonic oscillator that are known analytically. We consider the harmonic oscillator representing a particle with a mass of :
$$ m = 1.0 $$
moving in a quadratic potential with the shape :
$$ V(x) = \frac{1}{2}m\omega^2x^2 $$
For testing purposes we set the frequency to:
$$ \omega = 1.0 $$.
The eigenenergies and the wavefunctions of the harmonic oscillator are well known analytically:
$$ {\displaystyle E_{n}=\hbar \omega {\bigl (}n+{\tfrac {1}{2}}{\bigr )}=(2n+1){\hbar \over 2}\omega ~.} $$
$${ \psi_{n}(x)={\frac {1}{\sqrt {2^{n} n!}}}\left({\frac {m\omega }{\pi \hbar }}\right)^{1/4}e^{-{\frac {m\omega x^{2}}{2\hbar }}}H_{n}\left({\sqrt {\frac {m\omega }{\hbar }}}x\right),\qquad n=0,1,2,\ldots .}$$
where \( H_{n} \) represents the Hermite polynomials:
$${ H_{n}(z)=(-1)^{n}~e^{z^{2}}{\frac {d^{n}}{dz^{n}}}\left(e^{-z^{2}}\right).}$$