Reference
Contents
Index
KagomeDSL.DoubleKagome
KagomeDSL.Hamiltonian
KagomeDSL.Hamiltonian
KagomeDSL.MC
KagomeDSL.MC
KagomeDSL.MC
Carlo.init!
Carlo.measure!
Carlo.read_checkpoint!
Carlo.register_evaluables
Carlo.sweep!
Carlo.write_checkpoint
KagomeDSL.Hmat
KagomeDSL.Sz
KagomeDSL.SzInteraction!
KagomeDSL.Z
KagomeDSL.apply_boundary_conditions!
KagomeDSL.find_initial_configuration!
KagomeDSL.getOL
KagomeDSL.get_boundary_shifts
KagomeDSL.get_nn
KagomeDSL.get_site_coord
KagomeDSL.getxprime
KagomeDSL.init_conf_qr!
KagomeDSL.is_occupied
KagomeDSL.orbitals
KagomeDSL.reevaluateW!
KagomeDSL.spinInteraction!
KagomeDSL.tilde_U
KagomeDSL.unitcell_coord
KagomeDSL.unitcell_diff
KagomeDSL.update_W!
KagomeDSL.update_W_matrices!
KagomeDSL.update_configurations!
KagomeDSL.DoubleKagome
— MethodDoubleKagome(t::Float64, n1::Int, n2::Int, PBC::Tuple{Bool,Bool}; antiPBC=(false,false), trunc=Inf)
Construct a double unit cell Kagome lattice with 6 sites per unit cell.
Unlike a single unit cell Kagome lattice (which has 3 sites per unit cell forming one triangle), the DoubleKagome lattice contains 6 sites per unit cell arranged in two triangular sublattices. This structure is useful for studying systems with enlarged unit cells or specific magnetic ordering patterns that require the doubled cell geometry.
Arguments
t::Float64
: Parameter defining the equilateral triangle side length (lattice constant = 2t)n1::Int
: Number of unit cell repetitions in the a1 direction (must be even)n2::Int
: Number of unit cell repetitions in the a2 directionPBC::Tuple{Bool,Bool}
: Periodic boundary conditions in (a1, a2) directionsantiPBC::Tuple{Bool,Bool}
: Antiperiodic boundary conditions (default: (false, false))trunc::Float64
: Truncation parameter (default: Inf, unused in current implementation)
Returns
DoubleKagome
: Lattice structure withn1 * n2 * 3
total sites
Notes
- The constraint
n1 % 2 == 0
ensures proper tiling of the double unit cell - Total number of sites is
n1 * n2 * 3
(though each unit cell has 6 sites,n1
counts double-sized cells) - Actual number of unit cells is
(n1 ÷ 2) * n2
, each containing 6 sites - Lattice vectors: a1 = [4t, 0], a2 = [t, √3*t]
- Each unit cell contains 6 sites arranged in two triangular motifs
Example
# Create a 4×3 DoubleKagome lattice with periodic boundaries
lat = DoubleKagome(1.0, 4, 3, (true, true))
# Total sites: 4 * 3 * 3 = 36 sites (2 unit cells × 3 repetitions × 6 sites per unit cell)
KagomeDSL.Hamiltonian
— TypeHamiltonian
Complete specification of the spinon mean-field Hamiltonian for quantum Monte Carlo simulations.
This structure contains all information needed for Variational Monte Carlo calculations of quantum spin liquid properties:
Fields
N_up::Int
: Number of up-spin spinons (determines spin sector)N_down::Int
: Number of down-spin spinonsU_up::Matrix{ComplexF64}
: Occupied up-spinon orbitals (columns are eigenvectors)U_down::Matrix{ComplexF64}
: Occupied down-spinon orbitalsH_mat::Matrix{ComplexF64}
: Single-particle spinon Hamiltonian matrixnn::AbstractArray
: List of nearest-neighbor bonds for efficient iteration
Usage in Monte Carlo
- Uup, Udown define the reference state (filled Fermi sea)
- H_mat provides the hopping amplitudes for Monte Carlo updates
- nn specifies which bonds to consider in interaction terms
Physical Interpretation
- Represents a quantum spin liquid state where spins are fractionalized
- Correlations arise from quantum fluctuations around the mean-field state
KagomeDSL.Hamiltonian
— MethodHamiltonian(N_up, N_down, lat; link_in=pi_link_in, link_inter=pi_link_inter, B=0.0)
Construct a complete Hamiltonian structure for quantum Monte Carlo simulations.
This is the main constructor that builds everything needed for SSE Monte Carlo:
- Constructs the single-particle spinon Hamiltonian matrix
- Diagonalizes it to find the occupied orbitals
- Extracts the nearest-neighbor bond structure
- Packages everything for efficient Monte Carlo usage
Arguments
N_up::Int, N_down::Int
: Number of up/down spinons (determines magnetic sector)lat::AbstractLattice
: Lattice structure (typically DoubleKagome)link_in
: Intra-cell hopping dictionary (default: π-flux pattern)link_inter
: Inter-cell hopping dictionary (default: π-flux pattern)B::Float64
: Magnetic field strength for Peierls phases (default: 0.0)
Returns
Hamiltonian
: Complete structure ready for Monte Carlo simulations
Physics Notes
- The choice of Nup, Ndown determines the spin sector being studied
- For spin-1/2 systems: Nup + Ndown = number of original spins
- Different (Nup, Ndown) can access different quantum phases
KagomeDSL.MC
— TypeMC <: AbstractMC
Monte Carlo simulation state for quantum spin systems on the Kagome lattice.
Fields
Ham::Hamiltonian
: The Hamiltonian describing the physical systemkappa_up::Vector{Int}
: Configuration vector for up-spin electronskappa_down::Vector{Int}
: Configuration vector for down-spin electronsW_up::AbstractMatrix
: One-particle Green's function matrix for up-spin electronsW_down::AbstractMatrix
: One-particle Green's function matrix for down-spin electronsW_up_col_cache::AbstractVector
: Cache vector for column operations on W_upW_up_row_cache::AbstractVector
: Cache vector for row operations on W_upW_down_col_cache::AbstractVector
: Cache vector for column operations on W_downW_down_row_cache::AbstractVector
: Cache vector for row operations on W_down
KagomeDSL.MC
— MethodMC(params::AbstractDict)
Create a Monte Carlo object from a dictionary of parameters.
This is the user-facing, high-level constructor that initializes the Monte Carlo simulation state with appropriate dimensions and default configurations.
Arguments
params::AbstractDict
: Dictionary containing simulation parameters
Required Parameters
:n1::Int
: Number of unit cells in x-direction:n2::Int
: Number of unit cells in y-direction:PBC::Tuple{Bool,2}
: Periodic boundary conditions:N_up::Int
: Number of up-spin electrons:N_down::Int
: Number of down-spin electrons
Optional Parameters
:antiPBC::Tuple{Bool,2}
: Anti-periodic boundary conditions (default: (false, false)):lattice::Type
: Lattice type (default: DoubleKagome):B::Float64
: Magnetic field strength (default: 0.0):link_in::Function
: Intra-cell linking function (default: pilinkin):link_inter::Function
: Inter-cell linking function (default: pilinkinter)
Returns
MC
: Initialized Monte Carlo state object
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 for efficient matrix updates. It's primarily used for internal logic and testing purposes.
Arguments
Ham::Hamiltonian
: The Hamiltonian describing the physical systemkappa_up::Vector{Int}
: Initial up-spin configuration vectorkappa_down::Vector{Int}
: Initial down-spin configuration vectorW_up::AbstractMatrix
: Initial one-particle Green's function for up-spinW_down::AbstractMatrix
: Initial one-particle Green's function for down-spin
Returns
MC
: Monte Carlo state object with initialized cache arrays
Note
The cache arrays enable zero-allocation updates of the Green's function matrices using rank-1 update operations.
Carlo.init!
— MethodCarlo.init!(mc::MC, ctx::MCContext, params::AbstractDict)
Initialize the Monte Carlo object for Carlo.jl framework integration.
This function sets up the Monte Carlo simulation by finding an initial non-singular configuration using QR-based initialization.
Arguments
mc::MC
: Monte Carlo state objectctx::MCContext
: Carlo.jl context objectparams::AbstractDict
: Simulation parameters dictionary
Parameters Used
:n1::Int
: Number of unit cells in x-direction:n2::Int
: Number of unit cells in y-direction:N_up::Int
: Number of up-spin electrons
Note
This function integrates with the Carlo.jl framework and is called automatically during simulation initialization to prepare the Monte Carlo state.
Carlo.measure!
— Method@inline function Carlo.measure!(mc::MC, ctx::MCContext)
Measures observables during the simulation and collects data.
This function is called periodically during the simulation to measure physical observables like local energy and collect them for postprocessing.
Arguments
mc::MC
: Monte Carlo state objectctx::MCContext
: Carlo.jl context object
Measured Quantities
:OL
: Local energy estimatorgetOL(mc, mc.kappa_up, mc.kappa_down)
Note
Measurements are taken periodically (every n_occupied sweeps) to reduce correlation between samples and improve measurement efficiency.
Carlo.read_checkpoint!
— MethodCarlo.read_checkpoint!(mc::MC, in::HDF5.Group)
Restore Monte Carlo state from saved checkpoint for simulation continuation.
Purpose: Loads previously saved spin configurations to resume a simulation from a specific state or initialize postprocessing analysis.
Arguments
mc::MC
: Monte Carlo object to restore (modified in-place)in::HDF5.Group
: Input HDF5 group containing checkpoint data
Restored Data
kappa_up
: Up-spin configuration vectorkappa_down
: Down-spin configuration vector
Usage Contexts
- Simulation resumption: Continue interrupted long simulations
- Postprocessing initialization: Start analysis from specific configurations
- Reproducibility: Restore exact simulation states
Side Effects
- Modifies
mc.kappa_up
andmc.kappa_down
in-place - Overwrites current Monte Carlo configuration completely
Notes
- Called automatically by Carlo.jl when resuming from checkpoints
- Essential for maintaining simulation continuity
- Enables reproducible analysis workflows
Carlo.register_evaluables
— MethodCarlo.register_evaluables(::Type{MC}, eval::Evaluator, params::AbstractDict)
Register postprocessing evaluators for final analysis after Monte Carlo simulation.
IMPORTANT: This is purely for postprocessing - these evaluators are executed at the end of the simulation or during merge operations to compute final observables from the collected raw measurements. They do NOT affect the Monte Carlo dynamics.
This function defines how to compute physical observables from the raw measured data (:OL values) that was collected during the simulation via Carlo.measure!().
Arguments
::Type{MC}
: Monte Carlo type dispatcheval::Evaluator
: Carlo.jl evaluator for postprocessing computationsparams::AbstractDict
: Simulation parameters containing lattice dimensions
Registered Evaluables
:energy
: Computes the energy per site from local energy measurements- Formula: $energy = ⟨OL⟩ / ns$, where ns = total number of sites
- Input: Raw :OL measurements collected during simulation
- Output: Normalized energy per site for final results
Usage in Carlo.jl Workflow
- During simulation:
Carlo.measure!()
collects raw:OL
data - After simulation: This function defines how to postprocess the data
- Final analysis: Carlo.jl automatically applies these evaluators to compute final results
- Merge operations: Used when combining data from multiple simulation runs
Physics Notes
OL
represents the local energy estimator $⟨x|H|ψ_G⟩/⟨x|ψ_G⟩$- Normalization by
ns
gives energy per site (intensive quantity) - Essential for comparing results across different system sizes
Performance Notes
- Called only once during setup, not during simulation loops
- Actual evaluation happens in postprocessing phase
- Minimal computational overhead during Monte Carlo sampling
Carlo.sweep!
— MethodCarlo.sweep!(mc::MC, ctx::MCContext) -> Nothing
Perform one Monte Carlo sweep for Mott state simulation.
This function implements a two-spin swap update where electrons can exchange positions between different spin states at occupied neighboring sites.
Arguments
mc::MC
: Monte Carlo state objectctx::MCContext
: Carlo.jl context object
Algorithm
- Calculate number of valid spin exchange moves Zμ
- Use Metropolis acceptance criterion based on move probability
- Select random neighbor bond for potential exchange
- Calculate acceptance ratio using Green's function matrix elements
- Update configurations if move is accepted
- Periodically re-evaluate W matrices to maintain numerical stability
Note
The W matrices are re-evaluated periodically (every n_occupied sweeps) to override numerical instability from repeated rank-1 updates. If re-evaluation fails due to singular matrices, a warning is issued and simulation continues.
Carlo.write_checkpoint
— MethodCarlo.write_checkpoint(mc::MC, out::HDF5.Group)
Save Monte Carlo state for resuming simulations or postprocessing analysis.
Purpose: Serializes the current spin configuration to an HDF5 file for later use in simulation continuation or postprocessing workflows.
Arguments
mc::MC
: Monte Carlo state to saveout::HDF5.Group
: Output HDF5 group for writing checkpoint data
Saved Data
kappa_up
: Current up-spin configuration vectorkappa_down
: Current down-spin configuration vector
Usage Contexts
- Simulation checkpointing: Save state for restarting long simulations
- Postprocessing: Preserve final configurations for additional analysis
- Data archival: Store representative configurations for later study
Notes
- Called automatically by Carlo.jl during simulation checkpointing
- Essential for resuming interrupted simulations
- Enables analysis of specific configurations post-simulation
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
Calculate the z-component of spin at site i
in the spinon representation.
In the spinon formulation, the original spin operators are written as:
- S^zi = 1/2 (f^†{i↑} f{i↑} - f^†{i↓} f_{i↓})
- S^+i = f^†{i↑} f{i↓}, S^-i = f^†{i↓} f{i↑}
where f{iσ} are spinon annihilation operators. The constraint is exactly one spinon per site: n{i↑} + n_{i↓} = 1 (no double occupancy or empty sites).
Arguments
i::Int
: Site index (1-indexed)kappa_up::Vector{Int}
: Up-spinon configuration (0 = empty, nonzero = occupied)kappa_down::Vector{Int}
: Down-spinon configuration
Returns
Float64
: +0.5 for up spin, -0.5 for down spin
Exceptions
ArgumentError
: If site is doubly occupied or empty (violates spinon constraint)BoundsError
: If i is outside valid range [1, length(kappa_up)]DimensionMismatch
: If kappaup and kappadown have different lengths
Physics Notes
- This enforces the constraint that each site has exactly one spinon
- Configurations violating the constraint (empty or doubly occupied) are unphysical
- Used in Monte Carlo to measure local magnetization and Ising interactions
- The spinon constraint is fundamental to the validity of the spin liquid state
Performance Notes
- Marked @inline for performance in Monte Carlo loops
- Uses @boundscheck for optional bounds checking
- Calls is_occupied() helper function for spinon occupancy detection
KagomeDSL.SzInteraction!
— MethodSzInteraction!(xprime, kappa_up, kappa_down, i, j)
Compute the Ising (S^z S^z) interaction term for the Heisenberg Hamiltonian.
For the Heisenberg model H = J ∑{<i,j>} (S^+i S^-j + S^-i S^+j + S^zi S^zj), this function handles the S^zi S^z_j term, which is diagonal in the spinon basis.
The Ising term doesn't change the spinon configuration, so it contributes to the identity component of the operator expansion (stored with key (-1,-1,-1,-1)).
Arguments
xprime::Dict
: Dictionary storing operator expansion coefficientskappa_up::Vector{Int}
: Current up-spinon configurationkappa_down::Vector{Int}
: Current down-spinon configurationi::Int, j::Int
: Sites for the interaction
Side Effects
- Modifies xprime[(-1,-1,-1,-1)] by adding Sz(i) * Sz(j)
Physics Notes
- This is the "easy-axis" part of the Heisenberg interaction
- Diagonal in the occupation basis, doesn't create/destroy spinons
- Combined with spinInteraction!() to give the full Heisenberg model
KagomeDSL.Z
— MethodZ(nn::AbstractArray, kappa_up::AbstractVector, kappa_down::AbstractVector) -> Int
Count the number of valid spin exchange moves between neighboring sites.
This function calculates the number of neighboring site pairs where one site is occupied by an up-spin electron and the other by a down-spin electron, indicating potential spin exchange moves.
Arguments
nn::AbstractArray
: Array of neighbor bonds (site pairs)kappa_up::AbstractVector
: Up-spin configuration vectorkappa_down::AbstractVector
: Down-spin configuration vector
Returns
Int
: Number of valid spin exchange move opportunities
KagomeDSL.apply_boundary_conditions!
— Methodapply_boundary_conditions!(tunneling, lat, s1, s2, link_inter, B)
Apply boundary conditions and magnetic field effects to inter-cell hopping terms.
This function modifies the tunneling matrix by adding all possible hopping paths between sites s1 and s2, considering:
- Periodic/antiperiodic boundary conditions
- Peierls phase factors from magnetic field B
- π-flux pattern encoded in link_inter dictionary
Arguments
tunneling::AbstractMatrix
: Hopping matrix to be modified (in-place)lat::AbstractLattice
: Lattice structure with boundary conditionss1::Int, s2::Int
: Source and target site indiceslink_inter::Dict
: Inter-cell hopping amplitudes with (label1, label2, dx, dy) keysB::Float64
: Magnetic field strength for Peierls phase calculation
Physics Details
- Peierls phase: exp(iB/2 * (x1+x2)(y2-y1)) accounts for vector potential A = (0, Bx)
- Each boundary crossing can contribute ±1 phase factor from antiperiodic BC
KagomeDSL.find_initial_configuration!
— Methodfind_initial_configuration!(mc::MC, ns::Int, N_up::Int)
Find a non-singular initial configuration for Monte Carlo simulation.
This function uses a deterministic QR-based method to initialize particle configurations and compute the initial Green's function matrices.
Arguments
mc::MC
: Monte Carlo state object (modified in-place)ns::Int
: Total number of sites in the latticeN_up::Int
: Number of up-spin electrons
Algorithm
- Initialize configurations using QR decomposition with column pivoting
- Construct tilde_U matrices from the initialized configurations
- Solve linear systems to compute Green's function matrices
- Handle singular matrix exceptions with informative error messages
Throws
ErrorException
: If QR-based configuration produces singular matrices, indicating potential rank deficiency in the Hamiltonian
KagomeDSL.getOL
— MethodgetOL(mc::AbstractMC, kappa_up, kappa_down) -> Float64
Compute the local energy estimator for quantum Monte Carlo.
Calculates the observable OL = ⟨x|H|ψG⟩/⟨x|ψ_G⟩, which provides an unbiased estimator of the ground state energy in the Stochastic Series Expansion method.
In the spinon mean-field framework:
- |ψ_G⟩ is the Slater Determinant spinon state (Gutzwiller projected)
- |x⟩ = |κup⟩ ⊗ |κdown⟩ is a particular spinon configuration
- H is the original Heisenberg Hamiltonian (not the mean-field one!)
The ratio gives the local contribution to the energy from configuration |x⟩.
Arguments
mc::AbstractMC
: Monte Carlo state containing Wup, Wdown matriceskappa_up::Vector{Int}
: Current up-spinon configurationkappa_down::Vector{Int}
: Current down-spinon configuration
Returns
Float64
: Local energy contribution from this configuration
Algorithm
- Compute H|x⟩ using getxprime() to get all reachable configurations
- For diagonal terms: directly add the Ising contributions
- For off-diagonal terms: weight by the wavefunction amplitude ratios Wup, Wdown
- Sum all contributions to get the local energy
Physics Notes
- This is the "local energy" in variational Monte Carlo terminology
- Fluctuations in O_L reflect the quality of the trial wavefunction
- Used to measure energy and other observables in quantum spin liquids
- The Hamiltonian H must be the original physical one, not the mean-field approximation
Performance Notes
- Critical function called in every Monte Carlo step
- Bounds checking disabled with @inbounds for performance
- Uses efficient iteration over pairs() for dictionary access
KagomeDSL.get_boundary_shifts
— Methodget_boundary_shifts(lat::AbstractLattice, s1::Int, s2::Int) -> Vector{Tuple{Int,Int,Float64}}
Calculate all possible lattice vector shifts between sites s1 and s2 under periodic/antiperiodic boundary conditions.
For quantum spin systems with twisted boundary conditions:
- Periodic BC: ψ(r + L) = ψ(r)
- Antiperiodic BC: ψ(r + L) = -ψ(r)
Returns all equivalent separations considering lattice periodicity, with associated phase factors.
Arguments
lat::AbstractLattice
: Lattice with boundary condition specificationss1::Int, s2::Int
: Site indices for the hopping term
Returns
Vector{Tuple{Int,Int,Float64}}
: List of (dx, dy, sign) tuples where:dx, dy
: Lattice vector coefficientssign
: Phase factor (±1) from antiperiodic boundary crossings
KagomeDSL.get_nn
— Methodget_nn(H_mat::AbstractMatrix) -> Vector{Tuple{Int,Int}}
Extract nearest-neighbor bond list from the Hamiltonian matrix.
Finds all non-zero off-diagonal elements in the upper triangular part of H_mat, which correspond to hopping terms between connected sites. Essential for efficient Monte Carlo sampling since we only need to consider active bonds.
Arguments
H_mat::AbstractMatrix
: Hamiltonian matrix (typically hermitian)
Returns
Vector{Tuple{Int,Int}}
: List of (i,j) pairs where i < j and H_mat[i,j] ≠ 0
Notes
- Only upper triangular elements to avoid double-counting
KagomeDSL.get_site_coord
— Methodget_site_coord(lat::AbstractLattice, s::Int) -> Vector{Float64}
Calculate the real-space coordinate of site s
in the lattice.
Combines the unit cell position with the intra-cell site offset to give the absolute position in real space. Essential for calculating Peierls phases and analyzing spatial correlations.
Arguments
lat::AbstractLattice
: Lattice structures::Int
: Site index (1-indexed)
Returns
Vector{Float64}
: [x, y] coordinate in real space
KagomeDSL.getxprime
— Methodgetxprime(Ham::Hamiltonian, kappa_up, kappa_down) -> Dict{NTuple{4,Int}, Float64}
Compute the action of the Heisenberg Hamiltonian on a spinon configuration.
This is the core function for Stochastic Series Expansion (SSE) Monte Carlo. Given a spinon configuration |κup, κdown⟩, it computes all configurations |κ'up, κ'down⟩ that can be reached by applying H, along with their amplitudes.
The result is H|κ⟩ = Σ_κ' xprime[κ'] |κ'⟩, where xprime encodes the expansion.
Arguments
Ham::Hamiltonian
: Complete Hamiltonian specificationkappa_up::Vector{Int}
: Current up-spinon configurationkappa_down::Vector{Int}
: Current down-spinon configuration
Returns
Dict{NTuple{4,Int}, Float64}
: Dictionary mapping configurations to amplitudes- Key (-1,-1,-1,-1): Diagonal contribution (Ising terms)
- Key (i,lup,j,ldown): Off-diagonal contribution from spin-flip at sites i,j
Algorithm
- Iterate over all nearest-neighbor bonds in Ham.nn
- For each bond, compute Ising (S^z S^z) and transverse (S^+ S^- + S^- S^+) terms
- Accumulate results in xprime dictionary
Usage in Monte Carlo
- Called during each Monte Carlo update to propose new configurations
- The amplitudes determine acceptance probabilities for updates
- Essential for sampling the quantum mechanical evolution
Physics Notes
- |x⟩ must be a valid Mott state (one spinon per site)
- The Hamiltonian H is the original Heisenberg model, not the mean-field one
- Combines both diagonal (Ising) and off-diagonal (transverse) contributions
KagomeDSL.init_conf_qr!
— Methodinit_conf_qr!(mc::MC, ns::Int, N_up::Int)
Initialize particle configurations using QR decomposition with column pivoting.
Reference: Quantum Monte Carlo Approaches for Correlated Systems (Becca and Sorella, 2017) P130
As system size increases, $⟨Φ|x⟩$ becomes exponentially small compared to system size, inversely proportional to the dimension of the Hilbert space.
The smallness of initial $⟨Φ|x⟩$ leads to numerical instability in the first computation of the W matrices, but does not affect Markov chain sampling since we always calculate $⟨Φ|x'⟩/⟨Φ|x⟩$, which should not be numerically unstable.
This method selects sites that maximize linear independence from the U matrices to ensure non-singular tilde_U matrices and avoid random trial-and-error initialization.
Arguments
mc::MC
: Monte Carlo state object (modified in-place)ns::Int
: Total number of sites in the latticeN_up::Int
: Number of up-spin electrons
Algorithm
- Perform QR decomposition on
mc.Ham.U_up'
to selectN_up
most linearly independent rows (sites) for up-spin electrons - Use remaining unoccupied sites and perform QR decomposition on corresponding subset of
mc.Ham.U_down'
to selectN_down
sites for down-spin electrons
Note
This deterministic approach produces non-singular tilde_U matrices for stable Green's function initialization.
KagomeDSL.is_occupied
— Methodis_occupied(kappa::Vector{Int}, l::Int) -> Bool
Check if site l
is occupied in the configuration vector.
Arguments
kappa::Vector{Int}
: Configuration vector where non-zero values indicate occupationl::Int
: Site index to check
Returns
Bool
: true if site l is occupied (kappa[l] ≠ 0), false otherwise
Throws
BoundsError
: if l is outside the valid range [1, length(kappa)]
KagomeDSL.orbitals
— Methodorbitals(H_mat::Matrix{ComplexF64}, N_up::Int, N_down::Int) -> (Matrix{ComplexF64}, Matrix{ComplexF64})
Compute the occupied spinon orbitals for the quantum spin liquid ground state.
In the spinon mean-field theory:
- Spins are fractionalized into spinons (fermionic particles carrying spin-1/2)
- The Hamiltonian H_mat describes spinon hopping on the lattice
- Ground state is a filled Fermi sea of the lowest-energy spinon states
- Separate up and down spinon sectors (SU(2) symmetry)
Arguments
H_mat::Matrix{ComplexF64}
: Single-particle spinon Hamiltonian matrixN_up::Int
: Number of up-spin spinons to fillN_down::Int
: Number of down-spin spinons to fill
Returns
(U_up, U_down)
: Matrices whose columns are the occupied spinon orbitalsU_up
: N_up lowest eigenvectors for up spinonsU_down
: N_down lowest eigenvectors for down spinons
Physics Notes
- The spinon filling typically corresponds to the original spin-1/2 density
- For a spin-1/2 system: Nup + Ndown = total number of spins
- The specific choice of Nup, Ndown determines the magnetic properties
KagomeDSL.reevaluateW!
— MethodreevaluateW!(mc::MC)
Recalculate the one-particle Green's function matrices Wup and Wdown.
This function reconstructs the Green's functions from the current spin configuration by solving the linear systems involving the tilde_U matrices.
Arguments
mc::MC
: Monte Carlo state object
Algorithm
- Construct tilde_U matrices from current kappa configurations
- Solve linear systems: $tilde_U_up \ I$ and $tilde_U_down \ I$
- Compute Green's functions: $W = U * (tilde_U \ I)$
Note
$U \ I$ is numerically more stable than computing the inverse directly.
The Green's function matrices W represent the one-particle propagators $⟨x|cᵢ⁺cⱼ|ψ⟩/⟨x|ψ⟩$ for the current configuration.
Periodic re-evaluation is necessary to override numerical instability that accumulates from repeated rank-1 updates to the Green's function matrices.
KagomeDSL.spinInteraction!
— MethodspinInteraction!(xprime, kappa_up, kappa_down, i, j)
Compute the transverse (spin-flip) part of the Heisenberg interaction.
For the Heisenberg Hamiltonian H = J ∑{<i,j>} (S^+i S^-j + S^-i S^+j + S^zi S^zj), this function handles the transverse terms S^+i S^-j + S^-i S^+_j.
In the spinon representation:
- S^+i S^-j = f^†{i↑} f{i↓} f^†{j↓} f{j↑} (flips spins at both sites)
- S^-i S^+j = f^†{i↓} f{i↑} f^†{j↑} f{j↓} (flips spins at both sites)
These terms change the spinon configuration and are the source of quantum fluctuations.
Arguments
xprime::Dict
: Dictionary storing new configurations and their amplitudeskappa_up::Vector{Int}
: Current up-spinon configurationkappa_down::Vector{Int}
: Current down-spinon configurationi::Int, j::Int
: Sites for the spin-flip interaction
Side Effects
- Adds entries to xprime for each allowed spin-flip process
- Key format: (newupsite, olduporbital, newdownsite, olddownorbital)
- Amplitude: -1/2 for each allowed process (negative from Heisenberg coupling)
Physics Notes
- Only processes that respect the constraint (one spinon per site) are allowed
- Creates quantum entanglement between different spinon configurations
- Essential for accessing quantum spin liquid physics beyond mean-field
KagomeDSL.tilde_U
— Methodtilde_U(U::AbstractMatrix, kappa::Vector{Int})
Construct the tilde_U matrix by selecting and rearranging rows from U.
The tilde_U matrix is formed by selecting the rows of U corresponding to occupied sites (where kappa[l] ≠ 0) and placing them in the order specified by kappa.
Arguments
U::AbstractMatrix
: Source matrix of size (n × m) where n is number of siteskappa::Vector{Int}
: Configuration vector where non-zero values indicate occupied sites
Returns
- A matrix of size (m × m) with same element type as U
Throws
DimensionMismatch
: If length(kappa) ≠ number of rows in UArgumentError
: If kappa does not contain exactly m non-zero entriesBoundsError
: If any non-zero kappa value is out of bounds
Note
This matrix is used in the construction of the one-particle Green's function W.
KagomeDSL.unitcell_coord
— Methodunitcell_coord(lat::AbstractLattice, s::Int) -> Vector{Float64}
Compute the real-space coordinate of the unit cell containing site s
.
For DoubleKagome lattice:
- Sites 1-6 belong to unit cell 1, sites 7-12 to unit cell 2, etc.
- Each unit cell has 6 sites arranged in two triangular motifs
- Returns the coordinate of the unit cell origin in real space
Arguments
lat::AbstractLattice
: The lattice structures::Int
: Site index (1-indexed)
Returns
Vector{Float64}
: Real-space coordinate of the unit cell origin
KagomeDSL.unitcell_diff
— Methodunitcell_diff(lat, unitcell_coord1, unitcell_coord2) -> (Int, Int)
Calculate the lattice vector difference between two unit cells in terms of basis vectors (a1, a2).
This function solves the linear system: unitcellcoord1 - unitcellcoord2 = dxa1 + dya2 to find integer coefficients (dx, dy) representing the separation in lattice units.
Arguments
lat::AbstractLattice
: The lattice structure containing basis vectors a1, a2unitcell_coord1::Vector{Float64}
: Real-space coordinate of first unit cellunitcell_coord2::Vector{Float64}
: Real-space coordinate of second unit cell
Returns
(dx::Int, dy::Int)
: Lattice vector coefficients such that coord1 - coord2 = dxa1 + dya2
KagomeDSL.update_W!
— Methodupdate_W!(W::AbstractMatrix, l::Int, K::Int, col_cache::AbstractVector, row_cache::AbstractVector)
Perform a rank-1 update on the Green's function matrix using Sherman-Morrison formula.
Arguments
W::AbstractMatrix
: Green's function matrix to updatel::Int
: Column index for the updateK::Int
: Row index for the updatecol_cache::AbstractVector
: Pre-allocated cache for column operationsrow_cache::AbstractVector
: Pre-allocated cache for row operations
Algorithm
Implements the Sherman-Morrison update: $W'_{I,j} = W_{I,j} - W_{I,l} / W_{K,l} * (W_{K,j} - δ_{l,j})$
This represents a rank-1 update to the matrix inverse that maintains the Green's function relationship after a single-particle move.
KagomeDSL.update_W_matrices!
— Methodupdate_W_matrices!(mc::MC; K_up::Int, K_down::Int, l_up::Int, l_down::Int)
Update the one-particle Green's function matrices using rank-1 updates.
This function performs simultaneous updates of both Wup and Wdown matrices using the Sherman-Morrison formula for efficient matrix inversion updates.
Arguments
mc::MC
: Monte Carlo state objectK_up::Int
: Row index for up-spin matrix updateK_down::Int
: Row index for down-spin matrix updatel_up::Int
: Column index for up-spin matrix updatel_down::Int
: Column index for down-spin matrix update
Algorithm
Performs rank-1 updates: W' = W - (W[:,l] * (W[K,:] - δ_{l,:})') / W[K,l]
for both spin components using pre-allocated cache arrays.
KagomeDSL.update_configurations!
— Methodupdate_configurations!(mc, flag::Int, i::Int, site::Int, l_up::Int, l_down::Int)
Update both Green's function matrices and configuration vectors for a spin exchange move.
This function performs the complete update for a spin exchange between sites i and site, including both the Green's function matrices (Wup, Wdown) and the configuration vectors (kappaup, kappadown).
Arguments
mc
: Monte Carlo state objectflag::Int
: Move type indicator (1 or 2)i::Int
: First site indexsite::Int
: Second site indexl_up::Int
: Up-spin label to movel_down::Int
: Down-spin label to move
Move Types
flag = 1
: Move up-spin from site i to site, down-spin from site to iflag = 2
: Move up-spin from site to i, down-spin from site i to site