SaashaJoshi / piQture

piQture: A quantum machine learning library for image processing.
https://saashajoshi.github.io/piQture/
Apache License 2.0
34 stars 15 forks source link

Callable should be a list of existing layers in the pipeline only. #42

Open SaashaJoshi opened 9 months ago

SaashaJoshi commented 9 months ago

The error handling logic in qcnn.py (will be transferred to quantum_neural_network.py after #36) that checks if operations[0][0] is a Callable should be specific in what callable functions/classes are allowed. For neural networks in general, sequence expects operations that are inherited from the BaseLayer class in base_layer.py.

https://github.com/SaashaJoshi/quantum-image-processing/blob/828a9297f9fa1976f531b23c98ad05623c2a1390/quantum_image_processing/neural_networks/qcnn.py#L57-L60

Without a specification of a particular quantum layer callable, in-built functions like print, sum, etc. pass the current tests.