English
Languages
English
Shortcuts



QuadraticObjective.evaluate

QuadraticObjective.evaluate(x)[source]

Evaluate the quadratic objective for given variable values.

Parameters

x (Union[ndarray, List, Dict[Union[int, str], float]]) – The values of the variables to be evaluated.

Return type

float

Returns

The value of the quadratic objective given the variable values.

Raises

QiskitOptimizationError – if the shape of the objective function does not match with the number of variables.