-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 QAOA #5622
Fix QAOA #5622
Conversation
I found that this change breaks some unit tests of chemistry, e.g., test/chemistry/test_uccsd_hartree_fock.py Update: I fixed this problem. See my comment below. |
I found out the root cause. |
Ok. At first sight it looks like the order of the check_operator and creation of var form were just swapped with the added qubit check that you would think was for efficiency to prevent building out the var form again, and if you did it would not be an issue. The check though is in fact needed because of this parameter sorting. With the code change on the move from Aqua, which removed the operator from constructor and the setter, meaning it can only be passed on the compute_min_eigval, I think going forwards there is room to improve refactor/improve the logic around this checking/building etc. Especially if the parameters end up with a defined ordering #5614 |
* Fix QAOA * revert unnecessary change
* Fix QAOA * revert unnecessary change
Summary
Fix QAOA of opflow.
Details and comments