Generalized quantum Hadamard test for machine learning
摘要
Computing fidelities by the widely studied quantum Hadamard test is quite helpful in designing certain quantum classifiers. However, a quantum Hadamard test is usually limited by the mapping into a L2-normalized vector space, manifesting fidelity as a cosine similarity. We report a generalized version of the quantum Hadamard test, having additional capability to compute the inner product in bounded input space. This has the merit to implement not only the L2-normalization of input space, but also the min–max normalization by attributing beyond amplitude encoding. We also provide the quantum circuital implementation and analyze it by numerical simulation. The design has advantages in terms of circuital complexities. The demonstration of the model is provided by exploiting the logistic regression binary classifier and centroid-based binary classifier to address four classification problems over two public-benchmark datasets and two artificial datasets.