Let $M_1$ and $M_2$ be two real positive-semidefinite matrices. Is there any algorithm to compute a permutation matrix $P$ to minimize $\| M_1-PM_2P^T \|_F^2$ or equivalently to maximize $trace(M_1PM_2P^T)$?
To be simple, for $i=1,2$, further assume $M_i=Q_iQ_i^T$, where $Q_i$ has orthonormal columns.