Physics 6730 Crank-Nicholson-Crout Algorithm for the Time-Dependent Schrödinger Equation

The time-dependent Schrödinger equation in one dimension

 (1)

is a parabolic partial differential equation. We usually seek a solution on an interval and . The solution is uniquely determined from boundary conditions:
 (2)

One method for numerical solution solves for the values of the wavefunction on a regular grid of dimension in and in :
 (3)

The derivatives are replaced by simple finite differences. The right side of the equation at the grid point is then
 (4)

where is a real symmetric tridiagonal matrix (provided is real). The left side of the equation can be replaced either by a forward difference
 (5)

which, when combined with the rhs gives the explicit algorithm
 (6)

or by a backward difference
 (7)

 (8)

or (with the replacement ), the implicit algorithm,
 (9)

The Crank Nicholson Algorithm averages Eqs (6) and (9):
 (10)

This method is a second order algorithm in , i.e. the discretization error decreases as . The finite difference representation of the second derivative is also good to second order in . The Crank-Nicholson Algorithm also gives a unitary evolution in time. That is especially useful for quantum mechanics where unitarity assures that the normalization of the wavefunction is unchanged over time.

The algorithm steps the solution forward in time by one time unit, starting from the initial wave function at . According to the Crank-Nicholson scheme, the time stepping process is half explicit and half implicit. The implicit part involves solving a tridiagonal system. That solution is accomplished by Crout reduction, a direct method related to Gaussian elimination and LU decomposition.

To simplify the algorithm we have chosen units in which the Planck constant , time step and the spatial separation . This can always be arranged by an appropriate redefinition of mass and potential:

 (11)

We now present the algorithm in pseudocode. Note, the algorithm defines psi[0] and psi[nx] to be zero to make the coding more economical at the expense of a tiny bit of extra calculation at the ends.


Let nx = the number of data points + 1
Let psi[x] be the complex wave function for x = 0,...,nx
with psi[0] = psi[nx] = 0.
Let m be the mass
Let V(x) be the potential

Step 1 	INPUT psi[x] = input data for x = 1,...,nx-1
Set psi[0] = psi[nx] = 0
Set lambda = i/(2*m)
Set u[0] = 0

Step 2 	(Initialization of C-N tridiagonal matrix)
For x = 1 to nx-1
Set l[x] = 1 + lambda + iV(x)/2 + lambda/2 * u[x-1]
Set u[x] = -lambda/(2*l[x])

Step 3	(Iteration of C-N algorithm for nt time steps)
For t from 1 to nt
Set z[0] = 0
(Solution of tridiagonal system by Crout reduction)
For x from 1 to nx-1
Set z[x] = ((1-lambda) psi[x] - iV(x)/2 * psi[x] +
lambda/2 * (psi[x+1] + psi[x-1] + z[x-1]))/l[x]
(Back substitution)
For x from nx-1 to 1
Set psi[x] = z[x] - u[x]*psi[x+1]

Step 4	OUTPUT psi[1] through psi[nx-1]