Quantum computing with kernel methods for machine learning

By calculating the kernel matrix of quantum data points using a quantum computing device and projecting it onto a classical representation, the problem of high computational cost in high-dimensional feature spaces is solved, and efficient prediction performance is improved on small quantum computing devices.

CN116368502BActive Publication Date: 2026-04-28GOOGLE LLC
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GOOGLE LLC
Filing Date
2021-10-19
Publication Date
2026-04-28

Smart Images

  • Figure CN116368502B_ABST
    Figure CN116368502B_ABST
Patent Text Reader

Abstract

Methods, systems, and apparatus, including computer programs encoded on a computer storage medium, for quantum machine learning. In one aspect, the method includes obtaining, by a quantum computing device, a training dataset of quantum data points; computing, by the quantum computing device, a kernel matrix representing a similarity between quantum data points included in the training dataset, including computing a value of a kernel function for each pair of quantum data points in the training dataset, wherein the kernel function is based on a reduced density matrix of the quantum data points; and providing, by the quantum computing device, the kernel matrix to a classical processor, wherein the classical processor uses the kernel matrix to perform a training algorithm to construct a machine learning model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Kernel methods are a class of algorithms used for pattern analysis. The task of pattern analysis is to discover and study general types of relationships in a dataset, such as clustering, ranking, principal components, correlation, and classification. For many algorithms that solve these tasks, the data in the original representation must be explicitly transformed into a feature vector representation using a user-specified feature map. In contrast, kernel methods only require a user-specified kernel-similarity function (or "kernel function") on the pairs of data points in the original representation. Background Technology

[0002] Kernel functions enable kernel methods to operate in high-dimensional, implicit feature spaces without computing the coordinates of the data in that space. Instead, they compute the inner product between all pairs of data in the feature space. These operations are generally more computationally inexpensive than the explicit computation of coordinates.

[0003] Algorithms capable of manipulating kernels include kernel perceptrons, support vector machines (SVMs), Gaussian processes, principal component analysis (PCA), canonical correlation analysis, ridge regression, spectral clustering, linear adaptive filters, and many others. By applying the kernel trick to the model, any linear model can be transformed into a nonlinear model: its features (predictors) are replaced with kernel functions. Summary of the Invention

[0004] This specification describes techniques for quantum computing with a kernel approach that incorporates machine learning.

[0005] Generally speaking, an innovative aspect of the subject matter described in this specification can be implemented in a method comprising the following steps: obtaining a training dataset of quantum data points via a quantum computing device;

[0006] The quantum computing device computes a kernel matrix representing the similarity between quantum data points included in the training dataset, including computed corresponding values ​​of kernel functions for each pair of quantum data points in the training dataset, wherein the kernel functions are based on the reduced density matrices of the quantum data points; and the quantum computing device provides the kernel matrix to the classical processor.

[0007] Other embodiments of this aspect include corresponding computer systems, apparatuses, and computer programs recorded on one or more computer storage devices, each configured to perform actions of the method. A system of one or more computers may be configured to perform specific operations or actions by installing software, firmware, hardware, or combinations thereof on the system, which in operation cause the system to perform these actions. One or more computer programs may be configured to perform specific operations or actions by including instructions that, when executed by a data processing apparatus, cause the apparatus to perform these actions.

[0008] The foregoing and other implementations may each optionally include one or more of the following features, individually or in combination. In some implementations, the method further includes receiving a kernel matrix from a quantum computing device and through a classical processor; and having the classical processor use the kernel matrix to execute a training algorithm to build a machine learning model.

[0009] In some implementations, the method further includes obtaining a verification dataset of quantum data points by a quantum computing device; calculating new elements of a kernel matrix by the quantum computing device, wherein the new elements include entries representing the similarity between quantum data points in the verification dataset and quantum data points in the training dataset, wherein calculating the new elements includes calculating corresponding values ​​of kernel functions for each pair of quantum data points in the training dataset and the verification dataset; and providing new elements of the kernel matrix to a classical processor by the quantum computing device.

[0010] In some implementations, the method also includes processing new elements of the kernel matrix by a classical processor to output a prediction for each quantum data point in the validation dataset.

[0011] In some implementations, the kernel function is based on the individual reduced density matrix of quantum data points in the training dataset.

[0012] In some implementations, kernel functions include linear kernel functions.

[0013] In some implementations, the linear kernel function i) takes a first quantum data point and a second quantum data point as input, ii) produces a numerical output, and iii) includes a sum of terms, wherein the sum is operated on each of the N qubits where N>1, and the addend corresponds to the respective qubit, and is equal to the trace of the product of a) the reduced density matrix of the first quantum data point on the subsystem of the respective qubit and b) the reduced density matrix of the second quantum data point on the subsystem of the respective qubit.

[0014] In some implementations, the linear kernel function is given by the following equation:

[0015]

[0016] Where x i x j Representing the first and second quantum data points, l represents the index from 1 to the number of qubits N, and ρ(x) is labeled for each qubit. i )=|x i > <x i |and Tr m≠k [ρ(x i )] represents the 1-reduced density matrix (RDM) on qubit k.

[0017] In some implementations, the value of a kernel function is computed for a pair of quantum data points in a training dataset, wherein the pair of quantum data points includes a first N-qubit quantum state, where N > 1, and a second N-qubit quantum state, where N > 1, comprising: repeatedly and for each qubit index: computed a 1-reduction density matrix (RDM) for the first N-qubit quantum state on the subsystem corresponding to qubit 1, including obtaining a copy of the N-qubit quantum system in the first N-qubit quantum state, and measuring each qubit in the quantum system except for the l-th qubit to obtain the first reduced quantum state of the quantum system; computed a 1-RDM for the second N-qubit quantum state on the subsystem corresponding to qubit 1, including obtaining a copy of the N-qubit quantum system in the second N-qubit quantum state, and measuring each qubit in the quantum system except for the l-th qubit to obtain the second reduced quantum state of the quantum system; determined a trace of the product of the first and second reduced quantum states; and summed the average of the determined traces for each qubit index.

[0018] In some implementations, the kernel function includes a squared exponent kernel function.

[0019] In some implementations, the quadratic exponential kernel function i) takes the first and second quantum data points as input, ii) produces a numerical output, and iii) includes an exponential function of the sum of terms, wherein the sum operates on each of the N qubits where N>1, and the addend corresponds to the respective qubit, and is equal to a) the reduced density matrix corresponding to the first quantum data point on the subsystem of the corresponding qubit minus b) the norm of the reduced density matrix corresponding to the second quantum data point on the subsystem of the corresponding qubit.

[0020] In some implementations, the quadratic exponent kernel function is given by the following formula:

[0021]

[0022] Where, xi x j Representing the first and second quantum data points, l represents the index from 1 to the number of qubits N, and ρ(x) is labeled for each qubit. i )=|x i > <x i |and Tr m≠k [ρ(x i )] represents 1-RDM on qubit k.

