qp.math.convert_to_su4

convert_to_su4(U)[source]

Convert a 4x4 matrix to \(SU(4)\).

Parameters:

U (array[complex]) – A matrix, presumed to be \(4 \times 4\) and unitary.

Returns:

A \(4 \times 4\) matrix in \(SU(4)\) that is equivalent to U up to a global phase, and the global phase.

Return type:

array[complex], float