heavy_hex.jl
Public functions
QuantumACES.HeavyHexParameters
— TypeHeavyHexParameters
Parameters for the syndrome extraction circuit of a heavy hex code.
Fields
params::Dict{Symbol, Any}
: Dictionary of the circuit parameters described below.circuit_name::String
: Name of the circuit used for saving data.
Parameters
vertical_dist::Int
: Vertical (Z) distance of the code.horizontal_dist::Int
: Horizontal (X) distance of the code.flipped::Bool
: Whether ancilla qubit layout is flipped left to right.gate_type::Symbol
: Type of two-qubit gate used in the circuit, which must be:cx
.ancilla_measurement::Bool
: Whether to include mid-circuit ancilla measurements.pad_identity::Bool
: Whether to pad layers with single-qubit identity gates.layer_time_dict::Dict{Symbol, Float64}
: Dictionary of layer times.
QuantumACES.get_circuit
— Methodget_circuit(hex_param::HeavyHexParameters, noise_param::AbstractNoiseParameters; kwargs...)
Returns a heavy hex code syndrome extraction circuit in the form of a Circuit
object parameterised by the supplied circuit and noise parameters.
Arguments
hex_param::HeavyHexParameters
: Parameters for a heavy hex code.noise_param::AbstractNoiseParameters
: Noise parameters for the circuit.
Keyword arguments
noisy_prep::Bool = false
: Whether to treat preparations as noisy and characterise the associated noise, defaulting tofalse
; a full-rank design cannot be produced if bothnoisy_prep
andnoisy_meas
aretrue
.noisy_meas::Bool = true
: Whether to treat measurements as noisy and characterise the associated noise, defaulting totrue
; a full-rank design cannot be produced if bothnoisy_prep
andnoisy_meas
aretrue
.combined::Bool = haskey(noise_param.params, :combined) ? noise_param.params[:combined] : false,
: Whether to treat Pauli X, Y, and Z basis SPAM noise as the same.strict::Bool = false
: Whether to be strict about which gates count as estimable to relative precision.
QuantumACES.get_hex_param
— Methodget_hex_param(vertical_dist::Integer, horizontal_dist::Integer; kwargs...)
get_hex_param(dist::Integer; kwargs...)
Returns a HeavyHexParameters
object that parameterises the syndrome extraction circuit of a heavy hex code.
Default gate layer times are estimated from IBM Torino in 2024.
Arguments
vertical_dist::Int
: Vertical distance of the code.horizontal_dist::Int
: Horizontal distance of the code.dist::Int
: Distance of the code; this is equivalent to settingvertical_dist = dist
andhorizontal_dist = dist
.
Keyword arguments
flipped::Bool = false
: Whether to flip the ancilla qubit layout left to right.gate_type::Symbol = :cx
: Type of two-qubit gate used in the circuit.ancilla_measurement::Bool = true
: Whether to include mid-circuit reset.pad_identity::Bool = true
: Whether to pad layers with single-qubit identity gates.single_qubit_time::Real = 32
: Time taken to implement a single-qubit gate in nanoseconds.two_qubit_time::Real = 200
: Time taken to implement a two-qubit gate in nanoseconds.meas_reset_time::Real = 2500
: Time taken to perform measurement and reset at the end of the circuit in nanoseconds.meas_reset_time::Real = 2500
: Time taken to perform mid-circuit reset in nanoseconds.
Private functions
QuantumACES.heavy_hex_circuit
— Methodheavy_hex_circuit(hex_param::HeavyHexParameters)
Returns fields used to construct the syndrome extraction circuit of a heavy hex code based on the supplied parameters hex_param
.