-
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
Natural Gradient implementation #964
Conversation
I remember during one of the past I haven't tested anything but it seems to me it would be faster + introduce way less complexity to the underlying code, since it would not require a graph representation of the circuit. Was that tested by anyone? @WanderingMike @MatteoRobbiati . I'm asking because calculating this matrix is relevant not only here, but it could also be a function in the |
@renatomello I am currently trying to benchmark both methods to see if there is a big gap in performance. The big advantage with the graph method is that you don't need to build a new circuit for every gate that you're considering. You can go layer by layer through the circuit and calculate the variance directly on all qubits with the same circuit. This should in theory become advantageous if you have circuit sizes >> 1. Sidenote: Also, from a high-level point-of-view, it might make sense to start looking at using graphs as a general method in the qibo backend, though this is a larger discussion to be had. It might be a better representation for large circuits |
8e95957
to
69e6349
Compare
When this moves forward, I'd like to ask for the subroutine that calculates the Quantum Fisher Information / geometric tensor to be implemented inside the |
@renatomello and @scarrazza do you have some notes/docs on the gradient types that you are implementing? Is this linked to a larger feature request? @derenliu (phd student of Pinaki Sengupta at NTU SG) will be looking at gradients from the geometrical perspective for the dbi model and @wrightjandrew and @MatteoRobbiati and @Sam-XiaoyueLi wanted to also look at gradients to optimize iterations. We could use onboarding Deren as an occasion to add some notes to the docs and examples/tutorial notebooks. @jeongrak-son and @Ashwinie-Ghanesh are also interested in the theory so maybe could help add to notes |
Closing this here, but I am going to open an issue in the Qiboml repo. |
Implementation of the Natural Gradient. First, the optimizer class has to be merged and only then will the tests run
Checklist: