iqm.iqm_client.models.Counts

iqm.iqm_client.models.Counts#

class iqm.iqm_client.models.Counts(*, measurement_keys: list[str], counts: dict[str, int])#

Bases: BaseModel

Circuit measurement results in histogram representation.

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] = {}#

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