-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't workingc++Anything related to C++ codeAnything related to C++ code
Description
Environment information
Any environment
Description
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.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingc++Anything related to C++ codeAnything related to C++ code