-
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
Allow multiplication of SparsePauliOp and ParameterExpression #10264
Allow multiplication of SparsePauliOp and ParameterExpression #10264
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:
|
This should have unit test(s) to verify that multiplication by a parameter expression works, and continues to do so, as expected. This should also have a release note informing about this new feature. |
Thank you @woodsp-ibm for the suggestions. Should I write a separate testing function for this or add it to the current |
If adding new parameterexpression value(s) to the current test works out with the current code then that would be ok. It already deals with a param and having that now as value I do not know how well things would fit to the code given how you might want/need to check the outcome. If it turns out better to be a separate test, save complicating what's there, I think that's fine. |
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.
Thank you for the PR. Agree with @woodsp-ibm, it needs some tests. The dtype of the coeffs must be handled carefully.
Note added: also needs a release note for the new feature.
…neGasperini/qiskit-terra into sparsepauliop_mul_parameter
Thank you again for the feedback. I added the tests and the release note. |
Hi, as far as the test failure sometimes other changes affect things - in this case its failing due to a change in newly released qiskit aer - #10270 addresses this so after thats merged and your branch is updated to include it then things should be ok. |
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.
Thank you for adding tests and a release note. LGTM!
Pull Request Test Coverage Report for Build 5257229470
💛 - Coveralls |
…#10264) * Allow multiplication of SparsePauliOp and ParameterExpression * Add unit tests for SparsePauliOp and ParameterExpression multiplication * Add release note for the new feature
Summary
Fix issue #10185 relying on the already implemented and tested method
SparsePauliOp._multiply
.