qiskit.opflow.gradients.Gradient.convert¶
- Gradient.convert(operator, params=None)[Quellcode]¶
- Parameter
operator (
OperatorBase
) – The operator we are taking the gradient of.params (
Union
[ParameterVector
,ParameterExpression
,List
[ParameterExpression
],None
]) – The parameters we are taking the gradient with respect to. If not explicitly passed, they are inferred from the operator and sorted by name.
- Rückgabetyp
- Rückgabe
An operator whose evaluation yields the Gradient.
- Verursacht
ValueError – If
params
contains a parameter not present inoperator
.ValueError – If
operator
is not parameterized.