You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
unroll() rejects inv @ on a gate whose body contains nop #477
unroll() rejects inv @ on a custom gate whose body contains nop. nop is its own inverse, so this should unroll to the same nops.
frompyqasmimportloadsm=loads('OPENQASM 3.0;\ninclude "stdgates.inc";\ngate g a { nop a; }\nqubit[1] q;\ninv @ g q[0];')
m.unroll()
# ValidationError: Unsupported / undeclared QASM operation: nop
The same happens on main with openqasm3 1.0.1 and on #475 with 1.0.2. The inverse path (map_qasm_inv_op_to_callable) has no entry for nop. Without inv, g q[0]; unrolls to nop q[0];.
Activity