English
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.circuit.ParameterExpression.gradient

ParameterExpression.gradient(param)[source]

Get the derivative of a parameter expression w.r.t. a specified parameter expression.

Parameters

param (Parameter) – Parameter w.r.t. which we want to take the derivative

Return type

Union[ParameterExpression, complex]

Returns

ParameterExpression representing the gradient of param_expr w.r.t. param or complex or float number