qml.math.convert_to_su4¶
- convert_to_su4(U, return_global_phase=False)[source]¶
Convert a 4x4 matrix to \(SU(4)\).
- Parameters:
U (array[complex]) – A matrix, presumed to be \(4 \times 4\) and unitary.
return_global_phase (bool) – If True, the return will include the global phase. If False, only the \(SU(4)\) representation is returned.
- Returns:
A \(4 \times 4\) matrix in \(SU(4)\) that is equivalent to U up to a global phase. If
return_global_phase=True
, a 2-element tuple is returned, with the first element being the \(SU(4)\) equivalent and the second, the global phase.- Return type:
array[complex]
code/api/pennylane.math.convert_to_su4
Download Python script
Download Notebook
View on GitHub