Figure 3

Subfigure (a) illustrates the swap test for two n-qubit registers, \({|{\phi }\rangle }\) and \({|{\psi }\rangle }\), while Subfigure (b) illustrates the Hadamard test for two n-qubit states that can be efficiently prepared via the gates \(U_\phi\) and \(U_\psi\).