helpers#
Helpers for Zurich Instruments.
Module Contents#
Functions#
|
Gets the value of a ZI node. |
|
Sets the value of a ZI node. |
|
Sets the value of a ZI node. |
|
Sets the vector value of a ZI node. |
|
Sets the value of a AWG module node. |
|
Uploads and compiles the AWG sequencer program. |
|
Sets the command table wave vector for an awg of an instrument. |
|
Sets the commandtable JSON for an AWG. |
|
Returns the LabOne directory of an AWG. |
|
Returns the source directory of an AWG. |
|
Returns the waves directory of an AWG. |
|
Writes the contents of to the source directory |
|
Returns a dictionary that contains the locations of |
|
Returns a bitmask to enable readout channels. |
|
Returns the allowed sampling rate values. |
Extract acquisition metadata from a schedule. |
|
|
Private function containing the logic of extract_acquisition_metadata_from_schedule. |
Attributes#
- get_value(instrument: zhinst.qcodes.base.ZIBaseInstrument, node: str) numpy.ndarray [source]#
Gets the value of a ZI node.
- Parameters:
instrument
node
- Returns:
: The node value.
- set_value(instrument: zhinst.qcodes.base.ZIBaseInstrument, node: str, value: object) None [source]#
Sets the value of a ZI node.
- Parameters:
instrument – The instrument.
path – The node path.
value – The new node value.
- set_values(instrument: zhinst.qcodes.base.ZIBaseInstrument, value: list[tuple[str, Any]]) None [source]#
Sets the value of a ZI node.
- Parameters:
instrument – The instrument.
value – The dictionary with nodes and values.
- set_vector(instrument: zhinst.qcodes.base.ZIBaseInstrument, node: str, value: list | str) None [source]#
Sets the vector value of a ZI node.
- Parameters:
instrument – The instrument.
awg_index – The awg to configure.
node – The node path.
value – The new node vector value.
- set_awg_value(instrument: zhinst.qcodes.base.ZIBaseInstrument, awg_index: int, node: str, value: int | str) None [source]#
Sets the value of a AWG module node.
- Parameters:
instrument – The instrument.
awg_index – The awg to configure.
node – The node path.
value – The new node value.
- set_and_compile_awg_seqc(instrument: zhinst.qcodes.base.ZIBaseInstrument, awg_index: int, node: str, value: str) None [source]#
Uploads and compiles the AWG sequencer program.
- Parameters:
instrument – The ZI instrument object.
awg_index – The awg to configure.
node – The node path.
value – The seqc program.
waveforms_dict – The new waveforms for comparison.
- set_wave_vector(instrument: zhinst.qcodes.base.ZIBaseInstrument, awg_index: int, wave_index: int, vector: list | str) None [source]#
Sets the command table wave vector for an awg of an instrument.
- Parameters:
instrument – The instrument.
awg_index – The index of an AWG
wave_index – The wave index.
vector – The vector value.
- set_commandtable_data(instrument: zhinst.qcodes.base.ZIBaseInstrument, awg_index: int, json_data: dict[str, Any] | str) None [source]#
Sets the commandtable JSON for an AWG.
- Parameters:
instrument – The instrument
awg_index – The awg index.
json_data – The json data.
- get_directory(awg: zhinst.qcodes.hdawg.AWG) pathlib.Path [source]#
Returns the LabOne directory of an AWG.
- Parameters:
awg – The HDAWG AWG object.
- Returns:
: The path of this directory.
- get_src_directory(awg: zhinst.qcodes.hdawg.AWG) pathlib.Path [source]#
Returns the source directory of an AWG.
- Parameters:
awg – The HDAWG AWG object.
- Returns:
: The path to the source directory.
- get_waves_directory(awg: zhinst.qcodes.hdawg.AWG) pathlib.Path [source]#
Returns the waves directory of an AWG.
- Parameters:
awg – The HDAWG AWG object.
- Returns:
: The path to the waves directory.
- write_seqc_file(awg: zhinst.qcodes.hdawg.AWG, contents: str, filename: str) pathlib.Path [source]#
Writes the contents of to the source directory of LabOne.
- Parameters:
awg – The HDAWG AWG instance.
contents – The content to write.
filename – The name of the file.
- Returns:
: Returns the path which was written.
- get_waveform_table(pulse_ids: list[int], pulseid_pulseinfo_dict: dict[int, dict[str, Any]]) dict[int, int] [source]#
Returns a dictionary that contains the locations of pulses in the AWG waveform table.
- Parameters:
pulse_ids – The list of pulse ids.
pulseid_pulseinfo_dict – The info lookup dictionary.
- Returns:
: The waveform table dictionary.
- get_readout_channel_bitmask(readout_channels_count: int) str [source]#
Returns a bitmask to enable readout channels. The bitmask can be used to turn on QA for induvidual channels in startQAResult.
- Parameters:
readout_channels_count – The amount of readout channels to enable. Maximum readout channels for UHFQA is 10.
- Returns:
: The channel bitmask.
- get_sampling_rates(base_sampling_rate: float) dict[int, int] [source]#
Returns the allowed sampling rate values. See zhinst User manuals, section /DEV…./AWGS/n/TIME.
- Parameters:
base_sampling_rate – The Instruments base sampling rate.
- Returns:
dict[int, int] The node value and corresponding sampling rate. e.g. {0: 2400000, 1:1200000, …} for the HDAWG.
- extract_acquisition_metadata_from_schedule(schedule: Schedule) quantify_scheduler.backends.types.zhinst.AcquisitionMetadata [source]#
Extract acquisition metadata from a schedule.
This function operates under certain assumptions with respect to the schedule.
The acquisition_metadata should be sufficient to initialize the xarray dataset (described in quantify-core !212) that executing the schedule will result in.
All measurements in the schedule use the same acquisition protocol.
The used acquisition index channel combinations for each measurement are unique.
The used acquisition indices for each channel are the same.
When
BinMode
isAPPEND
The number of data points per acquisition index assumed to be given by the schedule’s repetition property. This implies no support for feedback (conditional measurements).
- Parameters:
schedule – schedule containing measurements from which acquisition metadata can be extracted.
- Returns:
: The acquisition metadata provides a summary of the acquisition protocol, bin-mode, return-type and acquisition indices of the acquisitions in the schedule.
- Raises:
AssertionError – If not all acquisition protocols in a schedule are the same. If not all acquisitions use the same bin_mode. If the return type of the acquisitions is different.
- _extract_acquisition_metadata_from_acquisition_protocols(acquisition_protocols: list[dict[str, Any]], repetitions: int) quantify_scheduler.backends.types.zhinst.AcquisitionMetadata [source]#
Private function containing the logic of extract_acquisition_metadata_from_schedule.
The logic is factored out as to work around limitations of the different interfaces required.
- Parameters:
acquisition_protocols – A list of acquisition protocols.
repetitions – How many times the acquisition was repeated.