Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:2604.15867

Approximate Cosine Similarity Estimation via an Angle-Encoding Hadamard Test

Hiroshi Ohno

quant-phSubmitted Apr 17, 2026• Announced Apr 20, 2026• 0 citations
arXivHTMLPDF

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.

Related papers

Approximate complex amplitude encoding algorithm and its application to data classification problems

Naoki Mitsuda, Tatsuhiro Ichimura, Kouhei Nakaji +6 more

Quantum computing has a potential to accelerate data processing efficiency, especially in machine learning, by exploiting special features such as the quantum interference. The major challenge in this application is that, in general, the task of loading a classical data vector into a quantum state requires an exponential number of quantum gates. The approximate amplitude encoding (AAE) method, which uses a variational means to approximately load a given real-valued data vector into the amplitude of a quantum state, was recently proposed as a general approach to this problem mainly for near-term devices. However, AAE cannot load a complex-valued data vector, which narrows its application range. In this work, we extend AAE so that it can handle a complex-valued data vector. The key idea is to employ the fidelity distance as a cost function for optimizing a parametrized quantum circuit, where the classical shadow technique is used to efficiently estimate the fidelity and its gradient. We apply this algorithm to realize the complex-valued-kernel binary classifier called the compact Hadamard classifier, and then we present a numerical experiment showing that it enables classification of the Iris dataset and credit card fraud detection.

arXiv:2211.13039•Physical Review A•May 13, 2024•20 citations

Parallel Hadamard Test

Soichiro Imamura, Synge Todo

The Hadamard test is a fundamental building block widely used in many quantum computing algorithms. It estimates the real or imaginary part of $\langle ψ\vert U \vert ψ\rangle$, where $\vert ψ\rangle$ is a quantum state and $U$ is a unitary operator. In many algorithms, however, many such quantities must be estimated, leading to a large number of distinct circuit types, long computational times, and high financial costs. In this work, we propose the parallel Hadamard test, which combines multiple Hadamard tests into a single circuit type. We demonstrate how the parallel Hadamard test applies to three structural classes of workloads: arbitrary sets of unitary operators, prefix-product arrays, and Gram-matrix elements. For each class, we compare the cost of the parallel Hadamard test with that of the conventional one. Our unified approach significantly reduces the number of distinct circuit types, and can lower both computational time and financial costs in regimes where fixed per-circuit overheads dominate the total cost. In Gram-matrix workloads, it can also reduce the total number of shots when typical off-diagonal overlaps are small.

quant-pharXiv:2607.12344•Jul 15, 2026•0 citations

Randomized semi-quantum matrix processing

Allan Tosta, Thais de Lima Silva, Giancarlo Camilo +1 more

We present a hybrid quantum-classical framework for simulating generic matrix functions more amenable to early fault-tolerant quantum hardware than standard quantum singular-value transformations. The method is based on randomization over the Chebyshev approximation of the target function while keeping the matrix oracle quantum, and is assisted by a variant of the Hadamard test that removes the need for post-selection. The resulting statistical overhead is similar to the fully quantum case and does not incur any circuit depth degradation. On the contrary, the average circuit depth is shown to get smaller, yielding equivalent reductions in noise sensitivity, as explicitly shown for depolarizing noise and coherent errors. We apply our technique to partition-function estimation, linear system solvers, and ground-state energy estimation. For these cases, we prove advantages on average depths, including quadratic speed-ups on costly parameters and even the removal of the approximation-error dependence.

arXiv:2307.11824•npj Quantum Information•Sep 30, 2024•5 citations

Approximate amplitude encoding in shallow parameterized quantum circuits and its application to financial market indicators

Kouhei Nakaji, Shumpei Uno, Yohichi Suzuki +6 more

Efficient methods for loading given classical data into quantum circuits are essential for various quantum algorithms. In this paper, we propose an algorithm called Approximate Amplitude Encoding that can effectively load all the components of a given real-valued data vector into the amplitude of quantum state, while the previous proposal can load only the absolute values of those components. The key of our algorithm is to variationally train a shallow parameterized quantum circuit, using the results of two types of measurement: the standard computational-basis measurement plus the measurement in the Hadamard-transformed basis, introduced in order to handle the sign of the data components. The variational algorithm changes the circuit parameters so as to minimize the sum of two costs corresponding to those two measurement basis, both of which are given by the efficiently computable maximum mean discrepancy. We also consider the problem of constructing the singular value decomposition entropy via the stock market data set to give a financial market indicator; a quantum algorithm (the variational singular value decomposition algorithm) is known to produce a solution faster than classical, which yet requires the sign-dependent amplitude encoding. We demonstrate, with an in-depth numerical analysis, that our algorithm realizes loading of time series of real stock prices on quantum state with small approximation error, and thereby it enables constructing an indicator of the financial market based on the stock prices.

arXiv:2103.13211•Physical Review Research•May 20, 2022•98 citations

Fisher information based lower bounds on the cost of quantum phase estimation

Ryosuke Kimura, Kosuke Mitarai

Quantum phase estimation (QPE) is a cornerstone of quantum algorithms designed to estimate the eigenvalues of a unitary operator. QPE is typically implemented through two paradigms with distinct circuit structures: quantum Fourier transform-based QPE (QFT-QPE) and Hadamard test-based QPE (HT-QPE). Existing performance assessments fail to separate the statistical information inherent in the quantum circuit from the efficiency of classical post-processing, thereby obscuring the limits intrinsic to the circuit structure itself. In this study, we employ Fisher information and the Cramer-Rao lower bound to formulate the performance limits of circuit designs independent of the efficiency of classical post-processing. Defining the circuit depth as $T$ and the total runtime as $t_{\rm total}$, our results demonstrate that the achievable scaling is constrained by a non-trivial lower bound on their product $T\,t_{\rm total}$, although previous studies have typically treated the circuit depth $T$ and the total runtime $t_{\rm total}$ as separate resources. Notably, QFT-QPE possesses a more favorable scaling with respect to the overlap between the input state and the target eigenstate corresponding to the desired eigenvalue than HT-QPE. Numerical simulations confirm these theoretical findings, demonstrating a clear performance crossover between the two paradigms depending on the overlap. Furthermore, we verify that practical algorithms, specifically the quantum multiple eigenvalue Gaussian filtered search (QMEGS) and curve-fitted QPE, achieve performance levels closely approaching our derived limits. By elucidating the performance limits inherent in quantum circuit structures, this work concludes that the optimal choice of circuit configuration depends significantly on the overlap.

quant-pharXiv:2603.12706•Mar 16, 2026•0 citations

QiT: Quantum-Inspired Transformer for Visual Recognition Task

Badri N. Patro, Vijay Agneeswaran

Quantum machine learning offers a compelling representational perspective: angle-encoded states inhabit Hilbert spaces in which periodic similarities and interactions can be expressed naturally. Realizing this perspective for visual recognition remains difficult, however, because present quantum neural networks are constrained by limited qubit counts, costly circuit simulation and measurement, noise, and unstable optimization on noisy intermediate-scale quantum devices. We investigate whether useful structural ideas from quantum models can instead be realized as scalable classical Transformer operations. We introduce QiT, a Quantum-inspired Transformer for vision tasks with three components: (i) angle-inspired encoding that maps image tokens to learned trigonometric Hilbert-space features analogous to quantum rotation-based state encoding; (ii) self-attention over these periodic features, inducing a classical cosine kernel approximated to quantum fidelity kernels; and (iii) gated multiplicative emulation, a trainable classical surrogate for interaction terms found in variational circuits. All components are differentiable tensor operations, so QiT claims neither quantum computation nor quantum speedup and retains the $\mathcal{O}(N^2D)$ attention complexity of a standard Vision Transformer. Across image-classification benchmarks, QiT is competitive with a matched classical Transformer while avoiding the severe runtime cost observed for a small simulated quantum Transformer. QiT-B reaches 78.3\% ImageNet-1K top-1 accuracy with 45.7M parameters and 11.5 GFLOPs. These results position QiT as a scalable baseline for isolating and evaluating quantum-motivated inductive biases in visual recognition.

quant-pharXiv:2609.17789•Sep 17, 2026•0 citations
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.
Quantum computing has a potential to accelerate data processing efficiency, especially in machine learning, by exploiting special features such as the quantum interference. The major challenge in this application is that, in general, the task of loading a classical data vector into a quantum state requires an exponential number of quantum gates. The approximate amplitude encoding (AAE) method, which uses a variational means to approximately load a given real-valued data vector into the amplitude of a quantum state, was recently proposed as a general approach to this problem mainly for near-term devices. However, AAE cannot load a complex-valued data vector, which narrows its application range. In this work, we extend AAE so that it can handle a complex-valued data vector. The key idea is to employ the fidelity distance as a cost function for optimizing a parametrized quantum circuit, where the classical shadow technique is used to efficiently estimate the fidelity and its gradient. We apply this algorithm to realize the complex-valued-kernel binary classifier called the compact Hadamard classifier, and then we present a numerical experiment showing that it enables classification of the Iris dataset and credit card fraud detection.
The Hadamard test is a fundamental building block widely used in many quantum computing algorithms. It estimates the real or imaginary part of ⟨ψ∣U∣ψ⟩\langle ψ\vert U \vert ψ\rangle⟨ψ∣U∣ψ⟩, where ∣ψ⟩\vert ψ\rangle∣ψ⟩ is a quantum state and UUU is a unitary operator. In many algorithms, however, many such quantities must be estimated, leading to a large number of distinct circuit types, long computational times, and high financial costs. In this work, we propose the parallel Hadamard test, which combines multiple Hadamard tests into a single circuit type. We demonstrate how the parallel Hadamard test applies to three structural classes of workloads: arbitrary sets of unitary operators, prefix-product arrays, and Gram-matrix elements. For each class, we compare the cost of the parallel Hadamard test with that of the conventional one. Our unified approach significantly reduces the number of distinct circuit types, and can lower both computational time and financial costs in regimes where fixed per-circuit overheads dominate the total cost. In Gram-matrix workloads, it can also reduce the total number of shots when typical off-diagonal overlaps are small.
We present a hybrid quantum-classical framework for simulating generic matrix functions more amenable to early fault-tolerant quantum hardware than standard quantum singular-value transformations. The method is based on randomization over the Chebyshev approximation of the target function while keeping the matrix oracle quantum, and is assisted by a variant of the Hadamard test that removes the need for post-selection. The resulting statistical overhead is similar to the fully quantum case and does not incur any circuit depth degradation. On the contrary, the average circuit depth is shown to get smaller, yielding equivalent reductions in noise sensitivity, as explicitly shown for depolarizing noise and coherent errors. We apply our technique to partition-function estimation, linear system solvers, and ground-state energy estimation. For these cases, we prove advantages on average depths, including quadratic speed-ups on costly parameters and even the removal of the approximation-error dependence.
Efficient methods for loading given classical data into quantum circuits are essential for various quantum algorithms. In this paper, we propose an algorithm called Approximate Amplitude Encoding that can effectively load all the components of a given real-valued data vector into the amplitude of quantum state, while the previous proposal can load only the absolute values of those components. The key of our algorithm is to variationally train a shallow parameterized quantum circuit, using the results of two types of measurement: the standard computational-basis measurement plus the measurement in the Hadamard-transformed basis, introduced in order to handle the sign of the data components. The variational algorithm changes the circuit parameters so as to minimize the sum of two costs corresponding to those two measurement basis, both of which are given by the efficiently computable maximum mean discrepancy. We also consider the problem of constructing the singular value decomposition entropy via the stock market data set to give a financial market indicator; a quantum algorithm (the variational singular value decomposition algorithm) is known to produce a solution faster than classical, which yet requires the sign-dependent amplitude encoding. We demonstrate, with an in-depth numerical analysis, that our algorithm realizes loading of time series of real stock prices on quantum state with small approximation error, and thereby it enables constructing an indicator of the financial market based on the stock prices.
Quantum phase estimation (QPE) is a cornerstone of quantum algorithms designed to estimate the eigenvalues of a unitary operator. QPE is typically implemented through two paradigms with distinct circuit structures: quantum Fourier transform-based QPE (QFT-QPE) and Hadamard test-based QPE (HT-QPE). Existing performance assessments fail to separate the statistical information inherent in the quantum circuit from the efficiency of classical post-processing, thereby obscuring the limits intrinsic to the circuit structure itself. In this study, we employ Fisher information and the Cramer-Rao lower bound to formulate the performance limits of circuit designs independent of the efficiency of classical post-processing. Defining the circuit depth as TTT and the total runtime as ttotalt_{\rm total}ttotal​, our results demonstrate that the achievable scaling is constrained by a non-trivial lower bound on their product T ttotalT\,t_{\rm total}Tttotal​, although previous studies have typically treated the circuit depth TTT and the total runtime ttotalt_{\rm total}ttotal​ as separate resources. Notably, QFT-QPE possesses a more favorable scaling with respect to the overlap between the input state and the target eigenstate corresponding to the desired eigenvalue than HT-QPE. Numerical simulations confirm these theoretical findings, demonstrating a clear performance crossover between the two paradigms depending on the overlap. Furthermore, we verify that practical algorithms, specifically the quantum multiple eigenvalue Gaussian filtered search (QMEGS) and curve-fitted QPE, achieve performance levels closely approaching our derived limits. By elucidating the performance limits inherent in quantum circuit structures, this work concludes that the optimal choice of circuit configuration depends significantly on the overlap.
Quantum machine learning offers a compelling representational perspective: angle-encoded states inhabit Hilbert spaces in which periodic similarities and interactions can be expressed naturally. Realizing this perspective for visual recognition remains difficult, however, because present quantum neural networks are constrained by limited qubit counts, costly circuit simulation and measurement, noise, and unstable optimization on noisy intermediate-scale quantum devices. We investigate whether useful structural ideas from quantum models can instead be realized as scalable classical Transformer operations. We introduce QiT, a Quantum-inspired Transformer for vision tasks with three components: (i) angle-inspired encoding that maps image tokens to learned trigonometric Hilbert-space features analogous to quantum rotation-based state encoding; (ii) self-attention over these periodic features, inducing a classical cosine kernel approximated to quantum fidelity kernels; and (iii) gated multiplicative emulation, a trainable classical surrogate for interaction terms found in variational circuits. All components are differentiable tensor operations, so QiT claims neither quantum computation nor quantum speedup and retains the O(N2D)\mathcal{O}(N^2D)O(N2D) attention complexity of a standard Vision Transformer. Across image-classification benchmarks, QiT is competitive with a matched classical Transformer while avoiding the severe runtime cost observed for a small simulated quantum Transformer. QiT-B reaches 78.3\% ImageNet-1K top-1 accuracy with 45.7M parameters and 11.5 GFLOPs. These results position QiT as a scalable baseline for isolating and evaluating quantum-motivated inductive biases in visual recognition.