The Amplitude Amplification paper states in Theorem 13:
For any positive integers $M$ and $k$, and any Boolean function $f: \{0,1,\ldots,N-1\}\rightarrow\{0,1\}$, the algorithm Count $\left(f,M\right)$ outputs an estimate $t^{\prime}$ to $t=|f^{-1}(1)|$ such that $$|t^{\prime}-t|\le2\pi k \frac{\sqrt{t\left(N-t\right)}}{M}+\pi^2k^2\frac{N}{M^2}$$ with probability at least $8/k^2$ when $k=1$, and with probability greater then $1-\frac{1}{2\left(k-1\right)}$ for $k\ge 2$. If $t=0$ then $t^{\prime}=0$ with certainty, and if $t=N$ and $M$ is even, then $t^{\prime}=N$ with certainty.
The Count algorithm uses the QPE-based amplitude estimation algorithm.
I would appreciate clarification regarding the assertion that the algorithm can tell with certainty when there are no solutions ($t=0$).
The algorithm seems to provide "immediate" unsatisfiability certificates to any co-NP problem.
What is the "fine print"? what is the size of the QPE register, hence the number of controlled Grover operators, that are required?
Update
Despite comments that the algorithm does not violate any complexity issues, this algorithm could solve SAT (and all NP-complete problems) in linear time:
- first check if the SAT function has a solution with a single invocation of Count$\left(f,M\right)$. If no solutions exist - exit
- fix $x_1=1$, and check whether $g\left(x_2,\ldots,x_n\right)=f\left(1,x_2,\ldots,x_n\right)$ has a solution. the result tells us whether $x_1=1$ or $x_1=0$
- using the known variables, repeat step 2 with functions of decreasing number of variables
- after $n$ iterations, we learn the values of all variables which satisfy the SAT
So, either the Count$\left(f,M\right)$ algorithm is exponential in $n$, or we can solve NP-complete problems in polynomial time (which, naturally, can't be true).