deltakit.decode.analysis.EmpiricalDecodingErrorDistribution#

class deltakit.decode.analysis.EmpiricalDecodingErrorDistribution(number_of_logicals: int)#

Bases: object

Data structure for storing data related to decoding events. Stores the distribution of failures over logicals. Failures can be represented as integers or boolean tuples assumed to be in little endian form, i.e. the lsb is the first item in the tuple.

Parameters:

number_of_logicals (int) – The number of logicals over which all error combinations are derived from.

Methods#

EmpiricalDecodingErrorDistribution.add_event

Adds given tuple to error disitrubtion.

EmpiricalDecodingErrorDistribution.batch_record_errors

Computes and adds a batch of error events based on batches of predicted and target values of the logicals.

EmpiricalDecodingErrorDistribution.from_dict

Create a EmpiricalDecodingErrorDistribution from a given distribution dict of boolean tuples.

EmpiricalDecodingErrorDistribution.get_num_errors_on_logical

Helper function that can compute the number of errors that happened on a given logical.

EmpiricalDecodingErrorDistribution.record_error

Computes and adds error event based on predicted and target value of the logicals.

EmpiricalDecodingErrorDistribution.reset

Resets all data to empty distribution.

EmpiricalDecodingErrorDistribution.to_dict

Returns the error distribution in dictionary representation of boolean keys.