Reference API#

deltakit.circuit#

Top Level#

deltakit.circuit provides classes to represent Stim circuit elements and functions/methods for interacting with them. The following features are imported directly from the top-level module.

Circuit Building Blocks#

Circuit([layers, iterations])

The deltakit_circuit circuit class.

GateLayer([gates])

Class which represents a single time step in a circuit for gates.

NoiseLayer([noise_channels])

Class which represents noise in a circuit.

Qubit(unique_identifier[, stim_identifier])

Abstraction of an immutable qubit type.

Detector(measurements[, coordinate, tag])

Annotates that a set of measurements can be used to detect errors, because the set's parity should be deterministic.

Observable(observable_index, measurements, *)

A logical observable as defined by stim.

ShiftCoordinates(coordinate_shift, *[, tag])

Annotates a shift in the coordinates within a stim circuit.

SweepBit(bit_index)

Abstraction of a sweep bit as used by stim.

MeasurementRecord(lookback_index)

Reference to a measurement that has been made

Paulis#

PauliX(qubit)

Representation of an X gate on a single qubit which is used in Pauli products.

PauliY(qubit)

Representation of a Y gate on a single qubit which is used in Pauli products.

PauliZ(qubit)

Representation of a Z gate on a single qubit which is used in Pauli products.

PauliProduct(pauli_gates)

A collection of Pauli gates which together make up a Pauli product.

InvertiblePauliX(qubit[, invert])

Representation of an X gate measurement on a single qubit the result of which can be inverted.

InvertiblePauliY(qubit[, invert])

Representation of a Y gate measurement on a single qubit the result of which can be inverted.

InvertiblePauliZ(qubit[, invert])

Representation of a Z gate measurement on a single qubit the result of which can be inverted.

MeasurementPauliProduct(pauli_gates)

A representation of a Pauli product which can include invertible Pauli gates.

Typing#

Layer

Represent a PEP 604 union type

GateReplacementPolicy

A Mapping is a generic container for associating key/value pairs.

NoiseChannelGen

NoiseProfile

Circuit Manipulation and Noise Generation#

trim_detectors(stim_circuit, ...)

Uses deltakit_circuit to remove a given set of detectors from a stim circuit and returns the new stim circuit

after_clifford_depolarisation(probability)

Returns a set of callables that can be passed to deltakit_circuit.Circuit.apply_gate_noise to apply DEPOLARIZE1(probability) operations after every single-qubit Clifford gate and DEPOLARIZE2(probability) operations after every two-qubit Clifford operation

after_reset_flip_probability(probability)

Returns a set of callables that can be passed to deltakit_circuit.Circuit.apply_gate_noise to apply X_ERROR(probability) operations before every reset gate that is not in the X basis and Z_ERROR(probability) operations on every reset gate that is in the X basis

before_measure_flip_probability(probability)

Returns a set of callables that can be passed to deltakit_circuit.Circuit.apply_gate_noise to apply X_ERROR(probability) operations before every measurement gate that is not in the X basis and Z_ERROR(probability) operations on every measurement gate that is in the X basis

measurement_noise_profile(error_probability)

Return a mapping from deltakit_circuit measurement types to the callables that can construct a gate of that type with a error probability as specified

noise_profile_with_inverted_noise([...])

Generate a noise profile for a given gate, with additional noise across all other qubits in the circuit that are not operated on by the given gate in a given gate layer

Other#

Coordinate(coordinate, *coordinates)

Class which represents general coordinates.

NoiseContext(circuit, gate_layer)

Circuit data passed by deltakit_circuit.Circuit.apply_gate_noise to the noise generation functions.

deltakit.circuit.gates#

deltakit.circuit.gates contains class-based representations of Stim gates.

One-Qubit Gates#

I(qubit, *[, tag])

Identity gate.

H(qubit, *[, tag])

The Hadamard gate.

H_XY(qubit, *[, tag])

