Optimizer for Hybrid NN using keras

Hello i have builded a sequential hybrid NN using keras and a quantum node. It works perfectly. I wonder if i can use double stochastic optimizer or something relevant so i can reduce the training time. Typically i run for 16qubits , 20-30 epochs and total run time is 40hours or so.

Also by increasing number of qubits i get better results but if increase qubits more than 12 i get worse results, could that be an indicator of barren plateau?

Many thanks!!!

Hi @NikSchet!

I wonder if i can use double stochastic optimizer or something relevant so i can reduce the training time.

Maybe it’s worth a shot :slight_smile: Let us know if it works!

Another approach could be to switch the quantum device you are running to one that is more optimized. Or even to change the QNode differentiation method.

Also by increasing number of qubits i get better results but if increase qubits more than 12 i get worse results, could that be an indicator of barren plateau?

This is a potential reason, however it is hard to tell without examining the optimization landscape. With more than 12 qubits, is the gradient each time you initialize the model close to 0?