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 adding it to the QuantumMachinesManager
object:
from qm import QuantumMachinesManager
qmm = QuantumMachinesManager(host='...', port=..., log_level=level)
Where level can be either 'DEBUG', 'INFO', 'WARNING' or 'ERROR'.
After the QuantumMachinesManager
object is created, it is possible to change the level of the messages by using the following command:
Note
We do not recommend setting the level to 'ERROR', as important warning messages might be missed.
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.
Error code 10201¶
The error message says: "General error in inter-controller communication detected on the sending/receiving side in controller XXX - please gather logs and report to QM" This is a known false error and can be ignored. If you encounter in addition any data integrity issues, please report to us.