Frameworks

App and Engine

Assignment

Algorithm

Manual

QuantumLattices.Essentials.Frameworks.AlgorithmType
Algorithm(name::String, engine::Engine;
    din::String=".",
    dout::String=".",
    parameters::Union{Parameters, Nothing}=nothing,
    map::Function=identity,
    assignments::Tuple{Vararg{Assignment}}=(),
    kwargs...
    )

An algorithm associated with an engine.

source
QuantumLattices.Essentials.Frameworks.AssignmentType
Assignment(id::Symbol, app::App, parameters::Parameters;
    map::Function=identity,
    dependences::Tuple{Vararg{Symbol}}=(),
    data::Any=nothing,
    savedata::Bool=true,
    virgin::Bool=true,
    kwargs...
    )

An assignment associated with an app.

source
Base.:==Method
==(assign1::Assignment, assign2::Assignment) -> Bool

Judge whether two assignments are equivalent to each other.

source
Base.getMethod
get(alg::Algorithm, id::Symbol) -> Assignment
get(alg::Algorithm, ::Val{id}) where id -> Assignment

Find the assignment registered on a algorithm by its id.

source
Base.isequalMethod
isequal(assign1::Assignment, assign2::Assignment) -> Bool

Judge whether two assignments are equivalent to each other.

source
Base.reprFunction
repr(alg::Algorithm, mask::Tuple{Vararg{Symbol}}=(); ndecimal::Int=10) -> String

Get the repr representation of an algorithm.

Optionally, some parameters of the algorithm can be masked. Besides, the maximum number of decimals of the parameters can also be specified.

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

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

source
QuantumLattices.Essentials.Frameworks.dependencesFunction
dependences(alg::Algorithm, assign::Assignment, ::Tuple{}=()) -> Tuple{Vararg{Symbol}}
dependences(alg::Algorithm, assign::Assignment, mask::Tuple{Vararg{Symbol}}) -> Tuple{Vararg{Symbol}}

Get the dependences of an assignment and return their ids.

source
QuantumLattices.Essentials.Frameworks.run!Function
run!(alg::Algorithm, id::Symbol, timing::Bool=true) -> Algorithm
run!(alg::Algorithm, ::Val{id}, timing::Bool=true) where id -> Algorithm

Run an assignment with the given id registered on an algorithm. Optionally, the run process can be timed by setting the timing argument to be true.

source
QuantumLattices.Interfaces.add!Method
add!(alg::Algorithm, id::Symbol, app::App; kwargs...) -> Algorithm

Add an assignment on a algorithm by providing the contents of the assignment.

The difference between add! and register! is that the add! function does not run the newly added assignment but the register! function does.

source