A variant of the Hadamard gate that swaps the X and Y axes (instead of X and Z).

H_YZ(qubit, *[, tag])

A variant of the Hadamard gate that swaps the Y and Z axes (instead of X and Z).

X(qubit, *[, tag])

Pauli X gate.

SQRT_X(qubit, *[, tag])

Principal square root of X gate.

SQRT_X_DAG(qubit, *[, tag])

Adjoint of the principal square root of X gate.

Y(qubit, *[, tag])

Pauli Y gate.

SQRT_Y(qubit, *[, tag])

Principal square root of Y gate.

SQRT_Y_DAG(qubit, *[, tag])

Adjoint of the principal square root of Y gate.

Z(qubit, *[, tag])

Pauli Z gate.

S(qubit, *[, tag])

Principal square root of Z gate.

S_DAG(qubit, *[, tag])

Adjoint of the principal square root of Z gate.

C_XYZ(qubit, *[, tag])

Right handed period 3 axis cycling gate, sending X -> Y -> Z -> X.

C_ZYX(qubit, *[, tag])

Left handed period 3 axis cycling gate, sending Z -> Y -> X -> Z.

Two-Qubit Gates#

CX(control, target, *[, tag])

The Z-controlled X gate.

CY(control, target, *[, tag])

The Z-controlled Y gate.

CZ(control, target, *[, tag])

The Z-controlled Z gate.

XCX(control, target, *[, tag])

The X-controlled X gate.

XCY(control, target, *[, tag])

The X-controlled Y gate.

XCZ(control, target, *[, tag])

The X-controlled Z gate.

YCX(control, target, *[, tag])

The Y-controlled X gate.

YCY(control, target, *[, tag])

The Y-controlled Y gate.

YCZ(control, target, *[, tag])

The Y-controlled Z gate.

SWAP(operand1, operand2, *[, tag])

Swaps two qubits.

CXSWAP(control, target, *[, tag])

A combination CX-and-SWAP gate.

CZSWAP(control, target, *[, tag])

A combination CZ-and-SWAP gate.

ISWAP(operand1, operand2, *[, tag])

Swaps two qubits and phases the -1 eigenspace of the ZZ observable by i.

ISWAP_DAG(operand1, operand2, *[, tag])

Swaps two qubits and phases the -1 eigenspace of the ZZ observable by -i.

SQRT_XX(operand1, operand2, *[, tag])

Phases the -1 eigenspace of the XX observable by i.

SQRT_XX_DAG(operand1, operand2, *[, tag])

Phases the -1 eigenspace of the XX observable by -i.

SQRT_YY(operand1, operand2, *[, tag])

Phases the -1 eigenspace of the YY observable by i.

SQRT_YY_DAG(operand1, operand2, *[, tag])

Phases the -1 eigenspace of the YY observable by -i.

SQRT_ZZ(operand1, operand2, *[, tag])

Phases the -1 eigenspace of the ZZ observable by i.

SQRT_ZZ_DAG(operand1, operand2, *[, tag])

Phases the -1 eigenspace of the ZZ observable by -i.

Measurement Gates#

MX(qubit[, probability, invert, tag])

X-basis measurement (optionally noisy). Projects each target qubit into

MY(qubit[, probability, invert, tag])

Y-basis measurement (optionally noisy).

MZ(qubit[, probability, invert, tag])

Z-basis measurement (optionally noisy).

MRX(qubit[, probability, invert, tag])

X-basis demolition measurement (optionally noisy).

MRY(qubit[, probability, invert, tag])

Y-basis demolition measurement (optionally noisy).

MRZ(qubit[, probability, invert, tag])

Z-basis demolition measurement (optionally noisy).

MPP(pauli_product[, probability, tag])

Measure Pauli products.

Reset Gates#

RX(qubit, *[, tag])

X - basis reset.

RY(qubit, *[, tag])

Y - basis reset.

RZ(qubit, *[, tag])