[0023] In some implementations, the value of a kernel function is computed for a pair of quantum data points in a training dataset, wherein the pair of quantum data points includes a first N-qubit quantum state having N > 1 and a second N-qubit quantum state having N > 1, comprising: repeatedly and for each qubit index: computed a 1-reduced density matrix (RDM) for the first N-qubit quantum state on the subsystem corresponding to qubit l, including obtaining a copy of the N-qubit quantum system in the first N-qubit quantum state, and measuring each qubit in the quantum system except for the l-th qubit to obtain the quantum system The system is first reduced to a first reduced quantum state; a 1-RDM is calculated on the subsystem corresponding to qubit l to obtain a copy of the N-qubit quantum system in the second N-qubit quantum state, and each qubit in the quantum system except for the l-th qubit is measured to obtain the second reduced quantum state of the quantum system; the second reduced quantum state is subtracted from the first reduced quantum state to obtain a third reduced quantum state, and the norm of the third reduced quantum state is determined; and the average of the determined norms for each qubit index is summed, and the exponent of the summation average is calculated.

[0024] In some implementations, the kernel function is based on a k-body RDM of quantum data points, where k is less than a predetermined value.

[0025] In some implementations, kernel functions include linear kernel functions.

[0026] In some implementations, the linear kernel function i) takes a first quantum data point and a second quantum data point as input, ii) produces a numerical output, and iii) includes a sum of terms, wherein the sum is operated on each subset of k qubits taken from N qubits, and each addend corresponds to the respective subset and is equal to the trace of the product of a) the reduced density matrix of the first quantum data point on the subsystem corresponding to the corresponding subset of k qubits and b) the reduced density matrix of the second quantum data point on the subsystem corresponding to the corresponding subset of k qubits.

[0027] In some implementations, the linear kernel function is given by the following equation:

[0028]

[0029] Among them, S k (n) represents the set of subsets of k qubits, ρ(x i )=|x i > <x i |and Tr m≠K [ρ(x i )] represents k-RDM.

[0030] In some implementations, computing the value of a kernel function for a pair of quantum data points in a training dataset, wherein the pair of quantum data points includes a first N-qubit quantum state and a second N-qubit quantum state, includes: repeatedly and for each set of k qubits: computing a k-RDM of the first N-qubit quantum state on a subsystem corresponding to a qubit within the set, including obtaining a copy of the N-qubit quantum system in the first N-qubit quantum state and measuring each qubit in the quantum system other than those included in the set to obtain a first reduced quantum state of the quantum system; computing a k-RDM of the second N-qubit quantum state on a subsystem corresponding to a qubit within the set, including obtaining a copy of the N-qubit quantum system in the second N-qubit quantum state and measuring each qubit in the quantum system other than those included in the set to obtain a second reduced quantum state of the quantum system; determining the trace of the product of the first and second reduced quantum states; and summing the average values ​​determined for each set of k qubits.

[0031] In some implementations, kernel functions include exponential kernel functions.

[0032] In some implementations, the exponential kernel function is given by the following formula:

[0033]

[0034] Among them, expected value n is a randomly selected Pauli frame measured on the first and second systems i and j. s The sample obtained (i.e., where n is chosen to be as large as possible) s The experiment considers both the value and hardware implementation factors, such as the choice of n. s (the maximum number that can be measured experimentally), and The first indicator function represents the agreement between the results of random Pauli measurements performed independently on the first system i and the second system j, and The second indicator function representing the consistency of the measurement basis.

[0035] In some implementations, the value of a kernel function is computed for a pair of quantum data points in a training dataset, wherein the pair of quantum data points includes a first N-qubit quantum state and a second N-qubit quantum state, comprising repeatedly obtaining a first measurement result, including measuring each qubit in a first system in a random Pauli basis to obtain the value of the h-th qubit. and in, It is 1 or -1, and It is a random basis X, Y, or Z; to obtain a second measurement result, including measuring each qubit in the second system in a random Pauli basis to obtain the value of the h-th qubit. and in It is 1 or -1, and The random basis is X, Y, or Z; for the h-th qubit in an N-qubit system, the first measurement result and the second measurement result are compared to determine the value of the first indicator function, and for the h-th qubit in the N-qubit system, the value of the second indicator function is determined; and the determined values ​​of the first indicator function and the second indicator function are multiplied, summed, and averaged.

[0036] In some implementations, a quantum data point comprises an N-qubit quantum state, where N > 1.

[0037] In some implementations, obtaining a training dataset for quantum data points includes: receiving a training dataset for classical data points; and generating a training dataset for quantum data points, including embedding each classical data point into a corresponding quantum state by applying corresponding encoding circuitry to a reference quantum state.

[0038] The subject matter described in this specification can be implemented in a particular manner to achieve one or more of the following advantages.

[0039] Kernel methods in machine learning can be applied to a variety of regression and classification problems. However, successful solutions to these problems are limited when the feature space becomes large and estimating the kernel function becomes computationally expensive. The technique described here addresses this issue by using quantum computing devices to compute the kernel function.

[0040] Furthermore, the quantum computation of the currently described kernel function is scalable—the signal remains large as the number of qubits increases, and the method continues to work well (if not better). This contrasts with known quantum kernel methods, where the signal typically decays exponentially with the number of qubits, for example, due to small geometric differences caused by exponentially large Hilbert spaces (where all inputs are too far apart). The scalability of the currently described technique is achieved by amplifying the geometric differences by projecting the embedded quantum states from classical data to classical space, for example, by using RDM. In other words, kernel functions that are close to zero at every two points do not generalize well. However, the currently described projected quantum kernel is defined using an approximate classical representation of the quantum states, which results in non-zero kernel functions providing better generalization performance.

[0041] Furthermore, due to the amplified geometric differences, the currently described technique can achieve a greater predictive advantage than ordinary classical machine learning models. This predictive advantage can also be achieved with a small number of qubits, for example, up to 30 qubits. Therefore, the currently described technique is particularly well-suited for implementations using small-scale quantum computers, such as noisy medium-scale quantum devices and / or hybrid quantum-classical computers.

[0042] The techniques described here can be applied to a variety of applications of classical machine learning, including examples of quantum machine learning from nature that involve quantum input data, such as image and digit classification from MNIST or other image / video data sources, classification for sentiment and text analysis, analysis of high-energy physics data, classification of data from quantum sensors into phases, quantum state discrimination or quantum repeater engineering, prediction using data from quantum sensors, many-body or other applications.

[0043] Details of one or more embodiments of the subject matter of this specification are set forth in the accompanying drawings and the following description. Other features, aspects, and advantages of this subject matter will become apparent from the specification, drawings, and claims. Attached Figure Description

[0044] Figure 1 This is a diagram illustrating kernel functions defined by the classical kernel method, the traditional quantum kernel method, and the projected quantum kernel method.

[0045] Figure 2 A block diagram of an example system for performing classification and regression tasks using the projected quantum kernel method is shown.

[0046] Figure 3 A block diagram of an example process for performing classification and regression tasks using the projected quantum kernel method is shown.

[0047] Figure 4This is a flowchart of an example process for generating and updating the kernel matrix.

[0048] The same reference numerals and names in different figures denote the same elements. Detailed Implementation

[0049] This manual describes techniques for performing machine learning tasks using quantum kernel methods.

