Reference

Contents

Index

FastFermionSampling.AHmodelType

Anderson-Hubbard Model

  • lattice : LatticeRectangular{B} The lattice structure
  • t: Float64 Hopping parameter
  • W : Float64 Disorder strength, on site energy is sampled from N(0, W/2)
  • U : Float64 On-site interaction strength
  • Nup : Int Number of up spins
  • Ndown : Int Number of down spins
  • omega : Vector{Float64} Random on-site energies
  • U_up : Matrix{Float64} Unitary matrix for up spins
  • U_down : Matrix{Float64} Unitary matrix for down spins
source
FastFermionSampling.AHmodelMethod
AHmodel(lattice::LatticeRectangular{B}, t::Float64, W::Float64, U::Float64, N_up::Int, N_down::Int)

Generate Anderson-Hubbard model and get the sampling ensemble

Raise warning if the shell of degenerate eigenstates are not whole-filled

source
FastFermionSampling.GutzwillerType

Gutzwiller Ansatz

  • g : Float64 Gutzwiller factor

Store the Gutzwiller factor parameter g.

The Gutzwiller factor is defined as $G = \exp(-g/2 \sum_i (n_i - n_{mean})^2)$.

source
FastFermionSampling.LatticeRectangularMethod
LatticeRectangular(nx::Int, ny::Int, B::Periodic)
LatticeRectangular(nx::Int, ny::Int, B::Open)

Generate a rectangular lattice with periodic or open boundary conditions

  • nx : number of sites in x-direction
  • ny : number of sites in y-direction
  • B : boundary condition, either Periodic or Open
source
Carlo.init!Method
Carlo.init!(mc::MC, ctx::MCContext, params::AbstractDict)

Initialize the Monte Carlo object params

  • nx : Int number of sites in x direction
  • ny : Int number of sites in y direction
  • B : AbstractBoundary boundary condition, Periodic or Open
  • t : Float64 hopping parameter
  • W : Float64 disorder strength
  • U : Float64 on-site interaction strength
  • N_up : Int number of up spins
  • N_down : Int number of down spins
source
Carlo.register_evaluablesMethod

$fg$ the gradient of ⟨E_g⟩

Get the gradient of the observable, $f_g = - ∂ ⟨E_g⟩/ ∂ g$.

``math \begin{align} fk &= -2 ℜ[⟨OL(x)^* × (Og(x)- ⟨Og⟩) ⟩ ]\ &= -2 ℜ[⟨OL(x)^* × Og(x) ⟩ - ⟨OL(x)^* ⟩ × ⟨Og⟩ ]\ \end{align} ``

Fisher Scalar

Get the Fisher Matrix of the observable, $S_{k,k'} = ℜ⟨⟨O_k O_{k'}⟩⟩ = ℜ( ⟨O_k O_{k'}⟩ -⟨O_k⟩ ⟨O_{k'}⟩ )$ where $k$ and $k'$ are labels of the parameters of the model.

When ansatz has only one parameter, the Fisher Matrix is a scalar, and the Fisher Information is the inverse of the Fisher Matrix.

Structure Factor in low momentum

$N_q = ⟨⟨n_qn_{-q}⟩⟩_{disorder}- ⟨⟨n_q⟩⟨n_{-q}⟩⟩_{disorder}$

source
FastFermionSampling.FFSMethod
FFS([rng=default_rng()], ensemble_matrix::AbstractMatrix)

Employs the Fast Fermion Sampling Algorithm to sample free fermion states.

Arguments

  • rng: Random number generator (optional)
  • ensemble_matrix: Matrix of size L×N where:
    • L is the number of energy states
    • N is the number of fermions
    • Columns represent single-particle states

Returns

  • κ: Vector of Int, length L indicating the order in which states were sampled

Throws

  • ArgumentError: If matrix dimensions are invalid or N ≤ 0
  • LinearAlgebra.SingularException: If null space calculation fails
source
FastFermionSampling.fast_G_updateMethod
fast_G_update(κup::Vector{Int}, κdown::Vector{Int}, g::Float64; K::Int, l::Int, spin::Spin) -> Float64

Compute the Gutzwiller factor ratio for a single electron hop.

The Gutzwiller factor ratio for an electron hopping from site R_l to site K(=R_l' is:

\[\begin{aligned} \frac{G_{new}}{G_{old}} &= \exp(-\frac{g}{2}[(n_K+1 - n_{mean})^2 - (n_K-n_{mean})^2 + (n_{R_l}-1-n_{mean})^2 - (n_{R_l}-n_{mean})^2]) \\ &= \exp(-\frac{g}{2}[(2n_K + 1 - 2n_{mean}) - (2n_{R_l}-1-2n_{mean})]) \\ &= \exp(-g[n_K - n_{R_l} + 1]) \end{aligned}\]

Returns

  • ratio::Float64: The ratio of new to old Gutzwiller factors

Throws

  • ArgumentError: If indices are invalid or state not found
source
FastFermionSampling.getHmatMethod
getHmat(lattice::LatticeRectangular{B}, t::Float64, omega::Vector{Float64}, N_up::Int, N_down::Int)'

Get the non-interacting Anderson model Hamiltonian Matrix to construct Slater Determinants

source
FastFermionSampling.getOLMethod
getOL(mc::MC{B}) -> Float64

Compute the local energy $O_L = \frac{⟨x|H|\psi_G⟩}{⟨x|\psi_G⟩}$.

This includes:

  1. Diagonal terms (on-site energy and Hubbard interaction)
  2. Up-spin hopping terms
  3. Down-spin hopping terms

Returns

  • OL::Float64: The local energy
source
FastFermionSampling.getOgMethod
getOg(orbitals::AHmodel{B}, conf_up::BitVector, conf_down::BitVector)

The local operator to update the variational parameter g $mathcal{O}_k(x)=\frac{\partial \ln \Psi_\alpha(x)}{\partial \alpha_k}$

source
FastFermionSampling.getxprimeMethod
getxprime(orb::AHmodel{B}, κup::Vector{Int}, κdown::Vector{Int})

Compute $|x'> = H|x>$ where $H = -t ∑_{<i,j>} c_i^† c_j + U ∑_i n_{i↓} n_{i↑} + ∑_i ω_i n_i$

source
FastFermionSampling.is_occupiedMethod
is_occupied(kappa::Vector{Int}, l::Int) -> Bool

Check if site l is occupied in the kappa configuration vector.

Throws: BoundsError: if l is outside the valid range of kappa

source
FastFermionSampling.tilde_UMethod
tilde_U(U::AbstractMatrix, kappa::Vector{Int})

Creates a tilde matrix by rearranging rows of U according to kappa indices.

Parameters:

  • U: Source matrix of size (n × m)
  • kappa: Vector of indices where each non-zero value l indicates that row Rl of U should be placed at row l of the output

Returns:

  • A matrix of size (m × m) with same element type as U
source