tuples.jl

Public functions

QuantumACES.TupleSetDataType
TupleSetData

Data parameterising a tuple set.

Fields

  • tuple_set::Vector{Vector{Int}}: The main tuple set, whose tuples are not repeated.
  • repeat_tuple_set::Vector{Vector{Int}}: The repeat tuple set, whose tuples are repeated according to the repeat_numbers.
  • repeat_numbers::Vector{Int}: The number of repetitions for tuples in the repeat tuple set repeat_tuple_set.
  • repeat_indices::Vector{Tuple{Int, Int}}: Indexes pairs (repeat_tuple, repeat_number) from (repeat_tuple_set, repeat_numbers) such that the repeated tuple set consists of repeat_tuple repeated repeat_number times for all indexed pairs.
source
QuantumACES.get_augmented_tuple_set_dataMethod
get_augmented_tuple_set_data(tuple_set_data::TupleSetData, repeat_points::Integer; initial_shrink_factor::Real = 2^(repeat_points - 1))

Returns an augmented version of the tuple set data tuple_set_data, where each of the repetition numbers is augmented to have repeat_points total repetition numbers, spaced logarithmically between the repetition number and the repetition number shrunk by a factor of initial_shrink_factor.

source
QuantumACES.get_circuit_tupleMethod
get_circuit_tuple(c::AbstractCircuit; include_reset::Bool = false)

Returns the circuit tuple corresponding to the circuit c, including reset layers if include_reset is true.

source
QuantumACES.get_tuple_set_dataMethod
get_tuple_set_data(c::AbstractCircuit; error_target::Real = 0.1, add_circuit::Bool = false)
get_tuple_set_data(c::AbstractCircuit, tuple_set::Vector{Vector{Int}}; error_target::Real = 0.1, add_circuit::Bool = false)

Returns the tuple set data corresponding to the circuit c, with the non-repeated tuples either being the supplied tuple_set or the basic tuple set for c. The repeat numbers are initialised to be inversely proportional to the average noise on the gates in the layers, which heuristically roughly target an error rate error_target, and the original circuit is added to the repeat tuples if add_circuit is true.

Note that it appears best to use repeat tuples of order 2 (up to Paulis), with odd repeat numbers where this is efficient for measurement (such as repeating the same circuit layer many times), and even repeat numbers otherwise (such as syndrome extraction circuits).

source

Private functions

QuantumACES.check_tuple!Method
check_tuple!(c::AbstractCircuit, circuit_tuple::Vector{Int})
check_tuple!(c::AbstractCircuit, tuple_set::Vector{Vector{Int}})

Checks that the tuple circuit_tuple, or each tuple in the tuple set tuple_set, is valid for the circuit c.

source
QuantumACES.get_basic_experiment_numbersMethod
get_basic_experiment_numbers(c::AbstractCircuit)

Returns the experiment numbers corresponding to the basic tuple set for the circuit c.

BEWARE: This currently assumes that circuit eigenvalues for Paulis supported on $n$ qubits require preparing exactly and only $2^n$ sign configurations. Errors will occur if this is not the case, and they are not guaranteed to be noisy. If creating a circuit where this is not the case, you will need to provide new methods for this function.

source
QuantumACES.get_tuple_set_paramsMethod
get_tuple_set_params(c::AbstractCircuit, tuple_set::Vector{Vector{Int}}, experiment_numbers::Vector{Int}; weight_experiments::Bool = true)

Returns the time taken to implement each tuple and the default shot weights for each tuple orresponding to the circuit c with the tuple set tuple_set and the experiment numbers experiment_numbers. If weight_experiments is true, allocate the same sampling time to each experiment for each tuple; otherwise, allocate the same sampling time to each tuple overall. The default times allocate the same sampling time to each experiment for each tuple; this seems to be more performant than allocating the same sampling time to each tuple overall, as it allocates more samples to tuples that require more experiments.

source