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

Redesign gate call modifiers, and other things #86

Merged
merged 1 commit into from
Jan 31, 2024
Merged

Conversation

jlapeyre
Copy link
Collaborator

In order to work quickly, this PR does a few things. Some of which are
listed below.

  1. Redesign modified gate calls. In the AST modifiers are represented as a Vec of modifiers in a field in the GateCall struct.
    A similar structure is used in oq3_parser.

  2. Fix parsing gate call with HW qubit as first arg. For example h $0 now parses correctly
    Fixes Physical qubit identifiers do not work in gate calls #84

  3. Require parens around conditions in if and while statements. Parens around these conditions are demanded by the spec.

  4. Remove cruft and unused tags and identifiers that are not caught by compiler, clippy, and QA tools.

listed below.

1. Redesign modified gate calls. In the AST modifiers are represented as a `Vec` of modifiers
in a field in the `GateCall` struct.
A similar structure is used in `oq3_parser`.

2. Fix parsing gate call with HW qubit as first arg.
For example `h $0` now parses correctly
Fixes #84

3. Require parens around conditions in `if` and `while` statements.
   Parens around these conditions are demanded by the spec.

4. Remove cruft and unused tags and identifiers that are not caught
 by compiler, clippy, and QA tools.
@jlapeyre jlapeyre merged commit 8ae2f0b into main Jan 31, 2024
7 checks passed
jlapeyre added a commit that referenced this pull request Jan 31, 2024
This release fixes a few bugs and reworks how gate modifiers are implemented. Gate modifiers are represented in the ASG as a field in `GateCall` containing a Vec of modifiers.

* The change since the last version 0.0.6 is in a single PR: #86
@jlapeyre jlapeyre deleted the revert-gate-call branch February 2, 2024 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Physical qubit identifiers do not work in gate calls
1 participant