# What are quantum algorithms with only one possible outcome with probability equal to one?

I would like to study circuits with only one possible outcome. Quantum phase estimation, Bernstein-Vazirani, and in part Deutsch-Jozsa (for constant functions) come to mind - do you know any other important algorithms with only one possible outcome? Or, even better, do you know any criteria to build a circuit in such a way such that it can have only one possible outcome?

• The criteria is that the final state is in the qubit-$z$ basis but that depends a lot on what you want to do. Sep 12, 2021 at 12:22

There is a famous breakthrough paper by Ambainis that shows for a superlinear advantage between exact quantum algorithms over their classical counterparts (classical deterministic algorithms) for the query complexity of a total Boolean function. Later Ambainis, Iraids and Smotrovs in another paper developed the optimal exact quantum algorithms to determine whether an $$n$$-bit string has Hamming weight exactly $$k$$, and to determine whether an $$n$$-bit string has Hamming weight at least $$k$$.