quantify_scheduler.instrument_coordinator.components.qblox
¶
Module containing Qblox InstrumentCoordinator Components.
Module Contents¶
Classes¶
Dataclass that holds all the static differences between the different Qblox |
|
Qblox InstrumentCoordinator component base class. |
|
QCM specific InstrumentCoordinator component. |
|
QRM specific InstrumentCoordinator component. |
|
QCM-RF specific InstrumentCoordinator component. |
|
QRM-RF specific InstrumentCoordinator component. |
|
A component for a baseband Pulsar QCM. |
|
A component for a baseband Pulsar QRM. |
|
Utility class that handles the acquisitions performed with the QRM. |
|
Class that represents an instrument coordinator component for a Qblox cluster. |
Attributes¶
Used to link all flags returned by the hardware to logging message and |
|
Named tuple to clarify how the indexing of acquisitions works inside the |
|
Type that combines all the possible modules for a cluster. |
- _SEQUENCER_STATE_FLAG_INFO: Dict[qblox_instruments.SequencerStatusFlags, _SequencerStateInfo][source]¶
Used to link all flags returned by the hardware to logging message and logging level.
- class _StaticHardwareProperties[source]¶
Dataclass that holds all the static differences between the different Qblox devices that are relevant for configuring them correctly.
- settings_type: Type[quantify_scheduler.backends.types.qblox.BaseModuleSettings][source]¶
The settings dataclass to use that the hardware needs to configure to.
- class QbloxInstrumentCoordinatorComponentBase(instrument: Union[qcodes.instrument.Instrument, qcodes.instrument.InstrumentModule], **kwargs)[source]¶
Bases:
quantify_scheduler.instrument_coordinator.components.base.InstrumentCoordinatorComponentBase
Qblox InstrumentCoordinator component base class.
Create a new instance of QbloxInstrumentCoordinatorComponentBase base class.
- property instrument: Union[qcodes.instrument.Instrument, qcodes.instrument.InstrumentModule][source]¶
If the instrument behind this instance of QbloxInstrumentCoordinatorComponentBase is an InstrumentModule (e.g. the module within the qblox_instrument.Cluster), it is returned. Otherwise, the reference to the instrument is returned (e.g. for a stand-alone qblox_instruments.Pulsar).
- property is_running: bool[source]¶
Finds if any of the sequencers is currently running.
- Returns:
True if any of the sequencers reports the SequencerStatus.RUNNING status.
- abstract property _hardware_properties: _StaticHardwareProperties[source]¶
Holds all the differences between the different modules.
- Returns:
A dataclass with all the hardware properties for this specific module.
- _set_parameter(instrument: Union[qcodes.instrument.Instrument, qcodes.instrument.InstrumentModule], parameter_name: str, val: Any) None [source]¶
Sets the parameter directly or using the lazy set, depending on the value of force_set_parameters.
- 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.
- 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.
- abstract _configure_global_settings(settings: quantify_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: quantify_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 QCMComponent(instrument: qcodes.instrument.Instrument, **kwargs)[source]¶
Bases:
QbloxInstrumentCoordinatorComponentBase
QCM specific InstrumentCoordinator component.
Create a new instance of QCMComponent.
- retrieve_acquisition() None [source]¶
Retrieves the previous acquisition.
- Returns:
QCM returns None since the QCM has no acquisition.
- prepare(options: Dict[str, dict]) None [source]¶
Uploads the waveforms and programs to the sequencers and configures all the settings required. Keep in mind that values set directly through the driver may be overridden (e.g. the offsets will be set according to the specified mixer calibration parameters).
- Parameters:
options – Program to upload to the sequencers. The key is a sequencer, e.g.,
"seq0"
, or"settings"
, the value is the global settings dict or a sequencer-specific configuration.
- _configure_global_settings(settings: quantify_scheduler.backends.types.qblox.BaseModuleSettings)[source]¶
Configures all settings that are set globally for the whole instrument.
- Parameters:
settings – The settings to configure it to.
- class QRMComponent(instrument: qcodes.instrument.Instrument, **kwargs)[source]¶
Bases:
QbloxInstrumentCoordinatorComponentBase
QRM specific InstrumentCoordinator component.
Create a new instance of QRMComponent.
- _acquisition_manager: Optional[_QRMAcquisitionManager][source]¶
Holds all the acquisition related logic.
- retrieve_acquisition() Optional[Dict[AcquisitionIndexing, Any]] [source]¶
Retrieves the latest acquisition results.
- Returns:
The acquired data.
- prepare(options: Dict[str, dict]) None [source]¶
Uploads the waveforms and programs to the sequencers and configures all the settings required. Keep in mind that values set directly through the driver may be overridden (e.g. the offsets will be set according to the specified mixer calibration parameters).
- Parameters:
options – Program to upload to the sequencers. The key is a sequencer, e.g.,
"seq0"
, or"settings"
, the value is the global settings dict or a sequencer-specific configuration.
- _configure_global_settings(settings: quantify_scheduler.backends.types.qblox.BaseModuleSettings)[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: quantify_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 QCMRFComponent(instrument: qcodes.instrument.Instrument, **kwargs)[source]¶
Bases:
QCMComponent
QCM-RF specific InstrumentCoordinator component.
Create a new instance of QCMComponent.
- _configure_global_settings(settings: quantify_scheduler.backends.types.qblox.RFModuleSettings)[source]¶
Configures all settings that are set globally for the whole instrument.
- Parameters:
settings – The settings to configure it to.
- class QRMRFComponent(instrument: qcodes.instrument.Instrument, **kwargs)[source]¶
Bases:
QRMComponent
QRM-RF specific InstrumentCoordinator component.
Create a new instance of QRMComponent.
- _configure_global_settings(settings: quantify_scheduler.backends.types.qblox.RFModuleSettings)[source]¶
Configures all settings that are set globally for the whole instrument.
- Parameters:
settings – The settings to configure it to.
- class PulsarQCMComponent(instrument: qcodes.instrument.Instrument, **kwargs)[source]¶
Bases:
QCMComponent
A component for a baseband Pulsar QCM.
Create a new instance of QCMComponent.
- prepare(options: Dict[str, dict]) None [source]¶
Uploads the waveforms and programs to the sequencers and configures all the settings required. Keep in mind that values set directly through the driver may be overridden (e.g. the offsets will be set according to the specified mixer calibration parameters).
- Parameters:
options – Program to upload to the sequencers. The key is a sequencer, e.g.,
"seq0"
, or"settings"
, the value is the global settings dict or a sequencer-specific configuration.
- class PulsarQRMComponent(instrument: qcodes.instrument.Instrument, **kwargs)[source]¶
Bases:
QRMComponent
A component for a baseband Pulsar QRM.
Create a new instance of QRMComponent.
- prepare(options: Dict[str, dict]) None [source]¶
Uploads the waveforms and programs to the sequencers and configures all the settings required. Keep in mind that values set directly through the driver may be overridden (e.g. the offsets will be set according to the specified mixer calibration parameters).
- Parameters:
options – Program to upload to the sequencers. The key is a sequencer, e.g.,
"seq0"
, or"settings"
, the value is the global settings dict or a sequencer-specific configuration.
- AcquisitionIndexing[source]¶
Named tuple to clarify how the indexing of acquisitions works inside the _QRMAcquisitionManager.
- class _QRMAcquisitionManager(parent: QRMComponent, number_of_sequencers: int, trace_acq_channel: Optional[int], acquisition_metadata: quantify_scheduler.schedules.schedule.AcquisitionMetadata)[source]¶
Utility class that handles the acquisitions performed with the QRM.
An instance of this class is meant to exist only for a single prepare-start- retrieve_acquisition cycle to prevent stateful behavior.
Constructor for _QRMAcquisitionManager.
- Parameters:
parent – Reference to the parent QRM IC component.
number_of_sequencers – The number of sequencers capable of acquisitions.
trace_acq_channel – The channel of the trace acquisition. If there is no trace acquisition, it is None.
acquisition_metadata – Provides a summary of the used channels bins and acquisition protocols.
- retrieve_acquisition() Optional[Dict[AcquisitionIndexing, Any]] [source]¶
Retrieves all the acquisition data in the correct format.
- Returns:
The acquisitions in a dict with keys (acq_channel, acq_index), as specified for each operation by the user.
- _get_scope_data(acquisitions: dict, acq_metadata: quantify_scheduler.schedules.schedule.AcquisitionMetadata, acq_duration: int, acq_channel: int = 0) Tuple[numpy.ndarray, numpy.ndarray] [source]¶
Retrieves the scope mode acquisition associated with an acq_channel.
- Parameters:
acquisitions – The acquisitions dict as returned by the sequencer.
acq_duration – The duration of the acquisition, used to truncate the data.
acq_channel – The acq_channel to get the scope mode acquisition for.
- Returns:
scope_data_i – The scope mode data for path0.
scope_data_q – The scope mode data for path1.
- _get_integration_data(acquisitions: dict, acq_metadata: quantify_scheduler.schedules.schedule.AcquisitionMetadata, acq_duration: int = constants.MAX_SAMPLE_SIZE_ACQUISITIONS, acq_channel: int = 0) Tuple[numpy.ndarray, numpy.ndarray] [source]¶
Retrieves the integrated acquisition data associated with an acq_channel.
- Parameters:
acquisitions – The acquisitions dict as returned by the sequencer.
acq_duration – Not used in this function.
acq_channel – The acq_channel from which to get the data.
- Returns:
i_data – The integrated data for path0.
q_data – The integrated data for path1.
- _get_integration_amplitude_data(acquisitions: dict, acq_metadata: quantify_scheduler.schedules.schedule.AcquisitionMetadata, acq_duration: int, acq_channel: int = 0) Tuple[numpy.ndarray, numpy.ndarray] [source]¶
Gets the integration data but normalized to the integration time (number of samples summed). The return value is thus the amplitude of the demodulated signal directly and has volt units (i.e. same units as a single sample of the integrated signal).
- Parameters:
acquisitions – The acquisitions dict as returned by the sequencer.
acq_duration – The duration of the acquisition, used to truncate the data.
acq_channel – The acq_channel from which to get the data.
- Returns:
data_i – Array containing I-quadrature data.
data_q – Array containing Q-quadrature data.
- _get_threshold_data(acquisitions: dict, acq_metadata: quantify_scheduler.schedules.schedule.AcquisitionMetadata, acq_duration: int, acq_channel: int = 0, acq_index: int = 0) float [source]¶
Retrieves the thresholded acquisition data associated with acq_channel and acq_index.
- Parameters:
acquisitions – The acquisitions dict as returned by the sequencer.
acq_channel – The acq_channel to get the thresholded acquisition data for.
acq_index – The acq_index to get the thresholded acquisition data for.
- Returns:
The value of the thresholded acquisition for acq_channel and acq_index. Should always be 0.0 <= val <= 1.0.
- _get_trigger_count_data(acquisitions: dict, acq_metadata: quantify_scheduler.schedules.schedule.AcquisitionMetadata, acq_duration: int, acq_channel: int = 0) tuple[list[int], list[int]] | list[int] [source]¶
Retrieves the trigger count acquisition data associated with acq_channel.
- Parameters:
acquisitions – The acquisitions dict as returned by the sequencer.
acq_channel – The acq_channel to get the thresholded acquisition data for.
- Returns:
For BinMode.AVERAGE
count – A list of integers indicating the amount of triggers counted
occurence – A list of integers with the occurence of each trigger count.
for BinMode.APPEND
count – A list of integers indicating the amount of triggers counted
occurence – A list of 1’s.
- class ClusterComponent(instrument: qblox_instruments.Cluster, **kwargs)[source]¶
Bases:
quantify_scheduler.instrument_coordinator.components.base.InstrumentCoordinatorComponentBase
Class that represents an instrument coordinator component for a Qblox cluster.
Create a new instance of the ClusterComponent. Automatically adds installed modules using name “<cluster_name>_module<slot>”.
- Parameters:
instrument – Reference to the cluster driver object.
**kwargs – Keyword arguments passed to the parent class.
- _configure_cmm_settings(settings: Dict[str, Any])[source]¶
Sets all the settings of the CMM (Cluster Management Module) that have been provided by the backend.
- Parameters:
settings – A dictionary containing all the settings to set.
- prepare(options: Dict[str, dict]) None [source]¶
Prepares the cluster component for execution of a schedule.
- Parameters:
options – The compiled instructions to configure the cluster to.