  Quantum phase estimation algorithm (PEA) is one of the most important
algorithms in early studies of quantum computation. It is also a key for many
other quantum algorithms, such as the quantum counting algorithm and the Shor's
integer factorization algorithm. However, we find that the PEA is not an
unbiased estimation, which prevents the estimation error from achieving an
arbitrarily small level. In this paper, we propose an unbiased phase estimation
algorithm (UPEA) based on the original PEA, and study its application in
quantum counting. We also show that a maximum likelihood post-processing step
can further improve its robustness. In the end, we apply UPEA to quantum
counting, and use an additional correction step to make the quantum counting
algorithm unbiased.
