Quantum computing with kernel methods for machine learning
Quantum computing with reduced density matrix-based kernel functions addresses scalability and computational efficiency issues in kernel methods, enhancing prediction accuracy and generalization by projecting quantum states into classical representations.
Patent Information
- Application Number
- JP2024092137
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2020-10-19
- Filing Date
- 2024-06-06
- Publication Date
- 2024-09-18
- Estimated Expiration
- 2041-10-19
AI Technical Summary
Kernel methods for machine learning face challenges in large feature spaces, leading to high computational costs and limited scalability, especially when using quantum computing devices, as traditional quantum kernel methods yield small geometric differences that hinder effective generalization.
The use of quantum computing devices to calculate kernel functions based on reduced density matrices (RDMs) and projected quantum kernels, which project quantum states into a classical representation, allowing for scalable and improved geometric differences that enhance prediction accuracy.
This approach enables scalable and accurate kernel function computation, even in large dimensional spaces, providing better generalization performance and predictive advantages over classical models, suitable for small quantum computers and hybrid systems.
Smart Images

Figure 2024125311000001
Abstract
Description
[Background technology]
[0001] Kernel methods are a class of algorithms for pattern analysis. The task of pattern analysis is to discover and explore common types of relationships in data sets, such as clusters, rankings, principal components, correlations, and classifications. Many algorithms that solve these tasks require that data in its raw representation be explicitly transformed into a feature vector representation via user-specified feature maps. In contrast, kernel methods require only a user-specified kernel-similarity function (or "kernel function") across pairs of data points in the raw representation.
[0002] Kernel functions allow kernel methods to operate in a high-dimensional implicit feature space without having to calculate the coordinates of the data in that space. Instead, the dot product between every pair of images of the data in the feature space is calculated. These operations are often computationally less expensive than explicitly calculating the coordinates.
[0003] Algorithms that can operate with 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, i.e., replacing its features (predictors) with kernel functions, any linear model can be turned into a nonlinear model. Summary of the Invention [Problem to be solved by the invention]
[0004] This specification describes techniques for quantum computing using kernel methods for machine learning. [Means for solving the problem]
[0005] In general, one inventive aspect of the subject matter described herein may be implemented in a method comprising: obtaining, by a quantum computing device, a training dataset of quantum data points; calculating, by the quantum computing device, a kernel matrix representing similarities between quantum data points included in the training dataset, wherein for each pair of quantum data points in the training dataset, 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, by the quantum computing device, the kernel matrix to a classical processor.
[0006] Other implementations of this aspect include corresponding computer systems, devices, and computer programs recorded on one or more computer storage devices, each configured to perform the actions of the method. One or more computer systems may be configured to perform particular operations or actions by having installed thereon software, firmware, hardware, or a combination thereof that causes the system to perform the actions during operation. One or more computer programs may be configured to perform particular operations or actions by including instructions that, when executed by a data processing device, cause the device to perform the actions.
[0007] The above and other implementations may each optionally include one or more of the following features, alone or in combination: In some implementations, the method further includes receiving, by the classical processor, a kernel matrix from the quantum computing device, and running, by the classical processor, a training algorithm using the kernel matrix to construct the machine learning model.
[0008] In some implementations, the method further includes obtaining, by the quantum computing device, a validation dataset of quantum data points; computing, by the quantum computing device, new elements of a kernel matrix, the new elements comprising entries representing similarities between quantum data points in the validation dataset and quantum data points in the training dataset, where computing the new elements includes computing, for each pair of quantum data points in the training dataset and the validation dataset, a corresponding value of a kernel function; 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 validation data set.
[0010] In some implementations, the kernel function is based on a single-body reduced density matrix for the quantum data points in the training dataset.
[0011] In some implementations, the kernel function comprises a linear kernel function.
[0012] In some implementations, the linear kernel function i) takes as input a first quantum data point and a second quantum data point; ii) produces a numerical output; iii) includes a sum of terms, the sum spanning each of the N qubits, where N>1, and the summand corresponding to the respective qubit, and is equal to the trace of a product of a) a condensed density matrix for the first quantum data point on the subsystem corresponding to the respective qubit; and b) a condensed density matrix for the second quantum data point on the subsystem corresponding to the respective qubit.
[0013] In some implementations, the linear kernel function is:
[0014]
number
[0015] where x i , x j represent the first and second quantum data points, l ranges from 1 to the number of qubits N, and each qubit ρ(x i )=|x i 〉〈x i represents the index that labels |, and Tr m≠k [ρ(x i )] represents the 1-reduced density matrix (RDM) on qubit k.
[0016] In some implementations, the steps of computing values of a kernel function for pairs of quantum data points in a training dataset, the pair comprising a first N-qubit quantum state, where N>1, and a second N-qubit quantum state, where N>1, are repeated, and for each qubit index, computing a 1-reduced density matrix (RDM) for the first N-qubit quantum state on a subsystem corresponding to qubit l, wherein the RDM is obtained by 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. calculating a 1-RDM for a second N-qubit quantum state on the subsystem corresponding to qubit l, 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 l-th qubit to obtain a second reduced quantum state of the quantum system; determining a trace of a product of the first reduced quantum state and the second reduced quantum state; and summing an average of the determined traces 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 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 being over each of the N qubits, where N>1, and the augend corresponding to the respective qubit, and is equal to the norm of a) a condensed density matrix for the first quantum data point on the subsystem corresponding to the respective qubit minus b) a condensed density matrix for the second quantum data point on the subsystem corresponding to the respective qubit.
[0019] In some implementations, the squared exponential kernel function is:
[0020]
number
[0021] where x i , x j represent the first and second quantum data points, l ranges from 1 to the number of qubits N, and each qubit ρ(x i )=|x i 〉〈x i represents the index that labels |, and Tr m≠k [ρ(x i )] represents the 1-RDM on qubit k.
[0022] In some implementations, the steps of: computing values of a kernel function for pairs of quantum data points in a training dataset, the pair comprising a first N-qubit quantum state, where N>1, and a second N-qubit quantum state, where N>1, are repeated; and for each qubit index, computing a 1-reduced density matrix (RDM) for the first N-qubit quantum state on a subsystem corresponding to qubit l, 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. calculating a 1-RDM for a second N-qubit quantum state on the subsystem corresponding to qubit l, the 1-RDM 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 l-th qubit to obtain a second condensed quantum state of the quantum system; subtracting the second condensed quantum state from the first condensed quantum state to obtain a third condensed quantum state and determining a norm of the third condensed quantum state; and summing an average of the determined norms for each qubit index and calculating an exponent of the summed average.
[0023] In some implementations, the kernel function is based on a k-body RDM for the 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, 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 spanning each subset of k qubits taken from the N qubits, each summand corresponding to a respective subset, equal to the trace of the product of a) a condensed density matrix for the first quantum data point on the subsystem corresponding to its respective subset of k qubits, and b) a condensed density matrix for the second quantum data point on the subsystem corresponding to its respective subset of k qubits.
[0026] In some implementations, the linear kernel function is:
[0027]
number
[0028] where S k (n) is the k qubit ρ(x i )=|x i 〉〈x i represents the set of subsets of |, and Tr m≠K [ρ(x i )] represents k-RDM.
[0029] In some implementations, the method includes: calculating values of a kernel function for pairs of quantum data points in the training dataset, the pairs comprising a first N-qubit quantum state and a second N-qubit quantum state, iteratively; and for each set of k qubits, calculating a k-RDM for the first N-qubit quantum states on a subsystem corresponding to the qubits in the set, the k-RDM 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 excluding the qubits included in the set to obtain a first reduced quantum state of the quantum system; calculating a k-RDM for the second N-qubit quantum states on a subsystem corresponding to the qubits in the set, the k-RDM 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 excluding 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 reduced quantum state and the second reduced quantum state; and summing an 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] where the expected value
[0034]
number
[0035] is the n from a randomly chosen Pauli frame measured on a first system i and a second system j. s samples (i.e., experiments, where n s is chosen to be as large as possible while taking into account hardware implementation considerations, e.g., n s is taken over (chosen as the largest number that can be afforded to be experimentally measured),
[0036]
number
[0037] represents a first indicator function for agreement between random Pauli measurement results performed independently on a first system i and a second system j;
[0038]
number
[0039] represents a second indicator function for measurement basis agreement.
[0040] In some implementations, the step of calculating values of the kernel function for pairs of quantum data points in the training dataset, the pairs comprising a first N-qubit quantum state and a second N-qubit quantum state, includes repeatedly obtaining first measurements, measuring each qubit in the first system in a random Pauli basis to obtain a value for the h-th qubit.
[0041]
number
[0042] and
[0043]
number
[0044] obtaining a
[0045]
number
[0046] is either 1 or -1,
[0047]
number
[0048] is a random basis X, Y, or Z; and obtaining a second measurement, measuring each qubit in the second system in a random Pauli basis to obtain a value for the hth qubit.
[0049]
number
[0050] and
[0051]
number
[0052] obtaining a
[0053]
number
[0054] is either 1 or -1,
[0055]
number
[0056] is a random basis X, Y, or Z; comparing the first measurement result and the second measurement result for the hth qubit in the N-qubit system to determine a value of a first indicator function; determining a value of a second indicator function for the hth qubit in the N-qubit system; and multiplying, adding, and averaging the determined values of the first and second indicator functions.
[0057] In some implementations, the quantum data point comprises an N-qubit quantum state, where N>1.
[0058] In some implementations, obtaining the training dataset of quantum data points includes receiving a training dataset of classical data points; and generating a training dataset of quantum data points, the training dataset including embedding each classical data point into a respective quantum state by applying a respective encoding circuit to a reference quantum state.
[0059] The subject matter described herein can be implemented in particular ways to realize one or more of the following advantages.
[0060] Kernel methods for machine learning can be applied to a variety of regression and classification problems. However, successful solutions to such problems are limited when the feature space becomes large and the computational cost of estimating the kernel function becomes high. The technique described here addresses this issue by using quantum computing devices to compute the kernel function.
[0061] Additionally, the presently described quantum computation of kernel functions is scalable; as the number of qubits increases, the signal remains large and the method continues to perform well, if not better. This contrasts with known quantum kernel methods, where the signal typically decays exponentially in the number of qubits for small geometric differences, e.g., due to an exponentially large Hilbert space where all inputs are too far apart. The scalability of the presently described techniques is achieved by expanding the geometric differences by projecting the embedded quantum state from classical data back into classical space, e.g., through the use of RDM. In other words, kernel functions close to two pointwise zero do not generalize well. However, the presently described projected quantum kernel is defined using an approximate classical representation of the quantum state, thereby resulting in a nonzero kernel function that provides better generalization performance.
[0062] Furthermore, due to the enlarged geometrical difference, the presently described techniques can achieve large predictive advantages over common classical machine learning models. Such predictive advantages can also be achieved with a small number of qubits, e.g., up to 30 qubits. Thus, the presently described techniques are particularly well suited for implementations using small quantum computers, e.g., noisy medium-scale quantum devices, and / or hybrid quantum-classical computers.
[0063] The techniques described herein may be applied to a variety of applications of classical machine learning, including examples from quantum machine learning that naturally involve quantum input data, including image and digit classification such as from MNIST or other sources of image / video data, sentiment and text analysis classification, analysis of high-energy physics data, classification of data from quantum sensors into phases, quantum state identification or quantum repeater engineering, prediction using data from quantum sensors, many-body or otherwise.
[0064] The details of one or more implementations of the subject matter herein 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, drawings, and claims. [Brief explanation of the drawings]
[0065] [Figure 1] A diagram of kernel functions defined by classical kernel methods, classical quantum kernel methods, and projected quantum kernel methods. [Figure 2] FIG. 1 is a block diagram of an exemplary system for performing classification and regression tasks using projected quantum kernel methods. [Figure 3] FIG. 1 is a block diagram of an example process for performing classification and regression tasks using projected quantum kernel methods. [Figure 4] 1 is a flowchart of an exemplary process for generating and updating a kernel matrix. DETAILED DESCRIPTION OF THE INVENTION
[0066] Like reference numbers 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 conventional quantum kernel methods, the kernel operator is, for example, Tr[ρ(x i )ρ(x j) ). This kernel operator considers all data points to be far from each other and can produce a kernel matrix that is close to identity. This can produce small geometric discrepancies, which can lead to classical machine learning models being competitive or even superior to quantum kernel methods. For example, in some cases, a quantum model may require an exponential amount of samples to train using this traditional kernel operator, but only a linear number of samples to train using a classical machine learning model.
[0069] The quantum kernel methods described here address this problem using a family of projected quantum kernels. 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 chosen from a family of scalable reduced physical observables. The projected quantum kernel operator projects the quantum state into an approximate classical representation, e.g., using reduced observables or classical shadows. The calculated geometry is then fed into classical methods for training and validation. Even when the training set space has a large dimensionality, e.g., a dimensionality proportional to the number of qubits contained in available quantum computers, projection provides a reduction to a lower-dimensional classical space that can generalize better.
[0070] FIG. 1 illustrates the geometries (kernel functions) defined by a classical kernel method 100, a conventional quantum kernel method 102, and the currently described projected quantum kernel method 104. The letters A, B, C, ... represent data points in different spaces, and the arrows represent 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 dataset in quantum Hilbert space. As shown, the geometric difference between the similarity measures in the classical kernel method 100 and the projected quantum kernel method 104 is larger than the geometric difference between the similarity measures in the classical kernel method 100 and the conventional quantum kernel method 102. This larger geometric difference leads to scalability and improved prediction accuracy, as explained above.
[0071] Example Operating Environment 2 illustrates an exemplary system 200 for performing classification and regression tasks using projected quantum kernel methods. The exemplary system 200 is an example of a system in which the systems, components, and techniques described below may be implemented as classical and quantum computer programs on one or more classical and quantum computing devices at one or more locations.
[0072] Exemplary system 200 includes an exemplary quantum computing device 202. Quantum computing device 202, according to some implementations, may be used to perform quantum computational operations described herein. Quantum computing device 202 is representative of various forms of quantum computing devices. The illustrated components, 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] The 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, e.g., qubits 206, that are used to perform algorithmic operations or quantum computations. While the qubits shown in FIG. 2 are arranged in a rectangular array, this is schematic and not limiting. The qubit assembly 252 also includes tunable coupling elements, e.g., couplers 208, that enable interactions between coupled qubits. In the schematic of FIG. 2, each qubit is tunably coupled to each of its four neighboring qubits using a respective coupling element. However, this is an exemplary arrangement of qubits and couplers, and other arrangements are possible, including arrangements that are non-rectangular, arrangements that allow coupling between non-adjacent qubits, and arrangements that include tunable coupling between more than two qubits.
[0074] Each qubit may be a physical two-level quantum system or device with levels representing logical values of 0 and 1. The specific physical realization of the qubits and how the qubits interact with each other depends on various factors, including the type of quantum computing device included in exemplary system 200 or the type of quantum computation the quantum computing device is performing. For example, in an atomic quantum computer, the qubits may be realized via atomic, molecular, or solid-state quantum systems, e.g., hyperfine atomic states. As another example, in a superconducting quantum computer, the qubits may be realized via superconducting qubits or semiconductor qubits, e.g., superconducting transmon states. As another example, in an NMR quantum computer, the qubits may be realized via nuclear spin states.
[0075] In some implementations, quantum computation can proceed by initializing qubits at selected initial states and applying a sequence of unitary operators on the qubits. Applying the unitary operators to the quantum states may include applying a corresponding sequence of quantum logic gates to the qubits. Exemplary quantum logic gates include single-qubit gates, e.g., Pauli X, Pauli Y, Pauli Z (also referred to as X, Y, Z), Hadamard and S gates, two-qubit gates, e.g., control X, control Y, control Z (also referred to as CX, CY, CZ), and gates involving three or more qubits, e.g., Toffoli gates. 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 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 a qubit idle frequency, a qubit interaction frequency, and a qubit readout frequency. Different frequencies correspond to different operations that the qubit can perform. For example, setting the operating frequency to a corresponding idle frequency may place the qubit in a state that does not strongly interact with other qubits and can be used to perform single-qubit gates. As another example, if the qubits interact through a coupler with fixed coupling, the qubits may 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 through tunable couplers, the qubits can be configured to interact with one another by setting the parameters of their respective couplers to enable interaction between the qubits, and then setting the operating frequency of each of the qubits at some gate-dependent frequency that is detuned from their common interaction frequency. Such interactions can be performed to implement multi-qubit gates.
[0077] The type of control signal 210 used depends on the physical implementation of the qubit. For example, the control signal may include an RF or microwave pulse in an NMR or superconducting quantum computer system, or an optical pulse in an atomic quantum computer system.
[0078] A quantum computation may be completed by measuring the state of a qubit using a quantum observable, such as X or Z, using, for example, a respective control signal 210. The measurement causes a readout signal 212 representing the measurement result to be communicated back to measurement and control system 204. Readout signal 212 may include an RF, microwave, or optical signal, depending on the physical scheme for the quantum computing device and / or qubit. For convenience, control signals 210 and readout signals 212 shown in FIG. 2 are shown addressing only selected elements of the qubit assembly (i.e., the top and bottom rows), but in operation, control signals 210 and readout signals 212 can address each element in qubit assembly 252.
[0079] Control and measurement system 204 is an example of a classical computer system that may be used to perform various operations on qubit assembly 252, as described above, as well as other classical subroutines or calculations. Control and measurement system 204 includes one or more classical processors, e.g., classical processor 214, one or more memories, e.g., memory 216, and one or more I / O units, e.g., I / O unit 218, connected by one or more data buses. Control and measurement system 204 may be programmed to send sequences of control signals 210 to the qubit assemblies, e.g., to perform a selected series of quantum gate operations, and to receive sequences of read signals 212 from the qubit assemblies, e.g., 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] The memory 216 stores information within the control and measurement system 204. In some implementations, the memory 216 includes a computer-readable medium, a volatile memory unit, and / or a non-volatile memory unit. In some cases, the memory 216 may include a storage device capable of providing mass storage for the 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 some other mass storage device.
[0082] Input / output devices 218 provide input and output operations for control and measurement system 204. Input / output devices 218 include D / A converters, A / D converters, and RF / microwave / optical signal generators, transmitters, and receivers to send control signals 210 to and receive readout signals 212 from qubit assemblies as appropriate for the physical scheme for the quantum computer. In some implementations, input / output devices 218 may also include one or more network interface devices, e.g., Ethernet cards, serial communication devices, e.g., RS-232 ports, and / or wireless interface devices, e.g., 802.11 cards. In some implementations, input / output devices 218 may include driver devices, e.g., keyboards, printers, and display devices, configured to receive input data and send output data to other external devices.
[0083] Although an exemplary control and measurement system 204 is shown in FIG. 2, implementations of the subject matter and functional operations described herein can be implemented in other types of digital electronic circuitry, or in computer software, firmware, or hardware, or in combinations of one or more of them, including the structures disclosed herein and their structural equivalents.
[0084] The exemplary system 200 includes an exemplary classical processor 250. The classical processor 250 may be used to perform classical computational 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 , which performs classification and regression tasks using projected quantum kernel methods. Stages (A)-(E) represent training phases and correspond to steps 402-406 of exemplary process 400, as described below with reference to FIG. 4 . During stage (A) of the exemplary process, quantum computing device 202 acquires a training dataset of data points. In some implementations, the data points may be quantum data points, e.g., quantum states. In other implementations, the data points may be classical data points. In these implementations, during stage (B), the quantum computing device embeds the classical data points into respective quantum states. Stages (A) and (B) are described in more detail below with reference to step 402 of exemplary process 400. In some implementations, the training dataset of data points may be received from a classical computer, such as classical processor 250. In other implementations, the training dataset of data points may be received from a quantum computing device, such as quantum computing device 202.
[0086] During stage (C), quantum computing device 202 calculates a kernel matrix using a kernel function based on the reduced density matrix for the acquired quantum data points / states, which is described in more detail below with reference to step 404 of exemplary process 400.
[0087] During step (D), quantum computing device 202 sends the computed kernel matrices to classical processor 250. During step (E), the classical processor receives the kernel matrices and uses them to train the machine learning model.
[0088] Stages (F)-(K) represent a verification or inference phase and correspond to steps 408-412 of exemplary process 400. During stage (F), quantum computing device 202 obtains a verification dataset of data points. In some implementations, the data points may be quantum data points, e.g., quantum states. In other implementations, the data points may 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 that correspond to data points in the validation data set, which is described in more detail below with reference to steps 404 and 410 of exemplary process 400.
[0090] During phase (I), quantum computing device 202 sends the updated kernel matrix to classical processor 250. During phase (J), classical processor receives the updated kernel matrix and processes the updated kernel matrix using the trained machine learning model. During phase (K), classical processor 250 outputs predictions corresponding to data points in the validation dataset.
[0091] Hardware Programming 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 performed by a system of one or more classical and quantum computing devices located at one or more locations. For example, quantum computing device 202 of FIG. 2 , appropriately programmed in accordance with this specification, can perform process 400.
[0092] A quantum computing device obtains a training dataset of quantum data points (step 402). The data points may be unlabeled or may be assigned an associated categorical label or a numerical value.
[0093] In some implementations, the quantum computing device may receive a training data set as quantum data input. For example, the quantum computing device may receive a training data set of quantum states |x i 〉 or access a set of quantum states from a quantum memory contained in a quantum computing device. Each quantum state |x in the training dataset i 〉 can be each state of the N-qubit quantum system. Each quantum state |x i > can represent each classical data point, for example an image as described below.
[0094] In other implementations, the quantum computing device generates a training dataset of classical data points {x i} and calculates the classical data points x i Each quantum state |x i We can generate a training dataset for each quantum data point by embedding it in the classical data point x i into an N-qubit quantum state |x i To embed the quantum computing device in enc (x i ) can be applied to a reference quantum state of N qubits, e.g., the state |00...0〉. The encoding circuit U used to embed classical data points into their respective quantum states encdepends on the type of data contained in the training dataset of classical data points, and various circuits may be used. For example, if the classical data points represent images, the encoding circuit may be defined as a circuit that rotates each of the N qubits by the image's respective scaled singular values. In some cases, more complex encoding circuits may be used that include layers of rotation with entangling quantum gates between some of the layers.
[0095] The quantum computing device performs a plurality of quantum computations to calculate a kernel matrix Q that represents the similarity between quantum data points contained in the training data set (step 404). Computing the kernel matrix is performed by computing the similarity between quantum data points x in the training data set. i , x j For each pair of ij =Q(x i ,x j ) values of the kernel function Q(x i ,x j ) is based on a reduced density matrix for the quantum data points obtained in step 402. For example, in some implementations, the kernel function may be based on a simplicial reduced density matrix (1-RDM) for the quantum data points. In other implementations, the kernel function may be based on a k-body RDM for the quantum data points, where k is less than a predetermined value. Exemplary kernel functions are described below.
[0096] 1-Linear kernel function using RDM In an implementation in which the kernel function is based on a set of 1-RDMs, the kernel function may be a linear kernel function. The linear kernel function takes a first quantum data point and a second quantum data point as inputs and produces a numerical output. The linear kernel function may include a sum of terms, where the sum spans each of the N qubits. Each summand corresponds to a respective qubit and is equal to the trace of the product of i) a reduced density matrix for the first quantum data point on the subsystem corresponding to the respective qubit, and ii) a reduced density matrix for the second quantum data point on the subsystem corresponding to the respective qubit. For example, the linear kernel function may be given by the following equation (1):
[0097]
number
[0098] In equation (1), l ranges from 1 to the number of qubits N, and each qubit ρ(x i )=|x i 〉〈x i is an index that labels |, and Tr m≠k [ρ(x i )] represents a 1-RDM, e.g., a 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] To calculate the value of the linear kernel function given by equation (1) for a pair of quantum data points comprising a first N-qubit quantum state and a second N-qubit quantum state, a quantum computing device: For iteration, and for each qubit index l=1,...,N, - obtaining or providing a copy of a first N-qubit quantum state, e.g., obtaining or providing a copy of an N-qubit quantum system in the first N-qubit quantum state, and calculating a 1-RDM for the first N-qubit quantum state on the subsystem corresponding to qubit l by 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, e.g., a 2-by-2 matrix, e.g., Tr m≠l [ρ(x i )], - obtaining or providing a copy of a second N-qubit quantum state, e.g., obtaining or providing a copy of an N-qubit quantum system in the second N-qubit quantum state, and calculating a 1-RDM for the second N-qubit quantum state on the subsystem corresponding to qubit l by measuring each qubit in the quantum system except for the l-th qubit to obtain a classical representation of the second reduced quantum state of the quantum system, e.g., a 2-by-2 matrix, e.g., Tr m≠l [ρ(x j )], and - performing a classical operation according to equation (1) (e.g., multiplying the classical representations of the first and second contracted quantum states, calculating a trace of the multiplied values, and adding the average of the calculated traces for each qubit index l=1, ..., N) to obtain Q(x i ,x j ) can be obtained. To compute the complete kernel matrix, a quantum computing device computes a quantum data point x in the training dataset. i , x j For each pair of , the procedure described above is repeated.
[0100] 1-squared exponential kernel function using RDM As another example, in an implementation in which the kernel function is based on a set of 1-RDMs, the kernel function may be a squared exponential kernel function. The squared exponential kernel function takes a first quantum data point and a second quantum data point as input and produces a numerical output. The squared exponential kernel function may include an exponential function of a sum of terms, where the sum spans each of the N qubits. Each summand corresponds to a respective qubit and is equal to the norm of i) a contracted density matrix for the first quantum data point on the subsystem corresponding to the respective qubit minus ii) a contracted density matrix for the second quantum data point on the subsystem corresponding to the respective qubit. For example, the squared exponential kernel function may be given by the following equation (2):
[0101]
number
[0102] In equation (2), γ represents a tunable parameter that can be adjusted to improve the prediction accuracy (γ is the parameter that is used to estimate the prediction accuracy of the point x using the RDM). i and x j should be similar, and when γ is large, most points will have a similarity close to 0, whereas when γ is small, points with similar RDMs will be considered highly similar. When γ is 0, the points can be considered the same), l ranges from 1 to the number of qubits N, and the degree of similarity of each qubit ρ(x i )=|x i 〉〈x i is an index that labels |, and Tr m≠k [ρ(x i )] represents 1-RDM. The squared exponential kernel function given by equation (2) can learn any nonlinear function of 1-RDM.
[0103] To calculate the value of the squared exponential kernel function given by equation (2) for a pair of quantum data points comprising a first N-qubit quantum state and a second N-qubit quantum state, a quantum computing device: For iteration, and for each qubit index l=1,...,N, - obtaining or preparing a copy of a first N-qubit quantum state, e.g., obtaining or preparing a copy of an N-qubit quantum system in the first N-qubit quantum state, and calculating a 1-RDM for the first N-qubit quantum state on the subsystem corresponding to qubit l by measuring each qubit in the quantum system except for the l-th qubit to obtain (a classical representation of) a first reduced quantum state of the quantum system, e.g., Tr m≠l [ρ(x i )], - obtaining or preparing a copy of a second N-qubit quantum state, e.g., obtaining or preparing a copy of an N-qubit quantum system in the second N-qubit quantum state, and calculating a 1-RDM for the second N-qubit quantum state on the subsystem corresponding to qubit l by measuring each qubit in the quantum system except for the l-th qubit to obtain (a classical representation of) a second reduced quantum state of the quantum system, e.g., Tr m≠l [ρ(x j )], - subtracting the second contracted quantum state from the first contracted quantum state to obtain a third contracted quantum state and determining the norm of the third contracted quantum state, e.g., ||Tr m≠l [ρ(x i )]-Tr n≠l [ρ(x j )]|| 2 classically compute, and - for each qubit index l=1,...,N, add the means of the determined norms, multiply by -γ, calculate the exponent, and
[0104]
number
[0105] You can get the value for To compute the complete kernel matrix, a quantum computing device computes a quantum data point x in the training dataset. i , x j For each pair of , the procedure described above is repeated.
[0106] Linear kernel functions using k-RDM As another example, in an implementation in which the kernel function is based on a set of k-RDMs, the kernel function may be a linear kernel function. The linear kernel function takes a first quantum data point and a second quantum data point as inputs and produces a numerical output. The linear kernel function may include a sum of terms, where the sum spans each subset of k qubits taken from the N qubits. Each summand corresponds to a respective subset and is equal to the trace of the product of i) a condensed density matrix for the first quantum data point on the subsystem corresponding to the respective subset of k qubits, and ii) a condensed density matrix for the second quantum data point on the subsystem corresponding to the respective subset of k qubits. For example, the linear kernel function may be given by the following equation (3):
[0107]
number
[0108] In equation (3), S k (n) is the k qubit (taken from N qubits) ρ(x i )=|x i 〉〈x i represents the set of subsets of |, and Tr m≠K [ρ(x i )] represents a k-RDM, e.g., a trace over all but k qubits contained in set K. The linear kernel function in equation (3) can learn any observable that can be written as a sum of k-body terms.
[0109] To calculate the value of the linear kernel function given by equation (3) for a pair of quantum data points comprising a first N-qubit quantum state and a second N-qubit quantum state, a quantum computing device: iteration, and for each set K of k qubits, - obtaining or providing a copy of a first N-qubit quantum state, e.g., obtaining or providing a copy of an N-qubit quantum system in the first N-qubit quantum state, and calculating a k-RDM for the first N-qubit quantum state on a subsystem corresponding to the qubits in the set K by measuring each qubit in the quantum system except for the qubits included in the set K to obtain (a classical representation, e.g., a matrix representation of) a first reduced quantum state of the quantum system, e.g., m≠K [ρ(x i )], - obtaining or preparing a copy of a second N-qubit quantum state, e.g., obtaining or preparing a copy of an N-qubit quantum system in the second N-qubit quantum state, and calculating a k-RDM for the second N-qubit quantum state on the subsystem corresponding to the qubits in set K by measuring each qubit in the quantum system except for the qubits included in set K to obtain (a classical representation of) a second reduced quantum state of the quantum system, e.g., m≠K [ρ(x j )], - determining the trace of the product of the first and second contracted quantum states, e.g., Tr[Tr m≠K [ρ(x i )]][Tr n≠K [ρ(x j ) and - for each set K of k qubits, add up the average of the determined traces,
[0110]
number
[0111] You can get the numerical value for To compute the complete kernel matrix, a quantum computing device computes a quantum data point x in the training dataset. i , x j For each pair of , the procedure described above is repeated.
[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, any quantum model can be learned, for example, a linear function of the complete quantum state.
[0113]
number
[0114] It may be beneficial to define a kernel that can train an arbitrarily deep quantum neural network given by: In these implementations, the kernel function may be an exponential kernel function that uses a k-RDM sampled using classical shadowing techniques. The qubit indices (p1, p2, ... p k The k-RDM of the quantum state ρ(x) for x can be reconstructed by local randomized measurements using the classical shadow formalism.
[0115]
number
[0116] however,
[0117]
number
[0118] is p r are the random Pauli measurement basis X, Y, Z on the qubit,
[0119]
number
[0120] is the Pauli basis
[0121]
number
[0122] p of the quantum state ρ(x) under r The measurement result on the qubit is ±1. The expectation is taken with respect to the randomized measurements on ρ(x). The dot product of two k-RDMs is equal to
[0123]
number
[0124] However, ρ(x i ), ρ(x j ) are irrelevant. This formula is r , p s This can be extended to the case where k coincides, thereby introducing an additional feature in the feature map that defines the kernel. The sum of all possible k-RDMs can be written as
[0125]
number
[0126] However, the formula for the linearity of the dot product and expectation of two k-RDMs is used. Therefore, the kernel function containing all the orders of the RDMs is given by the following formula (4):
[0127]
number
[0128] In equation (4), the expected value
[0129]
number
[0130] is the n from a randomly chosen Pauli frame measured on systems i and j s taken over samples,
[0131]
number
[0132] represents the first indicator function for the agreement between random Pauli measurements performed independently on system i and system j,
[0133]
number
[0134] represents a second indicator function for measurement basis agreement, e.g., whether the same bases X, Y, Z, and I were chosen across each of the qubits between the two systems. γ represents a hyperparameter.
[0135] To calculate the value of the linear kernel function given by equation (4) for a pair of quantum data points comprising a first N-qubit quantum state and a second N-qubit quantum state, a quantum computing device: ns For the kth iteration of samples, - Measure each qubit in system i in a randomly sampled Pauli basis, X, Y, or Z, to obtain the
[0136]
number
[0137] and
[0138]
number
[0139] obtain a first measurement by obtaining
[0140]
number
[0141] is either 1 or -1,
[0142]
number
[0143] 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 the
[0144]
number
[0145] and
[0146]
number
[0147] and obtaining a second measurement by obtaining:
[0148]
number
[0149] is either 1 or -1,
[0150]
number
[0151] is a random basis X, Y, or Z, - comparing the first measurement result and the second measurement result for the h qubit in the n qubit system to obtain a first indicator function
[0152]
number
[0153] Determine the value of and this value is the result of two
[0154]
number
[0155] ,
[0156]
number
[0157] is equal to 1 if it is equal, otherwise it is equal to 0. - for the hth qubit in an n-qubit system,
[0158]
number
[0159] Determine the value of the second indicator function by - Adjustable value for γ>0
[0160]
number
[0161] Calculate -
[0162]
number
[0163] The kernel function can be estimated using Mathematically, quantity
[0164]
number
[0165] is calculated, where N s represents the number of iterations for each quantum state of system i or j, r1 and r2 are iterations,
[0166]
number
[0167] represents the Pauli basis at the pth qubit for the r2 iteration,
[0168]
number
[0169] is the corresponding measurement result. Computing this kernel function using local randomized measurements and the classical shadow formalism is efficient because the classical shadow formalism allows for the efficient construction of an RDM from a small number of measurements.
[0170] To compute the complete kernel matrix, a quantum computing device computes a quantum data point x in the training dataset. i , x j For each pair of , the procedure described above is repeated.
[0171] Returning to FIG. 4 , the quantum computing device provides the calculated kernel matrix Q to the classical processor (step 406). The classical processor is configured to perform a classical machine learning method using the kernel matrix Q. For example, in an implementation in which the training data points obtained in step 402 are labeled data, the classical processor may be configured to perform any kernel SVM method used for classification or prediction, including a Gaussian kernel, a neural tangent kernel, or a random forest. As another example, in an implementation in which the training data points obtained in step 402 are unlabeled data, the classical processor may be configured to use the calculated kernel matrix to provide a distance metric in space that can be used to perform unsupervised learning or classification using an algorithm such as k-means.
[0172] The classical processor executes a training algorithm using the received kernel matrix to train the corresponding machine learning model. The particular training algorithm executed by the classical processor depends on the type of machine learning method the classical processor is configured to execute and may include a variety of training algorithms.
[0173] The quantum computing device generates a validation dataset of quantum data points {y i} (step 408). As described above with reference to step 402, the quantum data points included in the validation data set may be received as quantum data input or may be generated based on classical data input.
[0174] The quantum computing device performs a plurality of quantum computations to update the kernel matrix by computing 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 validation data set and the quantum data points in the training data set. Computing the new rows and columns of the kernel matrix involves updating the quantum data points x in the training data set and the validation data set, as described above with reference to step 404. i , x j For each pair of ij =Q(x i ,x j ) values.
[0175] The quantum computing device provides the classical processor with an updated kernel matrix, e.g., new rows and columns of the kernel matrix (step 412). The classical processor processes the updated kernel matrix to output a prediction for each quantum data point in the validation dataset, e.g., assign a label or numerical value.
[0176] The digital and / or quantum subject matter, and implementations of digital functional operations and quantum operations described herein, including the structures disclosed herein and their structural equivalents, may be implemented in digital electronic circuitry, suitable quantum circuitry, or more generally, in a quantum computing system, in tangibly embodied digital and / or quantum computer software or firmware, in digital and / or quantum computer hardware, or in a combination of one or more of these. The term "quantum computing system" may include, but is not limited to, a quantum computer, a quantum information processing system, a quantum cryptography system, or a quantum simulator.
[0177] Implementations of the digital and / or quantum subject matter described herein may 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 or to control the operation of a data processing apparatus. The digital and / or quantum computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or sequential access memory device, one or more qubits, or a combination of one or more thereof. Alternatively or additionally, the program instructions may 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 to encode 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 carried by or held or stored in a quantum system, where the smallest nontrivial system is a qubit, i.e., a system defining a unit of quantum information. The term "qubit" will be understood to encompass all quantum systems that can be suitably approximated as a two-level system in the corresponding context. Such quantum systems may include multi-level systems, e.g., with more than two levels. By way of example, such systems may include atoms, electrons, photons, ions, or superconducting qubits. In many implementations, a computational basis state is identified using a ground state and a first excited state, although it will be understood that other setups are possible in which a computational state is identified using a higher-level excited state. The term "data processing apparatus" refers to digital and / or quantum data processing hardware and encompasses all types of apparatuses, devices, and machines for processing digital and / or quantum data, including, by way of example, a programmable digital processor, a programmable quantum processor, a digital computer, a quantum computer, multiple digital and quantum processors or computers, and combinations thereof. An apparatus may also be or further include special-purpose logic circuitry, e.g., 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 special-purpose quantum computer that does not have the capability to perform universal quantum computation. In some cases, in addition to hardware, an apparatus may include code that creates an execution environment for digital and / or quantum computer programs, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of these.
[0179] A digital computer program, which may be called or described as a program, software, software application, module, software module, script, or code, may be written in any type of programming language, including a compiled or interpreted language, or a declarative or procedural language, and may 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, which may be called or described as a program, software, software application, module, software module, script, or code, may be written in any type of programming language, including a compiled or interpreted language, or a declarative or procedural language, and may be converted to a suitable quantum programming language or written in a quantum programming language, e.g., QCL or Quipper.
[0180] A digital and / or quantum computer program may, but need not, correspond to a file in a file system. A program may be stored in a portion of a file holding other programs or data, e.g., 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, e.g., files storing one or more modules, subprograms, or portions of code. A digital and / or quantum computer program may be deployed to run on one digital or 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 quantum systems, e.g., qubits. Generally, digital data communication networks cannot transmit quantum data, but quantum data communication networks can transmit both quantum data and digital data.
[0181] The processes and logic flows described herein may be performed by one or more programmable digital and / or quantum computers operating in conjunction with one or more digital and / or quantum processors, executing one or more digital and / or quantum computer programs to perform functions by operating on input digital and quantum data and generating output, as appropriate. The processes and logic flows may also be performed by, and an apparatus may be implemented as, special purpose logic circuitry, e.g., an FPGA or ASIC, or a quantum simulator, or a combination of special purpose logic circuitry or a quantum simulator with one or more programmed digital and / or quantum computers.
[0182] One or more digital and / or quantum computer systems "configured to" perform particular operations or actions means that the system has installed thereon software, firmware, hardware, or a combination thereof that causes the system to perform the operations or actions during operation. One or more digital and / or quantum computer programs configured to perform particular operations or actions means that the one or more programs contain instructions that, when executed by a digital and / or quantum data processing device, cause the device to perform the operations or actions. A quantum computer may receive instructions from a digital computer that, when executed by a quantum computing device, cause the device to perform the operations or actions.
[0183] A digital and / or quantum computer suitable for executing a digital and / or quantum computer program may be based on a general-purpose or a dedicated digital and / or quantum processor, 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 and digital and / or quantum data from a read-only memory, a random access memory, or a quantum system suitable for transmitting quantum data, e.g., 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 instructions and digital and / or quantum data. The central processing unit and memory may be supplemented by or incorporated into dedicated logic circuits or quantum simulators. 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 quantum systems suitable for storing quantum information, or be operatively coupled to receive digital and / or quantum data therefrom, transfer 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-readable media suitable for storing digital and / or quantum computer program instructions and 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, e.g., EPROM, EEPROM, and flash memory devices, magnetic disks, e.g., internal hard disks or removable disks, magneto-optical disks, CD-ROM and DVD-ROM disks, and quantum systems, e.g., 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 for long periods of time, e.g., a light-matter interface where light is used for transmission and material for storing and preserving quantum characteristics of quantum data, such as superposition or quantum coherence.
[0186] Control of various systems described herein, or 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 be implemented as apparatuses, methods, or systems, each of which may include one or more digital and / or quantum processing devices and a memory for storing executable instructions for performing the operations described herein.
[0187] While this specification contains numerous specific implementation details, 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, various features described in the context of a single implementation may also be implemented in multiple implementations separately or in any suitable subcombination. Moreover, although features may be described above as acting in several combinations, and even initially claimed as such, one or more features from a claimed combination may, in some cases, be deleted from the combination, and the claimed combination may be directed to a subcombination or a variation of a subcombination.
[0188] Similarly, while operations are illustrated in the figures in a particular order, this should not be understood as requiring such operations to be performed in the particular order or sequence illustrated, or that all of the illustrated operations be performed, to achieve desirable results. In some situations, multitasking and parallel processing may be advantageous. Moreover, the separation of various system modules and components in the above-described implementations should not be understood as requiring such separation in all implementations, and it should be understood that the described program components and systems may generally be integrated together in a single software product or packaged in multiple software products.
[0189] Specific 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 desirable results. As one example, the processes illustrated in the accompanying figures do not necessarily require the particular order shown, or sequence, to achieve desirable results. In some cases, multitasking and parallel processing may be advantageous. [Explanation of symbols]
[0190] 100 Classical Kernel Methods, Methods 102 Conventional quantum kernel methods, methods 104 Projected Quantum Kernel Methods, Methods 200 Exemplary System 202 Quantum Computing Devices 204 Control and Measurement Systems, Systems 206 qubits 208 Combiner 210 Control Signal 212 read signal 214 Classical Processors, Processors 216 memory 218 I / O unit, input / output device 250 Exemplary Classical Processor, Classical Processor 252 qubit assembly
Claims
1. obtaining, by a quantum computing device, a training dataset of quantum data points; calculating, by the quantum computing device, a kernel matrix representing a similarity between the quantum data points contained in the training data set; For each pair of quantum data points in the training 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 kernel matrix to a classical processor; 4. A computer-implemented method comprising:
2. receiving, by the classical processor, the kernel matrix from the quantum computing device; executing, by the classical processor, a training algorithm using the kernel matrix to build a machine learning model; The method of claim 1, further comprising:
3. obtaining, by the quantum computing device, a validation dataset of quantum data points; computing, by the quantum computing device, new elements of the kernel matrix, the new elements comprise entries representing similarities between the quantum data points in the validation data set and the quantum data points in the training data set; wherein the step of computing the new elements comprises computing, for each pair of quantum data points in the training data set and the validation data set, a corresponding value of the kernel function; providing, by the quantum computing device, the new element of the kernel matrix to the classical processor; The method of claim 1, further comprising:
4. 4. The method of claim 3, 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 validation data set.
5. 5. The method of claim 1, wherein the kernel function is based on a simplicial reduced density matrix for the quantum data points in the training data set.
6. The method of claim 5 , wherein the kernel function comprises a linear kernel function.
7. 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, 7. The method of claim 6, 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.
8. 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 irepresents the index that labels | Tr m≠k [ρ(x i 8. The method of claim 6 or 7, wherein x,y ...
9. calculating values of the kernel function for pairs of quantum data points in the training 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; 9. The method according to any one of claims 6 to 8, comprising:
10. The method of claim 5 , wherein the kernel function comprises a squared exponential kernel function.
11. 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 10, wherein the norm of σ is equal to the norm of σ minus σ.
12. 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 12. The method of claim 10 or 11, wherein k = 1-RDM on quantum bit k.
13. calculating values of the kernel function for pairs of quantum data points in the training 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; 13. The method according to any one of claims 10 to 12, comprising:
14. the kernel function is based on a k-body RDM for the quantum data points; 5. The method of claim 1, wherein k is less than a predetermined value.
15. The method of claim 14 , wherein the kernel function comprises a linear kernel function.
16. 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, 16. The method of claim 15, 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.
17. 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 17. The method of claim 15 or 16, wherein:
18. calculating values of the kernel function for pairs of quantum data points in the training 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; 18. The method of any one of claims 15 to 17, comprising:
19. The method of claim 14 , wherein the kernel function comprises an exponential kernel function.
20. 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] 20. The method of claim 19, wherein: represents a second indicator function for measurement basis agreement.
21. calculating values of the kernel function for pairs of quantum data points in the training 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 [0097] 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.
21. The method of claim 20, comprising:
22. 22. The method of claim 1, wherein the quantum data points comprise N-qubit quantum states, where N>
1.
23. obtaining a training data set of quantum data points, receiving a training data set of classical data points; generating a training data set of said quantum data points, the training data set comprising embedding each classical data point into a respective quantum state by applying a respective encoding circuit to a reference quantum state; 23. The method of any one of claims 1 to 22, comprising:
24. 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 24. An apparatus, the apparatus being configured to carry out the method of any one of claims 1 to 23.
Citation Information
Patent Citations
Quantum feature kernel alignment
US20200320437A1
