Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.
Important

IBM Quantum Platform is moving and this version will be sunset on July 1. To get started on the new platform, read the migration guide.

qiskit.algorithms.gradients


Gradients

qiskit.algorithms.gradients

Base Classes

BaseSamplerGradient(sampler[, options])Base class for a SamplerGradient to compute the gradients of the sampling probability.
BaseEstimatorGradient(estimator[, options])Base class for an EstimatorGradient to compute the gradients of the expectation value.

Estimator Gradients

FiniteDiffEstimatorGradient(estimator, ...)Compute the gradients of the expectation values by finite difference method.
LinCombEstimatorGradient(estimator, **options)Compute the gradients of the expectation values.
ParamShiftEstimatorGradient(estimator, **options)Compute the gradients of the expectation values by the parameter shift rule
SPSAEstimatorGradient(estimator, epsilon[, ...])Compute the gradients of the expectation value by the Simultaneous Perturbation Stochastic Approximation (SPSA).

Sampler Gradients

FiniteDiffSamplerGradient(sampler, epsilon, ...)Compute the gradients of the sampling probability by finite difference method.
LinCombSamplerGradient(sampler, **options)Compute the gradients of the sampling probability.
ParamShiftSamplerGradient(sampler, **options)Compute the gradients of the sampling probability by the parameter shift rule.
SPSASamplerGradient(sampler, epsilon[, ...])Compute the gradients of the sampling probability by the Simultaneous Perturbation Stochastic Approximation (SPSA).

Results

EstimatorGradientResult(gradients, metadata, ...)Result of EstimatorGradient.
SamplerGradientResult(gradients, metadata, ...)Result of SamplerGradient.
Was this page helpful?
Report a bug or request content on GitHub.