Pulsar

The Pulsar 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 qblox_instruments.Pulsar(*args: Any, **kwargs: Any)[source]

Bases: Pulsar, Instrument

This class connects QCoDeS to the Pulsar native interface.

__init__(name: str, identifier: str | None = None, port: int | None = None, debug: int | None = None, dummy_type: PulsarType | None = None)[source]

Creates Pulsar 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[int]) – Debug level (0 | None = normal, 1 = no version check, >1 = no version or error checking).

  • dummy_type (Optional[PulsarType]) – Configure as dummy module of specified type.

property sequencers: List

Get list of sequencers submodules.

Returns:

List of sequencer submodules.

Return type:

list

reset() None[source]

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

QCoDeS instrument parameters

QCoDeS parameters generated by Pulsar. The parameters are dscribed in QCM-QRM.

Native interface

class qblox_instruments.native.Pulsar(identifier: str, port: int | None = None, debug: int | None = None, dummy_type: PulsarType | None = None)[source]

Bases: object

Class that provides the native API for the Pulsar. It provides methods to control all functions and features provided by the Pulsar, like sequencer, waveform and acquistion handling.

This class is build upon the PulsarQcm and PulsarQrm classes through composition. This allows us to create a generic native Pulsar class that supports both Pulsar types, but only exposes the relevant interfaces, while also keeping the SCPI classes automatically generated for fast prototyping and development. On instantiation, this class probes the connected device to see which Pulsar SCPI interface to support and adds all respective attributes to this class. Afterwards, this class can be used as if it inherits from it’s respective Pulsar SCPI interface with all features and functionality available.

Note that the bulk of the functionality of this class is contained in the generic_func module so that this functionality can be shared between instruments.

__init__(identifier: str, port: int | None = None, debug: int | None = None, dummy_type: PulsarType | None = None)[source]

Creates Pulsar 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[int]) – Debug level (0 | None = normal, 1 = no version check, >1 = no version or error checking).

  • dummy_type (Optional[PulsarType]) – Configure as dummy module of specified type.

Raises:
property instrument_class: InstrumentClass

Get instrument class (e.g. Pulsar, Cluster).

Returns:

Instrument class

Return type:

InstrumentClass

property instrument_type: InstrumentType

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

Returns:

Instrument type

Return type:

InstrumentType

property is_qcm_type: bool

Return if module is of type QCM.

Returns:

True if module is of type QCM.

Return type:

bool

property is_qrm_type: bool

Return if module is of type QRM.

Returns:

True if module is of type QRM.

Return type:

bool

property is_rf_type: bool

Return if module is of type QCM-RF or QRM-RF.

Returns:

True if module is of type QCM-RF or QRM-RF.

Return type:

bool

get_idn() Dict[source]

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

Returns:

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.

Return type:

dict

get_system_state() SystemState[source]

Get general system state and convert it to a SystemState.

Returns:

Tuple containing general system status and corresponding flags.

Return type:

SystemStatus

arm_sequencer(sequencer: int | None = None) 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:

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.

start_sequencer(sequencer: int | None = None) 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:

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.

stop_sequencer(sequencer: int | None = None) 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:

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.

get_sequencer_state(sequencer: int, timeout: int = 0, timeout_poll_res: float = 0.02) SequencerState[source]

Get the sequencer state. 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:
  • 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:

SequencerState

Raises:

TimeoutError – Timeout

get_waveforms(sequencer: int) Dict[source]

Get all waveforms and weigths 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:

sequencer (int) – Sequencer index.

Returns:

Dictionary with waveforms.

Return type:

dict

get_weights(sequencer: int) Dict[source]

Get all weigths 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:

sequencer (int) – Sequencer index.

Returns:

Dictionary with weights.

Return type:

dict

Raises:

NotImplementedError – Functionality not available on this module.

get_acquisition_state(sequencer: int, timeout: int = 0, timeout_poll_res: float = 0.02) bool[source]

Return acquisition binning completion state 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 state 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_state with the selected timeout period first and then the acquisition state is checked with the same timeout period. This means that the total timeout period is two times the set timeout period.

Parameters:
  • 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 state.

Returns:

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

Return type:

bool

