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.
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.
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.
Abstract Quantum computing opens exciting opportunities for kernel-based machine learning methods, which have broad applications in data analysis. Recent works show that quantum computers can efficiently construct a model of a classifier by engineering the quantum interference effect to carry out the kernel evaluation in parallel. For practical applications of these quantum machine learning methods, an important issue is to minimize the size of quantum circuits. We present the simplest quantum circuit for constructing a kernel-based binary classifier. This is achieved by generalizing the interference circuit to encode data labels in the relative phases of the quantum state and by introducing compact amplitude encoding, which encodes two training data vectors into one quantum register. When compared to the simplest known quantum binary classifier, the number of qubits is reduced by two and the number of steps is reduced linearly with respect to the number of training data. The two-qubit measurement with post-selection required in the previous method is simplified to single-qubit measurement. Furthermore, the final quantum state has a smaller amount of entanglement than that of the previous method, which advocates the cost-effectiveness of our method. Our design also provides a straightforward way to handle an imbalanced data set, which is often encountered in many machine learning problems.
The evolution of quantum computers has encouraged research into how to handle tasks with significant computation demands in the past few years. Due to the unique advantages of quantum parallelism and entanglement, various types of quantum machine learning (QML) methods, especially variational quantum classifiers (VQCs), have attracted the attention of many researchers and have been developed and evaluated in numerous scenarios. Nevertheless, most of the research on VQCs is still in its early stages. For instance, as a consequence of the mathematical constraints imposed by the properties of quantum states, the majority of research has not fully taken into account the impact of data formats on the performance of VQCs. In this paper, considering a significant number of data in the real world exist in the form of complex numbers, i.e., phasor data in power systems and the result of Fourier transform on image processing, we develop two categories of data encoding methods, including coupling data encoding and splitting data encoding. This paper features the coupling data encoding method to encode complex-valued data in a way of amplitude encoding. By leveraging the property of quantum states living in a complex Hilbert space, the complex-valued data is embedded into the amplitude of quantum states to comprehensively characterize complex-valued information. Optimizers will be utilized to iteratively tune a parameterized ansatz, with the aim of minimizing the value of loss functions defined with respect to the specific classification task. In addition, distinct factors in VQCs have been explored in detail to investigate the performance of VQCs, including data encoding methods, loss functions, and optimizers. The experimental result shows that the proposed data encoding method outperforms other typical encoding methods on a given classification task. Moreover, different loss functions are tested, and the capability of finding the minimum value is evaluated for gradient-free and gradient-based optimizers, which provides valuable insights and guidelines for practical implementations.
Quantum algorithms face practical difficulties and overheads in execution on realistic devices, potentially thwarting their theoretical advantages. A key practical challenge is efficiently encoding classical data, since data embedding layers, often exponential in the number of qubits, can consume a significant portion of the circuit depth. One possible strategy to address this is to compress the standard data embeddings using variational circuits. The approximate amplitude encoding (AAE) algorithm successfully applies this approach to financial calculations and image pattern matching, achieving only polynomially deep embedding layers. While prior works focus on optimizing the approximate embedding in isolation, the ultimate goal is the compound algorithm's performance. This study systematically examines the impact of embedding compression on the fidelity of the subsequent quantum algorithm in a noiseless setting, specifically investigating amplitude encoding and its dependence on input data set size and complexity. Trainability of the different variational ansaetze, their output state fidelity, and the degree of the embedding layer depth compression are investigated. Performance benchmarks of standard quantum algorithms, e.g. Grover search, amplitude estimation, and quantum Fourier transform (QFT), are conducted based on the degree of compression and quality of the compressed input state. Results show that the amplitude encoding circuit can be compressed substantially in depth, for generic data and a small number of qubits, with only marginal loss in state fidelity. Certain algorithms, like QFT, demonstrate robustness to such approximations.
This paper presents a hybrid quantum logistic regression model for binary data classification that combines classical logistic regression methods with quantum computing to improve efficiency and speed up the learning process. Quantum computing is used to represent and process feature and weight vectors as quantum states and to efficiently compute the dot product underlying the logistic function. The use of normalized amplitude coding allows for compact representation of feature vectors and weights, reducing the number of qubits required and potentially speeding up computations for high-dimensional classification problems where classical methods may encounter scalability limitations. The quantum dot product computation is performed using the Hadamard test, which provides a statistical estimate of the probability of measuring an auxiliary qubit. The auxiliary qubit is first put into a superposition state, and after performing controlled unitary operations, amplitude interference is formed, which depends on the scalar product of the feature vector and weight coefficients. The obtained measurement probability is used to estimate the scalar product of the feature vectors and weights. The classical part of the model provides for the execution of operations that are difficult to implement on modern quantum devices, in particular, vector normalization, application of the sigmoid function to estimate the probability of an object belonging to a certain class, calculation of the loss function and iterative update of weight coefficients by the gradient descent method. The purpose of classification is to predict the binary class for an unknown sample based on the training sample. To demonstrate the model, a numerical example is given with a step-by-step calculation of one iteration of logistic regression training. In addition, computer modeling of the hybrid algorithm training process was performed, taking into account the influence of noise on the results of quantum state measurements. A quantum noise model was developed based on the probability of confidence in the measurement result, which is interpreted as an assessment of its reliability in a Bernoulli experiment. Comparison of the obtained results with the classical approach confirms the practical suitability of the hybrid algorithm for binary classification problems. The hybrid model preserves the key properties of classical logistic regression – parameter interpretability and optimization stability, while allowing for the use of quantum advantages for compact data encoding and scalar product computation. This makes the study of hybrid logistic regression relevant for the development of machine learning algorithms on modern quantum platforms.
Brain tumor image classification is an essential pre-processing task for tumor diagnosis and treatment planning. In medical imaging, quantum computing analyse medical imaging data, offering potential speedups and new representations compared to classical methods. The brain images are transformed through resizing and normalization to a uniform 32 × 32 × 3 resolution. Subsequently, these processed images are converted into vectors to enable encoding into quantum states. The feature set is reduced using Principal Component Analysis (PCA) to ensure compatibility with the restricted qubit count in the quantum circuits. Through amplitude encoding, these vectors are mapped to quantum states, allowing for a compact and efficient data representation within the quantum domain. A parameterized Variational Quantum Circuit(VQC), consisting of entangling gates and trainable rotations, processes the encoded quantum states to learn features that can effectively discriminate between classes. The loss is calculated from the measured expectation values of Pauli-Z observables and optimized using classical gradient descent, where the objective function is the mean squared error. The trained quantum model is designed for multi-class classification, specifically distinguishing between meningioma, glioma tumors, pituitary tumors, and the absence of a tumor. The outcome of this proposed work demonstrates the VQC’s advantage over classical baselines, including Random Forest, and Support Vector Machine (SVM) and Multi-Layer Perceptron (MLP). The VQC achieved the highest accuracy of 95% and the best robustness (Specificity 0.983). Crucially, the VQC accomplished this using only 24 trainable parameters, showcasing a significant increase in parameter efficiency compared to the classical models. The novelty of this work is the quantitative demonstration that a custom-designed, resource-efficient quantum model can outperform established classical deep learning methods in both performance and efficiency for complex medical image classification. The VQC provides a 3.5-fold gain in parameter efficiency, achieving the highest accuracy of 95% using only 24 trainable parameters. This efficiency is enabled by the novel application of amplitude encoding to the medical images, which compresses 16 features into just 4 qubits. The VQC demonstrates robustness vital for medical diagnostics, achieving a Specificity of 0.983. Its shallow architecture is also NISQ-friendly and remains stable by avoiding the Barren Plateau issue (Gradient Norm: 0.11), validating the path toward quantum advantage in diagnostic tools. The results of this approach highlight the potential amplitude encoding in quantum machine learning, as a feasible and effective method for classifying real-world medical images. This work also opens avenues for future hybrid quantum-classical diagnostic systems that could utilize richer quantum state encodings for significant gains in computational efficiency and accuracy.