-
-
Notifications
You must be signed in to change notification settings - Fork 162
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
2189 remove unused folding functions #2289
Conversation
…e.scaling subpackage and in tests
…om_right in testing
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2289 +/- ##
==========================================
+ Coverage 98.28% 98.30% +0.02%
==========================================
Files 90 90
Lines 4263 4260 -3
==========================================
- Hits 4190 4188 -2
+ Misses 73 72 -1 ☔ View full report in Codecov by Sentry. |
|
||
+++ {"id": "DRplhovffVfk"} | ||
|
||
<!-- #region id="DRplhovffVfk" --> |
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 wonder why there is so much noise in the diff of this file. It would be nice to have only a diff that matters.
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'm not an expert in Myst, but perhaps it's because I converted this to a jupyter notebook to run it and then converted it back to .md using jupytext? @natestemen Do you have insight on this?
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 sounds like a good explanation.
I have never modified any of them myself, but I think it's worth putting some effort into finding (and documenting) a workflow that doesn't create this clutter. It will make reviews easier.
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.
Your theory aligns with what I've seen in the past working with jupytext
. If you wouldn't mind removing the unnecessary differences in this PR as a temporary workaround, it would be appreciated.
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.
Correct me if I'm wrong here, but it looks like the .md version of this notebook in main is actually also messed up?
That is, it's displaying the info about Jupytext versions at the top and includes a bunch of lines like
+++ {"id": "DRplhovffVfk"}
?
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.
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.
@natestemen This item should be the last thing. Not sure if we want to include fixing the formatting on this notebook in this PR or not, since it's present in main. The functional part is done.
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.
It looks like you've done a bit of clean up in this PR, but lets keep the rest in a subsequent PR. Even though the markdown does render a little strangely here on GitHub, it looks fine on the live documentation, which is what matters most.
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.
Cool. In that case should be ready to merge.
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.
A formal approval is needed before merging. Now that you've added more commits since the first review, typically a second round of review would be initiated to ensure the new additions look good as well. To initiate another round of review you can request it using the "Re-request review" feature.
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.
Looking good! A few minor comments, but all the important stuff is done.
BTW can you ensure your GitHub commits are affiliated with your GitHub user?
Yup exactly. Compare your screenshot to these commits. From inspecting the commits on this branch it seems that you are using your UF email for email config which is a great idea, but it looks like GitHub does not that Here's one of the commits from this branch which you can see from running
|
Co-authored-by: nate stemen <nate@unitary.fund>
Co-authored-by: nate stemen <nate@unitary.fund>
…sed arguments for fold_method
…xample not to use fold_gates_from_left
Gotcha thanks, I added my UF email address to my Github account so it should all be linked now. |
from your mitiq local folder. |
Ah, why thank you! I didn't realize you needed to install the hooks as well as having them in your .git-hooks file. |
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.
LGTM
* Removed all instances of fold_from_left and fold_from_right in the zne.scaling subpackage and in tests * Updating typo in .gitignore * Formatting * removed remaining instances of fold_gates_from_left and fold_gates_from_right in testing * reverted accidentally modified .md notebook * formatting * Formatting for notebook md to myst * Remove fold_method as parameter for test * Update docstring to acurately reflect how folding indices are chosen (i.e. randomly) * Uncomment fold_gates_from_left call, as using directives now Co-authored-by: nate stemen <nate@unitary.fund> * Replace note with note directive Co-authored-by: nate stemen <nate@unitary.fund> * Removing the id outputs * Switching wording 'deprecated' to 'removed' * Remove parameterization for tests with only one test case, remove unused arguments for fold_method * Formatting * Remove fold_gates_from_left from pennylane demo * Previous commit msg was in error. This commit updates the pennylane example not to use fold_gates_from_left * Change notes to warnings, uncomment fold_gates_from_left and right code * Remove fold_gates_from_right from vqe-pennylane example, formatting * remove folding_method as optional argument to _create_fold_mask --------- Co-authored-by: nate stemen <nate@unitary.fund>
Description
zne.scaling.fold_gates_from_left
andzne.scaling.fold_gates_from_right
as they have not been widely used by the community.Remaining question: do we want to eliminate the 'fold_method' argument from
zne.scaling.folding._create_fold_mask
function as explained in this comment?License
Before opening the PR, please ensure you have completed the following where appropriate.