[0050] In traditional quantum kernel methods, kernel operators are based on fidelity-type metrics, for example, Tr[ρ(x i )ρ(x j This kernel operator treats all data points as being far apart from each other, producing a kernel matrix that approximates identity. This can lead to small geometric differences and allow classical machine learning models to be competitive with or outperform quantum kernel methods. For example, in some cases, a quantum model might require an exponential number of samples to learn using this conventional kernel operator, while a classical machine learning model only needs a linear number of samples.

[0051] The currently described quantum kernel method addresses this problem using a family of projective quantum kernels. It receives a quantum or classical dataset of data points and uses a quantum computer to compute the geometry between these points. The geometry is computed using projective quantum kernel operators selected from a scalable family of reduced physical observables. These operators project quantum states onto approximate classical representations, such as reduced observables or classical shadows. The computed geometry is then fed into conventional training and validation methods. Even when the training set space has large dimensions—e.g., dimensions proportional to the number of qubits included in an available quantum computer—projection provides a reduction to a low-dimensional classical space that can be better generalized.

[0052] Figure 1 This is a diagram illustrating the geometry (kernel function) defined by the classical kernel method 100, the conventional quantum kernel method 102, and the currently described projective quantum kernel method 104. Letters A, B, C, ... represent data points in different spaces, where arrows represent similarity measurements (kernel functions) between data points. The geometric difference g is the difference between similarity measurements in the different methods 100, 102, and 104, and d is the effective dimension of the dataset in the quantum Hilbert space. As shown, the geometric difference between the similarity measurements in the classical kernel method 100 and the projective quantum kernel method 104 is greater than the geometric difference between the similarity measurements in the classical kernel method 100 and the conventional quantum kernel method 102. As mentioned above, this larger geometric difference provides scalability and improved prediction accuracy.

[0053] Example operating environment

[0054] Figure 2 An example system 200 is depicted that performs classification and regression tasks using a projected quantum kernel method. Example system 200 is an example of a system implemented as a classical and quantum computer program on one or more classical and quantum computing devices at one or more locations, wherein the following systems, components, and techniques can be implemented.

[0055] Example system 200 includes example quantum computing device 202. According to some embodiments, quantum computing device 202 can be used to perform the quantum computing operations described herein. Quantum computing device 202 is intended to represent various forms of quantum computing devices. The components shown herein, their connections and relationships, and their functionality are merely exemplary and do not limit the implementation of the inventions described and / or claimed herein.

[0056] Example quantum computing device 202 includes a qubit assembly 252 and a control and measurement system 204. The qubit assembly includes multiple qubits, such as qubit 206, which are used to perform algorithmic operations or quantum computation. Although Figure 2 The qubits shown are arranged in a rectangular array, but this is a schematic depiction and not a limitation. The qubit assembly 252 also includes adjustable coupling elements, such as coupler 208, which allows interaction between the coupled qubits. Figure 2 In the schematic diagram, each qubit is tunably coupled to each of its four neighboring qubits via a corresponding coupling element. However, this is just an example arrangement of qubits and couplers; other arrangements are possible, including non-rectangular arrangements, arrangements that allow coupling between non-adjacent qubits, and arrangements that include tunable coupling between more than two qubits.

[0057] Each qubit can be a physical two-level quantum system or device with levels representing logical values ​​0 and 1. The specific physical implementation of multiple qubits and how they interact depends on a variety of factors, including the type of quantum computing device included in example system 200 or the type of quantum computation being performed by the quantum computing device. For example, in an atomic quantum computer, qubits can be implemented using atoms, molecules, or solid-state quantum systems, such as hyperfine atomic states. As another example, in a superconducting quantum computer, qubits can be implemented using superconducting qubits or semiconductor qubits, such as superconducting transpose states. As yet another example, in an NMR quantum computer, qubits can be implemented using nuclear spin states.

[0058] In some implementations, quantum computing can be performed by initializing qubits in a selected initial state and applying a series of unitary operators to the qubits. Applying unitary operators to the quantum state can include applying a corresponding sequence of quantum logic gates to the qubits. Example quantum logic gates include single-qubit gates, such as Pauli-X, Pauli-Y, Pauli-Z (also known as X, Y, Z), Hadamard and S gates, two-qubit gates, such as controlled-X, controlled-Y, controlled-Z (also known as CX, CY, CZ), and gates comprising three or more qubits, such as Toveley gates. The quantum logic gates can be implemented by applying control signals 210 generated by the control and measurement system 204 to the qubits and couplers.

[0059] For example, in some implementations, the qubits in the qubit assembly 252 can be frequency-tunable. In these examples, each qubit can have an associated operating frequency, which can be adjusted by applying voltage pulses via one or more drive lines coupled to the qubit. Examples of operating frequencies include qubit idle frequencies, qubit interaction frequencies, and qubit readout frequencies. Different frequencies correspond to different operations that the qubit can perform. For example, setting the operating frequency to the corresponding idle frequency allows the qubit to enter a state in which it does not interact strongly with other qubits and in which it can be used to perform a single-qubit gate state. As another example, in the case where the qubits interact via couplers with fixed coupling, the qubits can be configured to interact by setting their respective operating frequencies to a gate-dependent frequency that is detuned from their common interaction frequency. In other cases, for example, when the qubits interact via tunable couplers, the qubits can be configured to interact by setting the parameters of their respective couplers to enable interaction between the qubits, and then interact by setting the respective operating frequencies of the qubits to a gate-dependent frequency that is detuned from their common interaction frequency. To achieve a multi-qubit gate, such mutual interaction is possible.

[0060] The type of control signal 210 used depends on the physical implementation of the qubit. For example, the control signal may include RF or microwave pulses in an NMR or superconducting quantum computer system, or light pulses in an atomic quantum computer system.

[0061] Quantum computing can be accomplished by measuring the state of qubits, for example, using quantum observables such as X or Z, and corresponding control signals 210. The measurement causes a readout signal 212, representing the measurement result, to be transmitted back to the measurement and control system 204. Depending on the physical scheme of the quantum computing device and / or qubits, the readout signal 212 may include RF, microwave, or optical signals. For convenience, Figure 2 The control signal 210 and readout signal 212 shown are described as addressing only selected elements of the qubit assembly (i.e., the top and bottom rows), but during operation, the control signal 210 and readout signal 212 can address each element in the qubit assembly 252.

[0062] The control and measurement system 204 is an example of a classical computer system that can be used to perform the various operations described above, as well as other classical subroutines or computations, on the qubit component 252. The control and measurement system 204 includes one or more classical processors, such as classical processor 214, connected by one or more data buses, one or more memories, such as memory 216, and one or more I / O units, such as I / O unit 218. The control and measurement system 204 can be programmed to send a sequence of control signals 210 to the qubit component, for example, to perform a series of selected quantum gate operations, and to receive a sequence of readout signals 212 from the qubit component, for example, as part of performing a measurement operation.

[0063] Processor 214 is configured to process instructions executed within control and measurement system 204. In some embodiments, processor 214 is a single-threaded processor. In other embodiments, processor 214 is a multi-threaded processor. Processor 214 is capable of processing instructions stored in memory 216.

[0064] Memory 216 stores information within control and measurement system 204. In some embodiments, memory 216 includes computer-readable media, volatile memory cells, and / or non-volatile memory cells. In some cases, memory 216 may include storage devices capable of providing large-capacity storage for system 204, such as hard disk drives, optical disk drives, storage devices shared by multiple computing devices over a network (e.g., cloud storage devices), and / or other high-capacity storage devices.

[0065] Input / output device 218 provides input / output operations for control and measurement system 204. Input / output device 218 may include D / A converters, A / D converters, and RF / microwave / optical signal generators, transmitters, and receivers to send control signals 210 to the qubit components and receive readout signals 212 from the qubit components, as a physical scheme suitable for a quantum computer. In some embodiments, input / output device 218 may also include one or more network interface devices, such as Ethernet cards, serial communication devices (e.g., RS-232 ports), and / or wireless interface devices (e.g., 802.11 cards). In some embodiments, input / output device 218 may include a driver configured to receive input data and send output data to other external devices (e.g., keyboards, printers, and display devices).

[0066] Despite Figure 2 The example control and measurement system 204 has been described, but the implementation of the subject matter and functional operation described in this specification may be implemented in other types of digital electronic circuits, or in computer software, firmware or hardware, including the structures disclosed in this specification and their structural equivalents, or in a combination of one or more of them.

[0067] Example system 200 includes example classic processor 250. According to some embodiments, classic processor 250 can be used to perform classic computational operations described herein, such as classic machine learning methods described herein.

[0068] Figure 3 This demonstrates the use of the projected quantum kernel method to perform classification and regression tasks. Figure 2 The block diagram of example system 200 is shown below. Phases (A)-(E) represent the training phases and correspond to steps 402-406 of example process 400, as shown in the following reference. Figure 4 During phase (A) of the example process, quantum computing device 202 obtains a training dataset of data points. In some embodiments, the data points may be quantum data points, such as quantum states. In other embodiments, the data points may be classical data points. In these implementations, during phase (B), the quantum computing device embeds the classical data points into the corresponding quantum states. Phases (A) and (B) are described in more detail below with reference to step 402 of example process 400. In some embodiments, the training dataset of data points may be received from a classical computer, such as classical processor 250. In other embodiments, the training dataset of data points may be received from a quantum computing device, such as quantum computing device 202.

[0069] During phase (C), quantum computing device 102 uses a kernel function to compute a kernel matrix based on the reduced density matrix of the obtained quantum data points / states. Phase (C) is described in more detail below with reference to step 404 of example procedure 400.

[0070] During phase (D), the quantum computing device 202 sends the computed kernel matrix to the classical processor 250. In phase (E), the classical processor receives the kernel matrix and uses it to train a machine learning model.

[0071] Phases (F)-(K) represent the verification or inference phases and correspond to steps 408-412 of example process 400. During phase (F), the quantum computing device 202 obtains a verification dataset of data points. In some embodiments, the data points may be quantum data points, such as quantum states. In other embodiments, the data points may be classical data points. In these embodiments, during phase (G), the quantum computing device embeds the classical data points into the corresponding quantum states.

[0072] During phase (H), the quantum computing device updates the kernel matrix by computing new rows and columns corresponding to data points in the verification dataset. Phase (H) is described in more detail below with reference to steps 404 and 410 of example procedure 400.

[0073] During phase (I), the quantum computing device 202 sends the updated kernel matrix to the classical processor 250. In phase (J), the classical processor receives the updated kernel matrix and processes it using a trained machine learning model. During phase (K), the classical processor 250 outputs predictions corresponding to the data points in the validation dataset.

[0074] Hardware programming

[0075] Figure 4 This is a flowchart of an example process 400 for generating and updating the kernel matrix. For convenience, process 400 will be described as being executed by a system of one or more classical and quantum computing devices located at one or more locations. For example, appropriately programmed according to this specification... Figure 1 The quantum computing device 100 can execute process 400.

[0076] The quantum computing device obtains a training dataset of quantum data points (step 402). The data points may be unlabeled or assigned relevant classification labels or values.

[0077] In some implementations, the quantum computing device can receive a training dataset as quantum data input. For example, the quantum computing device can receive the quantum state |x iThe set of quantum states, or the set of quantum states accessed from quantum memories included in a quantum computing device. Each quantum state |x in the training dataset i > can be the corresponding state of an N-qubit quantum system. Each quantum state |x i > can represent corresponding classic data points, for example, the image described below.

[0078] In other implementations, the quantum computing device can receive classical data points {x} i The training dataset is}, and each classic data point x is used to... i Embedded into the corresponding quantum state |x i > to generate the corresponding training dataset for quantum data points. In order to combine classical data points x i Embedded into an N-qubit quantum state |x i In this context, quantum computing devices can encode circuits U... enc (x i The reference quantum state applied to N qubits, such as state |00…0>. The encoding circuit U used to embed classical data points into the corresponding quantum state. enc Depending on the data type contained in the training dataset of classical data points, various circuits can be used. For example, in the case where the classical data points represent images, the encoding circuit can be defined as a circuit that rotates each qubit of an N-qubit array by the corresponding scaling singularity of the image. In some cases, more complex encoding circuits can be used, which include rotation layers and entangled quantum gates between some layers.

[0079] The quantum computing device performs multiple quantum computations to compute a kernel matrix Q representing the similarity between quantum data points included in the training dataset (step 404). Computing the kernel matrix includes computing each pair of quantum data points x in the training dataset. i ,x j kernel function value Q ij =Q(x) i ,x j Kernel function Q(x) i ,x j The kernel function is based on the reduced density matrix of the quantum data points obtained in step 402. For example, in some embodiments, the kernel function may be based on the single-unit reduced density matrix (1-RDM) of the quantum data points. In other embodiments, the kernel function may be based on the k-unit RDM of the quantum data points, where k is less than a predetermined value. The kernel function in the example is described below.

[0080] Linear kernel functions using 1-RDM

[0081] In an implementation of a set of kernel functions based on 1-RDM, the kernel function can be a linear kernel function. A linear kernel function takes a first quantum data point and a second quantum data point as input and produces a numerical output. A linear kernel function can include a sum of terms, where the sum is operated on each of the N qubits. Each addend corresponds to a specific qubit and is equal to the trace of the product of i) the reduced density matrix corresponding to the first quantum data point on the subsystem of the corresponding qubit and ii) the reduced density matrix corresponding to the second quantum data point on the subsystem of the corresponding qubit. For example, a linear kernel function can be given by the following equation (1).

[0082]

[0083] In equation (1), l is an index from 1 to the number of qubits N, and each qubit is labeled, and ρ(x) i )=|x i > <x i | and Tr m≠k [ρ(x i ] represents 1-RDM, for example, the trace on all qubits except qubit k. The linear kernel function given by equation (1) can learn any observable that can be written as the sum of one-body terms.

[0084] To compute the value of the linear kernel function given by equation (1) for a pair of quantum data points including a first N-qubit quantum state and a second N-qubit quantum state, a quantum computing device can:

[0085] Repeatedly, and for each qubit index l = 1, ..., N:

[0086] - Calculate the 1-RDM of the first N-qubit quantum state on the subsystem corresponding to qubit l, for example, by obtaining or preparing a copy of the first N-qubit quantum state, for example, obtaining or preparing a copy of the N-qubit quantum system of the first N-qubit quantum state, and measuring each qubit in the quantum system except for the l-th qubit to obtain a classical representation of the first reduced quantum state of the quantum system, such as a 2×2 matrix, to calculate Tr. m≠l [ρ(x i )).

[0087] - Calculate the 1-RDM of the second N-qubit quantum state on the subsystem corresponding to qubit l, for example, by obtaining or preparing a copy of the second N-qubit quantum state, for example, obtaining or preparing a copy of the N-qubit quantum system of the second N-qubit quantum state, and measuring each qubit in the quantum system except for the l-th qubit to obtain the classical representation of the second reduced quantum state of the quantum system, for example, a 2×2 matrix, to calculate Tr.m≠l [ρ(x j )).

[0088] - Perform classical operations according to equation (1) (e.g., multiply the classical representations of the first and second reduced quantum states, calculate the trace of the multiplied value, and sum the average of the calculated traces for each qubit index l = 1, ..., N) to obtain Q(x i ,x j The value of ).

[0089] To compute the complete kernel matrix, the quantum computing device computes each pair of quantum data points x in the training dataset. i ,x j Repeat the above process.

[0090] Using the squared exponential kernel function of 1-RDM

[0091] As another example, in an implementation of a set of kernel functions based on 1-RDM, the kernel function can be a square exponential kernel function. The square exponential kernel function takes a first quantum data point and a second quantum data point as input and produces a numerical output. The square exponential kernel function can include an exponential function of the sum of terms, where the sum is operated on each of the N qubits. Each addend corresponds to the corresponding qubit and is equal to i) the reduced density matrix corresponding to the first quantum data point on the subsystem of the corresponding qubit minus ii) the norm of the reduced density matrix corresponding to the second quantum data point on the subsystem of the corresponding qubit. For example, the square exponential kernel function can be given by the following equation (2):

