Gradients (qiskit_algorithms.gradients)#

Algorithms to calculate the gradient of a quantum circuit.

Base Classes#

BaseEstimatorGradient

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

BaseQGT

Base class to computes the Quantum Geometric Tensor (QGT) given a pure, parameterized quantum state.

BaseSamplerGradient

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

EstimatorGradientResult

Result of EstimatorGradient.

SamplerGradientResult

Result of SamplerGradient.

QGTResult

Result of QGT.

Finite Differences#

FiniteDiffEstimatorGradient

Compute the gradients of the expectation values by finite difference method [1].

FiniteDiffSamplerGradient

Compute the gradients of the sampling probability by finite difference method [1].

Linear Combination of Unitaries#

LinCombEstimatorGradient

Compute the gradients of the expectation values.

LinCombSamplerGradient

Compute the gradients of the sampling probability.

LinCombQGT

Computes the Quantum Geometric Tensor (QGT) given a pure, parameterized quantum state.

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].

Quantum Fisher Information#

QFIResult

Result of QFI.

QFI

Computes the Quantum Fisher Information (QFI) given a pure, parameterized quantum state.

Classical Methods#

ReverseEstimatorGradient

Estimator gradients with the classically efficient reverse mode.

ReverseQGT

QGT calculation with the classically efficient reverse mode.

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].