-
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
Fix VQD's optimal_values
#10279
Fix VQD's optimal_values
#10279
Conversation
One or more of the the following people are requested to review this:
|
And a bug fix release note |
Pull Request Test Coverage Report for Build 5289745616
💛 - Coveralls |
This reverts commit 5000d2f.
@@ -200,6 +200,24 @@ def store_intermediate_result(eval_count, parameters, mean, metadata, step): | |||
np.testing.assert_array_almost_equal(history["mean"], ref_mean, decimal=2) | |||
np.testing.assert_array_almost_equal(history["step"], ref_step, decimal=0) | |||
|
|||
@data(H2_PAULI, H2_OP, H2_SPARSE_PAULI) | |||
def test_optimal_values(self, op): | |||
"""Test running same VQD twice to re-use optimizer, then switch optimizer""" |
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.
The description here seems to be a copy/paste from the following test, but...
...I guess the check for this field could have been added as a subtest under the test_basic_operator above that seems to have subtests for a bunch of the result fields, rather than a new test which has to run the VQD computation again.
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.
yes, you're totally right, I overlooked that. Fixed in bfa1bac
* Fix optimal values * Add unittest * Add reno * Update unittest * Revert "Update unittest" This reverts commit 225cd09e1ae08cd48f5196fd1d3a87a549f0164a. * Update test * Make test subtest
* Fix optimal values * Add unittest * Add reno * Update unittest * Revert "Update unittest" This reverts commit 5000d2fb02e8126b376d9cd30d2862c202af2755. * Update test * Make test subtest
Summary
Fixes #10263
Details and comments
I think that there should be a unit test checking this, will add soon.