stanza.drivers.utils

Module Contents

Functions

NameDescription
wait_until_job_is_pausedWaits until the OPX FPGA reaches a “pause” statement.
demod2voltsConverts the demodulated data to volts.

API

1stanza.drivers.utils.wait_until_job_is_paused(
2 job: qm.jobs.running_qm_job.RunningQmJob,
3 timeout: int = 30,
4 strict_timeout: bool = True
5) -> bool

Waits until the OPX FPGA reaches a “pause” statement.

Used when the OPX sequence needs to be synchronized with an external parameter sweep and to ensure that the OPX sequence is done before proceeding to the next iteration of the external loop, or when using IO variables:

Parameters:

timeout
intDefaults to 30

Duration in seconds after which the console will be freed even if the pause statement has not been

strict_timeout
boolDefaults to True

Will throw and exception is set to True, otherwise it will just a print a warning.

Returns:

True when the pause statement has been reached.

1stanza.drivers.utils.demod2volts(
2 data: float | numpy.ndarray,
3 duration: float | int,
4 single_demod: bool = False
5) -> float | numpy.ndarray

Converts the demodulated data to volts.

Parameters:

data
float | numpy.ndarray

demodulated data. Must be a python variable or array.

duration
float | int

demodulation duration in ns. WARNING: this must be the duration of one slice in

single_demod
boolDefaults to False

Flag to add the additional factor of 2 needed for single demod.

Returns:

The demodulated data in volts.