Morten Hjorth-Jensen, National Superconducting Cyclotron Laboratory and Department of Physics and Astronomy, Michigan State University, East Lansing, MI 48824, USA & Department of Physics, University of Oslo, Oslo, Norway
Date: July 2015
Studies of infinite nuclear matter play an important role in nuclear physics. The aim of this part of the lectures is to provide the necessary ingredients for perfoming studies of neutron star matter (or matter in $\beta$-equilibrium) and symmetric nuclear matter. We start however with the electron gas in two and three dimensions for both historical and pedagogical reasons. Since there are several benchmark calculations for the electron gas, this small detour will allow us to establish the necessary formalism. Thereafter we will study infinite nuclear matter
at the Hartree-Fock with realistic nuclear forces and
using many-body methods like coupled-cluster theory or in-medium SRG as discussed in our previous sections.
The electron gas is perhaps the only realistic model of a system of many interacting particles that allows for a solution of the Hartree-Fock equations on a closed form. Furthermore, to first order in the interaction, one can also compute on a closed form the total energy and several other properties of a many-particle systems. The model gives a very good approximation to the properties of valence electrons in metals. The assumptions are
System of electrons that is not influenced by external forces except by an attraction provided by a uniform background of ions. These ions give rise to a uniform background charge. The ions are stationary.
The system as a whole is neutral.
We assume we have $N_e$ electrons in a cubic box of length $L$ and volume $\Omega=L^3$. This volume contains also a uniform distribution of positive charge with density $N_ee/\Omega$.
The homogeneous electron gas is one of the few examples of a system of many interacting particles that allows for a solution of the mean-field Hartree-Fock equations on a closed form. To first order in the electron-electron interaction, this applies to ground state properties like the energy and its pertinent equation of state as well. The homogeneus electron gas is a system of electrons that is not influenced by external forces except by an attraction provided by a uniform background of ions. These ions give rise to a uniform background charge. The ions are stationary and the system as a whole is neutral. Irrespective of this simplicity, this system, in both two and three-dimensions, has eluded a proper description of correlations in terms of various first principle methods, except perhaps for quantum Monte Carlo methods. In particular, the diffusion Monte Carlo calculations of Ceperley and Ceperley and Tanatar are presently still considered as the best possible benchmarks for the two- and three-dimensional electron gas.
The electron gas, in two or three dimensions is thus interesting as a test-bed for electron-electron correlations. The three-dimensional electron gas is particularly important as a cornerstone of the local-density approximation in density-functional theory. In the physical world, systems similar to the three-dimensional electron gas can be found in, for example, alkali metals and doped semiconductors. Two-dimensional electron fluids are observed on metal and liquid-helium surfaces, as well as at metal-oxide-semiconductor interfaces. However, the Coulomb interaction has an infinite range, and therefore long-range correlations play an essential role in the electron gas.
At low densities, the electrons become localized and form a lattice. This so-called Wigner crystallization is a direct consequence of the long-ranged repulsive interaction. At higher densities, the electron gas is better described as a liquid. When using, for example, Monte Carlo methods the electron gas must be approximated by a finite system. The long-range Coulomb interaction in the electron gas causes additional finite-size effects that are not present in other infinite systems like nuclear matter or neutron star matter. This poses additional challenges to many-body methods when applied to the electron gas.
This is a homogeneous system and the one-particle wave functions are given by plane wave functions normalized to a volume $\Omega$ for a box with length $L$ (the limit $L\rightarrow \infty$ is to be taken after we have computed various expectation values)
where $\mathbf{k}$ is the wave number and $\xi_{\sigma}$ is a spin function for either spin up or down
We assume first that the electrons interact via a central, symmetric and translationally invariant interaction $V(r_{12})$ with $r_{12}=|\mathbf{r}_1-\mathbf{r}_2|$. The interaction is spin independent.
The total Hamiltonian consists then of kinetic and potential energy
The operator for the kinetic energy can be written as
with the electronic part
where we have introduced an explicit convergence factor (the limit $\mu\rightarrow 0$ is performed after having calculated the various integrals). Correspondingly, we have
which is the energy contribution from the positive background charge with density $n(\mathbf{r})=N/\Omega$. Finally,
resulting in
The previous result can be rewritten in terms of the density
where $n=N_e/\Omega$, $N_e$ being the number of electrons, and $r_s$ is the radius of a sphere which represents the volum per conducting electron.
It can be convenient to use the Bohr radius $a_0=\hbar^2/e^2m_e$.
For most metals we have a relation $r_s/a_0\sim 2-6$. The quantity $r_s$ is dimensionless.
In the second exercise below we find that the total energy $E_0/N_e=\langle\Phi_{0}|\hat{H}|\Phi_{0}\rangle/N_e$ for for this system to first order in the interaction is given as
a) Show first that
Hint. Hint: Introduce the convergence factor $e^{-\mu\vert\mathbf{r}-\mathbf{r}'\vert}$ in the potential and use $\sum_{\mathbf{k}}\rightarrow \frac{V}{(2\pi)^{3}}\int d\mathbf{k}$
Solution. We want to show that, given the Hartree-Fock equation for the electron gas
the single-particle energy can be written as
We introduce the convergence factor $e^{-\mu\vert\mathbf{r}-\mathbf{r}'\vert}$ in the potential and use $\sum_{\mathbf{k}}\rightarrow \frac{V}{(2\pi)^{3}}\int d\mathbf{k}$. We can then rewrite the integral as
and introducing the abovementioned convergence factor we have
With a change variables to $\mathbf{x} = \mathbf{r}-\mathbf{r}'$ and $\mathbf{y}=\mathbf{r}'$ we rewrite the last integral as
The integration over $\mathbf{x}$ can be performed using spherical coordinates, resulting in (with $x=\vert \mathbf{x}\vert$)
We obtain
This results gives us
where we have used that the integrand on the left-hand side does not depend on $\mathbf{y}$ and that $\int d\mathbf{y}=V$.
Introducing spherical coordinates we can rewrite the integral as
and with the change of variables $\cos{(\theta)}=u$ we have
which gives
Introducing new variables $x=p+k$ and $y=p-k$, we obtain after some straightforward reordering of the integral
which gives the abovementioned expression for the single-particle energy.
b) Rewrite the above result as a function of the density
where $n=N/V$, $N$ being the number of particles, and $r_s$ is the radius of a sphere which represents the volum per conducting electron.
Solution. Introducing the dimensionless quantity $x=k/k_F$ and the function
we can rewrite the single-particle Hartree-Fock energy as
and dividing by the non-interacting contribution at the Fermi level,
we have
where $a_0=0.0529$ nm is the Bohr radius, setting thereby a natural length scale.
By introducing the radius $r_s$ of a sphere whose volume is the volume occupied by each electron, we can rewrite the previous equation in terms of $r_s$ using that the electron density $n=N/V$
we have (with $k_F=1.92/r_s$,
with $r_s \sim 2-6$ for most metals.
It can be convenient to use the Bohr radius $a_0=\hbar^2/e^2m$. For most metals we have a relation $r_s/a_0\sim 2-6$.
c) Make a plot of the free electron energy and the Hartree-Fock energy and discuss the behavior around the Fermi surface. Extract also the Hartree-Fock band width $\Delta\varepsilon^{HF}$ defined as
Compare this results with the corresponding one for a free electron and comment your results. How large is the contribution due to the exchange term in the Hartree-Fock equation?
Solution. We can now define the so-called band gap, that is the scatter between the maximal and the minimal value of the electrons in the conductance band of a metal (up to the Fermi level). For $x=1$ and $r_s/a_0=4$ we have
and for $x=0$ we have
which results in a gap at the Fermi level of
This quantity measures the deviation from the $k=0$ single-particle energy and the energy at the Fermi level. The general result is
The following python code produces a plot of the electron energy for a free electron (only kinetic energy) and for the Hartree-Fock solution. We have chosen here a ratio $r_s/a_0=4$ and the equations are plotted as funtions of $k/f_F$.
In [1]:
%matplotlib inline
import numpy as np
from math import log
from matplotlib import pyplot as plt
from matplotlib import rc, rcParams
import matplotlib.units as units
import matplotlib.ticker as ticker
rc('text',usetex=True)
rc('font',**{'family':'serif','serif':['Hartree-Fock energy']})
font = {'family' : 'serif',
'color' : 'darkred',
'weight' : 'normal',
'size' : 16,
}
N = 100
x = np.linspace(0.0, 2.0,N)
F = 0.5+np.log(abs((1.0+x)/(1.0-x)))*(1.0-x*x)*0.25/x
y = x*x -4.0*0.663*F
plt.plot(x, y, 'b-')
plt.plot(x, x*x, 'r-')
plt.title(r'{\bf Hartree-Fock single-particle energy for electron gas}', fontsize=20)
plt.text(3, -40, r'Parameters: $r_s/a_0=4$', fontdict=font)
plt.xlabel(r'$k/k_F$',fontsize=20)
plt.ylabel(r'$\varepsilon_k^{HF}/\varepsilon_0^F$',fontsize=20)
# Tweak spacing to prevent clipping of ylabel
plt.subplots_adjust(left=0.15)
plt.savefig('hartreefockspelgas.pdf', format='pdf')
plt.show()
From the plot we notice that the exchange term increases considerably the band gap compared with the non-interacting gas of electrons.
We will now define a quantity called the effective mass. For $\vert\mathbf{k}\vert$ near $k_{F}$, we can Taylor expand the Hartree-Fock energy as
If we compare the latter with the corresponding expressiyon for the non-interacting system
we can define the so-called effective Hartree-Fock mass as
d) Compute $m_{HF}^{*}$ and comment your results.
e) Show that the level density (the number of single-electron states per unit energy) can be written as
Calculate $n(\varepsilon_{F}^{HF})$ and comment the results.
We consider a system of electrons in infinite matter, the so-called electron gas. This is a homogeneous system and the one-particle states are given by plane wave function normalized to a volume $\Omega$ for a box with length $L$ (the limit $L\rightarrow \infty$ is to be taken after we have computed various expectation values)
where $\mathbf{k}$ is the wave number and $\xi_{\sigma}$ is a spin function for either spin up or down
We assume that we have periodic boundary conditions which limit the allowed wave numbers to
We assume first that the particles interact via a central, symmetric and translationally invariant interaction $V(r_{12})$ with $r_{12}=|\mathbf{r}_1-\mathbf{r}_2|$. The interaction is spin independent.
The total Hamiltonian consists then of kinetic and potential energy
The operator for the kinetic energy is given by
a) Find the expression for the interaction $\hat{V}$ expressed with creation and annihilation operators. The expression for the interaction has to be written in $k$ space, even though $V$ depends only on the relative distance. It means that you need to set up the Fourier transform $\langle \mathbf{k}_i\mathbf{k}_j| V | \mathbf{k}_m\mathbf{k}_n\rangle$.
Solution. A general two-body interaction element is given by (not using anti-symmetrized matrix elements)
where $\hat{v}$ is assumed to depend only on the relative distance between two interacting particles, that is $\hat{v} = v(\vec r_1, \vec r_2) = v(|\vec r_1 - \vec r_2|) = v(r)$, with $r = |\vec r_1 - \vec r_2|$). In our case we have, writing out explicitely the spin degrees of freedom as well
Inserting plane waves as eigenstates we can rewrite the matrix element as
where we have used the orthogonality properties of the spin functions. We change now the variables of integration by defining $\mathbf{r} = \mathbf{r}_p - \mathbf{r}_q$, which gives $\mathbf{r}_p = \mathbf{r} + \mathbf{r}_q$ and $d^3 \mathbf{r} = d^3 \mathbf{r}_p$. The limits are not changed since they are from $-\infty$ to $\infty$ for all integrals. This results in
We recognize the integral over $\mathbf{r}_q$ as a $\delta$-function, resulting in
For this equation to be different from zero, we must have conservation of momenta, we need to satisfy $\mathbf{k}_p + \mathbf{k}_q = \mathbf{k}_r + \mathbf{k}_s$. We can use the conservation of momenta to remove one of the summation variables resulting in
which can be rewritten as
This equation will be useful for our nuclear matter calculations as well. In the last equation we defined the quantities $\mathbf{p} = \mathbf{k}_p + \mathbf{k}_q - \mathbf{k}_r$, $\mathbf{k} = \mathbf{k}_r$ og $\mathbf{q} = \mathbf{k}_p - \mathbf{k}_r$.
b) Calculate thereafter the reference energy for the infinite electron gas in three dimensions using the above expressions for the kinetic energy and the potential energy.
Solution. Let us now compute the expectation value of the reference energy using the expressions for the kinetic energy operator and the interaction. We need to compute $\langle \Phi_0\vert \hat{H} \vert \Phi_0\rangle = \langle \Phi_0\vert \hat{T} \vert \Phi_0\rangle + \langle \Phi_0\vert \hat{V} \vert \Phi_0\rangle$, where $\vert \Phi_0\rangle$ is our reference Slater determinant, constructed from filling all single-particle states up to the Fermi level. Let us start with the kinetic energy first
From the possible contractions using Wick's theorem, it is straightforward to convince oneself that the expression for the kinetic energy becomes
The sum of the spin degrees of freedom results in a factor of two only if we deal with identical spin $1/2$ fermions. Changing to spherical coordinates, the integral over the momenta $k$ results in the final expression
The density of states in momentum space is given by $2\Omega/(2\pi)^3$, where we have included the degeneracy due to the spin degrees of freedom. The volume is given by $4\pi k_F^3/3$, and the number of particles becomes
This gives us
We are now ready to calculate the expectation value of the potential energy
The only contractions which result in non-zero results are those that involve states below the Fermi level, that is $k \leq k_F$, $p \leq k_F$, $|\mathbf{p} - \mathbf{q}| < \mathbf{k}_F$ and $|\mathbf{k} + \mathbf{q}| \leq k_F$. Due to momentum conservation we must also have $\mathbf{k} + \mathbf{q} = \mathbf{p}$, $\mathbf{p} - \mathbf{q} = \mathbf{k}$ and $\sigma = \sigma'$ or $\mathbf{k} + \mathbf{q} = \mathbf{k}$ and $\mathbf{p} - \mathbf{q} = \mathbf{p}$. Summarizing, we must have
We obtain then
The first term is the so-called direct term while the second term is the exchange term. We can rewrite this equation as (and this applies to any potential which depends only on the relative distance between particles)
where we have used the fact that a sum like $\sum_{\sigma}\sum_{\mathbf{k}}$ equals the number of particles. Using the fact that the density is given by $\rho = N/\Omega$, with $\Omega$ being our volume, we can rewrite the last equation as
For the electron gas the interaction part of the Hamiltonian operator is given by
with the electronic part
where we have introduced an explicit convergence factor (the limit $\mu\rightarrow 0$ is performed after having calculated the various integrals). Correspondingly, we have
which is the energy contribution from the positive background charge with density $n(\mathbf{r})=N/\Omega$. Finally,
is the interaction between the electrons and the positive background. We can show that
and
For the electron gas and a Coulomb interaction, these two terms are cancelled (in the thermodynamic limit) by the contribution from the direct term arising from the repulsive electron-electron interaction. What remains then when computing the reference energy is only the kinetic energy contribution and the contribution from the exchange term. For other interactions, like nuclear forces with a short range part and no infinite range, we need to compute both the direct term and the exchange term.
c) Show thereafter that the final Hamiltonian can be written as
with
and
d) Calculate $E_0/N=\langle \Phi_{0}\vert H\vert \Phi_{0}\rangle/N$ for for this system to first order in the interaction. Show that, by using
with $\rho=N/\Omega$, $r_0$ being the radius of a sphere representing the volume an electron occupies and the Bohr radius $a_0=\hbar^2/e^2m$, that the energy per electron can be written as
Here we have defined $r_s=r_0/a_0$ to be a dimensionless quantity.
e) Plot your results. Why is this system stable? Calculate thermodynamical quantities like the pressure, given by
and the bulk modulus
where the sum is taken over all particles in the finite box. The Ewald electron-electron interaction operator can be written as
where $v_{E}(\mathbf{r})$ is the effective two-body interaction and $v_{0}$ is the self-interaction, defined as $v_{0} = \lim_{\mathbf{r} \rightarrow 0} \left\{ v_{E}(\mathbf{r}) - 1/r\right\} $.
The negative electron charges are neutralized by a positive, homogeneous background charge. Fraser et al. explain how the electron-background and background-background terms, $\hat{H}_{eb}$ and $\hat{H}_{bb}$, vanish when using Ewald's interaction for the three-dimensional electron gas. Using the same arguments, one can show that these terms are also zero in the corresponding two-dimensional system.
In the three-dimensional electron gas, the Ewald interaction is
where $\mathbf{u}_{i}$ is the unit vector for dimension $i$, is defined for all integers $n_{x}$, $n_{y}$, and $n_{z}$. These vectors are used to obtain all image cells in the entire real space. The parameter $\eta $ decides how the Coulomb interaction is divided into a short-ranged and long-ranged part, and does not alter the total function. However, the number of operations needed to calculate the Ewald interaction with a desired accuracy depends on $\eta $, and $\eta $ is therefore often chosen to optimize the convergence as a function of the simulation-cell size. In our calculations, we choose $\eta $ to be an infinitesimally small positive number, similarly as was done by Shepherd et al. and Roggero et al..
This gives an interaction that is evaluated only in Fourier space.
When studying the two-dimensional electron gas, we use an Ewald interaction that is quasi two-dimensional. The interaction is derived in three dimensions, with Fourier discretization in only two dimensions. The Ewald effective interaction has the form
where the Fourier vectors $\mathbf{k}$ and the position vector $\mathbf{r}_{xy}$ are defined in the $(x,y)$ plane. When applying the interaction $v_{E}(\mathbf{r})$ to two-dimensional systems, we set $z$ to zero.
Similarly as in the three-dimensional case, also here we choose $\eta $ to approach zero from above. The resulting Fourier-transformed interaction is
where the Kronecker delta functions $\delta_{\mathbf{k}_{p}\mathbf{k}_{r}}$ and $\delta_{\mathbf{k}_{p}\mathbf{k}_{s}}$ ensure that the contribution with zero momentum transfer vanishes.
Similarly, the matrix elements for the two-dimensional electron gas are
where the single-particle momentum vectors $\mathbf{k}_{p,q,r,s}$ are now defined in two dimensions.
In actual calculations, the single-particle energies, defined by the operator $\hat{f}$, are given by
are associated with the single-particle energy
for two-dimensional sytems and
for three-dimensional systems.
We choose the single-particle basis such that both the occupied and unoccupied single-particle spaces have a closed-shell structure. This means that all single-particle states corresponding to energies below a chosen cutoff are included in the basis. We study only the unpolarized spin phase, in which all orbitals are occupied with one spin-up and one spin-down electron.
The table illustrates how single-particle energies fill energy shells in a two-dimensional electron box. Here $n_{x}$ and $n_{y}$ are the momentum quantum numbers, $n_{x}^{2} + n_{y}^{2}$ determines the single-particle energy level, $N_{\uparrow \downarrow }$ represents the cumulated number of spin-orbitals in an unpolarized spin phase, and $N_{\uparrow \uparrow }$ stands for the cumulated number of spin-orbitals in a spin-polarized system.
Finally, a useful benchmark for our calculations is the expression for the reference energy $E_0$ per particle. Defining the $T=0$ density $\rho_0$, we can in turn determine in three dimensions the radius $r_0$ of a sphere representing the volume an electron occupies (the classical electron radius) as
In two dimensions the corresponding quantity is
One can then express the reference energy per electron in terms of the dimensionless quantity $r_s=r_0/a_0$, where we have introduced the Bohr radius $a_0=\hbar^2/e^2m$. The energy per electron computed with the reference Slater determinant can then be written as (using hereafter only atomic units, meaning that $\hbar = m = e = 1$)
for the three-dimensional electron gas. For the two-dimensional gas the corresponding expression is (show this)
For an infinite homogeneous system, there are some particular simplications due to the conservation of the total momentum of the particles. By symmetry considerations, the total momentum of the system has to be zero. Both the kinetic energy operator and the total Hamiltonian $\hat{H}$ are assumed to be diagonal in the total momentum $\mathbf{K}$. Hence, both the reference state $\Phi_{0}$ and the correlated ground state $\Psi$ must be eigenfunctions of the operator $\mathbf{\hat{K}}$ with the corresponding eigemnvalue $\mathbf{K} = \mathbf{0}$. This leads to important simplications to our different many-body methods. In coupled cluster theory for example, all terms that involve single particle-hole excitations vanish.
a) Set up the possible magic numbers for the electron gas in three dimensions using periodic boundary conditions..
Hint. Follow the example for the two-dimensional electron gas and add the third dimension via the quantum number $n_z$.
Solution. Using the same approach as made with the two-dimensional electron gas with the single-particle kinetic energy defined as
and
we can set up a similar table and obtain (assuming identical particles one and including spin up and spin down solutions) for energies less than or equal to $n_{x}^{2}+n_{y}^{2}+n_{z}^{2}\le 3$
If we wish to study infinite nuclear matter with both protons and neutrons, the above magic numbers become $4, 28, 76, 108, 132, 228, \dots$.
b) Every number of particles for filled shells defines also the number of particles to be used in a given calculation. Use the number of particles to define the density of the system
where you need to define $k_F$ and the degeneracy $g$, which is two for one type of spin-$1/2$ particles and four for symmetric nuclear matter.
c) Use the density to find the length $L$ of the box used with periodic boundary contributions, that is use the relation
You can use $L$ to define the spacing to set up the spacing between varipus $k$-values, that is
Here, $A$ can be the number of nucleons. If we deal with the electron gas only, this needs to be replaced by the number of electrons $N$.
d) Calculate thereafter the Hartree-Fock total energy for the electron gas or infinite nuclear matter using the Minnesota interaction discussed during the lectures. Compare the results with the exact Hartree-Fock results for the electron gas as a function of the number of particles.
e) Compute now the contribution to the correlation energy for the electron gas at the level of second-order perturbation theory using a given number of electrons $N$ and a given (defined by you) number of single-particle states above the Fermi level. The following Python code shows an implementation for the electron gas in three dimensions for second perturbation theory using the Coulomb interaction. Here we have hard-coded a case which computes the energy for $N=14$ and a total of $5$ major shells.
Solution.
In [2]:
from numpy import *
class electronbasis():
def __init__(self, N, rs, Nparticles):
############################################################
##
## Initialize basis:
## N = number of shells
## rs = parameter for volume
## Nparticles = Number of holes (conflicting naming, sorry)
##
###########################################################
self.rs = rs
self.states = []
self.nstates = 0
self.nparticles = Nparticles
self.nshells = N - 1
self.Nm = N + 1
self.k_step = 2*(self.Nm + 1)
Nm = N
n = 0 #current shell
ene_integer = 0
while n <= self.nshells:
is_shell = False
for x in range(-Nm, Nm+1):
for y in range(-Nm, Nm+1):
for z in range(-Nm,Nm+1):
e = x*x + y*y + z*z
if e == ene_integer:
is_shell = True
self.nstates += 2
self.states.append([e, x,y,z,1])
self.states.append([e, x,y,z, -1])
if is_shell:
n += 1
ene_integer += 1
self.L3 = (4*pi*self.nparticles*self.rs**3)/3.0
self.L2 = self.L3**(2/3.0)
self.L = pow(self.L3, 1/3.0)
for i in range(self.nstates):
self.states[i][0] *= 2*(pi**2)/self.L**2 #Multiplying in the missing factors in the single particle energy
self.states = array(self.states) #converting to array to utilize vectorized calculations
def hfenergy(self, nParticles):
#Calculate the HF-energy (reference energy) for nParticles particles
e0 = 0.0
if nParticles<=self.nstates:
for i in range(nParticles):
e0 += self.h(i,i)
for j in range(nParticles):
if j != i:
e0 += .5*self.v(i,j,i,j)
else:
#Safety for cases where nParticles exceeds size of basis
print "Not enough basis states."
return e0
def h(self, p,q):
#Return single particle energy
return self.states[p,0]*(p==q)
def v(self,p,q,r,s):
#Two body interaction for electron gas
val = 0
terms = 0.0
term1 = 0.0
term2 = 0.0
kdpl = self.kdplus(p,q,r,s)
if kdpl != 0:
val = 1.0/self.L3
if self.kdspin(p,r)*self.kdspin(q,s)==1:
if self.kdwave(p,r) != 1.0:
term1 = self.L2/(pi*self.absdiff2(r,p))
if self.kdspin(p,s)*self.kdspin(q,r)==1:
if self.kdwave(p,s) != 1.0:
term2 = self.L2/(pi*self.absdiff2(s,p))
return val*(term1-term2)
#The following is a series of kroenecker deltas used in the two-body interactions.
#Just ignore these lines unless you suspect an error here
def kdi(self,a,b):
#Kroenecker delta integer
return 1.0*(a==b)
def kda(self,a,b):
#Kroenecker delta array
d = 1.0
#print a,b,
for i in range(len(a)):
d*=(a[i]==b[i])
return d
def kdfullplus(self,p,q,r,s):
#Kroenecker delta wavenumber p+q,r+s
return self.kda(self.states[p][1:5]+self.states[q][1:5],self.states[r][1:5]+self.states[s][1:5])
def kdplus(self,p,q,r,s):
#Kroenecker delta wavenumber p+q,r+s
return self.kda(self.states[p][1:4]+self.states[q][1:4],self.states[r][1:4]+self.states[s][1:4])
def kdspin(self,p,q):
#Kroenecker delta spin
return self.kdi(self.states[p][4], self.states[q][4])
def kdwave(self,p,q):
#Kroenecker delta wavenumber
return self.kda(self.states[p][1:4],self.states[q][1:4])
def absdiff2(self,p,q):
val = 0.0
for i in range(1,4):
val += (self.states[p][i]-self.states[q][i])*(self.states[p][i]-self.states[q][i])
return val
def MBPT2(bs):
#2. order MBPT Energy
Nh = bs.nparticles
Np = bs.nstates-bs.nparticles #Note the conflicting notation here. bs.nparticles is number of hole states
vhhpp = zeros((Nh**2, Np**2))
vpphh = zeros((Np**2, Nh**2))
#manual MBPT(2) energy (Should be -0.525588309385 for 66 states, shells = 5, in this code)
psum2 = 0
for i in range(Nh):
for j in range(Nh):
for a in range(Np):
for b in range(Np):
#val1 = bs.v(i,j,a+Nh,b+Nh)
#val2 = bs.v(a+Nh,b+Nh,i,j)
#if val1!=val2:
# print val1, val2
vhhpp[i + j*Nh, a+b*Np] = bs.v(i,j,a+Nh,b+Nh)
vpphh[a+b*Np,i + j*Nh] = bs.v(a+Nh,b+Nh,i,j)/(bs.states[i,0] + bs.states[j,0] - bs.states[a + Nh, 0] - bs.states[b+Nh,0])
psum = .25*sum(dot(vhhpp,vpphh).diagonal())
return psum
def MBPT2_fast(bs):
#2. order MBPT Energy
Nh = bs.nparticles
Np = bs.nstates-bs.nparticles #Note the conflicting notation here. bs.nparticles is number of hole states
vhhpp = zeros((Nh**2, Np**2))
vpphh = zeros((Np**2, Nh**2))
#manual MBPT(2) energy (Should be -0.525588309385 for 66 states, shells = 5, in this code)
psum2 = 0
for i in range(Nh):
for j in range(i):
for a in range(Np):
for b in range(a):
val = bs.v(i,j,a+Nh,b+Nh)
eps = val/(bs.states[i,0] + bs.states[j,0] - bs.states[a + Nh, 0] - bs.states[b+Nh,0])
vhhpp[i + j*Nh, a+b*Np] = val
vhhpp[j + i*Nh, a+b*Np] = -val
vhhpp[i + j*Nh, b+a*Np] = -val
vhhpp[j + i*Nh, b+a*Np] = val
vpphh[a+b*Np,i + j*Nh] = eps
vpphh[a+b*Np,j + i*Nh] = -eps
vpphh[b+a*Np,i + j*Nh] = -eps
vpphh[b+a*Np,j + i*Nh] = eps
psum = .25*sum(dot(vhhpp,vpphh).diagonal())
return psum
#user input here
number_of_shells = 5
number_of_holes = 14 #(particles)
#initialize basis
bs = electronbasis(number_of_shells,1.0,number_of_holes) #shells, r_s = 1.0, holes
#Print some info to screen
print "Number of shells:", number_of_shells
print "Number of states:", bs.nstates
print "Number of holes :", bs.nparticles
print "Reference Energy:", bs.hfenergy(number_of_holes), "hartrees "
print " :", 2*bs.hfenergy(number_of_holes), "rydbergs "
print "Ref.E. per hole :", bs.hfenergy(number_of_holes)/number_of_holes, "hartrees "
print " :", 2*bs.hfenergy(number_of_holes)/number_of_holes, "rydbergs "
#calculate MBPT2 energy
print "MBPT2 energy :", MBPT2_fast(bs), " hartrees"
As we will see later, for the infinite electron gas, second-order perturbation theory diverges in the thermodynamical limit, a feature which can easily be noted if one lets the number of single-particle states above the Fermi level to increase. The resulting expression in a Cartesian basis will not converge.