qrisp.cold.DCQOProblem.QUBO_cost#

DCQOProblem.QUBO_cost(res)[source]#

Returns the cost y = x^T Q x for a given binary array x.

Parameters:
resnp.array

The array to calculate the cost for.

Returns:
costfloat

The QUBO cost.