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
Two aspects of the OpenQASM standard are not respected by the current implementation for custom gates:
Custom gate definitions cannot access underlying registers, only the qubits that were passed to them. The current implementation assumes this is possible, so dome of the parsing and data dependency logic is incorrect, and assertions can access quantum registers even in custom gate definitions.
Custom gate definitions should also support angle parameters, which, at the moment, they don't.
Expected behavior
Something like this should not work:
qreg q[3];
gate test t {
assert-ent t, q[0];
}
Something like this should work:
gate test(x) t {
...
}
How to Reproduce
Run the two code snippets above in the debugger.
The text was updated successfully, but these errors were encountered:
Environment information
Any environment
Description
Two aspects of the OpenQASM standard are not respected by the current implementation for custom gates:
Expected behavior
Something like this should not work:
Something like this should work:
How to Reproduce
Run the two code snippets above in the debugger.
The text was updated successfully, but these errors were encountered: