qit.utils.majorize¶
- qit.utils.majorize(x: array[float], y: array[float], tol: float = 1e-08) bool ¶
Majorization partial order of real vectors.
Returns True iff x is majorized by y, denoted by
. This is equivalent towhere
is the vector x with the elements sorted in nonincreasing order. if and only if x is in the convex hull of all the coordinate permutations of y.- Parameters
x (array[float]) – real vectors, equal length
y (array[float]) – real vectors, equal length
tol (float) – numerical tolerance
- Returns
- Return type
bool