Documentation

This page contains a list of implemented types, methods, and functions. All descriptions in the following sections are raw docstrings extracted from corresponding modules. Sections are organized in order possible to read from top to bottom. Each section ends with an alphabetical index organized by feature type in order: Type, Method, Function.

Module tJmodel1D

Features

Main.tJmodel1D.SystemType

struct System immutable structure for system input parameters:

Fields

  • t::Float64: value of the hopping constant t.
  • J::Float64: value of the coupling constant J. For ferromagnet J < 0, for antiferromagnet J > 0.
  • λ::FLoat64: parameter for scaling magnon-magnon interactions. For the pure t-J model λ = 1.0.
  • α::Float64: parameter for scaling XXZ anisotropy. For t-J model α = 1.0, for t-Jz model α = 0.0.
  • size::Int64: number of lattice sites.
  • electrons::Int64: number of electrons (must be in range 0:System.size - Mott insulator constraint enforced).
  • spinsUp::Int64: index in range 0:electrons indicating the number of spins up.
  • momentum::Int64: index of internal momentum sector in range 0:(System.size / 2 - 1). Index momentum corresponds to momentum k = 2π * momentum / (System.size / 2).
source
Main.tJmodel1D.SystemMethod
System(system::System = System(DEFAULT_ARGS...) [; t = system.t, J = system.J, ...,  momentum = system.momentum]) -> System

Create a new instance of System using system::System as a template with fields updated according to the given kwargs. Uses a default template if no template system::System is provided.

source
Main.tJmodel1D.checkSystemFunction

Check if system::System describes a valid system. Throw error if any input parameter is invalid, otherwise return nothing.

source
Main.tJmodel1D.StateType

mutable struct State mutable structure for storing the configuration of electrons and magnons in magnon-holon basis using binary representation

Fields

  • charges::Int64: bit value 0 → hole, 1 → electron
  • magnons::Int64: bit value 0 → no magnon, 1 → magnon
source
Base.hashFunction

Hashing function for magnon-holon basis states.

source
Base.isequalFunction

Compare magnon-holon basis states. Return true if s1::State and s2::State represent the same state, otherwise return false.

source
Main.tJmodel1D.getStateInfoFunction
getStateInfo(state::State, system::System) -> Tuple{Bool, State, Int64, Int64, Bool}

Return (hasMomentum, representative, periodicity, distance) where

  • hasMomentum::Bool: true if state matches momentum of system and false otherwise
  • representative::State: representative state corresponding to state
  • periodicity::Int64: minimal R such that state shifted R times with even translation operator D = T^2 returns back to state (phase factors are ignored)
  • distance::Int64: distance between state and representative state in number of even translations D = T^2
  • signChange::Bool: true if applying even translation D = T^2 to state exactly distance times requires a factor of (-1) from anticommutation relations
source
Main.tJmodel1D.isGreaterFunction
isGreater(a::State, b::State) -> Bool

Ordering function for basis states in magnon-holon representation. Returns true if a > b, and false otherwise.

source
Main.tJmodel1D.bitmovFunction
bitmov(s::Int, l::Int, f::Bool = false; hb::Int = 1 << (l - 1), hv::Int = (1 << l) - 1) -> Int

Arithmetic bit shift for calculating bit translations with periodic boundary conditions.

Arguments

  • s::Int - value which binary representation will be shifted
  • l::Int - size of the cycle (total number of bits in the cycle)
  • f::Bool - true -> move forward (~mult by 2); false -> backward (~div by 2); ~mult and ~div mean multiplication and division with preservance of periodic boundary conditions within cycle size l
  • hb::Int [optional] - highest bit (for speed up put the value of 2^(l-1))
  • hv::Int [optional] - highest value (for speed put (2^l)-1)
source
Main.tJmodel1D.BasisType

Basis = OrderedDict{State, Int64}

Basis is stored as a hash table with Robin Hood hashing algorithm. Key corresponds to state of the system and value contains position of that state in basis.

source
Main.tJmodel1D.makeBasisFunction
makeBasis(system::System) -> Basis

Return Basis = OrderedDict{State, Int64} hash table representing basis for given System::system parameters. Each index in Basis corresponds to State, and each value in Basis corresponds to position in the basis stored as Int64.

source
Main.tJmodel1D.sublatticeRotationFunction
sublatticeRotation(charges::Int64, spins::Int64, mask::Int64) -> Int64

Perform rotation of spins according to mask and return new spins configuration. Sites occupied by holes, according to charges parameter, are not affected.

source
Main.tJmodel1D.LinearCombinationType

mutable struct LinearCombination: structure for storing result of Hamiltonian action on states from basis::Basis

Fields

  • state::State: system configurations in binary representation written as decimal number
  • coefficient::Vector{Complex{Float64}}: coeffcient multiplying state in the linear combination
source
Main.tJmodel1D.hamiltonianFunction
hamiltonian(state::State, basis::Basis, system::System) -> LinearCombination

