Cluster API#

The Cluster driver is separated into three layers:

  • QCoDeS driver: Instrument driver based on QCoDeS and the instrument’s native interface.

  • Native interface: Instrument API that provides control over the instrument and is an extension of the the SCPI interface.

  • SCPI interface: Instrument API based on the SCPI standard which in turn is based on IEEE488.2.

QCoDeS driver#

class Cluster(name, identifier=None, port=None, debug=None, dummy_cfg=None)[source]#

Bases: Cluster, Instrument

This class connects QCoDeS to the Cluster native interface.

__init__(name, identifier=None, port=None, debug=None, dummy_cfg=None)[source]#

Creates Cluster QCoDeS class and adds all relevant instrument parameters. These instrument parameters call the associated methods provided by the native interface.

Parameters:
  • name (str) – Instrument name.

  • identifier (Optional[str]) – Instrument identifier. See resolve(). If None, the instrument is identified by name.

  • port (Optional[int]) – Override for the TCP port through which we should connect.

  • debug (Optional[DebugLevel]) – Debug level. See DebugLevel for more information. By default None, which means that for a connection to a dummy cluster, DebugLevel.ERROR_CHECK will be used, and for a real cluster, DebugLevel.VERSION_CHECK.

  • dummy_cfg (Optional[dict]) – Configure as dummy using this configuration. For each slot that needs to be occupied by a module add the slot index as key and specify the type of module in the slot using the type ClusterType.

connect_sequencer(slot, sequencer, *connections)[source]#

Makes new connections between the indexed sequencer and some inputs and/or outputs. This will fail if a requested connection already existed, or if the connection could not be made due to a conflict with an existing connection (hardware constraints). In such a case, the channel map will not be affected.

Parameters:
  • slot (int) – Slot index

  • sequencer (int) – Sequencer index

  • *connections (str) – Zero or more connections to make, each specified using a string. The string should have the format <direction><channel> or <direction><I-channel>_<Q-channel>. <direction> must be in to make a connection between an input and the acquisition path, out to make a connection from the waveform generator to an output, or io to do both. The channels must be integer channel indices. If only one channel is specified, the sequencer operates in real mode; if two channels are specified, it operates in complex mode.

Raises:
  • RuntimeError – If the connection command could not be completed due to a conflict.

  • ValueError – If parsing of a connection fails.

Return type:

None

disconnect_inputs(slot)[source]#

Disconnects all inputs from the acquisition paths of the sequencers.

Parameters:

slot (int) – Slot index

Return type:

None

disconnect_outputs(slot)[source]#

Disconnects all outputs from the waveform generator paths of the sequencers.

Parameters:

slot (int) – Slot index

Return type:

None

get_connected_modules(filter_fn=None)[source]#

Get the currently connected modules for each occupied slot in the Cluster.

A selection of modules can be made by passing a filter function. For example:

cluster.get_connected_modules(
    filter_fn = lambda mod: mod.is_qrm_type and not mod.is_rf_type
)
Parameters:

filter_fn (Optional[Callable[[Module], bool]] (default: None)) – Optional filter function that must return True for the modules that should be included in the return value, and False otherwise.

Return type:

dict[int, Module]

Returns:

dict Dictionary with key-value pairs consisting of slot numbers and corresponding Module objects. Only contains entries for modules that are present and match the filter_fn.

reset()[source]#

Resets device, invalidates QCoDeS parameter cache and clears all status and event registers (see SCPI).

Return type:

None

snapshot_base(update=False, params_to_skip_update=None)[source]#

Override the cluster snapshot method to prevent it from sending unnecessary commands to each module when polling its connected and present statuses. We do this by first fetching all the slot numbers with a module connected/present, then manually setting their QCoDeS parameter cache so their respective getter function (which sends a SCPI command) will not be invoked.

See InstrumentBase.snapshot_base() for the function signature.

Return type:

dict[Any, Any]

toggle_all_lo(enable)[source]#

Turn ON or OFF all local oscillators present on all modules .

Parameters:

enable (bool) – Turn ON if True, OFF if False.

Return type:

None

property modules: list#

Get list of modules.

Returns:

list List of modules.

property times: list#

Get list of time blocks.

Returns:

list List of digital time modules. There is only one, but we still need to be able to iterate through it as if it was a list to not break pytest.

QCoDeS instrument parameters#

QCoDeS parameters generated by Cluster.

Cluster.IDN()#

Please see QCoDeS for a description.

Properties:
  • value: <Anything>

Cluster.led_brightness()#

Sets/gets frontpanel LED brightness.

Properties:
  • value: <Enum: {‘off’, ‘low’, ‘medium’, ‘high’}>

Cluster.reference_source()#

Sets/gets reference source (‘internal’ = internal 10 MHz, ‘external’ = external 10 MHz).

Properties:
  • value: <Enum: {‘internal’, ‘external’}>

Cluster.ext_trigger_input_delay()#

Sets/gets the delay of the external input trigger in picoseconds.

Properties:
  • unit: ps

  • value: <Ints 0<=v<=1209, Multiples of 39>

Cluster.ext_trigger_input_trigger_en()#

Enable/disable the external input trigger.

Properties:
  • value: <Boolean>

Cluster.ext_trigger_input_trigger_address()#

Sets/gets the external input trigger address to which the input trigger is mapped to the trigger network (T1 to T15).

Properties:
  • value: <Numbers 1<=v<=15>

Cluster.trigger1_monitor_count()#

Gets the trigger monitor count from trigger address T1.

Properties:
  • value: None

Cluster.trigger2_monitor_count()#

Gets the trigger monitor count from trigger address T2.

Properties:
  • value: None

Cluster.trigger3_monitor_count()#

Gets the trigger monitor count from trigger address T3.

Properties:
  • value: None

Cluster.trigger4_monitor_count()#

Gets the trigger monitor count from trigger address T4.

Properties:
  • value: None

Cluster.trigger5_monitor_count()#

Gets the trigger monitor count from trigger address T5.

Properties:
  • value: None

Cluster.trigger6_monitor_count()#

Gets the trigger monitor count from trigger address T6.

Properties:
  • value: None

Cluster.trigger7_monitor_count()#

Gets the trigger monitor count from trigger address T7.

Properties:
  • value: None

Cluster.trigger8_monitor_count()#

Gets the trigger monitor count from trigger address T8.

Properties:
  • value: None

Cluster.trigger9_monitor_count()#

Gets the trigger monitor count from trigger address T9.

Properties:
  • value: None

Cluster.trigger10_monitor_count()#

Gets the trigger monitor count from trigger address T10.

Properties:
  • value: None

Cluster.trigger11_monitor_count()#

Gets the trigger monitor count from trigger address T11.

Properties:
  • value: None

Cluster.trigger12_monitor_count()#

Gets the trigger monitor count from trigger address T12.

Properties:
  • value: None

Cluster.trigger13_monitor_count()#

Gets the trigger monitor count from trigger address T13.

Properties:
  • value: None

Cluster.trigger14_monitor_count()#

Gets the trigger monitor count from trigger address T14.

Properties:
  • value: None

Cluster.trigger15_monitor_count()#

Gets the trigger monitor count from trigger address T15.

Properties:
  • value: None

Cluster.trigger_monitor_latest()#

Gets the trigger address which was triggered last (T1 to T15).

Properties:
  • value: None

Cluster.arm_sequencer(slot: int | None = None, sequencer: int | None = None) None#

Prepare the indexed sequencer to start by putting it in the armed state. If no sequencer index is given, all sequencers are armed. Any sequencer that was already running is stopped and rearmed. If an invalid sequencer index is given, an error is set in system error.

Parameters:
  • slot (Optional[int]) – The slot index of the module being referred to.

  • sequencer (Optional[int]) – Sequencer index.

Raises:

RuntimeError – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.check_error_queue(err: Exception | None = None) None#

Check system error for errors. Empties and prints the complete error queue.

Parameters:

err (Optional[Exception]) – Exception to reraise.

