Quantum computer, computer system, control method thereof, and control program
Patent Information
- Application Number
- JP2024079440
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2025-03-26
- Estimated Expiration
- 2044-05-15
AI Technical Summary
【0010】 本発明の一態様によれば、量子カーネル法による機械学習の推定精度を向上することができる。
Smart Images

Figure 0007651759000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a quantum computer, a computer system, a control method thereof, and a control program. [Background technology]
[0002] The quantum kernel method is one of the powerful algorithms for machine learning using a quantum computer, and is described in, for example, Patent Document 1 and Non-Patent Document 1. Encoding classical data into a quantum state can be regarded as a feature mapping into a high-dimensional Hilbert space. Therefore, the quantum kernel method can express various feature mappings compared to the classical kernel method that performs machine learning using a classical computer, and is therefore considered to have an advantage in terms of the efficiency of machine learning. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Special Publication No. 2023-546590 [Non-patent literature]
[0004] [Non-Patent Document 1] V. Havlicek et al., “Supervised learning with quantum-enhanced feature spaces”, Nature, 2019, Vol. 567, No. 7747, p. 209-212 Summary of the Invention [Problem to be solved by the invention]
[0005] However, conventional quantum kernel methods still have lower machine learning estimation accuracy than classical kernel methods.
[0006] One aspect of the present invention aims to improve the estimation accuracy of machine learning using a quantum kernel method. [Means for solving the problem]
[0007] In order to solve the above problem, a quantum computer according to one aspect of the present invention is provided that: k , x l (x k , x l and an acquisition unit for acquiring the two feature vectors x k , x l The kernel function k(x k, x l ), and an output unit that outputs a calculation result of the quantum circuit, k, x l ) is expressed by the following formula (1):
[0008]
number
[0009] Here, the x p and x q are the two feature vectors x k , x l are the p-th and q-th elements in any one of the α p and α q is a parameter for adjustment. Effect of the Invention
[0010] According to one aspect of the present invention, it is possible to improve the estimation accuracy of machine learning using a quantum kernel method. [Brief description of the drawings]
[0011] [Figure 1] FIG. 1 is a block diagram showing an overview of a quantum SVM according to an embodiment of the present invention. [Diagram 2]FIG. 2 is a circuit diagram showing an example of a portion of a quantum circuit in the quantum SVM quantum computer. [Diagram 3] FIG. 2 is a circuit diagram showing an example of the quantum circuit. [Figure 4] 13 is a flowchart showing the flow of a learning process in the quantum SVM. [Diagram 5] 13 is a flowchart showing a flow of an evaluation process in the quantum SVM. [Figure 6] 11 is a graph showing a set of training data used in one example of the above embodiment. [Figure 7] FIG. 11 is a diagram showing, in table form, the calculation results of the estimation accuracy in the above-mentioned examples and comparative examples. [Figure 8] 11 is a graph showing examples of training kernel matrices and evaluation kernel matrices in the above-mentioned example and comparative example. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] [Embodiment 1] An embodiment of the present invention will be described with reference to FIGS.
[0013] (Quantum SVM) FIG. 1 is a block diagram showing an overview of a quantum SVM (support-vector machine) according to this embodiment.
[0014] SVM is one of the pattern recognition models that uses supervised learning and is applied to classification, regression, etc. The SVM optimizes a decision function (learning model) using a set of training data that is a part of the set of teacher data. The SVM then estimates the class of the input data using the optimized decision function. The SVM also evaluates the accuracy of the class estimation using a set of test data that is a part or all of the remaining set of teacher data.
[0015] In order to deal with cases where linear separation is not possible, the SVM uses the feature vector x k , x l (x k , x l Both have n elements, where n is an integer equal to or greater than 2) are mapped to a finite-dimensional or infinite-dimensional feature space, and linear separation is performed in the feature space. In this case, the feature vector φ(x k ) and φ(x l ) does not need to be calculable individually, and the inner product φ(x l ) T φ(x k ) can be calculated. This inner product is the kernel function k(x k ,x l ), that is, k(x k ,x l )=φ(x l ) T φ(x k ) In quantum SVM, the mapping to the feature space and the calculation of the kernel function are performed on a quantum computer.
[0016] As shown in FIG. 1, the quantum SVM 1 is a computer system including a classical computer 2 and a quantum computer 3. The quantum computer 3 is a computer that applies the principles of quantum mechanics to calculations. The quantum computer 3 performs calculation processing using quantum bits having values of 0 to 1. As described above, the quantum computer 3 maps the training data to the feature space and calculates the kernel function. On the other hand, the classical computer 2 is a conventional computer that performs calculations using logic circuits based on classical physics. The classical computer 2 performs calculation processing using bits having values of 0 or 1. Details of the classical computer 2 will be described later.
[0017] (Quantum Computer) As shown in FIG. 1, the quantum computer 3 includes an acquisition unit 10, a quantum circuit 11, and an output unit 12.
[0018] The acquisition unit 10 acquires two different feature vectors x k, x l from the classical computer 2. Furthermore, the acquisition unit 10 acquires a phase parameter φ p,q (x), where p and q are integers between 0 and (n-1). The acquisition unit 10 acquires the acquired feature vector x k , x l and the phase parameter φ p,q (x) is sent to quantum circuit 11.
[0019] The quantum circuit 11 receives the feature vector x k , x l and the phase parameter φ p,q (x) is used to calculate the kernel function k(x k, x l The quantum circuit 11 is described in detail later. The output unit 12 outputs the kernel function k(x k, x l ) is output to classical computer 2.
[0020] (Quantum circuit) In quantum circuit 11, the kernel function k(x k, x l ) is expressed by the following equation (1).
[0021]
number
[0022] where x p and x q are the above two feature vectors x k , x l The pth and qth elements in either of the above. Also, α p and α q are the pth and qth tuning parameters, respectively. p and α q Therefore, element x p and x q The strength of quantum entanglement can be adjusted by adjusting the adjustment parameter α pand α q In the case where the phase parameter φ is not used, that is, p,q (x)=(π-x p )×(π-x q ) is disclosed in Non-Patent Document 1.
[0023] FIG. 2 is a circuit diagram showing a part of the quantum circuit 11, which is a parameterized quantum circuit U corresponding to the above formula (3). φ(x) 2 is a circuit diagram showing an example of the quantum circuit shown in FIG. 2. The example in FIG. 2 shows the case where p=0 and q=1. It should be noted that each element of the feature vector x input to the quantum circuit is normalized in advance within the range of 0 to 2π.
[0024] The quantum circuit U shown in Figure 2 φ(x) In the initial state |0>, the 0th qubit q 0 is in a superposition state by the H (Hadamard) gate, and R z (Z-axis rotation) The gate rotates around the z-axis the 0th element x of the feature vector x. 0 This rotates the feature vector x by an angle corresponding to the 0th element x 0 The value of the 0th qubit, q 0 is input (parametrized) to
[0025] Similarly, the first qubit q in the initial state |0> 1 is in a superposition state by the H gate, and R z The gates move the first element x of the feature vector x around the z-axis. 1 This rotates the first element x of the feature vector x by an angle corresponding to 1 The value of the first qubit, q 1 is parameterized.
[0026] Next, the parametrized first qubit, q 1 is the parametrized 0th qubit q by the CNOT gate. 0 The first qubit q 1 is R z The gate determines the phase parameter φp,q The value of (x) is parameterized, and the CNOT gate is used to parameterize the 0th qubit q 0 The quantum circuit U shown in Figure 2 is in a quantum entangled state. φ(x) Therefore, the 0th element x of the feature vector x 0 and the first element x 1 is mapped to the feature space.
[0027] 3 is a circuit diagram showing an example of the quantum circuit 11 corresponding to the above formula (1), that is, the quantum circuit 11 for calculating the kernel function k. In the example of FIG. 3, k , x l The number of elements of is 6. Therefore, the 6 quantum bits q 0 ~q 5 In the example of Fig. 3, in order to simplify the quantum circuit 11, q = p + 1, and quantum entanglement is generated only between adjacent quantum bits.
[0028] The quantum circuit 11 shown in FIG. 3 satisfies |0> 6 For the parameterized quantum circuit U φ(xk) and U φ(xl) † By applying the above in sequence and measuring, |0> 6 It is possible to measure the number of times that the state |0> is obtained. 6 The probability of obtaining the state of k, x l ), the quantum circuit 11 calculates the kernel function k(x k, x l ) can be estimated (calculated).
[0029] (Classical Computers) As shown in FIG. 1, the classical computer 2 includes an acquisition unit 20, a setting unit 21, a dimensionality reduction unit 22, a normalization unit 23, a data division unit 24, a phase parameter calculation unit 25, a matrix creation unit 26, a learning unit 27, a class estimation unit 28, and an evaluation unit 29.
[0030] The acquiring unit 20 (first acquiring unit) acquires the above-mentioned set of teacher data. The above-mentioned teacher data includes input data as explanatory variables and includes classes as objective variables. The acquiring unit 20 sends the input data included in the acquired set of teacher data to the dimension reduction unit 22. The acquiring unit 20 also sends the classes included in the acquired set of teacher data to the learning unit 27 and the evaluation unit 29.
[0031] The setting unit 21 sets the number of dimensions Dn after reduction by the dimension reduction unit 22 and the above-mentioned adjustment parameter α 0 ~α n-1 The setting unit 21 sets the number of dimensions Dn to the dimension reduction unit 22 and the adjustment parameter α 0 ~α n-1 is sent to the phase parameter calculation unit 25.
[0032] The dimension reduction unit 22 performs dimension reduction on the input data from the acquisition unit 20 in order to match the number of elements included in the data input to the quantum circuit 11 with the number of quantum bits used in the quantum circuit 11. Specifically, the dimension reduction unit 22 reduces the number of dimensions of the input data to the number of dimensions Dn from the setting unit 21. Examples of the dimension reduction method include principal component analysis (PCA), non-negative matrix factorization, and autoencoder. The dimension reduction unit 22 sends the dimension-reduced data (hereinafter referred to as "dimension-reduced data") to the normalization unit 23.
[0033] The normalization unit 23 normalizes the dimension reduction data from the dimension reduction unit 22 to a range that can be used by the quantum circuit 11. In the quantum circuit 11 of this embodiment, as shown in Figs. 2 and 3, data is input as a rotation angle around the Z axis of the quantum bit. Therefore, the normalization unit 23 normalizes the above dimension reduction data to a range of 0 to 2π. Normalization realizes parameterization that takes into account the unitary nature of the quantum bit. The normalization unit 23 sends the normalized dimension reduction data (hereinafter referred to as "normalized data") to the data division unit 24.
[0034] The data division unit 24 (selection unit, output unit) divides the set of normalized data from the normalization unit 23, which is derived from the above-mentioned set of teacher data, into a set of training data for learning and a set of test data for evaluation.
[0035] The data division unit 24 selects the above-mentioned pairs of training data from the above-mentioned training data set, and sends them to the phase parameter calculation unit 25 and the quantum computer 3, and continues this process until all pairs are selected. The data division unit 24 also selects the above-mentioned pairs of training data and test data from the above-mentioned training data set and the above-mentioned test data set, and sends them to the phase parameter calculation unit 25 and the quantum computer 3, and continues this process until all pairs are selected.
[0036] The phase parameter calculation unit 25 (calculation unit, output unit) calculates the phase parameter φ of the training data or the test data from the data division unit 24. p,q (x) based on the above formula (4). The phase parameter calculation unit 25 calculates the calculated phase parameter φ p,q (x) is sent to quantum computer 3.
[0037] The quantum computer 3 receives from the classical computer 2 the pairs of training data and the respective phase parameters φ of the pairs. p,q (x) and (x), we convert one of the pairs of training data into a feature vector x k and the other is the feature vector x lNext, the quantum computer 3 calculates a feature vector x k and its phase parameter φ p,q (x k ) and feature vector x l and its phase parameter φ p,q (x l ) and input the kernel function k(x k, x l ) is estimated. The quantum computer 3 then estimates the estimated kernel function k(x k, x l ) to classical computer 2.
[0038] The quantum computer 3 also receives pairs of training data and test data and respective phase parameters φ of the pairs from the classical computer 2. p,q (x) and the above training data is transformed into the feature vector x k The above test data is expressed as a feature vector x l Next, the quantum computer 3 calculates a feature vector x k and its phase parameter φ p,q (x k ) and feature vector x l and its phase parameter φ p,q (x l ) and input the kernel function k(x k, x l ) is estimated. The quantum computer 3 then estimates the estimated kernel function k(x k, x l ) to classical computer 2.
[0039] The matrix creation unit 26 (second acquisition unit) calculates a kernel function k(x k, x l ) from the quantum computer 3, and by repeating this for all pairs of the training data, the kernel function k(x k, x l) as elements. The matrix creation unit 26 sends the created learning kernel matrix to the learning unit 27.
[0040] Furthermore, the matrix creation unit 26 calculates a kernel function k(x k, x l ) from the quantum computer 3, and this is repeated for all pairs of the training data and the test data. As a result, the matrix creation unit 26 obtains the kernel function k(x k, x l ) as elements. The matrix creation unit 26 sends the created evaluation kernel matrix to the evaluation unit 29.
[0041] The learning unit 27 performs machine learning to generate a decision function that determines the classification of a class, using the learning kernel matrix from the matrix creation unit 26 and a set of classes that are included in the teacher data and correspond to the training data. The learning unit 27 sends the machine-learned decision function to the class estimation unit 28 and the evaluation unit 29.
[0042] A description will now be given of an example of machine learning in the learning unit 27. The above-mentioned decision function f(x) is expressed by the following equation (5).
[0043]
number
[0044] The learning unit 27 uses the learning kernel matrix and the class y i Using the set of jThe learning unit 27 also performs fitting of a kernel function k (hereinafter referred to as "classical kernel function k") used in an SVM (hereinafter referred to as "classical SVM") executed only by the classical computer 2 without using the quantum computer 3. Examples of the classical kernel function k include a Gaussian kernel, a sigmoid kernel, a polynomial kernel, and a radial basis function (RBF) kernel. By fitting these, the decision function f(x) of the above formula (5) can be obtained.
[0045] The class estimation unit 28 (estimation unit) acquires input data for which a class is to be estimated via the acquisition unit 20, the dimension reduction unit 22, and the normalization unit 23, and estimates a class into which the acquired input data is classified using a decision function from the learning unit 27. Therefore, when the class estimation unit 28 estimates the class of the input data, there is no need to use the quantum computer 3. The class estimation unit 28 may display the estimated class via a display device (not shown), or may transmit the estimated class to an external device via a communication device (not shown).
[0046] The evaluation unit 29 evaluates the decision function from the learning unit 27. Specifically, the evaluation unit 29 first estimates a set of classes into which the test data sets are classified, using the evaluation kernel matrix from the matrix creation unit 26 and the decision function. At this time, the evaluation unit 29 uses a kernel function that is an element of the evaluation kernel matrix in place of the classical kernel function in the decision function. Next, the evaluation unit 29 compares the estimated set of classes with a set of classes included in the teacher data set and corresponding to each of the test data sets, to calculate an estimation accuracy. The evaluation unit 29 may display the calculated estimation accuracy via a display device (not shown) or may transmit it to an external device via a communication device (not shown).
[0047] (Learning process) 4 is a flowchart showing the flow of the learning process (control method) in the quantum SVM 1 having the above configuration. As shown in FIG. 4, first, the acquisition unit 20 acquires a set of teacher data including input data and classes (S10, first acquisition step). Next, the setting unit 21 sets the number of dimensions Dn and the adjustment parameter α 0 ~α n-1 (S11, setting step).
[0048] Next, the dimension reduction unit 22 reduces the dimensions of the input data to create dimension-reduced data with the number of dimensions Dn (S12). Next, the normalization unit 23 normalizes the dimension-reduced data to a range that can be used by the quantum circuit 11 to create normalized data. Next, the data division unit 24 divides the normalized data set derived from the teacher data set into a training data set for learning and a test data set for evaluation (S14).
[0049] Next, the data division unit 24 selects the training data pair from the training data set (S15, selection step). The data division unit 24 also outputs the selected training data pair to the quantum computer 3 (output step). Next, the phase parameter calculation unit 25 calculates the phase parameters φ p,q (x)=(π-α p x p )×(π-α q x q ) (S16, calculation step). The phase parameter calculation unit 25 calculates the calculated phase parameter φ p,q (x) is output to quantum computer 3 (output step).
[0050] Next, the quantum computer 3 calculates the training data pairs and the respective phase parameters φ p,q (x) into the quantum circuit 11 and measure it, the inner product value of the above pair (kernel function k(x k, x l) is calculated (S17). The inner product values of the pairs calculated by the quantum computer 3 are acquired by the matrix creation unit 26 (second acquisition step). Next, steps S15 to S17 are repeated until all pairs of the training data are selected from the set of training data (S18). As a result, a learning kernel matrix having the inner product values calculated for all pairs of the training data as elements is created by the matrix creation unit 26 (S19).
[0051] Next, the learning unit 27 performs machine learning to generate a decision function that determines the classification of classes, using the learning kernel matrix and a set of classes that are included in the teacher data and correspond to the training data (S20, learning step). Specifically, the learning unit 27 performs machine learning to generate a decision function that determines the classification of classes, using the parameters (b, α j ) and a classical kernel function is fitted. The class estimation unit 28 can estimate the class into which the input data is classified using the decision function. Then, the learning process ends.
[0052] (Evaluation process) 5 is a flowchart showing the flow of the evaluation process in the above-configured quantum SVM 1. The evaluation process is performed after the learning process shown in FIG.
[0053] 5, the data division unit 24 selects the pair of training data and test data from the set of training data and the set of test data divided in step S14 in FIG. 4 (S30). Next, the phase parameter calculation unit 25 calculates the phase parameters φ p,q (x)=(π-α p x p )×(π-α q x q ) is calculated (S31).
[0054] Next, the quantum computer 3 calculates the pair of the training data and the test data and the respective phase parameters φ p,q(x) into the quantum circuit 11 and measure it, the inner product value of the above pair (kernel function k(x k, x l ) is calculated (S32). Next, steps S30 to S32 are repeated until all pairs of the training data and the test data are selected from the set of training data and the set of test data (S33). As a result, an evaluation kernel matrix having elements of the inner product values calculated for all pairs of the training data and the test data is created by the matrix creation unit 26 (S34).
[0055] Next, the evaluation unit 29 uses the evaluation kernel matrix and the decision function machine-learned in step S20 of FIG. 4 to estimate a set of classes into which the test data sets are classified (S35). At this time, in the decision function, an inner product value (kernel function) that is an element of the evaluation kernel matrix is used instead of a classical kernel function. Next, the evaluation unit 29 compares the estimated set of classes with a set of classes included in the teacher data set acquired in step S10 of FIG. 4 and corresponding to each of the test data sets, to calculate the estimation accuracy (S36). Then, the evaluation process is terminated.
[0056] The learning process shown in FIG. 4 and the evaluation process shown in FIG. 5 are performed with the number of dimensions Dn and the adjustment parameter α 0 ~α n-1 By changing the number of dimensions Dn and the adjustment parameter α 0 ~α n-1 can be found. EXAMPLES
[0057] An embodiment of the present invention will be described with reference to FIGS.
[0058] 6 is a graph showing a set of training data used in this embodiment. The training data set is a data set extracted from a system log for fault diagnosis in a network system operated by the applicant.
[0059] The vertical axis of FIG. 6 indicates the failure data number for identifying 56 pieces of failure data. The horizontal axis of FIG. 6 indicates the command number for identifying 120 types of commands. In FIG. 6, a certain command is sent to the network system for certain failure data, and an abnormal result is obtained, which is colored. The failures are classified into seven types, which correspond to different color intensities in FIG. 6. That is, in the teacher data shown in FIG. 6, the failure data is the explanatory variable (input data) of the teacher data, the presence or absence of an abnormality in the command is an element of the failure data, and the type of failure is the objective variable (class) of the teacher data.
[0060] Using the set of teacher data shown in Fig. 6, the learning process shown in Fig. 4 and the evaluation process shown in Fig. 5 were performed to calculate the estimation accuracy. In this embodiment, in order to shorten the processing time, a tensor network simulator was used instead of the quantum computer 3, and the adjustment parameter α 0 ~α n-1 was set to the same value α.
[0061] Figure 7 is a diagram showing the calculation results of the estimation accuracy in a table format. As shown in Figure 7, the estimation accuracy was calculated for each of the cases where the number of quantum bits used, i.e., the number of dimensions Dn, is 10, 20, 30, 40, and 50, and the adjustment parameter α is 0.2, 0.4, 0.6, and 0.8.
[0062] Comparative Example 1 is a phase parameter φ p,q (x) is used, that is, the estimation accuracy is not used when the adjustment parameter α is used. Comparative Example 2 is the estimation accuracy using a conventional quantum SVM. Comparative Example 3 is the estimation accuracy using a classical SVM using an RBF kernel. In the classical SVM, the number of quantum bits corresponds to the number of dimensions Dn.
[0063] In addition, the conventional quantum SVM has a different quantum circuit configuration compared to the quantum SVM of this embodiment, but the rest is the same. The quantum circuit of the conventional quantum SVM is a quantum circuit 11 shown in FIG. 3, which is a CNOT gate and a phase parameter φ p,q R for (x) z In other words, the quantum circuit of the conventional quantum SMV only parameterizes each element of the feature vector for each quantum bit, and does not generate an entangled state between quantum bits.
[0064] 7 and Comparative Example 1, it can be seen that by using an adjustment parameter α less than 1, the Example can obtain an estimation accuracy equal to or higher than that of Comparative Example 1. Also, by comparing the Example and Comparative Example 2 in FIG. 7, it can be seen that when the number of quantum bits is any of 10, 20, and 50, or when the number of quantum bits is any of 30 and 40 and the adjustment parameter α is any of 0.2 and 0.4, the Example can obtain an estimation accuracy equal to or higher than that of Comparative Example 2. Therefore, it can be seen that by adjusting (tuning) the adjustment parameter α, an estimation accuracy equal to or higher than that of the conventional method can be obtained.
[0065] 7 and Comparative Example 3, it can be seen that when the number of quantum bits is 10, when the number of quantum bits is 20 and α is any of 0.6 and 0.8, or when the number of quantum bits is 30 and α is any of 0.2, 0.4 and 0.6, the Example can obtain estimation accuracy equivalent to or higher than that of Comparative Example 3. Note that when the number of quantum bits is 40 and 50, the estimation accuracy is lower than when the number of quantum bits is 10, 20, and 30, and various factors such as the complexity of the data are considered to be the cause of this.
[0066] From the above, it can be seen that the estimation accuracy of the machine learning using the kernel function estimated by the quantum computer 3 is improved by the classical computer 2 adjusting (tuning) the adjustment parameter α. Furthermore, it can be seen that the estimation accuracy is further improved by adjusting (tuning) the number of dimensions Dn.
[0067] FIG. 8 is a graph showing an example of a training kernel matrix and an evaluation kernel matrix. In FIG. 8, the training kernel matrix is shown on the left side, and the evaluation kernel matrix is shown on the right side. The upper part of FIG. 8 shows the case of the present embodiment in which the estimation accuracy is the highest in FIG. 7, that is, the number of quantum bits is 20, and the adjustment parameter α is 0.6. The lower part of FIG. 8 shows the case of Comparative Example 1 in which the estimation accuracy is the worst in FIG. 7, that is, the number of quantum bits is 40, and the adjustment parameter α is 1.
[0068] The graph in Figure 8 is brighter as the kernel function is larger. In general, the larger the kernel function, the higher the similarity in feature space of the two paired data. Therefore, it is believed that the more kernel functions with large (bright) values there are, the more data there is close to the classification boundary that separates the classes, and therefore the higher the estimation accuracy. The graph in the upper part of Figure 8 is brighter than the graph in the lower part of Figure 8, and therefore it can be seen that the estimation accuracy is higher.
[0069] (Modification) The class estimation unit 28 may estimate the class of the input data by using the quantum computer 3. In this case, the learning unit 27 estimates the class y i Using the set of j By fitting the The decision function f(x) of the above formula (5) is calculated.
[0070] Next, when the acquisition unit 20 acquires input data for which a class is to be estimated, the dimension reduction unit 22 reduces the dimension of the input data, and the normalization unit 23 normalizes the input data. The data division unit 24 selects a pair of the normalized input data (hereinafter referred to as "normalized input data") and the training data in the training data set, and sends them to the phase parameter calculation unit 25 and the quantum computer 3, and continues this until all of the training data included in the training data set has been selected. The phase parameter calculation unit 25 calculates the phase parameter φ between the training data and the normalized input data from the data division unit 24. p,q (x) is calculated based on the above formula (4) and sent to the quantum computer 3.
[0071] On the other hand, the quantum computer 3 receives pairs of training data and normalized input data from the classical computer 2, and the respective phase parameters φ p,q Next, the quantum computer 3 converts the training data contained in the above pair into the feature vector x k The normalized input data in the above pair is expressed as the feature vector x l Next, the quantum computer 3 calculates a feature vector x k and its phase parameter φ p,q (x k ) and feature vector x l and its phase parameter φ p,q (x l ) and input the kernel function k(x k, x l ) is estimated. The quantum computer 3 then estimates the estimated kernel function k(x k, x l ) to classical computer 2.
[0072] On the other hand, in the classical computer 2, the class estimation unit 28 estimates the training data x i For each training data x i and the kernel function k(x i Next, the class estimation unit 28 obtains the obtained kernel function k(xi , x) and the above training data x i The class y corresponding to i and the decision function f(x) of the above formula (5) that has been machine-learned by the learning unit 27, the class into which the normalized input data is classified is estimated.
[0073] (Additional Notes) In the above embodiment and examples, a quantum SVM 1 has been described, but the present invention is not limited to this, and can also be applied to a device that executes any algorithm that uses a kernel function estimated by a quantum computer 3, such as a kernel perceptron, a Gaussian process, a principal component analysis, a canonical correlation analysis, a ridge regression, a spectral clustering, or a linear adaptive filter.
[0074] [Software implementation example] The functions of the classical computer 2 (hereinafter referred to as the "device") can be realized by a program for causing a computer to function as the device, and for causing a computer to function as each control block of the device (in particular, each unit included in the dimensionality reduction unit 22, the normalization unit 23, the phase parameter calculation unit 25, the learning unit 27, the class estimation unit 28, and the evaluation unit 29).
[0075] In this case, the device includes a computer having at least one control device (e.g., a processor) and at least one storage device (e.g., a memory) as hardware for executing the program. The control device and storage device execute the program to realize each function described in each of the above embodiments.
[0076] The program may be non-transitory and may be recorded in one or more computer-readable recording media. The recording media may or may not be included in the device. In the latter case, the program may be provided to the device via any wired or wireless transmission medium.
[0077] In addition, some or all of the functions of each of the control blocks can be realized by a logic circuit. For example, an integrated circuit in which a logic circuit that functions as each of the control blocks is formed is also included in the scope of the present invention. In addition, the functions of each of the control blocks can be realized by, for example, a quantum computer.
[0078] The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope of the claims. Embodiments obtained by appropriately combining the technical means disclosed in different embodiments are also included in the technical scope of the present invention. [Explanation of symbols]
[0079] 2 Classical Computers 3. Quantum Computers 10 Acquisition Department 11 Quantum circuit 12 Output section 20 Acquisition Department (1st Acquisition Department) 21 Setting section 22 Dimensional Reduction Section 23 Normalization section 24 Data division section (selection section, output section) 25 Phase parameter calculation unit (calculation unit, output unit) 26 Matrix creation unit (second acquisition unit) 27 Learning Department 28 Class Estimation Unit (Estimation Unit) 29 Evaluation Section
Claims
1. Two feature vectors x k , x l (x k , x l each of which has n elements, n being an integer of 2 or more; The two feature vectors x k , x l The kernel function k(x k, x l ) and a quantum circuit for estimating an output unit that outputs a calculation result of the quantum circuit; In the quantum circuit, the kernel function k(x k, x l ) is expressed by the following formula (1): [0010] Here, the x p and x q are the two feature vectors x k , x l are the p-th and q-th elements in any one of the above, p and α q is a tuning parameter of the quantum computer.
2. The adjustment parameter α p and α q The quantum computer of claim 1 , wherein:
3. A quantum computer according to claim 1 or 2 and a classical computer, The classical computer is A first acquisition unit that acquires a set of teacher data; A setting unit for setting adjustment parameters; A selection unit that selects two feature vectors from a plurality of feature vectors that are a plurality of explanatory variables included in a set of training data; a calculation unit that calculates a phase parameter for each of the two feature vectors by using the two feature vectors and the adjustment parameters; an output unit that outputs the two feature vectors and the phase parameter to the quantum computer; A second acquisition unit that acquires a kernel function of the two feature vectors estimated by the quantum computer; A computer system comprising: a learning unit that creates a learning model by performing machine learning using a plurality of kernel functions acquired from the second acquisition unit for the plurality of feature vectors included in the set of teacher data and a plurality of objective variables included in the set of teacher data.
4. The objective variable in the set of teacher data indicates to which class the feature vector, which is the explanatory variable, belongs, The first acquisition unit further acquires input data, The computer system according to claim 3 , further comprising an estimation unit that estimates the class to which the input data belongs by using a learning model created by the learning unit.
5. The setting unit sets the number of dimensions, The computer system according to claim 3 , further comprising a dimension reduction unit that reduces the data acquired by the first acquisition unit to the number of dimensions.
6. A method for controlling a computer system including the quantum computer according to claim 1 or 2 and a classical computer, comprising: A first acquisition step in which the classical computer acquires a set of training data; A setting step for setting adjustment parameters; A selection step of selecting two feature vectors from a plurality of feature vectors which are a plurality of explanatory variables included in a set of training data; a calculation step of calculating a phase parameter for each of the two feature vectors by using the two feature vectors and the adjustment parameters; an output step of outputting the two feature vectors and the phase parameter to the quantum computer; A second acquisition step of acquiring a kernel function of the two feature vectors estimated by the quantum computer; A control method for a computer system, comprising: a learning step of creating a learning model by performing machine learning using a plurality of kernel functions acquired in the second acquisition step for the plurality of feature vectors included in the set of teacher data and a plurality of objective variables included in the set of teacher data.
7. 4. A control program for causing a classical computer in the computer system according to claim 3 to function, the control program causing the computer to function as said setting unit, said selecting unit, said calculating unit, and said learning unit.
Citation Information
Patent Citations
Data classification methods, classifier training methods and systems
CN112651418B
Artificial Intelligence-Driven Quantum Computing
JP2022509841A
Quantum Feature Kernel Alignment
JP2022526072A
Quantum Computing with Kernel Methods for Machine Learning
JP2023546590A