-
Notifications
You must be signed in to change notification settings - Fork 575
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
[QAOA] Small Changes to Cost Hamiltonians #741
Conversation
Codecov Report
@@ Coverage Diff @@
## master #741 +/- ##
===========================================
+ Coverage 48.50% 95.62% +47.12%
===========================================
Files 111 111
Lines 6944 6945 +1
===========================================
+ Hits 3368 6641 +3273
+ Misses 3576 304 -3272
Continue to review full report at Codecov.
|
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 think this is a great improvement!
…into cost-changes
Context:
Part of the ongoing addition of QAOA functionality to PennyLane
Description of the Change:
Makes some small changes to the
pennylane/qaoa/cost.py
file. Instead of returning just a cost Hamiltonian, the functions corresponding to each optimization problem will also return a mixer Hamiltonian that is "recommended" for each problem. This is motivated by the fact that in some instances, using the "recommended mixer is actually crucial to the algorithms success. In addition, there are instances where the mixer Hamiltonian that should be used for an optimization problem is highly non-trivial to construct, and is specific to one optimization problem.The user would obtain the cost and mixer Hamiltonians as follows: