mqt.ionshuttler.linear.result¶
Linear compilation outcomes and their JSON representation.
Module Contents¶
- ActionDecoder¶
- class CompilationStatus[source]¶
Bases:
enum.StrEnumDescribe how compilation ended.
- SUCCESS = 'SUCCESS'¶
- TIMEOUT = 'TIMEOUT'¶
- FAILED = 'FAILED'¶
- INTERRUPTED = 'INTERRUPTED'¶
- class CompilationResult[source]¶
Contain an executable schedule and compiler diagnostics.
The architecture and action schedule are parallel compilation artifacts. This result also owns search completion, cost, runtime, explored-node count, and the compiler state reached at termination.
- status: CompilationStatus¶
- schedule: ActionSchedule¶
- architecture: Architecture¶
- __post_init__() None[source]¶
Validate compiler diagnostics and the schedule boundary.
- Raises:
TypeError – If a result field has the wrong type.
ValueError – If a numeric diagnostic is outside its valid range.
- property initial_state: MachineState¶
The schedule’s machine-only initial state.
- classmethod from_dict(data: object, *, action_types: Sequence[type[Action]] | None = None, action_decoders: ActionDecoders | None = None) CompilationResult[source]¶
Restore a result from its JSON-compatible representation.
- Returns:
The restored compilation result.
- Raises:
ValueError – If the document is malformed.
- classmethod from_json(raw: str, *, action_types: Sequence[type[Action]] | None = None, action_decoders: ActionDecoders | None = None) CompilationResult[source]¶
Restore a result from JSON text.
- Returns:
The restored compilation result.