Hi Pennylane team!
I saw that many of the latest demos are about classification, and I thought it would be nice to have a dedicated Pennylane package specific for classification, with modules that specialize by approach (e.g. trainable embeddings, dressed NNs, etc.) or by algorithm class (SVM, transfer learning, CNNs).
Based on the desired level of granularity, the package could offer:
- a
layers
module to include layers that are not present (yet?) in PennyLanes’templates/layers
; - a
components
module that builds on thelayers
module to help with the creation of a circuit (e.g. defining a generalmeasurement
or a specificswap_test
); - a
qnn
module that, building on thecomponents
module, could contain example QNN architectures or classes that wrap QNN architectures such asDressedQuantumNet
(which could also offer decorators); - a
training
module that could contain generaltrain
methods or specifictrain_torch_model
ortrain_keras_model
methods.
The dependencies would be basically the framework(s) we would like to include, for instance torch
. I have created a temporary repository to start with some experiments, building on the quantum transfer learning demo: https://github.com/nvitucci/pennylane-classification (Apologies if I cut the original code here and there - it’s only for example purposes)
I think having such a module (whose name and scope may very well change upon your suggestions) would lower the barrier to create hybrid classical-quantum classifiers. I would love to get some feedback!
Nicola