Degrees of freedom
QuantumLattices.DegreesOfFreedom.ˢᵗ
— Constantconst ˢᵗ = ⁿᵈ = ʳᵈ = ᵗʰ = Ordinal(1)
Constant ordinals.
QuantumLattices.DegreesOfFreedom.AllEqual
— TypeAllEqual{Fields} <: Function
All-equal constraint for the direct product of homogenous simple internal indexes that for every specified field the values of the internal indexes should be all equal.
QuantumLattices.DegreesOfFreedom.AllEqual
— MethodAllEqual(fields::Tuple{Vararg{Symbol}})
AllEqual(fields::Symbol...)
Construct an all-equal constraint.
QuantumLattices.DegreesOfFreedom.AllEqual
— Method(constraint::AllEqual{fields})(index::InternalIndexProd{NTuple{N, I}}) where {fields, N, I<:SimpleInternalIndex} -> Bool
Judge whether the direct product of a set of homogenous simple internal indexes is subject to an all-equal constraint.
QuantumLattices.DegreesOfFreedom.AllEqual
— MethodAllEqual(::Type{I}) where {I<:SimpleInternalIndex}
Construct an all-equal constraint based on the type of a simple internal index.
QuantumLattices.DegreesOfFreedom.Boundary
— TypeBoundary{Names}(values::AbstractVector{<:Number}, vectors::AbstractVector{<:AbstractVector{<:Number}}) where Names
Boundary twist of operators.
QuantumLattices.DegreesOfFreedom.Boundary
— Method(bound::Boundary)(operator::Operator; origin::Union{AbstractVector, Nothing}=nothing) -> Operator
Get the boundary twisted operator.
QuantumLattices.DegreesOfFreedom.Component
— TypeComponent{T₁, T₂} <: VectorSpace{Tuple{T₁, T₁, T₂}}
A component of a matrix coupling, i.e., a matrix acting on a separated internal space.
QuantumLattices.DegreesOfFreedom.CompositeIndex
— TypeCompositeIndex{I<:Index} <: OperatorIndex
Abstract type of a composite index.
QuantumLattices.DegreesOfFreedom.CompositeInternal
— TypeCompositeInternal{T<:Tuple{Vararg{SimpleInternal}}, I<:InternalIndex} <: Internal{I}
Abstract type of the composition (i.e., direct sum or direct product) of several simple internal spaces.
QuantumLattices.DegreesOfFreedom.ConstrainedInternal
— TypeConstrainedInternal{P<:InternalProd, C<:InternalPattern}
Constrained internal space.
QuantumLattices.DegreesOfFreedom.ConstrainedInternal
— MethodConstrainedInternal(internal::SimpleInternal, pattern::InternalPattern)
ConstrainedInternal(internal::InternalProd, pattern::InternalPattern)
Construct a constrained internal space.
QuantumLattices.DegreesOfFreedom.CoordinatedIndex
— TypeCoordinatedIndex{I<:Index, V<:SVector} <: CompositeIndex{I}
Coordinated index, i.e., index with coordinates in the unitcell.
QuantumLattices.DegreesOfFreedom.CoordinatedIndex
— MethodCoordinatedIndex(index::Index, rcoordinate, icoordinate)
CoordinatedIndex(index::Index; rcoordinate, icoordinate)
Construct a coordinated index.
QuantumLattices.DegreesOfFreedom.Coupling
— TypeCoupling{V, P<:Pattern} <: OperatorPack{V, P}
Coupling among internal degrees of freedom at different or same lattice points.
QuantumLattices.DegreesOfFreedom.Coupling
— MethodCoupling(value, pattern::Pattern)
Coupling(pattern::Pattern)
Construct a coupling.
QuantumLattices.DegreesOfFreedom.Coupling
— MethodCoupling(indexes::Index...)
Coupling(value, indexes::Index...)
Coupling(value, indexes::Tuple{Vararg{Index}})
Construct a coupling with the input indexes as the pattern.
QuantumLattices.DegreesOfFreedom.Coupling
— MethodCoupling(sites::Union{NTuple{N, Ordinal}, Colon}, ::Type{I}, fields::Union{NTuple{N}, Colon}...) where {N, I<:SimpleInternalIndex}
Coupling(value, sites::Union{NTuple{N, Ordinal}, Colon}, ::Type{I}, fields::Union{NTuple{N}, Colon}...) where {N, I<:SimpleInternalIndex}
Coupling{N}(sites::Union{NTuple{N, Ordinal}, Colon}, ::Type{I}, fields::Union{NTuple{N}, Colon}...) where {N, I<:SimpleInternalIndex}
Coupling{N}(value, sites::Union{NTuple{N, Ordinal}, Colon}, ::Type{I}, fields::Union{NTuple{N}, Colon}...) where {N, I<:SimpleInternalIndex}
Construct a Coupling
with the input sites and the fields of a kind of simple internal index.
QuantumLattices.DegreesOfFreedom.Coupling
— MethodCoupling(f::Union{Function, Type{<:Function}}, sites::Union{NTuple{N, Ordinal}, Colon}, fields::Union{NTuple{N}, Colon}...) where N
Coupling(value::Number, f::Union{Function, Type{<:Function}}, sites::Union{NTuple{N, Ordinal}, Colon}, fields::Union{NTuple{N}, Colon}...) where N
Coupling{N}(f::Union{Function, Type{<:Function}}, sites::Union{NTuple{N, Ordinal}, Colon}, fields::Union{NTuple{N}, Colon}...) where N
Coupling{N}(value::Number, f::Union{Function, Type{<:Function}}, sites::Union{NTuple{N, Ordinal}, Colon}, fields::Union{NTuple{N}, Colon}...) where N
Construct a Coupling
by a function that can construct an Index
with the input sites and the fields of a kind of simple internal index.
QuantumLattices.DegreesOfFreedom.Hilbert
— TypeHilbert{I<:Internal} <: CompositeDict{Int, I}
Hilbert space at a lattice.
QuantumLattices.DegreesOfFreedom.Hilbert
— MethodHilbert(internal::Internal, num::Integer)
Construct a Hilbert space with all same internal spaces.
QuantumLattices.DegreesOfFreedom.Hilbert
— MethodHilbert(internals::Internal...)
Hilbert(internals::Tuple{Vararg{Internal}})
Hilbert(internals::AbstractVector{<:Internal})
Construct a Hilbert space with the given internal spaces.
QuantumLattices.DegreesOfFreedom.Hilbert
— MethodHilbert(ps::Pair...)
Hilbert(kv)
Construct a Hilbert space the same way as an OrderedDict
.
QuantumLattices.DegreesOfFreedom.Index
— TypeIndex(site::Union{Int, Ordinal, Colon}, internal::SimpleInternalIndex)
Index of a degree of freedom, which consist of the spatial part (i.e., the site index) and the internal part (i.e., the internal index).
QuantumLattices.DegreesOfFreedom.Internal
— TypeInternal{I<:InternalIndex} <: VectorSpace{I}
Internal space at a single point.
QuantumLattices.DegreesOfFreedom.InternalIndex
— TypeInternalIndex <: OperatorIndex
Internal index of an internal degree of freedom.
QuantumLattices.DegreesOfFreedom.InternalIndexProd
— TypeInternalIndexProd{T<:Tuple{Vararg{SimpleInternalIndex}}} <: InternalIndex
Direct product of several simple internal indexes.
QuantumLattices.DegreesOfFreedom.InternalIndexProd
— MethodInternalIndexProd(contents::SimpleInternalIndex...)
Construct the direct product of several simple internal indexes.
QuantumLattices.DegreesOfFreedom.InternalPattern
— TypeInternalPattern(index::InternalIndexProd, constraint::Function, representation::String=string(constraint))
InternalPattern{P}(index::InternalIndexProd, constraints::NTuple{N, Function}, representations::NTuple{N, String}=map(string, constraints)) where {P, N}
Construct an internal pattern for the direct product of a set of simple internal indexes with 1) only one constraint function, and 2) several constraint functions.
QuantumLattices.DegreesOfFreedom.InternalPattern
— TypeInternalPattern{I, P, N, C<:NTuple{N, Function}} <: QuantumOperator
Internal pattern for the direct product of a set of simple internal indexes with extra constraints.
QuantumLattices.DegreesOfFreedom.InternalPattern
— MethodInternalPattern(index::SimpleInternalIndex)
InternalPattern(index::InternalIndexProd{<:Tuple{Vararg{I}}}) where {I<:SimpleInternalIndex}
Construct an internal pattern whose constraint is an AllEqual
function for the direct product of a homogeneous set of simple internal indexes.
QuantumLattices.DegreesOfFreedom.InternalProd
— TypeInternalProd{T<:Tuple{Vararg{SimpleInternal}}, I<:InternalIndex} <: CompositeInternal{T, I}
Direct product of several single internal spaces.
QuantumLattices.DegreesOfFreedom.InternalSum
— TypeInternalSum{T<:Tuple{Vararg{SimpleInternal}}, I<:InternalIndex} <: CompositeInternal{T, I}
Direct sum of several single internal spaces.
QuantumLattices.DegreesOfFreedom.MatrixCoupling
— TypeMatrixCoupling{I}(sites::Union{NTuple{2, Ordinal}, NTuple{2, Colon}}, contents::Tuple{Vararg{Component}}) where {I<:SimpleInternalIndex}
MatrixCoupling(sites::Union{NTuple{2, Ordinal}, Colon}, ::Type{I}, contents::Component...) where {I<:SimpleInternalIndex}
Matrix coupling, i.e., a set of couplings whose coefficients are specified by matrices acting on separated internal spaces.
QuantumLattices.DegreesOfFreedom.MatrixCouplingProd
— TypeMatrixCouplingProd{V<:Number, C<:Tuple{Vararg{MatrixCoupling}}} <: VectorSpace{Coupling}
Product of matrix couplings together with an overall coefficient.
QuantumLattices.DegreesOfFreedom.MatrixCouplingSum
— TypeMatrixCouplingSum{C<:MatrixCouplingProd, N} <: VectorSpace{Coupling}
Sum of the products of matrix couplings.
QuantumLattices.DegreesOfFreedom.Metric
— TypeMetric <: Function
Rules for measuring an operator index so that different operator indexes can be compared.
As a function, every instance should accept only one positional argument, i.e. the operator index to be measured.
QuantumLattices.DegreesOfFreedom.OperatorIndexToTuple
— TypeOperatorIndexToTuple{Fields} <: Metric
A rule that converts an operator index into a tuple based on the specified type parameter Fields
.
Here, Fields
must be a tuple of Union{Symbol, Function}
, which determines the elements of the converted tuple on an element-by-element basis.
For the ith element of Fields
:
- If it is a Symbol, it represents the name of a single index of an
OperatorIndex
, and its value will become the corresponding element in the converted tuple. - If it is a Function, it should be a trait function of an
OperatorIndex
, and its return value will become the corresponding element in the converted tuple.
QuantumLattices.DegreesOfFreedom.OperatorIndexToTuple
— Method(operatorunittotuple::OperatorIndexToTuple)(index::Index) -> Tuple
Convert an index to a tuple.
QuantumLattices.DegreesOfFreedom.OperatorIndexToTuple
— MethodOperatorIndexToTuple(::Type{I}) where {I<:Index}
Construct the metric rule from the information of the Index
type.
QuantumLattices.DegreesOfFreedom.Ordinal
— TypeOrdinal
Ordinal of an Int
.
QuantumLattices.DegreesOfFreedom.Pattern
— TypePattern{C<:InternalPattern, S<:Tuple{Vararg{Union{Ordinal, Colon}}}} <: QuantumOperator
Coupling pattern.
QuantumLattices.DegreesOfFreedom.Pattern
— MethodPattern(indexes::Index...)
Pattern(indexes::Tuple{Vararg{Index}})
Construct a coupling pattern from a set of indexes.
QuantumLattices.DegreesOfFreedom.SimpleInternal
— TypeSimpleInternal{I<:SimpleInternalIndex} <: Internal{I}
Simple internal space at a single point.
QuantumLattices.DegreesOfFreedom.SimpleInternalIndex
— TypeSimpleInternalIndex <: InternalIndex
Simple internal index, i.e., a complete set of indexes to denote an internal degree of freedom.
QuantumLattices.DegreesOfFreedom.Table
— TypeTable(hilbert::Hilbert, by::Metric=OperatorIndexToTuple(typeof(hilbert))) -> Table
Get the index-sequence table of a Hilbert space.
QuantumLattices.DegreesOfFreedom.Table
— TypeTable(indexes::AbstractVector{<:OperatorIndex}, by::Metric=OperatorIndexToTuple(eltype(indexes)))
Convert a set of operator units to the corresponding table of operator index vs. sequence pairs.
The input operator units are measured by the input by
function with the duplicates removed. The resulting unique values are sorted, which determines the sequence of the input indexes
. Note that two operator units have the same sequence if their converted values are equal to each other.
QuantumLattices.DegreesOfFreedom.Table
— TypeTable{I, B<:Metric} <: CompositeDict{I, Int}
Table of operator index v.s. sequence pairs.
QuantumLattices.DegreesOfFreedom.Term
— TypeTerm{K, I, V, B, C<:TermCoupling, A<:TermAmplitude}
Term of a quantum lattice system.
QuantumLattices.DegreesOfFreedom.Term
— MethodTerm{K}(id::Symbol, value, bondkind, coupling, ishermitian::Bool; amplitude::Union{Function, Nothing}=nothing, ismodulatable::Bool=true) where K
Construct a term.
QuantumLattices.DegreesOfFreedom.TermAmplitude
— TypeTermAmplitude{F} <: TermFunction{F}
Function for the amplitude of a term.
QuantumLattices.DegreesOfFreedom.TermCoupling
— TypeTermCoupling{C<:Coupling, F} <: TermFunction{F}
Function for the coupling of a term.
QuantumLattices.DegreesOfFreedom.TermFunction
— TypeTermFunction{F} <: Function
Abstract type for concrete term functions.
QuantumLattices.DegreesOfFreedom.@pattern
— Macro@pattern index₁ index₂ ...
@pattern(index₁, index₂, ...; constraint=...)
Construct a coupling pattern according to the pattern of the input indexes and an optional constraint.
Base.:*
— Method*(mc₁::MatrixCoupling, mc₂::MatrixCoupling) -> MatrixCouplingProd
*(mc::MatrixCoupling, mcp::MatrixCouplingProd) -> MatrixCouplingProd
*(mcp::MatrixCouplingProd, mc::MatrixCoupling) -> MatrixCouplingProd
*(mcp₁::MatrixCouplingProd, mcp₂::MatrixCouplingProd) -> MatrixCouplingProd
*(mc::MatrixCoupling, factor::Number) -> MatrixCouplingProd
*(factor::Number, mc::MatrixCoupling) -> MatrixCouplingProd
*(factor::Number, mcp::MatrixCouplingProd) -> MatrixCouplingProd
*(mcp::MatrixCouplingProd, factor::Number) -> MatrixCouplingProd
*(mcs::MatrixCouplingSum, element::Union{Number, MatrixCoupling, MatrixCouplingProd}) -> MatrixCouplingSum
*(element::Union{Number, MatrixCoupling, MatrixCouplingProd}, mcs::MatrixCouplingSum) -> MatrixCouplingSum
*(mcs₁::MatrixCouplingSum, mcs₂::MatrixCouplingSum) -> MatrixCouplingSum
Product between MatrixCoupling
s and MatrixCouplingProd
s.
Base.:+
— Method+(mc₁::Union{MatrixCoupling, MatrixCouplingProd}, mc₂::Union{MatrixCoupling, MatrixCouplingProd}) -> MatrixCouplingSum
+(mc::Union{MatrixCoupling, MatrixCouplingProd}, mcs::MatrixCouplingSum) -> MatrixCouplingSum
+(mcs::MatrixCouplingSum, mc::Union{MatrixCoupling, MatrixCouplingProd}) -> MatrixCouplingSum
+(mcs₁::MatrixCouplingSum, mcs₂::MatrixCouplingSum) -> MatrixCouplingSum
Addition between MatrixCoupling
s and MatrixCouplingProd
s.
Base.:/
— Method/(mcp::MatrixCouplingProd, factor::Number) -> MatrixCouplingProd
/(mcs::MatrixCouplingSum, factor::Number) -> MatrixCouplingSum
/(mc::MatrixCoupling, factor::Number) -> MatrixCouplingProd
//(mcp::MatrixCouplingProd, factor::Number) -> MatrixCouplingProd
//(mcs::MatrixCouplingSum, factor::Number) -> MatrixCouplingSum
//(mc::MatrixCoupling, factor::Number) -> MatrixCouplingProd
-(mc::MatrixCoupling) -> MatrixCouplingProd
-(mcp::MatrixCouplingProd) -> MatrixCouplingProd
-(mcs::MatrixCouplingSum) -> MatrixCouplingSum
-(mc₁::Union{MatrixCoupling, MatrixCouplingProd}, mc₂::Union{MatrixCoupling, MatrixCouplingProd}) -> MatrixCouplingSum
-(mc::Union{MatrixCoupling, MatrixCouplingProd}, mcs::MatrixCouplingSum) -> MatrixCouplingSum
-(mcs::MatrixCouplingSum, mc::Union{MatrixCoupling, MatrixCouplingProd}) -> MatrixCouplingSum
-(mcs₁::MatrixCouplingSum, mcs₂::MatrixCouplingSum) -> MatrixCouplingSum
Define right-division, minus and subtraction operator for a MatrixCoupling
/MatrixCouplingProd
/MatrixCouplingSum
.
Base.:^
— Method^(mc::Union{MatrixCoupling, MatrixCouplingProd, MatrixCouplingSum}, n::Integer) -> Union{MatrixCoupling, MatrixCouplingProd, MatrixCouplingSum}
Get the nth power of a MatrixCoupling
/MatrixCouplingProd
/MatrixCouplingSum
.
Base.adjoint
— Methodadjoint(index::CoordinatedIndex) -> typeof(index)
Get the adjoint of a coordinated index.
Base.adjoint
— Methodadjoint(index::Index) -> typeof(index)
Get the adjoint of an index.
Base.filter
— Methodfilter(ii::SimpleInternalIndex, ci::CompositeInternal) -> Union{Nothing, SimpleInternal, CompositeInternal}
filter(::Type{I}, ci::CompositeInternal) where {I<:SimpleInternalIndex} -> Union{Nothing, SimpleInternal, CompositeInternal}
Filter the composite internal space and select those that match the input simple internal index or the type of a simple internal index.
Base.filter
— Methodfilter(ii::SimpleInternalIndex, i::SimpleInternal) -> Union{Nothing, typeof(internal)}
filter(::Type{I}, i::SimpleInternal) where {I<:SimpleInternalIndex} -> Union{Nothing, typeof(internal)}
Filter a simple internal space with respect to the input simple internal index or the type of a simple internal index.
Base.filter
— Methodfilter(ii::SimpleInternalIndex, ::Type{CI}) where {CI<:CompositeInternal}
filter(::Type{I}, ::Type{CI}) where {I<:SimpleInternalIndex, CI<:CompositeInternal}
Filter the type of a composite internal space and select those that match the input simple internal index or the type of a simple internal index.
Base.filter
— Methodfilter(ii::SimpleInternalIndex, ::Type{SI}) where {SI<:SimpleInternal}
filter(::Type{I}, ::Type{SI}) where {I<:SimpleInternalIndex, SI<:SimpleInternal}
Filter the type of a simple internal space with respect to the input simple internal index or the type of a simple internal index.
Base.findall
— Methodfindall(select::Function, hilbert::Hilbert, table::Table) -> Vector{Int}
Find all the sequences of indexes contained in a Hilbert space according to a table and a select function.
Base.getindex
— Methodgetindex(table::Table, index::OperatorIndex) -> Int
Inquiry the sequence of an operator index.
Base.haskey
— Methodhaskey(table::Table, index::OperatorIndex) -> Bool
haskey(table::Table, indexes::ID{OperatorIndex}) -> Tuple{Vararg{Bool}}
Judge whether a single operator index or a set of operator indexes have been assigned with sequences in table.
Base.keys
— Methodkeys(bound::Boundary) -> Tuple{Vararg{Symbol}}
keys(::Type{<:Boundary{Names}}) where Names -> Names
Get the names of the boundary parameters.
Base.keys
— Methodkeys(::OperatorIndexToTuple{Fields}) where Fields -> Fields
keys(::Type{<:OperatorIndexToTuple{Fields}}) where Fields -> Fields
Get the values of the type parameter Fields
.
Base.match
— Methodmatch(pattern::InternalPattern, index::InternalIndexProd) -> Bool
Judge whether the direct product of a set of simple internal indexes satisfies an internal pattern.
Base.match
— Methodmatch(ii::SimpleInternalIndex, i::SimpleInternal) -> Bool
match(::Type{I}, i::SimpleInternal) where {I<:SimpleInternalIndex} -> Bool
match(ii::SimpleInternalIndex, ::Type{SI}) where {SI<:SimpleInternal} -> Bool
match(::Type{I}, ::Type{SI}) where {I<:SimpleInternalIndex, SI<:SimpleInternal} -> Bool
Judge whether a simple internal space or the type of a simple internal space matches a simple internal index or the type of a simple internal index.
Here, "match" means that the eltype
of the simple internal space is consistent with the type of the simple internal index, which usually means that they share the same type name.
Base.merge!
— Methodmerge!(bound::Boundary, another::Boundary) -> typeof(bound)
Merge the values and vectors of the twisted boundary condition from another one.
Base.one
— Methodone(term::Term) -> Term
Get a unit term.
Base.replace
— Methodreplace(bound::Boundary; values=bound.values, vectors=bound.vectors) -> Boundary
Replace the values or vectors of a twisted boundary condition and get the new one.
The plain boundary condition keeps plain even when replaced with new values or new vectors.
Base.replace
— Methodreplace(term::Term, value) -> Term
Replace the value of a term.
Base.string
— Methodstring(term::Term, bond::Bond, hilbert::Hilbert) -> String
Get the string representation of a term on a bond with a given Hilbert space.
Base.union
— Methodunion(tables::Table...) -> Table
Unite several operator index vs. sequence tables.
Base.valtype
— Methodvaltype(term::Term)
valtype(::Type{<:Term)
Get the value type of a term.
Base.valtype
— Methodvaltype(terms::Tuple{Term, Vararg{Term}})
valtype(::Type{<:T}) where {T<:Tuple{Term, Vararg{Term}}}
Get the common value type of a set of terms.
Base.valtype
— Methodvaltype(::Type{<:OperatorIndexToTuple}, ::Type{<:Index})
Get the valtype of applying an OperatorIndexToTuple
rule to an Index
.
Base.zero
— Methodzero(term::Term) -> Term
Get a zero term.
LaTeXStrings.latexstring
— Methodlatexstring(coupling::Coupling) -> String
Convert a coupling to the latex format.
LaTeXStrings.latexstring
— Methodlatexstring(pattern::InternalPattern) -> String
Convert an internal pattern to the latex format.
LaTeXStrings.latexstring
— Methodlatexstring(pattern::Pattern) -> String
Convert a coupling pattern to the latex format.
LinearAlgebra.rank
— Methodrank(ci::CompositeInternal) -> Int
rank(::Type{<:CompositeInternal{T}}) where {T<:Tuple{Vararg{SimpleInternal}}} -> Int
Get the number of simple internal spaces in a composite internal space.
LinearAlgebra.rank
— Methodrank(coupling::Coupling) -> Int
rank(::Type{M}) where {M<:Coupling} -> Int
Get the rank of a coupling.
LinearAlgebra.rank
— Methodrank(cii::InternalIndexProd) -> Int
rank(::Type{<:InternalIndexProd{T}}) where {T<:Tuple{Vararg{SimpleInternalIndex}}} -> Int
Get the number of simple internal indexes in a direct product.
LinearAlgebra.rank
— Methodrank(pattern::InternalPattern, i::Integer) -> Int
rank(::Type{P}, i::Integer) where {P<:InternalPattern} -> Int
Get the rank of the direct product of the simple internal indexes that the ith constraint in an internal pattern can apply.
LinearAlgebra.rank
— Methodrank(pattern::InternalPattern) -> Int
rank(::Type{P}) where {P<:InternalPattern} -> Int
Get the rank of the direct product of the simple internal indexes that an internal pattern can apply.
LinearAlgebra.rank
— Methodrank(pattern::Pattern) -> Int
rank(::Type{<:Pattern{<:InternalPattern, S}}) where {S<:Tuple{Vararg{Union{Ordinal, Colon}}}} -> Int
Get the rank of a coupling pattern.
LinearAlgebra.rank
— Methodrank(term::Term) -> Int
rank(::Type{<:Term) -> Int
Get the rank of a term.
QuantumLattices.:⊕
— Method⊕(is::SimpleInternal...) -> InternalSum
⊕(i::SimpleInternal, ci::InternalSum) -> InternalSum
⊕(ci::InternalSum, i::SimpleInternal) -> InternalSum
⊕(ci₁::InternalSum, ci₂::InternalSum) -> InternalSum
Direct sum between simple internal spaces and composite internal spaces.
QuantumLattices.:⊗
— Method*(cp₁::Coupling, cp₂::Coupling) -> Coupling
⊗(cp₁::Coupling, cp₂::Coupling) -> Coupling
Get the multiplication between two coupling.
QuantumLattices.:⊗
— Method⊗(pattern₁::InternalPattern, pattern₂::InternalPattern) -> InternalPattern
Get the combination of two internal patterns.
QuantumLattices.:⊗
— Method⊗(pattern₁::Pattern, pattern₂::Pattern) -> Pattern
Get the combination of two coupling patterns.
QuantumLattices.:⊗
— Method⊗(iis::SimpleInternalIndex...) -> InternalIndexProd
⊗(ii::SimpleInternalIndex, cii::InternalIndexProd) -> InternalIndexProd
⊗(cii::InternalIndexProd, ii::SimpleInternalIndex) -> InternalIndexProd
⊗(cii₁::InternalIndexProd, cii₂::InternalIndexProd) -> InternalIndexProd
Direct product between internal indexes.
QuantumLattices.:⊗
— Method⊗(is::SimpleInternal...) -> InternalProd
⊗(i::SimpleInternal, ci::InternalProd) -> InternalProd
⊗(ci::InternalProd, i::SimpleInternal) -> InternalProd
⊗(ci₁::InternalProd, ci₂::InternalProd) -> InternalProd
Direct product between simple internal spaces and composite internal spaces.
QuantumLattices.DegreesOfFreedom.allequalfields
— Methodallequalfields(::Type{I}) where {I<:SimpleInternalIndex} -> Tuple{Vararg{Symbol}}
Get the field names that can be subject to all-equal constraint based on the type of a simple internal index.
QuantumLattices.DegreesOfFreedom.coordinatedindextype
— Methodcoordinatedindextype(I::Type{<:SimpleInternal}, P::Type{<:Point})
Get the compatible type of the coordinated index based on the type of an internal space and the type of a point.
QuantumLattices.DegreesOfFreedom.indextype
— Methodindextype(::CompositeIndex)
indextype(::Type{<:CompositeIndex})
Get the index type of a composite index.
QuantumLattices.DegreesOfFreedom.indextype
— Methodindextype(I::Type{<:SimpleInternal})
Get the compatible type of the index based on the type of an internal space.
QuantumLattices.DegreesOfFreedom.internalindextype
— Methodinternalindextype(index::Index)
internalindextype(::Type{I}) where {I<:Index}
Get the type of the internal part of an index.
QuantumLattices.DegreesOfFreedom.isdefinite
— Methodisdefinite(index::Index) -> Bool
isdefinite(::Type{<:Index{I}}) where {I<:SimpleInternalIndex} -> Bool
Determine whether an index denotes a definite degree of freedom.
QuantumLattices.DegreesOfFreedom.isdefinite
— Methodisdefinite(ii::InternalIndex) -> Bool
isdefinite(::Type{<:InternalIndex}) -> Bool
Judge whether an internal index denotes a definite internal degree of freedom.
QuantumLattices.DegreesOfFreedom.isdefinite
— Methodisdefinite(indexes::Tuple{Vararg{Index}}) -> Bool
isdefinite(::Type{T}) where {T<:Tuple{Vararg{Index}}} -> Bool
Determine whether a tuple of indexes denotes a definite degree of freedom.
QuantumLattices.DegreesOfFreedom.partition
— Methodpartition(pattern::InternalPattern) -> Tuple{Vararg{Int}}
partition(::Type{<:InternalPattern{I, P} where I}) where P -> P
Get the partition of the direct product of a set of simple internal indexes on which the extra constraints operate independently.
QuantumLattices.DegreesOfFreedom.patternrule
— Functionpatternrule(value, ::Val{Name}, args...; kwargs...) where Name
By overriding this function, a named rule for the value of some attributes in a pattern can be defined so that the value can be transformed into the desired one.
In most cases, such overridden functions define the default rules for the attributes in a pattern when they take on the default value :
.
QuantumLattices.DegreesOfFreedom.patternrule
— Methodpatternrule(value, ::Val, args...; kwargs...)-> typeof(value)
Default pattern rule unless otherwise specified.
QuantumLattices.DegreesOfFreedom.patternrule
— Methodpatternrule(index::InternalIndexProd{T}, ::Val{Name}) where {N, T<:NTuple{N, SimpleInternalIndex}, Name} -> InternalIndexProd
Define the default rule for the internal index in an internal pattern.
QuantumLattices.DegreesOfFreedom.patternrule
— Methodpatternrule(sites::NTuple{N, Colon}, ::Val, bondlength::Integer) where N -> NTuple{N, Ordinal}
Define the default rule for the sites of a set of indexes in a coupling pattern.
QuantumLattices.DegreesOfFreedom.plain
— Functionplain
Plain boundary condition without any twist.
QuantumLattices.DegreesOfFreedom.statistics
— Methodstatistics(index::CompositeIndex) -> Symbol
statistics(::Type{I}) where {I<:CompositeIndex} -> Symbol
Get the statistics of a composite index.
QuantumLattices.DegreesOfFreedom.statistics
— Methodstatistics(index::Index) -> Symbol
statistics(::Type{I}) where {I<:Index} -> Symbol
Get the statistics of an index.
QuantumLattices.DegreesOfFreedom.statistics
— Methodstatistics(ii::SimpleInternalIndex) -> Symbol
Get the statistics of a simple internal index.
QuantumLattices.DegreesOfFreedom.statistics
— Methodstatistics(i::SimpleInternal) -> Symbol
statistics(::Type{<:SimpleInternal{I}}) where {I<:SimpleInternalIndex} -> Symbol
Get the statistics of a simple internal space.
QuantumLattices.QuantumOperators.operatortype
— Methodoperatortype(::Type{B}, ::Type{H}, ::Type{T}) where {B<:Bond, H<:Hilbert, T<:Term}
Get the compatible Operator
type from the type of a term, a Hilbert space and a bond.
QuantumLattices.QuantumOperators.script
— Methodscript(index::CoordinatedIndex, ::Val{:integercoordinate}; vectors, kwargs...)
Get the integer coordinate script of a coordinated index.
QuantumLattices.QuantumOperators.script
— Methodscript(index::CoordinatedIndex, ::Val{:rcoordinate}; kwargs...) -> String
script(index::CoordinatedIndex, ::Val{:icoordinate}; kwargs...) -> String
Get the rcoordinate/icoordinate script of a coordinated index.
QuantumLattices.QuantumOperators.script
— Methodscript(index::Index, ::Val{:site}; kwargs...) -> String
script(index::Index, attr::Val; kwargs...) -> String
Get the required script of an index.
QuantumLattices.QuantumOperators.script
— Methodscript(index::CompositeIndex, ::Val{attr}; kwargs...) where attr
Get the attr
script of a composite index.
QuantumLattices.Spatials.icoordinate
— Methodicoordinate(opt::Operator{<:Number, <:ID{CoordinatedIndex}}) -> SVector
Get the whole icoordinate of an operator.
QuantumLattices.Spatials.nneighbor
— Methodnneighbor(term::Term) -> Int
nneighbor(terms::Tuple{Term, Vararg{Term}}) -> Int
Get the
- order of neighbor in a single term;
- highest order of neighbors in a set of terms.
QuantumLattices.Spatials.rcoordinate
— Methodrcoordinate(opt::Operator{<:Number, <:ID{CoordinatedIndex}}) -> SVector
Get the whole rcoordinate of an operator.
QuantumLattices.Toolkit.shape
— Methodshape(internal::SimpleInternal, index::SimpleInternalIndex) -> OrdinalRange{Int, Int}
Get the shape of a simple internal space when a labeled simple internal index are considered.
A constrained internal space need this function to generate all the internal indexes that match the internal pattern, which gets a default implementation, i.e.,
shape(internal::SimpleInternal, index::SimpleInternalIndex) = shape(internal)
It can be overloaded to restrict the shape of a simple internal space based on the input simple internal index to significantly improve efficiency, but this is not necessary.
QuantumLattices.dimension
— Methoddimension(i::Internal) -> Int
Get the dimension of an internal space at a single point.
QuantumLattices.expand!
— Methodexpand!(operators::Operators, term::Term, bond::Bond, hilbert::Hilbert; half::Bool=false) -> Operators
expand!(operators::Operators, term::Term, bonds, hilbert::Hilbert; half::Bool=false) -> Operators
Expand the operators of a term on a bond/set-of-bonds with a given Hilbert space.
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.expand
— Methodexpand(term::Term, bond::Bond, hilbert::Hilbert; half::Bool=false) -> Operators
expand(term::Term, bonds, hilbert::Hilbert; half::Bool=false) -> Operators
Expand the operators of a term on a bond/set-of-bonds with a given Hilbert space.
QuantumLattices.expand
— Methodexpand(coupling::Coupling, ::Val{Rule}, bond::Bond, hilbert::Hilbert) where Rule
Expand a coupling with the given bond and Hilbert space under a given named pattern rule.
QuantumLattices.id
— Methodid(term::Term) -> Symbol
id(::Type{<:Term) -> Symbol
Get the id of a term.
QuantumLattices.kind
— Methodkind(term::Term) -> Symbol
kind(::Type{<:Term) -> Symbol
Get the kind of a term.
QuantumLattices.permute
— Methodpermute(index₁::CoordinatedIndex, index₂::CoordinatedIndex) -> Tuple{Vararg{Operator}}
Get the permutation of two coordinated indexes.
QuantumLattices.permute
— Methodpermute(index₁::Index, index₂::Index) -> Tuple{Vararg{Operator}}
Get the permutation of two indexes.
QuantumLattices.reset!
— Methodreset!(table::Table, indexes::AbstractVector{<:OperatorIndex}) -> Table
Reset a table by a new set of indexes.
QuantumLattices.reset!
— Methodreset!(table::Table, hilbert::Hilbert) -> Table
Reset a table by a Hilbert space.
QuantumLattices.update!
— Methodupdate!(bound::Boundary; parameters...) -> Boundary
Update the values of the boundary twisted phase.
QuantumLattices.update!
— Methodupdate!(term::Term, args...; kwargs...) -> Term
Update the value of a term if it is ismodulatable.
QuantumLattices.value
— Methodvalue(term::Term) -> valtype(term)
Get the value of a term.