Closed co9olguy closed 4 years ago
I agree. I would love to contribute to this effort
After having had a look at the paper I think that this only works for VQC. If the objective function is a more complicated function of the inputs I don't see how to implement that approach, essentially because it is gradient free and just minimizes the expectation of the circuit. But in general optimization this must not give the optimal cost.
I'm currently working on a tutorial for these algorithms; hopefully it can serve as a guide for implementing them as optimizer classes or something similar. As long as the cost function is a linear sum of expectations I think they work fine.
This is now implemented over at https://pennylane.ai/qml/app/tutorial_rotoselect.html
The paper "Quantum circuit structure learning" proposes two new algorithms for optimizing parameterized quantum circuits,
Rotosolve
andRotoselect
.These work by recognizing that, if all other parameters are frozen, then the optimum value of a single parameter can be written as a simple sine function, with terms determined by certain circuit evaluations at shifted parameters. Thus, one can "jump" directly to a minimum by inverting a simple equation. The drawback is that you only update one parameter at a time.
These algorithms seem very straightforward, and could possibly be coded up as separate
Optimizer
classes within PennyLane (though I haven't 100% worked out if any changes would needed to other parts of the codebase). This might make a good community PR!(suggested by @willzeng :) )