We wish to find the matrix form of the Hamiltonian for a 1D harmonic oscillator.
The basis states are the harmonic oscillator energy eigenstates. We know the eigenvalues of .