-
Notifications
You must be signed in to change notification settings - Fork 71
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
base: main
Are you sure you want to change the base?
Conversation
…d files in one folder
Co-authored-by: Sasha Lopoukhine <superlopuh@gmail.com>
Co-authored-by: Sasha Lopoukhine <superlopuh@gmail.com>
Clean up some of the parser implementation ie. use in_angle_brackets Co-authored-by: Sasha Lopoukhine <superlopuh@gmail.com>
…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.06% 90.05% -0.01%
==========================================
Files 438 439 +1
Lines 54952 55108 +156
Branches 8536 8565 +29
==========================================
+ Hits 49491 49629 +138
- Misses 4071 4081 +10
- Partials 1390 1398 +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