Computing eigenvalues for quantum maps
This page contains additional material to the
paper
Numerical aspects of eigenvalue and eigenfunction
computations for chaotic quantum systems.
To use the following examples you will need
Python and
Numeric,
see
below 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
this page.
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
pcat_101_0.3.dat.
To plot the resulting file use your favourite plotting programm,
e.g. in
gnuplot just do
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
import Numeric
from math import pi
import pert_cat
N=53
#N=501
kappa=0.3
(evals,phases)=pert_cat.compute_evals_pcat(N,kappa);
# sort and unfold phases
s_phases=Numeric.sort(phases)*N/(2.0*pi)
# determine Level spacing
# (by computing the difference of the shifted eigenphases)
spacings=s_phases[1:]-s_phases[0:N]
(x_histogram,y_histogram)=histogram(spacings,0.0,10.0,100)
store_histogram(x_histogram,y_histogram,"histogram.dat")
|
Then use your favourite plotting programm to plot the spacing
histogram. For gnuplot you could do
goe_approx(x)=pi/2.0*x*exp(-pi/4*x*x)
gue_approx(x)=32/pi/pi*x*x*exp(-4/pi*x*x)
plot "histogram.dat" w l,goe_approx(x),gue_approx(x),exp(-x)
Some pointers on Python
Requirement for the above example is
(
installation 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
Documentation section
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):
Concluding remark
If you have any comments/suggestions/questions
etc. don't hesitate to contact me.
Acknowledgements
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