Skip to content

laboneq_applications.experiments.options

Experiment task and workflow options.

T = TypeVar('T') module-attribute

BaseExperimentOptions

Base options for the experiment.

Attributes:

Name Type Description
count int

The number of repetitions. Default: A common choice in practice, 1024.

averaging_mode str | AveragingMode

Averaging mode to use for the experiment. Default: AveragingMode.CYCLIC.

acquisition_type str | AcquisitionType

Acquisition type to use for the experiment. Default: AcquisitionType.INTEGRATION.

repetition_mode str | RepetitionMode

The repetition mode to use for the experiment. Default: RepetitionMode.FASTEST.

repetition_time float | None

The repetition time. Default: None.

reset_oscillator_phase bool

Whether to reset the oscillator phase. Default: False.

active_reset bool

Whether to use active reset. Default: False.

active_reset_repetitions int

The number of times to repeat the active resets. Default: 1

active_reset_states str | tuple | None

The qubit states to actively reset. Default: "ge"

acquisition_type = option_field(AcquisitionType.INTEGRATION, description='Acquisition type to use for the experiment.', converter=_parse_acquisition_type) class-attribute instance-attribute

active_reset = option_field(False, description='Whether to use active reset.') class-attribute instance-attribute

active_reset_repetitions = option_field(1, description='The number of times to repeat the active resets.') class-attribute instance-attribute

active_reset_states = option_field('ge', description='The qubit states to actively reset.') class-attribute instance-attribute

averaging_mode = option_field(AveragingMode.CYCLIC, description='Averaging mode to use for the experiment.', converter=_parse_averaging_mode) class-attribute instance-attribute

count = option_field(default=1024, description='The number of repetitions.') class-attribute instance-attribute

repetition_mode = option_field(RepetitionMode.FASTEST, description='The repetition mode to use for the experiment.', converter=_parse_repetition_mode) class-attribute instance-attribute

repetition_time = option_field(None, description='The repetition time.') class-attribute instance-attribute

reset_oscillator_phase = option_field(False, description='Whether to reset the oscillator phase.') class-attribute instance-attribute

QubitSpectroscopyExperimentOptions

Base options for the resonator spectroscopy experiment.

Additional attributes

spectroscopy_reset_delay: How long to wait after an acquisition in seconds. Default: 1e-6.

spectroscopy_reset_delay = option_field(1e-06, description='How long to wait after an acquisition in seconds.') class-attribute instance-attribute

ResonatorSpectroscopyExperimentOptions

Base options for the resonator spectroscopy experiment.

Additional attributes

use_cw: Perform a CW spectroscopy where no measure pulse is played. Default: False. spectroscopy_reset_delay: How long to wait after an acquisition in seconds. Default: 1e-6. acquisition_type: Acquisition type to use for the experiment. Default: AcquisitionType.SPECTROSCOPY.

acquisition_type = option_field(AcquisitionType.SPECTROSCOPY, description='Acquisition type to use for the experiment.') class-attribute instance-attribute

spectroscopy_reset_delay = option_field(1e-06, description='How long to wait after an acquisition in seconds.') class-attribute instance-attribute

use_cw = option_field(False, description='Perform a CW spectroscopy where no measure pulse is played.') class-attribute instance-attribute

TWPASpectroscopyExperimentOptions

Base options for the TWPA spectroscopy experiment.

Additional attributes

use_probe_from_ppc: Use the probe tone from the SHFPPC instead of the QA out. Default: False. use_cw: Perform a CW spectroscopy where no measure pulse is played. Default: False. spectroscopy_reset_delay: How long to wait after an acquisition in seconds. Default: 1e-6. acquisition_type: Acquisition type to use for the experiment. Default: AcquisitionType.SPECTROSCOPY.

Raises:

Type Description
ValueError

If the acquisition_type is not AcquisitionType.SPECTROSCOPY or AcquisitionType.SPECTROSCOPY_PSD.

acquisition_type = option_field(AcquisitionType.SPECTROSCOPY, description='Acquisition type to use for the experiment.', converter=_parse_acquisition_type, validators=(attrs.validators.in_([AcquisitionType.SPECTROSCOPY, AcquisitionType.SPECTROSCOPY_PSD]))) class-attribute instance-attribute

spectroscopy_reset_delay = option_field(1e-06, description='How long to wait after an acquisition in seconds.') class-attribute instance-attribute

use_cw = option_field(False, description='Perform a CW spectroscopy where no measure pulse is played.') class-attribute instance-attribute

use_probe_from_ppc = option_field(False, description='Use the probe tone from the SHFPPC instead of the QA out.') class-attribute instance-attribute

TWPATuneUpExperimentOptions

Base options for TWPA Tuneup experiments.

Additional attributes

use_probe_from_ppc: Use the probe tone from the SHFPPC instead of the QA out. Default: False. spectroscopy_reset_delay: How long to wait after an acquisition in seconds. Default: 1e-6. acquisition_type: Acquisition type to use for the experiment. Default: AcquisitionType.SPECTROSCOPY. averaging_mode: Averaging mode to use for the experiment. Default: AveragingMode.SEQUENTIAL. do_snr (bool): Whether to run SNR measurement.

Raises:

Type Description
ValueError

If the acquisition_type is not AcquisitionType.SPECTROSCOPY or AcquisitionType.SPECTROSCOPY_PSD.

acquisition_type = option_field(AcquisitionType.SPECTROSCOPY, description='Acquisition type to use for the experiment.', converter=_parse_acquisition_type, validators=(attrs.validators.in_([AcquisitionType.SPECTROSCOPY, AcquisitionType.SPECTROSCOPY_PSD]))) class-attribute instance-attribute

averaging_mode = option_field(AveragingMode.SEQUENTIAL, description='Averaging mode to use for the experiment.', converter=_parse_averaging_mode) class-attribute instance-attribute

do_snr = option_field(False, description='Whether to run SNR measurement.') class-attribute instance-attribute

spectroscopy_reset_delay = option_field(1e-06, description='How long to wait after an acquisition in seconds.') class-attribute instance-attribute

use_probe_from_ppc = option_field(False, description='Use the probe tone from the SHFPPC instead of the QA out.') class-attribute instance-attribute

TWPATuneUpWorkflowOptions

Option class for tune-up experiment workflows.

Attributes:

Name Type Description
do_snr bool

Whether to run SNR measurement.

do_snr = option_field(False, description='Whether to run SNR measurement.') class-attribute instance-attribute

TuneUpWorkflowOptions

Option class for tune-up experiment workflows.

Attributes:

Name Type Description
do_analysis bool

Whether to run the analysis workflow. Default: True

evaluate bool

Whether to evaluate the experiment based on the results from the analysis. Default: False

update bool

Whether to update the setup based on the results from the analysis. If the evaluate option is also set, then only the quantum elements flagged by the evaluation will be updated. Default: False

do_analysis = option_field(True, description='Whether to run the analysis workflow.') class-attribute instance-attribute

evaluate = option_field(False, description='Whether to evaluate the experiment based on the results from the analysis.') class-attribute instance-attribute

update = option_field(False, description='Whether to update the setup based on the results from the analysis. If the `evaluate` option is also set, then only the quantum elements flagged by the evaluation will be updated.') class-attribute instance-attribute

TuneupExperimentOptions

Base options for a tune-up experiment.

Attributes:

Name Type Description
transition Literal['ge', 'ef']

Transition to perform the experiment on. May be any transition supported by the quantum operations. Default: "ge" (i.e. ground to first excited state).

use_cal_traces bool

Whether to include calibration traces in the experiment. Default: True.

cal_states str | tuple

The states to prepare in the calibration traces. Can be any string or tuple made from combining the characters 'g', 'e', 'f'. Default: same as transition

cal_states = option_field('ge', description='The states to prepare in the calibration traces.') class-attribute instance-attribute

transition = option_field('ge', description='Transition to perform the experiment on. May be any transition supported by the quantum operations.') class-attribute instance-attribute

use_cal_traces = option_field(True, description='Whether to include calibration traces in the experiment.') class-attribute instance-attribute