Reference
Contents
Index
KagomeDSL.DoubleKagome
KagomeDSL.MC
KagomeDSL.MC
Carlo.init!
Carlo.sweep!
KagomeDSL.Hmat
KagomeDSL.Sz
KagomeDSL.find_initial_configuration!
KagomeDSL.getOL
KagomeDSL.getxprime
KagomeDSL.init_conf_qr!
KagomeDSL.is_occupied
KagomeDSL.spinInteraction!
KagomeDSL.tilde_U
KagomeDSL.update_W!
KagomeDSL.update_W_matrices!
KagomeDSL.DoubleKagome
— Methoddouble triangle unit cell Kagome lattice
note n1
here is still the number of repititions of triangle in the a1
direction, so n1
is asserted to be even. The total number is n1 * n2 * 3
sites.
KagomeDSL.MC
— MethodMC(params::AbstractDict)
Create a Monte Carlo object from a dictionary of parameters. This is the user-facing, high-level constructor.
KagomeDSL.MC
— MethodMC(Ham, kappa_up, kappa_down, W_up, W_down)
Create a Monte Carlo object from its core components. This constructor automatically creates the necessary cache arrays. It's useful for internal logic and testing.
Carlo.init!
— MethodCarlo.init!(mc::MC, ctx::MCContext, params::AbstractDict)
Initialize the Monte Carlo object params
n1
:Int
number of cells in x directionn2
:Int
number of cells in y directionPBC
:Tuple{Bool,2}
boundary condition, e.g. (false, false)
Carlo.sweep!
— MethodCarlo.sweep!(mc::MC, ctx::MCContext) -> Nothing
Perform one Monte Carlo sweep for the Mott state simulation. This implements a two-spin swap update where electrons can exchange positions between different spin states at occupied sites.
Note: The W matrices are re-evaluated periodically (every n_occupied sweeps) to maintain numerical stability. If the re-evaluation fails due to singular matrices, a warning is issued and the simulation continues.
KagomeDSL.Hmat
— MethodHmat(
lat::DoubleKagome;
link_in = pi_link_in,
link_inter = pi_link_inter,
B = 0.0,
) -> Matrix{ComplexF64}
Constructs the Spinon Hamiltonian matrix for a DoubleKagome
lattice.
This function calculates the hopping terms within and between unit cells, incorporating a Peierls phase to account for a magnetic field B
. The resulting matrix represents the Hamiltonian of the system.
Arguments
lat::DoubleKagome
: The lattice structure for which to construct the Hamiltonian.link_in
: A dictionary defining in-cell hopping terms. Defaults topi_link_in
.link_inter
: A dictionary defining inter-cell hopping terms. Defaults topi_link_inter
.B::Float64
: The magnetic field strength, used to calculate the Peierls phase. Defaults to0.0
.
Returns
Matrix{ComplexF64}
: The Hamiltonian matrix for the given lattice and parameters.
KagomeDSL.Sz
— MethodSz(i::Int, kappa_up::Vector{Int}, kappa_down::Vector{Int}) -> Float64
$Sz = 1/2 (f^†_{↑} f_{↑} - f^†_{↓} f_{↓})$ Calculate the z-component of spin at site i
given up and down spin configurations.
Returns: +1/2 for up spin -1/2 for down spin
Throws: ArgumentError: if site is doubly occupied or empty BoundsError: if i is outside the valid range
KagomeDSL.find_initial_configuration!
— Methodfind_initial_configuration!(mc::MC, rng::AbstractRNG, ns::Int, N_up::Int, n1::Int)
Finds a non-singular initial configuration for the MC simulation. This version uses a deterministic QR-based method and should not require retries.
KagomeDSL.getOL
— MethodThe observable $O_L = \frac{<x|H|\psi_G>}{<x|\psi_G>}$ The Hamiltonian should be the real one!
KagomeDSL.getxprime
— Methodreturn $|x'> = H|x>$ where $H$ is the Heisenberg Hamiltonian Note $|x>$ here should also be a Mott state.
KagomeDSL.init_conf_qr!
— Methodinit_conf_qr!(mc::MC, ns::Int, N_up::Int)
Ref: Quantum Monte Carlo Approaches for Correlated Systems (Becca and Sorella, 2017) P130
As system size increases, $<Φ|x>$ becomes exponentially small comparing to system size, inversely proportional to the dimension of the Hilbert space.
The smallness of init $<Φ|x>$ will lead to numerical instability in the first computation of the W matrices, but not affecting the Markov chain sampling, since we always calculate $\frac{<Φ|x'>}{<Φ|x>}$ there, which shall not be a numerically instable number.
To avoid this issue we initializes the particle configurations kappa_up
and kappa_down
in the mc
object using a deterministic method based on QR decomposition with column pivoting.
This approach is designed to select a set of sites for the up and down spin electrons that corresponds to a set of linearly independent rows from the U_up
and U_down
matrices, respectively. This maximizes the chances of producing a non-singular tilde_U
matrix, avoiding the need for random trial-and-error.
The procedure is as follows:
- It performs QR decomposition on
mc.Ham.U_up'
to select theN_up
most linearly independent rows (sites) for the up-spin electrons. - It then takes the remaining, unoccupied sites and performs a second QR decomposition on the corresponding subset of
mc.Ham.U_down'
to select theN_down
sites for the down-spin electrons.
Parameters:
mc
: The Monte Carlo object, which will be modified in-place.ns
: The total number of sites in the lattice.N_up
: The number of up-spin electrons.
KagomeDSL.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
KagomeDSL.spinInteraction!
— MethodspinInteraction!(xprime::Dict, kappa_up::Vector{Int}, kappa_down::Vector{Int}, i::Int, j::Int)
Compute the spin flip term 1/2(S+i S-j + S-i S+j) contribution to xprime.
The function handles two cases:
- S+i S-j: when j has up spin and i has down spin
- S-i S+j: when i has up spin and j has down spin
Each case contributes with coefficient 1/2.
KagomeDSL.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
KagomeDSL.update_W!
— Methodupdate_W!(W::AbstractMatrix; l::Int, K::Int)
Update the W matrix $W'_{I,j} = W_{I,j} - W_{I,l} / W_{K,l} * (W_{K,j} - \delta_{l,j})$
KagomeDSL.update_W_matrices!
— Methodupdate_W_matrices(mc::MC; K_up::Int, K_down::Int, l_up::Int, l_down::Int)
Update the W matrices