Frameworks
QuantumLattices.Frameworks.eager — Constant
const eager = Eager()Singleton instance of Eager.
QuantumLattices.Frameworks.lazy — Constant
const lazy = Lazy()Singleton instance of Lazy.
Core.Tuple — Method
Tuple(data::Data)Convert Data to Tuple.
QuantumLattices.Frameworks.Action — Type
ActionAbstract type for all actions.
QuantumLattices.Frameworks.Algorithm — Type
Algorithm(name::Symbol, frontend::Frontend, parameters::Parameters=Parameters(frontend), map::Function=identity; dir::String=".", timer::TimerOutput=TimerOutput())Construct an algorithm.
QuantumLattices.Frameworks.Algorithm — Type
Algorithm{F<:Frontend, P<:Parameters, M<:Function} <: FunctionAn algorithm associated with an frontend.
QuantumLattices.Frameworks.Algorithm — Type
(alg::Algorithm)(assign::Assignment, checkoptions::Bool=true; options...) -> Assignment
(assign::Assignment)(alg::Algorithm, checkoptions::Bool=true; options...) -> AssignmentRun 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)(name::Symbol, action::Action, dependencies::ZeroOrMore{Assignment}; dir::String=alg.dir, delay::Bool=false, options...) -> Assignment
(alg::Algorithm)(name::Symbol, action::Action, parameters::Parameters, dependencies::ZeroOrMore{Assignment}; dir::String=alg.dir, delay::Bool=false, options...) -> Assignment
(alg::Algorithm)(name::Symbol, action::Action, parameters::Parameters=Parameters(), map::Function=identity, dependencies::ZeroOrMore{Assignment}=(); dir::String=alg.dir, delay::Bool=false, options...) -> AssignmentAdd an assignment on a algorithm by providing the contents of the assignment, and run this assignment.
QuantumLattices.Frameworks.Assignment — Type
Assignment{A<:Action, P<:Parameters, M<:Function, N, D<:Data} <: FunctionAn assignment associated with an action.
QuantumLattices.Frameworks.CategorizedGenerator — Type
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.
QuantumLattices.Frameworks.Data — Type
DataAbstract type for the data of an action.
QuantumLattices.Frameworks.Eager — Type
Eager <: ExpansionStyleEager expansion style with eager computation so that similar terms are combined in the final result.
QuantumLattices.Frameworks.ExpansionStyle — Type
ExpansionStyleExpansion style of a generator of (representations of) quantum operators. It has two singleton subtypes, Eager and Lazy.
QuantumLattices.Frameworks.Formula — Type
Formula{V, F<:Function, P<:Parameters}Representation of a quantum lattice system with an explicit analytical formula.
QuantumLattices.Frameworks.Formula — Method
(formula::Formula)(args...; kwargs...) -> valtype(formula)Get the result of a Formula.
QuantumLattices.Frameworks.Frontend — Type
FrontendFrontend of algorithms applied to a quantum lattice system.
QuantumLattices.Frameworks.Generator — Type
Generator{V}Generator of (representations of) quantum operators in a quantum lattice system.
QuantumLattices.Frameworks.Generator — Method
Generator(constops, alterops::NamedTuple, boundops::NamedTuple, parameters::Parameters, boundary::Boundary, style::ExpansionStyle) -> CategorizedGeneratorConstruct a CategorizedGenerator.
QuantumLattices.Frameworks.Generator — Method
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) -> OperatorGeneratorConstruct an OperatorGenerator.
QuantumLattices.Frameworks.Lazy — Type
Lazy <: ExpansionStyleLazy expansion style with lazy computation so that similar terms are not combined in the final result.
QuantumLattices.Frameworks.OperatorGenerator — Type
OperatorGenerator{V<:Operators, CG<:CategorizedGenerator{V}, B<:Bond, H<:Hilbert, TS<:ZeroAtLeast{Term}} <: Generator{V}A generator of operators based on the terms, bonds and Hilbert space of a quantum lattice system.
QuantumLattices.Frameworks.OperatorGenerator — Type
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.
QuantumLattices.Frameworks.Parameters — Type
Parameters{Names}(values::Number...) where NamesA NamedTuple that contains the key-value pairs.
QuantumLattices.Frameworks.Parameters — Method
Parameters(algorithm::Algorithm)Get the parameters of an algorithm.
QuantumLattices.Frameworks.Parameters — Method
Parameters(assignment::Assignment) -> ParametersGet the parameters of an assignment.
QuantumLattices.Frameworks.Parameters — Method
Parameters(bound::Boundary)Get the parameters of the twisted boundary condition.
QuantumLattices.Frameworks.Parameters — Method
Parameters(cat::CategorizedGenerator)Get the complete set of parameters of a categorized generator of (representations of) quantum operators.
QuantumLattices.Frameworks.Parameters — Method
Parameters(formula::Formula) -> ParametersGet the parameters of a Formula.
QuantumLattices.Frameworks.Parameters — Method
Parameters(gen::OperatorGenerator) -> ParametersGet the parameters of an OperatorGenerator.
QuantumLattices.Frameworks.Parameters — Method
Parameters(ops::OperatorSet) -> NamedTuple{(), Tuple{}}Get the parameters of an OperatorSet, which is defined to be an empty NamedTuple.
QuantumLattices.QuantumOperators.LinearTransformation — Method
(transformation::LinearTransformation)(cat::CategorizedGenerator; kwargs...) -> CategorizedGeneratorApply a linear transformation to a categorized generator of (representations of) quantum operators.
QuantumLattices.QuantumOperators.LinearTransformation — Method
(transformation::LinearTransformation)(gen::OperatorGenerator; kwargs...) -> CategorizedGeneratorGet the transformation applied to a generator of quantum operators.
Base.Filesystem.basename — Method
basename(obj::Union{Assignment, Algorithm}; prefix::String="", suffix::String="", extension::String="qld") -> StringGet the basename of the data file of an assignment/algorithm.
Base.Filesystem.dirname — Method
dirname(obj::Union{Assignment, Algorithm}) -> StringGet the dirname of the data file of an assignment/algorithm.
Base.eltype — Method
eltype(gen::Generator)
eltype(::Type{T}) where {T<:Generator}Get the eltype of a Generator.
Base.empty — Method
empty(cat::CategorizedGenerator) -> CategorizedGenerator
empty!(cat::CategorizedGenerator) -> CategorizedGeneratorGet an empty copy of a categorized generator or empty a categorized generator of (representations of) quantum operators.
Base.empty — Method
empty(gen::OperatorGenerator) -> OperatorGenerator
empty!(gen::OperatorGenerator) -> OperatorGeneratorGet an empty copy of or empty an operator generator.
Base.isempty — Method
isempty(cat::CategorizedGenerator) -> BoolJudge whether a categorized generator is empty.
Base.isempty — Method
isempty(gen::OperatorGenerator) -> BoolJudge whether an OperatorGenerator is empty.
Base.iterate — Method
iterate(gen::Generator)
iterate(::Generator, state)Iterate over a Generator.
Base.match — Method
match(params₁::Parameters, params₂::Parameters; atol=atol, rtol=rtol) -> BoolJudge whether the second set of parameters matches the first.
Base.pathof — Method
pathof(obj::Union{Assignment, Algorithm}; prefix::String="", suffix::String="", extension::String="qld") -> StringGet the path of the data file of an assignment/algorithm.
Base.show — Method
show(io::IO, ::MIME"text/plain", 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.
Base.show — Method
show(io::IO, ::MIME"text/plain", assign::Assignment)Show an assignment.
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.
Base.summary — Method
summary(alg::Algorithm)Provide a summary of an algorithm.
Base.valtype — Method
valtype(assign::Assignment)
valtype(::Type{<:Assignment})Type of the data (result) of an assignment.
Base.valtype — Method
valtype(formula::Formula)
valtype(::Type{<:Formula{V}})Get the valtype of a Formula.
Base.valtype — Method
valtype(gen::Generator)
valtype(::Type{<:Generator{V}}) where VGet the valtype of a Generator.
QuantumLattices.Frameworks.checkoptions — Method
checkoptions(::Type{A}; options...) where {A<:Assignment}Check whether the keyword arguments are legal options of a certain type of Assignment.
QuantumLattices.Frameworks.datatype — Method
datatype(::Type{A}, ::Type{F}) where {A<:Action, F<:Frontend}Get the concrete subtype of Data according to the types of an Action and a Frontend.
QuantumLattices.Frameworks.hasoption — Method
hasoption(::Type{A}, option::Symbol) where {A<:Assignment} -> BoolJudge whether a certain type of Assignment has an option.
QuantumLattices.Frameworks.options — Method
options(::Type{<:Assignment}) -> NamedTupleGet the options of a certain type of Assignment.
QuantumLattices.Frameworks.optionsinfo — Method
optionsinfo(::Type{A}; level::Int=1) where {A<:Assignment} -> StringGet the complete info of the options of a certain type of Assignment, including that of its dependencies.
QuantumLattices.Frameworks.qldload — Method
qldload(filename::String) -> Dict{String, Any}
qldload(filename::String, name::String) -> Any
qldload(filename::String, name₁::String, name₂::String, names::String...) -> TupleLoad data from a qld file.
QuantumLattices.Frameworks.qldsave — Method
qldsave(filename::String, args...; mode::String="a+")Save arbitrary data to a qld file.
QuantumLattices.Frameworks.qldsave — Method
qldsave(obj::Union{Assignment, Algorithm}, objs::Union{Assignment, Algorithm}...; mode::String="a+", prefix::String="", suffix::String="", ndecimal::Int=10, select::Function=name::Symbol->true, front::String="", rear::String="")Save a series of assignments/algorithms to qld files.
QuantumLattices.Frameworks.run! — Function
run!(alg::Algorithm, assign::Assignment; options...)Run an assignment based on an algorithm.
QuantumLattices.QuantumOperators.scalartype — Method
scalartype(::Type{F}) where {F<:Formula}Get the scalar type of a Formula.
QuantumLattices.QuantumOperators.scalartype — Method
scalartype(::Type{T}) where {T<:Generator}Get the scalar type of a Generator.
QuantumLattices.Spatials.dlmsave — Function
dlmsave(assignment::Assignment, delim=' '; prefix::String="", suffix::String="", ndecimal::Int=10, select::Function=name::Symbol->true, front::String="", rear::String="")Save the data of an assignment to a delimited file.
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.
QuantumLattices.expand — Method
expand(cat::CategorizedGenerator, ::Lazy)Expand a categorized generator to get the (representations of) quantum operators in a quantum lattice system.
QuantumLattices.expand — Method
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.
QuantumLattices.expand — Method
expand(gen::OperatorGenerator, name::Symbol) -> Operators
expand(gen::OperatorGenerator, i::Int) -> Operators
expand(gen::OperatorGenerator, name::Symbol, i::Int) -> OperatorsExpand 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.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.
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.
QuantumLattices.reset! — Method
reset!(gen::OperatorGenerator, bonds::AbstractVector{<:Bond}, hilbert::Hilbert; vectors::AbstractVector{<:AbstractVector}=gen.operators.boundary.vectors) -> OperatorGeneratorReset an operator generator by a new lattice and the corresponding new hilbert space.
QuantumLattices.str — Method
str(params::Parameters; ndecimal::Int=10, select::Function=name::Symbol->true, front::String="", rear::String="") -> StringConvert a set of Parameters to a string with each number hosting at most ndecimal decimal places. Here, the select function can select the key-value pairs to be contained by the keys.
QuantumLattices.str — Method
str(obj::Union{Assignment, Algorithm}; prefix::String="", suffix::String="", ndecimal::Int=10, select::Function=name::Symbol->true, front::String="", rear::String="") -> StringGet the string representation of an assignment/algorithm.
QuantumLattices.update! — Method
update!(action::Action; parameters...) -> ActionUpdate the parameters of an action.
QuantumLattices.update! — Method
update!(alg::Algorithm; parameters...) -> AlgorithmUpdate the parameters of an algorithm and its associated frontend.
QuantumLattices.update! — Method
update!(assign::Assignment; parameters...) -> AssignmentUpdate the parameters of an assignment and the status of its associated action.
QuantumLattices.update! — Method
update!(cat::CategorizedGenerator, transformation::LinearTransformation, source::CategorizedGenerator; kwargs...) -> CategorizedGeneratorUpdate 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.
QuantumLattices.update! — Method
update!(cat::CategorizedGenerator, transformation::LinearTransformation, source::OperatorGenerator; kwargs...) -> CategorizedGeneratorUpdate 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.
QuantumLattices.update! — Method
update!(cat::CategorizedGenerator{<:OperatorSum}; parameters...) -> CategorizedGeneratorUpdate 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.
QuantumLattices.update! — Method
update!(formula::Formula; parameters...) -> FormulaUpdate the parameters of a Formula in place and return itself after update.
QuantumLattices.update! — Method
update!(gen::OperatorGenerator; parameters...) -> typeof(gen)Update the coefficients of the terms in a generator.
QuantumLattices.update — Method
update(params::NamedTuple; parameters...) -> ParametersUpdate a set of Parameters and return the updated one.
RecipesBase.apply_recipe — Method
@recipe plot(assignment::Assignment)Define the recipe for the visualization of an assignment of an algorithm.