CircuitMeasurementCounts#

class CircuitMeasurementCounts(*, measurement_keys, counts)#

Bases: PydanticBase

Circuit measurement counts in histogram representation.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Module: iqm.station_control.interface.models.circuit

Attributes

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

measurement_keys

Measurement keys in the order they are concatenated to form the state bitstrings in counts.

counts

Mapping from computational basis states, represented as bitstrings, to the number of times they were observed when executing the circuit.

Methods

Parameters:
model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'ser_json_inf_nan': 'constants', 'validate_assignment': True, 'validate_default': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

measurement_keys: list[str]#

Measurement keys in the order they are concatenated to form the state bitstrings in counts.

For example, if measurement_keys is ['mk_1', 'mk2'] and 'mk_1' measures QB1 and 'mk_2' measures QB3 and QB5, then counts could contains keys such as '010' representing shots where QB1`, ``QB3 and QB5 were observed to be in the state \(|010 angle\).

counts: dict[str, int]#

Mapping from computational basis states, represented as bitstrings, to the number of times they were observed when executing the circuit.