Non-transitory computer-readable storage medium, training device
The training program optimizes quantum circuit parameters by generating input for subsequent layers, reducing computational load and shortening training times for quantum machine learning models.
Patent Information
- Application Number
- JP2024111623
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2026-01-23
AI Technical Summary
Quantum machine learning is inefficient due to long calculation times required for parameter adjustment in quantum circuits.
A training program that uses a quantum computer to determine parameter values for quantum circuits in multiple layers by generating input for subsequent layers based on the output of previous layers, optimizing weights without directly updating quantum circuit parameters.
This approach significantly reduces the computational load on quantum computers, enabling more efficient training of machine learning models and shorter computation times, particularly for deep-structured inference models.
Smart Images

Figure 2026011209000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to training techniques using quantum computers. [Background technology]
[0002] Quantum computers can handle more information than classical computers by performing calculations using quantum superposition states. Quantum computers can increase the probability of a state corresponding to desired information appearing by changing the quantum state of qubits using quantum circuits, which are quantum computation models that describe quantum algorithms. When N qubits (N is an integer greater than or equal to 1) are used, 2 N It is possible to express individual states.
[0003] Quantum algorithms have been discovered that are exponentially faster than classical computers for certain problems, such as integer factorization, simulation of quantum systems, and sampling.
[0004] BACKGROUND ART With regard to quantum machine learning using a Noisy Intermediate-Scale Quantum (NISQ) computer, which is an example of a quantum computer, a data summarization method for training a machine learning model is known (see, for example, Patent Document 1).
[0005] Supervised learning using quantum-enhanced feature spaces is also known (see, for example, Non-Patent Document 1). A phenomenon called the Barren Plateau is also known in the training of quantum neural networks (see, for example, Non-Patent Document 2). A method for enhancing generative models using quantum correlations is also known (see, for example, Non-Patent Document 3). A method for predicting many properties of quantum systems with a small number of measurements is also known (see, for example, Non-Patent Document 4). [Prior art documents] [Patent documents]
[0006] [Patent Document 1] Japanese Patent Application Publication No. 2022-176899 [Non-patent literature]
[0007] [Non-Patent Document 1] V. Havlicek et al., “Supervised learning with quantum enhanced feature spaces”, arXiv:1804.11326v2, 2018 [Non-patent document 2] JR McClean et al., “Barren plateaus in quantum neural network training landscapes”, arXiv:1803.11173v1, 2018 [Non-patent document 3] X. Gao et al., “Enhancing Generative Models via Quantum Correlations”, arXiv:2101.08354v1, 2021. [Non-patent document 4] H.-Y. Huang et al., “Predicting Many Properties of a Quantum System from Very Few Measurements”, arXiv:2002.08953v2, 2020. Summary of the Invention [Problem to be solved by the invention]
[0008] Quantum machine learning is a technology that applies the principles of quantum computing to machine learning, and is expected to be applied to problems that are difficult to calculate using classical computers. However, when adjusting parameters included in quantum circuits using quantum machine learning, the calculation time required for parameter adjustment can be long.
[0009] In one aspect, the present invention aims to improve the efficiency of machine learning using a quantum computer. [Means for solving the problem]
[0010] In one version, the training program causes the computer to perform the following steps:
[0011] The computer acquires a training data set for a machine learning model, the machine learning model including quantum circuits for each of a plurality of layers and a generation function that generates an input for a second quantum circuit in a subsequent layer based on an output of a first quantum circuit in a subsequent layer of two consecutive layers.
[0012] The computer determines the values of the parameters included in the generating function by training the machine learning model using a quantum computer that executes calculations on the quantum circuits of each of the multiple layers and a training data set. The computer generates a trained machine learning model by setting the parameter values in the generating function. [Effects of the Invention]
[0013] According to one aspect, machine learning using quantum computers can be made more efficient. [Brief explanation of the drawings]
[0014] [Figure 1] FIG. 1 is a diagram illustrating a first quantum circuit. [Figure 2] FIG. 1 is a diagram illustrating a second quantum circuit. [Figure 3] FIG. 2 is a functional configuration diagram of the training device according to the embodiment. [Figure 4] 10 is a flowchart of a first training process. [Figure 5] FIG. 1 is a configuration diagram of a quantum computer system. [Figure 6] FIG. 1 illustrates an inference model to be trained. [Figure 7] FIG. 1 is a hardware configuration diagram of a quantum computer. [Figure 8] FIG. 2 is a functional configuration diagram of a server. [Figure 9]10 is a flowchart of a second training process. [Figure 10] 10 is a flowchart of an inference process. [Figure 11] FIG. 10 is a diagram illustrating a third quantum circuit. [Figure 12] FIG. 10 is a diagram showing a fourth quantum circuit. [Figure 13] FIG. 1 illustrates a first fixed quantum circuit. [Figure 14] FIG. 2 illustrates a second fixed quantum circuit. [Figure 15] FIG. 10 is a diagram showing a first simulation result. [Figure 16] FIG. 10 is a diagram showing a second simulation result. [Figure 17] FIG. 2 is a hardware configuration diagram of an information processing device. DETAILED DESCRIPTION OF THE INVENTION
[0015] Hereinafter, embodiments will be described in detail with reference to the drawings.
[0016] Fig. 1 shows an example of a first quantum circuit. The quantum circuit in Fig. 1 represents a combination of quantum gates that perform operations on N quantum bits q1 to qN (N is an integer equal to or greater than 1). Quantum gates 111 to 114 are quantum gates that change the state of one quantum bit. Quantum gates 121 to 124 are quantum gates that generate entanglement between two quantum bits.
[0017] Measurement 131-i (i = 1 to N) represents an operation of measuring the state of quantum bit qi and outputting the measurement value as classical information. The output measurement value is a logical value “0” or a logical value “1.”
[0018] Figure 2 shows an example of a second quantum circuit used in quantum machine learning. The quantum circuit in Figure 2 represents operations on N quantum bits q1 to qN, and includes a fixed quantum circuit 211 and a variational quantum circuit 212. The fixed quantum circuit 211 is a quantum circuit that does not include parameters, and the variational quantum circuit 212 is a quantum circuit that includes parameters. The procedure for quantum machine learning using the quantum circuit in Figure 2 is as follows.
[0019] (P1) A classical computer embeds information of input data into a fixed quantum circuit 211 to generate a quantum feature map (QFM) as described in Non-Patent Document 1 and the like.
[0020] (P2) The quantum computer sets N quantum bits to the initial state |0>, and then executes the operation represented by the fixed quantum circuit 211 including the QFM on the N quantum bits.
[0021] (P3) The quantum computer performs the operation represented by the variational quantum circuit 212 on the N quantum bits after the operation represented by the fixed quantum circuit 211 has been performed.
[0022] (P4) The quantum computer outputs measurement values of N quantum bits by executing measurements 213-1 to 213-N.
[0023] (P5) The classical computer adjusts the parameters of the variational quantum circuit 212 using the measurements output from the quantum computer.
[0024] By setting the parameters adjusted by quantum machine learning in the variational quantum circuit 212, a trained quantum circuit is generated and used for inference on unknown data. For example, if the inference on unknown data is image classification, the quantum computer outputs the image classification result as a measurement value.
[0025] The variational quantum algorithm (VQA) is known as a variational algorithm applied to quantum machine learning. VQA is one of the algorithms that utilizes a hybrid of quantum and classical computers.
[0026] VQA is attracting attention as an algorithm that utilizes the current noisy NISQ computers to solve problems that are difficult to calculate using classical computers. NISQ computers are medium-scale quantum computers that use tens to hundreds of qubits. The VQA procedure is as follows:
[0027] (P11) A classical computer inputs a variational quantum circuit containing parameters into a quantum computer.
[0028] (P12) A quantum computer performs a specific quantum computation that depends on parameters by executing the operations represented by a variational quantum circuit.
[0029] (P13) A quantum computer outputs a measurement by performing a measurement.
[0030] (P14) By evaluating the measurements output from the quantum computer, the classical computer generates new parameter values for searching for the minimum value of an objective function such as an energy function, and inputs these values into the quantum computer.
[0031] (P15) The quantum computer re-executes the operations and measurements represented by the variational quantum circuit using new parameter values.
[0032] Classical and quantum computers repeat the steps (P14) and (P15) to find the parameter values that correspond to the minimum value of the objective function.
[0033] In the procedure (P14), the classical computer calculates the gradient of the objective function using the difference of the objective function and updates the parameters based on the gradient. To calculate the difference of the objective function for a change in one parameter, quantum calculation and measurement are performed twice by the quantum computer.
[0034] When a variational quantum circuit contains multiple parameters, the computational load on the quantum computer to find the gradient of the objective function is on the order of the number of parameters, making it practically difficult to perform large-scale VQA that involves updating a large number of parameters.
[0035] The Barren Plateau, reported in Non-Patent Document 2, is a phenomenon in which the cost function becomes exponentially flatter with respect to the problem size during optimization. In the Barren Plateau scenario, the valley containing the global minimum of the cost function decreases exponentially with the problem size, forming a so-called narrow canyon.
[0036] As a result, traversing the cost function landscape during optimization requires accurately calculating the gradient, which decreases exponentially with problem size, and the computational resources used, such as the number of measurements, increase exponentially, potentially compromising the speedup of quantum computing.
[0037] Furthermore, as the number of quantum gates in a quantum circuit increases and the quantum circuit becomes deeper, the complexity of the states generated by the deep quantum circuit increases, and the quantum state approaches a random state. This causes the gradient to approach zero on average, making the Barren Plateau more likely to occur.
[0038] Thus, in VQA, the computation time for quantum machine learning increases as the depth of the quantum circuit and the number of parameters increase.
[0039] 3 shows an example of the functional configuration of a training device according to an embodiment. A training device 301 in FIG.
[0040] Figure 4 is a flowchart showing an example of a first training process performed by the training device 301 in Figure 3. First, the acquisition unit 311 acquires a training data set for the machine learning model (step 401). The machine learning model includes quantum circuits for each of multiple layers and a generation function that generates an input for a second quantum circuit in a subsequent layer based on the output of a first quantum circuit in the previous layer of two consecutive layers.
[0041] Next, the training unit 312 determines the values of the parameters included in the generating function by training the machine learning model using a quantum computer that executes calculations of the quantum circuits of each of the multiple layers and a training data set (step 402).The training unit 312 then generates a trained machine learning model by setting the parameter values in the generating function (step 403).
[0042] The training device 301 in FIG. 3 can improve the efficiency of machine learning using a quantum computer.
[0043] Fig. 5 shows an example configuration of a quantum computer system including the training device 301 of Fig. 3. The quantum computer system of Fig. 5 includes a quantum computer 501 and a server 502. The quantum computer 501 and the server 502 are hardware. The server 502 is a classical computer. The server 502 corresponds to the training device 301 of Fig. 3.
[0044] The server 502 communicates with the quantum computer 501 via a communication line 503. The server 502 stores an inference model to be trained, and generates a trained inference model by executing machine learning to train the inference model using the quantum computer 501. The inference model is an example of a machine learning model.
[0045] The inference model to be trained includes L layers, layer 1 to layer L (L is an integer equal to or greater than 1), a reinforcement function A0, and reinforcement functions A1 to AL. Each layer j (j=1 to L) includes a quantum circuit. For example, a quantum circuit having a structure as shown in FIG. 2 is used as the quantum circuit for each layer j. In this case, it is preferable to use a relatively shallow quantum circuit for each layer j.
[0046] The reinforcement function A0 generates input for the quantum circuit of layer 1 from the input data of the inference model. The reinforcement function Aj (j = 1 to L-1) generates input for the quantum circuit of layer j+1 from the output of the quantum circuit of layer j. The reinforcement function AL generates output data for the inference model from the output of the quantum circuit of layer L-1.
[0047] By using a deep-structure inference model with a large number of layers, L, it is possible to obtain highly accurate inference results for problems that are difficult to calculate using classical computers. For example, in the case of drug discovery or material development, physical quantities such as molecular ground states and electron positions can be obtained as inference results. Deep-structure inference models can also be applied to other problems, such as the simulation of quantum systems.
[0048] Fig. 6 shows an example of an inference model to be trained. The inference model in Fig. 6 includes layers 1 to 3 and reinforcement functions A0 to A3. In this example, L=3.
[0049] Layer 1 includes quantum circuit 611, layer 2 includes quantum circuit 612, and layer 3 includes quantum circuit 613. Quantum circuit 611 represents operations on three qubits, quantum circuit 612 represents operations on four qubits, and quantum circuit 613 represents operations on two qubits.
[0050] Data g0, which corresponds to the input data of the inference model, is a five-dimensional vector. Data h0 and data g1 are three-dimensional vectors. Data h1 and data g2 are four-dimensional vectors. Data h2 and data g3 are two-dimensional vectors. Data h3 is a two-dimensional vector.
[0051] The reinforcement function A0 generates data h0 from data g0. The quantum circuit 611 generates data g1 from data h0. The reinforcement function A1 generates data h1 from data g1.
[0052] Quantum circuit 612 generates data g2 from data h1. Reinforcement function A2 generates data h2 from data g2. Quantum circuit 613 generates data g3 from data h2. Reinforcement function A3 generates data h3 from data g3. Data h3 is output as output data of the inference model.
[0053] Reinforcement function A1 connects quantum circuit 611 in layer 1 and quantum circuit 612 in layer 2. Reinforcement function A2 connects quantum circuit 612 in layer 2 and quantum circuit 613 in layer 3.
[0054] Data gj (j=1 to L) represents a measurement value generated by the quantum computer 501 executing the operation represented by the quantum circuit of layer j, and is described by the following equation.
[0055] gj=fj(h(j-1),θj) (1)
[0056] fj(h(j-1),θj) represents a function that generates measurements of the quantum circuit of layer j. Data gj is a d(gj)-dimensional vector, data h(j-1) is a d(h(j-1))-dimensional vector, and parameter θj is a d(θj)-dimensional vector. d(gj), d(h(j-1)), and d(θj) are integers greater than or equal to 1. d(gj) corresponds to the number of quantum bits operated using the quantum circuit of layer j.
[0057] The server 502 generates a QFM by embedding data h(j-1) in the fixed quantum circuit 211 of Fig. 2. Each element of the parameter θj corresponds to a parameter included in the variational quantum circuit 212 of Fig. 2. The variational quantum circuit 212 can change the measurement bases used in measurements 213-1 to 213-N by rotating a random single quantum bit according to the parameter θj.
[0058] The data hj (j=0 to L) is described by the following equation using the reinforcement function Aj.
[0059] hj=Aj(gj,Wj) (2)
[0060] Data hj is a d(hj)-dimensional vector, data gj is a d(gj)-dimensional vector, and weight Wj is a d(gj) × d(hj) matrix. For example, the following function is used as the reinforcement function Aj(gj,Wj).
[0061] Aj(gj,Wj)=gjWj (3) Aj(gj,Wj)=2πσ(-gjWj)-πv (4) σ(-gjWj)(d)=1 / (1+exp(-gjWj(d))) (5)
[0062] Equation (3) represents linear reinforcement. Equation (4) represents a combination of linear reinforcement and nonlinear normalization. In equations (3) and (4), gjWj represents an operation to weight multiple values contained in data gj using weight Wj. In equation (4), σ(-gjWj) represents a d(hj)-dimensional vector, and v represents a d(hj)-dimensional vector in which all elements are 1.
[0063] In equation (5), σ(-gjWj)(d) represents the d-th element (d = 1 to d(hj)) of σ(-gjWj). exp() represents the exponential function, and -gjWj(d) represents the d-th element of -gjWj.
[0064] By connecting the quantum circuit of layer j and the quantum circuit of layer j+1 via the reinforcement function Aj(gj,Wj) of equation (3) or equation (4), it becomes possible to train the inference model via the weight Wj without updating the parameters contained in each quantum circuit.
[0065] By using the reinforcement function Aj(gj,Wj), the number of dimensions of data gj can also be increased or decreased. For example, the reinforcement function A0 in Figure 6 decreases the number of dimensions of data g0, and the reinforcement function A1 increases the number of dimensions of data g1. By connecting multiple shallow quantum circuits in layer j via the reinforcement function Aj(gj,Wj), it is possible to construct an inference model with a deep structure and high expressive power.
[0066] Layer j and layer j+1 (j = 1 to L-1) are an example of two consecutive layers. The quantum circuit of layer j is an example of a first quantum circuit of a previous layer, and the quantum circuit of layer j+1 is an example of a second quantum circuit of a subsequent layer. The reinforcement function Aj(gj,Wj) is an example of a generating function that generates an input for the second quantum circuit of a subsequent layer based on the output of the first quantum circuit of the previous layer. The weight Wj is an example of a parameter included in the generating function.
[0067] In the training process for training the inference model to be trained, the server 502 uses the training data as data g0 to generate data h0 using the reinforcement function A0(g0,W0), and generates a QFM by embedding information about the data h0 in the fixed quantum circuit 211. Then, the server 502 transmits information about the quantum circuit of layer 1, including the generated QFM, to the quantum computer 501.
[0068] The quantum computer 501 sets multiple quantum bits to the initial state |0>, and then performs the operation represented by the quantum circuit of layer 1 to obtain the measurement value of each quantum bit. The quantum computer 501 then transmits the obtained measurement value of each quantum bit to the server 502.
[0069] Next, the server 502 uses the received measurements of the multiple quantum bits as data g1 to generate data h1 using the reinforcement function A1(g1, W1).
[0070] The server 502 evaluates data h1 generated from each of the multiple training data, and updates the weight W1 of the reinforcement function A1(g1,W1) based on the evaluation results. The server 502 obtains an optimized weight W1 by repeating this update process. Then, the server 502 generates data h1 from data g1 generated using each training data, using the reinforcement function A1(g1,W1) including the optimized weight W1.
[0071] Next, the server 502 generates a QFM by embedding information about the generated data h1 in the fixed quantum circuit 211. Then, the server 502 transmits information about the quantum circuit of layer 2, including the generated QFM, to the quantum computer 501.
[0072] The quantum computer 501 obtains the measurement values of the quantum circuit in layer 2 in the same manner as the quantum circuit in layer 1 and transmits them to the server 502.
[0073] Next, the server 502 uses the received measurement value as data g2 to generate data h2 using the reinforcement function A2(g2, W2).
[0074] The server 502 evaluates data h2 generated from each of the multiple training data sets and updates the weight W2 of the reinforcement function A2(g2,W2) based on the evaluation results. The server 502 obtains an optimized weight W2 by repeating this update process. Then, the server 502 generates data h2 from each data g2 using A2(g2,W2) including the optimized weight W2.
[0075] Next, the server 502 optimizes the weights W3 to WL by performing the same processing as for layer 2 on layers 3 to L. Then, the server 502 generates a trained inference model by setting the optimized weights Wj (j = 1 to L) to the reinforcement functions Aj (gj, Wj).
[0076] Figure 7 shows an example of the hardware configuration of the quantum computer 501 in Figure 5. The quantum computer 501 in Figure 7 includes a communication interface 711, a control device 712, and a quantum system 713. These components are hardware.
[0077] The communication interface 711 is a communication circuit that is connected to the communication line 503 and performs data conversion associated with communication. The quantum system 713 includes a quantum device that realizes a plurality of quantum bits.
[0078] The communication interface 711 receives quantum circuit information from the server 502 and outputs it to the control device 712. The control device 712 generates a control signal using the quantum circuit information and outputs it to the quantum system 713.
[0079] The quantum system 713 operates the quantum bits in accordance with the control signal to determine the measurement value of each quantum bit. The control device 712 then transmits the measurement value of each quantum bit determined by the quantum system 713 to the server 502 via the communication interface 711.
[0080] Fig. 8 shows an example of the functional configuration of the server 502 in Fig. 5. The server 502 in Fig. 8 includes a communication unit 811, an acquisition unit 812, a training unit 813, an inference unit 814, an output unit 815, and a storage unit 816. The acquisition unit 812 and the training unit 813 correspond to the acquisition unit 311 and the training unit 312 in Fig. 3, respectively.
[0081] The communication unit 811 communicates with the quantum computer 501 via the communication line 503. The communication unit 811 can also communicate with a database server (not shown) or the like via the communication line 503. The storage unit 816 stores an inference model 821 to be trained.
[0082] The acquiring unit 812 acquires a training data set 822 including a plurality of training data from a database server or the like via the communication unit 811, and stores the training data set 822 in the storage unit 816. The acquiring unit 812 may acquire the training data set 822 input by a user via a user interface or a portable recording medium.
[0083] The training unit 813 communicates with the quantum computer 501 via the communication unit 811 and trains the inference model 821 using the training data set 822 to generate a trained inference model 823 and store it in the memory unit 816.
[0084] The training unit 813 trains the inference model 821 by, for example, contrastive learning. When contrastive learning is employed, the training unit 813 generates a combination of positive example data xp and negative example data xn from the training data set 822. For example, the positive example data xp is generated by adding a correct label to known data, and the negative example data xn is generated by adding an incorrect label to the same data as the positive example data xp.
[0085] The training unit 813 uses a cost function C(hpj,hnj) as shown in the following equation, which utilizes noise contrast estimation, as an evaluation function for contrastive learning of the weights Wj (j=0 to L).
[0086] C(hpj,hnj) =log(1+exp(D(hpj,hnj) / τ)) (6) D(hpj,hnj) =sim(hnj,pj)-sim(hpj,pj) (7) sim(a,b)=(a b) / (n(a)n(b)) (8)
[0087] hp0 represents data h0 generated from positive example data xp using the reinforcement function A0(g0,W0) when positive example data xp is input to the inference model 821. hn0 represents data h0 generated from negative example data xn using the reinforcement function A0(g0,W0) when negative example data xn is input to the inference model 821.
[0088] hpj (j = 1 to L) represents data hj generated from data gj of layer j using the reinforcement function Aj (gj, Wj) when positive example data xp is input to the inference model 821. hnj (j = 1 to L) represents data hj generated from data gj of layer j using the reinforcement function Aj (gj, Wj) when negative example data xn is input to the inference model 821. Data hpj (j = 1 to L-1) is an example of first data, and data hnj (j = 1 to L-1) is an example of second data.
[0089] In equation (6), τ is a scale adjustment parameter. In equation (7), pj represents the anchor vector used to evaluate data hj. The anchor vector pj is a d(hj)-dimensional random vector. In equation (7), sim(a,b) represents the similarity between vector a and vector b. a·b represents the dot product of vector a and vector b, n(a) represents the norm of vector a, and n(b) represents the norm of vector b.
[0090] In training the inference model 821, the training unit 813 suppresses updating of the parameter θj included in the quantum circuit of each layer j. This eliminates the need for the quantum computer 501 to repeatedly perform quantum calculations to train the parameter θj, thereby reducing the calculation time required to train the inference model 821.
[0091] The training unit 813 optimizes the weights Wj by determining the weights Wj that minimize the value of the cost function C(hpj,hnj) for each reinforcement function Aj(gj,Wj). By minimizing the cost function C(hpj,hnj), D(hpj,hnj) in equation (7) is minimized. The range of values that sim(hpj,pj) and sim(hnj,pj) can take is expressed by the following equation.
[0092] -1≦sim(hpj,pj)≦1 (9) -1≦sim(hnj,pj)≦1 (10)
[0093] Therefore, by minimizing the cost function C(hpj,hnj), the weights Wj are trained so that sim(hpj,pj) is as close to 1 as possible and sim(hnj,pj) is as close to -1 as possible. This allows the weights Wj that distinguish between the data hpj and the data hnj to be found. The training algorithm for the inference model 821 can be described as follows:
[0094] For e=1,...,NE For j=0,1,...,L Selecting a training batch from the training dataset Generate a combination of positive data xp and negative data xn from the training batch. Generate data gpj and data gnj Repeat the following until the cost function C(hpj,hnj) converges. hpj=Aj(gpj,Wj) hnj=Aj(gnj,Wj) Calculate the cost function C(hpj,hnj) Update the weights Wj using the gradient method
[0095] e represents the training epoch, and NE represents the number of epochs. NE is an integer equal to or greater than 1. When j=0, gp0=xp, and gn0=xn. When j=1 to L, data gpj and data gnj are generated as follows.
[0096] The training unit 813 generates a QFM by embedding information about the data hp(j-1) generated using the optimized weight W(j-1) into the fixed quantum circuit 211. Then, the training unit 813 transmits information about the quantum circuit of layer j, including the generated QFM, to the quantum computer 501 via the communication unit 811.
[0097] The quantum computer 501 executes the operation represented by the quantum circuit of layer j on the multiple quantum bits to determine the measurement value of each quantum bit and transmits the measurement value to the server 502. The training unit 813 receives the measurement values of the multiple quantum bits via the communication unit 811 and sets the received measurement values to data gpj.
[0098] Next, the training unit 813 generates a QFM by embedding information about the data hn(j-1) generated using the optimized weight W(j-1) into the fixed quantum circuit 211. Then, the training unit 813 transmits information about the quantum circuit of layer j, including the generated QFM, to the quantum computer 501 via the communication unit 811.
[0099] The quantum computer 501 executes the operations represented by the quantum circuit of layer j on the multiple quantum bits to determine the measurement values of each quantum bit and transmits them to the server 502. The training unit 813 receives the measurement values of the multiple quantum bits via the communication unit 811 and sets the received measurement values to data gnj.
[0100] Fig. 9 is a flowchart showing an example of the second training process performed by the server 502 in Fig. 8. First, the training unit 813 initializes the weights W0 to WL (step 901), sets the control variable e to 1 (step 902), and sets the control variable j to 0 (step 903).
[0101] Next, the training unit 813 selects a training batch from the training data set 822 and generates a combination of positive example data xp and negative example data xn from the training batch. Then, the training unit 813 sets the positive example data xp and negative example data xn to data gp0 and data gn0, respectively (step 904).
[0102] Next, the training unit 813 generates data hpj and data hnj according to the following equation (step 905).
[0103] hpj=Aj(gpj,Wj) (11) hnj=Aj(gnj,Wj) (12)
[0104] Next, the training unit 813 calculates the cost function C(hpj, hnj) using the data hpj and the data hnj (step 906), and checks whether the cost function C(hpj, hnj) has converged (step 907).
[0105] If the weights Wj used in generating the data hpj and hnj in step 905 are initial values, it is determined that the cost function C(hpj, hnj) has not converged.
[0106] If the cost function C(hpj, hnj) has not converged (step 907, NO), the training unit 813 updates the weights Wj using the gradient method (step 911) and repeats the processing from step 905 onwards.
[0107] In step 907, if the change in the cost function C(hpj,hnj) due to the update of the weight Wj is equal to or greater than a threshold, it is determined that the cost function C(hpj,hnj) has not converged. If the change in the cost function C(hpj,hnj) due to the update of the weight Wj is smaller than a threshold, it is determined that the cost function C(hpj,hnj) has converged.
[0108] If the cost function C(hpj,hnj) has converged (step 907, YES), the training unit 813 compares j with L (step 908). If j is less than L (step 908, NO), the training unit 813 increments j by 1 (step 912).
[0109] Next, the training unit 813 generates data gpj and data gnj from data hp(j-1) and data hn(j-1) generated using weight W(j-1) using the quantum computer 501 (step 913). Then, the training unit 813 repeats the processes from step 905 onwards.
[0110] If j reaches L (step 908, YES), the training unit 813 compares e with NE (step 909). If e is less than NE (step 909, NO), the training unit 813 increments e by 1 (step 914) and repeats the processing from step 903 onwards.
[0111] If e reaches NE (step 909, YES), the training unit 813 generates a trained inference model 823 by setting the weights W0 to WL to the inference model 821 (step 910).
[0112] 5, a deep-structured inference model 821 is constructed by connecting multiple quantum circuits in layer j by reinforcement functions Aj(gj,Wj). By training the weights Wj of each reinforcement function Aj(gj,Wj) using a quantum computer 501, a trained inference model 823 can be efficiently generated.
[0113] In training the inference model 821, if not only the weight Wj of each reinforcement function Aj(gj,Wj) but also the parameter θj included in the quantum circuit of each layer j is optimized, the number of calculations of the quantum circuit using the quantum computer 501 will be on the order of NE × NP, where NP represents the total number of parameters including the weight Wj and the parameter θj.
[0114] On the other hand, when optimizing the parameter θj and optimizing the weight Wj by contrastive learning, the number of calculations of the quantum circuit using the quantum computer 501 does not depend on NP, but is NE × L 2 Therefore, NP≫L 2In this case, the number of calculations can be significantly reduced, making it easier to use an inference model 821 with a large number of layers L.
[0115] Reducing the number of calculations of the quantum circuit using the quantum computer 501 reduces the frequency of use of the computational resources of the quantum computer 501, thereby reducing the computation time required to train the inference model 821. This makes it possible to shorten the time required to start services using the trained inference model 823 in various fields such as drug discovery, material development, and quantum system simulation.
[0116] The inference unit 814 generates an inference result by performing inference on the data s to be inferred using the generated inference model 823, and the output unit 815 outputs the inference result. For example, when the inference model 823 is used to classify the data s, the inference algorithm using the inference model 823 can be written as follows:
[0117] For k=1,...,K x=Combine(s,yk) Gk=0 For j=0,1,...,L Generate data gj hj=Aj(gj,Wj) Gk+=sim(hj,pj) ys=yk0 such that Gk0=maxGk
[0118] yk (k=1 to K) represents the kth classification label out of K classification labels (K is an integer equal to or greater than 2). x=Combine(s, yk) represents the process of adding classification label yk to data s to generate data x.
[0119] Gk is an index indicating the likelihood that the classification result of data s is classification label yk. Gk+=sim(hj,pj) represents the process of adding sim(hj,pj) to Gk. The anchor vector pj is the same as the anchor vector pj used to evaluate data hj in the training process that generates inference model 823. Therefore, sim(hj,pj) indicates the likelihood that data x used to generate data hj is positive example data.
[0120] ys represents the classification label of the inference result for data s, and yk0 represents the k0th classification label among classification labels y1 to yK, which corresponds to the maximum value Gk0 of G1 to GK. When the maximum value of G1 to GK is Gk0, the classification result of data s is most likely to be classification label yk0.
[0121] Fig. 10 is a flowchart showing an example of inference processing performed by the server 502 in Fig. 8. First, the inference unit 814 sets 0 to G1 to GK (step 1001) and sets 1 to the control variable k (step 1002). Then, the inference unit 814 adds a classification label yk to the data s to generate data x (step 1003).
[0122] Next, the inference unit 814 sets the control variable j to 0 (step 1004) and sets the data x to the data g0 (step 1005).Then, the inference unit 814 generates the data hj of the inference model 823 using equation (2) (step 1006).
[0123] Next, the inference unit 814 updates Gk by calculating sim(hj, pj) and adding it to Gk (step 1007), and compares j with L (step 1008). If j is less than L (step 1008, NO), the inference unit 814 increments j by 1 (step 1012).
[0124] Next, the inference unit 814 generates data gj of the inference model 823 from the data h(j-1) using the quantum computer 501 (step 1013). Then, the training unit 813 repeats the processes from step 1006 onwards.
[0125] If j reaches L (step 1008, YES), the inference unit 814 compares k with K (step 1009). If k is less than K (step 1009, NO), the inference unit 814 increments k by 1 (step 1014) and repeats the processing from step 1003 onwards.
[0126] If k reaches K (step 1009, YES), the inference unit 814 sets the k0th classification label yk0, among the classification labels y1 to yK, corresponding to the maximum value Gk0 of G1 to GK, as the classification label ys (step 1010).Then, the output unit 815 outputs the classification label ys as the inference result (step 1011).
[0127] 2 is used as the quantum circuit of each layer j, the quantum computer 501 measures the states of multiple qubits using one type of measurement basis. However, Non-Patent Document 3 shows that measurements using different types of measurement bases lead to the separation of quantum generation models and classical generation models. Therefore, performing measurements using different types of measurement bases may improve the inference performance of the inference model 823.
[0128] Fig. 11 shows an example of a third quantum circuit that performs measurements using multiple types of measurement bases. The quantum circuit in Fig. 11 represents an operation on N quantum bits and includes a fixed quantum circuit 211 and N × M (M is an integer equal to or greater than 1) RX1111-im (i = 1 to N, m = 1 to M). The quantum circuit in Fig. 11 is used as the quantum circuit of each layer j of the inference model 821 and the inference model 823.
[0129] RX1111-im rotates a random single quantum bit according to the parameter θ(i,m). The N × M parameters θ(i,m) correspond to the parameter θj.
[0130] The quantum computer 501 measures the state of the quantum bit qi using the computational basis by performing measurements 1112-im (m = 0 to M). By measuring the state after the operation represented by the fixed quantum circuit 211 is executed using the computational basis via RX 1111-im, the measurement basis used in the measurements 1112-im (m = 1 to M) is changed to a measurement basis different from that of the measurement 1112-i-0.
[0131] The N×(M+1) measurement values g(i,m) obtained by the measurement 1112-im are used as elements of the data gj. Therefore, d(gj)=N×(M+1). By combining measurements taken using multiple types of measurement bases to generate the data gj, the robustness of the inference model 823 is increased, and the inference performance is improved.
[0132] An unknown quantum state can be fully characterized by quantum state tomography. However, this method uses exact expectation values of observables that grow exponentially with increasing qubits. The classical shadow approximation described in [4] may circumvent this scaling issue. The shadow approximation is an efficient protocol for constructing a classical shadow representation of an unknown quantum state.
[0133] Fig. 12 shows an example of a fourth quantum circuit using shadow approximation. The quantum circuit in Fig. 12 represents an operation on N quantum bits and includes a fixed quantum circuit 211 and Um1 211. The quantum circuit in Fig. 12 is used as the quantum circuit of each layer j of the inference model 821 and the inference model 823.
[0134] Um1211 includes a parameter θj and performs a random unitary rotation on N quantum bits according to the parameter θj. The unitary rotation of Um1211 may be an independent single-qubit Clifford rotation. The quantum computer 501 measures the states of the N quantum bits using a computational basis by performing measurements 1212-1 to 1212-N.
[0135] The training unit 813 and the inference unit 814 randomly set the parameter θj for each measurement shot m (m = 1 to M) to obtain the measurement value b(i, m) of the quantum bit qi (i = 1 to N) from the quantum computer 501. In this case, the measurement value b(i, m) differs for each measurement shot m.
[0136] The N×M measurement values b(i,m) obtained by M measurements 1212-i are used as elements of data gj. Therefore, d(gj)=N×M. By applying a random unitary rotation for each measurement shot m to the state after the operation represented by the fixed quantum circuit 211 is executed, data gj with high expressive power can be generated with a small number of measurements. This allows stable contrastive learning of the deep structure inference model 821.
[0137] Next, a specific example of a simulation using the quantum computer system of FIG. 5 will be described with reference to FIGS. 13 to 16. In this simulation, 5,000 images of clothing are used as training data, and an inference model 823 is generated that classifies images of clothing to be classified into one of 10 categories. Grayscale images of 28×28 pixels are used as the clothing images. In this case, each image is represented by a 784-dimensional vector s.
[0138] The training unit 813 generates a vector scut with slightly fewer elements than 784 by deleting elements that correspond to part of the background from the elements of the vector s of the training data. Then, the training unit 813 generates 784-dimensional positive example data xp by adding a correct answer label to the vector scut, and generates 784-dimensional negative example data xn by adding an incorrect answer label to the vector scut.
[0139] 13 shows an example of a first fixed quantum circuit. The fixed quantum circuit 211 included in the quantum circuit of each layer j of the inference model 821 is constructed using the fixed quantum circuit 1301 of FIG.
[0140] In this example, the dimension d(h(j-1)) of the data h(j-1) embedded in the fixed quantum circuit 211 is a multiple of 16, and the dimension of the vector embedded in the fixed quantum circuit 1301 is 16. Therefore, to embed the data h(j-1), d(h(j-1)) / 16 fixed quantum circuits 1301 are used as the fixed quantum circuits 211.
[0141] In Rr (r=1 to 16), the r-th element of the elements of the 16-dimensional vector embedded in the fixed quantum circuit 1301 is embedded. The operation of Rr (r=1 to 4, 13 to 16) is described by the following equation using the element h embedded in Rr.
[0142]
number
[0143] The operation of Rr (r=5 to 8) is described by the following equation using the element h embedded in Rr.
[0144]
number
[0145] The operation of Rr (r=9 to 12) is described by the following equation using the element h embedded in Rr.
[0146]
number
[0147] After performing the operation represented by the fixed quantum circuit 1301, when the states of the four quantum bits are measured using the computational basis, four measured values g(i) (i=1 to 4) as shown in the following equation are obtained.
[0148]
number
[0149] In equations (16) to (19), ρ is a 16 × 16-dimensional density matrix that represents the output state obtained by integrating the states of the four quantum bits. The multiplication of Z and I and the multiplication of I and I represent the Kronecker product, and Tr[ ] represents the trace of the matrix.
[0150] After performing the operation represented by fixed quantum circuit 1301, if the states of four quantum bits are measured using four types of measurement bases by the measurement method shown in FIG. 11, 16 measurement values are obtained.
[0151] 14 shows an example of a second fixed quantum circuit. The fixed quantum circuit 211 included in the quantum circuit of each layer j of the inference model 821 is constructed using the fixed quantum circuit 1401 of FIG.
[0152] In this example, the dimension d(h(j-1)) of the data h(j-1) embedded in the fixed quantum circuit 211 is a multiple of 16, and the dimension of the vector embedded in the fixed quantum circuit 1401 is 16. Therefore, to embed the data h(j-1), d(h(j-1)) / 16 fixed quantum circuits 1401 are used as the fixed quantum circuits 211.
[0153] H represents a Hadamard gate. In Pr (r=1 to 16), the r-th element of the 16-dimensional vector embedded in the fixed quantum circuit 1401 is embedded. The operation of Pr is described by equation (15) using the element h embedded in Pr.
[0154] In Qr (r=1 to 6), the product of any two elements of the 16-dimensional vector embedded in the fixed quantum circuit 1401 is embedded. In Q1, the product of the first and second elements is embedded, in Q2, the product of the second and third elements is embedded, and in Q3, the product of the third and fourth elements is embedded. In Q4, the product of the first and third elements is embedded, in Q5, the product of the first and fourth elements is embedded, and in Q6, the product of the second and fourth elements is embedded.
[0155] In Sr (r=1 to 6), the product of any two elements of the 16-dimensional vector embedded in the fixed quantum circuit 1401 is also embedded. In S1, the product of the fifth and sixth elements is embedded, in S2, the product of the sixth and seventh elements is embedded, and in S3, the product of the seventh and eighth elements is embedded. In S4, the product of the fifth and seventh elements is embedded, in S5, the product of the fifth and eighth elements is embedded, and in S6, the product of the sixth and eighth elements is embedded.
[0156] Tr (r=1 to 6) also has the product of any two elements of the 16-dimensional vector embedded in the fixed quantum circuit 1401 embedded. The product of the 9th and 10th elements is embedded in T1, the product of the 10th and 11th elements is embedded in T2, and the product of the 11th and 12th elements is embedded in T3. The product of the 9th and 11th elements is embedded in T4, the product of the 9th and 12th elements is embedded in T5, and the product of the 10th and 12th elements is embedded in T6.
[0157] Ur (r=1 to 6) also has the product of any two elements of the 16-dimensional vector embedded in the fixed quantum circuit 1401 embedded. U1 has the product of the 13th and 14th elements embedded, U2 has the product of the 14th and 15th elements embedded, and U3 has the product of the 15th and 16th elements embedded. U4 has the product of the 13th and 15th elements embedded, U5 has the product of the 13th and 16th elements embedded, and U6 has the product of the 14th and 16th elements embedded.
[0158] The operations on Qr, Sr, Tr, and Ur are described by the following equations using the product p of two elements to be embedded:
[0159]
number
[0160] After performing the operation represented by fixed quantum circuit 1401, measuring the states of the four quantum bits using a computational basis results in four measurement values, and measuring the states of the four quantum bits using four types of measurement bases using the measurement method shown in Figure 11 results in 16 measurement values.
[0161] When d(h(j-1)) / 16 fixed quantum circuits 1301 or 1401 are used as the fixed quantum circuits 211, d(h(j-1)) / 4 measurement values are obtained in measurements using the computational bases. Also, d(h(j-1)) measurement values are obtained in measurements using four types of measurement bases.
[0162] 15 shows an example of the first simulation result. In this example, inference models M1 to M4 are used as inference models 821 and 823, and five different numbers of layers, L=1 to 5, are used for each inference model.
[0163] The inference model M1 includes a reinforcement function Aj(gj,Wj) of equation (3) and a fixed quantum circuit 1301 of Figure 13. The inference model M2 includes a reinforcement function Aj(gj,Wj) of equation (3) and a fixed quantum circuit 1401 of Figure 14. Equation (3) represents linear reinforcement.
[0164] The inference model M3 includes a reinforcement function Aj(gj,Wj) of equation (4) and a fixed quantum circuit 1301 of FIG. 13. The inference model M4 includes a reinforcement function Aj(gj,Wj) of equation (4) and a fixed quantum circuit 1401 of FIG. 14. Equation (4) represents a combination of linear reinforcement and nonlinear normalization. In each of the inference models M1 to M4, measurements are performed using one type of measurement basis.
[0165] Each value in Figure 15 represents the average and standard deviation of the inference accuracy (%) of the classification results by inference model 823. To calculate the inference accuracy, 10,000 clothing images were used as test data. For example, the average inference accuracy of inference model M1 with L=1 is 76.48%, and the standard deviation is 2.70%.
[0166] When L = 1 to 4, inference model M3 has the highest inference accuracy among inference models M1 to M4. However, when L = 5, training of weight W5 becomes unstable, and the inference accuracy of inference model M3 is lower than that of inference models M1 and M2.
[0167] 16 shows an example of the second simulation result. In this example, inference models M11 to M14 are used as inference models 821 and 823, and five different numbers of layers, L=1 to 5, are used for each inference model.
[0168] The inference model M11 includes a reinforcement function Aj(gj,Wj) of equation (3) and a fixed quantum circuit 1301 of Fig. 13. The inference model M12 includes a reinforcement function Aj(gj,Wj) of equation (3) and a fixed quantum circuit 1401 of Fig. 14.
[0169] The inference model M13 includes a reinforcement function Aj(gj,Wj) of equation (4) and a fixed quantum circuit 1301 of Figure 13. The inference model M14 includes a reinforcement function Aj(gj,Wj) of equation (4) and a fixed quantum circuit 1401 of Figure 14. In each of the inference models M11 to M14, measurements are performed using four types of measurement bases.
[0170] As in the case of Figure 15, the numerical values in Figure 16 represent the average and standard deviation of the inference accuracy (%) of the classification results by inference model 823. When measurements using four types of measurement bases are used, training of weight W5 is stable even when L = 5. Therefore, in all cases where L = 1 to 5, the inference accuracy of inference model M13 is the highest among inference models M11 to M14.
[0171] The simulation results of Figures 15 and 16 show that the inference accuracy of inference model 823 is improved by combining linear reinforcement and nonlinear normalization and employing measurements based on multiple types of measurement bases.
[0172] The configuration of the training device 301 in FIG. 3 is merely an example, and some of the components may be omitted or changed depending on the application or conditions of the training device 301.
[0173] The configuration of the quantum computer system in Figure 5 is merely an example, and some of the components may be omitted or changed depending on the application or conditions of the quantum computer system. The configuration of the quantum computer 501 in Figure 7 is merely an example, and some of the components may be omitted or changed depending on the application or conditions of the quantum computer system.
[0174] 8 is merely an example, and some of the components may be omitted or modified depending on the application or conditions of the quantum computer system. For example, if the inference process is performed by an external device, the inference unit 814 and the output unit 815 can be omitted.
[0175] 4, 9, and 10 are merely examples, and some processes may be omitted or modified depending on the configuration or conditions of the training device 301 or the quantum computer system. For example, if the inference process is performed by an external device, the inference process in FIG. 10 can be omitted.
[0176] The quantum circuits shown in Figures 1, 2, 11, and 12 are merely examples, and the structure of the quantum circuit varies depending on the application or conditions of inference model 823. Inference model 821 shown in Figure 6 is merely an example, and the structure of inference model 821 varies depending on the application or conditions of inference model 823. The fixed quantum circuits shown in Figures 13 and 14 are merely examples, and the structure of the fixed quantum circuit varies depending on the application or conditions of inference model 823.
[0177] The simulation results shown in Figures 15 and 16 are just examples, and the simulation results will vary depending on the structure of the inference model 821.
[0178] Equations (1) to (22) are merely examples, and the server 502 may perform the training process and the inference process using other equations.
[0179] Fig. 17 shows an example of the hardware configuration of an information processing device (computer) used as the training device 301 in Fig. 3 and the server 502 in Fig. 8. The information processing device in Fig. 17 includes a CPU (Central Processing Unit) 1701, a memory 1702, an input device 1703, an output device 1704, an auxiliary storage device 1705, a media drive device 1706, and a network connection device 1707. These components are hardware and are connected to each other via a bus 1708.
[0180] The memory 1702 is, for example, a semiconductor memory such as a read-only memory (ROM) or a random access memory (RAM), and stores programs and data used in processing. The memory 1702 may operate as the storage unit 816 in FIG.
[0181] The CPU 1701 (processor) operates as the acquisition unit 311 and training unit 312 in Fig. 3 by executing a program using the memory 1702. The CPU 1701 also operates as the acquisition unit 812, training unit 813, and inference unit 814 in Fig. 8 by executing a program using the memory 1702.
[0182] The input device 1703 is, for example, a keyboard, a pointing device, etc., and is used to input instructions or information from a user or operator. The output device 1704 is, for example, a display device, a printer, etc., and is used to output inquiries or instructions to a user or operator and processing results. The processing results may be inference results.
[0183] The auxiliary storage device 1705 is, for example, a magnetic disk device, an optical disk device, a magneto-optical disk device, a tape device, or the like. The auxiliary storage device 1705 may be a hard disk drive or a solid state drive (SSD). The information processing device stores programs and data in the auxiliary storage device 1705 and can use them by loading them into the memory 1702. The auxiliary storage device 1705 may operate as the storage unit 816 in FIG. 8.
[0184] The medium drive device 1706 drives the portable recording medium 1709 and accesses the recorded contents thereof. The portable recording medium 1709 is a memory device, a flexible disk, an optical disk, a magneto-optical disk, etc. The portable recording medium 1709 may be a CD-ROM (Compact Disk Read Only Memory), a DVD (Digital Versatile Disk), a USB (Universal Serial Bus) memory, etc. A user or operator can store programs and data in the portable recording medium 1709 and load them into the memory 1702 for use.
[0185] In this way, the computer-readable recording medium that stores the program and data used in the processing is a physical (non-transitory) recording medium such as the memory 1702, the auxiliary storage device 1705, or the portable recording medium 1709.
[0186] The network connection device 1707 is a communication circuit that is connected to the communication line 503 and performs data conversion associated with communication. The network connection device 1707 may operate as the communication unit 811 in Fig. 8. The information processing device can receive programs and data from external devices via the network connection device 1707 and load them into the memory 1702 for use.
[0187] 17, some components may be omitted depending on the application or conditions of the information processing device. For example, if an interface with a user or operator is not required, the input device 1703 and the output device 1704 may be omitted. If the portable recording medium 1709 is not used, the medium drive device 1706 may be omitted.
[0188] Although the disclosed embodiments and their advantages have been described in detail, those skilled in the art may make various modifications, additions, and omissions without departing from the scope of the invention as clearly set forth in the claims.
[0189] The following notes are further provided regarding the embodiment described with reference to FIGS. (Appendix 1) Obtain a training data set for a machine learning model including quantum circuits for each of a plurality of layers and a generation function that generates an input for a second quantum circuit in a subsequent layer based on an output of a first quantum circuit in a subsequent layer of two consecutive layers; determining values of parameters included in the generating function by training the machine learning model using a quantum computer that executes calculations of the quantum circuits of each of the plurality of layers and the training data set; generating a trained machine learning model by setting the values of the parameters to the generation function; A training program that allows a computer to perform a process. (Appendix 2) 2. The training program of claim 1, wherein the generating function includes an operation that weights a plurality of values included in the output of the first quantum circuit using the parameters as weights. (Appendix 3) 3. The training program according to claim 1, wherein the process of determining the parameter values includes a process of suppressing updates to parameters included in the quantum circuits of each of the plurality of layers. (Appendix 4) the quantum computer measures the state of a quantum bit used in the calculation of the first quantum circuit using each of a plurality of measurement bases to obtain a plurality of measurement values for the state of the quantum bit; 3. The training program of claim 1, wherein the output of the first quantum circuit includes the plurality of measurements. (Appendix 5) the quantum computer performs a plurality of measurements on the state of a qubit used in the calculation of the first quantum circuit, and in each of the plurality of measurements, obtains a measurement value of the qubit after applying a random unitary rotation to the state of the qubit; 3. The training program according to claim 1, wherein the output of the first quantum circuit includes a measurement value of the quantum bit obtained in each of the multiple measurements. (Appendix 6) The process of determining the value of the parameter includes: A process of generating positive example data and negative example data from the training data set; a process of training the machine learning model by contrastive learning that distinguishes between first data output from the generation function by inputting the positive example data into the machine learning model and second data output from the generation function by inputting the negative example data into the machine learning model; 3. The training program according to claim 1 or 2, comprising: (Appendix 7) an acquisition unit that acquires a training data set for a machine learning model, the training data set including quantum circuits for each of a plurality of layers and a generation function that generates an input for a second quantum circuit in a subsequent layer based on an output of a first quantum circuit in a subsequent layer of two consecutive layers; a training unit that trains the machine learning model using a quantum computer that executes calculations on the quantum circuits of each of the plurality of layers and the training data set, thereby determining values of parameters included in the generation function, and setting the values of the parameters to the generation function, thereby generating a trained machine learning model; A training device comprising: (Appendix 8) 8. The training device according to claim 7, wherein the generating function includes an operation that weights a plurality of values included in the output of the first quantum circuit using the parameters as weights. (Appendix 9) 9. The training device according to claim 7, wherein the training unit inhibits updating of parameters included in the quantum circuits of each of the plurality of layers. (Appendix 10) the quantum computer measures the state of a quantum bit used in the calculation of the first quantum circuit using each of a plurality of measurement bases to obtain a plurality of measurement values for the state of the quantum bit; 9. The training device of claim 7, wherein the output of the first quantum circuit includes the plurality of measurements. (Appendix 11) Obtain a training data set for a machine learning model including quantum circuits for each of a plurality of layers and a generation function that generates an input for a second quantum circuit in a subsequent layer based on an output of a first quantum circuit in a subsequent layer of two consecutive layers; determining values of parameters included in the generating function by training the machine learning model using a quantum computer that executes calculations of the quantum circuits of each of the plurality of layers and the training data set; generating a trained machine learning model by setting the values of the parameters to the generation function; A training method characterized in that the processing is performed by a computer. (Appendix 12) 12. The training method of claim 11, wherein the generating function includes an operation that weights a plurality of values included in the output of the first quantum circuit using the parameters as weights. (Appendix 13) 13. The training method according to claim 11, wherein the process of determining the parameter values includes a process of suppressing updates to parameters included in the quantum circuits of each of the plurality of layers. (Appendix 14) the quantum computer measures the state of a quantum bit used in the calculation of the first quantum circuit using each of a plurality of measurement bases to obtain a plurality of measurement values for the state of the quantum bit; 13. The training method of claim 11 or 12, wherein the output of the first quantum circuit includes the plurality of measurements. [Explanation of symbols]
[0190] 111~114, 121~124 Quantum gates 131-1~131-N, 213-1~213-N, 1112-1-0~1112-1-M, 1112-N-0~1112-NM, 1212-1~1212-N measurement 211, 1301, 1401 fixed quantum circuit 212 Variational Quantum Circuits 301 Training equipment 311, 812 Acquisition Department 312, 813 Training Department 501 Quantum Computer 502 Server 503 Communication Lines 611~613 Quantum circuit 711 Communication Interface 712 Control Device 713 Quantum Systems 811 Communications Department 814 Reasoning Department 815 Output section 816 Storage section 821, 823 Inference Model 822 training data set 1111-1-1~1111-1-M, 1111-N-1~1111-NM RX 1211 Um 1701 CPU 1702 memory 1703 Input Device 1704 Output Device 1705 Auxiliary storage device 1706 Media drive unit 1707 Network connection device 1708 Bus 1709 Portable recording media
Claims
1. acquiring a training data set for a machine learning model including quantum circuits for each of a plurality of layers and a generation function that generates an input for a second quantum circuit in a subsequent layer based on an output of a first quantum circuit in a subsequent layer of two consecutive layers; determining values of parameters included in the generating function by training the machine learning model using a quantum computer that executes calculations of the quantum circuits of each of the plurality of layers and the training data set; generating a trained machine learning model by setting the values of the parameters to the generation function; A training program that allows a computer to perform a process.
2. 2. The training program according to claim 1, wherein the generating function includes an operation for weighting a plurality of values included in the output of the first quantum circuit using the parameters as weights.
3. 3. The training program according to claim 1, wherein the process of determining the parameter values includes a process of suppressing updates to parameters included in the quantum circuits of each of the plurality of layers.
4. the quantum computer measures the state of a quantum bit used in the calculation of the first quantum circuit using each of a plurality of measurement bases to obtain a plurality of measurement values for the state of the quantum bit; 3. The training program of claim 1, wherein the output of the first quantum circuit includes the plurality of measurements.
5. the quantum computer performs a plurality of measurements on the state of a qubit used in the calculation of the first quantum circuit, and in each of the plurality of measurements, obtains a measurement value of the qubit after applying a random unitary rotation to the state of the qubit; 3. The training program according to claim 1, wherein the output of the first quantum circuit includes a measurement value of the quantum bit obtained in each of the plurality of measurements.
6. The process of determining the value of the parameter includes: A process of generating positive example data and negative example data from the training data set; a process of training the machine learning model by contrastive learning that distinguishes between first data output from the generation function by inputting the positive example data into the machine learning model and second data output from the generation function by inputting the negative example data into the machine learning model; 3. The training program according to claim 1, further comprising:
7. an acquisition unit that acquires a training data set for a machine learning model, the training data set including quantum circuits for each of a plurality of layers and a generation function that generates an input for a second quantum circuit in a subsequent layer based on an output of a first quantum circuit in a subsequent layer of two consecutive layers; a training unit that trains the machine learning model using a quantum computer that executes calculations on the quantum circuits of each of the plurality of layers and the training data set, thereby determining values of parameters included in the generation function, and setting the values of the parameters to the generation function, thereby generating a trained machine learning model; A training device comprising:
8. acquiring a training data set for a machine learning model including quantum circuits for each of a plurality of layers and a generation function that generates an input for a second quantum circuit in a subsequent layer based on an output of a first quantum circuit in a subsequent layer of two consecutive layers; determining values of parameters included in the generating function by training the machine learning model using a quantum computer that executes calculations of the quantum circuits of each of the plurality of layers and the training data set; generating a trained machine learning model by setting the values of the parameters to the generation function; A training method characterized in that the processing is performed by a computer.
Citation Information
Patent Citations
Data summarization for training machine learning model
JP2022176899A