Raises:
  • Exception – An exception was passed as input argument.

  • RuntimeError – An error was found in system error.

Cluster.clear() None#

Clear all status and event registers (see SCPI).

Parameters:

None

Return type:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.clear_sequencer_flags(slot: int | None = None, sequencer: int | None = None) None#

Clear flags.

Parameters:
  • slot (Optional[int]) – The slot index of the module being referred to.

  • sequencer (int) – Sequencer index.

Cluster.connect_sequencer(slot: int, sequencer: int, *connections: str) None#

Makes new connections between the indexed sequencer and some inputs and/or outputs. This will fail if a requested connection already existed, or if the connection could not be made due to a conflict with an existing connection (hardware constraints). In such a case, the channel map will not be affected.

Parameters:
  • slot (int) – Slot index

  • sequencer (int) – Sequencer index

  • *connections (str) – Zero or more connections to make, each specified using a string. The string should have the format <direction><channel> or <direction><I-channel>_<Q-channel>. <direction> must be in to make a connection between an input and the acquisition path, out to make a connection from the waveform generator to an output, or io to do both. The channels must be integer channel indices. If only one channel is specified, the sequencer operates in real mode; if two channels are specified, it operates in complex mode.

Raises:
  • RuntimeError – If the connection command could not be completed due to a conflict.

  • ValueError – If parsing of a connection fails.

Cluster.delete_acquisition_data(slot: int, sequencer: int, name: str = '', all: bool = False) None#

Delete data from an acquisition specified by name in the acquisition list of indexed sequencer or delete data in all acquisitions if all is True.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • sequencer (int) – Sequencer index.

  • name (str) – Weight name

  • all (bool) – All acquisition data

Raises:

NotImplementedError – Functionality not available on this module.

Cluster.delete_dummy_binned_acquisition_data(slot_idx: int, sequencer: int | None = None, acq_index_name: str | None = None) None#

Delete all dummy binned acquisition data for the dummy.

Parameters:
  • slot_idx (int) – Slot of the hardware you want to set the data to on a cluster.

  • sequencer (Optional[int]) – Sequencer.

  • acq_index_name (Optional[str]) – Acquisition index name.

Cluster.delete_dummy_scope_acquisition_data(slot_idx: int, sequencer: int | None) None#

Delete dummy scope acquisition data for the dummy.

Parameters:
  • slot_idx (int) – Slot of the hardware you want to set the data to on a cluster.

  • sequencer (Union[int, None]) – Sequencer.

Cluster.disconnect_inputs(slot: int) None#

Disconnects all inputs from the acquisition paths of the sequencers.

Parameters:

slot (int) – Slot index

Cluster.disconnect_outputs(slot: int) None#

Disconnects all outputs from the waveform generator paths of the sequencers.

Parameters:

slot (int) – Slot index

Cluster.get_acquisition_status(slot: int, sequencer: int, timeout: int = 0, timeout_poll_res: float = 0.02, check_seq_state: bool = True) bool#

Return acquisition binning completion status of the indexed sequencer. If an invalid sequencer is given, an error is set in system error. If the timeout is set to zero, the function returns the status immediately. If a positive non-zero timeout is set, the function blocks until the acquisition binning completes. If the acquisition hasn’t completed before the timeout expires, a TimeoutError is thrown. Note that when sequencer state checking is enabled, the sequencer state is checked using get_sequencer_status with the selected timeout period first and then the acquisition status is checked with the same timeout period. This means that the total timeout period is two times the set timeout period.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • sequencer (int) – Sequencer index.

  • timeout (int) – Timeout in minutes.

  • timeout_poll_res (float) – Timeout polling resolution in seconds.

  • check_seq_state (bool) – Check if sequencer is done before checking acquisition status.

Returns:

Indicates the acquisition binning completion status (False = uncompleted, True = completed).

Return type:

bool

Raises:
Cluster.get_acquisitions(slot: int, sequencer: int, *, as_numpy: bool = False) dict#

Get all acquisitions in acquisition lists of indexed sequencer. The acquisition scope and bin data is normalized to a range of -1.0 to 1.0 taking both the bit widths of the processing path and average count into consideration. For the binned integration results, the integration length is not handled during normalization and therefore these values have to be divided by their respective integration lengths. The returned dictionary is structured as follows:

  • name: acquisition name

    • index: acquisition index used by the sequencer Q1ASM program to refer

      to the acquisition.

    • acquisition: acquisition dictionary

      • scope: Scope data

        • path0: input path 0

          • data: acquisition samples in a range of 1.0 to -1.0.

          • out-of-range: out-of-range indication for the entire acquisition (False = in-range, True = out-of-range).

          • avg_cnt: number of averages.

        • path1: input path 1

          • data: acquisition samples in a range of 1.0 to -1.0.

          • out-of-range: out-of-range indication for the entire acquisition (False = in-range, True = out-of-range).

          • avg_cnt: number of averages.

      • bins: bin data

        • integration: integration data

          • path_0: input path 0 integration result bin list

          • path_1: input path 1 integration result bin list

        • threshold: threshold result bin list

        • valid: list of valid indications per bin

        • avg_cnt: list of number of averages per bin

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • sequencer (int) – Sequencer index.

  • as_numpy (bool) – Whether to return path, threshold and avg_cnt data as NumPy arrays instead of Python lists.

Returns:

Dictionary with acquisitions.

Return type:

dict

Raises:

NotImplementedError – Functionality not available on this module.

Cluster.get_assembler_log(slot: int) str#

Get assembler log.

Parameters:

slot (int) – slot index.

Returns:

Assembler log.

Return type:

str

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_assembler_status(slot: int) bool#

Get assembler status. Refer to the assembler log to get more information regarding the assembler result.

Parameters:

slot (int) – slot index.

Returns:

Assembler status (False = failed, True = success).

Return type:

bool

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_connected_modules(filter_fn: Callable[[qblox_instruments.qcodes_drivers.module.Module], bool] | None = None) dict[int, qblox_instruments.qcodes_drivers.module.Module]#

Get the currently connected modules for each occupied slot in the Cluster.

A selection of modules can be made by passing a filter function. For example:

cluster.get_connected_modules(
    filter_fn = lambda mod: mod.is_qrm_type and not mod.is_rf_type
)
Parameters:

filter_fn – Optional filter function that must return True for the modules that should be included in the return value, and False otherwise.

Returns:

Dictionary with key-value pairs consisting of slot numbers and corresponding Module objects. Only contains entries for modules that are present and match the filter_fn.

Return type:

dict

Cluster.get_current_afe_high_temperature(slot: int) float#

Get current QRC AFE board board temperature (inside device).

Parameters:

slot (int) – slot index.

Returns:

Current QRC AFE board board temperature.

Return type:

float

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_current_afe_low_temperature(slot: int) float#

Get current QRC AFE low board temperature (inside device).

Parameters:

slot (int) – slot index.

Returns:

Current QRC AFE low board temperature.

Return type:

float

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_current_afe_temperature(slot: int) float#

Get current AFE temperature.

Parameters:

slot (int) – slot index.

Returns:

current

Return type:

float

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_current_bp_temperature_0() float#

Get current backplane board temperature from sensor 0 (inside device).

Parameters:

None

Returns:

Current backplane board temperature from sensor 0.

Return type:

float

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_current_bp_temperature_1() float#

Get current backplane board temperature from sensor 1 (inside device).

Parameters:

None

Returns:

Current backplane board temperature from sensor 1.

Return type:

float

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_current_bp_temperature_2() float#

Get current backplane board temperature from sensor 2 (inside device).

Parameters:

None

Returns:

Current backplane board temperature from sensor 2.

Return type:

float

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_current_carrier_temperature(slot: int) float#

Get current carrier board temperature (inside device).

Parameters:

slot (int) – slot index.

Returns:

Current carrier board temperature.

Return type:

float

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_current_eom_temperature(slot: int) float#

Get current EOM temperature.

Parameters:

slot (int) – slot index.

Returns:

current

Return type:

float

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_current_fpga_temperature(slot: int) float#

