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 |
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
.
include_results_metadata = workflow.option_field(False, description='Passed to `Session.run` to specify whether the `.device_setup`, `.experiment` and `.compiled_experiment` attributes of the result should be populated.')
class-attribute
instance-attribute
¶
return_legacy_results = workflow.option_field(False, description='Alias for `include_results_metadata`. Deprecated.')
class-attribute
instance-attribute
¶
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. |