ueg_fci¶
Full Configuration Interaction (FCI) method for the uniform electron gas.
This is a particularly simple implementation: little attempt is made to conserve memory or CPU time. Nevertheless, it is useful for small test calculations, in particular for investigating ideas about the sign problem in the Full Configuration Interaction Quantum Monte Carlo method discussed by Spencer, Blunt and Foulkes (J. Chem. Phys. 136, 054110 (2012); arXiv:1110.5479).
FCI calculations can be performed in a Slater determinant, permanent or Hartree product basis.
Note that no attempt is made to tackle finite size effects.
Warning
The Hartree product basis set is much larger than the determinant/permanent basis set, even for tiny systems. Thus the system sizes which can be tackled using the Hartree product basis are far more limited.
-
class
ueg_fci.
BasisFn
(i, j, k, L, spin)¶ Basis function with wavevector \(2\pi(i,j,k)^{T}/L\) of the desired spin.
Parameters: - i, j, k (integer) – integer labels (quantum numbers) of the wavevector
- L (float) – dimension of the cubic simulation cell of size \(L\times L \times L\)
- spin (integer) – spin of the basis function (-1 for a down electron, +1 for an up electron)
-
ueg_fci.
total_momentum
(basis_iterable)¶ Calculate the total momentum of a many-particle basis function.
Parameters: basis_iterable (iterable of BasisFn
objects) – many-particle basis functionReturns: the total momentum, in units of \(2\pi/L\), of the basis functions in basis_iterable
-
class
ueg_fci.
UEG
(nel, nalpha, nbeta, rs)¶ Create a representation of a 3D uniform electron gas.
Parameters: - nel (integer) – number of electrons
- nalpha (integer) – number of alpha (spin-up) electrons
- nbeta (integer) – number of beta (spin-down) electrons
- rs (float) – electronic density
-
nel
= None¶ number of electrons
-
nalpha
= None¶ number of alpha (spin-up) electrons
-
nbeta
= None¶ number of beta (spin-down) electrons
-
rs
= None¶ electronic density
-
L
= None¶ length of the cubic simulation cell containing nel electrons at the density of rs
-
Omega
= None¶ volume of the cubic simulation cell containing nel electrons at the density of rs
-
coulomb_int
(q)¶ Calculate the Coulomb integral \(\langle k \; k' | k+q \; k'-q \rangle\).
The Coulomb integral:
\[\langle k \; k' | k+q \; k'-q \rangle = \frac{4\pi}{\Omega q^2}\]where \(\Omega\) is the volume of the simulation cell, is independent of the wavevectors \(k\) and \(k'\) and hence only the \(q\) vector is required.
Parameters: q (numpy.array) – momentum transfer vector (in absolute units)
-
ueg_fci.
init_ueg_basis
(sys, cutoff, sym)¶ Create single-particle and the many-particle bases.
Parameters: - sys (
UEG
) – UEG system to be studied. - cutoff (float) – energy cutoff, in units of \((2\pi/L)^2\), defining the single-particle basis. Only single-particle basis functions with a kinetic energy equal to or less than the cutoff are considered.
- sym (numpy.array) – integer vector defining the wavevector, in units of \(2\pi/L\), representing the desired symmetry. Only Hartree products and determinants of this symmetry are returned.
Returns: (basis_fns, hartree_products, determinants) where:
- basis_fns
tuple of relevant
BasisFn
objects, ie the single-particle basis set.- hartree_products
tuple containing all Hartree products formed from basis_fns.
- determinants
tuple containing all Slater determinants formed from basis_fns.
Determinants and Hartree products are represented as tuples of
BasisFn
objects.- sys (
-
class
ueg_fci.
HartreeUEGHamiltonian
(sys, basis, tau=0.1)¶ Bases:
hamil.Hamiltonian
Hamiltonian class for the UEG in a Hartree product basis.
sys must be a
UEG
object and the single-particle basis functions must beBasisFn
objects.The Hartree product basis is the set of all possible permutations of electrons in the single-particle basis set. It is sufficient (and cheaper) to consider one spin and momentum block of the Hamiltonian at a time.
-
mat_fn_diag
(p)¶ Calculate a diagonal Hamiltonian matrix element.
Parameters: p (iterable of BasisFn
objects) – a Hartree product basis function, \(|p_1\rangle\)Return type: float Returns: \(\langle p|H|p \rangle\)
-
mat_fn_offdiag
(p1, p2)¶ Calculate an off-diagonal matrix element.
Parameters: Return type: float
Returns: \(\langle p_1|H|p_2 \rangle\)
-
-
class
ueg_fci.
DeterminantUEGHamiltonian
(sys, basis, tau=0.1)¶ Bases:
hamil.Hamiltonian
Hamiltonian class for the UEG in a Slater determinant basis.
sys must be a
UEG
object and the single-particle basis functions must beBasisFn
objects.The Slater determinant basis is the set of all possible combinations of electrons in the single-particle basis set. It is sufficient (and cheaper) to consider one spin and momentum block of the Hamiltonian at a time.
-
mat_fn_diag
(d)¶ Calculate a diagonal Hamiltonian matrix element.
Parameters: d (iterable of BasisFn
objects) – a Slater determinant basis function, \(|d\rangle\)Return type: float Returns: \(\langle d|H|d \rangle\)
-
mat_fn_offdiag
(d1, d2)¶ Calculate an off-diagonal Hamiltonian matrix element.
Parameters: Return type: float
Returns: \(\langle d_1|H|d_2 \rangle\).
-
-
class
ueg_fci.
PermanentUEGHamiltonian
(sys, basis, tau=0.1)¶ Bases:
hamil.Hamiltonian
Hamiltonian class for the UEG in a permanent basis.
sys must be a
UEG
object and the single-particle basis functions must beBasisFn
objects.The permanent basis is the set of all possible combinations of electrons in the single-particle basis set, and hence is identical to the Slater determinant basis. It is sufficient (and cheaper) to consider one spin and momentum block of the Hamiltonian at a time.
-
mat_fn_diag
(p)¶ Calculate a diagonal Hamiltonian matrix element.
Parameters: p (iterable of BasisFn
objects) – a permanent basis function, \(|p\rangle\)Return type: float Returns: \(\langle p|H|p \rangle\).
-
mat_fn_offdiag
(p1, p2)¶ Calculate an off-diagonal Hamiltonian matrix element.
Parameters: Return type: float
Returns: \(\langle p_1|H|p_2 \rangle\).
-