Frameworks
QuantumLattices.Frameworks.Action
— TypeAction
Abstract type for all actions.
QuantumLattices.Frameworks.Algorithm
— TypeAlgorithm{F<:Frontend, P<:Parameters, M<:Function} <: Function
An algorithm associated with an frontend.
QuantumLattices.Frameworks.Algorithm
— Method(alg::Algorithm)(assign::Assignment) -> Tuple{Algorithm, Assignment}
(assign::Assignment)(alg::Algorithm) -> Tuple{Algorithm, Assignment}
Run an assignment based on an algorithm.
The difference between these two methods is that the first uses the parameters of assign
as the current parameters while the second uses those of alg
.
QuantumLattices.Frameworks.Algorithm
— Method(alg::Algorithm)(id::Symbol, action::Action; info::Bool=true, kwargs...) -> Tuple{Algorithm, Assignment}
Add an assignment on a algorithm by providing the contents of the assignment, and run this assignment.
QuantumLattices.Frameworks.Algorithm
— MethodAlgorithm(name::Symbol, frontend::Frontend; din::String=".", dout::String=".", parameters::Parameters=Parameters(frontend), map::Function=identity)
Construct an algorithm.
QuantumLattices.Frameworks.Algorithm
— Method(alg::Algorithm)(id::Symbol; info::Bool=true, parameters::Parameters=Parameters{()}()) -> Tuple{Algorithm, Assignment}
Run an assignment specified by its id.
Optionally, the time of the run process can be informed by setting the info
argument to be true
.
QuantumLattices.Frameworks.AnalyticalExpression
— TypeAnalyticalExpression{F<:Function, P<:Parameters} <: RepresentationGenerator
Representation of a quantum lattice system by an analytical expression.
QuantumLattices.Frameworks.Assignment
— TypeAssignment{A<:Action, P<:Parameters, M<:Function, N, D} <: Function
An assignment associated with an action.
QuantumLattices.Frameworks.CompositeGenerator
— TypeCompositeGenerator{E<:Entry, T<:Union{Table, Nothing}} <: RepresentationGenerator
Abstract type for a composite representation generator of a quantum lattice system.
By protocol, it must have the following predefined contents:
operators::E
: the entry for the generated (representations of) quantum operatorstable::T
: the index-sequence table if it is not nothing
QuantumLattices.Frameworks.Entry
— TypeEntry(terms::Tuple{Vararg{Term}}, bonds::Vector{<:Bond}, hilbert::Hilbert, boundary::Boundary=plain; half::Bool=false)
Construct an entry of quantum operators based on the input terms, bonds, Hilbert space and (twisted) boundary condition.
QuantumLattices.Frameworks.Entry
— TypeEntry{C, A<:NamedTuple, B<:NamedTuple, P<:Parameters, D<:Boundary} <: RepresentationGenerator
The basic representation generator of a quantum lattice system that records the quantum operators or a representation of the quantum operators related to (part of) the system.
QuantumLattices.Frameworks.Frontend
— TypeFrontend
The frontend of algorithms applied to a quantum lattice system.
QuantumLattices.Frameworks.Image
— TypeImage{E<:Entry, H<:Transformation, T<:Union{Table, Nothing}} <: CompositeGenerator{E, T}
The image of a transformation applied to a representation of a quantum lattice system.
QuantumLattices.Frameworks.OperatorGenerator
— TypeOperatorGenerator(terms::Tuple{Vararg{Term}}, bonds::Vector{<:Bond}, hilbert::Hilbert, boundary::Boundary=plain, table::Union{Table,Nothing}=nothing; half::Bool=false)
Construct a generator of operators.
QuantumLattices.Frameworks.OperatorGenerator
— TypeOperatorGenerator{E<:Entry{<:Operators}, TS<:Tuple{Vararg{Term}}, B<:Bond, H<:Hilbert, T<:Union{Table, Nothing}} <: CompositeGenerator{E, T}
A generator of operators based on the terms, bonds and Hilbert space of a quantum lattice system.
QuantumLattices.Frameworks.Parameters
— TypeParameters{Names}(values::Number...) where Names
A NamedTuple that contain the key-value pairs.
QuantumLattices.Frameworks.Parameters
— MethodParameters(bound::Boundary)
Get the parameters of the twisted boundary condition.
QuantumLattices.Frameworks.Parameters
— MethodParameters(entry::Entry)
Get the complete set of parameters of an entry of (representations of) quantum operators.
QuantumLattices.Frameworks.RepresentationGenerator
— TypeRepresentationGenerator <: Frontend
Representation generator of a quantum lattice system.
QuantumLattices.QuantumOperators.LinearTransformation
— Method(transformation::LinearTransformation)(entry::Entry; kwargs...) -> Entry
Apply a linear transformation to an entry of (representations of) quantum operators.
QuantumLattices.QuantumOperators.Transformation
— Type(transformation::Transformation)(gen::RepresentationGenerator, table::Union{Table, Nothing}=nothing; kwargs...) -> Image
Get the image of a transformation applied to a representation of a quantum lattice system.
Base.:*
— Method*(entry::Entry, factor) -> Entry
*(factor, entry::Entry) -> Entry
Multiply an entry of quantum operators with a factor.
Base.:+
— Method+(entry₁::Entry, entry₂::Entry) -> Entry
Addition of two entries of quantum operators.
Base.empty
— Methodempty(entry::Entry) -> Entry
empty!(entry::Entry) -> Entry
Get an empty copy of an entry or empty an entry of (representations of) quantum operators.
Base.empty
— Methodempty(gen::Image) -> Image
empty!(gen::Image) -> Image
Get an empty copy of or empty the image of a transformation applied to a representation.
Base.empty
— Methodempty(gen::OperatorGenerator) -> OperatorGenerator
empty!(gen::OperatorGenerator) -> OperatorGenerator
Get an empty copy of or empty an operator generator.
Base.match
— Methodmatch(params₁::Parameters, params₂::Parameters; atol=atol, rtol=rtol) -> Bool
Judge whether the second set of parameters matches the first.
Base.nameof
— Methodnameof(alg::Algorithm, assign::Assignment) -> String
Get the name of the combination of an algorithm and an assignment.
Base.repr
— Functionrepr(alg::Algorithm, f::Function=param->true; ndecimal::Int=10) -> String
Get the repr representation of an algorithm.
Optionally, some parameters of the algorithm can be filtered by specifying the f
function. Besides, the maximum number of decimals of the parameters can also be specified by the keyword argument ndecimal
.
Base.summary
— Methodsummary(alg::Algorithm)
Provide a summary of an algorithm.
Base.valtype
— Methodvaltype(assign::Assignment)
valtype(::Type{<:Assignment})
The type of the data(result) of an assignment.
Base.valtype
— Methodvaltype(::Type{<:Entry})
Get the valtype of an entry of (representations of) quantum operators.
QuantumLattices.Frameworks.prepare!
— Functionprepare!(alg::Algorithm, assign::Assignment, f::Function=assign->true) -> Tuple{Algorithm, Assignment}
Run the dependences of an assignment.
Optionally, some dependences can be filtered by specifying the f
function.
QuantumLattices.Spatials.save
— Methodsave(alg::Algorithm, assign::Assignment; delimited=false) -> Tuple{Algorithm, Assignment}
Save the data of an assignment registered on an algorithm.
QuantumLattices.add!
— Methodadd!(alg::Algorithm, id::Symbol, action::Action; parameters::Parameters=Parameters{()}(), map::Function=identity, dependences::Tuple=(), kwargs...) -> Tuple{Algorithm, Assignment}
Add an assignment on an algorithm by providing the contents of the assignment without the execution of it.
QuantumLattices.expand!
— Methodexpand!(result, entry::Entry) -> typeof(result)
Expand an entry to get the (representation of) quantum operators related to a quantum lattice system.
QuantumLattices.expand
— Methodexpand(gen::OperatorGenerator, name::Symbol) -> Operators
expand(gen::OperatorGenerator, i::Int) -> Operators
expand(gen::OperatorGenerator, name::Symbol, i::Int) -> Operators
Expand an operator generator to get:
- the operators of a specific term;
- the operators on a specific bond;
- the operators of a specific term on a specific bond.
QuantumLattices.expand
— Methodexpand(gen::RepresentationGenerator) -> valtype(gen)
expand!(result, gen::RepresentationGenerator) -> typeof(result)
Expand the generator to get the representation of the quantum lattice system (or some part of it).
QuantumLattices.reset!
— Functionreset!(entry::Entry{<:Operators}, terms::Tuple{Vararg{Term}}, bonds::Vector{<:Bond}, hilbert::Hilbert, boundary::Boundary=entry.boundary; half::Bool=false) -> Entry
Reset an entry of quantum operators by the new terms, bonds, Hilbert space and (twisted) boundary condition.
QuantumLattices.reset!
— Functionreset!(gen::Image, transformation::Transformation, source::CompositeGenerator, table::Union{Table, Nothing}=getcontent(source, :table); kwargs...) -> Image
reset!(gen::Image, transformation::Transformation, source::RepresentationGenerator, table::Union{Table, Nothing}=gen.table; kwargs...) -> Image
Reset the image of a transformation applied to a representation.
QuantumLattices.reset!
— Methodreset!(entry::Entry, transformation::LinearTransformation, source::Entry{<:Operators}; kwargs...)
Reset an entry by its source entry of quantum operators and the corresponding linear transformation.
QuantumLattices.reset!
— Methodreset!(gen::OperatorGenerator, lattice::AbstractLattice, hilbert::Hilbert; neighbors=max(map(term->term.bondkind, gen.terms)...)) -> OperatorGenerator
Reset an operator generator by a new lattice and the corresponding new hilbert space.
QuantumLattices.update!
— Methodupdate!(alg::Algorithm; parameters...) -> Algorithm
Update the parameters of an algorithm and its associated frontend.
QuantumLattices.update!
— Methodupdate!(assign::Assignment; parameters...) -> Assignment
Update the parameters of an assignment and the status of its associated action.
QuantumLattices.update!
— Methodupdate!(entry::Entry, transformation::LinearTransformation, source::Entry{<:Operators}; kwargs...) -> Entry
Update the parameters (including the boundary parameters) of an entry based on its source entry of quantum operators and the corresponding linear transformation.
!!! Note The coefficients of boundops
are also updated due to the change of the boundary parameters.
QuantumLattices.update!
— Methodupdate!(entry::Entry{<:Operators}; parameters...) -> Entry
Update the parameters (including the boundary parameters) of an entry of quantum operators.
!!! Note The coefficients of boundops
are also updated due to the change of the boundary parameters.
QuantumLattices.update!
— Methodupdate!(gen::Image, source::RepresentationGenerator; kwargs...) -> Image
Update the parameters of the image based on its source representation.
QuantumLattices.update!
— Methodupdate!(gen::Image; parameters...) -> typeof(gen)
Update the parameters of the image of a transformation applied to a representation.
QuantumLattices.update!
— Methodupdate!(gen::OperatorGenerator; parameters...) -> typeof(gen)
Update the coefficients of the terms in a generator.
RecipesBase.apply_recipe
— Method@recipe plot(pack::Tuple{Algorithm, Assignment})
Define the recipe for the visualization of an assignment of an algorithm.