Escolar Documentos
Profissional Documentos
Cultura Documentos
J
2
[a, b) =
2
a[a, b) (2.4)
J
z
[a, b) = b[a, b) . (2.5)
Noting that
J
2
=
J
2
x
+
J
2
y
+
J
2
z
(2.6)
then consider two operators
J
+
and
J
=
J
x
i
J
y
. (2.7)
Using these known properties, further commutation relations involving the raising
and lowering operators can be derived. It can be shown that
12;17
_
J
2
,
J
_
= 0 (2.8)
_
J
+
,
J
_
= 2
J
z
(2.9)
_
J
z
,
J
_
=
J
. (2.10)
To demonstrate that
J
J
z
(
J
[a, b)) = (
J
J
z
)[a, b) (2.11)
= (b 1)(
J
[a, b) is an eigenstate of
J
z
with eigenvalue (b 1), implying that
J
commutes with
J
2
, which
2.1. EIGENSPECTRUM OF A FREE ROTOR Hang 21
yields
J
2
J
[a, b) =
J
J
2
[a, b) (2.13)
=
2
a
J
[a, b) , (2.14)
which implies that the raising and lowering operators do not eect the a quantum
number. Thus, the raising and lowering operators aect only the quantum number b.
It can be demonstrated that there must exist b
min
and b
max
such that a raising op-
erator operating on [a, b
max
) will yield 0 and similarly a lowering operator operating
on [a, b
min
) will yield 0. This is shown by the fact that
J
2
J
2
z
0. Therefore,
a, b[
J
2
J
2
z
[a, b) =
2
(ab
2
) (2.15)
0 , (2.16)
which implies that a b
2
, or that b is bounded by a such that a maximum and mini-
mum value exists. Observe that
J
+
J
=
J
2
J
2
z
+
J
z
(2.17)
J
+
=
J
2
J
2
z
J
z
(2.18)
by using the denition of the raising and lower operators. Assuming that
J
+
[a, b
max
) =
0, then
J
J
+
[a, b
max
) = 0. Therefore, by Eq. 2.17,
_
J
2
J
2
z
+
J
z
_
[a, b
max
) = (ab
2
max
b
max
)[a, b
max
) (2.19)
which implies that a = b
max
(b
max
+1). Similarly, the assumption
J
[a, b
min
) = 0 and
Eq. 2.18 together yield the result that a = b
min
(b
min
1). By comparison, it can be
shown that b
max
= b
min
. By convention b
max
is denoted j , and instead of using
quantum number a to denote eigenstates, one uses j and note that a and j are related
by a = j ( j +1). Further, by convention, instead of denoting the eigenvalues of
J
z
b,
they are denoted m. Rewriting existing relations using j and m instead of a and b,
2.1. EIGENSPECTRUM OF A FREE ROTOR Hang 22
then
J
2
[ j , m) =
2
j ( j +1)[ j , m) (2.20)
J
z
[ j , m) = m[ j , m) . (2.21)
The eigenstates of
J
2
are indexed by j and are given as a multiple of j ( j +1) and have
degeneracy of 2 j +1 to account for the possible range of m values.
The time independent Schr odinger equation for a free rotor, as claimed before,
has the form
1
2I
L
2
(, ) = E(, ) . (2.22)
Notice that
L is orbital angular momentum, and the results derived above for general
angular momentum apply. Thus, Eq. 2.22 has energy eigenvalues E =
2
2I
l (l +1) as
illustrated above, and has degeneracy of 2l +1. The constant
2
2I
is commonly denoted
B, known as the rotational constant.
In the position representation of the spherical coordinate basis, Eq. 2.22 becomes
12;17
2
2I
_
1
sin
+
1
sin
2
_
(, ) = E(, ) . (2.23)
The solutions to Eq. 2.23 can be obtained analytically, and are known as the spherical
harmonics given below
12;17
Y
l m
(, ) = (1)
m
_
2l +1
4
_
(l m)!
(l +m)!
P
m
l
(cos)e
im
(m 0) (2.24)
Y
l m
= (1)
m
_
Y
l ,m
(m < 0) (2.25)
where P
m
l
are the Legendre polynomials.
The results above outline some important features of the quantum free rotor sys-
tem. First, the eigenfunctions are delocalized; in the sense that the wave function
has a nonzero amplitude over a large portion of angle space (rather than having a
2.1. EIGENSPECTRUM OF A FREE ROTOR Hang 23
near zero amplitude over a large portion of angle space). Second, the eigenfunctions,
except for the ground state l = 0, m = 0, are not a at uniform distribution either.
Rather, the probability distributions from the degenerate eigenfunctions for a partic-
ular l value sum to a uniform spherical distribution to achieve isotropy. (Indeed, it
makes sense that if one only knows the total angular momentum without making an
angular momentummeasurement along a particular axis, the distribution is isotropic.)
Finally, the eigenfunctions are quantized because of periodic boundary conditions,
which dierentiates rotational systems and translational systems; while a free par-
ticle has continuous position and momentum eigenvalues and has discrete solutions
only when bounded in a potential,
12
a free rotor can only have quantized solutions
even in the absence of any potential.
2.2. HINDERED ROTOR Hang 24
2.2 Hindered Rotor
In contrast to the free rotor system where a quantum rotor is not in a potential, the
hindered rotor system contains an anisotropic potential. As opposed to a free ro-
tor system, the eigenstates in a hindered rotor system may have dierent localization
properties. This thesis examines three potentials in detail: rst, a potential that is at-
tractive at two poles but repulsive at the equator; second, a potential that is repulsive
at the poles but attractive at the equator; and third, a potential that is repulsive at the
poles and has barriers in the plane of the equator.
The rst kind of potential has been investigated by Curl, et. al.,
15
where a poten-
tial of the form
V =
V
0
2
(1cos
2
) , (2.26)
as shown in Fig. 2-1, was used.
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
Potential of Curl, et. al. (V
0
= 10)
Potential
4
3
2
1
0
0.785398
1.5708
2.35619
3.14159
0
0.785398
1.5708
2.35619
3.14159
3.92699
4.71239
5.49779
6.28319
0.0000
0.5000
1.0000
1.5000
2.0000
2.5000
3.0000
3.5000
4.0000
4.5000
5.0000
potential (B)
Figure 2-1: Potential investigated by Curl, et. al. as shown in Eq. 2.26 with V
0
= 10.
When the potential is such that a quantum rotor cannot rotate in the plane that
2.2. HINDERED ROTOR Hang 25
contains the rotor, the rotor is called a librator. In librational motion in classical
mechanics, the two ends of the rotor rotate in two separate planes as shown in Fig. 2-
2. Observe that the two ends of the rotor cannot exchange places without tunnelling
through a barrier. An example of quantum tunnelling in one dimension and a more
detailed treatment can be found in Section 2.3. Here, it is important to note that in
the case of high barriers, the low energy eigenfunctions will be highly localized in the
regions of low potential and high energy states will be less localized.
Figure 2-2: An example of a librator in classical mechanics. Illustration from Thornton and
Marion.
18
The second type of potential of interest, where the potential is repulsive at the
poles and attractive at the equator, has been investigated by MacRury and Sams,
19
where a potential of the form
V =V
0
cos
2
(2.27)
is used, as shown in Fig. 2-3.
While there is a hindering potential, the rotor can rotate in the plane containing
the rotor itself. In this thesis, nonlibrational rotors will be referred to as rotors unless
specic clarication is necessary. In these kind of potentials, because the rotor can
rotate in the plane that contains itself, the two ends can exchange position without
2.2. HINDERED ROTOR Hang 26
0
1
2
3
4
5
6
7
8
9
10
Potential of MacRury and Sams ( =10)
Potential
10
8
6
4
2
0
0.785398
1.5708
2.35619
3.14159
0
0.785398
1.5708
2.35619
3.14159
3.92699
4.71239
5.49779
6.28319
0.0000
1.0000
2.0000
3.0000
4.0000
5.0000
6.0000
7.0000
8.0000
9.0000
10.0000
potential (B)
Figure 2-3: Potential investigated by MacRury and Sams in Eq. 2.27 with V
0
= is in units
of rotational constant B.
tunnelling. The implications of this will be addressed in detail in Section 2.4.
The third case, where the potential is repulsive at the poles with barriers in the
plane of the barrier, has been addressed by MacRury and Sams also,
19
where a poten-
tial
V =V
0
cos
2
+V
1
(1cos
2
2) (2.28)
is used as shown in Fig. 2-4.
Observe that this potential has two-fold symmetry in , which is the minimum
symmetry necessary for the investigation of a homonuclear diatomic molecule such as
hydrogen. Note that in this case there is both an out-of-plane and in-plane hindrance
that prevents the rotor from rotating freely. Similar to the case of the Curl potential,
when the barrier is high, the low energy eigenfunctions are highly localized at regions
where the potential is lower. Note further that these highly localized eigenfunctions
are almost vanishing at regions of high potential. This last observation has a profound
2.2. HINDERED ROTOR Hang 27
0
5
10
15
20
25
30
Potential of MacRury and Sams (=10, =16)
Potential
25
20
15
10
5
0
0.785398
1.5708
2.35619
3.14159
0
0.785398
1.5708
2.35619
3.14159
3.92699
4.71239
5.49779
6.28319
0.0000
5.0000
10.0000
15.0000
20.0000
25.0000
30.0000
potential (B)
Figure 2-4: Potential investigated by MacRury and Sams in Eq. 2.28 where V
0
= andV
1
=
are both in units of rotational constant B.
eect on the energy dierence between highly localized states, which is addressed in
the following sections.
2.3. TUNNEL SPLITTING Hang 28
2.3 Tunnel Splitting
Recall from discussions that that in certain cases when quantum tunnelling occurs
across high potential barriers, eigenfunctions are highly localized at regions of poten-
tial, and that the eigenfunction is almost vanishing at these high potential barriers.
Under certain circumstances, such systems can exhibit a phenomenon where two
eigenstates have energy close to one another and their wavefunctions appear simi-
lar but dier in terms of sign across the barrier. This phenomenon is called tunnel
splitting.
To illustrate the phenomenon of tunnel splitting, consider an innite square well
with a Dirac-delta barrier in the middle
20
, as given by the potential
V(x) =
_
_
x a ,
V
0
(x) a < x < a ,
a x ,
(2.29)
where V
0
and a are positive real numbers. Let
I
(x) denote the wave function in the
region a < x < 0 and let
II
(x) denote the wave function in the region 0 < x < a.
The solution to the Schr odinger equation is given in the form
I
(x) = Acos(kx) +Bsin(kx) (2.30)
II
(x) =Ccos(kx) +Dsin(kx) , (2.31)
where k
2
=
2mE
2
.
The boundary conditions are given by
I
(0) =
II
(0) (2.32)
II
x
x=0
I
x
x=0
=
2mV
0
2
I
(0) =
2mV
0
2
II
(0) (2.33)
I
(a) = 0 (2.34)
II
(a) = 0 . (2.35)
2.3. TUNNEL SPLITTING Hang 29
Solving for the boundary conditions then,
A =C (2.36)
(DB)k =
2mV
0
2
A (2.37)
Acos(ka) Bsin(ka) = 0 (2.38)
Ccos(ka) +Dsin(ka) = 0 . (2.39)
Subtracting Eq. 2.38 from Eq. 2.39 yields
(D +B)sin(ka) = 0 , (2.40)
which suggests that either sin(ka) = 0 or D +B = 0.
In the case that sin(ka) = 0, then cos(ka) ,= 0, and by Eq. 2.38 A = 0. Further, by
invoking Eq. 2.37, then B = D and the eigenfunctions are simply sine functions with
angular frequency k. The energy eigenvalues are
E
n
=
2
2m
(n)
2
a
2
, (2.41)
where n = 1, 2, 3, . . ..
In the other case that D+B =0, then D =B. Using Eq. 2.38, then A=Btan(ka).
Substituting for A in Eq. 2.37 yields that
k =
mV
0
2
tan(ka) . (2.42)
Eq. 2.42 is a transcendental equation and cannot be solved analytically. However, it
can be solved graphically by considering dimensionless quantities. Dene z =ka, then
substitution results in
2
amV
0
z = tanz . (2.43)
2.3. TUNNEL SPLITTING Hang 30
For simplicity, dene V
0
=
2mV
0
2
and E =
2mE
2
. Thus, Eq. 2.43 becomes
2
aV
0
z = tanz . (2.44)
While Eq. 2.44 has no analytical solution, it can be solved numerically or graphically
as shown in Fig. 2-5.
12;17
-6.283
-4.712
-3.142
-1.571
0.000
0 1.5708 3.14159 4.71239 6.28319 7.85398 9.42478 10.9956
z
Solution to Potential Well with Dirac-Delta Barrier
tan z
z/100
z/10
z/2
z
Figure 2-5: Graphs of tanz and
2
aV
0
z, the two sides of Eq. 2.44, are plotted for various values
of
2
aV
0
.
From the graphical solutions in Fig. 2-5, it is clear that as aV
0
approaches innity,
the spectrum of z approaches , 2, 3, . . .. Observe that the odd solutions (the sine
functions) in units of
2
2m
have an energy spectrum of
(n)
2
a
2
as given in Eq. 2.41, while
the even solutions (cosine functions with a symmetric dip at x = 0) in units of
2
2m
are
given by E = k
2
=
2
n
a
2
, where
n
are the solutions to Eq. 2.44 shown as the intersec-
tions in Fig. 2-5. As the delta potential becomes stronger, the energy spectrum of the
even and odd solutions become closer and closer and in the extreme case when the
delta potential has innite strength, all the energy states are degenerate. When the
delta barrier strength is great but not innite, there is a small splitting of energy
2.3. TUNNEL SPLITTING Hang 31
eigenvalues because the wave function is identically zero for odd wave functions and
is almost vanishing for even wave functions. If one were to examine the probability
distribution of the particle, the even and odd case look remarkably similar. Therefore,
it makes sense that their energy levels are not very dierent from one another.
2.4. ROTATIONAL TUNNEL SPLITTING Hang 32
2.4 Rotational Tunnel Splitting
The previous example, tunnel splitting in a one dimensional system, the dierent par-
ity of the states plays an important role in the existence of tunnel splitting pairs. In
the three quantum rotor systems concerned in this thesis, parity of states plays an
important role similarly. In order to understand these rotational systems, however,
one must return briey to the Schr odinger equation.
The state of a hydrogen molecule can be characterized by the state of several dif-
ferent systems, such as translational motion of the center of mass, rotation about the
center of mass, etc. Assuming that translational, rotational, and vibrational motion
are all decoupled and that they do not eect the nuclear and electronic states, then
the total Hamiltonian can be written as
21
H
total
=
H
trans
+
H
rot
+
H
vib
+
H
nucl
+
H
elec
, (2.45)
where the total Hamiltonian is simply the sum of the of the translational, rotational,
vibrational, nuclear, and electronic Hamiltonian, each acting on a dierent subspace.
The eigenstates, therefore, can be expressed as a direct product
[
total
) =[
trans
)[
rot
)[
vib
)[
nucl
)[
elec
) (2.46)
Because the hydrogen nuclei are fermions, the overall state function must be antisym-
metric under exchange of the identical particles.
21
This means that if the rotational
wave function changes parity, an odd number of other wave functions need to change
parity also to maintain the antisymmetry of the overall wave function. Experimen-
tally, this is easiest controlled and achieved by changing the parity of the nuclear spin
states, as mentioned in Chapter 1.
Protons, the nuclei of hydrogens, are spin
1
2
particles. The possible total nuclear
2.4. ROTATIONAL TUNNEL SPLITTING Hang 33
spin states for molecular hydrogen, then, are given by quantum mechanics
12;17
[s = 0, m
s
= 0) =
1
2
([+)
1
[)
2
[)
1
[+)
2
) (2.47)
[s = 1, m
s
= 0) =
1
2
([+)
1
[)
2
+[)
1
[+)
2
) (2.48)
[s = 1, m
s
= 1) =[+)
1
[+)
2
(2.49)
[s = 1, m
s
=1) =[)
1
[)
2
. (2.50)
The single s =0 state is the singlet state with odd parity and the three s =1 states are
the triplet states with even parity. Therefore, by controlling the parity of the nuclear
spin state, the allowed rotational transitions can be controlled also.
Because tunnel spitting transitions involve a change in parity as shown in the pre-
vious section and because the overall wave function must maintain the same parity,
direct observation of tunnel splitting transition is only possible when an odd num-
ber of the non-rotational eigenstates change parity also. Inelastic incoherent neutron
scattering, for example, as shown in Section 1.2 allows a change in nuclear spin state
parity and allows one to observe tunnel splitting transitions directly.
11;22
To illustrate that in rotational systems the tunnel splitting pairs are of dierent
parity just as in the one dimensional case, consider the energy levels of the potential
investigated by Curl, et. al. in Eq. 2.26. The energy levels as a function of barrier
height are tabulated by Curl, et. al. and a graph of some of their results is shown
below.
One notable pattern is that states with the same [m[ value pair up to form a tunnel
splitting pair. Each tunnel splitting pair still has parity dierence since states with
odd l pairs up with ones with even l . Also, note that this potential does not separate
out all the degeneracy in m, but rather separates the dierent [m[, which is sensible
because the potential does not vary in . A specic pair of states that can be used
to illustrate this are the l = 0, m = 0 and the l = 1, m = 0 states that approach one
another. The free rotor solution for l = 0, m = 0 is a uniform distribution in .
However, because of the potential that has a peak at =
2
and valleys at =0 and =
2.4. ROTATIONAL TUNNEL SPLITTING Hang 34
0.0
5.0
10.0
15.0
20.0
25.0
30.0
35.0
40.0
0 10 20 30 40 50
E
n
e
r
g
y
(
B
)
V
0
(B)
Energy Spectrum in Potential Used by Curl, et. al.
l = 0, m = 0
l = 1, m = 0
l = 1, m = 1
l = 2, m = 1
l = 2, m = 0
l = 2, m = 2
l = 3, m = 0
Figure 2-6: Energy levels of the potential used by Curl, et. al. in units of rotational constant
B. Graph plotted from data published by Curl, et. al.
15
, the ground state becomes signicantly distorted such that it nowpeaks at =0 and
= and becomes almost vanishing around =
2
. The l =1, m =0 state, however, is
proportional to cos in the free rotor potential, which means that its wave function
is 0 at =
2
and has a greater amplitude at = 0 and =. Therefore, the potential
now imposed does not distort the wave function too much; it simply makes the wave
function almost vanishing about =
2
. Note then, that the distorted l = 0, m = 0
state and the l =1, m =0 states will now have similar probability distribution because
the square of their amplitudes will both be high in the poles and low in the equator.
However, there is a parity dierence where the l = 1, m = 0 state is odd and crosses 0
at =
2
and the other state does not. When the potential barrier is high, because the
wave function of either state will be near vanishing around the =
2
region anyway,
the dierence in energy is smallthe formation a tunnel splitting pair!
15
Another example of tunnel splitting is the MacRury and Sams potential with both
2.4. ROTATIONAL TUNNEL SPLITTING Hang 35
out-of-plane and in-plane barriers,
19
which can be rewritten as
V = cos
2
+
2
(1cos2) , (2.51)
where and are potential energy in units of rotational constant B. As noted in pre-
vious sections, the MacRury and Sams potential with only the out-of-plane hindrance
does not have tunnel splitting. Fig. 2-7 shows the energy levels rst as a function of
from = 0 to = 10 with = 0 held constant. Then it shows the energy levels
as a function of from = 0 to = 8 with = 10 held constant. The results show
clearly that when only is increased, no candidates for tunnel splitting states can be
found. Only when both and are high can one readily recognize potential tunnel
splitting pairs.
Figure 2-7: Energy levels of the potential used by MacRury and Sams as a function of pa-
rameters and in units of rotational constant B. In the left half, = 0 is held constant as
increases from 0 to 10. In the right half, = 10 is held constant as is increased from 0 to
8. Graph from MacRury and Sams.
19
2.4. ROTATIONAL TUNNEL SPLITTING Hang 36
As mentioned in previous discussions, when the potential barriers are high, the
wave function becomes highly localized at pockets of low potential and is almost
zero everywhere elsethese states are known as pocket states.
23
A good example
of these pockets is shown earlier in Fig. 2-4, where there are two regions of low
potential, one centered at =
2
and =0 and the other centered at =
2
and =.
If the wave function in the two pockets are of opposite sign, then the wave function
must be almost vanishing and cross 0 in the region of high potential. If they are of the
same sign, the wave function must be almost vanishing without crossing 0. Therefore,
these two wave functions, one even and one odd, yield similarly shaped probability
densities (i.e. similar shape when taken the absolute value squared). Further, because
their wave functions are both almost vanishing at the regions of high potential, the
only dierence being that one actually crosses 0, the dierence between themin terms
of energy will be very small, forming a tunnel splitting pair.
Chapter 3
Lanczos Methods
3.1 Motivation
The Lanczos method is an algorithm that nds the extremal eigenvalue and the corre-
sponding eigenvectors eciently for large sparse Hermitian matrices, where a sparse
matrix here means that the matrix contains few nonzero matrix elements. To under-
stand the origins and mathematical basis of this method, one must return to the basic
eigenvalue problem.
The basic eigenvalue problem is to solve for x and in
Ax = x (3.1)
where AC
nn
, C, and x C
n
. This process of solving the eigenvalue problemis
in general very resource consuming as it scales greater than linearly in n.
24;25
In many
physical systems, only the extremal eigenvalues and corresponding eigenvectors, such
as the ground state and the rst few excited states, are of interest. If one can nd the
extremal eigenvalues simply by solving a smaller matrix T
k
C
kk
, where k <n, then
one can avoid wasting resources nding eigenvalues and eigenvectors that are not of
interest.
The preliminary task, then, is to demonstrate that a choice for T
k
exists. Let
v
1
,v
2
, . . . ,v
k
C
n
be eigenvectors of A with corresponding eigenvalues
1
,
2
, . . . ,
k
,
37
3.1. MOTIVATION Hang 38
and dene
Q
k
=
_
v
1
v
2
. . .v
k
_
, (3.2)
or that the columns of Q
k
are eigenvectors. Then one can dene
T
k
= Q
k
AQ
k
. (3.3)
And one can notice, by direct matrix multiplication, that this T happens to be diago-
nal with the eigenvalues
1
,
2
, . . . ,
k
making up its diagonal elements.
Observe further that if the columns of Q
k
are not eigenvectors, but instead of a set
of k orthonormal vectors that together can form all the v
1
,v
2
, . . . ,v
k
through a linear
combination of each other, then T
k
will not be diagonal. However, when diagonalized,
T
k
will still have the set of eigenvalues
1
,
2
, . . . ,
k
.
24
Further, an eigenvector of
T
m
, sayz
i
with eigenvalue
i
, can give v
i
by
24;26
v
i
= Q
k
z
i
. (3.4)
Therefore, if one can nd a set of k orthonormal vectors that can, through linear
combinations, form the eigenvectors that one wants to solve for, then one can nd
a desired T
k
from A by performing matrix multiplication and then diagonalizing the
smaller T
k
. This is the heart of the Lanczos methodto construct Q
k
.
3.2. RAYLEIGH QUOTIENT Hang 39
3.2 Rayleigh Quotient
Before continuing to the Lanczos method itself, it is useful to introduce the Rayleigh
quotient, which makes it possible to nd Q
k
eciently.
The basic eigenvalue equation is usually given in the form of Eq. 3.1. For numeri-
cal calculations, however, it is more useful to consider
x
Ax = x
x (3.5)
instead; or in a more common form,
= r(x) =
x
Ax
x
x
, (3.6)
where r(x) is known as the Rayleigh quotient.
24
Note that the Rayleigh quotient is
equal to an eigenvalue of A when x is an eigenvector of A. If x is an eigenvector of A
with some very small deviation, then the Rayleigh quotient of x will deviate slightly
from the corresponding eigenvalue of A. Therefore, the Rayleigh quotient is useful
because one can quantify the proximity of a vector to an eigenvector by comparing
its Rayleigh quotient to an eigenvalue.
Further, the Rayleigh quotient in physics is useful because it sets a bound for the
numeric results.
24
Specically, this property can be given as
min
r(x)
max
for all
x ,=
, where is a diagonal
matrix of n real eigenvalues of A (assuming A is Hermitian), A C
nn
is Hermitian,
and Q C
nn
is a unitary matrix. Then,
x
Ax = x
x . (3.7)
Dening y = Q
x, then
x
x =y
y . (3.8)
3.2. RAYLEIGH QUOTIENT Hang 40
Observe that
y
y =
i
[y
i
[
2
and (3.9)
i
[y
i
[
2
max
i
[y
i
[
2
. (3.10)
The right hand side of Eq. 3.10 is simply
max
y
y =
max
x
Ax, as shown above. Therefore, rearranging the terms and noting that x
x > 0,
then
x
Ax
x
x
max
, or (3.11)
r(x)
max
. (3.12)
Similarly, it can be proved that
min
r(x). Therefore, the Rayleigh quotient will
always be between the greatest and least eigenvalues of the system, which allows for
an approximation of the greatest and least eigenvalues to converge from one side
only. This property is extremely useful both in terms of estimating the ground state
of a systemand setting upper bounds for possible ground state value in error analysis.
3.3. LANCZOS ITERATION Hang 41
3.3 Lanczos Iteration
As mentioned in previous sections, the heart of the Lanczos method is to construct
Q
k
such that T = Q
k
AQ
k
will have the the desired eigenvalues. To begin the pro-
cess of constructing Q
k
, one rst chooses an initial vector q
1
C
n
. If q
1
is randomly
choosen, it is likely that it will contain some component of the maximum or mini-
mum eigenvector; alternatively, one can use some estimation by physical intuition,
such that q
1
contains some component of the maximum or minimum eigenvector. In
either case, the goal, as stated in previous section, is to nd q
1
,q
2
, . . . ,q
k
such that a
linear combination of it will be the maximum or minimum eigenvector, or at least a
vector suciently close such that its Rayleigh quotient is approximately the desired
eigenvalue.
If one simply wants to nd the maximum or minimum eigenvalue, then the gra-
dient of the Rayleigh quotient is extremely useful. Let the vectors q
1
,q
2
, . . . ,q
h
span
the space S
h
and let them be the columns of Q
h
that transforms A to T
h
. Let v
h
be
the eigenvector of T
h
with maximum eigenvalue. If a new vector q
h+1
is added such
that S
h+1
contains the gradient of r(Q
h
v
h
), then the maximum eigenvector T
h+1
will be greater than the maximum eigenvector of T
h
.
24
Further, because the Rayleigh
quotient is bounded from the top by
max
, one can successively add the gradient of
r(Q
i
v
i
), where v
i
is the eigenvector of T
i
with maximum eigenvalue, to the space
spanned by q
1
,q
2
, . . . ,q
i
and obtain successively better approximations of
max
. This
method can similarly be applied to nd
min
.
24
The new task, then, is to nd an algorithm that can provide an ecient way of
nding the gradient of the maximum or minimum eigenvector of T
h
such that one can
construct Q
h+1
given Q
h
. Here the Rayleigh quotient is the key to actualizing the
general procedure above. Note that the gradient of the Rayleigh quotient r(x) is
24
r(x) =
2
x
x
(Ax r(x)x) , (3.13)
or that the gradient of any vector x is contained in the space spanned by x and
Ax. This is an extremely powerful result since one can simply dene q
i
= A
i1
q
i
for
3.3. LANCZOS ITERATION Hang 42
i 1, 2, . . . , and S
h+1
will contain the gradient of every vector in S
h
because every
vector in S
h
can be written as a linear combination of q
1
,q
2
, . . . ,q
h
.
The space spanned by q
1
, Aq
1
, . . . , A
h1
q
1
is known as a Krylov subspace
24
and
it is denoted as K (A,q
1
, h). The corresponding matrix
K(A,q
1
, h) =
_
q
1
(Aq
1
) (A
h1
q
1
)
_
, (3.14)
where the columns of the matrix K are q
1
, Aq
1
, . . . , A
h1
q
1
, is known as a Krylov
matrix.
24
A further property of Krylov matrices provides additional computational bene-
ts. It can be shown that K
i
Aq
i
by orthonormality
of the vectors q
j
k
j =1
.) This recursion formula, which is ecient because the most
complex operation is operating a matrix on a vector only once at each iteration, is the
basic Lanczos iteration,
24;2629
and the q
i
that form the columns of the Krylov matrix
are known as Lanczos vectors.
In short, given a matrix A, one guesses an initial q
1
vector and uses the Lanczos
iteration to generate the Krylov matrices that can transform A to a k k matrix T
k
.
Once a suitable termination criterion is met, the Lanczos iteration stops, and one
takes the nal T
k
, diagonalize it to nd an approximation of the desired eigenvalues,
3.3. LANCZOS ITERATION Hang 43
and then operate K on the corresponding eigenvectors of the desired eigenvalues to
nd an approximation of the desired eigenvectors.
3.4. TERMINATION, ERROR, AND LIMITATIONS Hang 44
3.4 Termination, Error, and Limitations
The role of the rst Lanczos vector q
1
is clearly important; however, choosing the
rst Lanczos vector is not a very well-dened process. This ambiguity causes con-
cern because the rst Lanczos vector determines the Krylov subspace possible. It
is entirely possible for q
1
to exist in an invariant subspace of A of dimension k < n
and the Lanczos procedure will terminate at that point with
k
= 0. Therefore, it
is important to choose a rst Lanczos vector q
1
that is not stuck in an invariant
subspace, which is impossible to guarentee without knowing the structure of A in
full detail. Physical intuition would suggest that invariant subspaces correspond to
certain symmetries in the structure of the system. Therefore, for this investigation,
the rst Lanczos vector is chosen to avoid any known symmetries to ensure that the
rst Lanczos vector is not trapped in any invariant subspace.
As mentioned in previous sections, the utility of the Lanczos method is its e-
ciency. The convergence rate of the eigenvalue and eigenvectors is given by a theorem
of Kaniel and Paige.
24;2932
Afull investigation of the convergence rate of an arbitrary
eigenvalue is beyond the scope of this investigation. Here only the convergence rate
for the maximum (or minimum) eigenvalue will be cited.
If
1
n
are eigenvalues of A with corresponding eigenvectors z
1
, . . . ,z
n
,
and
1
k
are eigenvalues of T
k
, which is obtained after k steps of the Lanczos
iteration, then
1
1
1
(
1
n
)tan
2
(
1
)
_
c
k1
(1+2
1
)
_
2
(3.16)
where cos(
1
) = [q
1
z
1
[,
1
=
1
n
, and c
k1
is the Chebyshev polynomial of degree
k 1. A similar theorem can be applied for the minimal eigenvalue.
24
There are two main restrictions to the basic Lanczos algorithm that needs to be
resolved. First, there is the issue of orthogonality, and second, the issue of degener-
acy.
24;28
In the Lanczos algorithm in exact arithmetic, the Lanczos vectors generated
(the q
i
) form a set of orthonormal vectors. Further, orthonormality of the Lanczos
3.4. TERMINATION, ERROR, AND LIMITATIONS Hang 45
vectors is necessary for T
k
to be tridiagonal and for the simple Lanczos iteration to
be valid. However, in numeric calculations where roundo errors can occur, the or-
thogonality of the Lanczos vectors disappears and the Lanczos iteration is useless.
This situation is exacerbated by the fact that as the eigenvalues
i
, known as the
Ritz value, of T
k
converge to the eigenvalues of A, the Lanczos vectors generated
afterwards will contain greater and greater components of the Ritz vector y
i
, de-
ned as Q
k
operated on the eigenvector of T
k
with eigenvalue
i
.
24
This makes the
newly generated Lanczos vectors less orthogonal to each other because they have
increasing overlap. In order to combat these problems, one can choose to selectively
orthogonalize the Lanczos vectors with respect to the Ritz vectors to alleviate the
most serious contribution to nonorthogonalization. A more resource consuming way
is to enforce orthogonalization of new Lanczos vectors with respect to all existing
ones, which can ensure maximal accuracy at the cost of signicant computational
resources.
In addition to the problem of orthogonality, there is a problem with multiplici-
ties. There is no simple method of determining the degeneracy of any eigenvalue,
as the Lanczos method works by nding the eigenvector with maximum or minimum
eigenvalue in the Krylov subspace. The solution to this is known as the block Lanc-
zos method,
24;28;33;34
which iterates through multiple spaces simultaneously in each
iteration. Therefore, such a block Lanczos can nd multiplicities of eigenvalues with
degeneracy less than the size of the block.
24;33
The block Lanczos method relies on the fact that
A
Q =
T =
_
_
M
1
B
1
0
B
1
M
2
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. B
r1
0 B
r1
M
r
_
_
, (3.17)
where n = r p,
Q = [X
1
, X
2
, . . . , X
r
], X C
np
, M C
pp
is Hermitian, and B
i
C
pp
is upper triangular.
24;33
Because
Q performs a similarity transformation, the
3.4. TERMINATION, ERROR, AND LIMITATIONS Hang 46
eigenvalues and eigenvectors of A and
T are the same. Thus, similar to the vector
Lanczos method (the iteration described in Eq. 3.15), one can stop at a k < r to nd a
T
k
and diagonalize it to obtain the desired eigenvectors and eigenvalues.
24;33
Observe
that, like T
k
in vector Lanczos,
T
k
in block Lanczos is tridiagonal in that it has
only the diagonal and subdiagonal blocks are nonzero. Notice that because the B
i
are
upper triangular, overall the nonzero elements of
T form a band about the diagonal;
therefore, the block Lanczos method is also known as the band Lanczos method.
33
If, like in the vector Lanczos case, one writes a block Lanczos iteration by com-
puting for the elements M
i
and B
i
directly, then one obtains
AX
k
= X
k1
B
k1
+X
k
M
k
+X
k+1
B
k
(3.18)
where B
0
is dened as a p p matrix with all elements equal to 0.
24
Notice that
because all the columns of
Q are orthonormal to one another, X
i
X
j
=
i j
I
p
, where
i j
is the Kronecker-delta and I
p
is the pp identity matrix.
24
This implies that
M
k
= X
k
AX
k
and (3.19)
B
k1
= X
k1
AX
k
. (3.20)
Using these two relations, one can see that one can save computational resources by
storing the result of A operated on X
k
. And if p is small, then A operating on X
k
will
be the only resource consuming step in each iteration. This issue of applying A on X
k
(or q
i
in the vector method) will be addressed in Section 3.6.
3.5. LANCZOS TOY PROBLEMS Hang 47
3.5 Lanczos Toy Problems
In order to illustrate the properties, strengths, and weaknesses of the basic Lanczos
method, let us consider a simple application of the Lanczos method on a twelve by
twelve matrix.
Consider a matrix
A =
_
_
21
2
0 0 0 0 0 0 0 0 0 0
25
2
0
41
6
2
_
2
3
1
3
2
0 0 0 0
1
3
2
_
2
3
41
6
0
0 2
_
2
3
7
2
3
0 0 0 0
1
3
7
_
2
3
0
0
1
3
2
2
3
20
3
0 0 0 0
20
3
1
3
1
3
2
0
0 0 0 0
17
4
7
4
3
4
1
4
0 0 0 0
0 0 0 0
7
4
17
4
1
4
3
4
0 0 0 0
0 0 0 0
3
4
1
4
17
4
7
4
0 0 0 0
0 0 0 0
1
4
3
4
7
4
17
4
0 0 0 0
0
1
3
2
1
3
20
3
0 0 0 0
20
3
2
3
1
3
2
0
0
_
2
3
7
1
3
0 0 0 0
2
3
7 2
_
2
3
0
0
41
6
_
2
3
1
3
2
0 0 0 0
1
3
2
2
_
2
3
41
6
0
25
2
0 0 0 0 0 0 0 0 0 0
21
2
_
_
(3.21)
3.5. LANCZOS TOY PROBLEMS Hang 48
which has been constructed from the diagonal matrix
D =
_
_
23 0 0 0 0 0 0 0 0 0 0 0
0 17 0 0 0 0 0 0 0 0 0 0
0 0 13 0 0 0 0 0 0 0 0 0
0 0 0 11 0 0 0 0 0 0 0 0
0 0 0 0 7 0 0 0 0 0 0 0
0 0 0 0 0 5 0 0 0 0 0 0
0 0 0 0 0 0 3 0 0 0 0 0
0 0 0 0 0 0 0 2 0 0 0 0
0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 2
_
_
(3.22)
and a similarity transformation S
1
DS = A where
S =
_
_
1
2
0 0 0 0 0 0 0 0 0 0
1
2
0
1
6
1
2
1
2
3
0 0 0 0
1
2
3
1
2
1
6
0
0
1
6
0
1
3
0 0 0 0
1
3
0
1
6
0
0
1
6
1
2
1
2
3
0 0 0 0
1
2
3
1
2
1
6
0
0 0 0 0
1
2
1
2
1
2
1
2
0 0 0 0
0 0 0 0
1
2
1
2
1
2
1
2
0 0 0 0
0 0 0 0
1
2
1
2
1
2
1
2
0 0 0 0
0 0 0 0
1
2
1
2
1
2
1
2
0 0 0 0
0
1
6
1
2
1
2
3
0 0 0 0
1
2
3
1
2
1
6
0
0
1
6
0
1
3
0 0 0 0
1
3
0
1
6
0
0
1
6
1
2
1
2
3
0 0 0 0
1
2
3
1
2
1
6
0
1
2
0 0 0 0 0 0 0 0 0 0
1
2
_
_
. (3.23)
Applying the Lanczos method, consider a randomly generated Lanczos vector
3.5. LANCZOS TOY PROBLEMS Hang 49
q
1
. For illustrative purposes, in this rst case, let the rst Lanczos vector be
r
1
=
1
5
_
0 1 0 0 0 1 0 0 1 0 1 1
_
(3.24)
where the vector is labeled r
1
to dierentiate from the dierent initial vectors that
will be presented later.
Using the Lanczos method, as described in Eq. 3.15 in Section 3.3, then, we can
nd the greatest and least eigenvalues of T
k
. Table 3.1 shows the compiled results
using Mathematica.
Table 3.1: Extremal Eigenvalues with q
1
=r
1
: When k = n = 12, the exact eigenvalues, as
shown in matrix D in Eq. 3.22, are obtained.
T
k
Greatest Eigenvalue Least Eigenvalue
T
2
17.67625436239247 2.055520812733449
T
3
21.13182928380504 0.2954546832621684
T
4
22.53774004641360 1.149168570768845
T
5
22.9705605600049 1.679982898468334
T
6
22.9991280414001 1.890379919379511
T
12
23.00000000000000 2.000000000000000
Indeed, the extreme eigenvalues converge rapidly in accordance with the theory
presented earlier and converges to the maximum and minimum eigenvalues from one
side only. In addition, when the iteration reaches k = n = 12, the matrix A is tridiag-
onalized by K(A,r
1
, 12).
At this point one may speculate that such a successful outcome is not incidental
and that the starting vector r
1
is special in some way. Indeed, there are some re-
strictions to the choice of the initial vector and improper choice of the initial vector
will not lead to the desired result. To illustrate this behavior, consider constructing
the Q
k
matrix using the initial Lanczos vector
r
2
=
_
0 0 0 0 0 0 0 0 0 0 0 1
_
. (3.25)
Using this starting vector, the Lanczos iteration terminates at
2
=0, with eigenvalues
3.5. LANCZOS TOY PROBLEMS Hang 50
23 and 2, not surprising given our transformation matrix S. This result indeed con-
rms our theory that if the starting vector is contained in a proper invariant subspace
in the range of the matrix A, then the Lanczos iteration terminates upon spanning the
subspace. Another example of the same phenomenon is when using
r
3
=
1
12
_
1 1 1 1 1 1 1 1 1 1 1 1
_
(3.26)
as the initial Lanczos vector, which terminates the Lanczos iteration when
5
=0, and
the results are tabulated in Table 3.2.
Table 3.2: Extremal Eigenvalues with q
1
=r
3
: The Lanczos iteration terminates at
5
= 0
T
k
Greatest Eigenvalue Least Eigenvalue
T
2
19.86399567202422 8.16035331705360
T
3
22.91324257513417 7.040986075192646
T
4
22.99930605631535 7.001514560555633
T
5
23.00000000000000 7.000000000000000
In the example with the r
2
vector, r
2
is contained in the subspace spanned by the
rst and last column of the matrix S. In the previous example with r
3
, the vector is
a superposition of the rst, second, and fth column of S and the Lanczos iteration
terminated in a subspace that contained the initial vector. Therefore, in order to apply
the Lanczos method to practical calculations for ground state and low excited state
energies, one must choose an initial vector, a q
1
, free of symmetry that can contain
the initial vector in a proper subspace of the Hamiltonian.
After examining the Lanczos method, and its limitations in theory and in a sim-
ple toy example, the next step is to consider the Lanczos method when applied to a
physical problem, such as the quantum hindered rotor problem.
3.6. TROTTER APPROXIMATIONS Hang 51
3.6 Trotter Approximations
Recall that the most complex step in the Lanczos iteration, in both the vector and
block method, is applying A to q
i
or X
k
. In nding the energy spectrum of a physical
system, this A is the Hamiltonian operator. In the quantum hindered rotor systems
in this thesis, the Hamiltonian has a kinetic energy portion and a potential energy
portion, or that
H =
T +
V. Here the problem of nding a basis for the Hamiltonian
arisesin position space
T contains dierential operators, and in momentum space
W() = e
H
, (3.27)
where is a real number.
22
While the operator
W() has dierent eigenvalues than
that of
H, they share the same eigenvectors. Therefore, one can still use
W() to
solve the eigenvalue problem for
H. From here, the Baker-Campbell-Hausdro iden-
tity can be invoked to present
W() in a formmore suitable for computer simulations.
The Baker-Campbell-Hausdor identity,
3538
log
_
e
A
e
B
_
=
A+
B+
1
2
_
A,
B
_
+
1
12
_
A,
_
A,
B
__
+
1
12
__
A,
B
_
,
B
_
, (3.28)
is usually applied up to the rst commutator term. In the present case with
W(), the
operator is of the form e
(
A+
B)
. Expanding the Baker-Campbell-Hausdor identity
to the rst commutator term, then the error is on the order of
3
as shown below
e
A
e
B
= e
A+
B+
2 1
2
[
A,
B]
+O
_
3
_
. (3.29)
To use the result of Eq. 3.29, consider the rst two terms in the expansion of e
(
A+
B)
e
2 1
2
[
A,
B]
3.6. TROTTER APPROXIMATIONS Hang 52
using the Baker-Campbell-Hausdor identity:
e
(
A+
B)
e
2 1
2
[
A,
B]
= e
(
A+
B)+
2 1
2
[
A,
B]
+O
_
3
_
. (3.30)
Substituting Eq. 3.30 into Eq. 3.29, both having error on the same order, and operating
on the right with e
2 1
2
[
A,
B]
yields
e
A
e
B
e
2 1
2
[
A,
B]
= e
A+
B
+O
_
3
_
. (3.31)
To avoid complicated calculations involving the commutator between
A and
B,
a clever approach is to use the fact that e
A
= e
1
2
A
e
1
2
A
exactly because
A com-
mutes with itself. By repeated applications of the Baker-Campbell-Haudor identity,
observe that
e
1
2
A
e
B
= e
1
2
A+
B+
2 1
4
[
A,
B]
+O
_
3
_
(3.32)
e
B
e
1
2
A
= e
B+
1
2
A+
2 1
4
[
B,
A]
+O
_
3
_
(3.33)
and following an approach similar to the derivation of Eq. 3.30,
e
1
2
A
e
B
e
2 1
4
[
A,
B]
= e
1
2
A+
B
+O
_
3
_
(3.34)
e
B
e
1
2
A
e
2 1
4
[
B,
A]
= e
B+
1
2
A
+O
_
3
_
. (3.35)
Equating Eq. 3.34 and Eq. 3.35 and operating fromthe right with e
2 1
4
[
A,
B]
=e
2 1
4
[
B,
A]
gives
e
1
2
A
e
B
= e
B
e
1
2
A
e
2 1
2
[
A,
B]
+O
_
3
_
. (3.36)
3.6. TROTTER APPROXIMATIONS Hang 53
Therefore, combining the results of Eq. 3.36 and Eq. 3.31,
e
A+
B
= e
A
e
B
e
2 1
2
[
A,
B]
+O
_
3
_
(3.37)
= e
1
2
A
e
1
2
A
e
B
e
2 1
2
[
A,
B]
+O
_
3
_
(3.38)
= e
1
2
A
e
B
e
1
2
A
+O
_
3
_
. (3.39)
The result, Eq. 3.39, is a special case of a general family of approximations known as
the Trotter approximation.
3942
Returning to the physical problem at hand, the Trotter approximation can be ap-
plied to
W(), when is small, as follows,
W() = e
H
(3.40)
= e
V+(
T)
(3.41)
= e
2
V
e
T
e
2
V
+O(
3
) (3.42)
and the kinetic and potential energy portions can be separately applied, which is suit-
able for computer simulations. For example, if in general one works in position space,
then the operator can be written as follows
, [e
H
[
/
,
/
) =, [e
2
V
e
T
e
2
V
[
/
,
/
) (3.43)
=
//
,
//
///
,
///
, [e
2
V
[
//
,
//
)
//
,
//
[e
T
[
///
,
///
)
///
,
///
[e
2
V
[
/
,
/
)
(3.44)
=
l ,m
/
l
/
,m
/
//
,
//
///
,
///
_
, [e
2
V
[
//
,
//
)
//
,
//
[l , m)l , m[e
T
[l
/
, m
/
)
l
/
, m
/
[
///
,
///
)
///
,
///
[e
2
V
[
/
,
/
)
_
, (3.45)
which means that the potential energy part can be written in position space and the
kinetic energy part can be written in momentum spaceno dierential operators
are needed! The only additional mathematical objects introduced are of the form
l , m[, ), or Fourier and associated Legendre transforms, for which there exist al-
3.6. TROTTER APPROXIMATIONS Hang 54
gorithms that perform accurate computations eciently.
22
In short, by using the Trotter approximation and by using Fourier and associated
Legendre transforms, the operation of applying the matrix A to q
i
(or X
k
in the block
method) in the Lanczos iteration can be performed eciently by using
W() instead
of
H.
22
Chapter 4
Methods
4.1 Motivation
An old FORTRAN 77 code was received at the beginning of this project. It had run
years ago on a DEC workstation, but had not been maintained and was unable to
be compiled or run on the machines in the current laboratory. It had clearly been
through several development cycles where comments and fragments from legacies
long gone dotted the code, and certain specic problems with the old implementation
of the code needed to be addressed. One very noticeable stylistic problem was the
abuse of the common block in the old code. Not only were local variables of all types
stored in common, but many were declared in numerous internal subroutines. The
unnecessary declarations made it dicult to understand which variables stored in
the shared data were actually used in a subroutine. Global constants were redened
even when it was not necessary and clearly disadvantageous to do so. Here, the
object-oriented programming concept of encapsulation and the passing of variables
to functions and subroutines with intent specications in FORTRAN 95 is a clear
improvement.
43
Another issue that had to be confronted was precision and datatype denitions.
Dierent computer platforms and dierent compilers have various default precision
settings for integer, real and other numerical data types. Without documentation of
the precision used, however, one must be cautious when reusing the same piece of
55
4.1. MOTIVATION Hang 56
code on dierent computer platforms, or even identical computer platforms, without
wasting signicant time and eort to re-adjust the precision and test that everything
works as desired. Programs for this project, for example, subroutine GASLEG, as writ-
ten, depends heavily on high machine precision. This dependence created issues dur-
ing the migration to the new platform used for this thesis. Modern FORTRAN 95 has
the ability to select the appropriate datatype from pre-existing ones in the computer
platform to satisfy the users needs.
43
This function allows the code to be platform
independent and allows the user to have direct control over the precision of each
variable or numeric constant at each point in the program.
Another issue is with process control. Some subroutines utilized inscrutable pro-
gramowcontrols such as the dreaded go to. Such archaic owcontrol protocols led
to innite loops that are dicult to debug. For example, the GASLEG subroutine had
to be debugged as it brought the code into innite loops. Migrating to modern For-
tran 95 removes the temptation for users to employ such poor programing practices
and maintains the legibility of the program.
43;44
Finally, the old code lacked modularity. In many instances, in order to understand
or modify a line of code, one needed to look 50 lines prior in order to nd relevant def-
initions or even into other subroutines to nd the initialization of a variable. There-
fore, local modications are dicult because changes throughout the code are often
needed to maintain consistency. One example is the size of the potential grid, which
is dened locally at several points in the code or simply implied when the upper limit
of a loop is simply a number instead of a variable. The ability to group blocks of code
into subtasks can dramatically decrease the debugging time and make the code much
more understandable.
4345
In the example above, storing the size of the potential grid
in a module and having dierent subroutines use the variable stored in the module
can not only allow for consistency and easy debugging, but also make it possible to
program the code with a wrapper or a shell script that can run multiple runs with
dierent initial parameters. Therefore, from the beginning of this project, one major
objective has been to redesign the code and update it into the modern FORTRAN 95.
4.2. FORTRAN 77 CODE Hang 57
4.2 FORTRAN 77 Code
4.2.1 Overview
Prior to a migration to FORTRAN 95 it was important to have an updated, work-
ing FORTRAN 77 code to ensure the integrity of the program and algorithms. In
the process, two external subroutines had to be replaced: the complex fast Fourier
transform algorithm and the psuedo-random number generator library. The psuedo-
random number generator was not used for the data shown in this thesis. However,
it is expected to be needed for future work in which hydrogen is inserted into a bulk
material and allowed to sample at varying environments.
In addition to the replacement of two external subroutines, minor changes were
made to the code to ensure that the code conformed to the xed form format, e.g. the
number of characters on each line, and that all the variables and constants are of the
correct precision because modern scientic applications usually require double preci-
sion and especially in the subroutine GASLEG. In updating the FORTRAN 77 code, all
real variables were declared as DOUBLE and all intrinsic functions were set to calculate
with double precision.
4.2. FORTRAN 77 CODE Hang 58
4.2.2 Complex Fast Fourier Transform
The complex Fourier transform is usually given as
12
g(k) = A
_
f (x)e
ikx
dx , (4.1)
where A is 1,
1
2
, or
1
2
depending on the convention used, and is either positive
or negative one, again, depending on convention. One must note that the parameters
A and can vary from implementation to implementation. In this application, this
is not a signicant concern because the goal, as described in section 3.6, is simply
to transform the wave function from position to momentum space, apply the kinetic
operator in momentum space, and then inverse transform to position space.
In computer simulations the function f (x) in Eq. 4.1 is typically sampled at dis-
crete evenly spaced points x
i
, and a discrete Fourier transform is used.
a
Similar to
the continuous case, the discrete complex Fourier transform of a data with N total
data points separated by x is given by substituting j x for x and nk for k in Eq. 4.1
and changing the integral to a sum, which yields the general formula
g
n
= B
N
j =1
f ( j x)e
i
2n j
N
, (4.2)
where k =
2
X
, and X = Nx is the domain of input values to be transformed. Note
again that the specic implementation may vary as B can be either 1 or
1
N
and can
take on a value of either positive or negative one.
In addition, note that mathematically
e
i
2
N
(
N
2
+m) j
= e
i
2
N
(N
N
2
+m) j
(4.3)
= e
i2 j
e
i
2
N
(
N
2
+m) j
(4.4)
= e
i
2
N
(
N
2
+m) j
. (4.5)
a
The actual algorithm implemented is a fast Fourier transform. For the purposes of scientic com-
puting, however, such subroutines are treated as a black box that performs the discrete Fourier
transform eciently.
4.2. FORTRAN 77 CODE Hang 59
Thus, the entires k
n
where N > n >
N
2
can be viewed as entries with negative spatial
frequencies. Therefore, there are two ways to view the data: one is to think of the
spectrum as ranging from
K
2
to
K
2
, and the other is to think of the spectrum as
ranging from 0 to K, where K is the range of the transform. These two dierent
views are commonly implemented as, A:
_
0, k, 2k, . . . ,
K
2
,
K
2
, . . . , 2k, k
_
, (4.6)
and B:
_
0, k, 2k, . . . , K
. (4.7)
Some library routines deliver the output in form A, also known as the wrapped
form; while other routines store the output in form B, also known as the natural
form.
After a survey of available software, a complex fast Fourier transform algorithm
FFTPACK5 is utilized and called from the subroutine trans p, which can be found
in Appendix B.2.8. The algorithm was rst tested in isolation. Fig. 4-1 shows the
input of the standard normal distribution ( = 0, = 1) to the Fourier transform
library routine, which was Fourier transformed according the convention that B =
1
N
in Eq. 4.2. In Fig. 4-2, the Fourier transformed data ranges from
0.01
to
0.02
,
suggesting that the wrapped form is used. Performing the inverse transform on the
Fourier transformed distribution ought to yield the original distribution, which is the
case in Fig. 4-4.
4.2. FORTRAN 77 CODE Hang 60
0.000
0.050
0.100
0.150
0.200
0.250
0.300
0.350
0.400
-10 -5 0 5 10
D
i
s
t
r
i
b
u
t
i
o
n
x
i
Fourier Transform Test: Input
Input
Standard Normal Distribution =0 =1
Figure 4-1: Input for testing of the library routine FFTPACK5. The data used has parameters
X = 10, x = 0.01, N = 2000.
-0.0050
0.0000
0.0050
0.0100
0.0150
0.0200
0.0250
0.0300
0.0350
0.0400
0.0450
0.0500
-400 -300 -200 -100 0 100 200 300 400
D
i
s
t
r
i
b
u
t
i
o
n
k
j
Fourier Transform Test: Forward Transform
Forward Transform
Normal Dist. =0 =1 with factor 1/(Nx)=1/20
Figure 4-2: Fourier transform using FFTPACK5 data in Fig. 4-1. Here N = 2000.
4.2. FORTRAN 77 CODE Hang 61
-0.0050
0.0000
0.0050
0.0100
0.0150
0.0200
0.0250
0.0300
0.0350
0.0400
0.0450
0.0500
-10 -5 0 5 10
D
i
s
t
r
i
b
u
t
i
o
n
k
j
Fourier Transform Test: Forward Transform
Forward Transform
Normal Dist. =0 =1 with factor 1/(Nx)=1/20
Figure 4-3: Close-up of Fig. 4-2.
-0.050
0.000
0.050
0.100
0.150
0.200
0.250
0.300
0.350
0.400
-10 -5 0 5 10
D
i
s
t
r
i
b
u
t
i
o
n
x
i
Fourier Transform Test: Back Transform
Result after Forward Trans. and Back Trans.
Standard Normal Distribution =0 =1
Figure 4-4: Inverse transform using FFTPACK5 on the Fourier transformed distribution in
Fig. 4-2.
4.2. FORTRAN 77 CODE Hang 62
4.2.3 Pseudo-Random Number Generators
The original FORTRAN 77 code included a process that required a random number
generator for a statistical mechanics simulation. Initially, a pseudo-random num-
ber generator most recently utilized by Timothy Cronin
46
and Zachery Wolfson
47
Swarthmore College 06 was used because of its immediate availability. Later, a
twisted generalized feedback shift register pseudo-randomnumber generator Mersenne
Twister was implemented. The Mersenne Twister has a long period of 2
19937
1, a
high order of dimensional equidistribution, runs fast and has been demonstrated by
many to have a high degree of statistical randomness.
48;49
Although the original code published by the developers of the Mersenne twister
is written in C, the FORTRAN 77 code can interface with the compiled library seam-
lessly. Fortran versions of the same code can be found, however, these codes have
not been veried to function identically to the C program written by the original au-
thors and preliminary testings show little dierence in speed, viz. dierent trials have
shown either version running slightly faster than the other with even frequency, after
compiling the library with the greatest optimization settings. Therefore, the C version
was ultimately used.
While this library routine was used in testing the FORTRAN 77 version of the
code, this library has not been incorporated into the FORTRAN 95 code in Appendix B
because the pseudo-random number generator is used for a random walk in a bulk
material. This was part of the functionality of the old code, which has not been in-
corporated into the new one. However, in the future, the Mersenne Twister may be
useful in statistical mechanical simulations.
4.3. FORTRAN 95 CODE Hang 63
4.3 FORTRAN 95 Code
4.3.1 Design Concepts
In updating the code to FORTRAN 95, a top-down approach was used.
44
Three cen-
tral subtasks of the code were identied, initialization, propagation of the Hamilto-
nian in each Lanczos iteration, process control for Lanczos iterations. Each of these
tasks will be described in detail in the following sections.
One of the primary reasons is not with functionality of the code, but rather the
readability of the code. Programs must be readable by scientic users, and it is not
reasonable to expect its most likely users to be able to parse through several thousand
lines of code in order to understand the way the programaccomplishes one small task.
It is advantageous to break the code into smaller blocks with clear functions,
4345
and
allow the user to interact with the program at varying levels of detail. If the user
desires to tweak every line and detail of the code, breaking into digestible parts is a
good idea. If the user simply wants to have a cursory examination of the program as
a conglomeration of black boxes, it is a good idea as well.
A second goal is to enhance its maintainability. One idea that is pertinent to this
project is encapsulation.
45
Many of the processes and algorithms are repeated in the
current code; therefore, recycling the same piece of code via data encapsulation of the
associated processes can save coding time, preserve or even enhance the functionality
of the program, and reduce the possibility of bugs due to human typographical errors.
Data encapsulation also reduces the possibility of user error. Many programs,
especially those in the scientic community, are often poorly documented, and even if
they are well-documented, such documentation quickly becomes obsolete, or are not
passed on as collaborations share codes. Users unfamiliar with a program can often
input nonsense or conicting data and parameters that can lead to fatal errors or,
worse, nonsense results that can be misinterpreted. By hiding information, especially
when it will not impede too much on the ability for the code to be updated, the
potential errors a user can make will be more restricted and the damage that can
be done can be more traceable. In addition, when designing separated programming
4.3. FORTRAN 95 CODE Hang 64
units, it is easier to implement explicit interfaces, prompts, and error messages at
key points in the code to avoid potential issues such as overwriting input data and
changing numerical constants.
With these concerns in mind, the current code, based upon previous works has
been reorganized and redesigned to eciently take an input potential, where a homonu-
clear diatomic molecule is situated, and output the energy levels and corresponding
eigenfunctions. The basic call tree is shown in Fig. 4-5.
Figure 4-5: Call tree of the current code.
The overall wrapper is estates that calls upon lanch2 that calls upon initializa-
tion routines and calls upon the controller of the Lanczos method. The program gett
provides the matrix elements for the associated Legendre transform and it uses upn
that functions as a raising and lowering operator that gives the dierent associated
Legendre polynomials. The code fourier controls the Lanczos iteration, as shown in
Eq. 3.19 and 3.20, and performs the orthogonalization to ensure accuracy. The sub-
4.3. FORTRAN 95 CODE Hang 65
routines getProp and fullProp initializes and applies the A matrix in Eq. 3.19 and
3.20. As shown in Section 3.6, this A is of the form
W() = e
2
V
e
T
e
2
V
. (4.8)
The subroutine fullProp calls sltf and sltb to perform the associated Legendre
transform and the inverse transform, as described in Section 3.6, and calls the sub-
routine trans p to apply e
T
.
In addition to the subroutines shown in Fig. 4-5, there are several modules in the
code that are not directly part of the central process but are essential to ensure the
operation of the program. Most initialization processes, with the notable exceptions
of gett and getProp as shown in the call tree, have been incorporated into the mod-
ule input as module subroutines such that the initialization process is completely
modularized and separated from the actual algorithm. To this end, two subroutines
gasleg and zbes are used by the module subroutine get gaussleg in input to nd
the weights for Gaussian-Legendre quadratures; hence, they are not found in the
basic program tree above. The module fft mod simplies the call to the external
library fftpack5 by hiding the work arrays and temporary variables as shown in Sec-
tion 4.3.4. The modules prop mod and trans mod exist solely as data storing modules,
created in the process of reorganizing the code. They, along with gett, getprop, sltf
and sltb, can be incorporated into a propagator initialization module and a Legendre
transform module in the future. The module overlap nds the overlap between two
wave functions that is useful in the orthogonalization process, and it will be explained
in detail in Section 4.3.3. Finally, datatype selects datatypes on the specic computer
platform such that the code can be more platform independent.
4.3. FORTRAN 95 CODE Hang 66
4.3.2 Derived Type and Data Encapsulation
A feature of FORTRAN 95 that grants users tremendous exibility is the feature of
derived types.
4345
One can dene derived types to create new data structures con-
veniently. In this investigation, one physical object that can naturally be dened as
a derived type is the hydrogen molecule. Prior to the denition of the derived type,
there existed variables mass, rrange, and gmax, where the rst refers to the reduced
mass of the hydrogen molecule and the latter two both refer to the bond length be-
tween the nuclei of the hydrogen molecule, as shown below.
r e a l (dpkind), par amet er :: mass =1836.0 _dpkind , rrange =1.449 _dpkind
r e a l (dpkind), par amet er :: gmax = rrange
With a derived type molecule, these variables are now grouped together as the
natural parameters of the physical system at hand, as shown below.
41 ! 2006 de r i ve d t ype mol e c ul e
t ype , p u b l i c :: molecule
p r i v a t e
r e a l (dpkind) :: mass
45 ! reduced mass
r e a l (dpkind) :: blength
! bond l e ng t h
end t ype molecule
This makes it clear that the mass and bond length of the diatomic molecule at hand
are the relevant parameters. While the type itself is public, available for decla-
ration, its elds are private to achieve data encapsulation. To access the elds
mass and blength, public functions getmass and getblength were declared in the
datatype mod module.
52 ! 2006 g e t s reduced mass of mol e c ul e
f u n c t i o n getmass(molecules)
r e a l (dpkind) :: getmass
55 t ype (molecule), i n t e n t ( i n ) :: molecules
getmass = molecules%mass
end f u n c t i o n getmass
! 2006 g e t s bond l e ng t h of mol e c ul e
60 f u n c t i o n getblength(molecules)
r e a l (dpkind) :: getblength
4.3. FORTRAN 95 CODE Hang 67
t ype (molecule), i n t e n t ( i n ) :: molecules
getblength = molecules%blength
end f u n c t i on getblength
In addition to data encapsulation, this makes the code in the main body much
more legible. For example, prior to upgrade there was a line of code as follows.
aaa = al * (al + 1) / mass
Note that the mass to which mass refers is ambiguous. Now, however, it is declared
in input mod that
47 ! 2006 de f i ne hydrogen
t ype (molecule), par amet er :: hydrogen = molecule (1836.0 _dpkind , 1.449 _dpkind)
Therefore, in the subroutine getProp the code becomes the following.
18 aaa = al * (al + 1) / &
(getmass(hydrogen) * getblength(hydrogen) * getblength(hydrogen ))
And it is now clear that the reduced mass of the hydrogen molecule is used in calcu-
lating its moment of inertia.
In addition, the denition of such a subtype can allow for denition of multiple
types of molecules, such as the deuterium molecule. In the future, one may even
add additional parameters such as quantum statistics (fermionic or bosonic nuclei)
to allow one to perform calculations that require this additional information without
having to make changes to the code at multiple places.
4.3. FORTRAN 95 CODE Hang 68
4.3.3 Interface and Function Overloading
One advanced feature of in FORTRAN 95 is the ability to create explicit interfaces
for functions and subroutines to ensure that they are called correctly and to allow for
function overloading.
4345
A place where this feature comes in handy is the portion
of the code that performs orthogonalization. To orthogonalize states
1
and
2
, the
overlap between
1
and
2
is calculated, and then removed from
2
. This process is
iterated several times to maintain orthogonalization between all states. The code in
subroutine fourier that performs this operation, prior to upgrade, is shown below.
do ibp = 1, ib -1
do k = 1, nstate
do j = 1, nstate
anorm(j) = 0.0 _dpkind
enddo
do j = 1, nstate
do ip = 1, nm
do ix = 1, nl+1
anorm(j) = anorm(j) + psi(ix ,ip ,j,ibp) &
* psi(ix,ip ,k,ib) * wtot(ix ,ip)
enddo
enddo
enddo
do j = 1, nstate
do ip = 1, nm
do ix = 1, nl+1
psi(ix ,ip ,k,ib) = psi(ix ,ip ,k,ib) &
- anorm(j) * psi(ix,ip ,j,ibp)
enddo
enddo
enddo
enddo
enddo
The array wtot gives the Jacobian weights and is dened earlier in the code. In or-
der to make the code more legible and understandable, an operator .overlap. was
formed to calculate the overlap between two states. The module that denes this
operator is as follows.
1 modul e overlap
us e datatype_mod
4.3. FORTRAN 95 CODE Hang 69
i n t e r f a c e set_wtot
5 modul e procedure set_rwtot
modul e procedure set_cwtot
end i n t e r f a c e
i n t e r f a c e ope r a t or (. overlap .)
10 modul e procedure real_overlap
modul e procedure complex_overlap
end i n t e r f a c e
compl ex(dpkind), di mens i on (:,:), a l l o c a t a b l e , p r i v a t e :: wtot
15
c o n t a i n s
s ub r out i ne set_rwtot(rwin)
r e a l (dpkind) , di mens i on (:,:) , i n t e n t ( i n ) :: rwin
i f (allocated(wtot)) d e a l l o c a t e (wtot)
20 a l l o c a t e (wtot( s i z e (rwin ,1), s i z e (rwin ,2)))
wtot = rwin
end s ub r out i ne set_rwtot
s ub r out i ne set_cwtot(cwin)
25 compl ex(dpkind) , di mens i on (:,:) , i n t e n t ( i n ) :: cwin
i f (allocated(wtot)) d e a l l o c a t e (wtot)
a l l o c a t e (wtot( s i z e (cwin ,1), s i z e (cwin ,2)))
wtot = cwin
end s ub r out i ne set_cwtot
30
f u n c t i o n real_overlap(rpsi1 ,rpsi2)
r e a l (dpkind) , di mens i on (:,:) , i n t e n t ( i n ) :: rpsi1
r e a l (dpkind) , di mens i on ( s i z e (rpsi1 ,1), s i z e (rpsi1 ,2)) , &
i n t e n t ( i n ) :: rpsi2
35 r e a l (dpkind) :: real_overlap
i f (allocated(wtot)) t hen
real_overlap = sum(rpsi1 * rpsi2 * r e a l (wtot ,dpkind ))
e l s e
40 real_overlap = sum(rpsi1 * rpsi2)
e n d i f
end f u n c t i o n real_overlap
f u n c t i o n complex_overlap(cpsi1 ,cpsi2)
45 compl ex(dpkind) , di mens i on (:,:) , i n t e n t ( i n ) :: cpsi1
compl ex(dpkind) , di mens i on ( s i z e (cpsi1 ,1), s i z e (cpsi1 ,2)) , &
i n t e n t ( i n ) :: cpsi2
compl ex(dpkind) :: complex_overlap
4.3. FORTRAN 95 CODE Hang 70
50 i f (allocated(wtot)) t hen
complex_overlap = sum(cpsi1 * conjg(cpsi2) * wtot)
e l s e
complex_overlap = sum(cpsi1 * conjg(cpsi2 ))
e n d i f
55 end f u n c t i on complex_overlap
end modul e overlap
While the wave functions in the code are real, in general wave functions are complex.
Therefore, both a real and a complex calculation routine are included. Instead of
accessing these functions individually depending on the datatype, an interface block
is dened such that one can simply use the operator .overlap. to perform the same
calculation on dierent datatypes.
To see the signicant improvement in the legibility of the code, compare the fol-
lowing, from subroutine fourier in Appendix B.2.5, with the code prior to upgrades
shown earlier.
70 do ibp = 1, ib -1
! 2006 o r t h o g o nal i z e t o a l l l owe r b l o c k s ( a must )
do k = 1, nstate
anorm = 0 * anorm
do j = 1, nstate
75 anorm(j) = anorm(j) + psi(:,:,j,ibp) .overlap. psi(:,:,k,ib)
enddo
do j = 1, nstate
psi(:,:,k,ib) = psi(:,:,k,ib) - anorm(j) * psi(:,:,j,ibp)
enddo
80 enddo
enddo
Note that in addition to the operator .overlap., other new features of FORTRAN 95
were used to make the code cleaner. These features will be addressed in Section 4.3.4.
In the new code, the iteration variables ix and ip were disposed of, along with the
nested loops. This allows one to clearly understand the operations of the code and
increase maintainability, because once one tests that the subtask .overlap. works as
designed, one can simply reapply it to dierent places and work on maintaining other
parts of the code.
4.3. FORTRAN 95 CODE Hang 71
4.3.4 Arrays in FORTRAN 95
Array features in FORTRAN 95 have been tremendously expanded and adjusted to
balance between ease of coding and maintenance with high performance and opti-
mization. One feature is assumed shape arrays,
43;44
which can be seen in the wrapper
code for the complex fast Fourier transform in Appendix B.1.3.
1 modul e fft_mod
us e datatype_mod
! 2006 i f i n i t i a l i z e d work ar r ays t hen i t i s t rue ,
5 ! by de f aul t i t i s f a l s e
l o g i c a l , p r i v a t e :: workinit =.false.
r e a l (dpkind), di mens i on (:), a l l o c a t a b l e , p r i v a t e :: worksav , work
c o n t a i n s
10 s ub r out i ne cfft(transform , isign)
i mp l i c i t none
compl ex(dpkind), di mens i on (:), i n t e n t ( i nout ) :: transform
i n t e g e r (i32kind), i n t e n t ( i n ) :: isign
15 i n t e g e r (i32kind) :: savlen , numm , istatus , mm
numm= s i z e (transform)
savlen = numm*3 +4
mm=numm / 2
20
! de a l l o c a t e i f al r e ady a l l o c a t e d
i f ((. not. workinit) .and. (isign .eq. 0)) t hen
i f (allocated(worksav )) d e a l l o c a t e (worksav)
i f (allocated(work)) d e a l l o c a t e (work)
25 a l l o c a t e (worksav(savlen),work (2* numm))
workinit = .true.
e l s e i f ((. not. workinit) .and. (isign .ne. 0)) t hen
wr i t e (*,*) "Error ,initializeworkarraysfirst."
s t op
30 e n d i f
i f (isign .lt. 0) t hen
c a l l cfft1b(numm ,1,transform ,numm ,worksav ,savlen ,work ,2*numm ,istatus)
e l s e i f (isign .gt. 0) t hen
35 c a l l cfft1f(numm ,1,transform ,numm ,worksav ,savlen ,work ,2*numm ,istatus)
e l s e
c a l l cfft1i(numm ,worksav ,savlen ,istatus)
4.3. FORTRAN 95 CODE Hang 72
e n d i f
40 i f (istatus .ne. 0) t hen
wr i t e (*,*) "Errorincfft"
s t op
e n d i f
end s ub r out i ne cfft
45 end modul e fft_mod
While it does not have an actual interface, the module fft mod is implemented with
the concepts fromthe previous sections, data encapsulation and function overloading,
in mind to simplify the calling interface. This simplication is made possibly only
through assumed shape arrays. The arrays worksav and work are declared as assumed
shape arrays and when combined with a new feature in FORTRAN 95 that allows one
to allocate and deallocate arrays, the temporary work arrays can be adjusted for any
input array length.
In the example with declaring the .overlap. operator in Section 4.3.3, assumed
shape arrays are used in conjunction with the size function, which returns the size
of a dimension of an array, to form automatic objects.
45
In the module overlap from
lines 31 to 42, the function real overlap, one can see a few other new features in
FORTRAN 95 that make the code shorter and more readable. One is the ability to
perform element by element arithmetic. Combined with intrinsic functions such as
sum(), many loops can be avoided.
Many intrinsic functions and operations are overloaded for scalar and array oper-
ations. For example, before upgrading to FORTRAN 95, the subroutine fourier ran
nested loops to exponentiate each element of a matrix.
do ip = 1, nmd
do ix = 1, nmd1
vv = vps(ix ,ip)
ev2(ix ,ip) = exp(-dt2*vv)
enddo
enddo
However, since the intrinsic function exp is verloaded, only one line of code is needed.
65 ev2 = exp(-dt2*vps)
4.3. FORTRAN 95 CODE Hang 73
This demonstrates clearly the powerful expanded array features in FORTRAN 95 and
the ways which they enable a programmer to write better code.
Chapter 5
Results
5.1 Free Rotor
After the errors in the code were corrected through repeated debugging, the the code
was tested on a potential with known analytical solutions, namely the free rotor or
V(, ) = 0. In this code, there are four computational parameters, dt0, ncut, cut,
and nblock, that may be adjusted to give dierent results. Previous uses of the code
have shown that dt0 =1000 and cut =
5
Y
2,0
(, ) +
2
3
Y
0,0
(, ) , (5.2)
which is a relatively simple expression for
V in the position basis. Therefore,
/
, m
/
[
V[, m) =
/
,
/
/
, m
/
[
/
,
/
)
/
,
/
[
V[, ), [, m) (5.3)
=
4
3
_
(2 +1)(5)
4(2
/
+1)
, 2; 0, 0[
/
, 0), 2; m, 0[
/
, m
/
)
+
2
3
2 +1
4(2
/
+1)
, 0; 0, 0[
/
, 0), 0; m, 0[
/
, m
/
) . (5.4)
Basic selection rules indicate that
m = m
/
(5.5)
[
/
[ 2 (5.6)
5.3. ROTOR POTENTIALS Hang 79
otherwise the element in the perturbing Hamiltonian matrix must be zero. Further,
converting the Clebsch-Gordan coecients into Wignar 3- j notation, it is clear that
+
/
must be even.
12;19
Therefore, it must be that [
/
[ = 2 or =
/
. These results
showthat m and the parity of together formuseful quantumnumbers that divide the
Hamilonian into invariant subspaces. In other words, the Hamiltonian
V in matrix
form in the [l , m) basis can be rearranged to be block diagonal, with each block being
tridiagonal and innite in size. This structure of the Hamiltonian matrix allows direct
diagonalization and perturbation methods to be calculated much easier.
To analyze the accuracy of the code, a 100100 block of the Hamiltonian (in the
[l , m) basis) was diagonalized directly, and the results were compared to the results of
the code and results from second order time-independent perturbation theory.
Table 5.1: The energy levels of the hindered rotor Hamiltonian with potential V(, ) =
cos
2
() where = 1 is obtained by three methods: direct diagonalization of a 100 100
matrix, second order time-independent perturbation theory, and the computer code based
on the Lanczos method with ncut is 7 and nblock is 3. The energy is in units of rotational
constant B.
E
i
Lanczos Method (code) Direct Diag. 2nd Order TIPT
E
0
0.3189995 0.3190001 0.3185185
E
1
2.195489 2.195548 2.195429
E
2
2.195489 2.195548 2.195429
E
3
2.593025 2.593085 2.593143
E
4
6.140771 6.140949 6.140914
E
5
6.140771 6.140949 6.140914
E
6
6.424521 6.424699 6.424684
E
7
6.424521 6.424699 6.424684
E
8
6.533294 6.533472 6.533960
From the results in Tables 5.1, 5.2, and 5.3, it is clear that when the perturbation
is small ( is small), direct diagonalization of a 100 100 matrix, second order time-
independent perturbation theory, and the computer code agree with each other to the
rst four or ve signicant gures, with the lower energy states agreeing better than
the higher energy ones in the Lanczos code as expected. As the perburation increases,
perturbation theory fails to be a good approximation, as expected. However, the
5.3. ROTOR POTENTIALS Hang 80
Table 5.2: The energy levels of the hindered rotor Hamiltonian with potential V(, ) =
cos
2
() where = 5 is obtained by three methods: direct diagonalization of a 100 100
matrix, second order time-independent perturbation theory, and the computer code based
on the Lanczos method with ncut is 7 and nblock is 3. The energy is in units of rotational
constant B.
E
i
Lanczos Method (code) Direct Diag. 2nd Order TIPT
E
0
1.357345 1.357357 1.296296
E
1
2.899550 2.899616 2.885714
E
2
2.899550 2.899616 2.885714
E
3
4.822738 4.822809 4.828571
E
4
6.669674 6.669857 6.665695
E
5
6.669674 6.669857 6.665695
E
6
8.047620 8.047807 8.045675
E
7
8.047620 8.047807 8.045675
E
8
8.810557 8.810735 8.872800
Table 5.3: The energy levels of the hindered rotor Hamiltonian with potential V(, ) =
cos
2
() where = 10 is obtained by three methods: direct diagonalization of a 100 100
matrix, second order time-independent perturbation theory, and the computer code based
on the Lanczos method with ncut is 7 and nblock is 3. The energy is in units of rotational
constant B.
E
i
Lanczos Method (code) Direct Diag. 2nd Order TIPT
E
0
2.305006 2.305040 1.851852
E
1
3.643815 3.643895 3.542857
E
2
3.643815 3.643895 3.542857
E
3
7.264849 7.265043 7.234208
E
4
7.264849 7.265043 7.234208
E
5
7.285149 7.285254 7.314286
E
6
9.915992 9.916207 9.896987
E
7
9.915992 9.916207 9.896987
E
8
11.79020 11.79039 12.25310
results of direct diagonalization and the Lanczos code still agree with each other to
the rst four signicant gures.
5.3. ROTOR POTENTIALS Hang 81
5.3.2 In-plane Hindrance
After examining the behavior of the free rotor potential, the librator potential, and
a rotor potential, and analyzing the accuracy of the code, a more important model,
the rotor with both in-plane and out-of-plane hindrance, is examined. This model
is signicant because it more closely resembles the potential of molecular hydrogen
near a surface.
The results by using the Lanczos code with ncut of 7 and nblock of 3, shown in
Fig. 5-5, show a tunnel splitting between E
0
and E
1
, which according to MacRury and
Sams involves the ( j = 1, p = 1, r = 1) and the ( j = 1, p =1, r =1) states.
19
0
2
4
6
8
10
0
2
4
6
8
10
12
14
16 0.00e+000
1.00e+000
2.00e+000
3.00e+000
4.00e+000
5.00e+000
6.00e+000
7.00e+000
8.00e+000
9.00e+000
Energy (B)
Tunnel Splitting of E
0
and E
1
States
E
0
E
1
Energy (B)
Figure 5-5: The energy eigenvalues of the rst two states calculated at various and
values calculated with the Lanczos computer code with ncut of 7 and nblock of 3.
To see the tunnel splitting in greater detail, consider the rst two states. Fig. 5-6
and Fig. 5-7 show the ground state and rst excited state, respectively, when = 10
and = 0.
Here it is clear that the rst two states are very dierent in shape and do not
exhibit tunnel splitting. However, an examination of the same two states when =10
5.3. ROTOR POTENTIALS Hang 82
-0.4
-0.35
-0.3
-0.25
-0.2
-0.15
-0.1
-0.05
Wave Function of E
0
(=10, =0)
E
0
Wave Function
-0.1
-0.15
-0.2
-0.25
-0.3
-0.35
0
0.785398
1.5708
2.35619
3.14159
0
0.785398
1.5708
2.35619
3.14159
3.92699
4.71239
5.49779
6.28319
-0.4000
-0.3500
-0.3000
-0.2500
-0.2000
-0.1500
-0.1000
-0.0500
wave function
Figure 5-6: Ground state eigenfunction when = 10 and = 0.
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
Wave Function of E
1
(=10, =0)
E
1
Wave Function
0.4
0.2
-5.55e-017
-0.2
-0.4
0
0.785398
1.5708
2.35619
3.14159
0
0.785398
1.5708
2.35619
3.14159
3.92699
4.71239
5.49779
6.28319
-0.6000
-0.4000
-0.2000
0.0000
0.2000
0.4000
0.6000
wave function
Figure 5-7: First excited state eigenfunction when = 10 and = 0.
5.3. ROTOR POTENTIALS Hang 83
and = 16 shows a very dierent picture. As one can see by comparing Fig. 5-8, the
ground state, and Fig. 5-9, the rst exicted state, they are very similar except for a
dierence in parity. To demonstrate the similarity, one can square the eigenfunctions
to see the their probability densities, which are shown in Fig. 5-10 and Fig. 5-11, the
ground and rst excited states, respectively.
-0.9
-0.8
-0.7
-0.6
-0.5
-0.4
-0.3
-0.2
-0.1
0
Wave Function of E
0
(=10, =16)
E
0
Wave Function
-0.2
-0.4
-0.6
-0.8
0
0.785398
1.5708
2.35619
3.14159
0
0.785398
1.5708
2.35619
3.14159
3.92699
4.71239
5.49779
6.28319
-0.9000
-0.8000
-0.7000
-0.6000
-0.5000
-0.4000
-0.3000
-0.2000
-0.1000
0.0000
wave function
Figure 5-8: Ground state eigenfunction when = 10 and = 16.
Comparison of the probability densities of the two show that the distributions are
incredibly similar, conrming that they are indeed tunnel splitting states.
One may wonder if this same potential causes tunnel splitting in higher excited
states also. Fig. 5-12 shows that when approaches 10 and approaches 16, E
2
and
E
3
are very close to each other, suggesting that they may be a tunnel splitting pair and
could be investigated in future studies.
5.3. ROTOR POTENTIALS Hang 84
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Wave Function of E
1
(=10, =16)
E
1
Wave Function
0.5
0
-0.5
0
0.785398
1.5708
2.35619
3.14159
0
0.785398
1.5708
2.35619
3.14159
3.92699
4.71239
5.49779
6.28319
-1.0000
-0.8000
-0.6000
-0.4000
-0.2000
0.0000
0.2000
0.4000
0.6000
0.8000
1.0000
wave function
Figure 5-9: First excited state eigenfunction when = 10 and = 16.
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Probability Density of E
0
(=10, =16)
E
0
Probability Density
0.6
0.4
0.2
0
0.785398
1.5708
2.35619
3.14159
0
0.785398
1.5708
2.35619
3.14159
3.92699
4.71239
5.49779
6.28319
0.0000
0.1000
0.2000
0.3000
0.4000
0.5000
0.6000
0.7000
probability density
Figure 5-10: Ground state probability distribution when = 10 and = 16.
5.3. ROTOR POTENTIALS Hang 85
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Probability Density of E
1
(=10, =16)
E
1
Probability Density
0.6
0.4
0.2
0
0.785398
1.5708
2.35619
3.14159
0
0.785398
1.5708
2.35619
3.14159
3.92699
4.71239
5.49779
6.28319
0.0000
0.1000
0.2000
0.3000
0.4000
0.5000
0.6000
0.7000
probability density
Figure 5-11: First excited state probability distribution when = 10 and = 16.
0
2
4
6
8
10
0
2
4
6
8
10
12
14
16
0.00e+000
2.00e+000
4.00e+000
6.00e+000
8.00e+000
1.00e+001
1.20e+001
1.40e+001
1.60e+001
Energy (B)
Degeneracy of J=1 States (E
1
, E
2
, E
3
)
E
1
E
2
E
3
Energy (B)
Figure 5-12: The energy eigenvalues of the rst three excited states (J =1) calculated
at various and values.
Chapter 6
Conclusions
In this investigation, a nonworking FORTRAN 77 code that solves for the energy
eigenvalues and eigenstates of a quantum rigid rotor was revived and modernized to
FORTRAN 95. The code utilizes a block-Lanczos method as described in Section 3.3.
The block-Lanczos method solves for the extremal eigenvalues and the corresponding
eigenvectors eciently for large sparce Hermitian matrices, and this code uses the
Trotter approximation, described in Section 3.6, and Fourier and associated Legendre
transforms to make the Lanczos method even more ecient.
Using the modernized code, the energy levels for molecular hydrogen, modeled
as a rigid rotor, were solved in three potentials: the free rotor potential, the libra-
tor potential, and the rotor potential with and without in-plane barriers. The time-
independent Schr odinger equation was solved using the modernized code that uses
a block-Lanczos method, and the results obtained are in agreement with those ob-
tained by Curl, et. al.
15
and MacRury and Sams
19
via other computational methods.
The phenomenon of tunnel splitting was observed. With increasing potential barrier
strength, the energies of the pair of states were drawn closer to each other.
The parity dierence in tunnel splitting pairs has been observed, and thus the
transition between tunnel splitting states can be observed via IINS, but not optical
spectroscopy,
22
as suggested in Section 1.2. The current code calculates energy levels
and transition energies from given barrier structures. It is hoped that with future
code development, this code will be useful for comparison with experiments. In other
86
Hang 87
words, it can be used to predict barrier heights from observed transition energies.
The code has been designed with exibility in mind, and presumably can be used
for computations with an arbitrary number of basis states and with an arbitrary po-
tential, as long as the grid can resolve it. Further, the code is not limited by potentials
that have degenerate eigenstates because the block Lanczos method can resolve en-
ergy degeneracy.
24;28;33
Therefore, many additional potentials can be investigated.
Further, because of the derived type molecule, one can vary the bond length and re-
duced mass parameters to calculate isotope eects and nd the energy spectrum of
D
2
and even heteronuclear diatomic molecules such as HD. In fact, any rigid rotor
can be used, such as N
2
, CO or CO
2
, given that the potential is adjusted appropri-
ately. Investigation of these various potentials and molecules may reveal interesting
physics and new phenomena.
While signicant portions of the code have been modernized, there is still room
for improvements. As discussed in Section 4.3.1, initializing routines getProp and
gett can be isolated from the main code, and the Legendre transform routines can
have an improved interface similar to the design in the module fft mod. More im-
portantly, a wrapper that inputs an empirical potential grid from a solid and solves
the energy at dierent points in the solid is needed to investigate the behavior of
molecular hydrogen in greater detail.
Appendix A
Associated Legendre Polynomials
When performing the transformation of the wavefunction from physical space to
momentum space, it is necessary to know the associated Legendre polynomials. The
calculation is performed numerically by rst nding the associated Legendre polyno-
mials of the form P
(nm)!
(n+m)!
1
2
n
n!
(1x
2
)
m
2
d
m+n
dx
n+m
(x
2
1)
n
, (A.1)
can be simplied tremendously in the case that n =m = by noting that only the rst
term in the derivative remains nonzero. Therefore, the expression simplies to
P
(x) =
_
2 +1
2
1
(2)!
1
2
!
(1x
2
)
2
(2)! . (A.2)
88
Hang 89
Consinder the ratio
P
(x)
P
1
1
(x)
, then
P
(x)
P
1
1
(x)
=
_
2 +1
2
1
(2)!
1
2
!
(1x
2
)
2
(2)! (A.3)
_
_
2( 1) +1
2
1
(2( 1))!
1
2
(1)
( 1)!
(1x
2
)
(1)
2
(2( 1))!
_
1
=
_
2 +1
2 1
1
(2)(2 1)
1
2
(1x
2
)
1
2
(2)(2 1) (A.4)
=
_
2 +1
2
(1x
2
)
1
2
. (A.5)
Therefore, a simple recursive formula for the associated Legendre polynomials can
be used to nd polynomials of the form P
Ax
x
x
. 39
rotational constant
Given a quantum rigid rotor of moment of inertia I, the rotational constant B
is dened as B =
2
2I
. 22
118
Index
Krylov
matrix, 42
subspace, 42, 44, 45
Lanczos
band, see Lanczos, block
block, 45, 46, 86
iteration, 42, 4446, 4951, 54, 63, 64
method, 18, 4550, 64, 77, 79, 80, 86
vector, 42, 44, 45, 4850
librator, 25, 76
Rayleigh quotient, 3941
Ritz
value, 45
vector, 45
tridiagonal, 42
tridiagonalization, 42, 49
Trotter approximation, 51, 53, 54, 86
tunnel splitting, 12, 13, 15, 16, 18, 2836
119