I have a set of matrices $A_i$ that are representations the generators of a group within a certain basis, and $B_i$ are equivalent representations under a different basis.
How can I find a single unitary transformation $U$ that represents this change of basis, thus transforming all $U A_i U^{-1} = B_i$ for all i? All I have are the matrices $A_i$ and $B_i$ and I need $U$.
For a single pair $A_1$ and $B_1$ it would be easy (as discussed here):
Let $P$ and $S$ be the matrices that diagonalize $A_1$ and $B_1$. Then $U A_1 U^{-1} = B_1$ is solved for $U=SP^{-1}$.
But this does not guarantee that the same $U$ will do the trick for all $A_i$ and $B_i$.