Let two real matrices $A$ and $B$ be unitarily equivalent. How to determine (computationally or theoretically) the unitary operator $U$ s.t. $A = UBU^\dagger$? Is it possible for some special class of matrices? Please give me some references.



How to determine an unitary operator involved in an unitary transformation?
An algorithm for arbitrary matrices is given by Heydar Radjavi in 1962 (On unitary equivalence of arbitrary matrices, TAMS). The "arbitrary" in the title is there because the problem is trivial for normal matrices (you diagonalize both matrices, and check that the diagonalizations are the same up to order).


