Hartree-Fock methods
Contents
2. Hartree-Fock methods¶
2.1. Why Hartree-Fock? Derivation of Hartree-Fock equations in coordinate space¶
Hartree-Fock (HF) theory is an algorithm for finding an approximative expression for the ground state of a given Hamiltonian. The basic ingredients are
Define a single-particle basis
so that
with the Hartree-Fock Hamiltonian defined as
The term
is a single-particle potential to be determined by the HF algorithm.The HF algorithm means to choose
in order to have
that is to find a local minimum with a Slater determinant
The variational principle ensures that
, with the exact ground state energy.
We will show that the Hartree-Fock Hamiltonian
meaning that
The so-called Hartree-Fock potential
2.2. Variational Calculus and Lagrangian Multipliers¶
The calculus of variations involves problems where the quantity to be minimized or maximized is an integral.
In the general case we have an integral of the type
where
Let us specialize to the expectation value of the energy for one particle in three-dimensions. This expectation value reads
with the constraint
and a Hamiltonian
We will, for the sake of notational convenience, skip the variables
The integral involving the kinetic energy can be written as, with the function
We will drop the limits
The constraint appears in integral form as
and multiplying with a Lagrangian multiplier
We introduce the function
where we have skipped the dependence on
For
which results in
We can then identify the Lagrangian multiplier as the energy of the system. The last equation is nothing but the standard Schroedinger equation and the variational approach discussed here provides a powerful method for obtaining approximate solutions of the wave function.
2.3. Derivation of Hartree-Fock equations in coordinate space¶
Let us denote the ground state energy by
where
where we have used the shorthand
In the Hartree-Fock method the trial function is a Slater determinant which can be rewritten as
where we have introduced the anti-symmetrization operator
with the the Hartree-function given by the simple product of all possible single-particle function
Our functional is written as
The more compact version reads
Since the interaction is invariant under the interchange of two particles it means for example that we have
or in the more general case
The direct and exchange matrix elements can be brought together if we define the antisymmetrized matrix element
or for a general matrix element
It has the symmetry property
The antisymmetric matrix element is also hermitian, implying
With these notations we rewrite the Hartree-Fock functional as
Adding the contribution from the one-body operator
In our coordinate space derivations below we will spell out the Hartree-Fock equations in terms of their integrals.
If we generalize the Euler-Lagrange equations to more variables
and introduce
For the orthogonal wave functions
Variation with respect to the single-particle wave functions
3 3
< < < ! ! M A T H _ B L O C K
Although the variations
Notice that the integration
The two first terms in the last equation are the one-body kinetic energy and the
electron-nucleus potential. The third or direct term is the averaged electronic repulsion of the other
electrons. As written, the
term includes the self-interaction of
electrons when
The Hartree-Fock equation is an example of an integro-differential equation. These equations involve repeated calculations of integrals, in addition to the solution of a set of coupled differential equations. The Hartree-Fock equations can also be rewritten in terms of an eigenvalue problem. The solution of an eigenvalue problem represents often a more practical algorithm and the solution of coupled integro-differential equations. This alternative derivation of the Hartree-Fock equations is given below.
2.4. Analysis of Hartree-Fock equations in coordinate space¶
A theoretically convenient form of the Hartree-Fock equation is to regard the direct and exchange operator defined through
and
respectively.
The function
We may then rewrite the Hartree-Fock equations as
with
and where
2.5. Hartree-Fock by varying the coefficients of a wave function expansion¶
Another possibility is to expand the single-particle functions in a known basis and vary the coefficients, that is, the new single-particle wave function is written as a linear expansion in terms of a fixed chosen orthogonal basis (for example the well-known harmonic oscillator functions or the hydrogen-like functions etc). We define our new Hartree-Fock single-particle basis by performing a unitary transformation on our previous basis (labelled with greek indices) as
In this case we vary the coefficients
It is normal to choose a single-particle basis defined as the eigenfunctions of parts of the full Hamiltonian. The typical situation consists of the solutions of the one-body part of the Hamiltonian, that is we have
The single-particle wave functions
In deriving the Hartree-Fock equations, we will expand the single-particle functions in a known basis and vary the coefficients, that is, the new single-particle wave function is written as a linear expansion in terms of a fixed chosen orthogonal basis (for example the well-known harmonic oscillator functions or the hydrogen-like functions etc).
We stated that a unitary transformation keeps the orthogonality. To see this consider first a basis of vectors
We assume that the basis is orthogonal, that is
An orthogonal or unitary transformation
preserves the dot product and orthogonality since
This means that if the coefficients
orthogonality is preserved, that is
This propertry is extremely useful when we build up a basis of many-body Stater determinant based states.
Note also that although a basis
Before we develop the Hartree-Fock equations, there is another very useful property of determinants that we will use both in connection with Hartree-Fock calculations and later shell-model calculations.
Consider the following determinant
We can generalize this to an
This is a property we will use in our Hartree-Fock discussions.
We can generalize the previous results, now
with all elements
where
This is a property we will use in our Hartree-Fock discussions. Convince yourself about the correctness of the above expression by setting
With our definition of the new basis in terms of an orthogonal basis we have
If the coefficients
which is nothing but
In our discussions hereafter we will use our definitions of single-particle states above and below the Fermi (
In Eq. (2), restated here
we found the expression for the energy functional in terms of the basis function
where
Using Eq. (4) we can rewrite Eq. (5) as
We wish now to minimize the above functional. We introduce again a set of Lagrange multipliers, noting that
since
which allows us to define a functional to be minimized that reads
Minimizing with respect to
which yields for every single-particle state
We can rewrite this equation as (changing dummy variables)
Note that the sums over greek indices run over the number of basis set functions (in principle an infinite number).
Defining
we can rewrite the new equations as
The latter is nothing but a standard eigenvalue problem. Compared with Eq. (3),
we see that we do not need to compute any integrals in an iterative procedure for solving the equations.
It suffices to tabulate the matrix elements
2.6. Hartree-Fock algorithm¶
Our Hartree-Fock matrix is thus
The Hartree-Fock equations are solved in an iterative waym starting with a guess for the coefficients
Normally we assume that the single-particle basis
The Hartree-Fock eigenvalue problem
can be written out in a more compact form as
The Hartree-Fock equations are, in their simplest form, solved in an iterative way, starting with a guess for the
coefficients
We start with a guess
. Alternatively, we could have used random starting values as long as the vectors are normalized. Another possibility is to give states below the Fermi level a larger weight.The Hartree-Fock matrix simplifies then to (assuming that the coefficients
are real)
Solving the Hartree-Fock eigenvalue problem yields then new eigenvectors
With the new eigenvalues we can set up a new Hartree-Fock potential
The diagonalization with the new Hartree-Fock potential yields new eigenvectors and eigenvalues. This process is continued till for example
where
2.7. Analysis of Hartree-Fock equations and Koopman’s theorem¶
We can rewrite the ground state energy by adding and subtracting
which results in
Our single-particle states
Using our definition of the Hartree-Fock single-particle energies we obtain then the following expression for the total ground-state energy
This form will be used in our discussion of Koopman’s theorem.
In the atomic physics case we have
where
where we have removed a single-particle state
Calculating the difference
we obtain
which is just our definition of the Hartree-Fock single-particle energy
Similarly, we can now compute the difference (we label the single-particle states above the Fermi level as
These two equations can thus be used to the electron affinity or ionization energies, respectively.
Koopman’s theorem states that for example the ionization energy of a closed-shell system is given by the energy of the highest occupied single-particle state. If we assume that changing the number of electrons from
As an example, consider a simple model for atomic sodium, Na. Neutral sodium has eleven electrons,
with the weakest bound one being confined the
From these considerations, we see that Hartree-Fock theory allows us to make a connection between experimental
observables (here ionization and affinity energies) and the underlying interactions between particles.
In this sense, we are now linking the dynamics and structure of a many-body system with the laws of motion which govern the system. Our approach is a reductionistic one, meaning that we want to understand the laws of motion
in terms of the particles or degrees of freedom which we believe are the fundamental ones. Our Slater determinant, being constructed as the product of various single-particle functions, follows this philosophy.
With similar arguments as in atomic physics, we can now use Hartree-Fock theory to make a link between nuclear forces and separation energies. Changing to nuclear system, we define
where
where we have removed a single-particle state
Calculating the difference
which becomes
which is just our definition of the Hartree-Fock single-particle energy
Similarly, we can now compute the difference (recall that the single-particle states
If we then recall that the binding energy differences
define the separation energies, we see that the Hartree-Fock single-particle energies can be used to define separation energies. We have thus our first link between nuclear forces (included in the potential energy term) and an observable quantity defined by differences in binding energies.
We have thus the following interpretations (if the single-particle fields do not change)
and
If we use
and
Similalry, we could interpret
and
We can continue like this for all
We can thus make our first interpretation of the separation energies in terms of the simplest possible many-body theory. If we also recall that the so-called energy gap for neutrons (or protons) is defined as
for neutrons and the corresponding gap for protons
we can define the neutron and proton energy gaps for
and
2.8. Exercise 1: Derivation of Hartree-Fock equations¶
Consider a Slater determinant built up of single-particle orbitals
The unitary transformation
brings us into the new basis.
The new basis has quantum numbers
a) Show that the new basis is orthonormal.
b)
Show that the new Slater determinant constructed from the new single-particle wave functions can be
written as the determinant based on the previous basis and the determinant of the matrix
c) Show that the old and the new Slater determinants are equal up to a complex constant with absolute value unity.
Hint.
Use the fact that
2.9. Exercise 2: Derivation of Hartree-Fock equations¶
Consider the Slater determinant
A small variation in this function is given by
a) Show that
2.10. Exercise 3: Developing a Hartree-Fock program¶
Neutron drops are a powerful theoretical laboratory for testing,
validating and improving nuclear structure models. Indeed, all
approaches to nuclear structure, from ab initio theory to shell model
to density functional theory are applicable in such systems. We will,
therefore, use neutron drops as a test system for setting up a
Hartree-Fock code. This program can later be extended to studies of
the binding energy of nuclei like
The Hamiltonian for a system of
with
The Hartree-Fock algorithm can be broken down as follows. We recall that our Hartree-Fock matrix is
Normally we assume that the single-particle basis
The Hartree-Fock eigenvalue problem
can be written out in a more compact form as
The equations are often rewritten in terms of a so-called density matrix, which is defined as
It means that we can rewrite the Hartree-Fock Hamiltonian as
It is convenient to use the density matrix since we can precalculate in every iteration the product of two eigenvector components
Note that
The python
program
shows how one can, in a brute force way read in matrix elements in
The nucleon-nucleon two-body matrix elements are in
import numpy as np
from decimal import Decimal
# expectation value for the one body part, Harmonic oscillator in three dimensions
def onebody(i, n, l):
homega = 10.0
return homega*(2*n[i] + l[i] + 1.5)
if __name__ == '__main__':
Nparticles = 16
""" Read quantum numbers from file """
index = []
n = []
l = []
j = []
mj = []
tz = []
spOrbitals = 0
with open("nucleispnumbers.dat", "r") as qnumfile:
for line in qnumfile:
nums = line.split()
if len(nums) != 0:
index.append(int(nums[0]))
n.append(int(nums[1]))
l.append(int(nums[2]))
j.append(int(nums[3]))
mj.append(int(nums[4]))
tz.append(int(nums[5]))
spOrbitals += 1
""" Read two-nucleon interaction elements (integrals) from file, brute force 4-dim array """
nninteraction = np.zeros([spOrbitals, spOrbitals, spOrbitals, spOrbitals])
with open("nucleitwobody.dat", "r") as infile:
for line in infile:
number = line.split()
a = int(number[0]) - 1
b = int(number[1]) - 1
c = int(number[2]) - 1
d = int(number[3]) - 1
nninteraction[a][b][c][d] = Decimal(number[4])
""" Set up single-particle integral """
singleparticleH = np.zeros(spOrbitals)
for i in range(spOrbitals):
singleparticleH[i] = Decimal(onebody(i, n, l))
""" Star HF-iterations, preparing variables and density matrix """
""" Coefficients for setting up density matrix, assuming only one along the diagonals """
C = np.eye(spOrbitals) # HF coefficients
DensityMatrix = np.zeros([spOrbitals,spOrbitals])
for gamma in range(spOrbitals):
for delta in range(spOrbitals):
sum = 0.0
for i in range(Nparticles):
sum += C[gamma][i]*C[delta][i]
DensityMatrix[gamma][delta] = Decimal(sum)
maxHFiter = 100
epsilon = 1.0e-5
difference = 1.0
hf_count = 0
oldenergies = np.zeros(spOrbitals)
newenergies = np.zeros(spOrbitals)
while hf_count < maxHFiter and difference > epsilon:
print("############### Iteration %i ###############" % hf_count)
HFmatrix = np.zeros([spOrbitals,spOrbitals])
for alpha in range(spOrbitals):
for beta in range(spOrbitals):
""" If tests for three-dimensional systems, including isospin conservation """
if l[alpha] != l[beta] and j[alpha] != j[beta] and mj[alpha] != mj[beta] and tz[alpha] != tz[beta]: continue
""" Setting up the Fock matrix using the density matrix and antisymmetrized NN interaction in m-scheme """
sumFockTerm = 0.0
for gamma in range(spOrbitals):
for delta in range(spOrbitals):
if (mj[alpha]+mj[gamma]) != (mj[beta]+mj[delta]) and (tz[alpha]+tz[gamma]) != (tz[beta]+tz[delta]): continue
sumFockTerm += DensityMatrix[gamma][delta]*nninteraction[alpha][gamma][beta][delta]
HFmatrix[alpha][beta] = Decimal(sumFockTerm)
""" Adding the one-body term, here plain harmonic oscillator """
if beta == alpha: HFmatrix[alpha][alpha] += singleparticleH[alpha]
spenergies, C = np.linalg.eigh(HFmatrix)
""" Setting up new density matrix in m-scheme """
DensityMatrix = np.zeros([spOrbitals,spOrbitals])
for gamma in range(spOrbitals):
for delta in range(spOrbitals):
sum = 0.0
for i in range(Nparticles):
sum += C[gamma][i]*C[delta][i]
DensityMatrix[gamma][delta] = Decimal(sum)
newenergies = spenergies
""" Brute force computation of difference between previous and new sp HF energies """
sum =0.0
for i in range(spOrbitals):
sum += (abs(newenergies[i]-oldenergies[i]))/spOrbitals
difference = sum
oldenergies = newenergies
print ("Single-particle energies, ordering may have changed ")
for i in range(spOrbitals):
print('{0:4d} {1:.4f}'.format(i, Decimal(oldenergies[i])))
hf_count += 1
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
Input In [1], in <cell line: 8>()
17 tz = []
18 spOrbitals = 0
---> 19 with open("nucleispnumbers.dat", "r") as qnumfile:
20 for line in qnumfile:
21 nums = line.split()
FileNotFoundError: [Errno 2] No such file or directory: 'nucleispnumbers.dat'
Running the program, one finds that the lowest-lying states for a nucleus like
The values of the lowest-lying states are (
Quantum numbers | Energy [MeV] |
---|---|
$0s_{1/2}^{\pi}$ | -40.4602 |
$0s_{1/2}^{\pi}$ | -40.4602 |
$0s_{1/2}^{\nu}$ | -40.6426 |
$0s_{1/2}^{\nu}$ | -40.6426 |
$0p_{1/2}^{\pi}$ | -6.7133 |
$0p_{1/2}^{\pi}$ | -6.7133 |
$0p_{1/2}^{\nu}$ | -6.8403 |
$0p_{1/2}^{\nu}$ | -6.8403 |
$0p_{3/2}^{\pi}$ | -11.5886 |
$0p_{3/2}^{\pi}$ | -11.5886 |
$0p_{3/2}^{\pi}$ | -11.5886 |
$0p_{3/2}^{\pi}$ | -11.5886 |
$0p_{3/2}^{\nu}$ | -11.7201 |
$0p_{3/2}^{\nu}$ | -11.7201 |
$0p_{3/2}^{\nu}$ | -11.7201 |
$0p_{3/2}^{\nu}$ | -11.7201 |
$0d_{5/2}^{\pi}$ | 18.7589 |
$0d_{5/2}^{\nu}$ | 18.8082 |
For
2.11. Hartree-Fock in second quantization and stability of HF solution¶
We wish now to derive the Hartree-Fock equations using our second-quantized formalism and study the stability of the equations. Our ansatz for the ground state of the system is approximated as (this is our representation of a Slater determinant in second quantization)
We wish to determine
In our analysis here we will need Thouless’ theorem, which states that
an arbitrary Slater determinant
Let us give a simple proof of Thouless’ theorem. The theorem states that we can make a linear combination av particle-hole excitations with respect to a given reference state
To show this we need some intermediate steps. The exponential product of two operators
2.12. Thouless’ theorem¶
If the operators do not commute, we need to resort to the Baker-Campbell-Hauersdorf. This relation states that
with
From these relations, we note that
in our expression for
and it is easy to convince oneself that these commutators, or higher powers thereof, are all zero. This means that we can write out our new representation of a Slater determinant as
We note that
and all higher-order powers of these combinations of creation and annihilation operators disappear
due to the fact that
which we can rewrite as
The last equation can be written as
2.13. New operators¶
If we define a new creation operator
we have
meaning that the new representation of the Slater determinant in second quantization,
where
2.14. Showing that ¶
We need to show that
which is nothing but the determinant
meaning that
and
Using these relations we can then define the linear combination of creation (and annihilation as well) operators as
Defining
we can redefine
our starting point. We have shown that our general representation of a Slater determinant
with
This means that we can actually write an ansatz for the ground state of the system as a linear combination of
terms which contain the ansatz itself
where
In our derivation of the Hartree-Fock equations we have shown that
which means that we have to satisfy
With this as a background, we are now ready to study the stability of the Hartree-Fock equations.
2.15. Hartree-Fock in second quantization and stability of HF solution¶
The variational condition for deriving the Hartree-Fock equations guarantees only that the expectation value
with
Using Thouless’ theorem we can write out
where the amplitudes
The norm of
The expectation value for the energy is now given by (using the Hartree-Fock condition)
1 4 5
< < < ! ! M A T H _ B L O C K
We have already calculated the second term on the right-hand side of the previous equation
resulting in
which is nothing but
or
where we have used the relation
due to the hermiticity of
We define two matrix elements
and
both being anti-symmetrized.
With these definitions we write out the energy as
which can be rewritten as
and skipping higher-order terms we arrived
We have defined
with the vectors
and the matrix
with
The condition
for an arbitrary vector
means that all eigenvalues of the matrix have to be larger than or equal zero.
A necessary (but no sufficient) condition is that the matrix elements (for all
This equation can be used as a first test of the stability of the Hartree-Fock equation.