-
Notifications
You must be signed in to change notification settings - Fork 9
Update the included OpenQASM grammar to OpenQASM 3.1.0 #24
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
Merged
braised-babbage
merged 13 commits into
openqasm:main
from
hodgestar:feature/update-to-openqasm-3-1
Jul 29, 2024
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
fc08a7e
Update the included OpenQASM grammar to OpenQASM 3.1.
hodgestar dafb722
Add _parse_scoped_statements to OpenPulseNodeVisitor.
hodgestar c219acf
Update ANTRL versions to include the more recent versions supported b…
hodgestar 077a7b1
Add switch statement to OpenPulse grammar.
hodgestar a7f2387
Add printer tests for switch statement.
hodgestar c60e532
Add switch statement visitor to OpenPulseNodeVisitor.
hodgestar ef8652f
Add parser test for switch statement.
hodgestar 1124793
Add list of supported specification versions.
hodgestar 65d7e8d
Add __all__ to define interface of openpulse package.
hodgestar 8879225
Update CI Python and ANTLR versions to match those used by the openqa…
hodgestar e9b9713
Require openqasm3 1.0.0 or greater.
hodgestar 8f05365
Update required openqasm3 verion in requirements.txt to 1.0.0 or grea…
hodgestar ca57dbf
Merge branch 'main' into feature/update-to-openqasm-3-1
hodgestar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
4.9.2 | ||
4.10.1 | ||
4.11.1 | ||
4.12.0 | ||
4.13.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
""" | ||
===================================================== | ||
Supported Specification Metadata (``openpulse.spec``) | ||
===================================================== | ||
|
||
.. currentmodule:: openpulse.spec | ||
|
||
Metadata on the specifications supported by this package. | ||
|
||
.. autodata:: supported_versions | ||
""" | ||
|
||
__all__ = ["supported_versions"] | ||
|
||
#: A list of specification versions supported by this | ||
#: package. Each version is a :code:`str`, e.g. :code:`'3.0'`. | ||
supported_versions = [ | ||
"3.0", | ||
"3.1", | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
antlr4-python3-runtime | ||
openqasm3>=0.5,<1.0 | ||
openqasm3>=1.0.0,<2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import re | ||
|
||
|
||
from openpulse.spec import supported_versions | ||
|
||
|
||
class TestSupportedVersions: | ||
SPEC_VERSION_RE = r"^(?P<major>[0-9]+)\.(?P<minor>[0-9]+)$" | ||
|
||
def test_supported_versions(self): | ||
assert supported_versions == ["3.0", "3.1"] | ||
|
||
def test_types(self): | ||
assert all(type(x) is str for x in supported_versions) # noqa | ||
|
||
def test_version_formats(self): | ||
assert all(re.match(self.SPEC_VERSION_RE, x) for x in supported_versions) |
Oops, something went wrong.
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.
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.
Nice idea