Ngôn ngữ
English
Bengali
French
Hindi
Italian
Japanese
Korean
Malayalam
Russian
Spanish
Tamil
Turkish
Vietnamese



OpflowQNN

class OpflowQNN(operator, input_params=None, weight_params=None, exp_val=None, gradient=None, quantum_instance=None, input_gradients=False)[source]

Bases: NeuralNetwork

Pending deprecation: Opflow Quantum Neural Network.

Tham số:
  • operator (OperatorBase) -- The parametrized operator that represents the neural network.

  • input_params (Optional[List[Parameter]]) -- The operator parameters that correspond to the input of the network.

  • weight_params (Optional[List[Parameter]]) -- The operator parameters that correspond to the trainable weights.

  • exp_val (Optional[ExpectationBase]) -- The Expected Value converter to be used for the operator.

  • gradient (Optional[Gradient]) -- The Gradient converter to be used for the operator's backward pass.

  • quantum_instance (Union[Backend, QuantumInstance, None]) -- The quantum instance to evaluate the network.

  • input_gradients (bool) -- Determines whether to compute gradients with respect to input data. Note that this parameter is False by default, and must be explicitly set to True for a proper gradient computation when using TorchConnector.

Attributes

input_gradients

Returns whether gradients with respect to input data are computed by this neural network in the backward method or not.

operator

Returns the underlying operator of this QNN.

quantum_instance

Returns the quantum instance to evaluate the operator.

Methods