Simulating Schrödinger Equation in 1 Dimension


The time dependent schrodingers equation is:

ψ(x,t)t=iH^ψ(x,t)

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. H^ is now a finite matrix.

ψ(x,t)t=iH^ψ(x,t)

Assuming the Hamiltonian isn't time dependent, the differential equation has the solution.

ψ(x,t+Δt)=eiH^Δtψ(x,t)

We define the Hamiltonian operator to be a non-relativistic particle with some potential.

H^=22m2x2+V(x)
.

Since we approximated ψ as a finite dimensional vector, we should approximate the second derivative using the finite difference method.

limh0df(x+h)dxdf(x)dxh
=limh0f(x+h)f(x)hf(x)f(xh)hh
=limh0(f(x+h)f(x))(f(x)f(xh))h2
=limh0f(x+h)2f(x)+f(xh)h2
f(x+Δx)2f(x)+f(xΔx)Δx2

So for each position of 22m2x2 we can make a matrix below. We assume no repeating boundary conditions. The matrix is equivelent to the Laplacian of a path graph.

22m1Δx2[1112112111]

The potential term V(x) is simply the value at each point:

[V(0)V(Δx)V((n1)Δx)V(nΔx)]

H^ is the sum of those two matricies

H^=22m1Δx2[1112112111]+[V(0)V(Δx)V((n1)Δx)V(nΔx)]

Each discrete step of the simulation will go through a certain change in time using the matrix exponent of the Hamiltonian operator.

ψt+1=eiH^Δtψt