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
In the AST node for the barrier statement, the arguments following the barrier keyword are Expressions.
I think it should rather be similar to the AST node for the reset statement in which the arguments are registers or qubits (Union[IndexedIdentifier, Identifier]).
As a side note, this particular part of the documentation seems outdated, citing OpenQASM 2 instead of OpenQASM 3:
The barrier instruction of OpenQASM 2 prevents [...]
Expected enhancement?
Make the AST node more specific (List[Union[IndexedIdentifier, Identifier]] instead of List[Expression]) or, if the barrier statement should accept more than quantum registers, make this explicit in the documentation.
Also, update the documentation to at least cite OpenQASM 3 instead of OpenQASM 2.
The text was updated successfully, but these errors were encountered:
The issue
In the AST node for the
barrier
statement, the arguments following thebarrier
keyword areExpression
s.I think it should rather be similar to the AST node for the
reset
statement in which the arguments are registers or qubits (Union[IndexedIdentifier, Identifier]
).The corresponding documentation seems to agree:
As a side note, this particular part of the documentation seems outdated, citing OpenQASM 2 instead of OpenQASM 3:
Expected enhancement?
List[Union[IndexedIdentifier, Identifier]]
instead ofList[Expression]
) or, if thebarrier
statement should accept more than quantum registers, make this explicit in the documentation.The text was updated successfully, but these errors were encountered: