noise.jl
Public functions
QuantumACES.GateData
— TypeGateData
An object that stores all of the gate indices and data.
Fields
gate_indices::Vector{GateIndex}
: Indices for all gates.G::Int32
: Number of gates.N::Int32
: Number of indices.N_pad::Int32
: Number of padded indices.N_marginal::Int32
: Number of marginal indices.N_pad_marginal::Int32
: Number of padded marginal indices.N_relative::Int32
: Number of relative indices.N_pad_relative::Int32
: Number of padded relative indices.combined::Bool
: Whether to treat Pauli X, Y, and Z basis SPAM noise as the same.strict::Bool
: Whether to be strict about whether gates are deemed to be estimable to additive or relative precision.
QuantumACES.GateIndex
— TypeGateIndex
An object that stores all of the different indices of a gate.
Fields
gate::Gate
: The gate.indices::Vector{Int32}
: Gate eigenvalue or probability indices.pad_indices::Vector{Int32}
: Padded gate eigenvalue or probability indices.marg_indices::Vector{Int32}
: Marginal gate eigenvalue or probability indices.pad_marg_indices::Vector{Int32}
: Padded marginal gate eigenvalue or probability indices.rel_indices::Vector{Int32}
: Relative gate eigenvalue or probability indices.pad_rel_indices::Vector{Int32}
: Padded relative gate eigenvalue or probability indices.
QuantumACES.get_average_gate_probabilities
— Methodget_average_gate_probabilities(gate_probabilities::Dict{Gate, Vector{Float64}})
get_average_gate_probabilities(gate_probabilities::Dict{Gate, Vector{Float64}}, gate_data::GateData)
Returns the averaged gate probabilities obtained from the gate probabilities gate_probabilities
by averaging error probabilities within the orbits of each of the gates.
QuantumACES.get_combined_gate_probabilities
— Methodget_combined_gate_probabilities(gate_probabilities::Dict{Gate, Vector{Float64}}, gate_data::GateData)
Returns the combined gate probabilities obtained from the gate probabilities gate_probabilities
by averaging SPAM noise parameters on each qubit, calculated using combined gate data gate_data
.
QuantumACES.get_full_average_gate_probabilities
— Methodget_full_average_gate_probabilities(gate_probabilities::Dict{Gate, Vector{Float64}})
get_full_average_gate_probabilities(gate_probabilities::Dict{Gate, Vector{Float64}}, gate_data::GateData)
Returns the fully averaged gate probabilities obtained from the gate probabilities gate_probabilities
by averaging all error probabilities within each of the gates.
QuantumACES.get_gate_data
— Methodget_gate_data(total_gates::Vector{Gate}; combined::Bool = false, strict::Bool = false)
Returns the gate data for the gates total_gates
in the form of a GateData
object, combining Pauli X, Y, and Z basis SPAM noise if combined
is true
, and being strict about which gates count as estimable to additive or relative precision if strict
is true
.
QuantumACES.get_gate_eigenvalues
— Methodget_gate_eigenvalues(gate_probabilities::Dict{Gate, Vector{Float64}}, gate_data::GateData)
Returns the gate eigenvalues for the gate probabilities gate_probabilities
calculated using the gate data gate_data
.
QuantumACES.get_gate_probabilities
— Methodget_gate_probabilities(gate_eigenvalues::Vector{Float64}, gate_data::GateData)
Returns the gate probabilities for the gate eigenvalues gate_eigenvalues
calculated using the gate data gate_data
.
QuantumACES.get_marginal_gate_eigenvalues
— Methodget_marginal_gate_eigenvalues(gate_eigenvalues::Vector{Float64}, gate_data::GateData)
Returns the marginal gate eigenvalues corresponding to the gate eigenvalues gate_eigenvalues
calculated using the gate data gate_data
.
QuantumACES.get_marginal_gate_probabilities
— Methodget_marginal_gate_probabilities(gate_probabilities::Dict{Gate, Vector{Float64}})
get_marginal_gate_probabilities(gate_probabilities::Dict{Gate, Vector{Float64}}, gate_data::GateData)
Returns the marginal gate probabilities obtained from the gate probabilities gate_probabilities
by marginalising error probabilities across the orbits of each of the gates.
QuantumACES.get_marginal_wht_matrix
— Methodget_marginal_wht_matrix(gate::Gate; inverse::Bool = false)
Returns the symplectically ordered Walsh-Hadamard transform matrix for the gate gate
, marginalised over gate orbits, which maps the marginal Pauli error probability distribution to its marginal eigenvalues, or the inverse transform if inverse
is true
.
QuantumACES.get_orbit_indices_dict
— Methodget_orbit_indices_dict()
Returns a hard-coded dictionary of the Pauli orbit indices for each gate type, tested by comparing the results to get_orbit_indices
.
QuantumACES.get_pad_transform
— Methodget_pad_transform(gate_data::GateData; probabilities::Bool = false)
Returns a transform matrix that pads gate eigenvalues, or gate error probabilities if probabilities
is true
, with identity eigenvaleus or error probabilities respectively, up to a constant given by get_pad_mask
, calculated using the gate data gate_data
.
QuantumACES.get_relative_gate_eigenvalues
— Methodget_relative_gate_eigenvalues(gate_eigenvalues::Vector{Float64}, gate_data::GateData)
Returns the marginal gate eigenvalues for gates estimable to relative precision corresponding to the gate eigenvalues gate_eigenvalues
calculated using the gate data gate_data
.
QuantumACES.get_relative_gate_probabilities
— Methodget_relative_gate_probabilities(gate_probabilities::Dict{Gate, Vector{Float64}}, gate_data::GateData)
Returns the marginal gate probabilities obtained from the gate probabilities gate_probabilities
by marginalising error probabilities across the orbits of each of the gates which are estimable to relative precision.
QuantumACES.get_wht_matrix
— Methodget_wht_matrix(n::Integer; inverse::Bool = false)
get_wht_matrix(gate::Gate; inverse::Bool = false)
Returns the symplectically ordered Walsh-Hadamard transform matrix of order n
, the number of qubits on which the gate gate
acts, which maps an n-qubit Pauli error probability distribution to its eigenvalues, or the inverse transform if inverse
is true
.
QuantumACES.get_wht_transform
— Methodget_wht_transform(gate_data::GateData; inverse::Bool = false)
Returns a transform matrix that maps padded gate error probabilities to padded gate eigenvalues, or the inverse transform if inverse
is true
, calculated using the gate data gate_data
.
Private functions
QuantumACES.get_gate_index_dict
— Methodget_gate_index_dict(gate_data::GateData)
Returns a dictionary that maps each gate to its index.
QuantumACES.get_gate_probabilities_dict
— Methodget_gate_probabilities_dict(gate_probabilities_vec::Vector{Float64}, gate_data::GateData)
Returns the gate probabilities dictionary obtained from the corresponding vector gate_probabilities_vec
calculated using the gate data gate_data
.
QuantumACES.get_gate_probabilities_vec
— Methodget_gate_probabilities_vec(gate_probabilities::Dict{Gate, Vector{Float64}}, gate_data::GateData)
Returns the gate probabilities vector obtained from the corresponding dictionary gate_probabilities
calculated using the gate data gate_data
.
QuantumACES.get_marginal_gate_probabilities_dict
— Methodget_marginal_gate_probabilities_dict(marginal_gate_probabilities_vec::Vector{Float64}, gate_data::GateData)
Returns the marginal gate probabilities dictionary obtained from the corresponding vector marginal_gate_probabilities_vec
calculated using the gate data gate_data
.
QuantumACES.get_marginal_gate_probabilities_vec
— Methodget_marginal_gate_probabilities_vec(marginal_gate_probabilities::Dict{Gate, Vector{Float64}}, gate_data::GateData)
Returns the marginal gate probabilities vector obtained from the corresponding dictionary marginal_gate_probabilities
calculated using the gate data gate_data
.
QuantumACES.get_marginal_pad_mask
— Methodget_marginal_pad_mask(gate_data::GateData)
Returns a mask vector that sets the values of the identity marginal gate eigenvalues or marginal gate error probabilites, calculated using the gate data gate_data
.
QuantumACES.get_marginal_pad_transform
— Methodget_marginal_pad_transform(gate_data::GateData; probabilities::Bool = false)
Returns a transform matrix that pads marginal gate eigenvalues, or marginal gate error probabilities if probabilities
is true
, with identity eigenvaleus or error probabilities respectively, up to a constant given by get_marginal_pad_mask
, calculated using the gate data gate_data
.
QuantumACES.get_marginal_transform
— Methodget_marginal_transform(gate_data::GateData)
Returns a transform matrix that maps gate eigenvalues to marginal gate eigenvalues, calculated using the gate data gate_data
.
QuantumACES.get_marginal_wht_transform
— Methodget_marginal_wht_transform(gate_data::GateData; inverse::Bool = false)
Returns a transform matrix that maps padded marginal gate error probabilities to padded marginal gate eigenvalues, or the inverse transform if inverse
is true
, calculated using the gate data gate_data
.
QuantumACES.get_ordinary_transform
— Methodget_ordinary_transform(gate_data::GateData)
Returns an identity transform matrix that maps gate eigenvalues to themselves, calculated using the gate data gate_data
.
QuantumACES.get_pad_mask
— Methodget_pad_mask(gate_data::GateData)
Returns a mask vector that sets the values of the identity gate eigenvalues or gate error probabilites, calculated using the gate data gate_data
.
QuantumACES.get_relative_gate_probabilities_dict
— Methodget_relative_gate_probabilities_dict(relative_gate_probabilities_vec::Vector{Float64}, gate_data::GateData)
Returns the marginal gate probabilities dictionary for those gates estimable to relative precision obtained from the corresponding vector relative_gate_probabilities_vec
calculated using the gate data gate_data
.
QuantumACES.get_relative_gate_probabilities_vec
— Methodget_relative_gate_probabilities_vec(relative_gate_probabilities::Dict{Gate, Vector{Float64}}, gate_data::GateData)
Returns the marginal gate probabilities vector for those gates estimable to relative precision obtained from the corresponding dictionary relative_gate_probabilities
calculated using the gate data gate_data
.
QuantumACES.get_relative_pad_mask
— Methodget_relative_pad_mask(gate_data::GateData)
Returns a mask vector that sets the values of the identity marginal gate eigenvalues for gates estimable to relative precision, calculated using the gate data gate_data
.
QuantumACES.get_relative_pad_transform
— Methodget_relative_pad_transform(gate_data::GateData; probabilities::Bool = false)
Returns a transform matrix that pads marginal gate eigenvalues, or marginal gate error probabilities if probabilities
is true
, for gates estimable to relative precision, with identity eigenvaleus or error probabilities respectively, up to a constant given by get_relative_pad_mask
, calculated using the gate data gate_data
.
QuantumACES.get_relative_transform
— Methodget_relative_transform(gate_data::GateData)
Returns a transform matrix that maps gate eigenvalues to the marginal gate eigenvalues for gates estimable to relative precision, calculated using the gate data gate_data
.
QuantumACES.get_relative_wht_transform
— Methodget_relative_wht_transform(gate_data::GateData; inverse::Bool = false)
Returns a transform matrix that maps padded marginal gate error probabilities to padded marginal gate eigenvalues for gates estimable to relative precision, or the inverse transform if inverse
is true
, calculated using the gate data gate_data
.