US-12626178-B2 - Quantum computing based kernel alignment for a support vector machine task
Abstract
Described are techniques for optimizing a quantum kernel for a support vector machine task. The techniques include receiving, by digital processor, a set of training data, each member of the set representing a data vector (x) and a label (y) identifying the respective member to be part of either a first class or a second class The techniques further include providing, by the digital processor, the quantum kernel comprising a set of unitary operations adapted for acting on a zero state of qubits of a universal quantum circuit The techniques further include performing, by a quantum processor comprising a set of interlinked quantum circuits, an alignment of the quantum kernel using an optimization algorithm based on the set of training data on a primal problem approach of the support vector machine task.
Inventors
- Gian Gentinetta
- David Sutter
- Stefan Woerner
Assignees
- INTERNATIONAL BUSINESS MACHINES CORPORATION
Dates
- Publication Date
- 20260512
- Application Date
- 20221018
Claims (18)
- 1 . A computer implemented method for optimizing a quantum kernel for a support vector machine task, comprising: receiving, by a digital processor, a set of training data, each member of the set of training data representing a data vector (x) and a label (y) identifying the respective member to be part of either a first class or a second class; providing, by the digital processor, the quantum kernel comprising a set of unitary operations adapted for acting on a zero state of qubits of a universal quantum circuit; and performing, by a quantum processor comprising a set of interlinked quantum circuits, an alignment of the quantum kernel using a primal estimated sub-gradient solver for a support vector machine (PEGASOS) algorithm based on the set of training data on a primal problem approach of the support vector machine task, wherein the primal problem approach involves solving in parallel a min-min-problem comprising minimizing the support vector machine task and minimizing a parameter of a parametrized quantum feature map.
- 2 . The method according to claim 1 , wherein data vectors (x) of the set of training data are non-linearly separable data vectors by using the support vector machine.
- 3 . The method according to claim 1 , wherein the set of unitary operations are further adapted for: nonlinearly transforming the data vectors into a predefined higher dimensional space using a feature map.
- 4 . The method according to claim 1 , wherein the set of interlinked quantum circuits is realized by a circuit of universal quantum computing devices with a predefined number of qubits.
- 5 . The method according to claim 4 , wherein performing the alignment of the quantum kernel further comprises: performing, by the quantum processor, a first unitary operation using the parametrized quantum feature map, which is a circuit-representation of the feature map on the predefined number of qubits using a first data vector x as input and starting with all zero states of the qubits; performing a second subsequent unitary operation based on the parametrized quantum feature map on the predefined number of qubits using a second data vector x′ as input, wherein the second subsequent unitary operation is an adjoint operation of the first unitary operation; building a scalar product together with a result of the first unitary operation, wherein a measurable output of the second subsequent unitary operation represents the quantum kernel; and solving the support vector machine task using the primal problem approach to the support vector machine task.
- 6 . The method according to claim 5 , wherein the parameter for the parametrized quantum feature map is minimized using analytic quantum gradients.
- 7 . The method according to claim 5 , wherein the parameter for the parametrized quantum feature map is minimized using a simultaneous perturbation stochastic approximation.
- 8 . The method according to claim 5 , wherein the support vector machine task is minimized by an iterative algorithm applied on a loss function using sub-gradients which comprise randomly selecting directions in the feature space.
- 9 . The method according to claim 8 , wherein during performing the iterative algorithm the loss function is determined with a predetermined frequency.
- 10 . The method according to claim 8 , wherein the randomly selecting directions comprise in each iteration selecting a batch of directions.
- 11 . The method according to claim 1 , the method further comprising: receiving, by the digital processor, a set of test data, each member of the set of test data representing a test data vector (x) and a test label (y) identifying the respective member to be part of either the first class or the second class; predicting, by the quantum processor, labels of the set of test data using the aligned quantum kernel; and comparing, by the digital processor, the labels with received test labels to evaluate the quantum kernel of the support vector machine task.
- 12 . The method according to claim 11 , further comprising: providing, by the digital processor, another quantum kernel comprising another set of unitary operations adapted for acting on a zero state of qubits of a universal quantum circuit; performing, by another quantum processor comprising a set of interlinked quantum circuits, an alignment of the another quantum kernel using an optimization algorithm based on another set of training data on the primal problem approach of the support vector machine task; predicting, by the another quantum processor, other labels of the set of test data using the aligned another quantum kernel; and comparing, by the digital processor, the labels with the other labels to evaluate the quantum kernel compared to the another quantum kernel.
- 13 . A quantum support vector machine system for optimizing a quantum kernel for a support vector machine task, comprising: a computer system comprising one or more digital processors and a quantum processor, one or more computer-readable memories operatively coupled to the one or more digital processors and the quantum processor, wherein the one or more computer-readable memories store computer readable program instructions, which, when executed by the one or more digital processors or quantum processor, enable the one or more digital processors or quantum processor to: receive, by the one or more digital processors, a set of training data, each member of the set of training data representing a data vector (x) and a label (y) identifying the respective member to be part of either a first class or a second class; provide, by the one or more digital processors, the quantum kernel comprising a set of unitary operations adapted for acting on a zero state of qubits of a universal quantum circuit; and perform, by the quantum processor comprising a set of interlinked quantum circuits, an alignment of the quantum kernel using a primal estimated sub-gradient solver for a support vector machine (PEGASOS) algorithm based on the set of training data on a primal problem approach of the support vector machine task, wherein the primal problem approach involves solving in parallel a min-min-problem comprising minimizing the support vector machine task and minimizing a parameter of a parametrized quantum feature map.
- 14 . The system according to claim 13 , wherein the set of unitary operations are further adapted for: nonlinearly transforming the data vectors into a predefined higher dimensional space using a feature map.
- 15 . The system according to claim 13 , wherein the set of interlinked quantum circuits is realized by a circuit of universal quantum computing devices with a predefined number of qubits.
- 16 . The system according to claim 15 , wherein the one or more digital processors, during performing the alignment of the quantum kernel, is further enabled to: perform, by the quantum processor, a first unitary operation using the parametrized quantum feature map, which is a circuit-representation of the feature map on the predefined number of qubits using a first data vector x as input and starting with all zero states of the qubits; perform a second subsequent unitary operation based on the parametrized quantum feature map on the predefined number of qubits using a second data vector x′ as input, wherein the second subsequent unitary operation is an adjoint operation of the first unitary operation; build a scalar product together with a result of the first unitary operation, wherein a measurable output of the second subsequent unitary operation represents the quantum kernel; and solve the support vector machine task using the primal problem approach to the support vector machine task.
- 17 . The system according to claim 16 , wherein the parameter for the parametrized quantum feature map is minimized using analytic quantum gradients.
- 18 . A computer program product for optimizing a quantum kernel for a support vector machine task, comprising: one or more computer readable storage media, and program instructions collectively stored on the one or more computer readable storage media, the program instructions configured to cause one or more digital processors or a quantum processor to: receive, by the one or more digital processors, a set of training data, each member of the set of training data representing a data vector (x) and a label (y) identifying the respective member to be part of either a first class or a second class; provide, by the one or more digital processors, the quantum kernel comprising a set of unitary operations adapted for acting on a zero state of qubits of a universal quantum circuit; and perform, by the quantum processor comprising a set of interlinked quantum circuits, an alignment of the quantum kernel using a primal estimated sub-gradient solver for a support vector machine (PEGASOS) algorithm based on the set of training data on a primal problem approach of the support vector machine task, wherein the primal problem approach involves solving in parallel a min-min-problem comprising minimizing the support vector machine task and minimizing a parameter of a parametrized quantum feature map.
Description
BACKGROUND The present disclosure relates generally to solving a support vector machine task using quantum computing, and more specifically, to optimizing a quantum kernel for a support vector machine task. Quantum computing remains one of the hottest topics in computer science, the industry and in research. Classical digital computers and/or processors are slowly reaching their physical limitations, so research is looking for new ways to address mathematical and other problems that cannot be solved by classic von-Neumann machines due to the physical limitations in terms of structure size, power consumption, and ultimately speed of processing. Quantum computing is thus one of the promising areas to reach quantum supremacy, which can be a real advantage in addressing very complex competition or tasks in reasonable times. As is well known, conventional computers encode process information in bits, i.e., “1”s and “0”s. Quantum computers, on the other hand, are based on so-called qubits which operate according to two key principles of quantum physics: superposition and entanglement. Superposition describes a situation that each qubit can represent both a “1” and a “0” inference between possible outcomes for an event. Entanglement means that qubits in superposition can be correlated with each other in a non-classical way. For example, the state of one qubit, whether it is a “1”, or a “0”, or both, can depend on the state of another qubit, and that there is more information contained in qubits when they are entangled. In general, a quantum state is the mathematical description of the state of an atomic or subatomic-size system. This is described as a vector in a vector space over complex numbers, popularly known as the Hilbert space. A quantum state can thereby describe any properties of the quantum particle or system of quantum particles (e.g., the position, momentum, quintessential phenomenon like quantum spins, and so on). Some of these properties are continuous variables and are therefore represented by vectors in the infinite-dimensional Hilbert space; position and momentum as variables are examples of this. However, other properties such as the spin of a particle can only assume definitive many quantized values and are therefore finished-dimensional. For example, the spin-part of the state of a quantum system with “n” electrons can be a state inside a 2n dimensional Hilbert space. Hence, the Hilbert space for “n” qubit quantum computer scales as 2n. Intuitively, each qubit in a quantum computer is not averse to a bit in the classical digital computer system. However, several qubits together in a system can explore a full “n”-dimensional Hilbert space instead of requiring 2n classical bits to do the same. Hence, superposition and entanglement are two unique quantum properties that qubits possess over their classical counterparts. However, transposing known problems to be solved into the world of quantum computers remains a major challenge, as the approach is so very different compared to classical digital processors. Therefore, specialists are constantly looking for problems that can be explored and practically studied with the currently available quantum computing systems. One of the promising fields is related to problems in the field of support vector machines. Support vector machines in the classical context are well known for their ability to classify n-dimensional data points—each being represented by an n-dimensional vector—in two or more classes, even if the data points cannot be linearly separated. In a simple case, only two classes are shown for the support vector machine classifier. The support vector machine solution then addresses the trade-off between accurately predicting the true label (e.g., the exact class of a point), and maximizing the orthogonal distance (court margin) between the two classes. Once trained, the classification function can be applied to classify previously unseen data drawn from the same probability distribution. Hence, support vector machines are able to implement non-linear decisions in the original data space by transforming the input vector with a non-linear feature map, which transforms the original n-dimensional feature space in a higher dimensional space to find a hyper-plane in that higher dimensional space for the separation of the original data points into the two classes. It is known that these optimization machine-learning problems can be solved—using the well-known “kernel trick”—a positive semidefinite kernel function. Typically, a maximization task has to be solved. On the other side, several approaches have been made to transform such a problem into the world of quantum computing in order to study useful kernels, or better kernel functions. While such, functions are well known in classical computing, there are only heuristic approaches when using quantum computing devices. Some documents are known in this field: document WO 2020/201002 A1 describes a metho