
Reference: S. E. Koonin, Computational Physics, Addison-Wesley Publishing Company Inc, (1986).
The program n1.txt is a simple program written in QuickBasic. It demonstrates a method for solving the time-dependent Schroedinger equation in one dimension. The evolution of the wave packet is represented graphically. The wave packet is observed to spread with time. You are encouraged to modify the program, add a user interface or translate it to another programming language.![]()
We want to solve the Schroedinger equation
,
or
.
The particle is confined to the region 0 £ x £ L so we need
.
Let xi denote points on a grid in space and tn denote points on a grid in time.
Define yin=y(xi,tn). To solve the Schroedinger equation numerically, we convert it into a difference equation.
,
,
.
Here we have used
(1+A)-1(1-A)=(1+A)-1-(1+A)-1A+(1+A)-1-(1+A)-1=2(1+A)-1-(1+A)-1(1+A)=2(1+A)-1-1.
Let us now look at a Taylor series expansion.
.
This yields
.
We can therefore approximate the second derivative of the wave function with respect to x in the following way:
.
This yields the following expression for the Hamiltonian:
.
If we choose to represent y by a column matrix of its values yi at the grid points, then H will be represented by a tridiagonal matrix. To illustrate, let f =Hy . Then
f i=Hi,i-1y i-1+Hi,iy i+Hi,i+1y i+1.
,
.
To solve for the time evolution of a wave packet, we need to know the shape of the wave packet at t=0. Assume yi0 is given with y00=yN0=0. How do we calculate the shape of the wave packet at a later time?
Let us define the function cin at the grid points through
.
Then
.
.
We can write out this equation explicitly using
.
.
.
This equation is of the form
with Ai- = Ai+ = 1.
Comparing expressions (1.) and (3.) we find
.
We can now determine gin and bin at each grid point.
The boundary conditions are yNn=yNn+1=0.
Therefore
.
can be satisfied by setting anN-1=gnN=0.
Then bnN-1=0.
We can now calculate gnN-1, gnN-3, gnN-3,
recursively using
.
.
Once we have calculated gin
each grid point we calculate the bin
recursively using
.
Re(bi-1n)=Re(gin)Re(bin-bin)-Im(gin)Im(bin- bin)
Im(bi-1n)=Re(gin)Im(bin-bin)+Im(gin)Re(bin- bin)
Now that we have calculated all the bin and gin we can calculate the wave function at a later time.
Starting with y0n=c0n=0 we calculate c1n, y1n+1, c2n, y2n+1, , recursively.
cni+1=gni+1cin+bin , yin+1=cin-yin.
Re(cni+1)=Re(gni+1)Re(cin)-Im(gni+1)Im(cin)+Re(bin)
Im(cni+1)=Re(gni+1)Im(cin)+Im(gni+1n)Re(cin) )+Im(bin)
Let the particle be an electron
. Let us measure all distances in units of 10-10m and all times in units of 10-16s. Let Vi=0 for all i.Then Ai0=-2+i3.457(Dx)2/Dt, bin=i2Im(Ai0)yin.