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.

CircuitGradient

class CircuitGradient

GitHub

Bases: qiskit.opflow.converters.converter_base.ConverterBase

Circuit to gradient operator converter.

Converter for changing parameterized circuits into operators whose evaluation yields the gradient with respect to the circuit parameters.

This is distinct from DerivativeBase converters which take gradients of composite operators and handle things like differentiating combo_fn’s and enforcing product rules when operator coefficients are parameterized.

CircuitGradient - uses quantum techniques to get derivatives of circuits DerivativeBase - uses classical techniques to differentiate operator flow data structures


Methods Defined Here

convert

abstract CircuitGradient.convert(operator, params=None)

Parameters

Return type

OperatorBase

Returns

An operator whose evaluation yields the Gradient.

Raises

ValueError – If params contains a parameter not present in operator.

Was this page helpful?
Report a bug or request content on GitHub.