-
Notifications
You must be signed in to change notification settings - Fork 60
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
Alternating Ansatz Feature #85
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #85 +/- ##
==========================================
+ Coverage 87.30% 87.40% +0.09%
==========================================
Files 67 67
Lines 8924 9096 +172
==========================================
+ Hits 7791 7950 +159
- Misses 1133 1146 +13
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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 code looks functional, and implements what's needed to build custom mixer blocks! I am approving this PR. However, let's create a new branch after this merge to improve the documentation of some of the newly added functions @shahidee44
Description
QAOACircuitParams
Class to allow for more flexible implementations of the mixer part of the circuitQAOACircuitParams
initialization input parameter name change frommixer_hamiltonian
tomixer_block
. (To emphasise the possible different input types that is accepted by the input parameter.)mixer_block
allows the user to specify a List ofRotationGateMap
objects that the user wishes to use for the mixer portion of his alternating ansatz circuit. (This input parameter still allows for an inputHamiltonian
object)mixer_coeffs
is an optional parameter that must to be filled if the user uses a List ofRotationGateMap
objects to specify themixer_block
.QAOACircuitParams
have new attributes that allow the user to access information that used to be stored only with theHamiltonian
objects. These new attributes provide a new interface for users to access these information. Some of the values are recreated within the object to emulate what is expected since themixer_block
input accepts different object types.HamiltonianMapper
object that lets the mapper also work with a List ofRotationGateMap
objects.RotationGateMap
objects that makes thepauli_label
attribute optional for initialization.RotationGateMap
objects.QAOACircuitParams
QAOACircuitParams
attributes.mixer_hamiltonian
as an input initialization parameter forQAOACircuitParams
are updated tomixer_block
Checklist
Type of change
How Has This Been Tested?
test_parameters_plot.py (Changed
mixer_hamiltonian
keyword withmixer_block
)