qblox_scheduler.instrument_coordinator.components.qblox#
Module containing Qblox InstrumentCoordinator Components.
Attributes#
Classes#
Dataclass for storing configuration differences across Qblox devices. |
|
Dataclass for storing configuration differences across Qblox devices. |
|
Dataclass for storing configuration differences across Qblox devices. |
|
Dataclass for storing configuration differences across Qblox devices. |
|
Qblox InstrumentCoordinator component base class. |
|
Qblox InstrumentCoordinator component base class. |
|
QCM specific InstrumentCoordinator component. |
|
Qblox InstrumentCoordinator readout component base class. |
|
QRM specific InstrumentCoordinator component. |
|
Mix-in for RF-module-specific InstrumentCoordinatorComponent behaviour. |
|
QCM-RF specific InstrumentCoordinator component. |
|
QRM-RF specific InstrumentCoordinator component. |
|
QRC specific InstrumentCoordinator component. |
|
QTM specific InstrumentCoordinator component. |
|
QSM specific InstrumentCoordinator component. |
|
Utility class that handles the acquisitions performed with a module. |
|
Utility class that handles the acquisitions performed with the QRM and QRC. |
|
Utility class that handles the acquisitions performed with the QTM. |
|
Class that represents an instrument coordinator component for a Qblox cluster. |
Functions#
|
|
|
Module Contents#
- class _StaticHardwareProperties[source]#
Dataclass for storing configuration differences across Qblox devices.
- settings_type: type[qblox_scheduler.backends.types.qblox.BaseModuleSettings][source]#
The settings dataclass to use that the hardware needs to configure to.
- class _StaticAnalogModuleProperties[source]#
Bases:
_StaticHardwarePropertiesDataclass for storing configuration differences across Qblox devices.
- settings_type: type[qblox_scheduler.backends.types.qblox.AnalogModuleSettings][source]#
The settings dataclass to use that the hardware needs to configure to.
- class _StaticTimetagModuleProperties[source]#
Bases:
_StaticHardwarePropertiesDataclass for storing configuration differences across Qblox devices.
- settings_type: type[qblox_scheduler.backends.types.qblox.TimetagModuleSettings][source]#
The settings dataclass to use that the hardware needs to configure to.
- class _StaticDCModuleProperties[source]#
Bases:
_StaticHardwarePropertiesDataclass for storing configuration differences across Qblox devices.
- settings_type: type[qblox_scheduler.backends.types.qblox.settings.DCModuleSettings][source]#
The settings dataclass to use that the hardware needs to configure to.
- class _ModuleComponentBase(instrument: qblox_instruments.qcodes_drivers.module.Module)[source]#
Bases:
qblox_scheduler.instrument_coordinator.components.base.InstrumentCoordinatorComponentBase,Generic[_HardwarePropertiesT_co]Qblox InstrumentCoordinator component base class.
- _hardware_properties: _HardwarePropertiesT_co[source]#
- _nco_frequency_changed: dict[int, bool][source]#
Private attribute for automatic mixer calibration. The keys are sequencer indices. The prepare method resets this to an empty dictionary.
- property instrument: qblox_instruments.qcodes_drivers.module.Module[source]#
Returns a reference to the module instrument.
- _check_parameter_settable(instrument: qcodes.instrument.instrument_base.InstrumentBase, parameter_name: str, val: Any) bool[source]#
- _set_parameter(instrument: qcodes.instrument.instrument_base.InstrumentBase, parameter_name: str, val: Any) None[source]#
Set the parameter directly or using the lazy set.
- Parameters:
instrument – The instrument or instrument channel that holds the parameter to set, e.g. self.instrument or self.instrument[f”sequencer{idx}”].
parameter_name – The name of the parameter to set.
val – The new value of the parameter.
- async _set_async_parameter(instrument: qcodes.instrument.instrument_base.InstrumentBase, parameter_name: str, val: Any) None[source]#
Set the parameter directly, asynchronously, or using the lazy set.
- Parameters:
instrument – The instrument or instrument channel that holds the parameter to set, e.g. self.instrument or self.instrument[f”sequencer{idx}”].
parameter_name – The name of the parameter to set.
val – The new value of the parameter.
- property is_running: bool[source]#
Finds if any of the sequencers is currently running.
- Returns:
: True if any of the sequencers reports the SequencerStates.RUNNING status.
- wait_done(timeout_sec: int = 10) None[source]#
Blocks the instrument until all the sequencers are done running.
- Parameters:
timeout_sec – The timeout in seconds. N.B. the instrument takes the timeout in minutes (int), therefore it is rounded down to whole minutes with a minimum of 1.
- async wait_done_async(timeout_sec: int = 10) None[source]#
Blocks the instrument until all the sequencers are done running.
- Parameters:
timeout_sec – The timeout in seconds. N.B. the instrument takes the timeout in minutes (int), therefore it is rounded down to whole minutes with a minimum of 1.
- get_hardware_log(compiled_schedule: qblox_scheduler.schedules.schedule.CompiledSchedule) dict | None[source]#
Retrieve the hardware log of the Qblox instrument associated to this component.
This log does not include the instrument serial number and firmware version.
- Parameters:
compiled_schedule – Compiled schedule to check if this component is referenced in.
- Returns:
: A dict containing the hardware log of the Qblox instrument, in case the component was referenced; else None.
- prepare(program: dict[str, dict], acq_channels_data: qblox_scheduler.schedules.schedule.AcquisitionChannelsData, repetitions: int) None[source]#
Store program containing sequencer settings.
- async prepare_async(program: dict[str, dict], acq_channels_data: qblox_scheduler.schedules.schedule.AcquisitionChannelsData, repetitions: int) None[source]#
- _configure(program: dict[str, dict], acq_channels_data: qblox_scheduler.schedules.schedule.AcquisitionChannelsData, repetitions: int) None[source]#
- async retrieve_acquisition_async() xarray.Dataset | None[source]#
Gets and returns acquisition data.
- abstractmethod _configure_global_settings(settings: qblox_scheduler.backends.types.qblox.BaseModuleSettings) None[source]#
Configures all settings that are set globally for the whole instrument.
- Parameters:
settings – The settings to configure it to.
- _configure_sequencer_settings(seq_idx: int, settings: qblox_scheduler.backends.types.qblox.SequencerSettings) None[source]#
Configures all sequencer-specific settings.
- Parameters:
seq_idx – Index of the sequencer to configure.
settings – The settings to configure it to.
- _upload_to_sequencer(seq_idx: int, settings: qblox_scheduler.backends.types.qblox.SequencerSettings) None[source]#
- async _upload_to_sequencer_async(seq_idx: int, settings: qblox_scheduler.backends.types.qblox.SequencerSettings) None[source]#
- async arm_all_sequencers_in_program_async() None[source]#
Arm all the sequencers that are part of the program.
- class _AnalogModuleComponent(instrument: qblox_instruments.qcodes_drivers.module.Module)[source]#
Bases:
_ModuleComponentBaseQblox InstrumentCoordinator component base class.
- _hardware_properties: _StaticAnalogModuleProperties[source]#
- abstractmethod _configure_global_settings(settings: qblox_scheduler.backends.types.qblox.BaseModuleSettings) None[source]#
Configures all settings that are set globally for the whole instrument.
- Parameters:
settings – The settings to configure it to.
- _configure_sequencer_settings(seq_idx: int, settings: qblox_scheduler.backends.types.qblox.SequencerSettings) None[source]#
Configures all sequencer-specific settings.
- Parameters:
seq_idx – Index of the sequencer to configure.
settings – The settings to configure it to.
- _determine_channel_map_parameters(settings: qblox_scheduler.backends.types.qblox.AnalogSequencerSettings) dict[str, str][source]#
Returns a dictionary with the channel map parameters for this module.
- _determine_output_channel_map_parameters(settings: qblox_scheduler.backends.types.qblox.AnalogSequencerSettings, channel_map_parameters: dict[str, str]) dict[str, str][source]#
Adds the outputs to the channel map parameters dict.
- _configure_nco_mixer_calibration(seq_idx: int, settings: qblox_scheduler.backends.types.qblox.AnalogSequencerSettings) None[source]#
- class _QCMComponent(instrument: qblox_instruments.qcodes_drivers.module.Module)[source]#
Bases:
_AnalogModuleComponentQCM specific InstrumentCoordinator component.
- retrieve_acquisition() None[source]#
Retrieves the previous acquisition.
- Returns:
: QCM returns None since the QCM has no acquisition.
- async retrieve_acquisition_async() None[source]#
Retrieves the previous acquisition.
- Returns:
: QCM returns None since the QCM has no acquisition.
- _configure(program: dict[str, dict], acq_channels_data: qblox_scheduler.schedules.schedule.AcquisitionChannelsData, repetitions: int) None[source]#
- _configure_sequencer_settings(seq_idx: int, settings: qblox_scheduler.backends.types.qblox.SequencerSettings) None[source]#
Configures all sequencer-specific settings.
- Parameters:
seq_idx – Index of the sequencer to configure.
settings – The settings to configure it to.
- _configure_global_settings(settings: qblox_scheduler.backends.types.qblox.BaseModuleSettings) None[source]#
Configures all settings that are set globally for the whole instrument.
- Parameters:
settings – The settings to configure it to.
- class _AnalogReadoutComponent(instrument: qblox_instruments.qcodes_drivers.module.Module)[source]#
Bases:
_AnalogModuleComponentQblox InstrumentCoordinator readout component base class.
- _acquisition_manager: _QRMAcquisitionManager | None = None[source]#
Holds all the acquisition related logic.
- retrieve_acquisition() xarray.Dataset | None[source]#
Retrieves the latest acquisition results.
- Returns:
: The acquired data.
- async retrieve_acquisition_async() xarray.Dataset | None[source]#
Retrieves the latest acquisition results.
- Returns:
: The acquired data.
- _configure(program: dict[str, dict], acq_channels_data: qblox_scheduler.schedules.schedule.AcquisitionChannelsData, repetitions: int) None[source]#
- _configure_global_settings(settings: qblox_scheduler.backends.types.qblox.AnalogModuleSettings) None[source]#
Configures all settings that are set globally for the whole instrument.
- Parameters:
settings – The settings to configure it to.
- _configure_sequencer_settings(seq_idx: int, settings: qblox_scheduler.backends.types.qblox.SequencerSettings) None[source]#
Configures all sequencer-specific settings.
- Parameters:
seq_idx – Index of the sequencer to configure.
settings – The settings to configure it to.
- _determine_channel_map_parameters(settings: qblox_scheduler.backends.types.qblox.AnalogSequencerSettings) dict[str, str][source]#
Returns a dictionary with the channel map parameters for this module.
- _determine_input_channel_map_parameters(settings: qblox_scheduler.backends.types.qblox.AnalogSequencerSettings, channel_map_parameters: dict[str, str]) dict[str, str][source]#
Adds the inputs to the channel map parameters dict.
- _determine_scope_mode_acquisition_sequencer_and_qblox_acq_index(acq_channels_data: qblox_scheduler.schedules.schedule.AcquisitionChannelsData, acq_hardware_mapping: dict[str, qblox_scheduler.backends.qblox.qblox_acq_index_manager.QbloxAcquisitionHardwareMapping]) tuple[int, int] | None[source]#
Finds the sequencer and qblox_acq_index that performs the raw trace acquisition.
Raises an error if multiple scope mode acquisitions are present per sequencer. Note, that compiler ensures there is at most one scope mode acquisition, however the user is able to freely modify the compiler program, so we make sure this requirement is still satisfied. See
_ensure_single_scope_mode_acquisition_sequencer().- Returns:
: The sequencer and qblox_acq_channel for the trace acquisition, if there is any, otherwise None.
- class _QRMComponent(instrument: qblox_instruments.qcodes_drivers.module.Module)[source]#
Bases:
_AnalogReadoutComponentQRM specific InstrumentCoordinator component.
- _configure(program: dict[str, dict], acq_channels_data: qblox_scheduler.schedules.schedule.AcquisitionChannelsData, repetitions: int) None[source]#
- _configure_sequencer_settings(seq_idx: int, settings: qblox_scheduler.backends.types.qblox.SequencerSettings) None[source]#
Configures all sequencer-specific settings.
- Parameters:
seq_idx – Index of the sequencer to configure.
settings – The settings to configure it to.
- class _RFComponent(instrument: qblox_instruments.qcodes_drivers.module.Module)[source]#
Bases:
_AnalogModuleComponentMix-in for RF-module-specific InstrumentCoordinatorComponent behaviour.
- _configure(program: dict[str, dict], acq_channels_data: qblox_scheduler.schedules.schedule.AcquisitionChannelsData, repetitions: int) None[source]#
- _configure_sequencer_settings(seq_idx: int, settings: qblox_scheduler.backends.types.qblox.SequencerSettings) None[source]#
Configures all sequencer-specific settings.
- Parameters:
seq_idx – Index of the sequencer to configure.
settings – The settings to configure it to.
- _determine_output_channel_map_parameters(settings: qblox_scheduler.backends.types.qblox.AnalogSequencerSettings, channel_map_parameters: dict[str, str]) dict[str, str][source]#
Adds the outputs to the channel map parameters dict.
- _get_connected_lo_idx_for_sequencer(sequencer_settings: qblox_scheduler.backends.types.qblox.AnalogSequencerSettings) list[int][source]#
Looks at the connected _output_ ports of the sequencer (if any) to determine which LO this sequencer’s output is coupled to.
- class _QCMRFComponent(instrument: qblox_instruments.qcodes_drivers.module.Module)[source]#
Bases:
_RFComponent,_QCMComponentQCM-RF specific InstrumentCoordinator component.
- _configure_global_settings(settings: qblox_scheduler.backends.types.qblox.BaseModuleSettings) None[source]#
Configures all settings that are set globally for the whole instrument.
- Parameters:
settings – The settings to configure it to.
- class _QRMRFComponent(instrument: qblox_instruments.qcodes_drivers.module.Module)[source]#
Bases:
_RFComponent,_QRMComponentQRM-RF specific InstrumentCoordinator component.
- _configure_global_settings(settings: qblox_scheduler.backends.types.qblox.BaseModuleSettings) None[source]#
Configures all settings that are set globally for the whole instrument.
- Parameters:
settings – The settings to configure it to.
- class _QRCComponent(instrument: qblox_instruments.qcodes_drivers.module.Module)[source]#
Bases:
_RFComponent,_AnalogReadoutComponentQRC specific InstrumentCoordinator component.
- _configure(program: dict[str, dict], acq_channels_data: qblox_scheduler.schedules.schedule.AcquisitionChannelsData, repetitions: int) None[source]#
- _configure_global_settings(settings: qblox_scheduler.backends.types.qblox.BaseModuleSettings) None[source]#
Configures all settings that are set globally for the whole instrument.
- Parameters:
settings – The settings to configure it to.
- _configure_lo_settings(settings: qblox_scheduler.backends.types.qblox.RFModuleSettings, lo_idx_to_connected_seq_idx: dict[int, list[int]]) None[source]#
Configure the settings for the frequency.
- _determine_input_channel_map_parameters(settings: qblox_scheduler.backends.types.qblox.AnalogSequencerSettings, channel_map_parameters: dict[str, str]) dict[str, str][source]#
Adds the inputs to the channel map parameters dict.
- _configure_sequencer_settings(seq_idx: int, settings: qblox_scheduler.backends.types.qblox.SequencerSettings) None[source]#
Configures all sequencer-specific settings.
- Parameters:
seq_idx – Index of the sequencer to configure.
settings – The settings to configure it to.
- class _QTMComponent(instrument: qblox_instruments.qcodes_drivers.module.Module)[source]#
Bases:
_ModuleComponentBaseQTM specific InstrumentCoordinator component.
- _acquisition_manager: _QTMAcquisitionManager | None = None[source]#
Holds all the acquisition related logic.
- retrieve_acquisition() xarray.Dataset | None[source]#
Retrieves the latest acquisition results.
- Returns:
: The acquired data.
- async retrieve_acquisition_async() xarray.Dataset | None[source]#
Retrieves the latest acquisition results.
- Returns:
: The acquired data.
- _configure(program: dict[str, dict], acq_channels_data: qblox_scheduler.schedules.schedule.AcquisitionChannelsData, repetitions: int) None[source]#
- _configure_global_settings(settings: qblox_scheduler.backends.types.qblox.BaseModuleSettings) None[source]#
Configures all settings that are set globally for the whole instrument.
- Parameters:
settings – The settings to configure it to.
- _configure_io_channel_settings(seq_idx: int, settings: qblox_scheduler.backends.types.qblox.TimetagSequencerSettings) None[source]#
Configures all io_channel-specific settings.
- Parameters:
seq_idx – Index of the sequencer to configure.
settings – The settings to configure it to.
- class _QSMComponent(instrument: qblox_instruments.qcodes_drivers.module.Module)[source]#
Bases:
_ModuleComponentBaseQSM specific InstrumentCoordinator component.
- _configure(program: dict[str, dict], acq_channels_data: qblox_scheduler.schedules.schedule.AcquisitionChannelsData, repetitions: int) None[source]#
Do nothing, the QSM has no sequencers.
- retrieve_acquisition() xarray.Dataset | None[source]#
Gets and returns acquisition data.
- async retrieve_acquisition_async() xarray.Dataset | None[source]#
Gets and returns acquisition data.
- _configure_global_settings(settings: qblox_scheduler.backends.types.qblox.settings.DCModuleSettings) None[source]#
Configures all settings that are set globally for the whole instrument.
- Parameters:
settings – The settings to configure it to.
- _configure_sequencer_settings(seq_idx: int, settings: qblox_scheduler.backends.types.qblox.SequencerSettings) None[source]#
Do nothing, the QSM has no sequencers.
- class _AcquisitionManagerBase(parent: _ReadoutModuleComponentT, acq_channels_data: qblox_scheduler.schedules.schedule.AcquisitionChannelsData, acq_hardware_mapping: dict[str, qblox_scheduler.backends.qblox.qblox_acq_index_manager.QbloxAcquisitionHardwareMapping], acquisition_duration: dict[str, int], seq_name_to_idx_map: dict[str, int], repetitions: int)[source]#
Bases:
abc.ABCUtility class that handles the acquisitions performed with a module.
An instance of this class is meant to exist only for a single prepare-start- retrieve_acquisition cycle to prevent stateful behavior.
- Parameters:
parent – Reference to the parent QRM IC component.
acq_channels_data – Provides a summary of the used acquisition protocol, bin mode, acquisition channels, acquisition indices per channel, and repetitions.
acq_hardware_mapping – Acquisition hardware mapping.
acquisition_duration – The duration of each acquisition for each sequencer.
seq_name_to_idx_map – All available sequencer names to their ids in a dict.
repetitions – How many times the schedule repeats.
- property instrument: qblox_instruments.qcodes_drivers.module.Module[source]#
Returns the QRM driver from the parent IC component.
- static _check_bin_mode_compatible(acq_channels_data: qblox_scheduler.schedules.schedule.AcquisitionChannelsData, acq_hardware_mapping: dict[str, qblox_scheduler.backends.qblox.qblox_acq_index_manager.QbloxAcquisitionHardwareMapping]) None[source]#
- Abstractmethod:
- abstractmethod _protocol_to_acq_function_map_non_binned(protocol: str) collections.abc.Callable[source]#
Mapping from acquisition protocol name to the function that processes the raw acquisition data.
- abstractmethod _protocol_to_acq_async_function_map_non_binned(protocol: str) collections.abc.Callable[source]#
Mapping from acquisition protocol name to the async function that processes the raw acquisition data.
- abstractmethod _protocol_to_bin_function(protocol: str) collections.abc.Callable[source]#
- abstractmethod _merge_timetag_trace_data(hardware_retrieved_acquisitions: dict, seq_hardware_mapping: tuple[collections.abc.Hashable, int, qblox_scheduler.backends.qblox.qblox_acq_index_manager.QbloxAcquisitionBinMappingTimetagTrace], scope_data: numpy.ndarray[Any, numpy.dtype[numpy.float64]], dataset: xarray.Dataset) xarray.Dataset[source]#
- _retrieve_acquisition_binned_recursive(node: qblox_scheduler.backends.qblox.qblox_acq_index_manager.BinnedAcqControlFlowNode | qblox_scheduler.backends.qblox.qblox_acq_index_manager.BinnedAcqInfo, qblox_acq_bin: int, qblox_acq_index: int, hardware_retrieved_acquisitions: dict, acq_duration: int, acq_index_offset: int, total_average_repetitions: int, dataset_dict: dict[collections.abc.Hashable, tuple[list, list]]) int[source]#
Adds the data to dataset_dict (updates the argument) from hardware_retrieved_acquisitions, so that the data includes the acquisition channel and acquisition index based on the data in the node.
Note: it updates the dataset_dict argument.
The dataset_dict is a dict with acq_channel->(acq_index, acquisition data). This simple data format makes sure that we can process the data quickly, and later we can merge this into an xarray.Dataset, which is time consuming.
- _retrieve_acquisition_binned(binned_mapping: qblox_scheduler.backends.qblox.qblox_acq_index_manager.QbloxAcquisitionHardwareMappingBinned, hardware_retrieved_acquisitions: dict, acq_duration: int) xarray.Dataset[source]#
- retrieve_acquisition() xarray.Dataset[source]#
Retrieves all the acquisition data in the correct format.
- Returns:
: The acquisitions with the protocols specified in the acquisition_metadata. Each xarray.DataArray in the xarray.Dataset corresponds to one acq_channel. The
acq_channelis the name of each xarray.DataArray in the xarray.Dataset. Each xarray.DataArray is a two-dimensional array, withacq_indexand Each xarray.DataArray is a two-dimensional array, withacq_indexandrepetitionas dimensions.
- async retrieve_acquisition_async() xarray.Dataset[source]#
Retrieves all the acquisition data in the correct format.
- Returns:
: The acquisitions with the protocols specified in the acquisition_metadata. Each xarray.DataArray in the xarray.Dataset corresponds to one acq_channel. The
acq_channelis the name of each xarray.DataArray in the xarray.Dataset. Each xarray.DataArray is a two-dimensional array, withacq_indexand Each xarray.DataArray is a two-dimensional array, withacq_indexandrepetitionas dimensions.
- _merge_retrieved_binned_data(dataset: xarray.Dataset, sequencer_name: str, seq_hardware_mapping_binned: list[qblox_scheduler.backends.qblox.qblox_acq_index_manager.QbloxAcquisitionHardwareMappingBinned], hardware_retrieved_acquisitions: dict) xarray.Dataset[source]#
- _check_retrieved_unbinned_data(seq_hardware_mapping: qblox_scheduler.backends.qblox.qblox_acq_index_manager.QbloxAcquisitionHardwareMapping, hardware_retrieved_acquisitions: dict) None[source]#
- _merge_retrieved_unbinned_data(dataset: xarray.Dataset, sequencer_name: str, seq_hardware_mapping_non_binned: dict[collections.abc.Hashable, qblox_scheduler.backends.qblox.qblox_acq_index_manager.QbloxAcquisitionIndex], hardware_retrieved_acquisitions: dict) xarray.Dataset[source]#
- async _merge_retrieved_unbinned_data_async(dataset: xarray.Dataset, sequencer_name: str, seq_hardware_mapping_non_binned: dict[collections.abc.Hashable, qblox_scheduler.backends.qblox.qblox_acq_index_manager.QbloxAcquisitionIndex], hardware_retrieved_acquisitions: dict) xarray.Dataset[source]#
- delete_acquisition_data() None[source]#
Delete acquisition data from sequencers that have associated hardware acquisition mapping.
To be called before starting the sequencers, so that old data does not get retrieved more than once.
- async delete_acquisition_data_async() None[source]#
Delete acquisition data from sequencers that have associated hardware acquisition mapping.
To be called before starting the sequencers, so that old data does not get retrieved more than once.
- _assert_acquisition_data_exists(hardware_retrieved_acquisitions: dict, qblox_acq_index: int, acq_channel: collections.abc.Hashable) None[source]#
Assert that the qblox_acq_index is in the acquisition data.
- classmethod _get_bin_data(hardware_retrieved_acquisitions: dict, qblox_acq_index: int = 0) dict[source]#
Returns the bin entry of the acquisition data dict.
- static _qblox_acq_index_to_qblox_acq_name(qblox_acq_index: int) str[source]#
Returns the name of the acquisition from the qblox_acq_index.
- _get_trigger_count_bin(qblox_acq_index: int, qblox_acq_bin: int, thresholded_trigger_count_metadata: qblox_scheduler.backends.types.common.ThresholdedTriggerCountMetadata | None, hardware_retrieved_acquisitions: dict, acq_duration: int, acq_channel: collections.abc.Hashable, sum_multiply_repetitions: bool, total_average_repetitions: int) int[source]#
- _get_trigger_count_distribution_data(*, hardware_retrieved_acquisitions: dict, acq_channel: str, seq_channel_hardware_mapping: qblox_scheduler.backends.qblox.qblox_acq_index_manager.QbloxAcquisitionIndex, acq_duration: int, sequencer_name: str) xarray.DataArray[source]#
Retrieves the trigger count acquisition data associated with acq_channel.
- Parameters:
hardware_retrieved_acquisitions – The acquisitions dict as returned by the sequencer.
acq_channel – The acquisition channel.
seq_channel_hardware_mapping – Acquisition hardware mapping for the sequencer and channel.
acq_duration – Desired maximum number of samples for the scope acquisition.
sequencer_name – Sequencer.
sum_multiply_repetitions – Multiplies data by repetitions for the AVERAGE_APPEND bin mode.
- Returns:
data : xarray.DataArray The acquired trigger count data.
Notes
For BinMode.DISTRIBUTION, data contains the distribution of counts.
For BinMode.APPEND, data contains the raw trigger counts.
- _get_thresholded_trigger_count_bin(qblox_acq_index: int, qblox_acq_bin: int, thresholded_trigger_count_metadata: qblox_scheduler.backends.types.common.ThresholdedTriggerCountMetadata | None, hardware_retrieved_acquisitions: dict, acq_duration: int, acq_channel: collections.abc.Hashable, sum_multiply_repetitions: bool, total_average_repetitions: int) int[source]#
- class _QRMAcquisitionManager(parent: _AnalogReadoutComponent, acq_channels_data: qblox_scheduler.schedules.schedule.AcquisitionChannelsData, acq_hardware_mapping: dict[str, qblox_scheduler.backends.qblox.qblox_acq_index_manager.QbloxAcquisitionHardwareMapping], acquisition_duration: dict[str, int], seq_name_to_idx_map: dict[str, int], repetitions: int, scope_mode_sequencer_and_qblox_acq_index: tuple[int, int] | None = None, sequencers: dict[str, dict] | None = None)[source]#
Bases:
_AcquisitionManagerBaseUtility class that handles the acquisitions performed with the QRM and QRC.
An instance of this class is meant to exist only for a single prepare-start- retrieve_acquisition cycle to prevent stateful behavior.
- Parameters:
parent – Reference to the parent QRM or QRC IC component.
acq_channels_data – Provides a summary of the used acquisition protocol, bin mode, acquisition channels, acquisition indices per channel.
acq_hardware_mapping – Acquisition hardware mapping.
acquisition_duration – The duration of each acquisition for each sequencer.
seq_name_to_idx_map – All available sequencer names to their ids in a dict.
scope_mode_sequencer_and_qblox_acq_index – The sequencer and qblox acq_index of the scope mode acquisition if there’s any.
sequencers – Sequencer data.
- _protocol_to_bin_function(protocol: str) collections.abc.Callable[source]#
- _protocol_to_acq_function_map_non_binned(protocol: str) collections.abc.Callable[source]#
Mapping from acquisition protocol name to the function that processes the raw acquisition data.
- _protocol_to_acq_async_function_map_non_binned(protocol: str) collections.abc.Callable[source]#
Mapping from acquisition protocol name to the async function that processes the raw acquisition data.
- static _check_bin_mode_compatible_binned(acq_channels_data: qblox_scheduler.schedules.schedule.AcquisitionChannelsData, node: qblox_scheduler.backends.qblox.qblox_acq_index_manager.BinnedAcqControlFlowNode | qblox_scheduler.backends.qblox.qblox_acq_index_manager.BinnedAcqInfo) None[source]#
- static _check_bin_mode_compatible(acq_channels_data: qblox_scheduler.schedules.schedule.AcquisitionChannelsData, acq_hardware_mapping: dict[str, qblox_scheduler.backends.qblox.qblox_acq_index_manager.QbloxAcquisitionHardwareMapping]) None[source]#
- retrieve_acquisition() xarray.Dataset[source]#
Retrieves all the acquisition data in the correct format.
- Returns:
: The acquisitions with the protocols specified in the acq_channels_data. Each xarray.DataArray in the xarray.Dataset corresponds to one acq_channel. The
acq_channelis the name of each xarray.DataArray in the xarray.Dataset. Each xarray.DataArray is a two-dimensional array, withacq_indexandrepetitionas dimensions.
- async retrieve_acquisition_async() xarray.Dataset[source]#
Retrieves all the acquisition data in the correct format.
- Returns:
: The acquisitions with the protocols specified in the acq_channels_data. Each xarray.DataArray in the xarray.Dataset corresponds to one acq_channel. The
acq_channelis the name of each xarray.DataArray in the xarray.Dataset. Each xarray.DataArray is a two-dimensional array, withacq_indexandrepetitionas dimensions.
- _store_scope_acquisition() None[source]#
Calls
store_scope_acquisitionfunction on the Qblox instrument.This will ensure that the correct sequencer will store the scope acquisition data on the hardware, so it will be filled out when we call
get_acquisitionson the Qblox instrument’s sequencer corresponding to the scope acquisition.
- async _store_scope_acquisition_async() None[source]#
Calls
store_scope_acquisitionfunction on the Qblox instrument.This will ensure that the correct sequencer will store the scope acquisition data on the hardware, so it will be filled out when we call
get_acquisitionson the Qblox instrument’s sequencer corresponding to the scope acquisition.
- _get_scope_data(*, hardware_retrieved_acquisitions: dict, acq_channel: str, seq_channel_hardware_mapping: qblox_scheduler.backends.qblox.qblox_acq_index_manager.QbloxAcquisitionIndex, acq_duration: int, sequencer_name: str) xarray.DataArray[source]#
Retrieves the scope mode acquisition associated with an acq_channel.
- Parameters:
hardware_retrieved_acquisitions – The acquisitions dict as returned by the sequencer.
acq_channel – The acquisition channel.
seq_channel_hardware_mapping – Acquisition hardware mapping for the sequencer and channel.
acq_duration – Desired maximum number of samples for the scope acquisition.
sequencer_name – Sequencer.
- Returns:
: The scope mode data.
- _get_integration_weighted_separated_bin(qblox_acq_index: int, qblox_acq_bin: int, thresholded_trigger_count_metadata: qblox_scheduler.backends.types.common.ThresholdedTriggerCountMetadata | None, hardware_retrieved_acquisitions: dict, acq_duration: int, acq_channel: collections.abc.Hashable, total_average_repetitions: int) complex[source]#
- _get_integration_amplitude_bin(qblox_acq_index: int, qblox_acq_bin: int, thresholded_trigger_count_metadata: qblox_scheduler.backends.types.common.ThresholdedTriggerCountMetadata | None, hardware_retrieved_acquisitions: dict, acq_duration: int, acq_channel: collections.abc.Hashable, total_average_repetitions: int) complex[source]#
- _get_integration_real_bin(qblox_acq_index: int, qblox_acq_bin: int, thresholded_trigger_count_metadata: qblox_scheduler.backends.types.common.ThresholdedTriggerCountMetadata | None, hardware_retrieved_acquisitions: dict, acq_duration: int, acq_channel: collections.abc.Hashable, total_average_repetitions: int) complex[source]#
- _get_thresholded_bin(qblox_acq_index: int, qblox_acq_bin: int, thresholded_trigger_count_metadata: qblox_scheduler.backends.types.common.ThresholdedTriggerCountMetadata | None, hardware_retrieved_acquisitions: dict, acq_duration: int, acq_channel: collections.abc.Hashable, total_average_repetitions: int) int[source]#
- _merge_timetag_trace_data(hardware_retrieved_acquisitions: dict, seq_hardware_mapping: tuple[collections.abc.Hashable, int, qblox_scheduler.backends.qblox.qblox_acq_index_manager.QbloxAcquisitionBinMappingTimetagTrace], scope_data: numpy.ndarray[Any, numpy.dtype[numpy.float64]], dataset: xarray.Dataset) xarray.Dataset[source]#
- class _QTMAcquisitionManager(parent: _ReadoutModuleComponentT, acq_channels_data: qblox_scheduler.schedules.schedule.AcquisitionChannelsData, acq_hardware_mapping: dict[str, qblox_scheduler.backends.qblox.qblox_acq_index_manager.QbloxAcquisitionHardwareMapping], acquisition_duration: dict[str, int], seq_name_to_idx_map: dict[str, int], repetitions: int)[source]#
Bases:
_AcquisitionManagerBaseUtility class that handles the acquisitions performed with the QTM.
An instance of this class is meant to exist only for a single prepare-start- retrieve_acquisition cycle to prevent stateful behavior.
- Parameters:
parent – Reference to the parent QRM IC component.
acq_channels_data – Provides a summary of the used acquisition protocol, bin mode, acquisition channels, acquisition indices per channel, and repetitions, for each sequencer.
acquisition_duration – The duration of each acquisition for each sequencer.
seq_name_to_idx_map – All available sequencer names to their ids in a dict.
- _protocol_to_bin_function(protocol: str) collections.abc.Callable[source]#
- _protocol_to_acq_function_map_non_binned(protocol: str) collections.abc.Callable[source]#
Mapping from acquisition protocol name to the function that processes the raw acquisition data.
- _protocol_to_acq_async_function_map_non_binned(protocol: str) collections.abc.Callable[source]#
Mapping from acquisition protocol name to the async function that processes the raw acquisition data.
- static _check_bin_mode_compatible_binned(acq_channels_data: qblox_scheduler.schedules.schedule.AcquisitionChannelsData, node: qblox_scheduler.backends.qblox.qblox_acq_index_manager.BinnedAcqControlFlowNode | qblox_scheduler.backends.qblox.qblox_acq_index_manager.BinnedAcqInfo) None[source]#
- static _check_bin_mode_compatible(acq_channels_data: qblox_scheduler.schedules.schedule.AcquisitionChannelsData, acq_hardware_mapping: dict[str, qblox_scheduler.backends.qblox.qblox_acq_index_manager.QbloxAcquisitionHardwareMapping]) None[source]#
- _get_digital_trace_data(*, hardware_retrieved_acquisitions: dict, acq_channel: str, seq_channel_hardware_mapping: qblox_scheduler.backends.qblox.qblox_acq_index_manager.QbloxAcquisitionIndex, acq_duration: int, sequencer_name: str) xarray.DataArray[source]#
- async _get_digital_trace_data_async(*, hardware_retrieved_acquisitions: dict, acq_channel: str, seq_channel_hardware_mapping: qblox_scheduler.backends.qblox.qblox_acq_index_manager.QbloxAcquisitionIndex, acq_duration: int, sequencer_name: str) xarray.DataArray[source]#
- _add_digital_trace_data(acq_channel: str, acq_duration: int, scope_data: numpy.ndarray[Any, numpy.dtype[numpy.float64]]) xarray.DataArray[source]#
- _merge_timetag_trace_data(hardware_retrieved_acquisitions: dict, seq_hardware_mapping: tuple[collections.abc.Hashable, int, qblox_scheduler.backends.qblox.qblox_acq_index_manager.QbloxAcquisitionBinMappingTimetagTrace], scope_data: numpy.ndarray[Any, numpy.dtype[numpy.float64]], dataset: xarray.Dataset) xarray.Dataset[source]#
- _split_timetag_trace_data_per_window(timetags: list[int], scope_data: collections.abc.Iterable[tuple[str, int]]) list[list[float]][source]#
Split the long array of
scope_dataon acquisition windows.The scope_data is formatted like [[TYPE, TIME],[TYPE,TIME],…], where TYPE is one of “OPEN”, “RISE”, “CLOSE”. The TIME is absolute (cluster system time).
Each acquisition window starts with “OPEN” and ends with “CLOSE”. This method uses that information to divide the long
scope_dataarray up into smaller arrays for each acquisition window.Furthermore, the
timetagslist contains the relative timetags of the first pulse recorded in each window. This data is used to calculate the relative timetags for all timetags in the trace.
- _get_timetag_bin(qblox_acq_index: int, qblox_acq_bin: int, thresholded_trigger_count_metadata: qblox_scheduler.backends.types.common.ThresholdedTriggerCountMetadata | None, hardware_retrieved_acquisitions: dict, acq_duration: int, acq_channel: collections.abc.Hashable, total_average_repetitions: int) xarray.DataArray[source]#
- class ClusterComponent(instrument: qblox_instruments.Cluster)[source]#
Bases:
qblox_scheduler.instrument_coordinator.components.base.InstrumentCoordinatorComponentBaseClass that represents an instrument coordinator component for a Qblox cluster.
New instances of the ClusterComponent will automatically add installed modules using name “<cluster_name>_module<slot>”.
- Parameters:
instrument – Reference to the cluster driver object.
- _cluster_modules: dict[str, _ModuleComponentBase][source]#
- _program: ClusterComponent | None = None[source]#
- _run_in_loop(cb: collections.abc.Awaitable[_LoopReturnT]) _LoopReturnT[source]#
Run routine in async event loop.
- _set_parameter(instrument: qcodes.instrument.instrument_base.InstrumentBase, parameter_name: str, val: Any) None[source]#
Set the parameter directly or using the lazy set.
- Parameters:
instrument – The instrument or instrument channel that holds the parameter to set, e.g. self.instrument or self.instrument[f”sequencer{idx}”].
parameter_name – The name of the parameter to set.
val – The new value of the parameter.
- async _set_async_parameter(instrument: qcodes.instrument.instrument_base.InstrumentBase, parameter_name: str, val: Any) None[source]#
Set the parameter directly or using the lazy set.
- Parameters:
instrument – The instrument or instrument channel that holds the parameter to set, e.g. self.instrument or self.instrument[f”sequencer{idx}”].
parameter_name – The name of the parameter to set.
val – The new value of the parameter.
- _sync_on_external_trigger(settings: qblox_scheduler.backends.types.qblox.ExternalTriggerSyncSettings) None[source]#
- async _sync_on_external_trigger_async(settings: qblox_scheduler.backends.types.qblox.ExternalTriggerSyncSettings) None[source]#
- _get_program_settings(program: dict[str, dict | qblox_scheduler.backends.types.qblox.ClusterSettings]) qblox_scheduler.backends.types.qblox.ClusterSettings[source]#
- prepare(program: dict[str, dict | qblox_scheduler.backends.types.qblox.ClusterSettings]) None[source]#
Prepares the cluster component for execution of a schedule.
- Parameters:
program – The compiled instructions to configure the cluster to.
- _configure(program: dict[str, Any], cluster_settings: qblox_scheduler.backends.types.qblox.ClusterSettings) None[source]#
- retrieve_acquisition() xarray.Dataset | None[source]#
Retrieves all the data from the instruments.
- Returns:
: The acquired data or
Noneif no acquisitions have been performed.
- async retrieve_acquisition_async() xarray.Dataset | None[source]#
Retrieves all the data from the instruments.
- Returns:
: The acquired data or
Noneif no acquisitions have been performed.
- wait_done(timeout_sec: int = 10) None[source]#
Blocks until all the components are done executing their programs.
- Parameters:
timeout_sec – The time in seconds until the instrument is considered to have timed out.
- async wait_done_async(timeout_sec: int = 10) None[source]#
Blocks until all the components are done executing their programs.
- Parameters:
timeout_sec – The time in seconds until the instrument is considered to have timed out.
- get_hardware_log(compiled_schedule: qblox_scheduler.schedules.schedule.CompiledSchedule) dict | None[source]#
Retrieve the hardware log of the Cluster Management Module and associated modules.
This log includes the module serial numbers and firmware version.
- Parameters:
compiled_schedule – Compiled schedule to check if this cluster is referenced in (and if so, which specific modules are referenced in).
- Returns:
: A dict containing the hardware log of the cluster, in case the component was referenced; else None.
- get_module_descriptions() dict[int, qblox_scheduler.backends.types.qblox.ClusterModuleDescription][source]#
Get the module types of this cluster, indexed by their position in the cluster.
- Returns:
: A dictionary containing the module types in this cluster, indexed by their position in the cluster.
- _get_instrument_ip(component: qblox_scheduler.instrument_coordinator.components.base.InstrumentCoordinatorComponentBase) str[source]#
- _get_configuration_manager(instrument_ip: str) qblox_instruments.ConfigurationManager[source]#