Z - basis reset.

Leakage Gates#

HERALD_LEAKAGE_EVENT(qubit[, probability, ...])

The single qubit leakage heralding gate (optionally noisy).

Abstract Gates#

Gate(*[, tag])

Abstract gate class from which all other gate classes must inherit.

OneQubitCliffordGate(qubit, *[, tag])

Gate for the abstract single qubit Clifford gate.

OneQubitGate(qubit, *[, tag])

Abstraction of a single qubit gate.

TwoOperandGate(operand1, operand2, *[, tag])

Abstraction of a Clifford gate which take two generic operands.

OneQubitMeasurementGate(qubit[, ...])

Gate for the abstract single qubit measurement gate.

OneQubitResetGate(qubit, *[, tag])

Gate for the abstract single qubit reset gate.

SymmetricTwoQubitGate(operand1, operand2, *)

Abstraction of a two-qubit gate which is symmetric in the control and target qubits.

PauliBasis(*values)

The different Pauli bases for measurement and reset gates.

Gates Sets#

ONE_QUBIT_GATES

Build an immutable unordered collection of unique elements.

TWO_QUBIT_GATES

Build an immutable unordered collection of unique elements.

ONE_QUBIT_MEASUREMENT_GATES

Build an unordered collection of unique elements.

MEASUREMENT_GATES

Build an immutable unordered collection of unique elements.

RESET_GATES

Build an immutable unordered collection of unique elements.

deltakit.circuit.noise_channels#

Description of deltakit.circuit.noise_channels namespace here.

MultiProbabilityNoiseChannel(probabilities, ...)

Abstract noise channel which contains multiple probabilities.

NoiseChannel(*_args[, tag])

Abstract base noise channel which all other noise channel classes must implement.

OneProbabilityNoiseChannel(probability, *args)

Abstract noise channel which contains only one probability.

OneQubitNoiseChannel(qubit, *args[, tag])

Abstract noise channel which only acts on a single qubit.

TwoQubitNoiseChannel(qubit1, qubit2, *args)

Abstract noise channel which acts on pairs of qubits.

CorrelatedError(pauli_product, probability)

Probabilistically applies a Pauli product error with a given probability.

ElseCorrelatedError(pauli_product, probability)

Probabilistically applies a Pauli product error with a given probability, unless the "correlated error occurred flag" is set.

Depolarise1(qubit, probability, *[, tag])

The one-qubit depolarising channel.

Depolarise2(qubit1, qubit2, probability[, tag])

The two-qubit depolarising channel.

Leakage(qubit, probability, *[, tag])

The single qubit leakage channel.

Relax(qubit, probability, *[, tag])

The single qubit relaxation channel.

PauliChannel1(qubit[, p_x, p_y, p_z, tag])

A single qubit Pauli error channel with explicitly specified probabilities for each case.

PauliChannel2(qubit1, qubit2[, p_ix, p_iy, ...])

A two-qubit Pauli error channel with explicitly specified probabilities for each case.

PauliXError(qubit, probability, *[, tag])

Applies a Pauli X with a given probability.

PauliYError(qubit, probability, *[, tag])

Applies a Pauli Y with a given probability.

PauliZError(qubit, probability, *[, tag])

Applies a Pauli Z with a given probability.

deltakit.core#

Description of deltakit.core namespace here.

deltakit.core.data_formats#

Description of deltakit.core.data_formats namespace here.

b8_to_logical_flip(b8_input[, num_logicals])

Given a b8 input (either a file path containing b8 data or bytes), and the number of detectors that should be in each syndrome, return a generator of logical flips.

b8_to_measurements(b8_input, measurement_num)

Given a b8 input (a file path containing b8 data), and the number of measurements in each shot, return a generator of measurement bitstrings.

b8_to_syndromes(b8_input, detector_num)

Given a b8 input (either a file path containing b8 data or bytes), and the number of detectors that should be in each syndrome, return a generator of syndromes.

