Pulsar QCM

The Pulsar QCM 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 pulsar_qcm.pulsar_qcm.pulsar_qcm_qcodes(name, transport_inst, debug=0)[source]

Bases: pulsar_qcm.pulsar_qcm_ifc.pulsar_qcm_ifc, qcodes.instrument.base.Instrument

This class connects QCoDeS to the Pulsar QCM native interface. Do not directly instantiate this class, but instead instantiate either the pulsar_qcm or pulsar_qcm_dummy.

__init__(name, transport_inst, debug=0)[source]

Creates Pulsar QCM 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.

  • transport_inst (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

Exception – Debug level is 0 and there is a version mismatch.

Note

To get a complete of list of the QCoDeS parameters, run the following code.

from pulsar_qcm.pulsar_qcm import pulsar_qcm_dummy

qcm = pulsar_qcm_dummy("qrm")
for call in qcm.snapshot()['parameters']:
    print(getattr(qcm, call).__doc__)
reset()[source]

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

Raises

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

class pulsar_qcm.pulsar_qcm.pulsar_qcm(name, host, port=5025, debug=0)[source]

Bases: pulsar_qcm.pulsar_qcm.pulsar_qcm_qcodes

Pulsar QCM driver class based on QCoDeS that uses an IP socket to communicate with the instrument.

__init__(name, host, port=5025, debug=0)[source]

Creates Pulsar QCM driver object.

Parameters
  • name (str) – Instrument name.

  • host (str) – Instrument IP address.

  • port (int) – Instrument port.

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

Raises

Exception – Debug level is 0 and there is a version mismatch.

class pulsar_qcm.pulsar_qcm.pulsar_qcm_dummy(name, debug=1, is_rf_type=False)[source]

Bases: pulsar_qcm.pulsar_qcm.pulsar_qcm_qcodes

Pulsar QCM driver class based on QCoDeS that uses the pulsar_dummy_transport layer to substitute an actual Pulsar QCM to allow software stack development without hardware.

__init__(name, debug=1, is_rf_type=False)[source]

Creates Pulsar QCM driver object. The debug level must be set to >= 1.

Parameters
  • name (str) – Instrument name.

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

  • is_rf_type (bool) – Dummy module type (False = RF, True = baseband)

QCoDeS parameters

QCoDeS parameters generated by pulsar_qcm_qcodes.

Note

Only sequencer 0’s parameters are listed, but all other sequencers have the same parameters.

pulsar_qcm.IDN

Please see QCoDeS for a description.

Properties
  • value: Anything

pulsar_qcm.reference_source

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

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

pulsar_qcm.out0_offset

Sets/gets output 0 offset.

Properties
  • unit: V

  • value: Numbers -2.5<=v<=2.5

pulsar_qcm.out1_offset

Sets/gets output 1 offset.

Properties
  • unit: V

  • value: Numbers -2.5<=v<=2.5

pulsar_qcm.out2_offset

Sets/gets output 2 offset.

Properties
  • unit: V

  • value: Numbers -2.5<=v<=2.5

pulsar_qcm.out3_offset

Sets/gets output 3 offset.

Properties
  • unit: V

  • value: Numbers -2.5<=v<=2.5

pulsar_qcm.sequencer0_channel_map_path0_out0_en

Sets/gets sequencer 0 channel map enable of path 0 to output 0.

Properties
  • value: Boolean

pulsar_qcm.sequencer0_channel_map_path1_out1_en

Sets/gets sequencer 0 channel map enable of path 1 to output 1.

Properties
  • value: Boolean

pulsar_qcm.sequencer0_channel_map_path0_out2_en

Sets/gets sequencer 0 channel map enable of path 0 to output 2.

Properties
  • value: Boolean

pulsar_qcm.sequencer0_channel_map_path1_out3_en

Sets/gets sequencer 0 channel map enable of path 1 to output 3.

Properties
  • value: Boolean

pulsar_qcm.sequencer0_sync_en

Sets/gets sequencer 0 synchronization enable which enables party-line synchronization.

Properties
  • value: Boolean

pulsar_qcm.sequencer0_nco_freq

Sets/gets sequencer 0 NCO frequency in Hz with a resolution of 0.25 Hz

Properties
  • unit: Hz

  • value: Numbers -300000000.0<=v<=300000000.0

pulsar_qcm.sequencer0_nco_phase_offs

Sets/gets sequencer 0 NCO phase offset in degrees with a resolution of 3.6e-7 degrees.

Properties
  • unit: Degrees

  • value: Numbers 0<=v<=360

pulsar_qcm.sequencer0_marker_ovr_en

Sets/gets sequencer 0 marker override enable.

Properties
  • value: Boolean

pulsar_qcm.sequencer0_marker_ovr_value

Sets/gets sequencer 0 marker override value. Bit index corresponds to marker channel index.

Properties
  • value: Numbers 0<=v<=15

pulsar_qcm.sequencer0_waveforms_and_program

Sets sequencer 0 AWG waveforms and ASM program. Valid input is a string representing the JSON filename.

Properties
  • value: Strings

pulsar_qcm.sequencer0_cont_mode_en_awg_path0

Sets/gets sequencer 0 continous waveform mode enable for AWG path 0.

Properties
  • value: Boolean

pulsar_qcm.sequencer0_cont_mode_en_awg_path1

Sets/gets sequencer 0 continous waveform mode enable for AWG path 1.

Properties
  • value: Boolean

pulsar_qcm.sequencer0_cont_mode_waveform_idx_awg_path0

Sets/gets sequencer 0 continous waveform mode waveform index or AWG path 0.

Properties
  • value: Numbers 0<=v<=1023

pulsar_qcm.sequencer0_cont_mode_waveform_idx_awg_path1

Sets/gets sequencer 0 continous waveform mode waveform index or AWG path 1.

Properties
  • value: Numbers 0<=v<=1023

pulsar_qcm.sequencer0_upsample_rate_awg_path0

Sets/gets sequencer 0 upsample rate for AWG path 0.

Properties
  • value: Numbers 0<=v<=65535

pulsar_qcm.sequencer0_upsample_rate_awg_path1

Sets/gets sequencer 0 upsample rate for AWG path 1

Properties
  • value: Numbers 0<=v<=65535

pulsar_qcm.sequencer0_gain_awg_path0

Sets/gets sequencer 0 gain for AWG path 0.

Properties
  • value: Numbers -1.0<=v<=1.0

pulsar_qcm.sequencer0_gain_awg_path1

Sets/gets sequencer 0 gain for AWG path 1

Properties
  • value: Numbers -1.0<=v<=1.0

pulsar_qcm.sequencer0_offset_awg_path0

Sets/gets sequencer 0 offset for AWG path 0.

Properties
  • value: Numbers -1.0<=v<=1.0

pulsar_qcm.sequencer0_offset_awg_path1

Sets/gets sequencer 0 offset for AWG path 1.

Properties
  • value: Numbers -1.0<=v<=1.0

pulsar_qcm.sequencer0_mixer_corr_phase_offset_degree

Sets/gets sequencer 0 mixer phase imbalance correction for AWG; applied to AWG path 1 relative to AWG path 0 and measured in degrees

Properties
  • value: Numbers -45.0<=v<=45.0

pulsar_qcm.sequencer0_mixer_corr_gain_ratio

Sets/gets sequencer 0 mixer gain imbalance correction for AWG; equal to AWG path 1 amplitude divided by AWG path 0 amplitude.

Properties
  • value: Numbers 0.5<=v<=2.0

pulsar_qcm.sequencer0_mod_en_awg

Sets/gets sequencer 0 modulation enable for AWG.

Properties
  • value: Boolean

Native interface

class pulsar_qcm.pulsar_qcm_ifc.pulsar_qcm_ifc(transport_inst, debug=0)[source]

Bases: pulsar_qcm.pulsar_qcm_scpi_ifc.pulsar_qcm_scpi_ifc

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

__init__(transport_inst, debug=0)[source]

Creates Pulsar QCM native interface object.

Parameters
  • transport_inst (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).

Returns

Pulsar QCM native interface object.

Return type

pulsar_qcm_ifc

Raises

Exception – Debug level is 0 and there is a version mismatch.

get_idn()[source]

Get device identity and build information.

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

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

Get general system state.

Returns

Dictionary containing general status and corresponding flags:

Status
  • OKAY: System is okay.

  • CRITICAL: An error indicated by the flags occured, but has been resolved.

  • ERROR: An error indicated by the flags is occuring.

Flags
  • CARRIER_PLL_UNLOCK: Carrier board PLL is unlocked.

  • FPGA_PLL_UNLOCK: FPGA PLL is unlocked.

  • FPGA_TEMP_OR: FPGA temperature is out-of-range.

  • CARRIER_TEMP_OR: Carrier board temperature is out-of-range.

  • AFE_TEMP_OR: Analog frontend board temperature is out-of-range.

Return type

dict

Raises

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

arm_sequencer(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

sequencer (int) – Sequencer index.

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.

start_sequencer(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

sequencer (int) – Sequencer index.

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.

stop_sequencer(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

sequencer (int) – Sequencer index.

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_sequencer_state(sequencer, timeout=0, timeout_poll_res=0.1)[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 timeout exception is thrown.

Parameters
  • sequencer (int) – Sequencer index.

  • timeout (int) – Timeout in minutes.

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

Returns

Concatinated list of strings separated by the semicolon character. Status is indicated by one status string and an optional number of flags respectively ordered as:

Status
  • IDLE: Sequencer waiting to be armed and started.

  • ARMED: Sequencer is armed and ready to start.

  • RUNNING: Sequencer is running.

  • Q1 STOPPED: Classical part of the sequencer has stopped; waiting for real-time part to stop.

  • STOPPED: Sequencer has completely stopped.

Flags
  • DISARMED: Sequencer was disarmed.

  • FORCED STOP: Sequencer was stopped while still running.

  • SEQUENCE PROCESSOR Q1 ILLEGAL INSTRUCTION: Classical sequencer part executed an unknown instruction.

  • SEQUENCE PROCESSOR RT EXEC ILLEGAL INSTRUCTION: Real-time sequencer part executed an unknown instruction.

  • AWG WAVE PLAYBACK INDEX INVALID PATH 0: AWG path 0 tried to play an unknown waveform.

  • AWG WAVE PLAYBACK INDEX INVALID PATH 1: AWG path 1 tried to play an unknown waveform.

  • CLOCK INSTABILITY: Clock source instability occurred.

Return type

list

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.

  • TypeError – Timeout is not an integer.

  • TimeoutError – Timeout

get_waveforms(sequencer)[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

sequencer (int) – Sequencer index.

Returns

Dictionary with waveforms.

Return type

dict

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.

SCPI interface

pulsar_qcm.pulsar_qcm_scpi_ifc.scpi_error_check(func)[source]

Decorator that catches and checks for errors on an SCPI call.

Parameters

func – Class method that performs an SCPI call

Raises

Exception – An error was found in system error or an exception was passed as input argument.

class pulsar_qcm.pulsar_qcm_scpi_ifc.pulsar_qcm_scpi_ifc(transport_inst, debug=0)[source]

Bases: ieee488_2.ieee488_2.ieee488_2

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

__init__(transport_inst, debug=0)[source]

Creates SCPI interface object.

Parameters
  • transport_inst (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).

Returns

SCPI interface object.

Return type

pulsar_qcm_scpi_ifc

Raises

Exception – Debug level is 0 and there is a version mismatch.

reset(**kwargs)[source]
clear(**kwargs)[source]
get_status_byte(**kwargs)[source]
set_service_request_enable(**kwargs)[source]
get_service_request_enable(**kwargs)[source]
set_standard_event_status_enable(**kwargs)[source]
get_standard_event_status_enable(**kwargs)[source]
get_standard_event_status(**kwargs)[source]
set_operation_complete(**kwargs)[source]
get_operation_complete(**kwargs)[source]
test(**kwargs)[source]
wait(**kwargs)[source]
get_system_error()[source]

Get system error from queue (see SCPI).

Parameters

None

Returns

System error description string.

Return type

str

get_num_system_error()[source]

Get number of system errors (see SCPI).

Parameters

None

Returns

Current number of system errors.

Return type

int

get_system_version(**kwargs)[source]
preset_system_status(**kwargs)[source]
get_questionable_condition(**kwargs)[source]
get_questionable_event(**kwargs)[source]
set_questionable_enable(**kwargs)[source]
get_questionable_enable(**kwargs)[source]
get_operation_condition(**kwargs)[source]
get_operation_events(**kwargs)[source]
set_operation_enable(**kwargs)[source]
get_operation_enable(**kwargs)[source]
identify(**kwargs)[source]
get_current_fpga_temperature(**kwargs)[source]
get_maximum_fpga_temperature(**kwargs)[source]
get_current_carrier_temperature(**kwargs)[source]
get_maximum_carrier_temperature(**kwargs)[source]
get_current_afe_temperature(**kwargs)[source]
get_maximum_afe_temperature(**kwargs)[source]
get_current_lo_temperature(**kwargs)[source]
get_maximum_lo_temperature(**kwargs)[source]
get_assembler_status(**kwargs)[source]
get_assembler_log(**kwargs)[source]