Frameworks

QuantumLattices.Frameworks.AlgorithmMethod
(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.

source
QuantumLattices.Frameworks.AlgorithmMethod
(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.

source
QuantumLattices.Frameworks.AlgorithmMethod
Algorithm(name::Symbol, frontend::Frontend; din::String=".", dout::String=".", parameters::Parameters=Parameters(frontend), map::Function=identity)

Construct an algorithm.

source
QuantumLattices.Frameworks.AlgorithmMethod
(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.

source
QuantumLattices.Frameworks.CategorizedGeneratorType
CategorizedGenerator{V, C, A<:NamedTuple, B<:NamedTuple, P<:Parameters, D<:Boundary, S<:ExpansionStyle} <: Generator{V}

Categorized generator that groups the (representations of) quantum operators in a quantum lattice system into three categories, i.e., the constant, the alterable, and the boundary.

source
QuantumLattices.Frameworks.GeneratorMethod
Generator(constops, alterops::NamedTuple, boundops::NamedTuple, parameters::Parameters, boundary::Boundary, style::ExpansionStyle) -> CategorizedGenerator

Construct a CategorizedGenerator.

source
QuantumLattices.Frameworks.GeneratorMethod
Generator(operators::CategorizedGenerator{<:Operators}, bonds::Vector{<:Bond}, hilbert::Hilbert, terms::OneOrMore{Term}, half::Bool) -> OperatorGenerator
Generator(bonds::Vector{<:Bond}, hilbert::Hilbert, terms::OneOrMore{Term}, boundary::Boundary=plain, style::ExpansionStyle=eager; half::Bool=false) -> OperatorGenerator

Construct an OperatorGenerator.

source
QuantumLattices.Frameworks.OperatorGeneratorType
OperatorGenerator(bonds::Vector{<:Bond}, hilbert::Hilbert, terms::OneOrMore{Term}, boundary::Boundary=plain, style::ExpansionStyle=eager; half::Bool=false)

Construct a generator of quantum operators based on the input bonds, Hilbert space, terms and (twisted) boundary condition.

When the boundary condition is plain, the boundary operators will be set to be empty for simplicity and efficiency.

source
QuantumLattices.Frameworks.OperatorGeneratorType
OperatorGenerator{V<:Operators, CG<:CategorizedGenerator{V}, B<:Bond, H<:Hilbert, TS<:Tuple{Vararg{Term}}} <: Generator{V}

A generator of operators based on the terms, bonds and Hilbert space of a quantum lattice system.

source
Base.:*Method
*(cat::CategorizedGenerator, factor) -> CategorizedGenerator
*(factor, cat::CategorizedGenerator) -> CategorizedGenerator

Multiply a categorized generator of (representations of) quantum operators with a factor.

source
Base.:+Method
+(cat₁::CategorizedGenerator, cat₂::CategorizedGenerator) -> CategorizedGenerator

Addition of two categorized generators of (representations of) quantum operators.

source
Base.eltypeMethod
eltype(gen::Generator)
eltype(::Type{T}) where {T<:Generator}

Get the eltype of a Generator.

source
Base.emptyMethod
empty(cat::CategorizedGenerator) -> CategorizedGenerator
empty!(cat::CategorizedGenerator) -> CategorizedGenerator

Get an empty copy of a categorized generator or empty a categorized generator of (representations of) quantum operators.

source
Base.emptyMethod
empty(gen::OperatorGenerator) -> OperatorGenerator
empty!(gen::OperatorGenerator) -> OperatorGenerator

Get an empty copy of or empty an operator generator.

source
Base.isemptyMethod
isempty(cat::CategorizedGenerator) -> Bool

Judge whether a categorized generator is empty.

source
Base.isemptyMethod
isempty(gen::OperatorGenerator) -> Bool

Judge whether an OperatorGenerator is empty.

source
Base.iterateMethod
iterate(gen::Generator)
iterate(::Generator, state)

Iterate over a Generator.

source
Base.matchMethod
match(params₁::Parameters, params₂::Parameters; atol=atol, rtol=rtol) -> Bool

Judge whether the second set of parameters matches the first.

source
Base.nameofMethod
nameof(alg::Algorithm, assign::Assignment) -> String

Get the name of the combination of an algorithm and an assignment.

source
Base.showMethod
show(io::IO, alg::Algorithm)

Show an algorithm.

Optionally, some parameters of the algorithm can be filtered by specifying the :select context in io. Besides, the maximum number of decimals of the parameters can also be specified by the :ndecimal context in io.

source
Base.valtypeMethod
valtype(assign::Assignment)
valtype(::Type{<:Assignment})

Type of the data (result) of an assignment.

source
Base.valtypeMethod
valtype(formula::Formula)
valtype(::Type{<:Formula{V}})

Get the valtype of a Formula.

source
Base.valtypeMethod
valtype(gen::Generator)
valtype(::Type{<:Generator{V}}) where V

Get the valtype of a Generator.

source
QuantumLattices.Frameworks.prepare!Function
prepare!(alg::Algorithm, assign::Assignment, f::Function=assign->true) -> Tuple{Algorithm, Assignment}

Run the dependencies of an assignment.

Optionally, some dependencies can be filtered by specifying the f function.

source
QuantumLattices.Spatials.saveMethod
save(alg::Algorithm, assign::Assignment; delimited=false) -> Tuple{Algorithm, Assignment}

Save the data of an assignment registered on an algorithm.

source
QuantumLattices.add!Method
add!(alg::Algorithm, id::Symbol, action::Action; parameters::Parameters=Parameters{()}(), map::Function=identity, dependencies::Tuple=(), kwargs...) -> Tuple{Algorithm, Assignment}

Add an assignment on an algorithm by providing the contents of the assignment without the execution of it.

source
QuantumLattices.expand!Method
expand!(result, gen::Generator) -> typeof(result)

Expand the generator to add the (representations of) quantum operators in a quantum lattice system to result.

source
QuantumLattices.expandMethod
expand(cat::CategorizedGenerator, ::Lazy)

Expand a categorized generator to get the (representations of) quantum operators in a quantum lattice system.

source
QuantumLattices.expandMethod
expand(gen::Generator)
expand(gen::Generator, ::Eager)
expand(gen::Generator, ::Lazy)

Expand the generator to get the (representations of) quantum operators in a quantum lattice system.

source
QuantumLattices.expandMethod
expand(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:

  1. the operators of a specific term;
  2. the operators on a specific bond;
  3. the operators of a specific term on a specific bond.
source
QuantumLattices.reset!Method
reset!(cat::CategorizedGenerator, transformation::LinearTransformation, source::CategorizedGenerator; kwargs...)

Reset a categorized generator by its source categorized generator of (representations of) quantum operators and the corresponding linear transformation.

source
QuantumLattices.reset!Method
reset!(cat::CategorizedGenerator, transformation::LinearTransformation, source::OperatorGenerator; kwargs...)

Reset a categorized generator by its source operator generator of (representations of) quantum operators and the corresponding linear transformation.

source
QuantumLattices.reset!Method
reset!(gen::OperatorGenerator, bonds::AbstractVector{<:Bond}, hilbert::Hilbert; vectors::AbstractVector{<:AbstractVector}=gen.operators.boundary.vectors) -> OperatorGenerator

Reset an operator generator by a new lattice and the corresponding new hilbert space.

source
QuantumLattices.update!Method
update!(alg::Algorithm; parameters...) -> Algorithm

Update the parameters of an algorithm and its associated frontend.

source
QuantumLattices.update!Method
update!(assign::Assignment; parameters...) -> Assignment

Update the parameters of an assignment and the status of its associated action.

source
QuantumLattices.update!Method
update!(cat::CategorizedGenerator, transformation::LinearTransformation, source::CategorizedGenerator; kwargs...) -> CategorizedGenerator

Update the parameters (including the boundary parameters) of a categorized generator based on its source categorized generator of (representations of) quantum operators and the corresponding linear transformation.

!!! Note The coefficients of boundops are also updated due to the change of the boundary parameters.

source
QuantumLattices.update!Method
update!(cat::CategorizedGenerator, transformation::LinearTransformation, source::OperatorGenerator; kwargs...) -> CategorizedGenerator

Update the parameters (including the boundary parameters) of a categorized generator based on its source operator generator of (representations of) quantum operators and the corresponding linear transformation.

!!! Note The coefficients of boundops are also updated due to the change of the boundary parameters.

source
QuantumLattices.update!Method
update!(cat::CategorizedGenerator{<:OperatorSum}; parameters...) -> CategorizedGenerator

Update the parameters (including the boundary parameters) of a categorized generator of (representations of) quantum operators.

!!! Note The coefficients of boundops are also updated due to the change of the boundary parameters.

source
QuantumLattices.update!Method
update!(formula::Formula; parameters...) -> Formula

Update the parameters of a Formula in place and return itself after update.

source
QuantumLattices.update!Method
update!(gen::OperatorGenerator; parameters...) -> typeof(gen)

Update the coefficients of the terms in a generator.

source
QuantumLattices.updateMethod
update(params::NamedTuple; parameters...) -> Parameters

Update a set of Parameters and return the updated one.

source
RecipesBase.apply_recipeMethod
@recipe plot(pack::Tuple{Algorithm, Assignment})

Define the recipe for the visualization of an assignment of an algorithm.

source