IterationData#

Module: iqm.station_control.interface.models.iteration

class IterationData(*, id, status, qc, queue_position=None, messages=[], max_duration_seconds, idle_timeout_seconds, created_at, started_at=None, ends_at=None, finished_at=None, metrics)#

Bases: PydanticBase

Status, metrics and metadata of an iteration.

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.

Attributes

model_config

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

id

Unique ID for the iteration.

status

Current iteration status.

qc

Quantum computer on which the iteration takes place.

queue_position

For iterations in the "waiting" state, position in the IQM Server queue, otherwise None.

messages

Informational messages for the iteration, e.g. the reason for a IterationStatus.FAILED status.

max_duration_seconds

Maximum duration of the iteration (in seconds).

idle_timeout_seconds

Maximum time (in seconds) the iteration job queue may be empty.

created_at

When the iteration was requested/created.

started_at

When the iteration became active, or None if this has not happened yet.

ends_at

When the iteration will end automatically, or None if it has not started yet.

finished_at

When the iteration ended, or None if this has not happened yet.

metrics

Runtime and billing metrics.

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].

id: UUID#

Unique ID for the iteration.

status: IterationStatus#

Current iteration status.

qc: QCInfo#

Quantum computer on which the iteration takes place.

queue_position: int | None#

For iterations in the “waiting” state, position in the IQM Server queue, otherwise None.

messages: list[str]#

Informational messages for the iteration, e.g. the reason for a IterationStatus.FAILED status.

max_duration_seconds: int#

Maximum duration of the iteration (in seconds). The iteration ends automatically once it has been active this long.

idle_timeout_seconds: int#

Maximum time (in seconds) the iteration job queue may be empty. The iteration ends automatically once this limit has been passed.

created_at: datetime#

When the iteration was requested/created.

started_at: datetime | None#

When the iteration became active, or None if this has not happened yet.

ends_at: datetime | None#

When the iteration will end automatically, or None if it has not started yet.

finished_at: datetime | None#

When the iteration ended, or None if this has not happened yet.

metrics: IterationMetrics#

Runtime and billing metrics.

Inheritance

Inheritance diagram of iqm.station_control.interface.models.iteration.IterationData