Computing eigenvalues for quantum maps
This page contains additional material to the
Numerical aspects of eigenvalue and eigenfunction
computations for chaotic quantum systems
To use the following examples you will need
for further details.
Quantum map programm
We will use a perturbed cat map as an example.
For the following you will need to download
The core of these two modules is shown on
As a first test do (for N=101 and kappa=0.3)
python pert_cat.py 101 0.3
It will output the (complex) eigenvalues as a sequence
of (x,y) pairs.
(If there is an error, see installation
As a test, whether these all lie on the unit circle
the fourth column is the absolute value of the eigenvectors.
To generate a plot of the resulting data you could first use
python pert_cat.py 101 0.3 > pcat_101_0.3.dat
which redirects the output of the programm to the file
To plot the resulting file use your favourite plotting programm,
e.g. in gnuplot
plot "pcat_101_0.3.dat" using 1:2 with points
Level spacing distribution
Now we would like to compute the level spacing distribution.
To do this let us use an interactive Python session
in which we do (usually copying-and-pasting the full code
will lead to problems, so either copy line-by-line,
or download compute_spacings.py
and do python compute_spacings.py
from AnalyseData import histogram,store_histogram
from math import pi
# sort and unfold phases
# determine Level spacing
# (by computing the difference of the shifted eigenphases)
Then use your favourite plotting programm to plot the spacing
histogram. For gnuplot you could do
plot "histogram.dat" w l,goe_approx(x),gue_approx(x),exp(-x)
Some pointers on Python
Requirement for the above example is
is really easy!)
For interactive work I highly recommend to use
For example you can then easily use the above gnuplot commands
within an ipython session!
Introductions, overviews, programming tutorials, ...
and much more can be found in the
on the Python Homepage
Finally, you might give Scipy a try (which is under heavy
development at the moment and will be a
good replacement of Matlab or similar tools):
If you have any comments/suggestions/questions
etc. don't hesitate to contact me.
First I would like to thank Fernando Perez for several useful
suggestions and speed improvements on the original version of the code.
Comments by Silke Fürstberger,
Rainer Glaser and Grischa Haag improved the
usability of these pages.
Last modified: 27 October 2004, 16:21:50
Impressum, © Arnd Bäcker