How to implement the mixed quantum state fidelity in a quantum circuit?

Suppose we use Uhlmann-Josza fidelity $$F(\rho, \sigma):=(\mathrm{tr}\sqrt{\sqrt{\rho}\sigma\sqrt{\rho}})^2$$, can we construct a quantum circuit that help us to calculate the fidelity of two mixed state?