Terms
Subscripts
Coupling and Couplings
Term
Generator
Manual
QuantumLattices.Essentials.Terms.AbstractGenerator
— TypeAbstractGenerator{TS<:NamedContainer{Term}, BS<:Bonds, C<:Config, T<:Table, B<:Boundary, OS<:GenOperators}
Abstract generator.
By protocol, a concrete generator should have the following predefined contents:
terms::TS
: the terms contained in a generatorbonds::BS
: the bonds on which the terms are definedconfig::C
: the configuration of the interanl degrees of freedomhalf::Bool
: true for generating an Hermitian half of the operators and false for generating the wholetable::Table
: the index-sequence tableboundary::B
: boundary twist for the generated operators,nothing
for no twistoperators::OS
: the generated operators
QuantumLattices.Essentials.Terms.Coupling
— TypeCoupling{V, I<:ID{SimpleID}} <: Element{V, I}
The coupling intra/inter interanl degrees of freedom at different lattice points.
QuantumLattices.Essentials.Terms.Couplings
— TypeCouplings(cps::Coupling...)
A pack of couplings intra/inter interanl degrees of freedom at different lattice points.
Alias for Elements{<:ID{SimpleID}, <:Coupling}
.
QuantumLattices.Essentials.Terms.GenOperators
— TypeGenOperators(terms::Tuple{Vararg{Term}}, bonds::Bonds, config::Config, half::Bool; table::Union{Nothing, Table}=nothing)
A set of operators. This is the core of AbstractGenerator
.
QuantumLattices.Essentials.Terms.Generator
— TypeGenerator(terms::Tuple{Vararg{Term}}, bonds::Bonds, config::Config, half::Bool, table::Table, boundary::Boundary=plain)
A generator of operators based on terms, configuration of internal degrees of freedom, and boundary twist.
QuantumLattices.Essentials.Terms.Parameters
— TypeParameters{Names}(values::Number...) where Names
A NamedTuple that contain the key-value pairs.
QuantumLattices.Essentials.Terms.Parameters
— MethodParameters(gen::AbstractGenerator) -> Parameters
Get the parameters of the terms of a generator.
QuantumLattices.Essentials.Terms.SubID
— TypeSubID{O<:Tuple, C<:Tuple, S<:Tuple{Vararg{Int}}} <: SimpleID
The id of a subscript set.
QuantumLattices.Essentials.Terms.Subscripts
— TypeSubscripts{DS, RS, OP<:Tuple, CP<:AbstractString, M<:Tuple{Vararg{Function}}, C<:Tuple{Vararg{Function}}} <: CompositeTuple{OP}
A subscript set of a certain internal degree of freedom.
QuantumLattices.Essentials.Terms.Subscripts
— MethodSubscripts(N::Int)
Subscripts(opattern::Tuple{Vararg{Union{Integer, Symbol}}})
Subscripts(opattern::Tuple{Vararg{Union{Integer, Symbol}}}, cpattern::AbstractString)
Construct a subscript set of a certain internal degree of freedom.
QuantumLattices.Essentials.Terms.Subscripts
— Method(subscripts::Subscripts)(values::Tuple{Vararg{Int}}) -> NTuple{dimension(subscripts), Int}
Construct a subscript set from an independent variable set.
QuantumLattices.Essentials.Terms.Term
— TypeTerm{K, R, I}(value, bondkind, couplings::TermCouplings, amplitude::TermAmplitude, modulate::TermModulate, factor) where {K, R, I}
Term{K, R}(id::Symbol, value, bondkind;
couplings::Union{Function, Coupling, Couplings, TermCouplings},
amplitude::Union{Function, TermAmplitude, Nothing}=nothing,
modulate::Union{Function, TermModulate, Bool}=false
) where {ST, K, R}
A term of a quantum lattice system.
QuantumLattices.Essentials.Terms.TermAmplitude
— TypeTermAmplitude(amplitude::Union{Function, Nothing}=nothing)
The function for the amplitude of a term.
QuantumLattices.Essentials.Terms.TermCouplings
— TypeTermCouplings(coupling::Coupling)
TermCouplings(couplings::Couplings)
TermCouplings(couplings::Function)
The function for the couplings of a term.
QuantumLattices.Essentials.Terms.TermFunction
— TypeTermFunction <: Function
Abstract type for concrete term functions.
QuantumLattices.Essentials.Terms.TermModulate
— TypeTermModulate(id::Symbol, modulate::Function)
TermModulate(id::Symbol, modulate::Bool)
The function for the modulation of a term.
QuantumLattices.Essentials.Terms.@couplings
— Macro@couplings cps -> Couplings
Convert an expression/literal to a set of couplings.
QuantumLattices.Essentials.Terms.@subscripts
— Macro@subscripts expr::Expr -> Subscripts
Construct a subscript set from an opattern and optionally with a constrain.
QuantumLattices.Essentials.Terms.@subscripts_str
— Macrosubscripts"..." -> Subscripts
Construct a subscript set from a literal string.
Base.:*
— Method*(subs₁::Subscripts, subs₂::Subscripts) -> Subscripts
Get the multiplication between two subscript sets.
Base.:+
— Method+(term::Term) -> Term
-(term::Term) -> Term
*(term::Term, factor) -> Term
*(factor, term::Term) -> Term
/(term::Term, factor) -> Term
Allowed arithmetic operations for a term.
Base.:==
— Method==(gen₁::AbstractGenerator, gen₂::AbstractGenerator) -> Bool
Judge whether generators are equivalent to each other.
Base.:==
— Method==(genops1::GenOperators, genops2::GenOperators) -> Bool
Judge whether two sets of operators are equivalent to each other.
Base.:==
— Method==(term1::Term, term2::Term) -> Bool
Judge whether two terms are equivalent to each other.
Base.:==
— Method==(subs₁::Subscripts, subs₂::Subscripts) -> Bool
Judge whether two subscript sets are equivalent to each other.
Base.eltype
— Methodeltype(ops::GenOperators)
eltype(::Type{<:GenOperators})
Get the eltype of a set of operators, which is defined to be the common operator type of all operators it contains.
Base.empty!
— Methodempty!(ops::GenOperators) -> GenOperators
Empty a set of operators.
Base.empty!
— Methodempty!(gen::Generator) -> Generator
Empty the :bonds, :config, :table and :operators of a generator.
Base.empty
— Methodempty(ops::GenOperators) -> GenOperators
Get an empty copy of a set of operators.
Base.empty
— Methodempty(gen::Generator) -> Generator
Get an empty copy of a generator.
Base.isequal
— Methodisequal(gen₁::AbstractGenerator, gen₂::AbstractGenerator) -> Bool
Judge whether generators are equivalent to each other.
Base.isequal
— Methodisequal(genops1::GenOperators, genops2::GenOperators) -> Bool
Judge whether two sets of operators are equivalent to each other.
Base.isequal
— Methodisequal(term1::Term, term2::Term) -> Bool
Judge whether two terms are equivalent to each other.
Base.isequal
— Methodisequal(subs₁::Subscripts, subs₂::Subscripts) -> Bool
Judge whether two subscript sets are equivalent to each other.
Base.isvalid
— Methodisvalid(subscripts::Subscripts, values::Tuple{Vararg{Int}}) -> Bool
Judge whether an independent variable set are valid to construct a subscript set.
Base.match
— Functionmatch(params₁::Parameters, params₂::Parameters, atol=atol, rtol=rtol) -> Bool
Judge whether the second set of parameters matches the first.
Base.one
— Methodone(term::Term) -> Term
Get a unit term.
Base.replace
— Methodreplace(term::Term; kwargs...) -> Term
Replace some attributes of a term with key word arguments.
Base.repr
— Methodrepr(term::Term, bond::AbstractBond, config::Config) -> String
Get the repr representation of a term on a bond with a given config.
Base.show
— Methodshow(io::IO, subscripts::Subscripts)
Show a subscript set.
Base.show
— Methodshow(io::IO, term::Term)
Show a term.
Base.split
— Methodsplit(subscripts::Subscripts) -> Tuple{Vararg{Subscripts}}
Split a subscript set into individual independent segments.
Base.valtype
— Methodvaltype(term::Term)
valtype(::Type{<:Term)
Get the value type of a term.
Base.zero
— Methodzero(term::Term) -> Term
Get a zero term.
QuantumLattices.Essentials.DegreesOfFreedom.isHermitian
— MethodisHermitian(term::Term) -> Bool
isHermitian(::Type{<:Term}) -> Bool
QuantumLattices.Essentials.Terms.abbr
— Methodabbr(term::Term) -> Symbol
abbr(::Type{<:Term}) -> Symbol
Get the abbreviation of the kind of a term.
QuantumLattices.Essentials.Terms.couplingcenters
— Methodcouplingcenters(coupling::Coupling, bond::AbstractBond, info::Val) -> NTuple{rank(coupling), Int}
Get the centers of the coupling on a bond.
QuantumLattices.Essentials.Terms.couplinginternals
— Methodcouplinginternals(coupling::Coupling, bond::AbstractBond, config::Config, info::Val) -> NTuple{rank(coupling), valtype(config)}
Get the interanl spaces that correspond to where each order of the coupling acts on.
QuantumLattices.Essentials.Terms.couplingpoints
— Methodcouplingpoints(coupling::Coupling, bond::AbstractBond, info::Val) -> NTuple{rank(coupling), eltype(bond)}
Get the points that correspond to where each order of the coupling acts on.
QuantumLattices.Essentials.Terms.ismodulatable
— Methodismodulatable(term::Term) -> Bool
ismodulatable(::Type{<:Term}) -> Bool
Judge whether a term could be modulated by its modulate function.
QuantumLattices.Essentials.Terms.otype
— Functionotype(T::Type{<:Term}, C::Type{<:Config}, B::Type{<:AbstractBond})
Get the compatible operator type from the type of a term, a configuration of the internal degrees of freedom and a bond.
QuantumLattices.Essentials.Terms.otype
— Methodotype(gen::AbstractGenerator)
otype(::Type{<:AbstractGenerator})
Get the operator type of the generated opeators.
QuantumLattices.Essentials.kind
— Methodkind(term::Term) -> Symbol
kind(::Type{<:Term) -> Symbol
Get the kind of a term.
QuantumLattices.Essentials.reset!
— Methodreset!(genops::GenOperators, terms::Tuple{Vararg{Term}}, bonds::Bonds, config::Config, half::Bool; table::Union{Nothing, Table}=nothing) -> GenOperators
Reset a set of operators by new terms, bonds, config, etc..
QuantumLattices.Essentials.reset!
— Methodreset!(gen::Generator, lattice::AbstractLattice) -> Generator
Reset a generator by a new lattice.
QuantumLattices.Essentials.update!
— Methodupdate!(term::Term, args...; kwargs...) -> Term
Update the value of a term by its modulate
function.
QuantumLattices.Essentials.update!
— Methodupdate!(gen::AbstractGenerator; kwargs...) -> typeof(gen)
Update the coefficients of the terms in a generator.
QuantumLattices.Interfaces.dimension
— Methoddimension(subscripts::Subscripts, i::Int) -> Int
dimension(::Type{<:Subscripts}, i::Int) -> Int
Get the total number of the whole variables of the ith segment of a subscript set.
QuantumLattices.Interfaces.dimension
— Methoddimension(subscripts::Subscripts) -> Int
dimension(::Type{<:Subscripts}) -> Int
Get the total number of the whole variables of a subscript set.
QuantumLattices.Interfaces.expand
— Functionexpand(term::Term, bond::AbstractBond, config::Config, half::Bool=false; table::Union{Nothing, Table}=nothing) -> Operators
expand(term::Term, bonds::Bonds, config::Config, half::Bool=false; table::Union{Nothing, Table}=nothing) -> Operators
Expand the operators of a term on a bond/set-of-bonds with a given config.
QuantumLattices.Interfaces.expand!
— Functionexpand!(operators::Operators, term::Term, bond::AbstractBond, config::Config, half::Bool=false; table::Union{Nothing, Table}=nothing) -> Operators
expand!(operators::Operators, term::Term, bonds::Bonds, config::Config, half::Bool=false; table::Union{Nothing, Table}=nothing) -> Operators
Expand the operators of a term on a bond/set-of-bonds with a given config.
The half
parameter determines the behavior of generating operators, which falls into the following two categories
true
: "Hermitian half" of the generated operatorsfalse
: "Hermitian whole" of the generated operators
QuantumLattices.Interfaces.expand!
— Methodexpand!(operators::Operators, gen::AbstractGenerator) -> Operators
Expand the operators of a generator.
QuantumLattices.Interfaces.expand!
— Methodexpand!(operators::Operators, ops::GenOperators, boundary::Boundary; kwargs...) -> Operators
Expand the operators with the given boundary twist and term coefficients.
QuantumLattices.Interfaces.expand
— Methodexpand(gen::AbstractGenerator) -> Operators
expand(gen::AbstractGenerator, name::Symbol) -> Operators
expand(gen::AbstractGenerator, i::Int) -> Operators
expand(gen::AbstractGenerator, name::Symbol, i::Int) -> Operators
Expand the operators of a generator:
- the total operators;
- the operators of a specific term;
- the operators on a specific bond;
- the operators of a specific term on a specific bond.
QuantumLattices.Interfaces.expand
— Methodexpand(subscripts::Subscripts, dimensions::Tuple{Vararg{Int}}) -> SbExpand
Expand a subscript set with the given variable ranges.
QuantumLattices.Interfaces.id
— Methodid(term::Term) -> Symbol
id(::Type{<:Term) -> Symbol
Get the id of a term.
QuantumLattices.Interfaces.id
— Methodid(subs::Subscripts) -> SubID
Get the id of a subscript set.
QuantumLattices.Interfaces.rank
— Methodrank(subscripts::Subscripts, i::Int) -> Int
rank(::Type{<:Subscripts}, i::Int) -> Int
Get the number of the independent variables of the ith segment of a subscript set.
QuantumLattices.Interfaces.rank
— Methodrank(subscripts::Subscripts) -> Int
rank(::Type{<:Subscripts}) -> Int
Get the total number of the independent variables of a subscript set.
QuantumLattices.Interfaces.rank
— Methodrank(term::Term) -> Int
rank(::Type{<:Term) -> Int
Get the rank of a term.
QuantumLattices.Mathematics.AlgebraOverFields.idtype
— Methodidtype(ops::GenOperators)
idtype(::Type{<:GenOperators})
Get the idtype of a set of operators, which is defined to be the common idtype of all operators it contains.