optimise.jl

Public functions

QuantumACES.optimise_designMethod
optimise_design(c::AbstractCircuit; options::OptimOptions = OptimOptions())
optimise_design(c::AbstractCircuit, tuple_set_data::TupleSetData; options::OptimOptions = OptimOptions())

Returns an optimised experimental design for the circuit c initialised with the tuple set data tuple_set_data. The optimisation is parameterised by the OptimOptions object options.

source
QuantumACES.optimise_repetitionsMethod
optimise_repetitions(c::AbstractCircuit, tuple_set_data::TupleSetData; options::OptimOptions = OptimOptions())

Returns the tuple set data after optimising the repetition numbers in the supplied tuple set data tuple_set_data for the circuit c. The optimisation is parameterised by the OptimOptions object options.

source
QuantumACES.optimise_tuple_setMethod
optimise_tuple_set(d::Design, covariance_log::SparseMatrixCSC{Float64, Int}; options::OptimOptions = OptimOptions())

Returns versions of the design d and circuit log-eigenvalue estimator covariance matrix covariance_log after optimising the tuple set of the design with repeated excursions that grow and prune the tuple set. The optimisation is parameterised by the OptimOptions object options.

source

Private functions

QuantumACES.grow_designMethod
grow_design(d::Design, covariance_log::SparseMatrixCSC{Float64, Int}, circuit_tuple::Vector{Int})

Returns versions of the design d and circuit log-eigenvalue estimator covariance matrix covariance_log after adding the tuple circuit_tuple to the tuple set of the design.

source
QuantumACES.grow_design_excursionMethod
grow_design_excursion(d::Design, covariance_log::SparseMatrixCSC{Float64, Int}; options::OptimOptions = OptimOptions())

Returns versions of the design d and circuit log-eigenvalue estimator covariance matrix covariance_log after optimising the tuple set of the design with an excursion that grows the tuple set. The optimisation is parameterised by the OptimOptions object options.

source
QuantumACES.optimal_expectationMethod
optimal_expectation(tuple_set_data::TupleSetData, expectation_dict::Dict{Vector{Int}, Float64}, c::AbstractCircuit; options::OptimOptions = OptimOptions())

Returns the optimised figure of merit, and a dictionary of stored values, for the circuit c with tuple set data tuple_set_data, with optimised shot weights. The optimisation is parameterised by the OptimOptions object options.

source
QuantumACES.prune_designMethod
prune_design(d::Design, covariance_log::SparseMatrixCSC{Float64, Int}, prune_idx::Int; update_weights::Bool = true)

Returns versions of the design d and circuit log-eigenvalue estimator covariance matrix covariance_log after removing the tuple at index prune_idx from the tuple set of the design. If update_weights is false, do not update the shot weight factor for the covariance matrix.

source
QuantumACES.prune_design_excursionMethod
prune_design_excursion(d::Design, covariance_log::SparseMatrixCSC{Float64, Int}; options::OptimOptions = OptimOptions())

Returns versions of the design d and circuit log-eigenvalue estimator covariance matrix covariance_log after optimising the tuple set of the design with an excursion that prunes the tuple set. The optimisation is parameterised by the OptimOptions object options.

source
QuantumACES.random_tupleMethod
random_tuple(c::AbstractCircuit, tuple_length::Int, s::Float64, mirror::Bool)

Returns a random tuple for the circuit c with length tuple_length. The generation is parameterised by the Zipf power s and the tuple is mirrored if mirror is true. Adds random indices to the tuple, repeated a number of times following a generalised Zipf distribution. For dynamically decoupled circuits, this function ensures that two-qubit gate layers are always followed by some other layer in the tuple.

source
QuantumACES.sample_zipfMethod
sample_zipf(N::Int, s::Float64)

Returns a sample from a generalised Zipf distribution supported on 1 to N parameterised by the power s.

source
QuantumACES.step_repetitionsMethod
step_repetitions(tuple_set_data::TupleSetData, expectation_dict::Dict{Vector{Int}, Float64}, step_tracker::Vector{Int}, coordinate_idx::Int, c::AbstractCircuit; options::OptimOptions = OptimOptions())

Returns the tuple set data, a dictionary of stored figure of merit, and the step tracker after stepping the repetition number for the tuple set data tuple_set_data at the index coordinate_idx for the circuit c. The optimisation is parameterised by the OptimOptions object options.

source
QuantumACES.tuple_append!Method
tuple_append!(circuit_tuple::Vector{Int}, tuple_length::Int, s::Float64, unique_indices::Vector{Int}, two_qubit_indices::Vector{Int}, other_indices::Vector{Int})

Appends a random index from unique_indices to the tuple circuit_tuple, repeated a number of times determined by a Zipf distribution on 1 to tuple_length with power s. Ensures that two-qubit layers, whose indices are given by two_qubit_indices, are always followed by other layers in the tuple, whose indices are given by other_indices.

source
QuantumACES.tuple_append!Method
tuple_append!(circuit_tuple::Vector{Int}, tuple_length::Int, s::Float64, unique_indices::Vector{Int})

Appends a random index from unique_indices to the tuple circuit_tuple, repeated a number of times determined by a Zipf distribution on 1 to tuple_length with power s.

source