-
Notifications
You must be signed in to change notification settings - Fork 29
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
✨ Add support for OpenQASM 3.0 else
#498
Conversation
else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was quick. Many thanks!
I just added some small little comments. Nothing too major.
I'll also re-run the coverage tests (they seem to be failing more frequently again recently). That's not on us though, but on the codecov service.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #498 +/- ##
=======================================
- Coverage 90.8% 90.8% -0.1%
=======================================
Files 127 128 +1
Lines 13846 13867 +21
Branches 2174 2177 +3
=======================================
+ Hits 12579 12598 +19
- Misses 1267 1269 +2
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for the PR. I just updated a few things and optimized the code a little.
The remaining lines are, per definition, uncoverable. So I am ignoring the failing patch coverage check.
Thanks! |
Description
This PR adds support for the
else
branch inif
statements when parsing OpenQASM 3.0.Example:
This is implemented by adding a second ClassicalControlledOperation to the Quantum Computation with a flipped condition.
When dumping the circuit above, the following is printed:
Checklist: