qiskit.optimization.problems.LinearExpression.evaluate_gradient¶
-
LinearExpression.
evaluate_gradient
(x)[source]¶ Evaluate the gradient of the linear expression for given variables.
- Parameters
x (
Union
[ndarray
,List
,Dict
[Union
[int
,str
],float
]]) – The values of the variables to be evaluated.- Return type
ndarray
- Returns
The value of the gradient of the linear expression given the variable values.