How to check if two 2x2 unitary matrices are similar using python..Is there a speacial function for it
2026-03-25 17:39:37.1774460377
Similarity of unitary matrix
157 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
I don't quite know if there is a thing in Python for this, but two $2\times 2$ matrices (not necessarily in $U(2)$) are similar if and only if all of the following hold:
$\operatorname{tr} A=\operatorname{tr} B$
$\det A=\det B$
one of the following holds:
It must be noted, however, that since unitary matrices are always diagonalizable, $A,B\in U(2)$ together with $(1)\land(2)$ already imply $(3)$.