Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AST / Documentation] Unclear specification for the barrier instruction #461

Open
nelimee opened this issue Apr 3, 2023 · 0 comments
Open
Labels
clarify specification Change text of spec, not (mainly) semantics of spec

Comments

@nelimee
Copy link
Contributor

nelimee commented Apr 3, 2023

The issue

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]).

The corresponding documentation seems to agree:

The syntax is barrier qregs|qubits;

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.
@jlapeyre jlapeyre added the clarify specification Change text of spec, not (mainly) semantics of spec label Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarify specification Change text of spec, not (mainly) semantics of spec
Projects
None yet
Development

No branches or pull requests

2 participants