Get current FPGA junction temperature (inside device).

Parameters:

slot (int) – slot index.

Returns:

Current FPGA junction temperature.

Return type:

float

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_current_lo_temperature(slot: int) float#

Get current LO temperature.

Parameters:

slot (int) – slot index.

Returns:

current

Return type:

float

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_hardware_revisions() Any#

Get a table with the different hardware revisions of the current module

Parameters:

None

Returns:

The module’s hardware revision table

Return type:

Any

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_io_pulse_width_config_val(slot: int, channel: int, keys: Any) Any#

Get value of specific IO channel configuration parameter.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • channel (int) – I/O channel index.

  • keys (Union[List[str], str]) – Configuration key to access, or hierarchical list thereof

Returns:

Parameter value.

Return type:

Any

Cluster.get_ip_config() str#

Returns the IP address configuration that will go into effect when the device reboots.

Parameters:

None

Returns:

IP configuration. Can be one of the following things:
  • an IPv4 address including prefix length, for example 192.168.0.2/24, - the string dhcp to enable IPv4 DHCP, - an IPv6 address including prefix length, for example 1:2::3:4/64, or - a semicolon-separated combination of an IPv4 configuration (IP address or dhcp) and an IPv6 address.

Return type:

str

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_json_description() Any#

Returns a JSON description of the instrument and all its managed modules.

Parameters:

None

Returns:

Instrument description structure.

Return type:

Any

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_maximum_afe_high_temperature(slot: int) float#

Get maximum QRC AFE board board temperature since boot or clear (inside device).

Parameters:

slot (int) – slot index.

Returns:

Maximum QRC AFE board board temperature.

Return type:

float

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_maximum_afe_low_temperature(slot: int) float#

Get maximum QRC AFE low board temperature since boot or clear (inside device).

Parameters:

slot (int) – slot index.

Returns:

Maximum QRC AFE low board temperature.

Return type:

float

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_maximum_afe_temperature(slot: int) float#

Get maximum AFE temperature.

Parameters:

slot (int) – slot index.

Returns:

maximum

Return type:

float

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_maximum_bp_temperature_0() float#

Get maximum backplane board temperature from sensor 0 since boot or clear (inside device).

Parameters:

None

Returns:

Maximum backplane board temperature from sensor 0.

Return type:

float

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_maximum_bp_temperature_1() float#

Get maximum backplane board temperature from sensor 1 since boot or clear (inside device).

Parameters:

None

Returns:

Maximum backplane board temperature from sensor 1.

Return type:

float

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_maximum_bp_temperature_2() float#

Get maximum backplane board temperature from sensor 2 since boot or clear (inside device).

Parameters:

None

Returns:

Maximum backplane board temperature from sensor 2.

Return type:

float

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_maximum_carrier_temperature(slot: int) float#

Get maximum carrier board temperature since boot or clear (inside device).

Parameters:

slot (int) – slot index.

Returns:

Maximum carrier board temperature.

Return type:

float

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_maximum_eom_temperature(slot: int) float#

Get maximum EOM temperature.

Parameters:

slot (int) – slot index.

Returns:

maximum

Return type:

float

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_maximum_fpga_temperature(slot: int) float#

Get maximum FPGA junction temperature since boot or clear (inside device).

Parameters:

slot (int) – slot index.

Returns:

Maximum FPGA junction temperature.

Return type:

float

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_maximum_lo_temperature(slot: int) float#

Get maximum LO temperature.

Parameters:

slot (int) – slot index.

Returns:

maximum

Return type:

float

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_name() str#

Returns the customer-specified name of the instrument.

Parameters:

None

Returns:

The name of the device.

Return type:

str

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_num_system_error() int#

Get number of system errors (see SCPI).

Parameters:

None

Returns:

Current number of system errors.

Return type:

int

Cluster.get_operation_complete() bool#

Get operation complete state (see SCPI).

Parameters:

None

Returns:

Operation complete state (False = running, True = completed).

Return type:

bool

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_operation_condition() int#

Get status operation condition register (see SCPI).

Parameters:

None

Returns:

Status operation condition register.

Return type:

int

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_operation_enable() int#

Get status operation enable register (see SCPI).

Parameters:

None

Returns:

Status operation enable register.

Return type:

int

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_operation_events() int#

Get status operation event register (see SCPI).

Parameters:

None

Returns:

Status operation event register.

Return type:

int

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_questionable_condition() int#

Get status questionable condition register (see SCPI).

Parameters:

None

Returns:

Status questionable condition register.

Return type:

int

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_questionable_enable() int#

Get status questionable enable register (see SCPI).

Parameters:

None

Returns:

Status questionable enable register.

Return type:

int

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_questionable_event() int#

Get status questionable event register (see SCPI).

Parameters:

None

Returns:

Status questionable event register.

Return type:

int

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_scope_data(slot: int, io_channel: int) Any#

Returns the QTM I/O channel scope data for the given slot and channel acquired since the previous call.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • io_channel (int) – I/O channel you want to get the data for.

Returns:

The acquired data. Empty if no data acquired since last call.

Return type:

Any

Raises:

NotImplementedError – Functionality not available on this module.

Cluster.get_sequencer_status(slot: int, sequencer: int, timeout: int = 0, timeout_poll_res: float = 0.02) qblox_instruments.native.definitions.SequencerStatus#

Get the sequencer status. If an invalid sequencer index is given, an error is set in system error. If the timeout is set to zero, the function returns the state immediately. If a positive non-zero timeout is set, the function blocks until the sequencer completes. If the sequencer hasn’t stopped before the timeout expires, a TimeoutError is thrown.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • sequencer (int) – Sequencer index.

  • timeout (int) – Timeout in minutes.

  • timeout_poll_res (float) – Timeout polling resolution in seconds.

Returns:

Tuple containing sequencer status and corresponding flags.

Return type:

SequencerStatus

Raises:

TimeoutError – Timeout

Cluster.get_service_request_enable() int#

Get service request enable register. The register is cleared after reading it (see SCPI).

Parameters:

None

Returns:

Service request enable register.

Return type:

int

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_standard_event_status() int#

Get standard event status register. The register is cleared after reading it (see SCPI).

Parameters:

None

Returns:

Standard event status register.

Return type:

int

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_standard_event_status_enable() int#

Get standard event status enable register. The register is cleared after reading it (see SCPI).

Parameters:

None

Returns:

Standard event status enable register.

Return type:

int

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_status_byte() int#

Get status byte register. Register is only cleared when feeding registers are cleared (see SCPI).

Parameters:

None

Returns:

Status byte register.

Return type:

int

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_system_error() str#

Get system error from queue (see SCPI).

Parameters:

None

Returns:

System error description string.

Return type:

str

Cluster.get_system_status() qblox_instruments.native.definitions.SystemStatus#

Get general system status and convert it to a SystemStatus.

Returns:

Tuple containing general system status and corresponding flags.

Return type:

SystemStatus

Cluster.get_system_version() str#

Get SCPI system version (see SCPI).

Parameters:

None

Returns:

SCPI system version.

Return type:

str

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_trg_in_delay() int#

Get external trigger input delay

Parameters:

None

Returns:

Current status of the external trigger input delay (ps), in steps of 39 ps.

Return type:

int

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_trg_in_map_addr() int#

Get external trigger input map address

Parameters:

None

Returns:

Current status of the external trigger input map address

Return type:

int

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_trg_in_map_en() bool#

Get external trigger input map enable

Parameters:

None

Returns:

Current status of the external trigger input map enable

Return type:

bool

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_trigger_monitor_count(address: int) int#

Get trigger monitor count

Parameters:

address (int) – Address of the trigger

Returns:

Current status of trigger monitor counter

Return type:

int

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_trigger_monitor_latest() int#

Get trigger monitor latest value

Parameters:

None

Returns:

Latest value from the trigger monitor counter

Return type:

int

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.get_waveforms(slot: int, sequencer: int, *, as_numpy: bool = False) dict#

