Gradients (qiskit_machine_learning.gradients)

Algorithms to calculate the gradient of a cost landscape to optimize a given objective function.

Base Classes

BaseEstimatorGradient

Base class for an EstimatorGradient to compute the gradients of the expectation value.

BaseSamplerGradient

Base class for a SamplerGradient to compute the gradients of the sampling probability.

EstimatorGradientResult

Result of EstimatorGradient.

SamplerGradientResult

Result of SamplerGradient.

Linear combination of unitaries

LinCombEstimatorGradient

Compute the gradients of the expectation values.

LinCombSamplerGradient

Compute the gradients of the sampling probability.

Parameter-shift rules

ParamShiftEstimatorGradient

Compute the gradients of the expectation values by the parameter shift rule [1].

ParamShiftSamplerGradient

Compute the gradients of the sampling probability by the parameter shift rule [1].

Simultaneous Perturbation Stochastic Approximation

SPSAEstimatorGradient

Compute the gradients of the expectation value by the Simultaneous Perturbation Stochastic Approximation (SPSA) [1].

SPSASamplerGradient

Compute the gradients of the sampling probability by the Simultaneous Perturbation Stochastic Approximation (SPSA) [1].