[0092]

[0093] In equation (2), γ represents an adjustable parameter that can be adjusted to improve prediction accuracy (γ can be used to define the point x). i and x j How close should RDM be used? If γ is large, most points will have near-zero similarity, while if γ is small, points with similar RDM are considered to have high similarity. (If γ is zero, then each point can be considered identical), l is an index from 1 to the number of qubits N, and each qubit is labeled, and ρ(x) = ... i )=|x i > <x i | and Tr m≠k [ρ(x i )] represents 1-RDM. The quadratic exponential kernel function given by equation (2) can learn any nonlinear function of 1-RDM.

[0094] To compute the value of the quadratic exponential kernel function given by equation (2) for a pair of quantum data points including a first N-qubit quantum state and a second N-qubit quantum state, the quantum computing device can:

[0095] Repeat, and for each qubit index l = 1, ..., N:

[0096] - Calculate the 1-RDM of the first N-qubit quantum state on the subsystem corresponding to qubit l, for example, by obtaining or preparing a copy of the first N-qubit quantum state, for example, obtaining or preparing a copy of the N-qubit quantum system of the first N-qubit quantum state, and measuring each qubit in the quantum system except for the l-th qubit to obtain the first reduced quantum state (classical representation) of the quantum system, to calculate Tr. m≠l [ρ(x i )).

[0097] - Calculate the 1-RDM of the second N-qubit quantum state on the subsystem corresponding to qubit l, for example, by obtaining or preparing a copy of the second N-qubit quantum state, for example, obtaining or preparing a copy of the N-qubit quantum system of the second N-qubit quantum state, and measuring each qubit in the quantum system except for the l-th qubit to obtain the second reduced quantum state (classical representation) of the quantum system, to calculate Tr. m≠l [ρ(x j )).

[0098] - Subtract the second reduced quantum state from the first reduced quantum state to obtain the third reduced quantum state, and determine the norm of the third reduced quantum state, for example, classically calculating ||Tr. m≠l [ρ(x i )]-Tr n≠l [ρ(x j )]|| 2 as well as

[0099] - Sum the average of the norms for each qubit index l = 1, ..., N, multiply by –γ, and calculate the exponent to obtain The value of .

[0100] To compute the complete kernel matrix, the quantum computing device computes each pair of quantum data points x in the training dataset. i ,x j Repeat the above process.

[0101] Linear kernel functions using k-RDM

[0102] As another example, in an implementation where the kernel function is based on a k-RDM set, the kernel function can be a linear kernel function. A linear kernel function takes a first quantum data point and a second quantum data point as input and produces a numerical output. A linear kernel function can include a sum of terms, where the sum is operated on each subset of k qubits taken from N qubits. Each addend corresponds to a corresponding subset and is equal to the trace of the product of i) the reduced density matrix of the first quantum data point on the subsystem corresponding to the corresponding subset of k qubits and ii) the reduced density matrix of the second quantum data point on the subsystem corresponding to the corresponding subset of k qubits. For example, a linear kernel function can be given by the following equation (3):

[0103]

[0104] In equation (3), S k (n) represents the set of subsets of k qubits (taken from N qubits), and ρ(x i )=|x i > <x i | and Tr m≠K [ρ(x i )] represents k-RDM, for example, the trace on all qubits except those included in the set K. The linear kernel function of equation (3) can learn any observable that can be written as the sum of k-body terms.

[0105] To compute the value of the linear kernel function given by equation (3) for a pair of quantum data points including a first N-qubit quantum state and a second N-qubit quantum state, the quantum computing device can:

[0106] Repeat, and for each set K of k qubits:

[0107] - Calculate the k-RDM of the first N-qubit quantum state on the subsystem corresponding to the qubits in set K, for example, by obtaining or preparing a copy of the first N-qubit quantum state, for example, obtaining or preparing a copy of the N-qubit quantum system of the first N-qubit quantum state, and measuring each qubit in the quantum system other than those included in set K to obtain the first reduced quantum state of the quantum system (a classical representation, e.g., matrix representation), to calculate Tr m≠K [ρ(x i )).

[0108] - Calculate the k-RDM of the second N-qubit quantum state on the subsystem corresponding to the qubits in set K, for example, by obtaining or preparing a copy of the second N-qubit quantum state, for example, obtaining or preparing a copy of the N-qubit quantum system of the second N-qubit quantum state, and measuring each qubit in the quantum system other than those included in set K to obtain the second reduced quantum state (classical representation) of the quantum system, to calculate Tr. m≠K [ρ(x j )).

[0109] - Determine the trace of the product of the first and second reduced quantum states, for example, determine Tr[Tr m≠K [ρ(x i )]] and [Tr n≠K [ρ(x j )]],as well as

[0110] - Sum the average of the traces determined for each set K of k qubits to obtain The value.

[0111] To compute the complete kernel matrix, the quantum computing device computes each pair of quantum data points x in the training dataset. i ,x j Repeat the above process.

[0112] Using the exponential kernel function of k-RDM

[0113] The kernel functions given by equations (1)-(3) can learn functions of a finite number of classes. For example, the linear kernel function given by equation (1) can learn observables of the sum of single-qubit observables. However, in some implementations, it may be beneficial to define a kernel that can learn any quantum model, for example, a linear function of all quantum states. Given a quantum neural network of arbitrary depth. In these implementations, the kernel function can be an exponential kernel function that uses k-RDM sampling with classical shadowing techniques. The qubit indexes (p1, p2, ... p...) are... k The k-RDM of the quantum state ρ(x) can be reconstructed using a locally randomized measurement in the form of classical shadowing:

[0114]

