Modules API#
The Module class is responsible for adding the parameters to a single module of a Cluster using
add_qcodes_params() and Module
respectively. The resulting parameters are module type dependent and are described at the bottom of this page. Each module also
adds the parameters for 6 sequencers (8 sequencers for QTM), the parameters of which are described in Sequencer API.
- class Module(parent, name, slot_idx)[source]#
Bases:
InstrumentChannelThis class represents a QCM/QRM/QTM/QSM module. It combines all module specific parameters and functions into a single QCoDes InstrumentChannel.
- __init__(parent, name, slot_idx)[source]#
Creates a QCM/QRM/QTM/QSM module class and adds all relevant parameters for the module.
- print_readable_snapshot(update=False, max_chars=80)[source]#
Introduce additional spacing in the readable version of the snapshot.
- Return type:
- set_qsm_outputs_to_zero()[source]#
Resets the output for all channels to zero.
- Raises:
NotImplementedError – Functionality not available on this module.
- Return type:
- set_safe_voltage_range(min_voltage, max_voltage)[source]#
Set the safe voltage range for all the channels of the current module.
- snapshot_base(update=False, params_to_skip_update=None)[source]#
Override the module snapshot method to prevent it from sending unnecessary commands to poll its connected and present statuses if they’ve already present in the cache (likely because the cluster’s snapshot was requested). If the parameter is not present in the QCoDeS cache, then we bypass the respective getter function and instead use the more optimized methods on the parent cluster.
See
InstrumentBase.snapshot_base()for the function signature.
- property io_channels: list#
Get list of digital I/O channels.
- Returns:
list List of digital I/O channels.
- property io_pulse_channels: list#
Get list of digital I/O Pulse channels.
- Returns:
list List of digital I/O Pulse channels.
- property is_dummy: bool#
Return True if the parent instrument is configured as dummy.
- Returns:
bool Whether the parent is a dummy instrument.
- property is_eom_type: bool#
Return if module is of type EOM.
- Returns:
bool: True if module is of type EOM.
- Raises:
KeyError – Module is not available.
- property is_linq_type: bool#
Return if module is of type LINQ.
- Returns:
bool: True if module is of type LINQ.
- Raises:
KeyError – Module is not available.
- property is_qcm_type: bool#
Return if module is of type QCM.
- Returns:
bool True if module is of type QCM.
- Raises:
KeyError – Module is not available.
- property is_qdm_type: bool#
Return if module is of type QDM.
- Returns:
bool: True if module is of type QDM.
- Raises:
KeyError – Module is not available.
- property is_qrc_type: bool#
Return if module is of type QRC.
- Returns:
bool: True if module is of type QRC.
- Raises:
KeyError – Module is not available.
- property is_qrm_type: bool#
Return if module is of type QRM.
- Returns:
bool: True if module is of type QRM.
- Raises:
KeyError – Module is not available.
- property is_qsm_type: bool#
Return if module is of type QSM.
- Returns:
bool: True if module is of type QSM.
- Raises:
KeyError – Module is not available.
- property is_qtm_type: bool#
Return if module is of type QTM.
- Returns:
bool: True if module is of type QTM.
- Raises:
KeyError – Module is not available.
- property is_rf_type: bool#
Return if module is of type QCM-RF or QRM-RF.
- Returns:
bool: True if module is of type QCM-RF or QRM-RF.
- Raises:
KeyError – Module is not available.
- property module_type: InstrumentType#
Get module type (e.g. QRM, QCM).
- Returns:
InstrumentType Module type
- Raises:
KeyError – Module is not available.
- add_qcodes_params(parent, num_seq, num_dio, num_in_channels, num_out_channels, num_markers, num_sm)[source]#
Add all QCoDeS parameters for a single QCM/QRM module.
- Parameters:
parent (Union[Instrument, Module]) – Parent object to which the parameters need to be added.
num_seq (int) – Number of sequencers to add as submodules.
num_dio (int) – Number of DIO units. Applies to QTM.
num_in_channels (
int) – Number of input channels. Does not apply to QTM since its channels are in/out.num_out_channels (int) – Number of output channels. Does not apply to QTM since its channels are in/out.
num_markers (int) – Number of markers.
num_sm (int) – Number of QSM channels. Applies to QSM.
- Return type:
- invalidate_qcodes_parameter_cache(parent, sequencer=None, quad=None, io_channel=None, io_pulse_channel=None)[source]#
Marks the cache of all QCoDeS parameters in the module as invalid, including in any sequencer submodules the module might have. Optionally, a sequencer can be specified. This will invalidate the cache of that sequencer only instead of all parameters.
- Parameters:
parent (Union[Instrument, Module]) – The parent module object for which to invalidate the QCoDeS parameters.
sequencer (Optional[int]) – The sequencer index for which to invalidate the QCoDeS parameters.
quad (Optional[int]) – The quad index for which to invalidate the QCoDeS parameters.
io_channel (Optional[int]) – The IO channel index for which to invalidate the QCoDeS parameters.
io_pulse_channel (Optional[int]) – The IO pulse channel index for which to invalidate the QCoDeS parameters.
- Return type:
- get_item(parent, key)[source]#
Get submodule or parameter using string based lookup.
Note
On the following pages, QRM, QCM, QRM_RF, QCM_RF, QTM refer to instances of Module of the respective module type.