Similarity of unitary matrix

157 Views Asked by At

How to check if two 2x2 unitary matrices are similar using python..Is there a speacial function for it

1

There are 1 best solutions below

3
On BEST ANSWER

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:

  1. $\operatorname{tr} A=\operatorname{tr} B$

  2. $\det A=\det B$

  3. one of the following holds:

    • $\operatorname{tr}^2 A-4\det A\ne 0$
    • $\operatorname{tr}^2 A-4\det A=0$ and $A=\frac{\operatorname{tr A}}2I=B$
    • $\operatorname{tr}^2 A-4\det A=0$, $A\ne \frac{\operatorname{tr A}}2I$ and $B\ne \frac{\operatorname{tr A}}2I$

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)$.