quantify_scheduler.backends.types.zhinst

Python dataclasses for quantify-scheduler json-schemas.

Module Contents

Classes

DeviceType

Enum of device types.

Output

The definition class for zhinst channel properties.

Device

The device definition class for zhinst devices.

CommandTableHeader

The CommandTable header definition.

CommandTableEntryValue

A CommandTable entry definition with a value.

CommandTableWaveform

The command table waveform properties.

CommandTableEntry

The definition of a single CommandTable entry.

CommandTable

The CommandTable definition for ZI HDAWG.

QasIntegrationMode

Operation mode of all weighted integration units.

QasResultMode

UHFQA QAS result mode.

QasResultSource

UHFQA QAS result source.

WaveformDestination

The waveform destination enum type.

InstrumentInfo

Instrument information record type.

Instruction

Sequence base instruction record type.

Acquisition

This instruction indicates that an acquisition is to be triggered in the UHFQA.

Wave

This instruction indicates that a waveform should be played.

class DeviceType[source]

Bases: str, enum.Enum

Enum of device types.

Initialize self. See help(type(self)) for accurate signature.

HDAWG = 'HDAWG'[source]
UHFQA = 'UHFQA'[source]
UHFLI = 'UHFLI'[source]
MFLI = 'MFLI'[source]
PQSC = 'PQSC'[source]
NONE = 'none'[source]
class Output[source]

Bases: dataclasses_json.DataClassJsonMixin

The definition class for zhinst channel properties.

This class maps to the zhinst backend JSON “channel” properties defined in the hardware mapping.

Parameters:
  • port – The port resource.

  • clock – The Clock resource.

  • clock_frequency – The frequency for the clock resource (AKA RF/signal frequency).

  • mode – The output mode type.

  • modulation – The modulation settings.

  • local_oscillator – The LocalOscillator name.

  • gain1 – The output1 IQ modulation gain. Accepted value between -1 and + 1. (default = 1.0)

  • gain2 – The output2 IQ modulation gain. Accepted value between -1 and + 1. (default = 1.0)

  • trigger – The ZI Instrument input trigger. (default = None) Setting this will declare the device secondary

  • markers – The ZI Instrument output triggers. (default = [])

  • mixer_corrections – The output mixer corrections.

port: str[source]
clock: str[source]
mode: quantify_scheduler.enums.SignalModeType[source]
modulation: quantify_scheduler.backends.types.common.Modulation[source]
local_oscillator: str[source]
clock_frequency: Optional[float][source]
gain1: int = 0[source]
gain2: int = 0[source]
trigger: Optional[int][source]
markers: List[Union[str, int]][source]
mixer_corrections: Optional[quantify_scheduler.backends.types.common.MixerCorrections][source]
class Device[source]

Bases: dataclasses_json.DataClassJsonMixin

The device definition class for zhinst devices.

This class maps to the zhinst backend JSON “devices” properties defined in the hardware mapping.

Parameters:
  • name – The QCodes Instrument name.

  • type – The instrument model type. For example: ‘UHFQA’, ‘HDAWG4’, ‘HDAWG8’

  • ref – The reference source type.

  • channels – The list of channels. (auto generated)

  • channel_0 – The first physical channel properties.

  • channel_1 – The second physical channel properties.

  • channel_2 – The third physical channel properties.

  • channel_3 – The fourth physical channel properties.

  • channelgrouping – The HDAWG channelgrouping property. (default = 0) corresponding to a single sequencer controlling a pair (2) awg outputs.

  • clock_select

    The clock rate divisor which will be used to get the instruments clock rate from the lookup dictionary in quantify_scheduler.backends.zhinst_backend.DEVICE_CLOCK_RATES.

    For information see zhinst User manuals, section /DEV…./AWGS/n/TIME Examples: base sampling rate (1.8 GHz) divided by 2^clock_select. (default = 0)

  • mode – The Instruments operation mode. (default = enums.InstrumentOperationMode.OPERATING)

  • device_type – The Zurich Instruments hardware type. (default = DeviceType.NONE) This field is automatically populated.

  • sample_rate – The Instruments sampling clock rate. This field is automatically populated.

  • n_channels – The number of physical channels of this ZI Instrument. This field is automatically populated.

name: str[source]
type: str[source]
ref: quantify_scheduler.enums.ReferenceSourceType[source]
channels: List[Output][source]
channel_0: Output[source]
channel_1: Optional[Output][source]
channel_2: Optional[Output][source]
channel_3: Optional[Output][source]
clock_select: Optional[int] = 0[source]
channelgrouping: int = 0[source]
mode: quantify_scheduler.enums.InstrumentOperationMode[source]
device_type: DeviceType[source]
sample_rate: Optional[int][source]
n_channels: int[source]
class CommandTableHeader[source]

Bases: dataclasses_json.DataClassJsonMixin

The CommandTable header definition.

version: str = '0.2'[source]
partial: bool = False[source]
class CommandTableEntryValue[source]

Bases: dataclasses_json.DataClassJsonMixin

A CommandTable entry definition with a value.

value: int[source]
class CommandTableWaveform[source]

Bases: dataclasses_json.DataClassJsonMixin

The command table waveform properties.

index: int[source]
length: int[source]
class CommandTableEntry[source]

Bases: dataclasses_json.DataClassJsonMixin

The definition of a single CommandTable entry.

index: int[source]
waveform: CommandTableWaveform[source]
class CommandTable[source]

Bases: dataclasses_json.DataClassJsonMixin

The CommandTable definition for ZI HDAWG.

header: CommandTableHeader[source]
table: List[CommandTableEntry][source]
class QasIntegrationMode[source]

Bases: enum.Enum

Operation mode of all weighted integration units.

NORMAL: Normal mode. The integration weights are given by the user-programmed filter memory.

SPECTROSCOPY: Spectroscopy mode. The integration weights are generated by a digital oscillator. This mode offers enhanced frequency resolution.

NORMAL = 0[source]
SPECTROSCOPY = 1[source]
class QasResultMode[source]

Bases: enum.Enum

UHFQA QAS result mode.

CYCLIC = 0[source]
SEQUENTIAL = 1[source]
class QasResultSource[source]

Bases: enum.Enum

UHFQA QAS result source.

CROSSTALK = 0[source]
THRESHOLD = 1[source]
ROTATION = 3[source]
CROSSTALK_CORRELATION = 4[source]
THRESHOLD_CORRELATION = 5[source]
INTEGRATION = 7[source]
class WaveformDestination[source]

Bases: enum.Enum

The waveform destination enum type.

CSV = 0[source]
WAVEFORM_TABLE = 1[source]
class InstrumentInfo[source]

Instrument information record type.

sample_rate: int[source]
num_samples_per_clock: int[source]
granularity: int[source]
mode: quantify_scheduler.enums.InstrumentOperationMode[source]
sequencer_rate: float[source]
class Instruction[source]

Sequence base instruction record type.

waveform_id: str[source]
abs_time: float[source]
clock_cycle_start: int[source]
duration: float[source]
static default()[source]

Returns a default Instruction instance.

Return type:

Instruction

class Acquisition[source]

Bases: Instruction

This instruction indicates that an acquisition is to be triggered in the UHFQA. If a waveform_id is specified, this waveform will be used as the integration weight.

class Wave[source]

Bases: Instruction

This instruction indicates that a waveform should be played.