1-Dimensional Quantum Mechanics
for Matlab 5.x, 6.x and 7.x
Author: Renato Nobili

(wave packets,  eigenstates, eigenvalues, impulsive and adiabatic dynamics etc.)

  Back to Homepage

Introduction 

The wave-amplitude propagation of a 1-dimensional quantum mechanical particle under the action of a given
potential can be visualized by solving numerically the Schrödinger equation

schroe1.gif

To accomplish this, the following units and  physical constants are suitable:

Then, the above equation can be put in the form:

schroe2.gif

with c1&2.gif .

As in practical computations the time interval is small but not infinitesimal, the integration of this equation must be performed  by the iteration of a discrete time translation

unitary.gif .

The infinitesimal-time translation  , where (H = Hamiltonian/hbar.gif ),  is certainly unitary, but unfortunately its discrete-time generalization   is not. Consequently, the conservation of  total probability 1 would be lost after a few iterations. To assure that the discrete-time approximation is unitary, the elementary time translation can be put in the Cayley's form

cayley.gif ,

When H  is replaced by its finite-difference approximation, the equation takes the form of a tridiagonal matrix equation that can then be solved by the Crank-Nicholson method (see Numerical Recipes in C - The Art of Scientific Computating, W.Press, B.Flannery, S.A. Teukowsky and W.Vetterling - Cambridge University Press, 2002).  Because of the well-known problems with integer indexing of  cycles FOR ..., END,  unitary discrete-time transformations cannot be implemented by fast Matlab routines. The Author solved this problem by compiling  two axiliary MEX files SCHROEQ.DLL,  SCHRSTP.DLL. These files are called by other Matlab routines to produce time-domain solutions of 1-D Schrödinger equations. Their usage is described in SCHROEQ.M,  SCHRSTP.M.


1. Matlab routines for generating quantum wave packets:
Download WPACKET.ZIP (Matlab routines) [first implementation March 2001, last revision: November 2010]
The time evolution of  a  Gaussian wave-packet in various conditions was implemented in a small package of routines for Matlab (versions 5.x, 6.x, 7.x). The package, called WPACKET.ZIP (39370 bytes),  includes the following routines:

 
    To run the programme WPACKET.M

Unzip the package in a new directory and set Matlab to that directory. From the Matlab command line enter wpacket.The the Matlab figure dialog (GUI interface) will be displayed immediately.

Note the black Gaussian profile lying on the plot zero line. This is the squared modulus of a Gaussian wave packet, namely the probability density of the particle at the initial time. The real and imaginary parts of the wave function are displayed in magenta and cyan color respectively. The initial velocity of the wave packet (from left to right) is determined by the mean wave number k. The mean energy <E> of the wave packet changes accordingly. Its value in electron-volt, represented by the red line on the plot, is shown in the small rectangular box at the dialog left, together with the mean value of the kinetic energy and the mean wave length <l>. This value, initially set to zero, can be changed acting on the edit-slider control appearing on the left-bottom of the GUI interface.  In a similar way, also the Gaussian semi-width <Dx> of the wave-packet can be changed.

These parameters can be modified only when the wave packet is at its initial position, namely before pushing button Run or after pushing button Restart.

After pushing button Run, the wave packet moves along a segment of 40 Å width and undergoes reflection at the segment ends. Different potential profiles can be chosen on the pop-menu entitled Potential type at the left-top of the dialog. The potential is initially set to zero.



2. Matlab routines for studing quantum mechanical potential wells:
Download POTWELLS.ZIP (Matlab routines) [last revision: November 2010].
Eigenfunctions and eigenvalues  of an electron  in various potential wells can be easily computed and visualised.
The routine shows the time evolution of the eigenfunctions  under various potential changes  (fast change, moderate
change, slow change, oscillatory regime) . The package, called POTWELLS.ZIP (74256 bytes),  includes the
following routines:


        To run the programme POTWELLS.M

Unzip the package in a directory and set Matlab 5.x to that directory. From the Matlab command line enter potwells. The GUI interface will be displayed immediately showing the eigen-function of the fundamental level for the displayed potential well.  The probability density of the particle at
the initial time is represented by the black profile, the real and imaginary parts of the wave function are represented by magenta and cyan color profiles respectively.

Initially, the potential well is an infinite rectangular box whose X-axis width (in Angstrom) can be changed acting on the edit-slider control at the GUI interface bottom. Other potential profiles can be selected from the pop-menu Potential type.

The program takes a while to compute the eigen-functions and eigen-values of the selected potential well.  The control up/down on the GUI interface left-bottom can be used to visualize the eigen-function corresponding the indicated energy level.

The dynamical section contains controls for observing the time course of the initial state when the potential profile start varying in time (sudden or slow changes, oscillations etc.). The small window under the dynamic sections shows the energy spectrum of the wave function after the time evolution.


         Back to Homepage