openqasm / qe-compiler

An MLIR based compiler dynamic circuit compiler for real-time control systems supporting OpenQASM 3
Other
38 stars 12 forks source link

[Backport 3.9] Add qasm3 generation error handling (#306) #316

Closed bcdonovan closed 3 months ago

bcdonovan commented 3 months ago

Backports support for returning diagnostics for OpenQASM3 generation errors. It also adds an extension to the MLIR diagnostics engine for returning qss-compiler diagnostics within any pass or context with better diagnostic handling through MLIR's builtin diagnostic handlers.

Returning a QSSC diagnostic from a pass should be as simple as

qssc::emitError(op, cat) << "Message";
taalexander commented 3 months ago

I think this is missing @mbhealy clang tidy backports first.