to localize around the Wannier center.[]{data-label="fig:blochOptWF"}](blochCritWF){width="0.95\columnwidth"}

It is easy to recognize that the equality $$\int_{\text{UC}}d^{2}r\left|\text{Re}({{\mathbf{W}}_{n \mathbf{0}}}({\mathbf{r}}))\right|=\frac{1}{\sqrt{N}}\sum_{{\mathbf{k}}\in\text{BZ}}\int_{\text{UC}}d^{2}r\left|\text{Re}({{\mathbf{B}}_{n \mathbf{k}}})\right|$$ holds, if the conditions (ii) and (iii) are fulfilled. Since the Wannier functions are chosen to be real-valued (i), the functional on the left-hand side is maximized by the same set of $\phi_{n{\mathbf{k}}}$ as $\mathcal{I}^W_{n}(\{\phi_{n{\mathbf{k}}}\})$, which proves the theorem.

The maximization problem can be solved analytically leading to the following set of Bloch phases $$\tan(2\phi_{{\mathbf{k}}})=\frac{-\int_{\text{UC}}d^{2}r2\text{Re}(\tilde{B}_{n\mathbf{k}})\text{Im}(\tilde{B}_{n\mathbf{k}})}{\int_{\text{UC}}d^{2}r\{\text{Re}(\tilde{B}_{n\mathbf{k}})^{2}-\text{Im}(\tilde{B}_{n\mathbf{k}})^{2}\}},
\label{eq:blochCrit_solution}$$ where $\tilde B_{n{\mathbf{k}}} = 
\left[{\mathbf{\tilde B}}_{n{\mathbf{k}}}({\mathbf{r}})\cdot{\mathbf{\tilde B}}_{n{\mathbf{k}}}({\mathbf{r}})\right]^{1/2}$ is the (complex) amplitude of the vector Bloch function. Relation defines the Bloch optimization criterion. Note that the phases which are transformed by $\phi_{{\mathbf{k}}}\rightarrow\phi_{{\mathbf{k}}}+\pi$, or equivalently ${\mathrm{e}^{\mathrm{i} \phi_{{\mathbf{k}}}}}\rightarrow{\mathrm{e}^{\mathrm{i} (\phi_{{\mathbf{k}}}+\pi)}}=-{\mathrm{e}^{\mathrm{i} \phi_{{\mathbf{k}}}}}$, also fulfill . Furthermore, the phases which fulfill also obey and, therefore, the Wannier functions optimized with respect to the Bloch criterion are real-valued, as initially assumed.

Due to the strongly oscillatory nature of Bloch functions in coordinate space (especially for the higher order bands), condition (ii) will hardly be fulfilled exactly in a realistic system. But the conditions (i) and (iii) can always be fulfilled simply by correct choice of the phase factor sign. In figure \[fig:blochOptWF\] an example of the Bloch criterion optimization is shown for the Sq-D 