qblox_scheduler.experiments.experiment#

Module containing the core experiment concepts.

Attributes#

Classes#

Step

A step containing a single (possibly) near-time operation to be performed in an experiment.

Experiment

An experiment.

Module Contents#

logger[source]#
class Step(name: str)[source]#

Bases: qblox_scheduler.json_utils.JSONSchemaValMixin, collections.UserDict, abc.ABC

A step containing a single (possibly) near-time operation to be performed in an experiment.

An Experiment consists of steps, each of which performs a specific operation (usually on hardware). There is no real-time guarantee between steps, as opposed to Operation.

schema_filename = 'step.json'[source]#
_class_signature = None[source]#
_update() None[source]#

Update the Step’s internals.

clone() Step[source]#

Clone this operation into a new independent operation.

substitute(substitutions: dict[qblox_scheduler.operations.expressions.Expression, qblox_scheduler.operations.expressions.Expression | int | float | complex]) Step[source]#

Substitute matching expressions in operand, possibly evaluating a result.

property name: str[source]#

Return the name of the step.

classmethod _get_signature(parameters: dict) str[source]#

Returns the constructor call signature of this instance for serialization.

The string constructor representation can be used to recreate the object using eval(signature).

Parameters:

parameters (dict) – The current data dictionary.

Returns:

:

abstract run(device: qblox_scheduler.device_under_test.QuantumDevice, timeout: int) xarray.Dataset | None[source]#

Execute step on quantum device.

class Experiment(name: str, data: dict[str, Any] | None = None)[source]#

Bases: qblox_scheduler.json_utils.JSONSchemaValMixin, qblox_scheduler.json_utils.JSONSerializable, collections.UserDict

An experiment.

schema_filename = 'experiment.json'[source]#
property name: str[source]#

Return the name of the experiment.

property steps: list[Step][source]#

Return the steps in the experiment.

declare(dtype: qblox_scheduler.operations.expressions.DType) qblox_scheduler.operations.variables.Variable[source]#

Declare a variable.

Parameters:

dtype – The variable type.

define(var: qblox_scheduler.operations.variables.Variable) None[source]#

Add a declared variable.

Parameters:

var – The variable.

add(step: Step) None[source]#

Add step to experiment.

run(device: qblox_scheduler.device_under_test.QuantumDevice, timeout: int = 10) xarray.Dataset[source]#

Run experiment on quantum device.

clone() Experiment[source]#

Clone this schedule into a separate independent experiment.

substitute(substitutions: dict[qblox_scheduler.operations.expressions.Expression, qblox_scheduler.operations.expressions.Expression | int | float | complex]) Experiment[source]#

Substitute matching expressions in this experiment.