The time dependent schrodingers equation is:
A naive implementation using Eulers method as simple as possible with Euler's method will usually cause the waveform to explode due to integration errors.
From quantization is an infinite dimensional vector, but we will approximate it as a finite dimensional vector. is now a finite matrix.
Assuming the Hamiltonian isn't time dependent, the differential equation has the solution.
We define the Hamiltonian operator to be a non-relativistic particle with some potential.
.Since we approximated as a finite dimensional vector, we should approximate the second derivative using the finite difference method.
So for each position of we can make a matrix below. We assume no repeating boundary conditions. The matrix is equivelent to the Laplacian of a path graph.
The potential term is simply the value at each point:
is the sum of those two matricies
Each discrete step of the simulation will go through a certain change in time using the matrix exponent of the Hamiltonian operator.