How can I make this Quvolution Demo's convolutional layer trainable as well?

This is the demo:

The quantum convolution layer in this demo is not trained, i.e. the parameters are solidified, so how to make this quantum convolution layer trainable?

Hey @RX1,

You need to define some loss / cost function that is a measure of how close the model’s prediction is to the corresponding input image and optimize that. The parameters rand_params in circuit would be the things that get tuned to optimize the cost function. Check out our other QML demos to get a sense for how that works: Quantum Machine Learning | PennyLane Demos :slight_smile:

Let me know if this helps!