We develop a recursive algorithm to generalize the quantum SWAP test for an arbitrary number $m$ of quantum states requiring $O(m)$ controlled-swap (CSWAP) gates and $O(\log m)$ ancillary qubits. We construct a quantum circuit able to simultaneously measure overlaps of $m$ arbitrary pure states. Our construction relies on a pairing unitary that generates a superposition state where every pair of input states is labelled by a basis state formed by the ancillaries.
翻译:我们开发了一种递归算法,将量子 SWAP 测试的普通化,用于任意数量为百万美元的量子状态,需要美元(m)美元(CSAP)控制交换(SWAP)门和美元(logm)美元($O(logm))辅助qubits。我们建造了一种量子电路,能够同时测量任意的纯状态的重叠。 我们的构造依赖于一个配对的单一状态,产生一个叠加状态,在这种状态下,每对输入国都贴上由辅助国组成的基准状态的标签。