Get all waveforms in the AWG waveform list of indexed sequencer. The returned dictionary is structured as follows:

  • name: waveform name.

    • data: waveform samples in a range of 1.0 to -1.0.

    • index: waveform index used by the sequencer Q1ASM program to refer

      to the waveform.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • sequencer (int) – Sequencer index.

  • as_numpy (bool) – Whether to return data as NumPy arrays instead of Python lists.

Returns:

Dictionary with waveforms.

Return type:

dict

Cluster.get_weights(slot: int, sequencer: int, *, as_numpy: bool = False) dict#

Get all weights in the acquisition weight lists of indexed sequencer. The returned dictionary is structured as follows:

-name : weight name.

  • data: weight samples in a range of 1.0 to -1.0.

  • index: weight index used by the sequencer Q1ASM program to refer

    to the weight.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • sequencer (int) – Sequencer index.

  • as_numpy (bool) – Whether to return data as NumPy arrays instead of Python lists.

Returns:

Dictionary with weights.

Return type:

dict

Raises:

NotImplementedError – Functionality not available on this module.

Cluster.identify() None#

Toggle frontpanel LEDs to visually identify the instrument.

Parameters:

None

Return type:

None

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.powerup_module(slot: int) None#

Powers up the instrument in the given slot.

Parameters:

slot (int) – slot index.

Return type:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.powerup_modules(slots: Any) None#

Powers up the instrument in the given slots.

Parameters:

slots (Any) – Slot numbers of modules to reboot.

Return type:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.preset_system_status() None#

Preset system status registers. Connects general system status flags for PLL unlock and temperature out-of-range indications to event status enable, status questionable temperature and status questionable frequency registers respectively (see SCPI).

Parameters:

None

Return type:

None

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.reboot() None#

Reboots the instrument.

Parameters:

None

Return type:

None

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.reboot_module(slot: int) None#

Reboots the instrument in the given slot. If slot 0 (CMM) is given, the whole cluster reboots

Parameters:

slot (int) – slot index.

Return type:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.reboot_modules(slots: Any) None#

Reboots the instruments in the given slots. If slot 0 (CMM) is included, the whole cluster reboots

Parameters:

slots (Any) – Slot numbers of modules to reboot.

Return type:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.reset() None#

Resets device, invalidates QCoDeS parameter cache and clears all status and event registers (see SCPI).

Cluster.reset_trigger_monitor_count(address: int) None#

Reset external trigger monitor counter

Parameters:

address (int) – Address of the trigger which count has to be reset

Return type:

None

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.scope_trigger_arm(slot: int) None#

Arms the external scope trigger logic on a QTM, such that it will send a trigger to scope acquisition blocks in the I/O channels when the trigger condition is satisfied.

Parameters:

slot (int) – The slot index of the module being referred to.

Raises:

NotImplementedError – Functionality not available on this module.

Cluster.scpi_transaction(slot: int, sequencer: int) collections.abc.Generator[tuple[qblox_instruments.native.helpers.Ieee488_2Connection, str], None, None]#

Initiate a “transaction” based on a slot/sequencer combination, establishing an ad-hoc connection to be reused within the context manager so that all read/write operations will be performed within that same connection.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • sequencer (int) – Sequencer index.

Yields:

tuple[Ieee488_2Connection, str] – A tuple containing the connection object for the slot/sequencer combination and a prefix for the SCPI commands that should be sent.

Cluster.set_dummy_binned_acquisition_data(slot_idx: int, sequencer: int, acq_index_name: str, data: collections.abc.Iterable[Optional[qblox_instruments.ieee488_2.dummy_transport.DummyBinnedAcquisitionData]]) None#

Set dummy binned acquisition data for the dummy.

Parameters:
  • slot_idx (int) – Slot of the hardware you want to set the data to on a cluster.

  • sequencer (int) – Sequencer.

  • acq_index_name (str) – Acquisition index name.

  • data (Iterable[Union[DummyBinnedAcquisitionData, None]]) – Dummy data for the binned acquisition. An iterable of all the bin values.

Cluster.set_dummy_scope_acquisition_data(slot_idx: int, sequencer: int | None, data: qblox_instruments.ieee488_2.dummy_transport.DummyScopeAcquisitionData) None#

Set dummy scope acquisition data for the dummy.

Parameters:
  • slot_idx (int) – Slot of the hardware you want to set the data to on a cluster.

  • sequencer (Union[int, None]) – Sequencer.

  • data (DummyScopeAcquisitionData) – Dummy data for the scope acquisition.

Cluster.set_io_pulse_width_config_val(slot: int, channel: int, keys: Any, val: Any) None#

Set value of specific IO channel configuration parameter.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • channel (int) – I/O channel index.

  • keys (Union[List[str], str]) – Configuration key to access, or hierarchical list thereof.

  • val (Any) – Value to set parameter to.

Cluster.set_ip_config(config: str) None#

Reconfigures the IP address of this device. The configuration will not go into effect until reboot() is called or the device is power-cycled.

Parameters:

config (str) –

IP configuration. May be one of the following things:
  • an IPv4 address including prefix length, for example 192.168.0.2/24, - the string dhcp to enable IPv4 DHCP, - an IPv6 address including prefix length, for example 1:2::3:4/64, or - a semicolon-separated combination of an IPv4 configuration (IP address or dhcp) and an IPv6 address.

Return type:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.set_name(name: str) None#

Sets the customer-specified name of the instrument. The name must not contain any newlines, backslashes, or double quotes.

Parameters:

name (str) – The new name for the device.

Return type:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.set_operation_complete() None#

Set device in operation complete query active state (see SCPI).

Parameters:

None

Return type:

None

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.set_operation_enable(reg: int) None#

Set status operation enable register (see SCPI).

Parameters:

reg (int) – Status operation enable register.

Return type:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.set_qsm_outputs_to_zero(slot: int) None#

Resets the output for all channels to zero.

Parameters:

slot (int) – slot index.

Return type:

None

Raises:

Exception – Invalid input parameter type.

Cluster.set_questionable_enable(reg: int) None#

Set status questionable enable register (see SCPI).

Parameters:

reg (int) – Status questionable enable register.

Return type:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.set_safe_voltage_range(min_voltage: float, max_voltage: float) None#

Set the safe voltage range for all the channels of all the QSM modules on the entire cluster.

Parameters:
  • min_voltage (float) – The desired minimum voltage in volts.

  • max_voltage (float) – The desired maximum voltage in volts.

Cluster.set_service_request_enable(reg: int) None#

Set service request enable register (see SCPI).

Parameters:

reg (int) – Service request enable register.

Return type:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.set_standard_event_status_enable(reg: int) None#

Set standard event status enable register (see SCPI).

Parameters:

reg (int) – Standard event status enable register.

Return type:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.set_trg_in_delay(trg_in_delay: int) None#

Set external trigger input delay

Parameters:

trg_in_delay (int) – External trigger input delay (ps), in steps of 39 ps.

Return type:

None

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.set_trg_in_map_addr(trg_in_map_addr: int) None#

Set external trigger input map enable

Parameters:

trg_in_map_addr (int) – External trigger input map address

Return type:

None

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.set_trg_in_map_en(trg_in_map_en: bool) None#

Set external trigger input map enable

Parameters:

trg_in_map_en (bool) – External trigger input map enable

Return type:

None

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.shutdown_module(slot: int) None#

Shutdown specific connected module

Parameters:

slot (int) – slot index.

Return type:

None

Raises:
  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

  • Exception – Invalid input parameter type.

Cluster.shutdown_modules(slots: Any) None#

Shutdown modules in the given slots

Parameters:

slots (Any) – Slot numbers of modules to shutdown.

Return type:

None

Raises:
  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

  • Exception – Invalid input parameter type.

Cluster.start_adc_calib(slot: int) None#

Calibrates ADC delay and offset values. This method sets the correct delay values for every input data index (IO data lane) in order to avoid timing violations which occur while sampling ADC data. It also calibrates offsets internal to the ADC.

Parameters:

slot (int) – slot index.

Return type:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.start_sequencer(slot: int | None = None, sequencer: int | None = None) None#

Start the indexed sequencer, thereby putting it in the running state. If an invalid sequencer index is given or the indexed sequencer was not yet armed, an error is set in system error. If no sequencer index is given, all armed sequencers are started and any sequencer not in the armed state is ignored. However, if no sequencer index is given and no sequencers are armed, and error is set in system error.

Parameters:
  • slot (Optional[int]) – The slot index of the module being referred to.

  • sequencer (Optional[int]) – Sequencer index.

Raises:

RuntimeError – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.stop_sequencer(slot: int | None = None, sequencer: int | None = None) None#

Stop the indexed sequencer, thereby putting it in the stopped state. If an invalid sequencer index is given, an error is set in system error. If no sequencer index is given, all sequencers are stopped.

Parameters:
  • slot (Optional[int]) – The slot index of the module being referred to.

  • sequencer (Optional[int]) – Sequencer index.

Raises:

RuntimeError – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.store_scope_acquisition(slot: int, sequencer: int, name: str) None#

After an acquisition has completed, store the scope acquisition results in the acquisition specified by name of the indexed sequencers. If an invalid sequencer index is given an error is set in system error. To get access to the acquisition results, the sequencer will be stopped when calling this function.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • sequencer (int) – Sequencer index.

  • name (str) – Acquisition name.

Raises:

NotImplementedError – Functionality not available on this module.

Cluster.test() bool#

Run self-test. Currently not implemented (see SCPI).

Parameters:

None

Returns:

Test result (False = failed, True = success).

Return type:

bool

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Cluster.toggle_all_lo(enable: bool) None#

Turn ON or OFF all local oscillators present on all modules .

Parameters:

enable (bool) – Turn ON if True, OFF if False.

Cluster.update_sequence(slot: int, sequencer: int, erase_existing: bool = False, **sequence_args: typing_extensions.Unpack[qblox_instruments.types.Sequence]) None#

Update sequencer program, AWG waveforms, acquisition weights and/or acquisitions from a series of keyword arguments. By default, the update is cumulative i.e. existing waveforms/weights/acquisitions are kept on the sequencer and new ones are added (as long as indexes or names aren’t reused).

For example:

sequencer.update_sequence(
    waveforms={"wave0": {"index": 0, "data": [0.0, 0.1, 0.2, 0.3]}},
    weights={"weight0": {"index": 0, "data": [0.0, 0.1, 0.2, 0.3]}},
    erase_existing=False
)

will add one waveform and one weight to the sequencer, without either removing currently uploaded waveforms and weights, or clearing program or acquisitions.

If the erase_existing parameter is passed, then the update is destructive i.e. existing program/waveforms/weights/acquisitions will be completely overwritten with the new ones.

For example:

 sequencer.update_sequence(
     program="play 0,0,100\nstop",
     acquisitions={"acq0": {"index": 0, "num_bins": 1}},
     erase_existing=True
)

will completely replace the program and the acquisitions on the sequencer, but will not touch currently uploaded waveforms and weights.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • sequencer (int) – Sequencer index.

  • erase_existing (bool) – Whether existing waveforms/weights/acquisitions should be erased before adding new ones.

  • **sequence_args (Unpack[Sequence]) – Sequence dictionary in keyword arguments format.

Raises:

JsonSchemaValueException – Invalid JSON object.

Cluster.wait() None#

Wait until operations completed before continuing (see SCPI).

Parameters:

None

Return type:

None

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

QCoDeS module parameters#

Besides instrument parameters, the Cluster also has parameters for each module in the Cluster which are described in Modules API.

QCoDeS time parameters#

The Cluster contains a QCoDeS submodule to control timekeeping in the cluster modules. Its API can be found in Time API.

Native interface#

class Cluster(identifier, port=None, debug=None, dummy_cfg=None)[source]#

Bases: Cluster

Class that provides the native API for the Cluster. It provides methods to control all functions and features provided by the Cluster.

__init__(identifier, port=None, debug=None, dummy_cfg=None)[source]#

Creates Cluster native interface object.

Parameters:
  • identifier (str) – Instrument identifier. See resolve() for more information.

  • port (Optional[int]) – Instrument port. If None, this will be determined automatically.

  • debug (Optional[DebugLevel]) – Debug level. See DebugLevel for more information. By default None, which means that for a connection to a dummy cluster, DebugLevel.ERROR_CHECK will be used, and for a real cluster, DebugLevel.MINIMAL_CHECK.

  • dummy_cfg (Optional[dict]) – Configure as dummy using this configuration. For each slot that needs to be occupied by a module add the slot index as key and specify the type of module in the slot using the type ClusterType.

Raises:
arm_sequencer(slot=None, sequencer=None)[source]#

Prepare the indexed sequencer to start by putting it in the armed state. If no sequencer index is given, all sequencers are armed. Any sequencer that was already running is stopped and rearmed. If an invalid sequencer index is given, an error is set in system error.

Parameters:
  • slot (Optional[int]) – The slot index of the module being referred to.

  • sequencer (Optional[int]) – Sequencer index.

Raises:

RuntimeError – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Return type:

None

clear_sequencer_flags(slot=None, sequencer=None)[source]#

Clear flags.

Parameters:
  • slot (Optional[int]) – The slot index of the module being referred to.

  • sequencer (int) – Sequencer index.

Return type:

None

delete_acquisition_data(slot, sequencer, name='', all=False)[source]#

Delete data from an acquisition specified by name in the acquisition list of indexed sequencer or delete data in all acquisitions if all is True.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • sequencer (int) – Sequencer index.

  • name (str) – Weight name

  • all (bool) – All acquisition data

Raises:

NotImplementedError – Functionality not available on this module.

Return type:

None

delete_dummy_binned_acquisition_data(slot_idx, sequencer=None, acq_index_name=None)[source]#

Delete all dummy binned acquisition data for the dummy.

Parameters:
  • slot_idx (int) – Slot of the hardware you want to set the data to on a cluster.

  • sequencer (Optional[int]) – Sequencer.

  • acq_index_name (Optional[str]) – Acquisition index name.

Return type:

None

delete_dummy_scope_acquisition_data(slot_idx, sequencer)[source]#

Delete dummy scope acquisition data for the dummy.

Parameters:
  • slot_idx (int) – Slot of the hardware you want to set the data to on a cluster.

  • sequencer (Union[int, None]) – Sequencer.

Return type:

None

get_acquisition_status(slot, sequencer, timeout=0, timeout_poll_res=0.02, check_seq_state=True)[source]#

Return acquisition binning completion status of the indexed sequencer. If an invalid sequencer is given, an error is set in system error. If the timeout is set to zero, the function returns the status immediately. If a positive non-zero timeout is set, the function blocks until the acquisition binning completes. If the acquisition hasn’t completed before the timeout expires, a TimeoutError is thrown. Note that when sequencer state checking is enabled, the sequencer state is checked using get_sequencer_status with the selected timeout period first and then the acquisition status is checked with the same timeout period. This means that the total timeout period is two times the set timeout period.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • sequencer (int) – Sequencer index.

  • timeout (int) – Timeout in minutes.

  • timeout_poll_res (float) – Timeout polling resolution in seconds.

  • check_seq_state (bool) – Check if sequencer is done before checking acquisition status.

Return type:

bool

Returns:

bool Indicates the acquisition binning completion status (False = uncompleted, True = completed).

Raises:
get_acquisitions(slot, sequencer, *, as_numpy=False)[source]#

