For two unknown mixed quantum states $\rho$ and $\sigma$ in an $N$-dimensional Hilbert space, computing their fidelity $F(\rho,\sigma)$ is a basic problem with many important applications information, for example verification characterization of the outputs computer, design analysis algorithms. In this paper, we propose algorithm that solves $\operatorname{poly}(\log (N), r, 1/\varepsilon)$ tim...