Redesign gate call modifiers, and other things #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to work quickly, this PR does a few things. Some of which are
listed below.
Redesign modified gate calls. In the AST modifiers are represented as a
Vec
of modifiers in a field in theGateCall
struct.A similar structure is used in
oq3_parser
.Fix parsing gate call with HW qubit as first arg. For example
h $0
now parses correctlyFixes Physical qubit identifiers do not work in gate calls #84
Require parens around conditions in
if
andwhile
statements. Parens around these conditions are demanded by the spec.Remove cruft and unused tags and identifiers that are not caught by compiler, clippy, and QA tools.