zhinst#
Python dataclasses for quantify-scheduler json-schemas.
Module Contents#
Classes#
Enum of device types. |
|
The modulation mode enum type. |
|
The signal output enum type. |
|
The reference source enum type. |
|
The InstrumentOperationMode enum defines in what operational mode an instrument is |
|
The backend Modulation record type. |
|
The backend LocalOscillator record type. |
|
The definition class for zhinst channel properties. |
|
The device definition class for zhinst devices. |
|
The CommandTable header definition. |
|
A CommandTable entry definition with a value. |
|
The command table waveform properties. |
|
The definition of a single CommandTable entry. |
|
The CommandTable definition for ZI HDAWG. |
|
Operation mode of all weighted integration units. |
|
UHFQA QAS result mode. |
|
UHFQA QAS result source. |
|
The waveform destination enum type. |
|
Instrument information record type. |
|
Sequence base instruction record type. |
|
This instruction indicates that an acquisition is to be triggered in the UHFQA. |
|
This instruction indicates that a waveform should be played. |
|
Information needed to specify a ZI Channel in the |
|
Base class for a Zurich Instrument hardware description. |
|
Information needed to specify a HDAWG4 in the |
|
Information needed to specify a HDAWG8 in the |
|
Information needed to specify a UHFQA in the |
|
Gain settings for a port-clock combination. |
|
Datastructure containing the hardware options for each port-clock combination. |
Attributes#
Specifies a piece of Zurich Instruments hardware and its instrument-specific settings. |
- class ModulationModeType[source]#
-
The modulation mode enum type.
Used to set the modulation type to
no modulation. (‘none’)
Software premodulation applied in the numerical waveforms. (‘premod’)
Hardware real-time modulation. (‘modulate’)
See also
Modulation
for the use.
- class SignalModeType[source]#
-
The signal output enum type.
Used to set the output signal type to a modulated or real respectively.
- class ReferenceSourceType[source]#
-
The reference source enum type.
Used to set the source trigger type to internal or external respectively.
- class InstrumentOperationMode[source]#
-
The InstrumentOperationMode enum defines in what operational mode an instrument is in.
OPERATING mode sets the Instrument in its default operation mode. CALIBRATING mode sets the Instrument in calibration mode in which for example the numeric pulses generated by a backend for an AWG are set to np.ones.
- class Modulation(/, **data: Any)[source]#
Bases:
quantify_scheduler.structure.model.DataStructure
The backend Modulation record type.
- type: ModulationModeType[source]#
The modulation mode type select. Allows to choose between. (default = ModulationModeType.NONE)
no modulation. (‘none’)
Software premodulation applied in the numerical waveforms. (‘premod’)
Hardware real-time modulation. (‘modulate’)
- class LocalOscillator(/, **data: Any)[source]#
Bases:
quantify_scheduler.structure.model.DataStructure
The backend LocalOscillator record type.
- unique_name: str[source]#
The unique name identifying the combination of instrument and channel/parameters.
- generic_icc_name: str | None = None[source]#
The name of the GenericInstrumentCoordinatorComponent attached to this device.
- frequency: dict | None = None[source]#
A dict which tells the generic icc what parameter maps to the local oscillator (LO) frequency in Hz.
- frequency_param: str | None = None[source]#
The parameter on the LO instrument used to control the frequency.
- power: dict | None = None[source]#
A dict which tells the generic icc what parameter maps to the local oscillator (LO) power in dBm.
- class Output(/, **data: Any)[source]#
Bases:
quantify_scheduler.structure.model.DataStructure
The definition class for zhinst channel properties.
This class maps to the zhinst backend JSON “channel” properties defined in the hardware mapping.
- mode: SignalModeType[source]#
The output mode type.
- modulation: Modulation[source]#
The modulation settings.
- clock_frequency: float | None = None[source]#
The frequency for the clock resource (AKA RF/signal frequency).
- gain1: int = 0[source]#
The output1 IQ modulation gain. Accepted value between -1 and + 1. (default = 1.0)
- gain2: int = 0[source]#
The output2 IQ modulation gain. Accepted value between -1 and + 1. (default = 1.0)
- trigger: int | None = None[source]#
The ZI Instrument input trigger. (default = None) Setting this will declare the device secondary.
- mixer_corrections: quantify_scheduler.backends.types.common.MixerCorrections | None = None[source]#
The output mixer corrections.
- class Device(/, **data: Any)[source]#
Bases:
quantify_scheduler.structure.model.DataStructure
The device definition class for zhinst devices.
This class maps to the zhinst backend JSON “devices” properties defined in the hardware mapping.
- ref: ReferenceSourceType[source]#
The reference source type.
- clock_select: int | None = 0[source]#
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)
- channelgrouping: int = 0[source]#
The HDAWG channelgrouping property. (default = 0) corresponding to a single sequencer controlling a pair (2) awg outputs.
- mode: InstrumentOperationMode[source]#
The Instruments operation mode. (default = zhinst.InstrumentOperationMode.OPERATING)
- device_type: DeviceType[source]#
The Zurich Instruments hardware type. (default = DeviceType.NONE) This field is automatically populated.
- sample_rate: int | None = None[source]#
The Instruments sampling clock rate. This field is automatically populated.
- class CommandTableHeader(/, **data: Any)[source]#
Bases:
quantify_scheduler.structure.model.DataStructure
The CommandTable header definition.
- class CommandTableEntryValue(/, **data: Any)[source]#
Bases:
quantify_scheduler.structure.model.DataStructure
A CommandTable entry definition with a value.
- class CommandTableWaveform(/, **data: Any)[source]#
Bases:
quantify_scheduler.structure.model.DataStructure
The command table waveform properties.
- class CommandTableEntry(/, **data: Any)[source]#
Bases:
quantify_scheduler.structure.model.DataStructure
The definition of a single CommandTable entry.
- waveform: CommandTableWaveform[source]#
- class CommandTable(/, **data: Any)[source]#
Bases:
quantify_scheduler.structure.model.DataStructure
The CommandTable definition for ZI HDAWG.
- header: CommandTableHeader | None[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.
- class Instruction[source]#
Sequence base instruction record type.
- 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.
- class ZIChannelDescription(/, **data: Any)[source]#
Bases:
quantify_scheduler.structure.model.DataStructure
Information needed to specify a ZI Channel in the
ZIHardwareCompilationConfig
.A single ‘channel’ represents a complex output, consisting of two physical I/O channels on the Instrument.
- class ZIBaseDescription(/, **data: Any)[source]#
Bases:
quantify_scheduler.backends.types.common.HardwareDescription
Base class for a Zurich Instrument hardware description.
- class ZIHDAWG4Description(/, **data: Any)[source]#
Bases:
ZIBaseDescription
Information needed to specify a HDAWG4 in the
ZIHardwareCompilationConfig
.- instrument_type: Literal['HDAWG4'][source]#
The instrument type, used to select this datastructure when parsing a
ZIHardwareCompilationConfig
.
- channelgrouping: int[source]#
The HDAWG channelgrouping property impacting the amount of HDAWG channels per AWG that must be used.. (default = 0) corresponding to a single sequencer controlling a pair (2) awg outputs.
- clock_select: int[source]#
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)
- channel_0: ZIChannelDescription | None = None[source]#
Description of the first channel on this HDAWG (corresponding to 1 or 2 physical output ports).
- channel_1: ZIChannelDescription | None = None[source]#
Description of the second channel on this HDAWG (corresponding to 1 or 2 physical output ports).
- class ZIHDAWG8Description(/, **data: Any)[source]#
Bases:
ZIHDAWG4Description
Information needed to specify a HDAWG8 in the
ZIHardwareCompilationConfig
.- instrument_type: Literal['HDAWG8'][source]#
The instrument type, used to select this datastructure when parsing a
ZIHardwareCompilationConfig
.
- channel_2: ZIChannelDescription | None = None[source]#
Description of the third channel on this HDAWG (corresponding to 1 or 2 physical output ports).
- channel_3: ZIChannelDescription | None = None[source]#
Description of the fourth channel on this HDAWG (corresponding to 1 or 2 physical output ports).
- class ZIUHFQADescription(/, **data: Any)[source]#
Bases:
ZIBaseDescription
Information needed to specify a UHFQA in the
ZIHardwareCompilationConfig
.- instrument_type: Literal['UHFQA'][source]#
The instrument type, used to select this datastructure when parsing a
ZIHardwareCompilationConfig
.
- channel_0: ZIChannelDescription | None = None[source]#
Description of the readout channel on this UHFQA.
- ZIHardwareDescription[source]#
Specifies a piece of Zurich Instruments hardware and its instrument-specific settings.
Currently, the supported instrument types are:
ZIHDAWG4Description
,ZIHDAWG8Description
,ZIUHFQADescription
- class OutputGain(/, **data: Any)[source]#
Bases:
quantify_scheduler.structure.model.DataStructure
Gain settings for a port-clock combination.
These gain values will be set on each control-hardware output port that is used for this port-clock combination.
Example
hardware_compilation_config.hardware_options.gain = { "q0:res-q0.ro": Gain( output_1 = 1, output_2 = 1 ), }
- class ZIHardwareOptions(/, **data: Any)[source]#
Bases:
quantify_scheduler.backends.types.common.HardwareOptions
Datastructure containing the hardware options for each port-clock combination.
Example
Here, the HardwareOptions datastructure is created by parsing a dictionary containing the relevant information.
import pprint from quantify_scheduler.schemas.examples.utils import ( load_json_example_scheme )
from quantify_scheduler.backends.types.zhinst import ( ZIHardwareOptions ) zi_hw_options_dict = load_json_example_scheme( "zhinst_hardware_compilation_config.json")["hardware_options"] pprint.pprint(zi_hw_options_dict) zi_hw_options = ZIHardwareOptions.model_validate(zi_hw_options_dict) zi_hw_options
{'distortion_corrections': {'q0:fl-cl0.baseband': {'clipping_values': [-2.5, 2.5], 'filter_func': 'scipy.signal.lfilter', 'input_var_name': 'x', 'kwargs': {'a': [1], 'b': [0, 0.25, 0.5]}}}, 'latency_corrections': {'q0:mw-q0.01': 9.5e-08, 'q0:res-q0.ro': -9.5e-08, 'q1:mw-q1.01': 9.5e-08, 'q1:res-q1.ro': -9.5e-08}, 'mixer_corrections': {'q0:mw-q0.01': {'amp_ratio': 0.95, 'dc_offset_i': -0.0542, 'dc_offset_q': -0.0328, 'phase_error': 0.07}, 'q1:mw-q1.01': {'amp_ratio': 0.95, 'dc_offset_i': 0.042, 'dc_offset_q': 0.028, 'phase_error': 0.07}, 'q2:mw-q2.01': {'amp_ratio': 0.95, 'dc_offset_i': 0.042, 'dc_offset_q': 0.028, 'phase_error': 0.07}, 'q3:mw-q3.01': {'amp_ratio': 0.95, 'dc_offset_i': 0.042, 'dc_offset_q': 0.028, 'phase_error': 0.07}}, 'modulation_frequencies': {'q0:mw-q0.01': {'interm_freq': -100000000.0, 'lo_freq': None}, 'q0:res-q0.ro': {'interm_freq': 200000000.0, 'lo_freq': None}, 'q1:mw-q1.01': {'interm_freq': -100000000.0, 'lo_freq': None}, 'q2:mw-q2.01': {'interm_freq': -100000000.0, 'lo_freq': None}, 'q3:mw-q3.01': {'interm_freq': -100000000.0, 'lo_freq': None}}, 'output_gain': {'q0:mw-q0.01': {'gain_I': 1, 'gain_Q': 1}, 'q1:mw-q1.01': {'gain_I': 1, 'gain_Q': 1}, 'q2:mw-q2.01': {'gain_I': 1, 'gain_Q': 1}, 'q3:mw-q3.01': {'gain_I': 1, 'gain_Q': 1}}}
ZIHardwareOptions(latency_corrections={'q0:mw-q0.01': 9.5e-08, 'q1:mw-q1.01': 9.5e-08, 'q0:res-q0.ro': -9.5e-08, 'q1:res-q1.ro': -9.5e-08}, distortion_corrections={'q0:fl-cl0.baseband': SoftwareDistortionCorrection(filter_func='scipy.signal.lfilter', input_var_name='x', kwargs={'b': [0, 0.25, 0.5], 'a': [1]}, clipping_values=[-2.5, 2.5], sampling_rate=1000000000.0)}, modulation_frequencies={'q0:mw-q0.01': ModulationFrequencies(interm_freq=-100000000.0, lo_freq=None), 'q0:res-q0.ro': ModulationFrequencies(interm_freq=200000000.0, lo_freq=None), 'q1:mw-q1.01': ModulationFrequencies(interm_freq=-100000000.0, lo_freq=None), 'q2:mw-q2.01': ModulationFrequencies(interm_freq=-100000000.0, lo_freq=None), 'q3:mw-q3.01': ModulationFrequencies(interm_freq=-100000000.0, lo_freq=None)}, mixer_corrections={'q0:mw-q0.01': MixerCorrections(dc_offset_i=-0.0542, dc_offset_q=-0.0328, amp_ratio=0.95, phase_error=0.07), 'q1:mw-q1.01': MixerCorrections(dc_offset_i=0.042, dc_offset_q=0.028, amp_ratio=0.95, phase_error=0.07), 'q2:mw-q2.01': MixerCorrections(dc_offset_i=0.042, dc_offset_q=0.028, amp_ratio=0.95, phase_error=0.07), 'q3:mw-q3.01': MixerCorrections(dc_offset_i=0.042, dc_offset_q=0.028, amp_ratio=0.95, phase_error=0.07)}, output_gain={'q0:mw-q0.01': OutputGain(gain_I=1.0, gain_Q=1.0), 'q1:mw-q1.01': OutputGain(gain_I=1.0, gain_Q=1.0), 'q2:mw-q2.01': OutputGain(gain_I=1.0, gain_Q=1.0), 'q3:mw-q3.01': OutputGain(gain_I=1.0, gain_Q=1.0)})
- output_gain: Dict[str, OutputGain] | None = None[source]#
Dictionary containing the gain settings (values) that should be applied to the outputs that are connected to a certain port-clock combination (keys).