iqm.iqm_client.models.RunResult#
- class iqm.iqm_client.models.RunResult(*, status: Status, measurements: list[dict[str, list[list[int]]]] | None = None, message: str | None = None, metadata: Metadata, warnings: list[str] | None = None)#
Bases:
BaseModel
Results of the quantum circuit execution job. If the job succeeded,
measurements
contains the output of the batch of circuits, consisting of the results of the measurement operations in each circuit. It is a list of dictionaries, where each dict maps each measurement key to a 2D array of measurement results, represented as a nested list.RunResult.measurements[circuit_index][key][shot][qubit_index]
is the result of measuring thequbit_index
’th qubit in measurement operationkey
in the shotshot
in thecircuit_index
’th circuit of the batch.measurements
is present iff the status is'ready'
.message
carries additional information for the'failed'
status. If the status is'pending compilation'
or'pending execution'
,measurements
andmessage
areNone
.The results are non-negative integers representing the computational basis state (for qubits, 0 or 1) that was the measurement outcome.
Attributes
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
current status of the job, in
{'pending compilation', 'pending execution', 'ready', 'failed', 'aborted'}
if the job has finished successfully, the measurement results for the circuit(s)
if the job failed, an error message
metadata about the job
list of warning messages
Methods
from_dict
(inp)Parses the result from a dict.
- Parameters:
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'measurements': FieldInfo(annotation=Union[list[dict[str, list[list[int]]]], NoneType], required=False, default=None), 'message': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'metadata': FieldInfo(annotation=Metadata, required=True), 'status': FieldInfo(annotation=Status, required=True), 'warnings': FieldInfo(annotation=Union[list[str], NoneType], required=False, default=None)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- status: Status#
current status of the job, in
{'pending compilation', 'pending execution', 'ready', 'failed', 'aborted'}