# Why does the state fidelity satisfy $\operatorname{tr}|\sqrt{\rho}\sqrt{\sigma}|=\operatorname{tr}\sqrt{\sigma^{1/2}\rho\sigma^{1/2}}$?

Given the the two states $$\rho$$ and $$\sigma$$ of a quantum system, with $$|\psi\rangle$$ and $$|\varphi\rangle$$ as their purification respectively, the fidelity is defined as:

$$F(\rho,\sigma)=\max_{|\psi\rangle,|\varphi\rangle}|\langle\psi|\varphi\rangle|$$

During the derivation of the expresssion, $$|\langle\psi|\varphi\rangle|$$ follows this inequality:

$$|\langle\psi|\varphi\rangle|\leq tr|\sqrt{\rho}\sqrt{\sigma}|=tr\sqrt{\rho^{\frac{1}{2}}\sigma\rho^{\frac{1}{2}}}$$

My workings for $$tr|\sqrt{\rho}\sqrt{\sigma}|$$ is as follows:

$$tr|\sqrt{\rho}\sqrt{\sigma}|=tr\sqrt{(\sqrt{\rho}\sqrt{\sigma})^\dagger(\sqrt{\rho}\sqrt{\sigma})}$$ $$=tr\sqrt{(\sqrt{\sigma}\sqrt{\rho})(\sqrt{\rho}\sqrt{\sigma})}$$ $$=tr\sqrt{\sigma^{\frac{1}{2}}\rho\sigma^{\frac{1}{2}}}$$

Why do I get an expression that is different from the definition?

$$F(\rho,\sigma) =\operatorname{tr}\sqrt{\sigma^{1/2}\rho\sigma^{1/2}}= \operatorname{tr}\sqrt{\rho^{1/2}\sigma\rho^{1/2}} \\ = \operatorname{tr}|\sqrt\rho\sqrt\sigma| = \operatorname{tr}|\sqrt\sigma\sqrt\rho| = \max_{\psi_\rho,\psi_\sigma}|\langle\psi_\rho|\psi_\sigma\rangle|.$$