Consider this problem in quantum cryptography:We have two pure states $\phi_1,\phi_2$ as input and constants $0 \leq \alpha <\beta \leq 1 $, where Yes instances are those for which $$\left|\left<\phi_1,\phi_2\right>\right| \leq \alpha$$ and No instances are those for which $$\left|\left<\phi_1,\phi_2\right>\right|\geq \beta$$I need to devise a quantum circuit that accepts Yes instances with probability at least $p$, and No instances with at most probability $q$ for some $q<p$.How can I do this? Is there a reference in which this problem is solved?Thanks in advance.
A promise problem to decide whether two given pure quantum states are close or far apart
quantum computing;quantum information
A standard tool is the swap test, which receives two unentangled pure states |1 and |2 and answers equal with probability (1+|1|2|2)/2 and not equal with probability (1|1|2|2)/2.  See [BCWW01] (Figure 1 shows the circuit).[BCWW01] Harry Buhrman, Richard Cleve, John Watrous, and Ronald de Wolf.  Quantum fingerprinting.  Physical Review Letters, 87, article 167902, Sept. 2001.  DOI: 10.1103/PhysRevLett.87.167902.  A preprint version: arXiv:quant-ph/0102001v1.