or equivalently Tr{| log U| 2 }). In principle, we can change the signs of the columns of the U matrix to find the optimal matrix with the minimal norm. However, such a direct bruteforce search would require 2 Ns matrix logarithm evaluations, which is very expensive for many electronic states. Therefore, instead of the direct minimization, there are several protocols for choosing the phases.