qit.invariant.makhlin_inv

qit.invariant.makhlin_inv(U: np.array[complex]) np.array[float]

Makhlin local invariants of a two-qubit gate.

Computes a vector of the three real Makhlin invariants [13] corresponding to the U(4) gate U. Alternatively, given a vector of canonical invariants normalized to [0,1], returns the corresponding Makhlin invariants [14].

Parameters

U (np.array[complex]) – U(4) matrix

Returns

Makhlin local invariants of U

Return type

np.array[float]

Alternatively, U may be given in terms of a vector of three canonical local invariants.