laboneq.workflow.tasks.run_experiment
¶
This module provides a task to run a compiled experiment in a session.
RunExperimentResults = Results
module-attribute
¶
RunExperimentOptions
¶
Options for the run_experiment task.
Attributes:
| Name | Type | Description |
|---|---|---|
include_results_metadata |
bool
|
Passed to |
return_legacy_results |
bool
|
Alias for |
inject_results |
dict
|
Results loaded from previously serialized LabOne Q runs, returned in place of the measured results. A dictionary with the keys:
The sweep points are not injected, so pass the sweep points that
the loaded results were measured with.
Default: |
Added in version 2.52.0
The option include_results_metadata was added.
Deprecated in version 2.52.0
A new unified Results class was introduced to LabOne Q. Previously
return_legacy_results specified whether to return the LabOne Q
Results class or its own RunExperimentResults class. Now
the unified Results class is always returned but the value of
return_legacy_results determines via the Session which
attributes should be set on the results and is equivalent to
the new include_results_metadata.
run_experiment(session, compiled_experiment, *, options=None)
¶
Run the compiled experiment on the quantum processor via the specified session.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
The connected session to use for running the experiment. |
required |
compiled_experiment
|
CompiledExperiment
|
The compiled experiment to run. |
required |
options
|
RunExperimentOptions | None
|
The options for this task as an instance of RunExperimentOptions. |
None
|
Returns:
| Type | Description |
|---|---|
Results
|
The measurement results. |