-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Enable proper iteration over Statevector
#8062
Conversation
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the the following people are requested to review this:
|
0ca7d04
to
0f9f3c6
Compare
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.
Thanks for this! The formatter's complaints are just minor - I left the command to fix them up below.
Please could you add a "bugfix" release note? You can run reno new statevector-enable-iter
and edit the file it says it created to do that.
Thanks for reviewing the PR and for providing instructions regarding the release note and formatting checking protocols! |
Pull Request Test Coverage Report for Build 2334794780
💛 - Coveralls |
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.
Looks good to me, thanks for the changes!
Thank you for the constructive discussion! |
There's no need to manually update the PR - we've got a bot that does it for us. There's quite a few things in the queue to merge right now, which is why it looks like it's just sitting, but it will do it on its own. |
@Mergifyio refresh |
✅ Pull request refreshed |
* Enable proper iteration over Statevector * Add Statevector.__len__ and add a release note * Simplify release note * Update test_statevctor_iter Co-authored-by: Jake Lishman <jake.lishman@ibm.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit da9ae54)
* Enable proper iteration over Statevector * Add Statevector.__len__ and add a release note * Simplify release note * Update test_statevctor_iter Co-authored-by: Jake Lishman <jake.lishman@ibm.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit da9ae54) Co-authored-by: Hristo Georgiev <hristog@users.noreply.github.com>
* Enable proper iteration over Statevector * Add Statevector.__len__ and add a release note * Simplify release note * Update test_statevctor_iter Co-authored-by: Jake Lishman <jake.lishman@ibm.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Summary
Fixes #8039.
This is achieved by enabling proper iteration over
Statevector
.Details and comments
I've opted to not add a docstring to the newly-added
__iter__
method, as I believe it's quite straightforward. Please, let me know if documentation should be added there and/or elsewhere.I am new to the project, so if you could please suggest whether a release note needs to be added in the case of this PR.
Thanks!