c64_to_addressed_input_words(input_path, ...)

Given a path to a c64 file, return, for each line, the words within the line and the index of each word in each round.

logical_flips_to_b8_file(...)

Given a logical flip generator, this will output them to file in the b8 format.

parse_01_to_logical_flips(logical_flips_01_file)

Given a filepath for a 01 file containing target logical flips, return a generator of logical flips as booleans.

parse_01_to_syndromes(logical_flips_01_file)

Given a filepath for a 01 file containing syndromes, return a generator of OrderedSyndromes.

split_input_data_to_c64(input_data, output_path)

Given a list of round-split decoder input data, this will output them to a file as comma separated 64-bit integers.

syndromes_to_b8_file(syndrome_b8_out, ...)

Given a syndrome generator, this will output them to file in the b8 format.

to_bytearray(data)

Converts either the content of a file or a bytes object to a bytearray object.

deltakit.core.decoding_graphs#

Description of deltakit.core.decoding_graphs namespace here.

AnyEdgeT

Type variable.

Bitstring([value])

Class which efficiently represents a bitstring.

change_graph_error_probabilities(graph, ...)

Make a new graph from the given graph where the error probabilities on the edges are changed to the new error probabilities.

compute_graph_distance(decoding_graph, logicals)

Calculates the minimum distance for all logicals.

compute_graph_distance_for_logical(...[, ...])

Computes the distance of the decoding graph given a logical.

DecodingCode(hypergraph, logicals)

Convenience class encapsulating the annotated hypergraph and logicals.

DecodingEdge(first_detector, second_detector)

Representation of an immutable decoding edge on a decoding graph, limited to standard graphs where edges connect two distinct detectors.

DecodingHyperEdge(vertices)

Representation of an immutable decoding edge on a hyper-graph.

DecodingHyperGraph(edge_data[, detector_records])

Representation of a decoding hypergraph, built to handle Stim-based noise sources.

DecodingHyperMultiGraph(edge_data[, ...])

Representation of a decoding multigraph with hyper-edges.

decompositions(target_edge, edges)

Generate decompositions of the given edge into the parts from edges.

dem_to_decoding_graph_and_logicals(dem)

Convert a detector error model into a NXDecodingGraph object and a list of edges which effect particular logicals.

dem_to_hypergraph_and_logicals(dem)

Convert a Stim detector error model into a DecodingHyperGraph and a list of edges which affect the logical observable at the index in the list.

DemParser(error_handler, detector_handler, ...)

Class which handles parsing a detector error model.

DetectorCounter()

Error handler that counts the number of detectors that each error flips.

DetectorRecord([spatial_coord, time])

Dictionary for recording information about a detector.

DetectorRecorder()

A type of detector handler which populates a dictionary of DetectorRecords.

EdgeRecord([p_err])

Dictionary for recording information about an edge.

EdgeT

Type variable.

errors_to_syndrome(decoding_edges[, boundaries])

Take decoding edges and convert to an ordered syndrome that would be observed if all decoding edges were to be active.

extract_logicals(graph)

Extract which edges affect which logical observables from a graph by looking through the edge records.

filter_to_data_edges(graph)

Given some decoding edges, filter to those that directly correspond to a data qubit.

filter_to_measure_edges(graph)

Given some decoding edges, filter to those that directly correspond to a measurement event, i.e. they only move in the time axis.

FixedWidthBitstring(width[, value])

Class which represents a fixed precision bitstring.

get_round_words(detector_indices, ...)

For given sparse-form sequence, return the corresponding bit-strings that correspond to individual decoding rounds.

graph_to_json(decoding_graph, logicals[, full])

Represent some graph as an edge list in JSON.

has_contiguous_nodes(graph[, start])

Returns whether the nodes of the graph have contiguous indices with respect to the start index.

hypergraph_to_weighted_edge_list(hypergraph)

Return a weighted edge list representation of a decoding hypergraph.

