arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2604.15867quant-ph
收藏

通过角度编码的Hadamard测试近似估计余弦相似性

Approximate Cosine Similarity Estimation via an Angle-Encoding Hadamard Test

Toyota Central R & D Labs., Inc.(丰田中央研究开发研究所)

Hiroshi Ohno

AI总结:

本文提出一种角度编码的Hadamard测试方法,用于估计归一化实值向量间的余弦相似性,通过并行执行两量子位Hadamard测试电路实现常数电路深度,尽管需要更大的量子位数和经典后处理。

摘要:

Hadamard测试是量子计算中用于估计内积和期望值的标准原始工具,但在数据处理场景中其实际效用常受限于准备振幅编码量子态的成本。本研究调查了一种角度编码变体的Hadamard测试,用于估计归一化实值向量间的余弦相似性。所提出的方法将相似性计算分解为元素wise的两量子位Hadamard测试电路,原则上可以并行执行,从而在向量维度上保持常数电路深度,尽管牺牲了更大的量子位足迹和经典后处理。由于所得估计器是近似的,我们分析了由此产生的偏差,并显示在我们的推导中所用的近似下,该偏差是非负的。在随机归一化向量上的数值实验表明,在测试设置中,随着向量维度的增加,估计误差减小。我们进一步展示了其可能应用于基于余弦注意力的Transformer模型。这些结果表明,角度编码的Hadamard测试可能在浅层电路深度优先于紧凑量子位使用的情况下,为近似相似性估计提供有用的設計點。

英文摘要:

The Hadamard test is a standard quantum primitive for estimating inner products and expectation values, but in data-processing settings its practical utility is often limited by the cost of preparing amplitude-encoded quantum states. In this study, we investigate an angle-encoding variant of the Hadamard test for estimating cosine similarity between normalized real-valued vectors. The proposed method decomposes the similarity computation into elementwise two-qubit Hadamard-test circuits that can, in principle, be executed in parallel, resulting in constant circuit depth with respect to the vector dimension at the expense of a larger qubit footprint and classical post-processing. Because the resulting estimator is approximate, we analyze the induced bias and show that it is non-negative under the approximation used in our derivation. Numerical experiments on random normalized vectors show that, in the tested setting, the estimation error decreases as the vector dimension increases. We further illustrate a possible application to cosine-attention-based Transformer models. These results suggest that the angle-encoding Hadamard test may provide a useful design point for near-term similarity estimation when shallow circuit depth is preferred over compact qubit usage.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