Skip to content

Python Core API compile_seqc

zhinst.core.compile_seqc(code, devtype, options, index, samplerate=None, sequencer=None, wavepath=None, waveforms=None, filename=None)

Compile the sequencer code.

This function is a purely static function that does not require an active connection to a Data Server.

.. versionadded:: 22.08

Parameters:

Name Type Description Default
code str

SeqC input

required
devtype str

target device type, e.g., HDAWG8, SHFQC

required
options Union[str, List[str]]

list of device options, or string of options separated by newlines as returned by node /dev.../features/options.

required
index int

index of the AWG core

required
samplerate Optional[float]

target sample rate of the sequencer Mandatory and only respected for HDAWG. Should match the value set on the device: /dev.../system/clocks/sampleclock/freq.

None
sequencer Optional[str]

one of 'qa', 'sg', or 'auto'. Mandatory for SHFQC.

None
wavepath Optional[str]

path to directory with waveforms. Defaults to path used by LabOne UI or AWG Module.

None
waveforms Optional[str]

list of CSV waveform files separated by ';'. Defaults to an empty list. Set to None to include all CSV files in wavepath.

None
filename Optional[str]

name of embedded ELF filename.

None

Returns:

Type Description
Tuple[bytes, Dict[str, Any]]

Tuple (elf, extra) of binary ELF data for sequencer and extra dictionary with compiler output.

Note

The same function is available in the zhinst-seqc-compiler package. zhinst.core.compile_seqc will forward the call to zhinst.seqc_compiler.compile_seqc if a compatible version of this package is installed. A version is compatible if major and minor package versions match, and the revision of zhinst-seqc-compiler is greater or equal to the revision of zhinst-core. A warning will be issued if the versions do not match.