Get all acquisitions in acquisition lists of indexed sequencer. The acquisition scope and bin data is normalized to a range of -1.0 to 1.0 taking both the bit widths of the processing path and average count into consideration. For the binned integration results, the integration length is not handled during normalization and therefore these values have to be divided by their respective integration lengths. The returned dictionary is structured as follows:

  • name: acquisition name

    • index: acquisition index used by the sequencer Q1ASM program to refer

      to the acquisition.

    • acquisition: acquisition dictionary

      • scope: Scope data

        • path0: input path 0

          • data: acquisition samples in a range of 1.0 to -1.0.

          • out-of-range: out-of-range indication for the entire acquisition (False = in-range, True = out-of-range).

          • avg_cnt: number of averages.

        • path1: input path 1

          • data: acquisition samples in a range of 1.0 to -1.0.

          • out-of-range: out-of-range indication for the entire acquisition (False = in-range, True = out-of-range).

          • avg_cnt: number of averages.

      • bins: bin data

        • integration: integration data

          • path_0: input path 0 integration result bin list

          • path_1: input path 1 integration result bin list

        • threshold: threshold result bin list

        • valid: list of valid indications per bin

        • avg_cnt: list of number of averages per bin

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • sequencer (int) – Sequencer index.

  • as_numpy (bool) – Whether to return path, threshold and avg_cnt data as NumPy arrays instead of Python lists.

Return type:

dict

Returns:

dict Dictionary with acquisitions.

Raises:

NotImplementedError – Functionality not available on this module.

get_idn()[source]#

Get device identity and build information and convert them to a dictionary.

Return type:

dict

Returns:

dict Dictionary containing manufacturer, model, serial number and build information. The build information is subdivided into FPGA firmware, kernel module software, application software and driver software build information. Each of those consist of the version, build date, build Git hash and Git build dirty indication.

get_io_pulse_width_config_val(slot, channel, keys)[source]#

Get value of specific IO channel configuration parameter.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • channel (int) – I/O channel index.

  • keys (Union[List[str], str]) – Configuration key to access, or hierarchical list thereof

Return type:

Any

Returns:

Any Parameter value.

get_scope_data(slot, io_channel)[source]#

Returns the QTM I/O channel scope data for the given slot and channel acquired since the previous call.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • io_channel (int) – I/O channel you want to get the data for.

Return type:

Any

Returns:

Any The acquired data. Empty if no data acquired since last call.

Raises:

NotImplementedError – Functionality not available on this module.

get_sequencer_status(slot, sequencer, timeout=0, timeout_poll_res=0.02)[source]#

Get the sequencer status. If an invalid sequencer index is given, an error is set in system error. If the timeout is set to zero, the function returns the state immediately. If a positive non-zero timeout is set, the function blocks until the sequencer completes. If the sequencer hasn’t stopped before the timeout expires, a TimeoutError is thrown.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • sequencer (int) – Sequencer index.

  • timeout (int) – Timeout in minutes.

  • timeout_poll_res (float) – Timeout polling resolution in seconds.

Return type:

SequencerStatus

Returns:

SequencerStatus Tuple containing sequencer status and corresponding flags.

Raises:

TimeoutError – Timeout

get_system_status()[source]#

Get general system status and convert it to a SystemStatus.

Return type:

SystemStatus

Returns:

SystemStatus Tuple containing general system status and corresponding flags.

get_waveforms(slot, sequencer, *, as_numpy=False)[source]#

Get all waveforms in the AWG waveform list of indexed sequencer. The returned dictionary is structured as follows:

  • name: waveform name.

    • data: waveform samples in a range of 1.0 to -1.0.

    • index: waveform index used by the sequencer Q1ASM program to refer

      to the waveform.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • sequencer (int) – Sequencer index.

  • as_numpy (bool) – Whether to return data as NumPy arrays instead of Python lists.

Return type:

dict

Returns:

dict Dictionary with waveforms.

get_weights(slot, sequencer, *, as_numpy=False)[source]#

Get all weights in the acquisition weight lists of indexed sequencer. The returned dictionary is structured as follows:

-name : weight name.

  • data: weight samples in a range of 1.0 to -1.0.

  • index: weight index used by the sequencer Q1ASM program to refer

    to the weight.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • sequencer (int) – Sequencer index.

  • as_numpy (bool) – Whether to return data as NumPy arrays instead of Python lists.

Return type:

dict

Returns:

dict Dictionary with weights.

Raises:

NotImplementedError – Functionality not available on this module.

scope_trigger_arm(slot)[source]#

Arms the external scope trigger logic on a QTM, such that it will send a trigger to scope acquisition blocks in the I/O channels when the trigger condition is satisfied.

Parameters:

slot (int) – The slot index of the module being referred to.

Raises:

NotImplementedError – Functionality not available on this module.

Return type:

None

scpi_transaction(slot, sequencer)[source]#

Initiate a “transaction” based on a slot/sequencer combination, establishing an ad-hoc connection to be reused within the context manager so that all read/write operations will be performed within that same connection.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • sequencer (int) – Sequencer index.

Yields:

tuple[Ieee488_2Connection, str] – A tuple containing the connection object for the slot/sequencer combination and a prefix for the SCPI commands that should be sent.

Return type:

Generator[tuple[Ieee488_2Connection, str], None, None]

set_dummy_binned_acquisition_data(slot_idx, sequencer, acq_index_name, data)[source]#

Set dummy binned acquisition data for the dummy.

Parameters:
  • slot_idx (int) – Slot of the hardware you want to set the data to on a cluster.

  • sequencer (int) – Sequencer.

  • acq_index_name (str) – Acquisition index name.

  • data (Iterable[Union[DummyBinnedAcquisitionData, None]]) – Dummy data for the binned acquisition. An iterable of all the bin values.

Return type:

None

set_dummy_scope_acquisition_data(slot_idx, sequencer, data)[source]#

Set dummy scope acquisition data for the dummy.

Parameters:
  • slot_idx (int) – Slot of the hardware you want to set the data to on a cluster.

  • sequencer (Union[int, None]) – Sequencer.

  • data (DummyScopeAcquisitionData) – Dummy data for the scope acquisition.

Return type:

None

set_io_pulse_width_config_val(slot, channel, keys, val)[source]#

Set value of specific IO channel configuration parameter.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • channel (int) – I/O channel index.

  • keys (Union[List[str], str]) – Configuration key to access, or hierarchical list thereof.

  • val (Any) – Value to set parameter to.

Return type:

None

set_qsm_outputs_to_zero(slot)[source]#

Resets the output for all channels to zero.

Parameters:

slot (int) – slot index.

Return type:

None

Returns:

None

Raises:

Exception – Invalid input parameter type.

set_safe_voltage_range(min_voltage, max_voltage)[source]#

Set the safe voltage range for all the channels of all the QSM modules on the entire cluster.

Parameters:
  • min_voltage (float) – The desired minimum voltage in volts.

  • max_voltage (float) – The desired maximum voltage in volts.

Return type:

None

start_sequencer(slot=None, sequencer=None)[source]#

Start the indexed sequencer, thereby putting it in the running state. If an invalid sequencer index is given or the indexed sequencer was not yet armed, an error is set in system error. If no sequencer index is given, all armed sequencers are started and any sequencer not in the armed state is ignored. However, if no sequencer index is given and no sequencers are armed, and error is set in system error.

Parameters:
  • slot (Optional[int]) – The slot index of the module being referred to.

  • sequencer (Optional[int]) – Sequencer index.

Raises:

RuntimeError – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Return type:

None

stop_sequencer(slot=None, sequencer=None)[source]#

Stop the indexed sequencer, thereby putting it in the stopped state. If an invalid sequencer index is given, an error is set in system error. If no sequencer index is given, all sequencers are stopped.

Parameters:
  • slot (Optional[int]) – The slot index of the module being referred to.

  • sequencer (Optional[int]) – Sequencer index.

Raises:

RuntimeError – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Return type:

None

store_scope_acquisition(slot, sequencer, name)[source]#

After an acquisition has completed, store the scope acquisition results in the acquisition specified by name of the indexed sequencers. If an invalid sequencer index is given an error is set in system error. To get access to the acquisition results, the sequencer will be stopped when calling this function.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • sequencer (int) – Sequencer index.

  • name (str) – Acquisition name.

Raises:

NotImplementedError – Functionality not available on this module.

Return type:

None

update_sequence(slot, sequencer, erase_existing=False, **sequence_args)[source]#

