Closed xmax1 closed 3 years ago
@Nick-Singstock do you have any thought?
@BryceFuller I believe the new gradient logic that has just been added has product rule support. Presumably this issue could be addressed by allowing AQGD to support a gradient function that was passed in rather than just ignore it as today. Any thoughts - would the gradient need to be typed checked here to ensure it was an analytic gradient? Is this something you might be able to take a look at?
Taging also @adekusar-drl to give his opinion on this.
Closing as there is a issue now opened in Terra to fix this in conjunction with the gradient framework that did not exist at the time.
Informations
What is the current behavior?
Computes wrong gradient for qaoa. qiskit > aqua > components > optimizers > aqgd > deriv line 101 Computes the parameter shift rule for the params. Does not include the product rule for when one parameter is used for more than one gate.
Steps to reproduce the problem
Init qaoa circuit Compute gradient Compare with actual gradient (using, say, pennylane)
What is the expected behavior?
Uses product rule
Suggested solutions
Use the product rule