Quantum Computing Using Kernel Methods for Machine Learning
By employing a quantum computing device to compute a kernel matrix based on reduced density matrices for quantum data points, the challenges of high computational costs and limited scalability in kernel methods are addressed, resulting in improved scalability and predictive performance for machine learning models.
Patent Information
- Application Number
- JP2024092137
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-10-19
- Filing Date
- 2024-06-06
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2041-10-19
AI Technical Summary
Existing kernel methods for machine learning face challenges when dealing with large feature spaces, leading to high computational costs and limited scalability, especially in quantum computing applications.
The use of a quantum computing device to calculate a kernel matrix based on a kernel function derived from reduced density matrices (RDMs) for quantum data points, allowing for efficient computation of similarities between quantum data points and enabling the construction of machine learning models.
This approach enhances the scalability and predictive performance of machine learning models, particularly in quantum computing, by projecting quantum states into a classical representation, thereby magnifying geometric differences and improving generalization.
Smart Images

Figure 0007684480000064 
Figure 0007684480000065 
Figure 0007684480000066
Abstract
Description
Background Art
[0001] The kernel method is a class of algorithms for pattern analysis. The task of pattern analysis is to discover and examine general types of relationships in a dataset, such as clusters, rankings, principal components, correlations, and classifications. In many algorithms for solving these tasks, the data in the raw representation must be explicitly transformed into a feature vector representation via a user-specified feature map. In contrast, the kernel method requires only a user-specified kernel-similarity function (or "kernel function") over pairs of data points in the raw representation.
[0002] The kernel function enables the kernel method to operate in a high-dimensional implicit feature space without computing the coordinates of the data in that space. Instead, the inner product between the images of all pairs of data in the feature space is computed. These operations are often less computationally expensive than explicit computation of the coordinates.
[0003] Algorithms that can operate using a kernel include the kernel perceptron, support vector machine (SVM), Gaussian process, principal component analysis (PCA), canonical correlation analysis, ridge regression, spectral clustering, linear adaptive filters, and many others. By applying the kernel trick to a model, i.e., replacing its features (predictors) with a kernel function, any linear model can be turned into a non-linear model.
Summary of the Invention
Problems to be Solved by the Invention
[0004] This specification describes techniques for quantum computing using the kernel method for machine learning.
Means for Solving the Problems
[0005] Generally, one inventive aspect of the subject matter described in this specification can be implemented in a method that includes, by a quantum computing device, obtaining a training data set of quantum data points, and by the quantum computing device, calculating a kernel matrix representing similarities between quantum data points included in the training data set, the calculating including, for each pair of quantum data points in the training data set, calculating a corresponding value of a kernel function, the kernel function being based on a reduced density matrix for the quantum data points, and providing the kernel matrix to a classical processor by the quantum computing device.
[0006] Other implementations of this aspect include corresponding computer systems, apparatuses, and computer programs recorded on one or more computer storage devices, each configured to perform the actions of the method. The one or more computer systems can be configured to perform particular operations or actions by having software, firmware, hardware, or a combination thereof installed on the system that, during operation, causes the system to perform the actions. The one or more computer programs can be configured to perform particular operations or actions by including instructions that, when executed by a data processing apparatus, cause the apparatus to perform the actions.
[0007] The above and other implementations can each, optionally, include one or more of the following features, alone or in combination. In some implementations, the method further includes receiving the kernel matrix from the quantum computing device by the classical processor, and executing a training algorithm using the kernel matrix to construct a machine learning model by the classical processor.
[0008] In some implementations, the method further includes obtaining, by a quantum computing device, a verification data set of quantum data points; calculating, by the quantum computing device, new elements of a kernel matrix, where the new elements comprise entries representing a similarity between quantum data points in the verification data set and quantum data points in a training data set, and the step of calculating the new elements includes calculating corresponding values of a kernel function for each pair of quantum data points in the training data set and the verification data set; and providing, by the quantum computing device, the new elements of the kernel matrix to a classical processor.
[0009] In some implementations, the method further includes processing, by a classical processor, the new elements of the kernel matrix to output a prediction for each quantum data point in the verification data set.
[0010] In some implementations, the kernel function is based on a single-body reduced density matrix for quantum data points in a training data set.
[0011] In some implementations, the kernel function comprises a linear kernel function.
[0012] In some implementations, the linear kernel function takes as input i) a first quantum data point and a second quantum data point, ii) produces a numerical output, iii) includes a sum, where the sum extends over each of N quantum bits for N>1, and the summands correspond to each quantum bit and are equal to a) a reduced density matrix for the first quantum data point on a subsystem corresponding to each quantum bit and b) the trace of a product of reduced density matrices for the second quantum data point on a subsystem corresponding to each quantum bit.
[0013] In some implementations, the linear kernel function is
[0014]
Number
[0015] is given by, provided that x i , x j represents the first and second quantum data points, l ranges from 1 to the number of qubits N, and for each qubit ρ(x i ) = |x i 〉〈x i | represents the index for labeling, and Tr m≠k [ρ(x i )] represents the 1-reduced density matrix (RDM) on qubit k.
[0016] In some implementations, for pairs of quantum data points in a training data set, a step of calculating the value of a kernel function, where the pair comprises a first N-qubit quantum state with N > 1 and a second N-qubit quantum state with N > 1, the step is repeated, and for each qubit index, a step of calculating a 1-reduced density matrix (RDM) for the first N-qubit quantum state on the subsystem corresponding to qubit l, the step comprising 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 the l-th qubit to obtain a first reduced quantum state of the quantum system, and a step of calculating a 1-RDM for the second N-qubit quantum state on the subsystem corresponding to qubit l, the step comprising 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 the l-th qubit to obtain a second reduced quantum state of the quantum system, and a step of determining the trace of the product of the first reduced quantum state and the second reduced quantum state, and a step of adding the average of the traces determined for each qubit index.
[0017] In some implementations, the kernel function comprises a squared exponential kernel function.
[0018] In some implementations, the squared exponential kernel function takes as input a first quantum data point and a second quantum data point, yields a numerical output, includes an exponential function of a sum, where the sum ranges over each of N qubits for N>1, and the summands correspond to respective qubits and are equal to the norm of the difference between a) the reduced density matrix for the first quantum data point on the subsystem corresponding to each qubit and b) the reduced density matrix for the second quantum data point on the subsystem corresponding to each qubit.
[0019] In some implementations, the squared exponential kernel function is
[0020]
Number
[0021] given by, where x i , x j represent the first and second quantum data points, l ranges from 1 to the number of qubits N, and for each qubit ρ(x i ) = |x i 〉〈x i | labels the index, and Tr m≠k [ρ(x i )] represents the 1-RDM on qubit k.
[0022] In some implementations, for pairs of quantum data points in a training dataset, a step of calculating a value of a kernel function, where the pair comprises a first N-qubit quantum state with N>1 and a second N-qubit quantum state with N>1, the step being repeated, and for each qubit index, a step of calculating a 1-reduced density matrix (RDM) for the first N-qubit quantum state on the subsystem corresponding to qubit l, the step comprising 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 the l-th qubit to obtain a first reduced quantum state of the quantum system, and a step of calculating a 1-RDM for the second N-qubit quantum state on the subsystem corresponding to qubit l, the step comprising 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 the l-th qubit to obtain a second reduced quantum state of the quantum system, and a step of subtracting the second reduced quantum state from the first reduced quantum state to obtain a third reduced quantum state and determining a norm of the third reduced quantum state, and a step of adding an average of the norms determined for each qubit index and calculating an exponent of the added average.
[0023] In some implementations, the kernel function is based on a k-body RDM (k-body RDM) for quantum data points, where k is less than a predetermined value.
[0024] In some implementations, the kernel function comprises a linear kernel function.
[0025] In some implementations, a linear kernel function takes as input i) a first quantum data point and a second quantum data point, ii) produces a numerical output, and iii) comprises a sum, the sum being over each subset of k qubits taken from N qubits and each summand corresponding to a respective subset, where the summand is equal to the trace of the product of a) a reduced density matrix for the first quantum data point on a subsystem corresponding to each subset of k qubits, and b) a reduced density matrix for the second quantum data point on a subsystem corresponding to each subset of k qubits.
[0026] In some implementations, a linear kernel function is
[0027]
Number
[0028] given by, where S k (n) represents a set of subsets of k qubits ρ(x i ) = |x i 〉〈x i | and Tr m≠K [ρ(x i )] represents the k-RDM.
[0029] In some implementations, for pairs of quantum data points in a training dataset, the step of calculating the value of a kernel function, where the pair comprises a first N-qubit quantum state and a second N-qubit quantum state, the step is repeated, and for each set of k qubits, the step of calculating the k-RDM for the first N-qubit quantum state on the subsystem corresponding to the qubits in the set, the step comprising 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 qubits included in the set to obtain a first reduced quantum state of the quantum system, and the step of calculating the k-RDM for the second N-qubit quantum state on the subsystem corresponding to the qubits in the set, the step comprising 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 qubits included in the set to obtain a second reduced quantum state of the quantum system, and the step of determining the trace of the product of the first reduced quantum state and the second reduced quantum state, and the step of adding the average of the traces determined for each set of k qubits.
[0030] In some implementations, the kernel function comprises an exponential kernel function.
[0031] In some implementations, the exponential kernel function is
[0032]
Number
[0033] given by, provided that the expected value
[0034]
Number
[0035] is taken over n s samples (i.e., experiments, where n s is chosen as large as possible while taking into account hardware implementation considerations, e.g., n s is chosen as the maximum number that can be experimentally measured with some margin) measured on the first system i and the second system j from a randomly chosen Pauli frame,
[0036]
Number
[0037] represents a first indicator function for the agreement between random Pauli measurement results independently performed on the first system i and the second system j,
[0038]
Number
[0039] represents a second indicator function for measurement basis agreement.
[0040] In some implementations, for pairs of quantum data points in a training dataset, a step of calculating the value of a kernel function, where the pair comprises a first N - qubit quantum state and a second N - qubit quantum state, the step of repeatedly obtaining a first measurement result, where each qubit in the first system is measured in a random Pauli basis to obtain a value for the h - th qubit
[0041]
Number
[0042] and
[0043]
Number
[0044] including the step of obtaining
[0045]
Number
[0046] is either 1 or -1,
[0047]
Number
[0048] a step that is a random basis X, Y, or Z, and a step of obtaining a second measurement result, measuring each qubit in the second system in a random Pauli basis to obtain a value for the h-th qubit
[0049]
Number
[0050] and
[0051]
Number
[0052] including the step of obtaining
[0053]
Number
[0054] is either 1 or -1,
[0055]
Number
[0056] is the random basis X, Y, or Z, a step; for the h-th qubit in the N-qubit system, comparing the first measurement result and the second measurement result to determine the value of the first indicator function; for the h-th qubit in the N-qubit system, determining the value of the second indicator function; multiplying, adding, and averaging the determined values of the first indicator function and the second indicator function.
[0057] In some implementations, the quantum data point comprises an N-qubit quantum state with N > 1.
[0058] In some implementations, the step of obtaining the training data set of quantum data points comprises receiving the training data set of classical data points and generating the training data set of quantum data points, including the step of embedding each classical data point into its respective quantum state by applying each encoding circuit to the reference quantum state.
[0059] The subject matter described herein can be implemented in a particular manner to achieve one or more of the following advantages.
[0060] Kernel methods for machine learning can be applied to various regression and classification problems. However, when the feature space becomes large and the computational cost for estimating the kernel function becomes high, there are limitations to good solutions for such problems. The techniques described herein address this problem by using a quantum computing device to compute the kernel function.
[0061] In addition, the quantum computation described herein for the kernel function is scalable, and as the number of qubits increases, the signal remains large and the method continues to function well, if not better. This is in contrast to the known quantum kernel methods, where, for example, due to the exponentially large Hilbert space where all inputs are too far apart, the signal typically decays exponentially with the number of qubits due to small geometric differences. The scalability of the technique described herein is achieved, for example, by projecting the quantum state embedded from classical data back to the classical space through the use of, for example, RDM, thereby magnifying the geometric differences. In other words, a kernel function close to zero for each pair of points does not generalize well. However, the projected quantum kernel described herein is defined using a classical representation of the approximation of the quantum state, thereby resulting in a non-zero kernel function that provides better generalization performance.
[0062] Furthermore, due to the magnified geometric differences, the technique described herein can achieve a large predictive advantage over general classical machine learning models. Such a predictive advantage can also be achieved with a small number of qubits, for example, up to 30 qubits. Therefore, the technique described herein is particularly suitable for implementations using small quantum computers, such as noisy intermediate-scale quantum devices, and / or hybrid quantum-classical computers.
[0063] The technique described herein can be applied to various applications of classical machine learning, including, for example, image and digit classification from MNIST or other sources of image / video data, classification of sentiment and text analysis, analysis of high-energy physics data, classification of the phase of data from quantum sensors, quantum state discrimination or quantum repeater engineering, prediction using data from quantum sensors, and examples from quantum machine learning involving quantum input data, including many-body or otherwise.
[0064] Details of one or more implementations of the subject matter of this specification are set forth in the accompanying drawings and the description below. Other features, aspects, and advantages of the subject matter will become apparent from the description, the drawings, and the claims.
Brief Description of the Drawings
[0065]
Figure 1
Figure 2
Figure 3
Figure 4
Modes for Carrying Out the Invention
[0066] Like reference numerals and designations in the various drawings indicate like elements.
[0067] This specification describes techniques for performing machine learning tasks using quantum kernel methods.
[0068] In the conventional quantum kernel method, the kernel operator is, for example, Tr[ρ(x i )ρ(x j)]Based on the fidelity type metric given by. This kernel operator can consider all data points to be far from each other and produce a kernel matrix close to the identity. This can result in small geometric differences, which can lead to whether classical machine learning models are competitive or superior to quantum kernel methods. For example, in some cases, a quantum model may require an exponential amount of samples to learn using this conventional kernel operator, while only a linear number of samples are required to learn using a classical machine learning model.
[0069] The quantum kernel method described herein uses a family of projected quantum kernels to address this problem. A quantum or classical dataset of data points is received, and a quantum computer is used to calculate the geometry between the data points. The geometry is calculated using a projected quantum kernel operator selected from a family of reduced physical observables that are scalable. The projected quantum kernel operator projects the quantum state onto an approximate classical representation, for example, using a reduced observable or a classical shadow. The calculated geometry is then fed into classical methods for training and validation. The projection provides a reduction to a low-dimensional classical space that can generalize better, even when the training set space has a large dimension, for example, a dimension proportional to the number of qubits contained in the available quantum computer.
[0070] FIG. 1 is a diagram of the geometries (kernel functions) defined by the classical kernel method 100, the conventional quantum kernel method 102, and the projective quantum kernel method 104 described herein. The letters A, B, C, etc. represent data points in different spaces, and the arrows represent the similarity measures (kernel functions) between the data. The geometric difference g is the difference between the similarity measures in the different methods 100, 102, and 104, and d is the effective dimension of the data set in the quantum Hilbert space. As shown, the geometric difference between the similarity measures in the classical kernel method 100 and the projective quantum kernel method 104 is greater than the geometric difference between the similarity measures in the classical kernel method 100 and the conventional quantum kernel method 102. This greater geometric difference results in scalability and improved prediction accuracy, as described above.
[0071] Exemplary Operating Environment FIG. 2 shows an exemplary system 200 for performing classification and regression tasks using the projective quantum kernel method. The exemplary system 200 is an example of a system implemented as classical and quantum computer programs on one or more classical computers and quantum computing devices in one or more locations where the systems, components, and techniques described hereinafter may be implemented.
[0072] The exemplary system 200 includes an exemplary quantum computing device 202. The quantum computing device 202 may be used, according to some implementations, to perform the quantum computing operations described herein. The quantum computing device 202 represents various forms of quantum computing devices. The components shown here, their connections and relationships, and their functions are merely examples and do not limit the implementations of the invention described and / or claimed herein.
[0073] Exemplary quantum computing device 202 includes a qubit assembly 252 and a control and measurement system 204. The qubit assembly includes a plurality of qubits, such as qubit 206, that are used to perform algorithmic operations or quantum computations. The qubits shown in FIG. 2 are arranged in a rectangular array, which is a schematic and not limiting. Qubit assembly 252 also includes adjustable coupling elements, such as coupler 208, that enable interaction between coupled qubits. In the schematic of FIG. 2, each qubit is adjustably coupled to each of its four adjacent qubits using respective coupling elements. However, this is an exemplary arrangement of qubits and couplers, and other arrangements are possible, including non-rectangular arrangements, arrangements that enable coupling between non-adjacent qubits, and arrangements that include adjustable coupling between three or more qubits.
[0074] Each qubit can be a physical two-level quantum system or device that has levels representing the logical values of 0 and 1. The particular physical realization of the plurality of qubits and how the plurality of qubits interact with each other depends on various factors, including the type of quantum computing device included in the exemplary system 200 or the type of quantum computation that the quantum computing device is performing. For example, in an atomic quantum computer, the qubits can be realized via atoms, molecules, or solid-state quantum systems, such as ultrafine atomic states. As another example, in a superconducting quantum computer, the qubits can be realized via superconducting qubits or semiconductor qubits, such as a superconducting transmon state. As another example, in an NMR quantum computer, the qubits can be realized via nuclear spin states.
[0075] In some implementations, quantum computing can proceed by initializing qubits in a selected initial state and applying a sequence of unitary operators on the qubits. Applying a unitary operator to a quantum state can include applying a corresponding sequence of quantum logic gates to the qubits. Exemplary quantum logic gates include single-qubit gates, such as Pauli X, Pauli Y, Pauli Z (also called X, Y, Z), Hadamard, and S gates, two-qubit gates, such as controlled-X, controlled-Y, controlled-Z (also called CX, CY, CZ), and gates involving three or more qubits, such as the Toffoli gate. 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.
[0076] For example, in some implementations, the qubits in the qubit assembly 252 may be frequency tunable. In these examples, each qubit may have an associated operating frequency that can be adjusted through the application of voltage pulses via one or more drive lines coupled to the qubit. Exemplary operating frequencies include qubit idling frequencies, qubit interaction frequencies, and qubit readout frequencies. Different frequencies correspond to different operations that the qubits can perform. For example, setting the operating frequency to the corresponding idling frequency can put the qubit in a state where it does not strongly interact with other qubits and can be used to perform single qubit gates. As another example, when qubits interact via a coupler with fixed couplings, the qubits can be configured to interact with each other by setting their respective operating frequencies at some gate-dependent frequency that detunes from their common interaction frequency. In other cases, for example, when qubits interact via an adjustable coupler, the qubits can be configured to interact with each other by setting the parameters of their respective couplers to enable interaction between the qubits and then setting the respective operating frequencies of the qubits at some gate-dependent frequency that detunes from their common interaction frequency. Such interactions can be performed to execute multi-qubit gates.
[0077] The type of control signal 210 used depends on the physical implementation of the qubits. For example, the control signal may include RF or microwave pulses in an NMR or superconducting quantum computer system, or optical pulses in an atomic quantum computer system.
[0078] Quantum computing can be accomplished, for example, by measuring the state of qubits using quantum observables such as X or Z, each using a respective control signal 210. The measurement causes a readout signal 212 representing the measurement result to be communicated back to the measurement and control system 204. The readout signal 212 can include RF, microwave, or optical signals, depending on the physical modality for the quantum computing device and / or qubits. For convenience, the control signal 210 and the readout signal 212 shown in FIG. 2 are shown as only addressing selected elements (i.e., the top and bottom rows) of the qubit assembly, but during operation, the control signal 210 and the readout signal 212 can address each element in the qubit assembly 252.
[0079] The control and measurement system 204 is an example of a classical computer system that can be used to perform various operations on the qubit assembly 252, as described above, as well as other classical subroutines or computations. The control and measurement system 204 includes one or more classical processors, such as classical processor 214, one or more memories, such as memory 216, and one or more I / O units, such as I / O unit 218, connected by one or more data buses. The control and measurement system 204 can be programmed to send a sequence of control signals 210 to the qubit assembly, for example, to perform a selected series of quantum gate operations, and to receive a sequence of readout signals 212 from the qubit assembly, for example, as part of performing a measurement operation.
[0080] The processor 214 is configured to process instructions for execution within the control and measurement system 204. In some implementations, the processor 214 is a single-threaded processor. In other implementations, the processor 214 is a multi-threaded processor. The processor 214 is capable of processing instructions stored in the memory 216.
[0081] Memory 216 stores information within control and measurement system 204. In some implementations, memory 216 includes a computer-readable medium, a volatile memory unit, and / or a non-volatile memory unit. In some cases, memory 216 can include a storage device capable of providing mass storage for system 204, such as a hard disk device, an optical disk device, a storage device shared over a network by multiple computing devices (e.g., a cloud storage device), and / or any other mass storage device.
[0082] Input / output device 218 provides input / output operations for control and measurement system 204. Input / output device 218 includes a D / A converter, an A / D converter, as well as RF / microwave / optical signal generators, transmitters, and receivers, thereby enabling sending control signal 210 to qubit assembly and receiving readout signal 212 from qubit assembly to be suitable for physical means for a quantum computer. In some implementations, input / output device 218 can also include one or more network interface devices, such as an Ethernet card, serial communication devices, such as an RS-232 port, and / or wireless interface devices, such as an 802.11 card. In some implementations, input / output device 218 can include driver devices configured to receive input data and send output data to other external devices, such as a keyboard, a printer, and a display device.
[0083] An exemplary control and measurement system 204 is shown in FIG. 2, but implementations of the subject matter and functional operations described herein can be implemented in other types of digital electronic circuits, or in computer software, firmware, or hardware, or in one or more combinations thereof, including the structures disclosed herein and their structural equivalents.
[0084] Exemplary system 200 includes an exemplary classical processor 250. The classical processor 250 can be used to perform classical computing operations described herein, such as classical machine learning methods described herein, according to some implementations.
[0085] FIG. 3 shows a block diagram of the exemplary system 200 of FIG. 2 performing classification and regression tasks using the projected quantum kernel method. Steps (A)-(E) represent the training phase and correspond to steps 402-406 of an exemplary process 400 as described below with reference to FIG. 4. During step (A) of the exemplary process, the quantum computing device 202 obtains a training data set of data points. In some implementations, the data points can be quantum data points, e.g., quantum states. In other implementations, the data points can be classical data points. In these implementations, during step (B), the quantum computing device embeds the classical data points into respective quantum states. Steps (A) and (B) are described in more detail below with reference to step 402 of the exemplary process 400. In some implementations, the training data set of data points can be received from a classical computer such as the classical processor 250. In other implementations, the training data set of data points can be received from a quantum computing device such as the quantum computing device 202.
[0086] During step (C), the quantum computing device 202 calculates a kernel matrix using a kernel function based on the reduced density matrix for the obtained quantum data points / states. Step (C) is described in more detail below with reference to step 404 of the exemplary process 400.
[0087] During step (D), the quantum computing device 202 sends the kernel matrix calculated by the classical processor 250. During step (E), the classical processor receives the kernel matrix and uses the kernel matrix to train a machine learning model.
[0088] Stages (F) through (K) represent a confirmation or inference phase and correspond to steps 408 through 412 of the exemplary process 400. During stage (F), the quantum computing device 202 obtains a validation data set of data points. In some implementations, the data points can be quantum data points, such as quantum states. In other implementations, the data points can be classical data points. In these implementations, during stage (G), the quantum computing device embeds the classical data points into respective quantum states.
[0089] During stage (H), the quantum computing device updates the kernel matrix by calculating new rows and columns corresponding to the data points in the validation data set. Stage (H) will be described in more detail below with reference to steps 404 and 410 of the exemplary process 400.
[0090] During stage (I), the quantum computing device 202 sends the updated kernel matrix to the classical processor 250. During stage (J), the classical processor receives the updated kernel matrix and processes the updated kernel matrix using the trained machine learning model. During stage (K), the classical processor 250 outputs a prediction corresponding to the data points in the validation data set.
[0091] Hardware Programming FIG. 4 is a flowchart of an exemplary process 400 for generating and updating a 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, the quantum computing device 202 of FIG. 2, appropriately programmed in accordance with this specification, can execute process 400.
[0092] A quantum computing device obtains a training data set of quantum data points (step 402). The data points can be unlabeled or can be assigned associated category labels or numerical values.
[0093] In some implementations, the quantum computing device can receive the training data set as a quantum data input. For example, the quantum computing device can receive a set of quantum states |x i 〉, or can access a set of quantum states from quantum memory included in the quantum computing device. Each quantum state |x i 〉 in the training data set can be a state of an N-qubit quantum system. Each quantum state |x i 〉 can represent a respective classical data point, such as an image as described below.
[0094] In other implementations, the quantum computing device receives a training data set {x i} of classical data points, and can generate a respective training data set of quantum data points by embedding each classical data point x i into a respective quantum state |x i 〉. To embed a classical data point x i into an N-qubit quantum state |x i 〉, the quantum computing device can apply an encoding circuit U enc (x i ) to an N-qubit reference quantum state, such as the state |00...0〉. The encoding circuit U encIt depends on the type of data included in the training data set of classical data points, and various circuits can be used. For example, when classical data points represent images, the encoding circuit can be defined as a circuit that rotates each of the N qubits by the respective scaled singular values of the image. In some cases, more complex encoding circuits can be used, including layers of rotations with entangling quantum gates between some of the layers.
[0095] The quantum computing device performs a plurality of quantum computations (step 404) to calculate a kernel matrix Q that represents the similarity between quantum data points included in the training data set. Calculating the kernel matrix involves calculating the value of the kernel function Q i , x j for each pair of quantum data points x ij = Q(x i , x j ). The kernel function Q(x i , x j ) is based on the reduced density matrix for the quantum data points obtained in step 402. For example, in some implementations, the kernel function can be based on the single-particle reduced density matrix (1-RDM) for the quantum data points. In other implementations, the kernel function can be based on the k-particle RDM for the quantum data points, provided that k is less than a predetermined value. Exemplary kernel functions are described below.
[0096] Linear kernel function using 1-RDM In an implementation form where the kernel function is based on a set of 1-RDMs, the kernel function can be a linear kernel function. The linear kernel function takes as input a first quantum data point and a second quantum data point and produces a numerical output. The linear kernel function can include a sum of terms, where the sum extends over each of the N qubits. Each summand corresponds to a respective qubit and is equal to the trace of the product of i) the reduced density matrix for the first quantum data point on the subsystem corresponding to the respective qubit and ii) the reduced density matrix for the second quantum data point on the subsystem corresponding to the respective qubit. For example, the linear kernel function can be given by equation (1) below.
[0097] [Number]
[0098] In equation (1), l ranges from 1 to the number of qubits N, and for each qubit ρ(x i ) = |x i 〉〈x i | is the index labeling it, and Tr m≠k [ρ(x i )] represents the trace over all qubits except qubit k. The linear kernel function given by equation (1) can learn any observable that can be written as a sum of one-body terms.
[0099] For a pair of quantum data points including a first N-qubit quantum state and a second N-qubit quantum state, to calculate the value of the linear kernel function given by equation (1), a quantum computing device repeats, and for each qubit index l = 1,..., N, - 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 in the first N - qubit quantum state, and measuring each qubit in the quantum system except the l - th qubit to obtain a classical representation of the first reduced quantum state of the quantum system, for example, a 2 - by - 2 matrix, and calculating the 1 - RDM for the first N - qubit quantum state on the subsystem corresponding to qubit l, for example, calculating Tr m≠l [ρ(x i )], - 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 in the second N - qubit quantum state, and measuring each qubit in the quantum system except the l - th qubit to obtain a classical representation of the second reduced quantum state of the quantum system, for example, a 2 - by - 2 matrix, and calculating the 1 - RDM for the second N - qubit quantum state on the subsystem corresponding to qubit l, for example, calculating Tr m≠l [ρ(x j )], and - Performing a classical operation according to Equation (1) (for example, multiplying the classical representations of the first reduced quantum state and the second reduced quantum state, calculating the trace of the multiplied value, and adding the average of the calculated traces for each qubit index l = 1,..., N) to obtain a numerical value for Q(x i ,x j ). To calculate the complete kernel matrix, the quantum computing device iterates the procedure described above for each pair of quantum data points x i , x j in the training data set.
[0100] The squared - exponential kernel function using 1 - RDM As another example, in an implementation where the kernel function is based on a set of 1-RDMs, the kernel function can be a squared exponential kernel function. The squared exponential kernel function takes as input a first quantum data point and a second quantum data point and produces a numerical output. The squared exponential kernel function can include an exponential function of a sum, where the sum extends over each of the N qubits. Each summand corresponds to a respective qubit and is equal to the norm of the difference between i) the reduced density matrix for the first quantum data point on the subsystem corresponding to the respective qubit and ii) the reduced density matrix for the second quantum data point on the subsystem corresponding to the respective qubit. For example, the squared exponential kernel function can be given by the following equation (2).
[0101] [Number]
[0102] In equation (2), γ represents an adjustable parameter that can be adjusted to improve prediction accuracy (γ can be used to define how close points x i and x j should be. When γ is large, most points will have a similarity close to 0, while when γ is small, points with similar RDMs will be considered to have a high similarity. When γ is 0, each point can be considered the same), l ranges from 1 to the number of qubits N, and for each qubit ρ(x i ) = |x i 〉〈x i | is the index that labels it, and Tr m≠k [ρ(x i )] represents the 1-RDM. The squared exponential kernel function given by equation (2) can learn any non-linear function of the 1-RDM.
[0103] For a pair of quantum data points including a first N-qubit quantum state and a second N-qubit quantum state, to calculate the value of the squared exponential kernel function given by equation (2), a quantum computing device Repeatedly, and for each qubit index l = 1, ..., N, - Obtain or prepare a copy of the first N - qubit quantum state, for example, obtain or prepare a copy of the N - qubit quantum system in the first N - qubit quantum state, and measure each qubit in the quantum system except the l - th qubit to obtain the first reduced quantum state (classical representation) of the quantum system, and calculate the 1 - RDM for the first N - qubit quantum state on the subsystem corresponding to qubit l, for example, calculate Tr m≠l [ρ(x i )], - Obtain or prepare a copy of the second N - qubit quantum state, for example, obtain or prepare a copy of the N - qubit quantum system in the second N - qubit quantum state, and measure each qubit in the quantum system except the l - th qubit to obtain the second reduced quantum state (classical representation) of the quantum system, and calculate the 1 - RDM for the second N - qubit quantum state on the subsystem corresponding to qubit l, for example, calculate Tr m≠l [ρ(x j )], - Subtract the second reduced quantum state from the first reduced quantum state to obtain a third reduced quantum state, and determine the norm of the third reduced quantum state, for example, calculate ||Tr m≠l [ρ(x i )]-Tr n≠l [ρ(x j )]|| 2 classically, and - For each qubit index l = 1, ..., N, add the average of the determined norms, multiply by -γ, and calculate the exponent to obtain a value for
[0104]
Equation
[0105] can be obtained. To compute the full kernel matrix, the quantum computing device iterates the procedure described above for each pair of quantum data points x i , x j in the training data set.
[0106] Linear kernel function using k-RDM As another example, in an implementation where the kernel function is based on a set of k-RDMs, the kernel function can be a linear kernel function. The linear kernel function takes as input a first quantum data point and a second quantum data point and produces a numerical output. The linear kernel function can include a sum of terms, where the sum ranges over each subset of k qubits taken from N qubits. Each summand corresponds to a respective subset and is equal to the trace of the product of i) the reduced density matrix for the first quantum data point on the subsystem corresponding to each subset of k qubits, and ii) the reduced density matrix for the second quantum data point on the subsystem corresponding to each subset of k qubits. For example, the linear kernel function can be given by equation (3) below.
[0107]
Equation
[0108] In equation (3), S k (n) represents the set of subsets of k qubits (taken from N qubits) of ρ(x i ) = |x i 〉〈x i |, and Tr m≠K [ρ(x i )] represents the trace over all qubits except the k qubits included in the set K, i.e., the k-RDM. The linear kernel function in equation (3) can learn any observable written as a sum of k-body terms.
[0109] For a pair of quantum data points that includes a first N-qubit quantum state and a second N-qubit quantum state, to compute the value of the linear kernel function given by Equation (3), a quantum computing device repeatedly, and for each set K of k qubits, - Obtain or prepare a copy of the first N-qubit quantum state, e.g., obtain or prepare a copy of the N-qubit quantum system in the first N-qubit quantum state, and measure each qubit in the quantum system except for the qubits included in set K to obtain the first reduced quantum state (classical representation, e.g., matrix representation) of the quantum system, and compute the k-RDM for the first N-qubit quantum state on the subsystem corresponding to the qubits in set K, e.g., Tr m≠K [ρ(x i )], - Obtain or prepare a copy of the second N-qubit quantum state, e.g., obtain or prepare a copy of the N-qubit quantum system in the second N-qubit quantum state, and measure each qubit in the quantum system except for the qubits included in set K to obtain the second reduced quantum state (classical representation) of the quantum system, and compute the k-RDM for the second N-qubit quantum state on the subsystem corresponding to the qubits in set K, e.g., Tr m≠K [ρ(x j )], - Determine the trace of the product of the first reduced quantum state and the second reduced quantum state, e.g., Tr[Tr m≠K [ρ(x i )]][Tr n≠K [ρ(x j )]], and - For each set K of k qubits, add the average of the determined traces to
[0110]
Number
[0111] The numerical values for can be obtained. To compute the full kernel matrix, the quantum computing device iterates the procedure described above for each pair of quantum data points x i , x j in the training dataset.
[0112] Exponential kernel function using k-RDM The kernel functions given by equations (1)-(3) can learn a limited class of functions. For example, the linear kernel function given by equation (1) can learn observables that are sums of single qubit observables. However, in some implementations, it may be beneficial to define a kernel that can learn any arbitrarily deep quantum neural network given by, for example, a linear function of a full quantum state
[0113]
Number
[0114] In these implementations, the kernel function can be an exponential kernel function that uses k-RDM sampled using classical shadow techniques. The k-RDM of the quantum state ρ(x) for qubit indices (p 1 , p 2 ,... p k ) can be reconstructed by local randomized measurements using the formalism of classical shadows.
[0115]
Number
[0116] However,
[0117]
Number
[0118] is the random Pauli measurement basis X, Y, Z on the p r -th qubit, and
[0119] [Number]
[0120] is the Pauli basis
[0121] [Number]
[0122] -th measurement result ±1 of the quantum state ρ(x) under the r Pauli basis on the p-th qubit. The expectation value is taken with respect to the randomized measurement on ρ(x). The inner product of two k-RDMs is equal to the following,
[0123] [Number]
[0124] where the randomized measurement results for ρ(x i ), ρ(x j ) are independent. This equation can be extended when some indices p r , p s coincide. This introduces additional features in the feature map that defines the kernel. The sum of all possible k-RDMs can be written as follows,
[0125] [Number]
[0126] However, the inner product of two k-RDMs and the equations for the linearity of the expected value are used. Therefore, the kernel function that includes all degrees of the RDM is given by the following equation (4).
[0127]
Number
[0128] In equation (4), the expected value
[0129]
Number
[0130] is taken over n s randomly selected samples from the Pauli frame measured on systems i and j,
[0131]
Number
[0132] represents the first indicator function for the agreement between the randomly performed Pauli measurement results independently executed on systems i and j,
[0133]
Number
[0134] represents the second indicator function for whether the measurement bases match, e.g., whether the same bases X, Y, Z, I are chosen for each of the qubits between the two systems. γ represents a hyperparameter.
[0135] For a pair of quantum data points including the first N-qubit quantum state and the second N-qubit quantum state, to calculate the value of the linear kernel function given by equation (4), the quantum computing device ns For the k-th iteration of the n-th sample, - Measure each qubit in system i in a randomly sampled Pauli basis, X, Y, or Z, to obtain
[0136]
Number
[0137] and
[0138]
Number
[0139] and obtain the first measurement result by obtaining
[0140]
Number
[0141] which is either 1 or -1,
[0142]
Number
[0143] which is a random basis X, Y, or Z, - Measure each qubit in system j in a randomly sampled Pauli basis, X, Y, or Z, to obtain
[0144]
Number
[0145] and
[0146]
Number
[0147] By obtaining, a second measurement result is obtained, provided that
[0148]
Number
[0149] is either 1 or -1,
[0150]
Number
[0151] is a random basis X, Y, or Z, For the h-th qubit in an n-qubit system, compare the first measurement result and the second measurement result to obtain the first indicator function
[0152]
Number
[0153] of which the value is determined, and this value is the two results
[0154]
Number
[0155] ,
[0156]
Number
[0157] is equal to 1 if they are equal, and equal to 0 otherwise, For the h-th qubit in an n-qubit system,
[0158]
Mathematics
[0159] determines the value of the second indicator function by - value for adjustable γ > 0
[0160]
Mathematics
[0161] calculate, and -
[0162]
Mathematics
[0163] can be used to estimate the kernel function. Mathematically, the quantity
[0164]
Mathematics
[0165] is calculated, where N s represents the number of repetitions for each quantum state of system i or j, and r 1 and r 2 are repetitions,
[0166]
Mathematics
[0167] is the Pauli basis at the p-th qubit for the r 2 repetition, and
[0168]
Mathematics
[0169] is the corresponding measurement result. It is efficient to calculate this kernel function using local randomized measurements and the classical shadow formalism because the classical shadow formalism enables the efficient construction of the RDM from few measurements.
[0170] To compute the full kernel matrix, the quantum computing device iterates the procedure described above for each pair of quantum data points x i , x j in the training dataset.
[0171] Returning to FIG. 4, the quantum computing device provides the kernel matrix Q computed by the classical processor (step 406). The classical processor is configured to execute classical machine learning methods using the kernel matrix Q. 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 used for classification or prediction, including Gaussian kernels, neural tangent kernels, random forests. As another example, in an implementation where the training data points obtained in step 402 are unlabeled data, the classical processor can be configured to use the computed kernel matrix to provide a distance metric, such as the k-means algorithm, for use in performing unsupervised learning or classification in the space.
[0172] The classical processor executes a training algorithm using the received kernel matrix to train the corresponding machine learning model. The specific training algorithm executed by the classical processor depends on the type of machine learning method the classical processor is configured to execute and can include various training algorithms.
[0173] A quantum computing device obtains a verification data set {y i} of quantum data points (step 408). As described above with reference to step 402, the quantum data points included in the verification data set can be received as quantum data inputs or can be generated based on classical data inputs.
[0174] The quantum computing device performs a plurality of quantum computations to update the kernel matrix by calculating new rows and columns of the kernel matrix (step 410). The new rows and columns represent the similarity between the quantum data points in the verification data set and the quantum data points in the training data set. Calculating the new rows and columns of the kernel matrix involves, for each pair of quantum data points x i , x j in the training data set and the verification data set, calculating the value of the previously used kernel function Q ij = Q(x i , x j ).
[0175] The quantum computing device provides the updated kernel matrix, e.g., the new rows and columns of the kernel matrix, to a classical processor (step 412). The classical processor processes the updated kernel matrix to output a prediction for each quantum data point in the verification data set, e.g., assign a label or a numerical value.
[0176] The digital and / or quantum subject matter described herein, as well as the implementation forms of digital functional operations and quantum operations, can be implemented in digital electronic circuits, suitable quantum circuits, or more generally quantum computing systems, including the structures disclosed herein and their structural equivalents, in tangibly implemented digital and / or quantum computer software or firmware, in digital and / or quantum computer hardware, or in one or more combinations thereof. The term "quantum computing system" can include, without limitation, a quantum computer, a quantum information processing system, a quantum cryptography system, or a quantum simulator.
[0177] The implementation forms of the digital and / or quantum subject matter described herein can be implemented as one or more digital and / or quantum computer programs, i.e., as one or more modules of digital and / or quantum computer program instructions encoded on a tangible non-transitory storage medium for execution by, or to control the operation of, a data processing apparatus. The digital and / or quantum computer storage medium can be a machine-readable storage device, a machine-readable storage substrate, a random or sequential access memory device, one or more qubits, or one or more combinations thereof. Alternatively or additionally, the program instructions can be encoded on an artificially generated propagated signal capable of encoding digital and / or quantum information, e.g., a machine-generated electrical, optical, or electromagnetic signal generated for encoding digital and / or quantum information for transmission to a receiver device suitable for execution by a data processing apparatus.
[0178] The terms quantum information and quantum data refer to information or data that is conveyed by a quantum system or held or stored in a quantum system, where the smallest non-trivial system is the qubit, i.e., the system that defines the unit of quantum information. It will be understood that the term "qubit" encompasses all quantum systems that can be suitably approximated as two-level systems in the corresponding context. Such quantum systems can include, for example, multi-level systems having two or more levels. By way of example, such systems can include atoms, electrons, photons, ions, or superconducting qubits. In many implementations, the computational basis states are identified using the ground state and the first excited state, but it will be understood that other setups are possible where the computational states are identified using higher-level excited states. The term "data processing device" refers to digital and / or quantum data processing hardware and encompasses all kinds of devices, apparatuses, and machines for processing digital and / or quantum data, including, by way of example, programmable digital processors, programmable quantum processors, digital computers, quantum computers, multiple digital and quantum processors or computers, and combinations thereof. The device can also be or further include a dedicated logic circuit, for example, an FPGA (field programmable gate array), an ASIC (application specific integrated circuit), or a quantum simulator, i.e., a quantum data processing device designed to simulate or create information about a particular quantum system. Specifically, a quantum simulator is a dedicated quantum computer that does not have the ability to perform universal quantum computing. The device can, in some cases, include, in addition to the hardware, code that creates an execution environment for digital and / or quantum computer programs, for example, processor firmware, protocol stack, database management system, operating system, or code that constitutes one or a combination of these.
[0179] A digital computer program, sometimes called or described as a program, software, software application, module, software module, script, or code, can be written in any form of programming language, including a compiler-type language or an interpreter-type language, or a declarative language or a procedural language, and can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a digital computing environment. A quantum computer program, sometimes called or described as a program, software, software application, module, software module, script, or code, can be written in any form of programming language, including a compiler-type language or an interpreter-type language, or a declarative language or a procedural language, and can be converted into a suitable quantum programming language or can be written in a quantum programming language, such as QCL or Quipper.
[0180] Digital and / or quantum computer programs may correspond to files in a file system, but they do not have to. The program may be held in another program or data, for example, in a part of a file that holds one or more scripts stored in a markup language document, in a single file dedicated to the program in question, or in multiple coordinated files, for example, files that store one or more modules, subprograms, or portions of code. Digital and / or quantum computer programs may be deployed to execute on one digital or one quantum computer, or on multiple digital and / or quantum computers located at one site or distributed across multiple sites and interconnected by a digital and / or quantum data communication network. A quantum data communication network is understood to be a network that can transmit quantum data using a quantum system, for example, qubits. In general, a digital data communication network cannot transmit quantum data, but a quantum data communication network can transmit both quantum and digital data.
[0181] The processes and logical flows described herein may be performed by one or more programmable digital and / or quantum computers operating with one or more digital and / or quantum processors, appropriately operating on input digital and quantum data, and generating output, by executing one or more digital and / or quantum computer programs. The processes and logical flows may also be performed as dedicated logic circuits, for example, FPGAs or ASICs, or quantum simulators, or as a combination of dedicated logic circuits or quantum simulators and one or more programmed digital and / or quantum computers, and the apparatus may be implemented as such.
[0182] For one or more digital and / or quantum computer systems to be "configured to" perform a particular operation or action means that the system has installed software, firmware, hardware, or a combination thereof that causes the operation or action to be performed on the system during operation. For one or more digital and / or quantum computer programs to be configured to perform a particular operation or action means that the one or more programs include instructions that, when executed by a digital and / or quantum data processing apparatus, cause the operation or action to be performed on the apparatus. A quantum computer may receive instructions from a digital computer that, when executed by a quantum computing apparatus, cause the operation or action to be performed on the apparatus.
[0183] Digital and / or quantum computers suitable for the execution of digital and / or quantum computer programs may be based on general-purpose or special-purpose digital and / or quantum processors, or both, or any other kind of central digital and / or quantum processing unit. Generally, the central digital and / or quantum processing unit will receive instructions as well as digital and / or quantum data from read-only memory, random access memory, or a quantum system suitable for transmitting quantum data, such as photons, or a combination thereof.
[0184] The essential elements of a digital and / or quantum computer are a central processing unit for carrying out or executing instructions, and one or more memory devices for storing the instructions as well as digital and / or quantum data. The central processing unit and the memory may be supplemented by, or incorporated in, dedicated logic circuitry or a quantum simulator. Generally, a digital and / or quantum computer will also include one or more mass storage devices for storing digital and / or quantum data, such as magnetic disks, magneto-optical disks, optical disks, or a quantum system suitable for storing quantum information, or will be operatively coupled thereto for receiving digital and / or quantum data therefrom, or transferring digital and / or quantum data thereto, or both. However, a digital and / or quantum computer need not have such devices.
[0185] Digital and / or quantum computer program instructions, and digital and / or quantum computer-readable media suitable for storing digital and / or quantum data, include, by way of example, all forms of non-volatile digital and / or quantum memories, media, and memory devices including semiconductor memory devices such as EPROM, EEPROM, and flash memory devices, magnetic disks such as internal hard disks or removable disks, magneto-optical disks, CD-ROM and DVD-ROM disks, and quantum systems such as trapped atoms or electrons. It will be understood that a quantum memory is a device capable of storing quantum data with high fidelity and efficiency over long periods of time, such as an optical-matter interface where light is used for transmission, and a material for storing and preserving quantum features of quantum data such as superposition or quantum coherence.
[0186] The various systems described herein, or control of portions thereof, may be implemented in a digital and / or quantum computer program product that includes 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 herein, or portions thereof, may each be implemented as an apparatus, method, or system that includes one or more digital and / or quantum processing devices and memory for storing executable instructions for performing the operations described herein.
[0187] This specification includes a number of specific implementation details, but these should not be construed as limitations on the scope of what may be claimed, but rather as descriptions of features that may be specific to particular implementations. Some features described herein in the context of separate implementations may also be implemented in combination in a single implementation. Conversely, the various features described in the context of a single implementation may also be implemented separately, or in any suitable sub-combination, in multiple implementations. Moreover, features may be described above as acting in some combinations and even claimed as such initially, but one or more features from a claimed combination may in some cases be deleted from that combination, and the claimed combination may be directed to a sub-combination or variant of a sub-combination.
[0188] Similarly, the operations are illustrated in the drawings in a particular order, which should not be construed as requiring that such operations be performed in that particular order or sequence, or that all of the illustrated operations be performed, to achieve the desired result. In some situations, multitasking and parallel processing may be advantageous. Moreover, the separation of various system modules and components in the implementation forms described above should not be construed as requiring such separation in all implementation forms, and it should be understood that the described program components and systems may generally be integrated together in a single software product or packaged into multiple software products.
[0189] Particular implementations of the subject matter have been described. Other implementations are within the scope of the following claims. For example, the actions recited in the claims can be performed in a different order and still achieve the desired result. As one example, the processes illustrated in the accompanying drawings do not necessarily require the particular order or sequence shown to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous.
Description of the Reference Numerals
[0190] 100 Classical kernel method, method 102 Conventional quantum kernel method, method 104 Projected quantum kernel method, method 200 Exemplary system 202 Quantum computing device 204 Control and measurement system, system 206 Quantum bit 208 Coupler 210 Control signal 212 Readout signal 214 Classical processor, processor 216 Memory 218 I / O unit, input / output device 250 Exemplary classical processors, classical processors 252 Quantum bit assembly
Claims
1. obtaining, by a quantum computing device, a dataset of quantum data points; calculating, by the quantum computing device, new elements of a kernel matrix that represent similarities between the quantum data points contained in the data set; for each pair of quantum data points in the data set, calculating a corresponding value of a kernel function; the kernel function is based on a reduced density matrix for the quantum data points; providing, by the quantum computing device, the new elements of the kernel matrix to a classical processor; 4. A computer-implemented method comprising:
2. 2. The method of claim 1, further comprising processing, by the classical processor, the new elements of the kernel matrix to output a prediction for each quantum data point in the dataset.
3. 3. The method of claim 1 or 2, wherein the kernel function is based on a simplicial reduced density matrix for the quantum data points in the dataset.
4. The method of claim 1 , wherein the kernel function comprises a linear kernel function.
5. the linear kernel function i) takes as input a first quantum data point and a second quantum data point; ii) produces a numerical output; and iii) comprises a sum of terms; the sum is over each of N qubits, where N>1; The summand is Corresponding to each quantum bit, 5. The method of claim 4, wherein the density matrix is equal to the trace of the product of a) a condensed density matrix for the first quantum data point on a subsystem corresponding to the respective quantum bit, and b) a condensed density matrix for the second quantum data point on a subsystem corresponding to the respective quantum bit.
6. The linear kernel function is [0010] where: x i , x j represents the first quantum data point and the second quantum data point; l ranges from 1 to the number of qubits N, and each qubit ρ(x i )=|x i 〉〈x i represents the index that labels | Tr m≠k [ρ(x i 6. The method of claim 4 or 5, wherein x,y ...
7. calculating corresponding values of the kernel function for pairs of quantum data points in the data set, the pairs comprising a first N-qubit quantum state, where N>1, and a second N-qubit quantum state, where N>1; For each iteration and each qubit index, calculating a 1-reduced density matrix (RDM) for the first N-qubit quantum state on a subsystem corresponding to qubit l, comprising obtaining a copy of an 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 a first reduced quantum state of the quantum system; computing a 1-RDM for the second N-qubit quantum state on a subsystem corresponding to qubit l, the 1-RDM comprising obtaining a copy of an 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 a second reduced quantum state of the quantum system; determining a trace of a product of the first and second contracted quantum states; summing an average of the determined traces for each qubit index; 7. The method according to any one of claims 4 to 6, comprising:
8. The method of claim 1 , wherein the kernel function comprises a squared exponential kernel function.
9. the squared exponential kernel function i) takes as input a first quantum data point and a second quantum data point; ii) produces a numerical output; and iii) comprises an exponential function of a sum of terms; the sum is over each of N qubits, where N>1; The summand is Corresponding to each quantum bit, a) from a reduced density matrix for the first quantum data point on a subsystem corresponding to each quantum bit, b) a reduced density matrix for the second quantum data point on the subsystem corresponding to each quantum bit. The method of claim 8, wherein the norm of σ is equal to the norm of σ minus σ.
10. The squared exponential kernel function is [0025] where: x i , x j represents the first quantum data point and the second quantum data point; l ranges from 1 to the number of qubits N, and each qubit ρ(x i )=|x i 〉〈x i represents the index that labels | Tr m≠k [ρ(x i 10. The method of claim 8 or 9, wherein k = 1-RDM on quantum bit k.
11. calculating corresponding values of the kernel function for pairs of quantum data points in the data set, the pairs comprising a first N-qubit quantum state, where N>1, and a second N-qubit quantum state, where N>1; For each iteration and each qubit index, calculating a 1-reduced density matrix (RDM) for the first N-qubit quantum state on a subsystem corresponding to qubit l, comprising obtaining a copy of an 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 a first reduced quantum state of the quantum system; computing a 1-RDM for the second N-qubit quantum state on a subsystem corresponding to qubit l, the 1-RDM comprising obtaining a copy of an 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 a second reduced quantum state of the quantum system; subtracting the second contracted quantum state from the first contracted quantum state to obtain a third contracted quantum state and determining a norm of the third contracted quantum state; summing an average of the determined norms for each qubit index and calculating an exponent of the summed average; 11. The method according to any one of claims 8 to 10, comprising:
12. the kernel function is based on a k-body RDM for the quantum data points; The method of claim 1 , wherein k is less than a predetermined value.
13. The method of claim 12 , wherein the kernel function comprises a linear kernel function.
14. the linear kernel function i) takes as input a first quantum data point and a second quantum data point; ii) produces a numerical output; and iii) comprises a sum of terms; the sum is over each subset of k qubits taken from the N qubits; Each summand is For each subset, 14. The method of claim 13, wherein the density matrix is equal to the trace of the product of a) a condensed density matrix for the first quantum data points on subsystems corresponding to the respective subsets of k qubits, and b) a condensed density matrix for the second quantum data points on subsystems corresponding to the respective subsets of k qubits.
15. The linear kernel function is [0030] where: S k (n) is the k qubit ρ(x i )=|x i 〉〈x i represents the set of subsets of | Tr m≠K [ρ(x i 15. The method of claim 13 or 14, wherein:
16. calculating corresponding values of the kernel function for pairs of quantum data points in the data set, the pairs comprising a first N-qubit quantum state and a second N-qubit quantum state; For each iteration and set of k qubits, computing a k-RDM for the first N-qubit quantum state on a subsystem corresponding to a qubit in the set, the k-RDM comprising obtaining a copy of an N-qubit quantum system in the first N-qubit quantum state and measuring each qubit in the quantum system except for the qubits included in the set to obtain a first reduced quantum state of the quantum system; computing a k-RDM for the second N-qubit quantum state on a subsystem corresponding to a qubit in the set, the k-RDM comprising obtaining a copy of an N-qubit quantum system in the second N-qubit quantum state and measuring each qubit in the quantum system except for the qubits included in the set to obtain a second reduced quantum state of the quantum system; determining a trace of a product of the first and second contracted quantum states; summing the average of the determined traces for each set of k qubits; 16. The method of any one of claims 13 to 15, comprising:
17. The method of claim 1 , wherein the kernel function comprises an exponential kernel function.
18. The exponential kernel function is [0045] where: Expected value [0050] is the n s taken over samples, [006] represents a first indicator function for agreement between random Pauli measurement results performed independently on the first system i and the second system j; [0070] 18. The method of claim 17, wherein: represents a second indicator function for measurement basis agreement.
19. calculating corresponding values of the kernel function for pairs of quantum data points in the data set, the pairs comprising a first N-qubit quantum state and a second N-qubit quantum state; repetition, Obtaining a first measurement result by measuring each qubit in the first system in a random Pauli basis to obtain a value for the h qubit. [0080] and [0090] obtaining a [0010] is either 1 or -1, ##EQU00011## is a random basis X, Y, or Z; Obtaining a second measurement result by measuring each qubit in the second system in a random Pauli basis to obtain a value for the h qubit. ##EQU00012## and ##EQU00013## obtaining a ##EQU00014## is either 1 or -1, ##EQU00015## is a random basis X, Y, or Z; comparing the first measurement and the second measurement to determine a value of the first indicator function for the h qubit in an N qubit system; determining a value of the second indicator function for the h qubit in the N-qubit system; multiplying, adding and averaging the determined values of the first indicator function and the second indicator function.
20. The method of claim 18, comprising:
20. 20. The method of claim 1, wherein the quantum data points comprise N-qubit quantum states, where N>1.
21. obtaining the dataset of quantum data points comprises: receiving a dataset of classical data points; generating said dataset of quantum data points, the dataset comprising embedding each classical data point into a respective quantum state by applying a respective encoding circuit to a reference quantum state; 21. The method of any one of claims 1 to 20, comprising:
22. An apparatus comprising: one or more classical processors; one or more quantum computing devices in data communication with the one or more classical processors; wherein the one or more quantum computing devices: one or more qubit registers, each qubit register comprising one or more qubits; a plurality of control devices configured to operate the one or more quantum bit registers; Equipped with 22. An apparatus, the apparatus being configured to carry out the method of any one of claims 1 to 21.
Citation Information
Patent Citations
Quantum feature kernel alignment
US20200320437A1