[0115] in, It is the pth r The random Pauli measurement basis X, Y, and Z on qubits, It is a Pauli basis The p-th quantum state ρ(x) rThe measurement result on each qubit is ±1. The expected value is relative to a random measurement on ρ(x). The inner product of two k-RDMs is equal to:

[0116]

[0117] Wherein, ρ(x) i ) and ρ9x j The randomized measurement results are independent. This equation can be generalized to certain indices p. r ,p s Overlapping cases. This introduces additional characteristics into the feature graph defining the kernel. The sum of all possible k-RDMs can be written as:

[0118]

[0119] This uses the inner product of two k-RDMs and the linear equation of the expectation. Therefore, the kernel function containing all RDM orders is given by the following equation (4):

[0120]

[0121] In equation (4), the expected value n is a randomly selected Pauli frame taken from measurements on systems i and j. s Obtained from the sample, The first indicator function represents the consistency between the results of random Pauli measurements performed independently on system i and system j, and A second indicator function representing the consistency of the measurement basis, for example, whether the same basis X, Y, Z, I was chosen for each qubit across the two systems. γ represents a hyperparameter.

[0122] To compute the value of the linear kernel function given by equation (4) for a pair of quantum data points including a first N-qubit quantum state and a second N-qubit quantum state, the quantum computing device can:

[0123] For n s The kth repetition of the sample:

[0124] - Obtain the first measurement result by measuring each qubit in system i in a randomly sampled Pauli basis X, Y, or Z, to obtain the result at the h-th qubit. and in, It is 1 or -1, and It is a random basis X, Y, or Z.

[0125] - A second measurement is obtained by measuring each qubit in system j in a randomly sampled Pauli basis X, Y, or Z, to obtain the measurement on the h-th qubit. and in, It is 1 or -1, and It is a random basis X, Y, or Z.

[0126] - For the h-th qubit in an N-qubit system, compare the first measurement result and the second measurement result to determine the first indicator function. The value, if two results If they are equal, the value is 1; otherwise, it is 0.

[0127] - For the h-th qubit in an N-qubit system, through Determine the value of the second indicator function.

[0128] - For adjustable γ>0, the calculated value as well as

[0129] -use Estimate kernel functions.

[0130] In mathematics, calculating quantities:

[0131]

[0132] Where, N s Ri represents the number of repetitions of each quantum state of system i or j, where r1 and r2 are repetitions. This represents the Pauli basis in the p-th qubit of r2 repetition, and These are the corresponding measurement results. It is efficient to compute the kernel function using locally randomized measurements and the classical shading form, as the classical shading form allows for efficient construction of the RDM based on a small number of measurements.

[0133] To compute the complete kernel matrix, the quantum computing device computes each pair of quantum data points x in the training dataset. i ,x j Repeat the above process.

[0134] Back Figure 4The quantum computing device provides the computed kernel matrix Q to the classical processor (step 406). The classical processor is configured to use the kernel matrix Q to execute classical machine learning methods. For example, in an implementation where the training data points obtained in step 402 are labeled data, the classical processor can be configured to execute any kernel SVM method for classification or prediction, including Gaussian kernels, neural tangent kernels, and random forests. As another example, in an implementation where the training data obtained in step 402 is unlabeled data, the classical processor can be configured to use the computed kernel matrix to assign a spatial distance metric, which can be used to perform unsupervised learning or classification using algorithms such as k-means.

[0135] Classic processors use the received kernel matrix to execute training algorithms to train the corresponding machine learning model. The specific training algorithm executed by a classic processor depends on the type of machine learning method the classic processor is configured to execute, and can include a variety of training algorithms.

[0136] Quantum computing devices obtain verification datasets of quantum data points {y i (Step 408). As described above with reference to step 402, the quantum data points included in the verification dataset can be received as quantum data inputs or can be generated based on classical data inputs.

[0137] The quantum computing device performs multiple quantum computations to update the kernel matrix by computing new rows and columns (step 410). The new rows and columns represent the similarity between quantum data points in the validation dataset and quantum data points in the training dataset. Computing the new rows and columns of the kernel matrix involves calculating the similarity between each pair of quantum data points x in the training and validation datasets. i ,y j Calculate the previously used kernel function Q ij =Q(x) i ,x j The value of ) is as described above with reference to step 404.

[0138] The quantum computing device provides the classical processor with an updated kernel matrix, such as new rows and columns of the kernel matrix (step 412). The classical processor processes the updated kernel matrix to output predictions, such as assigning labels or values ​​to each quantum data point in the validation dataset.

[0139] The digital and / or quantum themes and implementations of digital functional operations and quantum operations described in this specification can be implemented in digital electronic circuits, suitable quantum circuits, or more generally, in quantum computing systems, in physically manifested digital and / or quantum computer software or firmware, in digital and / or quantum computer hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. The term "quantum computing system" can include, but is not limited to, quantum computers, quantum information processing systems, quantum cryptography systems, or quantum simulators.

[0140] The implementation of the digital and / or quantum themes described in this specification can be implemented as one or more digital and / or quantum computer programs, i.e., one or more modules of digital and / or quantum computer program instructions encoded on a tangible, non-transitory storage medium for execution by a data processing device or for controlling the operation of a data processing device. The digital and / or quantum computer storage medium can be a machine-readable storage device, a machine-readable storage substrate, a random or serial access storage device, one or more qubits, or a combination of one or more of these. Alternatively or additionally, the program instructions can be encoded on artificially generated propagation signals capable of encoding digital and / or quantum information, such as machine-generated electrical, optical, or electromagnetic signals, which are generated to encode digital and / or quantum information for transmission to a suitable receiver device for execution by the data processing device.

[0141] The terms quantum information and quantum data refer to information or data carried, stored, or preserved by quantum systems, where the smallest nontrivial system is a qubit, i.e., a system that defines a unit of quantum information. It should be understood that the term "qubit" includes all quantum systems that can be appropriately approximated as two-level systems in the appropriate context. Such quantum systems can include multi-level systems, for example, having two or more levels. For example, such systems can include atoms, electrons, photons, ions, or superconducting qubits. In many implementations, the fundamental computational state is identified by the ground state and the first excited state; however, it should be understood that other settings, such as identifying computational states by higher-level excited states, are also possible. The term "data processing device" refers to digital and / or quantum data processing hardware and includes all kinds of devices, apparatuses, and machines for processing digital and / or quantum data, such as programmable digital processors, programmable quantum processors, digital computers, quantum computers, multiple digital and quantum processors or computers, and combinations thereof. The device may also be or further include special-purpose logic circuitry, such as an FPGA (Field-Programmable Gate Array), ASIC (Application-Specific Integrated Circuit), or a quantum simulator—that is, a quantum data processing device designed to simulate or generate information about a specific quantum system. In particular, a quantum simulator is a special-purpose quantum computer that does not have the capability to perform general-purpose quantum computing. In addition to the hardware, the device may optionally include code that creates an execution environment for digital and / or quantum computer programs, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of these.

[0142] Digital computer programs, also referred to or described as programs, software, software applications, modules, software modules, scripts, or code, can be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and can be deployed in any form, including as standalone programs or as modules, components, subroutines, or other units suitable for digital computing environments. Quantum computer programs, also referred to or described as programs, software, software applications, modules, software modules, scripts, or code, can be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and translated into a suitable quantum programming language, or can be written in a quantum programming language such as QCL or Quipper.

[0143] Digital and / or quantum computer programs may, but do not need to, correspond to files in a file system. Programs may be stored as a portion of a file containing other programs or data, for example, as one or more scripts stored in a markup language document, as a single file dedicated to the program in question, or as multiple collaborative files, for example, as a file storing one or more modules, subroutines, or code sections. Digital and / or quantum computer programs can be deployed to execute on a single digital or quantum computer, or on multiple digital and / or quantum computers located in one location or distributed across multiple locations and interconnected via digital and / or quantum data communication networks. A quantum data communication network is understood as a network that can transmit quantum data using quantum systems (e.g., qubits). Typically, digital data communication networks cannot transmit quantum data; however, quantum data communication networks can transmit both quantum data and digital data.

[0144] The processes and logical flows described in this specification can be executed by one or more programmable digital and / or quantum computers, operating where appropriate with one or more digital and / or quantum processors, to execute one or more digital and / or quantum computer programs to perform functions by manipulating input digital and quantum data and generating outputs. The processes and logical flows can also be executed by dedicated logic circuits or quantum simulators, and the apparatus can be implemented as dedicated logic circuits or quantum simulators, such as FPGAs or ASICs, or executed by a combination of dedicated logic circuits or quantum simulators and one or more programmable digital and / or quantum computers.

[0145] For a system of one or more digital and / or quantum computers, being “configured” to perform a specific operation or action means that the system has software, firmware, hardware, or a combination thereof installed on it, which, in operation, causes the system to perform those operations or actions. One or more digital and / or quantum computer programs being configured to perform a specific operation or action means that one or more programs include instructions that, when executed by a digital and / or quantum data processing device, cause that device to perform the operation or action. A quantum computer can receive instructions from a digital computer, which, when executed by a quantum computing device, cause the device to perform operations or actions.

[0146] Digital and / or quantum computers suitable for executing digital and / or quantum computer programs can be based on general-purpose or special-purpose digital and / or quantum processors or both, or any other type of central digital and / or quantum processing unit. Typically, the central digital and / or quantum processing unit receives instructions and digital and / or quantum data from read-only memory, random access memory, or a quantum system suitable for transmitting quantum data (e.g., photons), or a combination thereof.

[0147] The basic components of a digital and / or quantum computer are a central processing unit (CPU) for executing or carrying out instructions and one or more storage devices for storing instructions and digital and / or quantum data. The CPU and memory may be supplemented or incorporated therein by dedicated logic circuitry or a quantum simulator. Typically, a digital and / or quantum computer will also include, or be operatively coupled to, one or more mass storage devices for storing digital and / or quantum data, to receive digital and / or quantum data from or transfer digital and / or quantum data to, or both, such mass storage devices as magnetic disks, magneto-optical disks, optical disks, or quantum systems suitable for storing quantum information. However, such devices are not mandatory for digital and / or quantum computers.

[0148] Digital and / or quantum computer-readable media suitable for storing digital and / or quantum computer program instructions and digital and / or quantum data include all forms of non-volatile digital and / or quantum memories, media, and storage devices, including, for example, semiconductor storage devices such as EPROM, EEPROM, and flash memory devices; magnetic disks, such as internal hard disks or removable hard disks; magneto-optical disks; CD-ROM and DVD-ROM disks; and quantum systems such as trapped atoms or electrons. It should be understood that quantum memories are devices capable of storing quantum data with high fidelity and efficiency for extended periods, such as light-matter interfaces used for transmission and quantum characteristics used for storing and preserving quantum data, such as superposition or quantum coherent matter.

[0149] The control of the various systems described in this specification, or a portion thereof, may be implemented in a digital and / or quantum computer program product, comprising instructions stored on one or more non-transitory machine-readable storage media and executable on one or more digital and / or quantum processing devices. The systems described in this specification, or a portion thereof, may each be implemented as an apparatus, method, or system, which may include one or more digital and / or quantum processing devices and a memory storing executable instructions to perform the operations described in this specification.

[0150] While this specification contains numerous specific implementation details, these should not be construed as limiting the scope of the claims, but rather as descriptions of features specific to particular embodiments. Some features described in the context of standalone embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may be implemented separately in multiple embodiments or in any suitable sub-combination. Furthermore, although features may be described above as functioning in certain combinations, and even initially claimed in this way, one or more features from a claimed combination may be removed from that combination in some cases, and the claimed combination may be for sub-combinations or variations thereof.

[0151] Similarly, although operations are described in a specific order in the accompanying drawings, this should not be construed as requiring these operations to be performed in the specific order or sequence shown, or requiring all illustrated operations to be performed to obtain the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the above embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.

[0152] Specific implementations of the subject matter have been described. Other implementations are within the scope of the following claims. For example, the actions described in the claims can be performed in different orders and the desired results can still be obtained. As an example, the processes depicted in the figures do not necessarily require the specific order or sequential order shown to achieve the desired results. In some cases, multitasking and parallel processing may be advantageous.

Claims

1. A computer-implemented method, comprising: A training dataset of quantum data points is obtained from a quantum computing device; The kernel matrix representing the similarity between quantum data points included in the training dataset is computed by a quantum computing device, including computed corresponding values ​​of the kernel function for each pair of quantum data points in the training dataset, wherein, The quantum data points are encoded as quantum states of qubits by the quantum computing device, wherein the kernel function is based on the reduced density matrix of the quantum data points, wherein the kernel function takes a first quantum data point and a second quantum data point as input, and calculates the similarity between the first quantum data point and the second quantum data point as an element in the kernel matrix, and wherein the reduced density matrix is ​​calculated for a subset of quantum states of qubits; and The core matrix is ​​provided to the classical processor by the quantum computing device.

2. The method according to claim 1, further comprising: Receive the kernel matrix from a quantum computing device and through a classical processor; and Classic processors use a kernel matrix to execute training algorithms to build machine learning models.

3. The method according to claim 1, further comprising: A verification dataset of quantum data points obtained from a quantum computing device; The new elements of the kernel matrix are calculated by a quantum computing device, where, The new element includes an entry representing the similarity between quantum data points in the validation dataset and quantum data points in the training dataset, wherein computing the new element includes computing the corresponding value of the kernel function for each pair of quantum data points in the training dataset and the validation dataset; as well as Quantum computing devices provide new elements of the kernel matrix to classical processors.

4. The method of claim 3 further comprises processing new elements of the kernel matrix by a classical processor to output a prediction for each quantum data point in the verification dataset.

5. The method according to any one of the preceding claims, wherein, The kernel function is based on the individual reduced density matrix of quantum data points in the training dataset.

6. The method according to claim 5, wherein, The kernel functions include linear kernel functions.

7. The method according to claim 6, wherein, The linear kernel function i) takes the first quantum data point and the second quantum data point as input, ii) produces a numerical output, and iii) includes a sum of terms, wherein the sum is operated on each of the N qubits where N>1, and the addend corresponds to the corresponding qubit and is equal to the trace of the product of a) the reduced density matrix of the first quantum data point on the subsystem of the corresponding qubit and b) the reduced density matrix of the second quantum data point on the subsystem of the corresponding qubit.

