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.
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
Noise Scaling for LRE #2347
Noise Scaling for LRE #2347
Changes from 15 commits
1b61317
63297af
11c5261
7b3e2fe
105a787
f6885cc
34da8ef
47c9e00
7f0fbf9
ed02c60
c7edf46
a631380
45feb84
94b46d2
609f86d
14c0f7e
fa3c320
22fd4e6
71a6430
599b3a5
11920be
bfe07bd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This can raise an UnfoldableCircuitError, it should be documented in the docstring of this caller function as well.
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.
I had included it previously. #2347 (comment)
We should agree on style guidelines for this project and update the docs style guidelines section on docstrings.
Couple of things that confused me:
UnfoldableCircuitError
once as a defined exception. Since_check_foldable
is a private function, the error raised by the function does not show up publicly.As we rely on google-style docstrings, there is no convention to allow lists in the description of the different sections of a docstring. Portions of our API-doc have run-on sentences because someone used a list in the section description which appear as badly formatted sentences publicly.
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.
Side note: Are we still supporting versions of Python that wouldn't allow
-> list[Circuit]
vs.List[Circuit]
?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.
This is a good question. Which versions of python did you have in mind? I know there's an open issue to drop 3.9 once we add support for 3.12.
The validate workflow only runs for python 3.11 which is used for type checking by mypy.
mitiq/.github/workflows/build.yml
Lines 25 to 32 in 837ea83
From what I could find, 3.9 uses
list[Circuit]
as a type alias andList[Circuit]
for type annotations. Same with 3.10.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.
TIL that type aliases
List
andDict
are deprecated starting from Python 3.9 https://docs.python.org/3/library/typing.html#deprecated-aliases