- class OpflowQNN(operator, input_params=None, weight_params=None, exp_val=None, gradient=None, quantum_instance=None, input_gradients=False)¶
Pending deprecation: Opflow Quantum Neural Network.
Deprecated since version unknown: The OpflowQNN class has been superseded by the qiskit_machine_learning.neural_networks.EstimatorQNN This class will be deprecated in a future release and subsequently removed after that.
operator (OperatorBase) – The parametrized operator that represents the neural network.
exp_val (ExpectationBase | None) – The Expected Value converter to be used for the operator.
gradient (Gradient | None) – The Gradient converter to be used for the operator’s backward pass.
input_gradients (bool) – Determines whether to compute gradients with respect to input data. Note that this parameter is
Falseby default, and must be explicitly set to
Truefor a proper gradient computation when using
Returns whether gradients with respect to input data are computed by this neural network in the
backwardmethod or not.
Returns the number of input features.
Returns the number of trainable weights.
Returns the underlying operator of this QNN.
Returns the output shape.
Returns the quantum instance to evaluate the operator.
Returns whether the output is sparse or not.
Backward pass of the network.
Forward pass of the network.