Error Indications and Error Reporting¶
When running a QUA program, run-time errors may occur. In this section we address all common error types and explain how they are handled. We also explain how to send error logs to QM for support and debugging purposes.
Runtime Errors¶
Runtime errors are indicated in two ways:
When fetching results, if a runtime error occured, a warning message will be printed
by calling
QmJob.execution_report()
and querying its output.
Below we outline different runtime error types and how they are indicated
Analog output overflow¶
Indicates if the value played to an analog output at any sample is outside the range -0.5 to 0.5 - 2^-16, which causes an output overflow.
Detailed explanation
The \(I\) and \(Q\) waveforms undergo multiplication by an amplitude scaling matrix (see Amplitude transformations), then by the IF rotation + frame matrix waveform matrix and finally by the mixer correction matrix (see Mixed Inputs Element). The waveform signal is then added to the DC offset values, and this is output to the analog output. Overflow errors can occur anywhere within the signal chain and are hard to catch. This error type will indicate if such an overflow error occurred anywhere during the runtime of the program.
Note
Starting from version 0.6, the behavior of the analog output when an overflow is that the output will be clipped to the maximal value rather than wrap-around (e.g 0.5 will not be wrapped around to -0.5 but will instead be clipped to 0.5 - 2^-16).
Demodulation overflow¶
Indicates if an overflow occurred in the signal demodulation chain.
Detailed explanation
When using the integration and demodulation features of the measure()
statement,
a complex Demodulation and measurement sequence occurs in the controller. It is
crucial to select the integration weights so that overflow will not occur within the process, using the
following rule of thumb:
make sure the integration weights are such that when they multiply the raw ADC data, scaled to between -0.5 and 0.5, the result is between -2 and 2.
For additional details how to avoid demodulation overflow errors, refer to Fixed point format.
Amp overflow¶
Indicates an overflow error in * amp(), for values outside -8 to 8 - 2^-28 (see Amplitude transformations).
For example:
x = declare(fixed)
assign(x, 13.4)
play('pulse1' * amp(x), 'qe1')
Correction matrix overflow¶
Indicates an overflow in the correction matrix used to output a pulse, for values outside -2 to 2 - 2^-16.
Relevant for correction matrices set in the configuration or in update_correction()
.
Out of bounds array read/write¶
Warning
Currently errors are not indicated for out of bounds array read/write and this is the responsibility of the user.
Invalid wait time/pulse duration¶
Warning
Valid wait times/pulse durations are between 4 clock cycles (16 nsec) to 2^24 clock cycles (2^26 nsec). Runtime values outside this range are not indicated and may lead to unexpected results.