helpers ======= .. py:module:: quantify_scheduler.backends.zhinst.helpers .. autoapi-nested-parse:: Helpers for Zurich Instruments. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: quantify_scheduler.backends.zhinst.helpers.get_value quantify_scheduler.backends.zhinst.helpers.set_value quantify_scheduler.backends.zhinst.helpers.set_values quantify_scheduler.backends.zhinst.helpers.set_vector quantify_scheduler.backends.zhinst.helpers.set_awg_value quantify_scheduler.backends.zhinst.helpers.set_and_compile_awg_seqc quantify_scheduler.backends.zhinst.helpers.set_wave_vector quantify_scheduler.backends.zhinst.helpers.set_commandtable_data quantify_scheduler.backends.zhinst.helpers.get_directory quantify_scheduler.backends.zhinst.helpers.get_src_directory quantify_scheduler.backends.zhinst.helpers.get_waves_directory quantify_scheduler.backends.zhinst.helpers.write_seqc_file quantify_scheduler.backends.zhinst.helpers.get_waveform_table quantify_scheduler.backends.zhinst.helpers.get_readout_channel_bitmask quantify_scheduler.backends.zhinst.helpers.get_sampling_rates Attributes ~~~~~~~~~~ .. autoapisummary:: quantify_scheduler.backends.zhinst.helpers.logger .. py:data:: logger .. py:function:: get_value(instrument: zhinst.qcodes.base.ZIBaseInstrument, node: str) -> numpy.ndarray Gets the value of a ZI node. :param instrument: :param node: :returns: The node value. .. py:function:: set_value(instrument: zhinst.qcodes.base.ZIBaseInstrument, node: str, value) -> None Sets the value of a ZI node. :param instrument: The instrument. :param path: The node path. :param value: The new node value. .. py:function:: set_values(instrument: zhinst.qcodes.base.ZIBaseInstrument, value: List[Tuple[str, Any]]) -> None Sets the value of a ZI node. :param instrument: The instrument. :param value: The dictionary with nodes and values. .. py:function:: set_vector(instrument: zhinst.qcodes.base.ZIBaseInstrument, node: str, value: Union[List, str]) -> None Sets the vector value of a ZI node. :param instrument: The instrument. :param awg_index: The awg to configure. :param node: The node path. :param value: The new node vector value. .. py:function:: set_awg_value(instrument: zhinst.qcodes.base.ZIBaseInstrument, awg_index: int, node: str, value: Union[int, str]) -> None Sets the value of a AWG module node. :param instrument: The instrument. :param awg_index: The awg to configure. :param node: The node path. :param value: The new node value. .. py:function:: set_and_compile_awg_seqc(instrument: zhinst.qcodes.base.ZIBaseInstrument, awg_index: int, node: str, value: str) Uploads and compiles the AWG sequencer program. :param instrument: The ZI instrument object. :param awg_index: The awg to configure. :param node: The node path. :param value: The seqc program. :param waveforms_dict: The new waveforms for comparison. .. py:function:: set_wave_vector(instrument: zhinst.qcodes.base.ZIBaseInstrument, awg_index: int, wave_index: int, vector: Union[List, str]) -> None Sets the command table wave vector for an awg of an instrument. :param instrument: The instrument. :param awg_index: The index of an AWG :param wave_index: The wave index. :param vector: The vector value. .. py:function:: set_commandtable_data(instrument: zhinst.qcodes.base.ZIBaseInstrument, awg_index: int, json_data: Union[Dict[str, Any], str]) -> None Sets the commandtable JSON for an AWG. :param instrument: The instrument :param awg_index: The awg index. :param json_data: The json data. .. py:function:: get_directory(awg: zhinst.qcodes.hdawg.AWG) -> pathlib.Path Returns the LabOne directory of an AWG. :param awg: The HDAWG AWG object. :returns: The path of this directory. .. py:function:: get_src_directory(awg: zhinst.qcodes.hdawg.AWG) -> pathlib.Path Returns the source directory of an AWG. :param awg: The HDAWG AWG object. :returns: The path to the source directory. .. py:function:: get_waves_directory(awg: zhinst.qcodes.hdawg.AWG) -> pathlib.Path Returns the waves directory of an AWG. :param awg: The HDAWG AWG object. :returns: The path to the waves directory. .. py:function:: write_seqc_file(awg: zhinst.qcodes.hdawg.AWG, contents: str, filename: str) -> pathlib.Path Writes the contents of to the source directory of LabOne. :param awg: The HDAWG AWG instance. :param contents: The content to write. :param filename: The name of the file. :returns: Returns the path which was written. .. py:function:: get_waveform_table(pulse_ids: List[int], pulseid_pulseinfo_dict: Dict[int, Dict[str, Any]]) -> Dict[int, int] Returns a dictionary that contains the locations of pulses in the AWG waveform table. :param pulse_ids: The list of pulse ids. :param pulseid_pulseinfo_dict: The info lookup dictionary. :returns: The waveform table dictionary. .. py:function:: get_readout_channel_bitmask(readout_channels_count: int) -> str Returns a bitmask to enable readout channels. The bitmask can be used to turn on QA for induvidual channels in startQAResult. :param readout_channels_count: The amount of readout channels to enable. Maximum readout channels for UHFQA is 10. :returns: The channel bitmask. .. py:function:: get_sampling_rates(base_sampling_rate: float) -> Dict[int, int] Returns the allowed sampling rate values. See zhinst User manuals, section /DEV..../AWGS/n/TIME. :param base_sampling_rate: The Instruments base sampling rate. :returns: The node value and corresponding sampling rate. e.g. {0: 2400000, 1:1200000, ...} for the HDAWG. :rtype: Dict[int, int]