HyperLogicals

All the operations on a read-only sequence.

HyperMultiGraph()

Class for abstract immutable multigraph with hyperedges.

inverse_logical_at_boundary(decoding_graph, ...)

Given a decoding graph and a logical, that is assumed to be along the boundary, return another logical constructed of all the edges incident to the boundary that are not in the given logical.

is_single_connected_component(graph)

Determines whether a graph consists of a single connected component excluding the boundary nodes of the graph.

LogicalsInEdges(num_logicals)

A type of edge handler which collects the errors into a set of edges and edges which affect the logicals.

NXCode(graph, logicals)

Convenience class encapsulating the graph and logicals.

NXDecodingGraph(graph[, boundaries])

Implementation of a decoding graph using NetworkX and the QEC syndrome and edge objects.

NXDecodingMultiGraph(graph[, boundaries])

Implementation of a decoding multigraph using NetworkX and QEC syndrome and edge objects.

NXLogicals

All the operations on a read-only sequence.

observable_warning(logical_observable)

Type of logical observable handler which raises a warning when this instruction is encountered.

OrderedDecodingEdges([decoding_edges, ...])

Immutable ordered mod 2 set of decoding edges.

OrderedSyndrome([detectors, enforce_mod_2])

Immutable ordered mod 2 set of detectors.

parse_explained_dem(explained_dem)

Parse an explained DEM into a hyper-multi-graph.

single_boundary_is_last_node(graph)

unweight_graph(decoding_graph)

Sets all weights in the given graph to 1 and error probabilities to 1/(1+e) so that they correspond to the weights.

vector_weights(graph)

Treat the edges of a graph as vectors and return a mapping of normalised vectors to a list of weights on those vectors.

worst_case_num_detectors(decoding_graph, ...)

For a given decoding_graph representing error mechanisms, and a target_logical_error, return the largest number of detection events we would expect to observe on the decoding_graph.

deltakit.decode#

Description of deltakit.decode namespace here.

PyMatchingDecoder(decoding_graph, logicals)

PyMatching decoder for minimum weight perfect matching (MWPM), configured to use our decoding graph representation.

MWPMDecoder(circuit[, parameters, ...])

Minimum Weight Perfect Matching Decoder (Cloud-based).

CCDecoder(circuit[, parameters, ...])

Collision Clustering Decoder (Cloud-based).

BeliefMatchingDecoder(circuit[, parameters, ...])

Belief Matching Decoder (Cloud-based).

BPOSDecoder(circuit[, parameters, ...])

Belief Propagation - Ordered Statistics Decoder (Cloud-based).

ACDecoder(circuit[, parameters, ...])

Ambiguity Clustering Decoder (Cloud-based).

LCDecoder(circuit[, parameters, ...])

Local Clustering Decoder (Cloud-based).

deltakit.decode.analysis#

Description of deltakit.decode.analysis namespace here.

DecoderManager(number_of_observables[, ...])

Class for the abstract DecoderManger, objects that manage the running of a decoder for multiple shots, whilst reporting on the failure rate and running other reporters.

InvalidGlobalManagerStateError

Raise when decoder manager is not set in global memory or has invalid state token.

run_decoding_on_circuit(circuit, max_shots, ...)

Compute LEP of the decoder with given circuit.

EmpiricalDecodingErrorDistribution(...)

Data structure for storing data related to decoding events.

B8DecoderManager(syndrome_b8_input, ...[, ...])

Decoder manager to run experiments defined by a b8 input for syndromes and target logical flips.

GraphDecoderManager(noise_model, decoder[, ...])

Decoder manager for a graph decoder with an edge-based noise model.

StimDecoderManager(stim_noise_circuit, decoder)

Decoder manager to support Stim circuits being used for noise generation, and Stim observables to define decoder success.

RunAllAnalysisEngine(experiment_name, ...[, ...])