Update sequencer program, AWG waveforms, acquisition weights and/or acquisitions from a series of keyword arguments. By default, the update is cumulative i.e. existing waveforms/weights/acquisitions are kept on the sequencer and new ones are added (as long as indexes or names aren’t reused).

For example:

sequencer.update_sequence(
    waveforms={"wave0": {"index": 0, "data": [0.0, 0.1, 0.2, 0.3]}},
    weights={"weight0": {"index": 0, "data": [0.0, 0.1, 0.2, 0.3]}},
    erase_existing=False
)

will add one waveform and one weight to the sequencer, without either removing currently uploaded waveforms and weights, or clearing program or acquisitions.

If the erase_existing parameter is passed, then the update is destructive i.e. existing program/waveforms/weights/acquisitions will be completely overwritten with the new ones.

For example:

 sequencer.update_sequence(
     program="play 0,0,100\nstop",
     acquisitions={"acq0": {"index": 0, "num_bins": 1}},
     erase_existing=True
)

will completely replace the program and the acquisitions on the sequencer, but will not touch currently uploaded waveforms and weights.

Parameters:
  • slot (int) – The slot index of the module being referred to.

  • sequencer (int) – Sequencer index.

  • erase_existing (bool) – Whether existing waveforms/weights/acquisitions should be erased before adding new ones.

  • **sequence_args (Unpack[Sequence]) – Sequence dictionary in keyword arguments format.

Raises:

JsonSchemaValueException – Invalid JSON object.

Return type:

None

property instrument_class: InstrumentClass#

Get instrument class (e.g. Cluster).

Returns:

InstrumentClass Instrument class

property instrument_type: InstrumentType#

Get instrument type (e.g. MM, QRM, QCM).

Returns:

InstrumentType Instrument type

property is_dummy: bool#

Return True if the cluster is configured as dummy.

Returns:

bool Whether this is a dummy cluster.

SCPI interface#

class Cluster(transport, debug=DebugLevel.MINIMAL_CHECK)[source]#

Bases: Ieee488_2

This interface provides an API for the mandatory and required SCPI calls and adds Cluster related functionality (see SCPI).

__init__(transport, debug=DebugLevel.MINIMAL_CHECK)[source]#

Creates SCPI interface object.

Parameters:
  • transport (Transport) – Transport class responsible for the lowest level of communication (e.g. Ethernet).

  • debug (DebugLevel) – Debug level, which determines if and when version match checks and SCPI error checks are done.

Returns:

Raises:

ConnectionError – version_check is True and there is a device or version mismatch.

check_error_queue(err=None)[source]#

Check system error for errors. Empties and prints the complete error queue.

Parameters:

err (Optional[Exception]) – Exception to reraise.

Return type:

None

Returns:

Raises:
  • Exception – An exception was passed as input argument.

  • RuntimeError – An error was found in system error.

clear()[source]#

Clear all status and event registers (see SCPI).

Parameters:

None

Return type:

None

Returns:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_assembler_log(slot)[source]#

Get assembler log.

Parameters:

slot (int) – slot index.

Return type:

str

Returns:

str Assembler log.

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_assembler_status(slot)[source]#

Get assembler status. Refer to the assembler log to get more information regarding the assembler result.

Parameters:

slot (int) – slot index.

Return type:

bool

Returns:

bool Assembler status (False = failed, True = success).

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_current_afe_high_temperature(slot)[source]#

Get current QRC AFE board board temperature (inside device).

Parameters:

slot (int) – slot index.

Return type:

float

Returns:

float Current QRC AFE board board temperature.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_current_afe_low_temperature(slot)[source]#

Get current QRC AFE low board temperature (inside device).

Parameters:

slot (int) – slot index.

Return type:

float

Returns:

float Current QRC AFE low board temperature.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_current_afe_temperature(slot)[source]#

Get current AFE temperature.

Parameters:

slot (int) – slot index.

Return type:

float

Returns:

float current

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_current_bp_temperature_0()[source]#

Get current backplane board temperature from sensor 0 (inside device).

Parameters:

None

Return type:

float

Returns:

float Current backplane board temperature from sensor 0.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_current_bp_temperature_1()[source]#

Get current backplane board temperature from sensor 1 (inside device).

Parameters:

None

Return type:

float

Returns:

float Current backplane board temperature from sensor 1.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_current_bp_temperature_2()[source]#

Get current backplane board temperature from sensor 2 (inside device).

Parameters:

None

Return type:

float

Returns:

float Current backplane board temperature from sensor 2.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_current_carrier_temperature(slot)[source]#

Get current carrier board temperature (inside device).

Parameters:

slot (int) – slot index.

Return type:

float

Returns:

float Current carrier board temperature.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_current_eom_temperature(slot)[source]#

Get current EOM temperature.

Parameters:

slot (int) – slot index.

Return type:

float

Returns:

float current

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_current_fpga_temperature(slot)[source]#

Get current FPGA junction temperature (inside device).

Parameters:

slot (int) – slot index.

Return type:

float

Returns:

float Current FPGA junction temperature.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_current_lo_temperature(slot)[source]#

Get current LO temperature.

Parameters:

slot (int) – slot index.

Return type:

float

Returns:

float current

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_hardware_revisions()[source]#

Get a table with the different hardware revisions of the current module

Parameters:

None

Return type:

Any

Returns:

Any The module’s hardware revision table

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_ip_config()[source]#

Returns the IP address configuration that will go into effect when the device reboots.

Parameters:

None

Return type:

str

Returns:

str IP configuration. Can be one of the following things:

  • an IPv4 address including prefix length, for example 192.168.0.2/24, - the string dhcp to enable IPv4 DHCP, - an IPv6 address including prefix length, for example 1:2::3:4/64, or - a semicolon-separated combination of an IPv4 configuration (IP address or dhcp) and an IPv6 address.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_json_description()[source]#

Returns a JSON description of the instrument and all its managed modules.

Parameters:

None

Return type:

Any

Returns:

Any Instrument description structure.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_maximum_afe_high_temperature(slot)[source]#

Get maximum QRC AFE board board temperature since boot or clear (inside device).

Parameters:

slot (int) – slot index.

Return type:

float

Returns:

float Maximum QRC AFE board board temperature.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_maximum_afe_low_temperature(slot)[source]#

Get maximum QRC AFE low board temperature since boot or clear (inside device).

Parameters:

slot (int) – slot index.

Return type:

float

Returns:

float Maximum QRC AFE low board temperature.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_maximum_afe_temperature(slot)[source]#

Get maximum AFE temperature.

Parameters:

slot (int) – slot index.

Return type:

float

Returns:

float maximum

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_maximum_bp_temperature_0()[source]#

Get maximum backplane board temperature from sensor 0 since boot or clear (inside device).

Parameters:

None

Return type:

float

Returns:

float Maximum backplane board temperature from sensor 0.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_maximum_bp_temperature_1()[source]#

Get maximum backplane board temperature from sensor 1 since boot or clear (inside device).

Parameters:

None

Return type:

float

Returns:

float Maximum backplane board temperature from sensor 1.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_maximum_bp_temperature_2()[source]#

Get maximum backplane board temperature from sensor 2 since boot or clear (inside device).

Parameters:

None

Return type:

float

Returns:

float Maximum backplane board temperature from sensor 2.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_maximum_carrier_temperature(slot)[source]#

Get maximum carrier board temperature since boot or clear (inside device).

Parameters:

slot (int) – slot index.

Return type:

float

Returns:

float Maximum carrier board temperature.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_maximum_eom_temperature(slot)[source]#

Get maximum EOM temperature.

Parameters:

slot (int) – slot index.

Return type:

float

Returns:

float maximum

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_maximum_fpga_temperature(slot)[source]#

Get maximum FPGA junction temperature since boot or clear (inside device).

Parameters:

slot (int) – slot index.

Return type:

float

Returns:

float Maximum FPGA junction temperature.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_maximum_lo_temperature(slot)[source]#

Get maximum LO temperature.

Parameters:

slot (int) – slot index.

Return type:

float

Returns:

float maximum

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_name()[source]#

