-
Notifications
You must be signed in to change notification settings - Fork 73
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
dialects: (stim) Add parser for .stim formatted strings #3122
Conversation
…d files in one folder
Co-authored-by: Sasha Lopoukhine <[email protected]>
Co-authored-by: Sasha Lopoukhine <[email protected]>
Clean up some of the parser implementation ie. use in_angle_brackets Co-authored-by: Sasha Lopoukhine <[email protected]>
…lproject/xdsl into kim/stim/first-annotation-op
…s to test the stim printer and parser.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3122 +/- ##
==========================================
- Coverage 90.13% 90.12% -0.01%
==========================================
Files 452 453 +1
Lines 56953 57109 +156
Branches 5468 5490 +22
==========================================
+ Hits 51333 51471 +138
- Misses 4173 4183 +10
- Partials 1447 1455 +8 ☔ View full report in Codecov by Sentry. |
INDENT = re.compile(r"[ \t]*") | ||
SPACE = re.compile(r"[ \t]") | ||
ARG = re.compile(r"\d+(\.\d+)?") | ||
# PAULI = re.compile("|".join(re.re.escape(p.value) for p in PauliSpelling)) |
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.
commented code, seems like these might be better merged together with the code that leverages them?
Stim circuits are fomatted as detailed on this page:
https://github.com/quantumlib/Stim/blob/main/doc/file_format_stim_circuit.md
This pr adds a parser that can parse this format into stim dialect operations, and adds tests for the parsing of existing operations