deltakit.explorer.types.Measurements#

class deltakit.explorer.types.Measurements(data: Path | DataString | list[list[int]] | ndarray[tuple[Any, ...], dtype[_ScalarT]], data_format: DataFormat = DataFormat.B8, data_width: int = -1)#

Bases: BinaryDataType

Binary table representing measurements.

Methods#

Measurements.as_01_string

Represent content of the object as 01 string.

Measurements.as_b8_bytes

Represent underlying data as b8 bit-packed bytes.

Measurements.as_data_string

Converts the object to a compact datastring.

Measurements.as_numpy

Represent the data as unsigned 1 byte/number (uint8) numpy table.

Measurements.combine

Stack multiple binary tables into one using numpy representation.

Measurements.split

Split a data file into multiple blocks based on the number of output files.

Measurements.to_batches

Split a data file into batches of fixed size.

Measurements.to_detectors_and_observables

Converts measurements object into detectors and observables tuple.