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

The time-dependent Schrödinger equation in one dimension

(1) |

(2) |

(3) |

(4) |

(5) |

or by a backward difference

(7) |

(8) |

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

(10) |

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]