Class to run experiments on different codes and decoders, it will run all of the given sequence of decoder managers.

deltakit.decode.noise_sources#

Description of deltakit.decode.noise_sources namespace here.

CombinedIndependent(internal_sources)

Class to combine several independent noise sources into one combined model, where each error returned from one of the internal sources becomes an element in a tuple.

CombinedSequences(internal_sources)

Class to combine several sequential noise sources into one combined model, where each error returned from one of the internal sources becomes an element in a tuple.

MonteCarloNoise()

Abstract class to manage the production of non-terminating independent noise generators.

NoiseModel

SequentialNoise()

Abstract class to manage the production of deterministically sized terminating noise generators.

EdgeProbabilityMatchingNoise([edge_filter])

A noise model that defines noise over a decoding graph based on the edge probabilities.

ExhaustiveMatchingNoise(weight[, edge_filter])

A noise model that outputs all errors with a given weight.

ExhaustiveWeightedMatchingNoise(...[, ...])

A noise model that outputs all errors where their weighted error locations sum up to less than a given exhaustion ceiling

FixedWeightMatchingNoise(weight[, edge_filter])

A noise model that outputs errors over basic events with fixed weight of activated events.

NoMatchingNoise()

A noise model that outputs an infinite stream of empty decoding edge lists.

UniformErasureNoise(erasure_probability[, ...])

Noise model that simulates a simple erasure channel.

UniformMatchingNoise(basic_error_prob[, ...])

A noise model that defines noise over a single decoding graph, where all decoding edges are assigned a uniform weight and sampled randomly with given probability.

OptionedStim([...])

A class with the ability to manipulate lestim circuits with after clifford gate depolarisation, before measure flip probability and after reset flip probability.

SampleStimNoise([batch_size])

A noise model that uses a stim file, without modification, to generate noise.

StimNoise([before_gate_noise_profile, ...])

A noise model that takes a set of noise profiles that can be applied to a lestim circuit.

ToyNoise(p_physical)

A noise model which adds:

deltakit.decode.utils#

calculate_pij_values(exp_values[, graph, ...])

Calculates the Pij values given the <Xi> <Xj> etc values.

create_correlation_matrix(pij_data, graph[, ...])

Generate a correlation matrix for a given Pij matrix.

create_dem_from_pij(pij_data, graph, logicals)

Create a detector error model from a Pij probabilities data set and accompanying stim Circuit.

dem_and_pij_edges_max_diff(dem, pij[, ...])

Given a stim.DetectorErrorModel and Pij matrix, compare the two to find the maximum difference in probability between similar edges.

generate_expectation_data(samples[, ...])

Generates the <Xi>, <Xj>, <Xij> etc expectation values for deriving Pij probabilities.

make_logger(lvl, name)

Produce a logger with sensible properties.

parse_stim_circuit(stim_circuit[, ...])

Parse a Stim file into a decoding graph and the relevant logicals.

pij_and_dem_edge_diff(dem, pij[, is_hypergraph])

Given a stim.DetectorErrorModel and Pij dict, compare the two to see if they contain the same edges w.r.t nodes in the edges.

pij_edges_max_diff(pij1, pij2)

Compare two Pij matrices containing identical edges w.r.t nodes and return the maximum difference between similar edges' probabilities.

pijs_edge_diff(pij1, pij2)

Compare two Pij dicts to see if they contain the same edges.

plot_correlation_matrix(matrix, ...[, labels])

Plot a given correlation matrix as a heatmap.

split_measurement_bitstring(bitstring, circuit)

Split a measurement bitstring according to the number of measurements in each layer of the circuit.

VisDecodingGraph3D(decoding_graph)

Class to render 2+1D DecodingGraphs using plotly.

deltakit.explorer#

Description of deltakit.explorer namespace here.

Client(base_url[, timeout, api_version])

The Client class provides convenient methods to access circuit generation, noise addition, decoding, simulation, and analysis calls. To create a connection to a particular server, use the following syntax::.

