How can I make variational learning faster?

Hi @Kuma-quant :slight_smile:

I’m running some profiling to check out what the bottlenecks are, but I have two ideas that might help.

First, try initializing the QNode with mutable=False. The structure of the circuit doesn’t change with you parameters, so you don’t need to rebuild the circuit each time.

@qml.qnode(dev, diff_method="adjoint", mutable=False)

Next, we have a release coming out tonight that will have about a 15% decrease in adjoint speed. So either get that release once it gets uploaded, or install PennyLane from source right now.

Hope those help :slight_smile: