fermioniq.emulator_message.EmulatorMessage#

class fermioniq.emulator_message.EmulatorMessage(*, message_type: Literal['event'], event_type: Literal['LOG', 'STARTED', 'FINISHED', 'PING'], ts: str, job_id: str, job_output: str, job_status_code: int | None = -1)#

EmulatorMessage represents a message containing information about an EmulatorJob’s events and status.

Attributes:
message_type

The type of the message, always “event” for EmulatorMessage.

event_type

The type of event associated with the message.

  • ‘LOG’: A log message from the job.

  • ‘STARTED’: The job has started.

  • ‘FINISHED’: The job has finished.

ts

The timestamp of the event in UTC (ISO 8601 format).

job_id

The unique ID of the EmulatorJob.

job_output

The output associated with the event (e.g., log content).

job_status_code

The status code of the job execution.

  • 0: The job completed successfully.

  • -1: The job has not finished yet.

  • Non-zero values: The job encountered an error during execution.

Methods

construct([_fields_set])

Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.

copy(*[, include, exclude, update, deep])

Duplicate a model, optionally choose which fields to include, exclude and change.

dict(*[, include, exclude, by_alias, ...])

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

json(*[, include, exclude, by_alias, ...])

Generate a JSON representation of the model, include and exclude arguments as per dict().

update_forward_refs(**localns)

Try to update ForwardRefs on fields based on this Model, globalns and localns.

Config

from_orm

parse_file

parse_obj

parse_raw

schema

schema_json

validate