Returns the customer-specified name of the instrument.

Parameters:

None

Return type:

str

Returns:

str The name of the device.

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_num_system_error()[source]#

Get number of system errors (see SCPI).

Parameters:

None

Return type:

int

Returns:

int Current number of system errors.

get_operation_complete()[source]#

Get operation complete state (see SCPI).

Parameters:

None

Return type:

bool

Returns:

bool Operation complete state (False = running, True = completed).

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_operation_condition()[source]#

Get status operation condition register (see SCPI).

Parameters:

None

Return type:

int

Returns:

int Status operation condition register.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_operation_enable()[source]#

Get status operation enable register (see SCPI).

Parameters:

None

Return type:

int

Returns:

int Status operation enable register.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_operation_events()[source]#

Get status operation event register (see SCPI).

Parameters:

None

Return type:

int

Returns:

int Status operation event register.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_questionable_condition()[source]#

Get status questionable condition register (see SCPI).

Parameters:

None

Return type:

int

Returns:

int Status questionable condition register.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_questionable_enable()[source]#

Get status questionable enable register (see SCPI).

Parameters:

None

Return type:

int

Returns:

int Status questionable enable register.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_questionable_event()[source]#

Get status questionable event register (see SCPI).

Parameters:

None

Return type:

int

Returns:

int Status questionable event register.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_service_request_enable()[source]#

Get service request enable register. The register is cleared after reading it (see SCPI).

Parameters:

None

Return type:

int

Returns:

int Service request enable register.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_standard_event_status()[source]#

Get standard event status register. The register is cleared after reading it (see SCPI).

Parameters:

None

Return type:

int

Returns:

int Standard event status register.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_standard_event_status_enable()[source]#

Get standard event status enable register. The register is cleared after reading it (see SCPI).

Parameters:

None

Return type:

int

Returns:

int Standard event status enable register.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_status_byte()[source]#

Get status byte register. Register is only cleared when feeding registers are cleared (see SCPI).

Parameters:

None

Return type:

int

Returns:

int Status byte register.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_system_error()[source]#

Get system error from queue (see SCPI).

Parameters:

None

Return type:

str

Returns:

str System error description string.

get_system_version()[source]#

Get SCPI system version (see SCPI).

Parameters:

None

Return type:

str

Returns:

str SCPI system version.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_trg_in_delay()[source]#

Get external trigger input delay

Parameters:

None

Return type:

int

Returns:

int Current status of the external trigger input delay (ps), in steps of 39 ps.

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_trg_in_map_addr()[source]#

Get external trigger input map address

Parameters:

None

Return type:

int

Returns:

int Current status of the external trigger input map address

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_trg_in_map_en()[source]#

Get external trigger input map enable

Parameters:

None

Return type:

bool

Returns:

bool Current status of the external trigger input map enable

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_trigger_monitor_count(address)[source]#

Get trigger monitor count

Parameters:

address (int) – Address of the trigger

Return type:

int

Returns:

int Current status of trigger monitor counter

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

get_trigger_monitor_latest()[source]#

Get trigger monitor latest value

Parameters:

None

Return type:

int

Returns:

int Latest value from the trigger monitor counter

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

identify()[source]#

Toggle frontpanel LEDs to visually identify the instrument.

Parameters:

None

Return type:

None

Returns:

None

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

powerup_module(slot)[source]#

Powers up the instrument in the given slot.

Parameters:

slot (int) – slot index.

Return type:

None

Returns:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

powerup_modules(slots)[source]#

Powers up the instrument in the given slots.

Parameters:

slots (Any) – Slot numbers of modules to reboot.

Return type:

None

Returns:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

preset_system_status()[source]#

Preset system status registers. Connects general system status flags for PLL unlock and temperature out-of-range indications to event status enable, status questionable temperature and status questionable frequency registers respectively (see SCPI).

Parameters:

None

Return type:

None

Returns:

None

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

reboot()[source]#

Reboots the instrument.

Parameters:

None

Return type:

None

Returns:

None

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

reboot_module(slot)[source]#

Reboots the instrument in the given slot. If slot 0 (CMM) is given, the whole cluster reboots

Parameters:

slot (int) – slot index.

Return type:

None

Returns:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

reboot_modules(slots)[source]#

Reboots the instruments in the given slots. If slot 0 (CMM) is included, the whole cluster reboots

Parameters:

slots (Any) – Slot numbers of modules to reboot.

Return type:

None

Returns:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

reset_trigger_monitor_count(address)[source]#

Reset external trigger monitor counter

Parameters:

address (int) – Address of the trigger which count has to be reset

Return type:

None

Returns:

None

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

set_ip_config(config)[source]#

Reconfigures the IP address of this device. The configuration will not go into effect until reboot() is called or the device is power-cycled.

Parameters:

config (str) –

IP configuration. May be one of the following things:
  • an IPv4 address including prefix length, for example 192.168.0.2/24, - the string dhcp to enable IPv4 DHCP, - an IPv6 address including prefix length, for example 1:2::3:4/64, or - a semicolon-separated combination of an IPv4 configuration (IP address or dhcp) and an IPv6 address.

Return type:

None

Returns:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

set_name(name)[source]#

Sets the customer-specified name of the instrument. The name must not contain any newlines, backslashes, or double quotes.

Parameters:

name (str) – The new name for the device.

Return type:

None

Returns:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

set_operation_complete()[source]#

Set device in operation complete query active state (see SCPI).

Parameters:

None

Return type:

None

Returns:

None

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

set_operation_enable(reg)[source]#

Set status operation enable register (see SCPI).

Parameters:

reg (int) – Status operation enable register.

Return type:

None

Returns:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

set_questionable_enable(reg)[source]#

Set status questionable enable register (see SCPI).

Parameters:

reg (int) – Status questionable enable register.

Return type:

None

Returns:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

set_service_request_enable(reg)[source]#

Set service request enable register (see SCPI).

Parameters:

reg (int) – Service request enable register.

Return type:

None

Returns:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

set_standard_event_status_enable(reg)[source]#

Set standard event status enable register (see SCPI).

Parameters:

reg (int) – Standard event status enable register.

Return type:

None

Returns:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

set_trg_in_delay(trg_in_delay)[source]#

Set external trigger input delay

Parameters:

trg_in_delay (int) – External trigger input delay (ps), in steps of 39 ps.

Return type:

None

Returns:

None

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

set_trg_in_map_addr(trg_in_map_addr)[source]#

Set external trigger input map enable

Parameters:

trg_in_map_addr (int) – External trigger input map address

Return type:

None

Returns:

None

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

set_trg_in_map_en(trg_in_map_en)[source]#

Set external trigger input map enable

Parameters:

trg_in_map_en (bool) – External trigger input map enable

Return type:

None

Returns:

None

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

shutdown_module(slot)[source]#

Shutdown specific connected module

Parameters:

slot (int) – slot index.

Return type:

None

Returns:

None

Raises:
  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

  • Exception – Invalid input parameter type.

shutdown_modules(slots)[source]#

Shutdown modules in the given slots

Parameters:

slots (Any) – Slot numbers of modules to shutdown.

Return type:

None

Returns:

None

Raises:
  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

  • Exception – Invalid input parameter type.

start_adc_calib(slot)[source]#

Calibrates ADC delay and offset values. This method sets the correct delay values for every input data index (IO data lane) in order to avoid timing violations which occur while sampling ADC data. It also calibrates offsets internal to the ADC.

Parameters:

slot (int) – slot index.

Return type:

None

Returns:

None

Raises:
  • Exception – Invalid input parameter type.

  • Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

test()[source]#

Run self-test. Currently not implemented (see SCPI).

Parameters:

None

Return type:

bool

Returns:

bool Test result (False = failed, True = success).

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

wait()[source]#

Wait until operations completed before continuing (see SCPI).

Parameters:

None

Return type:

None

Returns:

None

Raises:

Exception – An error is reported in system error and debug <= 1. All errors are read from system error and listed in the exception.

Supporting classes and functions#

Please have a look at: