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.System — Typestruct 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 ferromagnetJ < 0, for antiferromagnetJ > 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 range0:System.size- Mott insulator constraint enforced).spinsUp::Int64: index in range0:electronsindicating the number of spins up.momentum::Int64: index of internal momentum sector in range0:(System.size / 2 - 1). Indexmomentumcorresponds to momentumk = 2π * momentum / (System.size / 2).
Main.tJmodel1D.System — MethodSystem(system::System = System(DEFAULT_ARGS...) [; t = system.t, J = system.J, ..., momentum = system.momentum]) -> SystemCreate 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.
Main.tJmodel1D.checkSystem — FunctionCheck if system::System describes a valid system. Throw error if any input parameter is invalid, otherwise return nothing.
Main.tJmodel1D.State — Typemutable 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 → electronmagnons::Int64: bit value 0 → no magnon, 1 → magnon
Base.hash — FunctionHashing function for magnon-holon basis states.
Base.isequal — FunctionCompare magnon-holon basis states. Return true if s1::State and s2::State represent the same state, otherwise return false.
Main.tJmodel1D.getStateInfo — FunctiongetStateInfo(state::State, system::System) -> Tuple{Bool, State, Int64, Int64, Bool}Return (hasMomentum, representative, periodicity, distance) where
hasMomentum::Bool:trueifstatematches momentum ofsystemandfalseotherwiserepresentative::State: representative state corresponding tostateperiodicity::Int64: minimalRsuch thatstateshiftedRtimes with even translation operatorD = T^2returns back tostate(phase factors are ignored)distance::Int64: distance betweenstateandrepresentativestate in number of even translationsD = T^2signChange::Bool:trueif applying even translationD = T^2tostateexactlydistancetimes requires a factor of (-1) from anticommutation relations
Main.tJmodel1D.isGreater — FunctionisGreater(a::State, b::State) -> BoolOrdering function for basis states in magnon-holon representation. Returns true if a > b, and false otherwise.
Main.tJmodel1D.bitmov — Functionbitmov(s::Int, l::Int, f::Bool = false; hb::Int = 1 << (l - 1), hv::Int = (1 << l) - 1) -> IntArithmetic bit shift for calculating bit translations with periodic boundary conditions.
Arguments
s::Int- value which binary representation will be shiftedl::Int- size of the cycle (total number of bits in the cycle)f::Bool-true ->move forward (~mult by2);false ->backward (~div by2); ~mult and ~div mean multiplication and division with preservance of periodic boundary conditions within cycle sizelhb::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)
Main.tJmodel1D.Basis — TypeBasis = 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.
Main.tJmodel1D.makeBasis — FunctionmakeBasis(system::System) -> BasisReturn 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.
Main.tJmodel1D.sublatticeRotation — FunctionsublatticeRotation(charges::Int64, spins::Int64, mask::Int64) -> Int64Perform rotation of spins according to mask and return new spins configuration. Sites occupied by holes, according to charges parameter, are not affected.
Main.tJmodel1D.LinearCombination — Typemutable 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 numbercoefficient::Vector{Complex{Float64}}: coeffcient multiplyingstatein the linear combination
Main.tJmodel1D.hamiltonian — Functionhamiltonian(state::State, basis::Basis, system::System) -> LinearCombinationApply Hamiltonian to state written in Sz momentum basis obtained for input system parameters. Returns LinearCombination representing resulting states with their coefficients.
Main.tJmodel1D.Model — TypeModel = SparseMatrixCSC{Complex{Float64},Int64}
Main.tJmodel1D.makeModel — FunctionmakeModel(basis::Basis, system::System) -> ModelCalculate sparse matrix of the model::Model Hamiltonian, where Model = SparseMatrixCSC{Complex{Float64},Int64}.
Main.tJmodel1D.factorize — Functionfactorize(model::Model [; howmany = 1, which = :SR, kryldim = 30])Compute eigenvalues (by default with smallest real part) and their corresponding eigenvectors.
For more details about factorization procedure see documentation of eigsolve function from KrylovKit.jl package.
Main.tJmodel1D.run — Functionrun(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).
Index
Main.tJmodel1D.BasisMain.tJmodel1D.LinearCombinationMain.tJmodel1D.ModelMain.tJmodel1D.StateMain.tJmodel1D.SystemMain.tJmodel1D.SystemMain.tJmodel1D.bitmovMain.tJmodel1D.checkSystemMain.tJmodel1D.factorizeMain.tJmodel1D.getStateInfoMain.tJmodel1D.hamiltonianMain.tJmodel1D.isGreaterMain.tJmodel1D.makeBasisMain.tJmodel1D.makeModelMain.tJmodel1D.runMain.tJmodel1D.sublatticeRotation
Module Operators
Features
Main.Operators.Superposition — TypeSuperposition = OrderedDict{State, Complex{Float64}}Compact representation of a wave function for single subspace. Alternative to sparse vector.
Main.Operators.SystemSuperposition — TypeSystemSuperposition = OrderedDict{System, Superposition}Compact representation of a wave function overlaping with many subspaces of the model.
Main.Operators.SystemWaveFunction — TypeSystemWaveFunction = OrderedDict{System, Vector{Complex{Float64}}}Represents a wave function vector that overlaps with many subspaces of the model.
Main.Operators.applyOperator — FunctionapplyOperator(system::System, waveFunction::Vector{Complex{Float64}}, operator, args...) -> SystemWaveFunctionApply 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.
Index
Main.Operators.SuperpositionMain.Operators.SystemSuperpositionMain.Operators.SystemWaveFunctionMain.Operators.applyOperator
Module Correlations
Features
Main.Correlations.Krylov — TypeImmutable structure for passing parameters to Krylov subspace methods.
Main.Correlations.calculateLanczos — FunctioncalculateLanczos(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.
Main.Correlations.greensFunction — FunctiongreensFunction(ω::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.
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.
Main.Correlations.run — Functionrun(ω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.
Main.Correlations.calculate — Functioncalculate(ω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.
Index
Main.Correlations.KrylovMain.Correlations.calculateMain.Correlations.calculateLanczosMain.Correlations.greensFunctionMain.Correlations.run
Module Utils
Features
Main.Utils.saveData — FunctionsaveData(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.