Logging()

This class enables client-side logging, generates unique request identifiers and proxies events from the calling environment (e.g. JupyterHub or gql library).

deltakit.explorer.analysis#

Description of deltakit.explorer.analysis namespace here.

analysis.calculate_lambda_and_lambda_stddev(...)

Calculate the error suppression factor (Λ) and its standard deviation.

analysis.calculate_lep_and_lep_stddev(fails, ...)

Calculate the logical error probability and its standard deviation.

analysis.get_exp_fit(...[, interpolation_points])

Implement logical error probability per round fit as described in https://arxiv.org/pdf/2310.05900.pdf (p.40) and https://arxiv.org/pdf/2207.06431.pdf (p.21).

analysis.get_lambda_fit(distances, ...)

Get the best fit line with gradient lambda for plotting purposes.

deltakit.explorer.plotting#

Description of deltakit.explorer.plotting namespace here.

plotting.correlation_matrix(matrix, ...[, ...])

Plot a given correlation matrix as a heatmap.

plotting.defect_diagram(all_detector_coords, ...)

Plots defect rates patch diagram given detector coordinates and their error rates.

plotting.defect_rates(defect_rates_series, ...)

Convenience function to plot the average defect rate plot fig 2b in Google paper https://www.nature.com/articles/s41586-022-05434-1.

deltakit.explorer.codes#

Description of deltakit.explorer.codes namespace here.

codes.CSSCode(stabilisers[, ...])

Class representing a CSS code.

codes.css_code_memory_circuit(css_code, ...)

Return a noiseless deltakit.circuit.Circuit for an X or Z quantum memory experiment for CSS codes.

codes.css_code_stability_circuit(css_code, ...)

Return a noiseless deltakit.circuit.Circuit for an X or Z quantum stability experiment for CSS codes.

codes.CSSStage([stabilisers, num_rounds, ...])

Class representing a computational stage in a CSS code experiment.

codes.experiment_circuit(experiment)

Return a noiseless Circuit for an experiment represented by the input Sequence of CSSStage instances.

codes.StabiliserCode(stabilisers[, ...])

Class representing an abstract stabiliser code.

codes.BivariateBicycleCode(param_l, param_m, ...)

Class to represent the IBM Bivariate Bicycle qLDPC codes, as specified in arXiv:2308.07915.

codes.Monomial(x_pow, y_pow, l, m)

Class used to encapsulate the "Monomial" concept used in the IBM paper.

codes.Polynomial(monomials)

Class to encapsulate the "Polynomial" concept used in the IBM paper.

codes.ScheduleType(*values)

Enum for specifying the schedule type for measuring stabilisers for a planar code.

codes.RotatedPlanarCode(width, height[, ...])

Class representing the default rotated planar code.

codes.UnrotatedPlanarCode(width, height[, ...])

Class representing the unrotated planar code.

codes.UnrotatedToricCode(...[, ...])

Class representing the default unrotated toric code.

codes.RepetitionCode(distance[, ...])

Class representing an n-qubit repetition code for memory and stability experiments.

deltakit.explorer.data#

Description of deltakit.explorer.data namespace here.

data.read_01(stream)

Read 01 data from steam, StringIO or file descriptor.

data.read_b8(stream, width)

Read bit-packed data from steam, BytesIO or file descriptor.

data.read_csv(stream)

Read CSV data from steam, StringIO or file descriptor.

data.write_01(data, stream)

Write data into a text stream in 01 format.

data.write_b8(data, stream)

Write data into a bytes stream in B8 format.

data.write_binary_data_to_file(data, ...)

Writes a stream of bit lines (each List[int] is a line of {0, 1}) into a file of desired format.

deltakit.explorer.enums#

Description of deltakit.explorer.enums namespace here.

enums.DataFormat(*values)

Represent common data representation formats.

enums.DecoderType(*values)

Decoder types, supported by a client.

