# How do I prove that $\newcommand{\tr}{\operatorname{Tr}}\tr(A \sqrt{B} A \sqrt{B}) = \tr\Big[\Big(\sqrt{\sqrt{B}} A \sqrt{\sqrt{B}}\Big)^2\Big]$?

Let's say I have 2 density operators $$A$$ and $$B$$. Now, here is what I am trying to calculate: $$\newcommand{\tr}{\operatorname{trace}} \tr(A \sqrt{B} A \sqrt{B}).$$ I saw that this trace can be rewritten as: $$\tr(A \sqrt{B} A \sqrt{B}) = \tr\Bigg(\Big(\sqrt{\sqrt{B}} A \sqrt{\sqrt{B}}\Big)^2\Bigg).$$

I was wondering, which property of trace is being used here. I do not think the cyclic property would help, would it?

\begin{align} \text{tr}\left(\left(\sqrt{\sqrt{B}}A\sqrt{\sqrt{B}}\right)^2\right) &= \text{tr}\left(\sqrt{\sqrt{B}}A\sqrt{\sqrt{B}}\sqrt{\sqrt{B}}A\sqrt{\sqrt{B}}\right)\\ &= \text{tr}\left(\sqrt{\sqrt{B}}A\sqrt{B}A\sqrt{\sqrt{B}}\right)\\ &= \text{tr}\left(A\sqrt{B}A\sqrt{\sqrt{B}}\sqrt{\sqrt{B}}\right)\\ &= \text{tr}\left(A\sqrt{B}A\sqrt{B}\right) \end{align}