Reference
Contents
Index
FastFermionSampling.AHmodel
FastFermionSampling.AHmodel
FastFermionSampling.Gutzwiller
FastFermionSampling.LatticeRectangular
FastFermionSampling.MC
Carlo.init!
Carlo.register_evaluables
FastFermionSampling.FFS
FastFermionSampling.add_diagonal_term!
FastFermionSampling.add_hop!
FastFermionSampling.add_hopping_terms!
FastFermionSampling.add_hubbard_terms!
FastFermionSampling.add_onsite_terms!
FastFermionSampling.add_spin_hopping!
FastFermionSampling.check_shell
FastFermionSampling.classify_term
FastFermionSampling.compute_contribution
FastFermionSampling.fast_G_update
FastFermionSampling.getHmat
FastFermionSampling.getOL
FastFermionSampling.getOg
FastFermionSampling.getxprime
FastFermionSampling.is_occupied
FastFermionSampling.site_occupation
FastFermionSampling.tilde_U
FastFermionSampling.AHmodel
— TypeAnderson-Hubbard Model
lattice
:LatticeRectangular{B}
The lattice structuret
:Float64
Hopping parameterW
:Float64
Disorder strength, on site energy is sampled fromN(0, W/2)
U
:Float64
On-site interaction strengthNup
:Int
Number of up spinsNdown
:Int
Number of down spinsomega
:Vector{Float64}
Random on-site energiesU_up
:Matrix{Float64}
Unitary matrix for up spinsU_down
:Matrix{Float64}
Unitary matrix for down spins
FastFermionSampling.AHmodel
— MethodAHmodel(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
FastFermionSampling.Gutzwiller
— TypeGutzwiller 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)$.
FastFermionSampling.LatticeRectangular
— MethodLatticeRectangular(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-directionny
: number of sites in y-directionB
: boundary condition, eitherPeriodic
orOpen
FastFermionSampling.MC
— MethodMC(params::AbstractDict)
Create a Monte Carlo object
Carlo.init!
— MethodCarlo.init!(mc::MC, ctx::MCContext, params::AbstractDict)
Initialize the Monte Carlo object params
nx
:Int
number of sites in x directionny
:Int
number of sites in y directionB
:AbstractBoundary
boundary condition,Periodic
orOpen
t
:Float64
hopping parameterW
:Float64
disorder strengthU
:Float64
on-site interaction strengthN_up
:Int
number of up spinsN_down
:Int
number of down spins
Carlo.register_evaluables
— Method$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}$
FastFermionSampling.FFS
— MethodFFS([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 ≤ 0LinearAlgebra.SingularException
: If null space calculation fails
FastFermionSampling.add_diagonal_term!
— MethodAdd a diagonal term to the Hamiltonian
FastFermionSampling.add_hop!
— MethodAdd a single hopping term to the Hamiltonian
FastFermionSampling.add_hopping_terms!
— MethodAdd hopping terms for both spin species
FastFermionSampling.add_hubbard_terms!
— MethodAdd Hubbard interaction terms
FastFermionSampling.add_onsite_terms!
— MethodAdd on-site energy terms
FastFermionSampling.add_spin_hopping!
— MethodAdd hopping terms for a specific spin
FastFermionSampling.check_shell
— Methodcheck_shell(E::AbstractArray, Nup::Int, ns::Int)
Check if the whole degenerate shell of single particle eigenstates are filled.
FastFermionSampling.classify_term
— MethodClassify the type of Hamiltonian term based on its key.
FastFermionSampling.compute_contribution
— MethodCompute contribution to local energy from a specific term.
FastFermionSampling.fast_G_update
— Methodfast_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
FastFermionSampling.getHmat
— MethodgetHmat(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
FastFermionSampling.getOL
— MethodgetOL(mc::MC{B}) -> Float64
Compute the local energy $O_L = \frac{⟨x|H|\psi_G⟩}{⟨x|\psi_G⟩}$.
This includes:
- Diagonal terms (on-site energy and Hubbard interaction)
- Up-spin hopping terms
- Down-spin hopping terms
Returns
OL::Float64
: The local energy
FastFermionSampling.getOg
— MethodgetOg(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}$
FastFermionSampling.getxprime
— Methodgetxprime(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$
FastFermionSampling.is_occupied
— Methodis_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
FastFermionSampling.site_occupation
— MethodCalculate electron occupation (0 or 1) at a site.
FastFermionSampling.tilde_U
— Methodtilde_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