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
layersmodule to include layers that are not present (yet?) in PennyLanes’templates/layers; - a
componentsmodule that builds on thelayersmodule to help with the creation of a circuit (e.g. defining a generalmeasurementor a specificswap_test); - a
qnnmodule that, building on thecomponentsmodule, could contain example QNN architectures or classes that wrap QNN architectures such asDressedQuantumNet(which could also offer decorators); - a
trainingmodule that could contain generaltrainmethods or specifictrain_torch_modelortrain_keras_modelmethods.
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