ExecutionConfig¶
- class ExecutionConfig(bond_dimension=None, truncation_threshold=None, simulator=None, simulation_method=None, api_meta=None)[source]¶
Bases:
objectExecution configuration for a Qoro Service job.
All fields are optional. When set on a job via
QoroService.set_execution_config(), unset (None) fields are omitted from the request so the server keeps its own defaults.Attributes Summary
Runtime pass-through metadata.
MPS bond dimension.
Simulation method.
Simulator backend.
MPS truncation threshold.
Methods Summary
from_response(data)Construct an
ExecutionConfigfrom an API response dictionary.override(other)Creates a new config by overriding attributes with non-None values.
Serialize to the JSON body expected by the API.
Attributes Documentation
- api_meta: dict | None = None¶
Runtime pass-through metadata. Forwarded to the cloud runtime; unknown keys are rejected server-side. Allowed keys and value types:
optimization_level(int)resilience_level(int)max_execution_time(int) — secondstranspilation_seed(int)layout_method(str)routing_method(str)approximation_degree(intorfloat)
- simulation_method: SimulationMethod | None = None¶
Simulation method.
Methods Documentation
- static from_response(data)[source]¶
Construct an
ExecutionConfigfrom an API response dictionary.- Parameters:
data (
dict) – Theexecution_configurationdict from the API response.- Returns:
A new instance populated from the response.
- Return type:
- override(other)[source]¶
Creates a new config by overriding attributes with non-None values.
This method ensures immutability by always returning a new
ExecutionConfigobject and leaving the original instance unmodified.- Parameters:
other (
ExecutionConfig) – Another ExecutionConfig instance to take values from. Only non-None attributes from this instance will be used for the override.- Return type:
- Returns:
A new ExecutionConfig instance with the merged configurations.