enums.QECECodeType(*values)

Type of QEC code.

enums.QECExperimentType(*values)

Type of QEC experiment.

deltakit.explorer.qpu#

Description of deltakit.explorer.qpu namespace here.

qpu.QPU(qubits, native_gates_and_times, ...)

Class capturing properties and functionality of a QPU.

qpu.NativeGateSet([one_qubit_gates, ...])

Class for capturing native gate sets of a quantum computer.

qpu.NativeGateSetAndTimes([one_qubit_gates, ...])

Class for capturing native gate sets of a quantum computer and times of gate execution (in seconds).

qpu.ExhaustiveGateSet()

Class for capturing gateset of a quantum computer that can perform all gates natively.

qpu.NoiseParameters(*, gate_noise, ...)

Dataclass to capture a noise model for a quantum computer.

qpu.PhenomenologicalNoise(*, gate_noise, ...)

Class for capturing phenomenological noise.

qpu.SD6Noise(*, gate_noise, idle_noise, ...)

The standard depolarising noise model as seen in QEC literature, e.g.: Table 2 in https://arxiv.org/abs/2108.10457 This model sets all one- and two-qubit depolarising error probabilities to p, as well as setting all measurement flip probabilities to p.

qpu.SI1000Noise(*, gate_noise, idle_noise, ...)

Superconducting inspired noise model from: https://arxiv.org/abs/2108.10457.

qpu.ToyNoise(*, gate_noise, idle_noise, ...)

A noise model specified only by two parameters.

qpu.PhysicalNoise(*, gate_noise, idle_noise, ...)

Gets gate noise parameters given physical gate data

deltakit.explorer.simulation#

Description of deltakit.explorer.simulation namespace here.

simulation.simulate_with_stim(stim_circuit, ...)

This method simulates the circuit using a Clifford STIM simulator.

deltakit.explorer.types#

Description of deltakit.explorer.types namespace here.

types.DataString([data])

Data string is a normal string which encodes arbitrary binary data (e.g. Stim circuit file, or measurements data).

types.QECExperiment(noisy_circuit[, ...])

Represents a core of simulated experiment:

types.QECExperimentDefinition(...[, ...])

Definition, essential to generate a QEC experiment circuit.

types.BinaryDataType(data[, data_format, ...])

Any binary table, stored in a file, datastring, or RAM.

types.CircuitParameters([...])

Parameter to be passed as a type for additional parameters for generate_circuit

types.Decoder(decoder_type, ...)

Common settings for decoding.

types.DecodingResult(fails, shots[, times, ...])

Results of decoding

types.DetectionEvents(data[, data_format, ...])

Binary table, representing detectors.

types.LeakageFlags(data[, data_format, ...])

Binary table, representing heralded leakage flags.

types.MatrixSpecifications(param_l, param_m, ...)

Parameters to be passed to BivariateBicycle code type, IBM Bivariate Bicycle qLDPC codes, as specified in arXiv:2308.07915.

types.Measurements(data[, data_format, ...])

Binary table representing measurements.

types.NoiseModel()

Generic noise model class.

types.ObservableFlips(data[, data_format, ...])

Binary table, representing observables.

types.PhysicalNoiseModel(t_1, t_2, ...)

Physically-inspired noise model.

types.QubitCoordinateToDetectorMapping(...)

Mapping of detectors to qubit coordinates.

types.RAMData(data_format, content[, data_width])

An wrapper around a collection stored in RAM.

types.SI1000NoiseModel(p, p_l)

The SI 1000 (Superconducting Inspired with 1000 nanosecond cycle) noise model, with leakage.

types.Sizes(sizes)

The size parameter to be passed to generate_circuit() method.

types.TypedData(data_format, content[, ...])

Basic class for all typed data manipulation activities.

types.TypedDataFile(data_format, content[, ...])

Data file with typed content.

types.TypedDataString(data_format, content)

Typed data string.