QuTech-Delft / OpenQL

OpenQL: A Portable Quantum Programming Framework for Quantum Accelerators. https://dl.acm.org/doi/10.1145/3474222
https://openql.readthedocs.io
Other
100 stars 45 forks source link

QL_DOUT, debugging OpenQL #485

Open jvansomeren opened 1 year ago

jvansomeren commented 1 year ago

How is OpenQL debugged?

QL_DOUT around every statement makes the code less readable but QL_DOUT etc are useful to have an low-entry trace of events to get a first impression of what preceded a crash. An improvement would be to have pass-level toggles to turn them on/off, or to a particular level; note that this is at compiler run-time, passing options on the compiler command line to particular passes.