8. The method according to claim 6 or 7, wherein, The linear kernel function is given by the following equation: in, , Representing the first quantum data point and the second quantum data point, An index representing numbers from 1 to the number of qubits N, and each qubit is labeled. and Represents the 1-reduced density matrix (RDM) on qubit k.

9. The method of claim 6, wherein, the value of the kernel function is computed for a pair of quantum data points in the training dataset, wherein, The pair of quantum data points includes a first N-qubit quantum state having N > 1 and a second N-qubit quantum state having N > 1, including: Repeatedly, and for each qubit index: To correspond to qubit The calculation of the 1-reduced density matrix (RDM) of the first N-qubit quantum state on the subsystem includes obtaining a copy of the N-qubit quantum system in the first N-qubit quantum state, and measuring the density matrix other than the first N-qubit quantum state. Each qubit in the quantum system, other than the qubits, is used to obtain the first reduced quantum state of the quantum system; To correspond to qubit The calculation of 1-RDM on the second N-qubit quantum state of the subsystem includes obtaining a copy of the N-qubit quantum system in the second N-qubit quantum state and measuring the N-qubit quantum state in the subsystem. Each qubit in the quantum system, in addition to the qubits themselves, is used to obtain the second reduced quantum state of the quantum system; Determine the trace of the product of the first and second reduced quantum states; and Sum the average of the traces for each qubit index.

10. The method according to claim 5, wherein, The kernel functions include the squared exponent kernel function.

11. The method according to claim 10, wherein, The quadratic exponential kernel function i) takes the first and second quantum data points as input, ii) produces a numerical output, and iii) includes an exponential function of the sum of terms, wherein the sum is in It operates on each of the N qubits, and the addend corresponds to the corresponding qubit, and is equal to a) the reduced density matrix of the first quantum data point on the subsystem corresponding to the corresponding qubit minus b) the norm of the reduced density matrix of the second quantum data point on the subsystem corresponding to the corresponding qubit.

12. The method according to claim 10 or 11, wherein, The quadratic exponent kernel function is given by the following formula: in, , Representing the first quantum data point and the second quantum data point, An index representing numbers from 1 to the number of qubits N, and each qubit is labeled. and Represents 1-RDM on qubit k.

13. The method according to claim 10, wherein, The kernel function is computed for a pair of quantum data points in the training dataset, wherein the pair of quantum data points comprises a first N-qubit quantum state having N > 1 and a second N-qubit quantum state having N > 1, comprising: repeatedly and for each qubit index: To correspond to qubit The 1-reduced density matrix (RDM) of the first N-qubit quantum state on the subsystem is calculated, including obtaining a copy of the N-qubit quantum system in the first N-qubit quantum state and measuring the density matrix other than the first N-qubit quantum state. Each qubit in the quantum system, other than the qubits, is used to obtain the first reduced quantum state of the quantum system; To correspond to qubit The calculation of 1-RDM on the second N-qubit quantum state of the subsystem includes obtaining a copy of the N-qubit quantum system in the second N-qubit quantum state and measuring, except for the first N-qubit quantum state... Each qubit in the quantum system, in addition to the qubits themselves, is used to obtain the second reduced quantum state of the quantum system; Subtracting the second reduced quantum state from the first reduced quantum state yields the third reduced quantum state, and the norm of the third reduced quantum state is determined; and Sum the average of the determined norms for each qubit index and calculate the exponent of the summation average.

14. The method according to any one of claims 1 to 4, wherein, The kernel function is based on k-body RDM of quantum data points, where k is less than a predetermined value.

15. The method according to claim 14, wherein, The kernel functions include linear kernel functions.

16. The method according to claim 15, wherein, The linear kernel function i) takes a first quantum data point and a second quantum data point as input, ii) produces a numerical output, and iii) includes a sum of terms, wherein the sum is operated on each subset of k qubits taken from N qubits, and each addend corresponds to the corresponding subset and is equal to the trace of the product of a) the reduced density matrix of the first quantum data point on the subsystem corresponding to the corresponding subset of k qubits and b) the reduced density matrix of the second quantum data point on the subsystem corresponding to the corresponding subset of k qubits.

17. The method according to claim 15 or 16, wherein, The linear kernel function is given by the following equation: in, The set representing a subset of k qubits. and This represents k-RDM.

18. The method according to claim 15, wherein, The kernel function is computed for a pair of quantum data points in the training dataset, wherein the pair of quantum data points includes a first N-qubit quantum state and a second N-qubit quantum state, including: Repeatedly, and for each set of k qubits: Calculating the k-RDM of the first N-qubit quantum state on a subsystem corresponding to the qubits in the set includes obtaining a copy of the N-qubit quantum system of the first N-qubit quantum state and measuring each qubit in the quantum system other than those included in the set to obtain the first reduced quantum state of the quantum system. Calculating the k-RDM of the second N-qubit quantum state on a subsystem corresponding to the qubits in the set includes obtaining a copy of the N-qubit quantum system of the second N-qubit quantum state and measuring each qubit in the quantum system other than those included in the set to obtain the second reduced quantum state of the quantum system. Determine the trace of the product of the first and second reduced quantum states; and Sum the average values ​​determined for each set of k qubits.

19. The method of claim 14, wherein, The kernel functions include the exponential kernel functions.

20. The method according to claim 19, wherein, The exponential kernel function is given by the following formula: Among them, expected value These are randomly selected Pauli frames measured on the first system i and the second system j. Obtained from the sample A first indicator function representing the consistency between the results of random Pauli measurements performed independently on the first system i and the second system j, and The second indicator function representing the consistency of the measurement basis.

21. The method according to claim 20, wherein, The kernel function is computed for a pair of quantum data points in the training dataset, wherein the pair of quantum data points includes a first N-qubit quantum state and a second N-qubit quantum state, including repeating: Obtaining the first measurement result involves measuring each qubit in the first system in a random Pauli-based manner to obtain the value of the h-th qubit. and ,in, It is 1 or -1, and It is a random basis X, Y, or Z; To obtain a second measurement result, the second measurement involves measuring each qubit in the second system in a random Pauli-based manner to obtain the value of the h-th qubit. and ,in, It is 1 or -1, and It is a random basis X, Y, or Z; For the h-th qubit in an N-qubit system, the first measurement result and the second measurement result are compared to determine the value of the first indicator function; For the h-th qubit in an N-qubit system, determine the value of the second indicator function; and Multiply the determined values ​​of the first indicator function and the second indicator function, sum them, and average them.

22. The method according to claim 1, wherein, The quantum data point comprises an N-qubit quantum state, wherein, .

23. The method according to claim 1, wherein, The training dataset for obtaining quantum data points includes: Receive the training dataset containing classic data points; and The training dataset for generating quantum data points is generated by embedding each classical data point into the corresponding quantum state by applying the corresponding encoding circuit to the reference quantum state.

24. An apparatus comprising: One or more classic processors; and One or more quantum computing devices that communicate data with the one or more classical processors, wherein, The quantum computing hardware includes: One or more qubit registers, each qubit register comprising one or more qubits, and Multiple control devices are configured to operate one or more qubit registers; The apparatus is configured to perform the method of any one of claims 1 to 23.