Approximate Cosine Similarity Estimation via an Angle-Encoding Hadamard Test
Hiroshi Ohno
Abstract
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 Impact Assessments
(3 models)Scientific Impact Assessment
1. Core Contribution
The paper proposes replacing amplitude encoding in the standard Hadamard test with angle encoding (single-qubit Ry rotations) for estimating cosine similarity between normalized real-valued vectors. Each vector component pair is processed by an independent two-qubit Hadamard-test circuit, enabling parallel execution and O(1) circuit depth at the cost of O(d) qubits (versus O(log d) for amplitude encoding). The key trade-off is that the estimator becomes approximate due to a first-order Taylor expansion used to eliminate square-root terms (Eq. 6). The paper proves the resulting bias is non-negative via the Cauchy-Schwarz inequality and demonstrates numerically that approximation error decreases with increasing vector dimension.
2. Methodological Rigor
The methodology has several notable weaknesses:
Approximation analysis is shallow. The first-order approximation in Eq. 6 is applied under the assumption that and are small, but this assumption is never formally bounded. For a normalized d-dimensional vector with entries sampled uniformly, the expected squared magnitude per component is O(1/d), so the approximation improves with dimension—but this concentration argument is never made rigorous. No explicit bound on the bias as a function of d is provided; only the non-negativity is proven.
The non-negativity proof (Eq. 9) has a logical gap. The proof applies Cauchy-Schwarz to show that , and then uses normalization to simplify the right-hand side to . However, the bias as defined (Eq. 8) is the difference between the *approximation* (Eq. 7) and the true value, while the derivation in Eq. 9 computes , which is the difference between the *exact* elementwise sum and . This actually shows that the exact Hadamard-test output minus the post-processing correction overestimates the true similarity—it does not directly characterize the bias introduced by the Taylor approximation in Eq. 6. The distinction between these two sources of error is conflated.
Numerical experiments are minimal. Only 100 random samples are tested across four dimensions (d = 2, 4, 8, 12). No confidence intervals, no statistical tests, no comparison with classical approximate methods or other quantum approaches. The RMSE values (e.g., 0.088 for d=12) are substantial for a similarity measure bounded in [-1, 1]. The experiments use statevector simulation with no noise modeling, so claims about NISQ suitability remain unsubstantiated.
The Transformer application is a toy demonstration. Training on 53 samples of a Japanese-English dataset with only 8 qubits and observing diverging training curves actually highlights the method's limitations rather than its utility. No translation quality metrics (BLEU, etc.) are reported, and the gap between classical and quantum cottention grows with training, suggesting the approximation error accumulates problematically.
3. Potential Impact
The core idea—trading qubit count for circuit depth via angle encoding—is conceptually straightforward and not particularly novel. Angle encoding is well-established in variational quantum algorithms and quantum machine learning. The observation that elementwise processing enables parallelism is immediate once the encoding choice is made. The practical impact is limited because:
4. Timeliness & Relevance
The paper touches on relevant themes—NISQ-friendly algorithms, quantum ML, and Transformers—but the connections are superficial. The quantum computing community has largely moved toward understanding where genuine quantum advantages exist, and this paper does not establish any computational advantage (even heuristically) over classical methods. The Transformer application feels opportunistic rather than motivated by a genuine computational bottleneck.
5. Strengths & Limitations
Strengths:
Limitations:
Overall Assessment
This paper presents a minor technical observation—that angle encoding enables constant-depth parallel Hadamard tests for approximate similarity estimation—but lacks the analytical depth, experimental rigor, and practical motivation needed for meaningful scientific impact. The approximation analysis is incomplete, the experiments are toy-scale, and no quantum advantage is demonstrated or argued for. The contribution is incremental at best.
Generated Apr 20, 2026
Comparison History (32)
Paper 1 addresses a fundamental theoretical question connecting softmax normalization, non-Boolean event structures, and contextuality across multiple fields (machine learning, quantum foundations, cognitive science). Its results clarify the structural relationship between local normalization and global consistency, with implications for understanding contextuality bounds. Paper 2 presents an incremental variant of the Hadamard test for cosine similarity with angle encoding, but the contribution is narrower—an approximate method with acknowledged bias and limited practical advantage over classical approaches. Paper 1's broader theoretical reach and cross-disciplinary relevance give it higher potential impact.
Paper 1 has higher potential impact: it integrates Carleman linearization with VQLS and provides cross-platform (IBM/Xanadu) benchmarking, exploring cost functions, Hermitianization strategies, ansatz choices, and measurement-efficient evaluation—stronger methodological rigor and a clearer systems-level recipe for quantum-in-the-loop nonlinear dynamics. Its applications span scientific computing, control, and dynamical systems simulation, with broader cross-field relevance than Paper 2’s more niche, approximate similarity-estimation primitive (useful but limited by qubit footprint and approximation bias). Paper 1 is also timely for near-term hybrid quantum algorithms targeting differential equations.
Paper 2 addresses a fundamental question in quantum information theory—convergence rates of channel capacities—with rigorous mathematical results (explicit exponential bounds) applicable to important channel classes like Pauli channels. It has broader theoretical significance and practical relevance to quantum error correction. Paper 1 proposes an approximate quantum method for cosine similarity with acknowledged bias and limited advantage over classical approaches, representing a more incremental contribution with narrower impact.
Paper 1 presents a practical quantum computing algorithm with direct applications to machine learning, specifically Transformer models. The intersection of quantum computing and modern AI algorithms offers broader, more immediate real-world applications and appeals to a significantly larger research community. While Paper 2 provides valuable theoretical insights into quantum foundations and decoherence, Paper 1's timeliness and potential to influence the highly active field of quantum machine learning give it a higher potential for broad scientific impact.
Paper 1 presents a fundamental mathematical result—a basis-independent, dimension-agnostic closed-form unitary transformation between arbitrary pure states—which addresses a core problem in quantum mechanics with broad theoretical implications across quantum information, quantum circuits, and beyond. Its novelty in algebraic methods and generality give it wide applicability. Paper 2 proposes an approximate, angle-encoding variant of the Hadamard test for cosine similarity estimation, which is more incremental and application-specific, with acknowledged limitations (bias, approximation) and narrower scope, primarily targeting near-term quantum computing for similarity tasks.
Paper 2 introduces a novel detection scheme (Z_{4n}) for quantum LiDAR with demonstrated improvements in resolution and sensitivity, addressing a concrete problem in quantum sensing with clear practical applications in remote sensing and autonomous systems. Paper 1 proposes an approximate method for cosine similarity estimation using angle-encoding Hadamard tests, but the estimator is explicitly approximate with non-negative bias, and the advantages over classical methods remain unclear for practical near-term applications. Paper 2's contribution to quantum sensing hardware is more likely to inspire follow-up work and real-world deployment.
Paper 1 resolves a long-standing open conjecture about the optimality of a fundamental quantum algorithm (GRK) for partial search, using rigorous mathematical techniques (Pontryagin maximum principle, optimal control theory). This addresses a core question in quantum computing theory with broad implications for understanding quantum search complexity. Paper 2 presents an incremental engineering contribution—an angle-encoding variant of the Hadamard test for approximate cosine similarity—with limited novelty, an approximate (biased) estimator, and narrow applicability primarily to near-term quantum devices. Paper 1's theoretical depth and resolution of an open problem give it substantially higher impact.
Paper 1 provides a rigorous, systematic mathematical framework for characterizing all types of degeneracies in non-Hermitian systems, which is a fundamental and active area of physics with broad implications for photonics, condensed matter, and open quantum systems. Its comprehensive algebraic approach addresses a core theoretical need. Paper 2 presents an incremental quantum computing technique for approximate cosine similarity with acknowledged limitations (bias, large qubit footprint), offering more modest contributions to a narrower application domain with unclear practical advantage over classical methods.
Paper 1 establishes a reusable, game-based security framework for quantum distance-bounding protocols—filling a significant gap where only ad-hoc analyses existed. This foundational contribution enables systematic comparison of current and future QDB protocols and advances both quantum cryptography and secure positioning. Paper 2 proposes an angle-encoding Hadamard test variant for approximate cosine similarity, offering modest near-term utility but with acknowledged limitations (bias, large qubit footprint, approximation). Its contribution is more incremental and narrower in scope, whereas Paper 1 provides a lasting methodological foundation for an active area of quantum security research.
Paper 1 introduces a broadly applicable, representation-theoretic enumerator framework for quantum codes, generalizes MacWilliams-type identities to intrinsic (group-covariant) settings, and extends to multiplicity cases with matrix-valued enumerators and SDP-based bounds—tools likely to influence quantum error correction, algebraic coding theory, and optimization. It provides explicit transforms (e.g., SU(2) via 6j-symbols) and concrete extremality/bounds results, indicating methodological rigor and durable theoretical value. Paper 2 is timely for near-term quantum ML, but its contribution is more incremental (a practical variant/approximation of a known primitive) with narrower and less certain impact.
Paper 1 likely has higher impact: it addresses a concrete, immediate bottleneck in superconducting quantum processors—flux-line distortion limiting gate fidelity—and demonstrates an experimentally validated, automatable calibration/correction workflow. The approach (DPD using IIR/FIR) is methodologically rigorous and directly deployable across many flux-tunable QPUs, with clear real-world payoff in improving two-qubit gates. Paper 2 is conceptually interesting but more speculative: it trades depth for qubits, yields an approximate biased estimator, and its practical advantage over classical similarity/attention remains uncertain on near-term hardware.
Paper 1 presents a concrete, potentially implementable quantum algorithmic variant (angle-encoding Hadamard test) targeting a practically important primitive (cosine similarity) with explicit resource tradeoffs, bias analysis, scaling behavior, and a link to Transformers—giving clearer near-term applications and broader ML/quantum-computing relevance. Paper 2 offers a pedagogical/conceptual derivation of the partial trace from probabilistic consistency; while elegant and useful for foundations/education, it is less methodologically and applicatively expansive and is less likely to change practice or enable new capabilities.
Paper 1 addresses a fundamental challenge in quantum photonics—the purity-brightness trade-off in nonclassical light generation—and proposes a novel many-body mechanism achieving four orders of magnitude improvement in antibunching. This has broad implications for quantum technologies (quantum computing, communication, sensing). Paper 2 presents an incremental angle-encoding variant of the Hadamard test for approximate cosine similarity, offering a modest engineering trade-off (depth vs. qubit count) with limited novelty and acknowledged approximation bias. Paper 1's breakthrough mechanism, deterministic switching capability, and scalability represent significantly higher scientific impact.
Paper 2 is likely higher impact: it links Casimir-force measurements to practical, broadband material and geometry characterization using machine learning, offering clear experimental/technological applications in metrology, thin-film characterization, and nanotechnology. The inverse-problem framing and ML-assisted reconstruction can generalize to other fluctuation-induced or spectral inference problems, giving broader cross-field reach (quantum electrodynamics, materials science, applied ML). Paper 1 is a niche quantum-algorithms variant with unclear near-term advantage due to qubit footprint and approximation bias, limiting methodological and practical impact.
Paper 2 likely has higher impact due to a more fundamental, broadly relevant theoretical contribution: finite-time bounds and an explicit trade-off relation linking power, efficiency, speed, and information-geometric distance for autonomous information engines. This addresses a timely open question in nonequilibrium thermodynamics and information thermodynamics, with potential cross-field influence (statistical physics, quantum thermodynamics, biological/chemical machines). Paper 1 is an incremental quantum algorithmic variant with practical constraints (large qubit footprint) and less demonstrated advantage beyond niche near-term settings.
Paper 1 addresses a critical and timely gap in quantum technology—understanding strain effects on silicon vacancy centers in SiC, a CMOS-compatible platform with direct implications for scalable quantum device engineering. It combines experimental pulse sequences with first-principles theory, offering methodological rigor and immediate practical relevance for realistic quantum device deployment. Paper 2 proposes an approximate quantum method for cosine similarity that trades qubit overhead for shallow depth, but the approximation introduces bias, the practical quantum advantage is unclear, and classical methods already efficiently compute cosine similarity, limiting its real-world impact.
Paper 2 demonstrates a significant hardware advance in silicon-based quantum computing, introducing a fully integrated quantum processing unit with cryogenic CMOS control, 54 quantum dots, and order-of-magnitude improvements in exchange-only qubit performance. It validates the system with error correction codes and addresses scalability—a central challenge for practical quantum computing. Paper 1 proposes an approximate quantum algorithm for cosine similarity using angle encoding, which is incremental and limited to a narrow application with acknowledged bias. Paper 2's breadth of impact on quantum hardware scalability and manufacturing far exceeds Paper 1's contribution.
Paper 2 addresses a more fundamental and broadly impactful problem—securing quantum teleportation against quantum adversaries—combining post-quantum cryptography with quantum communication in a novel framework. It provides rigorous analytical results (closed-form expressions, security bounds under multiple leakage models) with clear practical implications for quantum network design. Paper 1 presents an incremental variant of a known quantum primitive (Hadamard test) for approximate cosine similarity, with limited practical advantage over classical methods and acknowledged approximation bias. Paper 2's timeliness (post-quantum security is urgent) and cross-disciplinary relevance (cryptography, quantum networks, information theory) give it higher impact potential.
Paper 1 bridges quantum computing and modern machine learning by proposing a shallow-depth quantum algorithm for cosine similarity with direct applications to Transformer models. This interdisciplinary approach addresses a major bottleneck in quantum machine learning (state preparation cost) and has broad, timely relevance to AI. Paper 2, while rigorous, addresses a more foundational and narrowly focused problem in quantum networking, yielding lower potential for immediate cross-disciplinary impact.
Paper 1 addresses a fundamental problem in physics—the quantum-to-classical transition and wave-function collapse—proposing a novel deterministic mechanism via gravitational self-interaction and dynamical bifurcation. This touches foundational quantum mechanics and quantum gravity, with broad implications across theoretical physics and potential experimental tests in mesoscopic systems. Paper 2 presents an incremental quantum computing technique for approximate cosine similarity estimation with practical but narrow applicability. While useful, it offers a more modest methodological contribution. Paper 1's novelty, depth, and breadth of potential impact across multiple fields give it significantly higher scientific impact potential.