Apply Hamiltonian to state written in Sz momentum basis obtained for input system parameters. Returns LinearCombination representing resulting states with their coefficients.

source
Main.tJmodel1D.makeModelFunction
makeModel(basis::Basis, system::System) -> Model

Calculate sparse matrix of the model::Model Hamiltonian, where Model = SparseMatrixCSC{Complex{Float64},Int64}.

source
Main.tJmodel1D.factorizeFunction
factorize(model::Model [; howmany = 1, which = :SR, kryldim = 30])

Compute eigenvalues (by default with smallest real part) and their corresponding eigenvectors.

source
Algorithm details

For more details about factorization procedure see documentation of eigsolve function from KrylovKit.jl package.

Main.tJmodel1D.runFunction
run(input::Union{Missing, System} = missing; eigsolve = true, howmany = 1, kryldim = 30)

Run model diagonalization procedure. If no input provided, construct input using default arguments. Return (system::System, basis::Basis, model::Model, factorization) where factorization is nothing if eigsolve == false. If eigsolve == true then factorization = (eigenvalues, eigenvectors, convergenceInfo). Algorithm tries to converge at least howmany eigenvalues. Always print convergenceInfo to check accuracy since there is no warning if eigenvalues are poorly converged. Keyword kryldim allows to specify the dimension of Krylov subspace for diagonalization algorithm (implicitely restarted Lanczos iteration).

source

Index

Module Operators

Features

Main.Operators.SuperpositionType
Superposition = OrderedDict{State, Complex{Float64}}

Compact representation of a wave function for single subspace. Alternative to sparse vector.

source
Main.Operators.SystemWaveFunctionType
SystemWaveFunction = OrderedDict{System, Vector{Complex{Float64}}}

Represents a wave function vector that overlaps with many subspaces of the model.

source
Main.Operators.applyOperatorFunction
applyOperator(system::System, waveFunction::Vector{Complex{Float64}}, operator, args...) -> SystemWaveFunction

Apply operator with arguments args... to waveFunction of system subspace. In general, operator action on arbitrary wave function of a single subspace will overlap with many subspaces of the whole system. Return hash table SystemWaveFunction representing overlaping subspaces and corresponding resulting subspace wave functions.

source

Index

Module Correlations

Features

Main.Correlations.calculateLanczosFunction
calculateLanczos(initialState::Vector{Complex{Float64}}, model::Model, krylov::Krylov)

Calculate tridiagonal form of hermitian model for given krylov parameters of Krylov subspace starting from initialState. Return compact form (diagonal, offDiagonal, size) of symmetric tridiagonal matrix as two vectors of diagonal and offDiagonal terms with sizes size and size-1 respectively.

source
Main.Correlations.greensFunctionFunction
greensFunction(ω::Complex{Float64}, initialState, diagonal, offDiagonal, size) -> Complex{Float64}

Calculate the value of Greens function for given ω point. Internally evaluates a continued fraction of depth size based on results diagonal and offDiagonal of Lanczos tridiagonalization procedure. The result is re-scaled by the norm of initialState.

source
greensFunction(ωRange::Vector{Float64}, iDelta::Complex{Float64}, initialState::Vector{Complex{Float64}}, diagonal::Vector{Float64}, offDiagonal::Vector{Float64}, size::Int64) -> Vector{Complex{Float64}}

Calculate Greens function over range of points ωRange applying data broadening iDelta.

source
Main.Correlations.runFunction
run(ωRange::Vector{Float64}, iDelta::Complex{Float64}, initialState::Vector{Complex{Float64}}, model::Model, krylovDimension::Int64 = 400)

Run Lanczos tridiagonalization of a subspace model starting from initialState including up to krylovDimension dimensions. Return Greens function calculated over range ωRange with data broadening iDelta.

source
Main.Correlations.calculateFunction
calculate(ωRange, δ, system, ψ, operator, args...; kryldim = 400) -> Vector{ComplexF64}

Apply operator with arguments args... to system wave function ψ. Then calculate correlation function over ωRange with artificial broadening δ using Lanczos tridiagonalization with initial state Ô | ψ >. Return Vector{ComplexF64} of size length(ωRange) with calculated values of the correlation function. A keyword argument kryldim defines maximum dimension of Krylov subspace for Lanczoas tridiagonalization algorithm. Typically values of kryldim ∈ [100, 1000] give best performance. Small values of kryldim speed up the calculation process but reduce the quality of results. It is not advised to set Krylov dimension too high - performance eventually drops due to orthogonality loss.

source

Index

Module Utils

Features

Main.Utils.saveDataFunction
saveData(data [; path::String = "./data/", name::Union{Missing, String} = missing])

Save data to JSON file name.json in path directory. If name not provided, current time in format "Y-mm-dd_HH:MM:SS.s" is used as file name. Requires typeof(data) <: AbstractDict.

source

Index