Messages and Errors¶
The following section describe how to manage the outputted level of messages to the console, as well as common runtime errors.
Messages control¶
As part of the normal program flow, there are messages which are outputted into the python console. There are four different level of messages:
- Debug - Debug messages, off by default.
- Info - Normal OPX status, mainly when executing a program.
- Warnings - Important warnings, such as client version does not match server version.
- Errors - Error messages, usually compilation errors.
It is possible to change the level which is outputted by using the following commands:
Where level can be either 'DEBUG', 'INFO', 'WARNING' or 'ERROR'.
The commands above will work starting from . For earlier versions, please use:
Note
We do not recommend setting the level to 'ERROR', as important warning messages might be missed.
Note
The logger.setLevel command need to be called before opening the QuantumMachineManager
Note
It is possible to disable the output of the logger into the stdout by adding an environment variable named
QM_DISABLE_STREAMOUTPUT
to the OS
Runtime Errors¶
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 can be indicated in one of two ways:
- When fetching results, if a runtime error occurred, a warning message will be printed
- by calling
QmJob.execution_report()
and querying its output.
Below we outline different runtime error types and what do they mean.
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.
Note
It is possible for an overflow to occur with no indication. Therefore when in doubt, it always smart to double check using a scope or a simulation.