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

Add test for sequence before accessing argument #261

Closed bcdonovan closed 4 months ago

bcdonovan commented 4 months ago

This PR adds a guard to verify that a sequence is present in the argumentToDuration map before accessing the argument number. The sequence may not be present if a playOp is present in a sequence which is not actually called in a program. This may happen when manually editing a MLIR input file for testing (for example commenting out a pulse.call_sequence).