lattice_fci

Implement the spinless fermion lattice model defined by the Hamiltonian

\[\begin{split}H = - \sum_{<ij>} t \left( c^\dagger_j c_i + c^\dagger_i c_j - u n_i n_j \right)\end{split}\]

in both Hartree product and Slater determinant bases on a square lattice of dimension \(L \times L\).

This is a simple example of when the sign problem in FCIQMC is identical in both first- and second-quantized bases.

This is an implementation of the model originally proposed by Michael Kolodrubetz and Bryan Clark (Princeton).

class lattice_fci.LatticeSite(x, y, L)

Basis function of a lattice site at location \((x,y)\) in a \(L \times L\) square lattice.

Parameters:
  • x (integer) – x coordinate of lattice site.
  • y (integer) – y coordinate of lattice site.
  • L (integer) – dimension of lattice cell.
x = None

x coordinate of lattice site.

y = None

y coordinate of lattice site.

loc = None

unique index of lattice site.

class lattice_fci.LatticeModel(nfermions, L, t=1, u=1)

Representation of the lattice model system defined by the Hamiltonian:

\[\begin{split}H = - \sum_{<ij>} t \left( c^\dagger_j c_i + c^\dagger_i c_j - u n_i n_j \right)\end{split}\]
Parameters:
  • nfermions (integer) – dimension of simulation cell
  • L (integer) – number of spinless fermions in the simulation cell
  • t (float) – hopping (kinetic) parameter in Hamiltonian operator
  • u (float) – Coulomb parameter in Hamiltonian operator
nfermions = None

number of spinless fermions in the simulation cell

L = None

dimension of simulation cell

t = None

Hopping parameter

u = None

Coulomb parameter

hopping_int(site1, site2)

Calculate the hopping integral between two fermions.

Parameters:
  • site1 (LatticeSite) – lattice site, \(s_1\), occupied by a fermion
  • site2 (LatticeSite) – lattice site, \(s_2\), occupied by a fermion
Returns:

\(u \sum_{<ij>} \langle s_1 | u n_i n_j | s_2 \rangle\)

coulomb_int(site1, site2)

Calculate the Coulomb integral between two fermions.

Parameters:
  • site1 (LatticeSite) – lattice site, \(s_1\), occupied by a fermion
  • site2 (LatticeSite) – lattice site, \(s_2\), occupied by a fermion
Returns:

\(-t \sum_{<ij>} \langle s_1 | c^\dagger_j c_i + c^\dagger_i c_j | s_2 \rangle\)

lattice_fci.init_lattice_basis(nfermions, L)

Construct many-fermion bases.

Parameters:
  • nfermions (integer) – number of fermions in a simulation cell.
  • L (integer) – dimension of 2D square simulation cell, where each lattice site contains a single-partle basis function.
Returns:

(hartree_producs, determinants) where:

hartree_products

tuple containing all Hartree products.

determinants

tuple containing all Slater determinants.

Determinants and Hartree products are represented as tuples of LatticeSite objects.

class lattice_fci.HartreeLatticeHamiltonian(sys, basis, tau=0.1)

Bases: hamil.Hamiltonian

Hamiltonian for the fermion lattice model in a Hartree product basis.

sys must be a LatticeModel object and the underlying single-particle basis functions must be LatticeSite objects.

The Hartree product basis is the set of all possible permutations of fermions in the single-particle basis set.

mat_fn_diag(b)

Calculate a diagonal Hamiltonian matrix element.

Parameters:b (iterable of LatticeSite objects) – a Hartree product basis function, \(|b\rangle\)
Return type:float
Returns:\(\langle b|H|b \rangle\)
mat_fn_offdiag(bi, bj)

Calculate an off-diagonal Hamiltonian matrix element.

Parameters:
  • bi (iterable of LatticeSite objects) – a Hartree product basis function, \(|b_i\rangle\)
  • bj (iterable of LatticeSite objects) – a Hartree product basis function, \(|b_j\rangle\)
Return type:

float

Returns:

\(\langle b_i|H|b_j \rangle\).

class lattice_fci.DeterminantLatticeHamiltonian(sys, basis, tau=0.1)

Bases: hamil.Hamiltonian

Hamiltonian for the fermion lattice model in a Slater determinant basis.

sys must be a LatticeModel object and the underlying single-particle basis functions must be LatticeSite objects.

The Slater determinant basis is the set of all possible combinations of fermions in the single-particle basis set.

mat_fn_diag(b)

Calculate a diagonal Hamiltonian matrix element.

Parameters:b (iterable of LatticeSite objects) – a Slater determinant basis function, \(|b\rangle\)
Return type:float
Returns:\(\langle b|H|b \rangle\)
mat_fn_offdiag(bi, bj)

Calculate an off-diagonal Hamiltonian matrix element.

Parameters:
  • bi (iterable of LatticeSite objects) – a Slater determinant basis function, \(|b_i\rangle\)
  • bj (iterable of LatticeSite objects) – a Slater determinant basis function, \(|b_j\rangle\)
Return type:

float

Returns:

\(\langle b_i|H|b_j \rangle\).

lattice_fci.print_wfn(basis, pos, neg)

Print out a stochastic wavefunction represented on a basis.

Parameters:
  • basis (iterable of iterable of LatticeSite objects) – many-fermion basis
  • pos (1D vector of length basis) – weight of positive psips on each basis function
  • neg (1D vector of length basis) – weight of negative psips on each basis function
lattice_fci.print_two_fermion_wfn(basis, pos, neg, L)

Print out a stochastic wavefunction represented on a basis.

Assumes there are two fermions in the simulation cell.

Parameters:
  • basis (iterable of iterable of LatticeSite objects) – many-fermion basis
  • pos (1D vector of length basis) – weight of positive psips on each basis function
  • neg (1D vector of length basis) – weight of negative psips on each basis function
  • L (integer) – dimension of lattice cell.