Closed SaashaJoshi closed 1 month ago
QIR methods that encode pixel_vals
in the basis state of the quantum circuit cannot be replaced with ParameterVector
when the pixel_vals
argument is None
. The reason is that a basis state is created by converting the pixel values to a binary string, and until a ParameterVector
is assigned
integral values it cannot be converted to a binary format.
This incapability of defaulting pixel_vals
to None
also confirms that the current dependence of piQture
on the Qiskti Machine Learning
library and its neural_network
module for classification cannot be utilized with QIR encodings that encode color information in the basis state of the quantum circuit (#35). This dependence must be removed, or the basis state encodings must be deemed incompatible with training neural networks and other QML models.
Data encoding classes should not require a
pixel_value
argument such that the encoding technique can be used withSamplerQNN
orEstimatorQNN
primitives. The primitives, currently, require that thecircuit
orneural_network
and thepixel_values
orinput_params
be passed separately for model training purposes.An ideal data encoding function should look like below:
The
feature_param
attribute should be accessible from outside the function/class as well. This can be built as a property method in an encoding class.