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.CompositeGeneratorType
CompositeGenerator{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 operators
  • table::T: the index-sequence table if it is not nothing
source
QuantumLattices.Frameworks.EntryType
Entry(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.

source
QuantumLattices.Frameworks.EntryType
Entry{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.

source
QuantumLattices.Frameworks.ImageType
Image{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.

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

source
QuantumLattices.Frameworks.OperatorGeneratorType
OperatorGenerator{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.

source
QuantumLattices.QuantumOperators.TransformationType
(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.

source
Base.:*Method
*(entry::Entry, factor) -> Entry
*(factor, entry::Entry) -> Entry

Multiply an entry of quantum operators with a factor.

source
Base.:+Method
+(entry₁::Entry, entry₂::Entry) -> Entry

Addition of two entries of quantum operators.

source
Base.emptyMethod
empty(entry::Entry) -> Entry
empty!(entry::Entry) -> Entry

Get an empty copy of an entry or empty an entry of (representations of) quantum operators.

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

Get an empty copy of or empty the image of a transformation applied to a representation.

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

Get an empty copy of or empty an operator 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.reprFunction
repr(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.

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

The type of the data(result) of an assignment.

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

Get the valtype of an entry of (representations of) quantum operators.

source
QuantumLattices.Frameworks.prepare!Function
prepare!(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.

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, dependences::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, entry::Entry) -> typeof(result)

Expand an entry to get the (representation of) quantum operators related to 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.expandMethod
expand(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).

source
QuantumLattices.reset!Function
reset!(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.

source
QuantumLattices.reset!Function
reset!(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.

source
QuantumLattices.reset!Method
reset!(entry::Entry, transformation::LinearTransformation, source::Entry{<:Operators}; kwargs...)

Reset an entry by its source entry of quantum operators and the corresponding linear transformation.

source
QuantumLattices.reset!Method
reset!(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.

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!(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.

source
QuantumLattices.update!Method
update!(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.

source
QuantumLattices.update!Method
update!(gen::Image, source::RepresentationGenerator; kwargs...) -> Image

Update the parameters of the image based on its source representation.

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

Update the parameters of the image of a transformation applied to a representation.

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

Update the coefficients of the terms in a generator.

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

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

source