Raises:
delete_acquisition_data(sequencer: int, name: str = '', all: bool = False) None[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:
  • sequencer (int) – Sequencer index.

  • name (str) – Weight name

Raises:

NotImplementedError – Functionality not available on this module.

store_scope_acquisition(sequencer: int, name: str) None[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:
  • sequencer (int) – Sequencer index.

  • name (str) – Acquisition name.

Raises:

NotImplementedError – Functionality not available on this module.

get_acquisitions(sequencer: int) Dict[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 considaration. 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 lenghts. 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:

sequencer (int) – Sequencer index.

Returns:

Dictionary with acquisitions.

Return type:

dict

Raises:

NotImplementedError – Functionality not available on this module.

delete_dummy_binned_acquisition_data(sequencer: int | None = None, acq_index_name: str | None = None)[source]

Deletes all dummy binned acquisition data for the dummy.

Parameters:
  • sequencer (Optional[int]) – Sequencer.

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

set_dummy_binned_acquisition_data(sequencer: int, acq_index_name: str, data: Iterable[DummyBinnedAcquisitionData | None])[source]

Set dummy binned acquisition data for the dummy.

Parameters:
  • 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.

  • slot_idx (Union[int, None]) – Slot of the hardware you want to set the data to on a cluster.

delete_dummy_scope_acquisition_data(sequencer: int | None)[source]

Set dummy scope acquisition data for the dummy.

Parameters:

sequencer (int) – Sequencer.

set_dummy_scope_acquisition_data(sequencer: int | None, data: DummyScopeAcquisitionData)[source]

Set dummy scope acquisition data for the dummy.

Parameters:

SCPI interface

Based on the used instrument, one of the two following interfaces is selected.

QCM interface

class qblox_instruments.scpi.PulsarQcm(transport: Transport, debug: int = 0)[source]

Bases: Ieee488_2

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

__init__(transport: Transport, debug: int = 0)[source]

Creates SCPI interface object.

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

  • debug (int) – Debug level (0 = normal, 1 = no version check, >1 = no version or error checking).

Raises:

ConnectionError – Debug level is 0 and there is a device or version mismatch.

get_system_error() str[source]

Get system error from queue (see SCPI).

Parameters:

None

Returns:

System error description string.

Return type:

str

get_num_system_error() int[source]

Get number of system errors (see SCPI).

Parameters:

None

Returns:

Current number of system errors.

Return type:

int

get_system_version() str[source]

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.

set_name(name: str) None[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

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() str[source]

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.

set_ip_config(config: str) None[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

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_ip_config() str[source]

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.

reboot() None[source]

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.

clear() None[source]

Clear all status and event registers (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.

get_status_byte() int[source]

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.

set_service_request_enable(reg: int) None[source]

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.

get_service_request_enable() int[source]

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.

set_standard_event_status_enable(reg: int) None[source]

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.

get_standard_event_status_enable() int[source]

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.

get_standard_event_status() int[source]

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.

set_operation_complete() None[source]

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.

get_operation_complete() bool[source]

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.

test() bool[source]

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.

wait() None[source]

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.

preset_system_status() None[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

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() int[source]

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.

get_questionable_event() int[source]

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.

set_questionable_enable(reg: int) None[source]

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.

get_questionable_enable() int[source]

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.

get_operation_condition() int[source]

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.

get_operation_events() int[source]

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.

set_operation_enable(reg: int) None[source]

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.

get_operation_enable() int[source]

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.

identify() None[source]

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.

set_trg_in_delay(trg_in_delay: int) None[source]

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.

get_trg_in_delay() int[source]

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.

set_trg_in_map_en(trg_in_map_en: bool) None[source]

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.

get_trg_in_map_en() bool[source]

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.

set_trg_in_map_addr(trg_in_map_addr: int) None[source]

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.

get_trg_in_map_addr() int[source]

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.

get_current_afe_temperature() float[source]

Get current analog frontend board temperature (inside device).

Parameters:

None

Returns:

Current analog frontend 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.

get_maximum_afe_temperature() float[source]

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

Parameters:

None

Returns:

Maximum analog frontend 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.

get_current_lo_temperature() float[source]

Get current local oscillator board temperature (inside device).

Parameters:

None

Returns:

Current local oscillator 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.

get_maximum_lo_temperature() float[source]

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

Parameters:

None

Returns:

Maximum local oscillator 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.

get_current_fpga_temperature() float[source]

Get current FPGA junction temperature (inside device).

Parameters:

None

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.

get_maximum_fpga_temperature() float[source]

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

Parameters:

None

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.

get_current_carrier_temperature() float[source]

Get current carrier board temperature (inside device).

Parameters:

None

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.

get_maximum_carrier_temperature() float[source]

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

Parameters:

None

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.

get_assembler_status() bool[source]

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

Parameters:

None

Returns:

Assembler status (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.

get_assembler_log() str[source]

Get assembler log.

Parameters:

None

Returns:

Assembler log.

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.

QRM interface

class qblox_instruments.scpi.PulsarQrm(transport: Transport, debug: int = 0)[source]

Bases: Ieee488_2

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

__init__(transport: Transport, debug: int = 0)[source]

Creates SCPI interface object.

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

  • debug (int) – Debug level (0 = normal, 1 = no version check, >1 = no version or error checking).

Raises:

ConnectionError – Debug level is 0 and there is a device or version mismatch.

get_system_error() str[source]

Get system error from queue (see SCPI).

Parameters:

None

Returns:

System error description string.

Return type:

str

get_num_system_error() int[source]

Get number of system errors (see SCPI).

Parameters:

None

Returns:

Current number of system errors.

Return type:

int

get_system_version() str[source]

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.

set_name(name: str) None[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

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() str[source]

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.

set_ip_config(config: str) None[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

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_ip_config() str[source]

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.

reboot() None[source]

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.

clear() None[source]

Clear all status and event registers (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.

get_status_byte() int[source]

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.

set_service_request_enable(reg: int) None[source]

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.

get_service_request_enable() int[source]

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.

set_standard_event_status_enable(reg: int) None[source]

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.

get_standard_event_status_enable() int[source]

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.

get_standard_event_status() int[source]

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.

set_operation_complete() None[source]

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.

get_operation_complete() bool[source]

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.

test() bool[source]

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.

wait() None[source]

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.

preset_system_status() None[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

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() int[source]

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.

get_questionable_event() int[source]

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.

set_questionable_enable(reg: int) None[source]

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.

get_questionable_enable() int[source]

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.

get_operation_condition() int[source]

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.

get_operation_events() int[source]

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.

set_operation_enable(reg: int) None[source]

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.

get_operation_enable() int[source]

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.

identify() None[source]

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.

set_trg_in_delay(trg_in_delay: int) None[source]

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.

get_trg_in_delay() int[source]

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.

set_trg_in_map_en(trg_in_map_en: bool) None[source]

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.

get_trg_in_map_en() bool[source]

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.

set_trg_in_map_addr(trg_in_map_addr: int) None[source]

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.

get_trg_in_map_addr() int[source]

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.

get_current_afe_temperature() float[source]

Get current analog frontend board temperature (inside device).

Parameters:

None

Returns:

Current analog frontend 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.

get_maximum_afe_temperature() float[source]

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

Parameters:

None

Returns:

Maximum analog frontend 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.

get_current_lo_temperature() float[source]

Get current local oscillator board temperature (inside device).

Parameters:

None

Returns:

Current local oscillator 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.

get_maximum_lo_temperature() float[source]

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

Parameters:

None

Returns:

Maximum local oscillator 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.

get_current_fpga_temperature() float[source]

Get current FPGA junction temperature (inside device).

Parameters:

None

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.

get_maximum_fpga_temperature() float[source]

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

Parameters:

None

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.

get_current_carrier_temperature() float[source]

Get current carrier board temperature (inside device).

Parameters:

None

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.

get_maximum_carrier_temperature() float[source]

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

Parameters:

None

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.

get_assembler_status() bool[source]

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

Parameters:

None

Returns:

Assembler status (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.

get_assembler_log() str[source]

Get assembler log.

Parameters:

None

Returns:

Assembler log.

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.

start_adc_calib() None[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:

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.

Supporting classes and functions

Please have a look at: