Machine learning tasks are an exciting application for quantum computers, as it has been proven that they can learn certain problems more efficiently than classical ones. Applying quantum machine learning algorithms to classical data can have many important applications, as qubits allow for dealing with exponentially more data than classical bits. However, preparing the corresponding quantum states usually requires an exponential number of gates and therefore may ruin any potential quantum speedups. Here, we show that classical data with a sufficiently quickly decaying Fourier spectrum after being mapped to a quantum state can be well-approximated by states with a small Schmidt rank (i.e., matrix-product states) and we derive explicit error bounds. These approximated states can, in turn, be prepared on a quantum computer with a linear number of nearest-neighbor two-qubit gates. We confirm our results numerically on a set of 1024 × 1024 -pixel images taken from the `Imagenette' and DIV2K datasets. Additionally, we consider different variational circuit ansätze and demonstrate numerically that one-dimensional sequential circuits achieve the same compression quality as more powerful ansätze.
Machine learning tasks are an exciting application for quantum computers, as it has been proven that they can learn certain problems more efficiently than classical ones. Applying quantum machine learning algorithms to classical data can have many important applications, as qubits allow for dealing with exponentially more data than classical bits. However, preparing the corresponding quantum states usually requires an exponential number of gates and therefore may ruin any potential quantum speedups. Here, we show that classical data with a sufficiently quickly decaying Fourier spectrum after being mapped to a quantum state can be well-approximated by states with a small Schmidt rank (i.e., matrix-product states) and we derive explicit error bounds. These approximated states can, in turn, be prepared on a quantum computer with a linear number of nearest-neighbor two-qubit gates. We confirm our results numerically on a set of 1024 × 1024 -pixel images taken from the `Imagenette' and DIV2K datasets. Additionally, we consider different variational circuit ansätze and demonstrate numerically that one-dimensional sequential circuits achieve the same compression quality as more powerful ansätze.
The advent of noisy-intermediate scale quantum computers has introduced the exciting possibility of achieving quantum speedups in machine learning tasks. These devices, however, are composed of a small number of qubits and can faithfully run only short circuits. This puts many proposed approaches for quantum machine learning beyond currently available devices. We address the problem of compressing classical data into efficient representations on quantum devices. Our proposed methods allow both the required number of qubits and depth of the quantum circuit to be tuned. We achieve this by using a correspondence between matrix-product states and quantum circuits and further propose a hardware-efficient quantum circuit approach, which we benchmark on the Fashion-MNIST dataset. Finally, we demonstrate that a quantum circuit-based classifier can achieve competitive accuracy with current tensor learning methods using only 11 qubits.
Abstract Schmidt decomposition of a vector can be understood as writing the singular value decomposition (SVD) in vector form. A vector can be written as a linear combination of tensor product of two dimensional vectors by recursively applying Schmidt decompositions via SVD to all subsystems. Given a vector expressed as a linear combination of tensor products, using only the k principal terms yields a k-rank approximation of the vector. Therefore, writing a vector in this reduced form allows to retain most important parts of the vector while removing small noises from it, analogous to SVD-based denoising. In this paper, we show that quantum circuits designed based on a value k (determined from the tensor network decomposition of the mean vector of the training sample) can approximate the reduced-form representations of entire datasets. We then employ this circuit ansatz with a classical neural network head to construct a hybrid machine learning model. Since the output of the quantum circuit for an 2n dimensional vector is an n dimensional probability vector, this provides an exponential compression of the input and potentially can reduce the number of learnable parameters for training large-scale models. We use datasets provided in the Python scikit-learn module for the experiments. The results confirm the quantum circuit is able to compress data successfully to provide effective k-rank approximations to the classical processing component.
Abstract Quantum machine learning (QML) is an emerging field that investigates the capabilities of quantum computers for learning tasks. While QML models can theoretically offer advantages such as exponential speed-ups, challenges in data loading and the ability to scale to relevant problem sizes have prevented demonstrations of such advantages on practical problems. In particular, the encoding of arbitrary classical data into quantum states usually comes at a high computational cost, either in terms of qubits or gate count. However, real-world data typically exhibits some inherent structure (such as image data) which can be leveraged to load them with a much smaller cost on a quantum computer. This work further develops an efficient algorithm for finding low-depth quantum circuits to load classical image data as quantum states. To evaluate its effectiveness, we conduct systematic studies on the MNIST, Fashion-MNIST, CIFAR-10, and Imagenette datasets. The corresponding circuits for loading the full large-scale datasets are available publicly as PennyLane datasets and can be used by the community for their own benchmarks. We further analyze the performance of various quantum classifiers, such as quantum kernel methods, parameterized quantum circuits, and tensor-network classifiers, and we compare them to convolutional neural networks. In particular, we focus on the performance of the quantum classifiers as we introduce nonlinear functions of the input state, e.g. by letting the circuit parameters depend on the input state.
Quantum machine learning (QML) is emerging as an application of quantum computing with the potential to deliver quantum advantage, but its realization for practical applications remains impeded by challenges. Among these, a key barrier is the computationally expensive task of encoding classical data into a quantum state, which could erase any prospective speedups over classical algorithms. In this study, we implement methods for the efficient preparation of quantum states representing encoded image data using variational, genetic, and matrix product state algorithms. Our results show that these methods can approximately prepare states to a level suitable for QML using circuits 2 orders of magnitude shallower than a standard state preparation implementation, thus drastically reducing circuit depth and gate count without unduly sacrificing classification accuracy. Additionally, the QML models trained and evaluated on approximately encoded data displayed an increased robustness to adversarially generated input data perturbations. This partial alleviation of adversarial vulnerability, made possible by the retention of the meaningful large-scale features of the data despite the “drowning out” of adversarial perturbations, constitutes a considerable benefit for approximate state preparation in addition to lessening the requirements of the quantum hardware. Our results, based on simulations and experiments on IBM quantum devices, highlight a promising pathway for the future implementation of accurate and robust QML models on complex datasets relevant for practical applications, bringing the possibility of NISQ-era QML advantage closer to reality.
Quantum computers are believed to have the ability to process huge data sizes, which can be seen in machine learning applications. In these applications, the data, in general, are classical. Therefore, to process them on a quantum computer, there is a need for efficient methods that can be used to map classical data on quantum states in a concise manner. On the other hand, to verify the results of quantum computers and study quantum algorithms, we need to be able to approximate quantum operations into forms that are easier to simulate on classical computers with some errors. Motivated by these needs, in this paper, we study the approximation of matrices and vectors by using their tensor products obtained through successive Schmidt decompositions. We show that data with distributions such as uniform, Poisson, exponential, or similar to these distributions can be approximated by using only a few terms, which can be easily mapped onto quantum circuits. The examples include random data with different distributions, the Gram matrices of iris flower, handwritten digits, 20newsgroup, and labeled faces in the wild. Similarly, some quantum operations, such as quantum Fourier transform and variational quantum circuits with a small depth, may also be approximated with a few terms that are easier to simulate on classical computers. Furthermore, we show how the method can be used to simplify quantum Hamiltonians: In particular, we show the application to randomly generated transverse field Ising model Hamiltonians. The reduced Hamiltonians can be mapped into quantum circuits easily and, therefore, can be simulated more efficiently.
The amplitude encoding of an arbitrary n-qubit state vector requires Ω(2n) gate operations, owing to the exponential dimension of the Hilbert space. We can, however, form dimensionality-reduced representations of quantum states using matrix product states (MPS). In this article, we illustrate that MPS techniques enable the preparation of quantum states representative of functions with complexity up to low-degree piecewise polynomials via shallow-depth quantum circuits with accuracy exceeding 99.99\%. We extend these results to the approximate amplitude encoding of pixel values. We showcase this approach by efficiently preparing a 128×128 ChestMNIST medical image (https://medmnist.com/) on 14 qubits with fidelity exceeding 99.2\% on a circuit with a total depth of just 425 single-qubit rotation and CNOT gates.