Quantum-assisted learning systems and their operation methods
By generating classical feature values and training functions through a quantum-assisted learning system, the vanishing gradient problem and excessively long training time in quantum machine learning are solved, achieving efficient quantum computing training.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HON HAI PRECISION INDUSTRY CO LTD
- Filing Date
- 2022-09-14
- Publication Date
- 2026-06-30
AI Technical Summary
Existing quantum machine learning faces the vanishing gradient problem as the number of qubits and computational depth increase, and the training process requires frequent data uploads to cloud quantum computers, resulting in excessively long waiting times.
A quantum-assisted learning system is adopted, which generates classical eigenvalues through a quantum-assisted device and uses a eigenvalue learning processor to train the function, reducing the number of training iterations for the quantum gate parameters. Multiple classical eigenvalues are generated through a quantum circuit and a measurement circuit group to train the function, and the number of quantum circuits is adjusted to solve the gradient vanishing problem.
It effectively solves the gradient vanishing problem, reduces reliance on quantum computers, saves training time, and improves training efficiency.
Smart Images

Figure CN117252267B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to a quantum machine learning technique, and more particularly to a quantum-assisted learning system and a method for operating the quantum-assisted learning system. Background Technology
[0002] Quantum machine learning is trained by performing quantum operations on qubits using a quantum computer. Current quantum machine learning methods encounter the vanishing gradient problem as the number of qubits and the depth of quantum operations increase. Furthermore, training quantum gates requires repeatedly uploading data to a cloud-based quantum computer (such as IBMQ), consuming significant amounts of waiting time. Therefore, overcoming these problems is an important issue in this field. Summary of the Invention
[0003] This invention includes a quantum-assisted learning system. The quantum-assisted learning system includes a quantum-assisted device and a feature learning processor. The quantum-assisted device measures multiple qubits corresponding to a quantum signal to generate multiple classical eigenvalues and includes multiple quantum circuits for processing the quantum signal, wherein each quantum circuit performs the same quantum operation. The feature learning processor is coupled to the quantum-assisted device and is used to train a function based on the classical eigenvalues.
[0004] In some embodiments, the quantum circuit includes: a first quantum circuit for performing quantum operations on a first set of qubits of a quantum signal to generate a second set of qubits; a second quantum circuit for performing quantum operations on a third set of qubits of a quantum state to generate a fourth set of qubits; and a third quantum circuit, connected in series with the second quantum circuit, for performing quantum operations on the fourth set of qubits to generate a fifth set of qubits.
[0005] In some embodiments, the feature learning processor is coupled to the first quantum circuit and the third quantum circuit, and is used to train a function based on the first set of classical feature values corresponding to the second set of qubits in the classical feature values and the second set of classical feature values corresponding to the fifth set of qubits in the classical feature values.
[0006] In some embodiments, the quantum-assisted learning system further includes: a measurement circuit group coupled between the feature learning processor and the first quantum circuit, used to perform multiple measurements on the first qubit of the second group of qubits to generate a first classical feature value corresponding to the first qubit in the classical feature values, and used to perform multiple measurements on the second qubit of the fifth group of qubits to generate a second classical feature value corresponding to the second qubit in the classical feature values.
[0007] In some embodiments, the quantum circuit further includes: a fourth quantum circuit for performing quantum operations on a sixth group of qubits of the quantum signal to generate a seventh group of qubits; a fifth quantum circuit, connected in series with the fourth quantum circuit, for performing quantum operations on the seventh group of qubits to generate an eighth group of qubits; and a sixth quantum circuit, connected in series with the fifth quantum circuit, for performing quantum operations on the eighth group of qubits to generate a ninth group of qubits.
[0008] In some embodiments, the feature learning processor is also used to adjust the number of quantum circuits when the difference between the function and the target function is greater than a preset difference.
[0009] This invention includes a method for operating a quantum-assisted learning system. The method includes the following operations: determining the number of multiple quantum circuits in a quantum-assisted device based on a target function; generating multiple classical eigenvalues based on quantum signals using the quantum-assisted device; generating a first function based on the classical eigenvalues; and adjusting the number of quantum circuits based on the difference between the first function and the target function.
[0010] In some embodiments, generating classical eigenvalues includes: performing quantum operations on each of the quantum circuits for a corresponding rotation angle to generate a plurality of qubits; and performing multiple measurements on each of the qubits to generate classical eigenvalues.
[0011] In some embodiments, generating classical eigenvalues includes: performing quantum operations on a first set of qubits of a quantum signal to generate a second set of qubits; performing quantum operations on a third set of qubits of a quantum signal to generate a fourth set of qubits; performing quantum operations on the fourth set of qubits of a quantum signal to generate a fifth set of qubits; and performing multiple measurements on each of the second and fifth sets of qubits to generate at least a portion of the classical eigenvalues.
[0012] In some embodiments, adjusting the number of quantum circuits includes: when the difference is greater than a preset difference, in response to the number of quantum circuits being (1+((K-1)×K / 2)), adding (K+1) quantum circuits to the quantum auxiliary device, where K is a positive integer, and each of the (K+1) quantum circuits is used to perform the same quantum operation.
[0013] This invention includes a method for operating a quantum-assisted learning system. The method includes the following operations: performing the same quantum operation on each of a plurality of quantum circuits to generate a plurality of qubits corresponding to a quantum signal; measuring the qubits to generate a plurality of classical eigenvalues; training a function based on the classical eigenvalues; and adjusting the number of quantum circuits when the difference between the function and the target function is greater than a preset difference.
[0014] In some embodiments, performing the same quantum operation further includes: performing a quantum operation on a first set of qubits of a quantum signal through a first quantum circuit in a quantum circuit to generate a second set of qubits; and performing N quantum operations on a third set of qubits of a quantum signal through N series-coupled second quantum circuits in a quantum circuit to generate a fourth set of qubits, where N is a positive integer.
[0015] In some embodiments, measuring the qubits to generate classical eigenvalues further includes: performing multiple measurements on the first qubits of the second group of qubits to generate a first classical eigenvalue corresponding to the first qubit in the classical eigenvalues; and performing multiple measurements on the second qubits of the fourth group of qubits to generate a second classical eigenvalue corresponding to the second qubit in the classical eigenvalues. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of a quantum-assisted learning system according to one embodiment of the present invention.
[0017] Figure 2 This is a flowchart illustrating a method for operating a quantum-assisted learning system according to an embodiment of this case.
[0018] Figure 3A This is a schematic diagram of a quantum circuit according to one embodiment of the present invention.
[0019] Figure 3B This is a schematic diagram of a quantum circuit according to one embodiment of the present invention.
[0020] Figure 4 This is a schematic diagram of a quantum-assisted device according to one embodiment of the present invention.
[0021] Figure 5 This is a flowchart illustrating a method for operating a quantum-assisted learning system according to an embodiment of this case.
[0022] Figure 6 This is a schematic diagram illustrating the functions and target functions generated by a quantum-assisted learning system according to an embodiment of this case.
[0023] Figure 7 This is a flowchart illustrating an operational quantum-assisted learning system according to an embodiment of the present invention.
[0024] Figure 8 This is a schematic diagram illustrating an operation corresponding to increasing the number of quantum circuits according to an embodiment of this case.
[0025] Figure 9 This is a schematic diagram illustrating an operation corresponding to reducing the number of quantum circuits according to an embodiment of this case. Detailed Implementation
[0026] In this document, when an element is referred to as a “connection” or “coupled,” it may mean an “electrical connection” or “electrical coupling.” “Connection” or “coupled” can also be used to indicate the operation or interaction between two or more elements. Furthermore, although terms such as “first,” “second,” etc., are used herein to describe different elements, these terms are merely used to distinguish elements or operations described using the same technical terminology. Unless the context clearly indicates otherwise, these terms do not specifically refer to or imply order or sequence, nor are they intended to limit the scope of this application.
[0027] Unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this case pertains. It will be further understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the relevant technical context and this case, and will not be interpreted as having an idealized or overly formal meaning unless expressly defined as such herein.
[0028] The terminology used herein is for the purpose of describing particular embodiments only and is not restrictive. As used herein, unless the content clearly indicates otherwise, the singular forms “a,” “an,” and “the” are intended to include plural forms, including “at least one.” “Or” means “and / or.” As used herein, the term “and / or” includes any and all combinations of one or more of the associated listed items. It should also be understood that, when used in this specification, the terms “comprising” and / or “including” specify the presence of the stated features, areas, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, areas, integrals, steps, operations, elements, components, and / or combinations thereof.
[0029] The following describes several embodiments of this invention with reference to the accompanying drawings. For clarity, many practical details will be described in the following description. However, it should be understood that these practical details should not be used to limit the invention. That is, these practical details are not essential in some embodiments disclosed herein. Furthermore, for the sake of simplicity, some conventional structures and elements will be shown in the drawings in a simple schematic manner.
[0030] Figure 1 This is a schematic diagram illustrating a quantum-assisted learning system 100 according to one embodiment of this case. Figure 1 As shown, the quantum-assisted learning system 100 includes a quantum-assisted device 110 and a feature learning processor 120. In some embodiments, the quantum-assisted device 110 is used to receive a quantum signal QS1 and to generate multiple classical eigenvalues FV1 to FV12 based on the quantum signal QS1.
[0031] like Figure 1 As shown, the feature learning processor 120 is coupled to the quantum auxiliary device 110 and is used to receive classical eigenvalues FV1 to FV12 to generate a function F1 based on the classical eigenvalues FV1 to FV12. In some embodiments, the feature learning processor 120 is further used to train the function F1 based on the target function G1 and the classical eigenvalues FV1 to FV12, such that the function F1 approximates the target function G1. In some embodiments, the feature learning processor 120 is further used to compare the function F1 and the target function G1, and adjust the number of quantum circuits in the quantum auxiliary device 110 based on the difference between the function F1 and the target function G1. Details regarding the operation of the feature learning processor 120 are provided below. Figures 5 to 9 The embodiments are further illustrated below.
[0032] In some embodiments, the quantum signal QS1 comprises qubits IB1 to IB12. Each of qubits IB1 to IB12 can be a superposition of logic values 0 and 1, relative to the state of a classical bit having either a logic value of 0 or 1. For example, one of the qubits IB1 to IB12 can be expressed as A|0> + B|1>, where each of parameters A and B is a complex number, and |0> and |1> represent the states of logic value 0 and logic value 1, respectively. In some embodiments, each of qubits IB1 to IB12 can be expressed as |0>, that is, parameter A = 1 and parameter B = 0, and the quantum signal QS1 corresponds to the ground state quantum signal.
[0033] In some embodiments, the quantum-assisted device 110 includes quantum circuit rows QR1 to QR3 and a measurement circuit group 130. Quantum circuit row QR1 is used to generate qubits OB1 to OB4 based on qubits IB1 to IB4. Quantum circuit row QR2 is used to generate qubits OB5 to OB8 based on qubits IB5 to IB8. Quantum circuit row QR3 is used to generate qubits OB9 to OB12 based on qubits IB9 to IB12.
[0034] like Figure 1 As shown, the measurement circuit group 130 is coupled between the quantum circuit row QR1 and the feature learning processor 120, and also coupled between the quantum circuit row QR2 and the feature learning processor 120, and further coupled between the quantum circuit row QR3 and the feature learning processor 120. In some embodiments, the measurement circuit group 130 is used to generate classical eigenvalues FV1 to FV12 corresponding to the qubits OB1 to OB12 generated by the quantum circuit rows QR1 to QR3, and to provide the classical eigenvalues FV1 to FV12 to the feature learning processor 120.
[0035] In some embodiments, the measurement circuit group 130 includes measurement circuits MC1 to MC12. For example... Figure 1 As shown, measurement circuits MC1-MC4 are coupled to quantum circuit row QR1 and are used to generate classical eigenvalues FV1-FV4 based on qubits OB1-OB4, respectively. Measurement circuits MC5-MC8 are coupled to quantum circuit row QR2 and are used to generate classical eigenvalues FV5-FV8 based on qubits OB5-OB8, respectively. Measurement circuits MC9-MC12 are coupled to quantum circuit row QR3 and are used to generate classical eigenvalues FV9-FV12 based on qubits OB9-OB12, respectively.
[0036] In some embodiments, one of the measurement circuits MC1 to MC12 is used to perform multiple measurements on a corresponding qubit OB1 to OB12, and average the measurement results to generate a corresponding classical eigenvalue FV1 to FV12. For example, when qubit OB1 = 0.3|0> + 0.7|1>, measurement circuit MC1 performs ten measurements on qubit OB1 and obtains ten bit values: 1, 1, 0, 1, 1, 0, 0, 1, 1, and 1. The average value of these ten bit values is 0.7. Correspondingly, the classical eigenvalue FV1 is 0.7.
[0037] In some embodiments, quantum circuit row QR1 includes quantum circuit QC1. Quantum circuit row QR2 includes quantum circuits QC2 and QC3. Quantum circuit row QR3 includes quantum circuits QC4 to QC6. For example... Figure 1 As shown, quantum circuits QC2 and QC3 are coupled in series, and quantum circuits QC4 to QC6 are coupled in series.
[0038] In some embodiments, quantum circuit QC1 is used to perform quantum operation U1 on qubits IB1 to IB4 to generate corresponding qubits OB1 to OB4. Quantum circuit QC2 is used to perform quantum operation U1 on qubits IB5 to IB8 to generate corresponding qubits MB1 to MB4. Quantum circuit QC3 is used to perform quantum operation U1 on qubits MB1 to MB4 to generate corresponding qubits OB5 to OB8. Quantum circuit QC4 is used to perform quantum operation U1 on qubits IB9 to IB12 to generate corresponding qubits MB5 to MB8. Quantum circuit QC5 is used to perform quantum operation U1 on qubits MB5 to MB8 to generate corresponding qubits MB9 to MB12. Quantum circuit QC6 is used to perform quantum operation U1 on qubits MB9 to MB12 to generate corresponding qubits OB9 to OB12.
[0039] exist Figure 1In the illustrated embodiment, each of the quantum circuits QC1 to QC6 is used to process four qubits, but the embodiments of the present invention are not limited thereto. In various embodiments, each of the quantum circuits QC1 to QC6 can be used to perform quantum operations on various numbers of qubits.
[0040] As described above, each of the quantum circuits QC1 to QC6 is used to perform the same quantum operation U1. In some embodiments, quantum operation U1 corresponds to rotating the qubit by a specific angle. Details regarding quantum operation U1 are provided below. Figure 3A and Figure 3B The embodiments are further illustrated below. In some variations, quantum circuits QC1 to QC6 can also be used to perform different quantum operations.
[0041] In some approaches to quantum machine learning, the quantum computer repeatedly trains the parameters of the quantum gate. This requires the processor to repeatedly upload training data to the quantum computer to adjust the gate, consuming a significant amount of time. Furthermore, training the quantum gate parameters involves differentiation. Differentiating a large number of qubits can lead to the vanishing gradient problem, also known as the Barrenplateau problem, making training extremely difficult.
[0042] Compared to the above approach, in this embodiment of the invention, the quantum-assisted device 110 generates classical eigenvalues FV1 to FV12 based on the quantum signal QS1, and the feature learning processor 120 is trained based on the classical eigenvalues FV1 to FV12 to generate the function F1. This eliminates the need for repeatedly transmitting data back to train the quantum gate parameters, saving time spent queuing in the quantum computer's queue. Furthermore, the vanishing gradient problem does not occur, allowing the feature learning processor 120 to perform training normally.
[0043] Figure 2 This is a flowchart illustrating a method 200 for operating a quantum-assisted learning system 100 according to an embodiment of this case. Figure 2 As shown, method 200 includes operations OP21 to OP25. In various embodiments, Figure 1 The quantum-assisted learning system 100 shown is used to perform some or all of operations OP21 to OP25. In some variations, some or all of operations OP21 to OP25 may also be performed using a quantum-assisted learning system different from the quantum-assisted learning system 100.
[0044] like Figure 2As shown, in operation OP21, classical input data is converted into a quantum signal QS1. For example, classical input data can be represented by parameters A and B as described above. In operation OP22, the quantum auxiliary device 110 performs quantum operations to generate qubits OB1 to OB12. In operation OP23, the measurement circuit group 130 performs multiple measurements on qubits OB1 to OB12 to generate corresponding classical eigenvalues FV1 to FV12. In operation OP24, the feature learning processor 120 generates a function F1 based on the classical eigenvalues FV1 to FV12. In operation OP25, the feature learning processor 120 compares the function F1 with the target function G1 to confirm the training result.
[0045] Figure 3A This is a schematic diagram of a quantum circuit 300A according to one embodiment of the present invention. In some embodiments, the quantum circuit 300A is used to perform quantum operations on qubits B31 to B34 to generate qubits B35 to B38.
[0046] like Figure 3A As shown, the quantum circuit 300A includes quantum computing elements R31 to R34 and CN31 to CN33.
[0047] In some embodiments, quantum computing element R31 is used to rotate qubit B31 by an angle to generate qubit B35. Quantum computing element R32 is used to rotate qubit B32 by an angle to generate qubit BM32. Quantum computing element R33 is used to rotate qubit B33 by an angle to generate qubit BM33. Quantum computing element R34 is used to rotate qubit B34 by an angle to generate qubit BM34. In some embodiments, each of quantum computing elements R31 to R34 is used to rotate the input qubit by the same angle.
[0048] For example, qubits B31 to B34 correspond to the complex number e, respectively. iQ1 ~e iQ4 After quantum computing elements R31 to R34 process qubits B31 to B34, the resulting qubits B35, BM32, BM33, and BM34 correspond to the complex number e, respectively. iQ1+Q5 e iQ2+Q5 e iQ3+Q5 and e iQ4+Q5 Q1 to Q5 represent angles.
[0049] In some embodiments, quantum computing elements CN31 to CN33 correspond to controlled-NOT (CNOT) operations. For example... Figure 3AAs shown, quantum computing element CN31 performs a CNOT operation on qubits B35 and BM32 to generate qubit B36. Quantum computing element CN32 performs a CNOT operation on qubits BM33 and BM34 to generate qubit B37. Quantum computing element CN33 performs a CNOT operation on qubits BM33 and BM34 to generate qubit B38.
[0050] Please refer to Figure 3A and Figure 1 In some embodiments, each of quantum circuits QC1 to QC6 may be configured as quantum circuit 300A, and quantum operation U1 is performed through quantum operation elements R31 to R34 and CN31 to CN33. For example, when quantum circuit QC1 is implemented as quantum circuit 300A, qubits IB1 to IB4 and OB1 to OB4 are implemented as qubits B31 to B34 and B35 to B38, respectively. When quantum circuit QC2 is implemented as quantum circuit 300A, qubits IB5 to IB8 and MB1 to MB4 are implemented as qubits B31 to B34 and B35 to B38, respectively. When quantum circuit QC3 is implemented as quantum circuit 300A, qubits MB1 to MB4 are implemented as qubits B31 to B34 and B35 to B38, respectively.
[0051] Similarly, when quantum circuit QC4 is implemented as quantum circuit 300A, qubits IB9–IB12 and MB5–MB8 are implemented as qubits B31–B34 and B35–B38, respectively. When quantum circuit QC5 is implemented as quantum circuit 300A, qubits MB5–MB8 and MB9–MB12 are implemented as qubits B31–B34 and B35–B38, respectively. When quantum circuit QC6 is implemented as quantum circuit 300A, qubits MB9–MB12 and OB9–OB12 are implemented as qubits B31–B34 and B35–B38, respectively.
[0052] Figure 3B This is a schematic diagram of a quantum circuit 300B according to one embodiment of the present invention. In some embodiments, the quantum circuit 300B is used to perform quantum operations on qubits D31 to D34 to generate qubits D35 to D38.
[0053] like Figure 3BAs shown, the quantum circuit 300B includes quantum computing elements CR31 to CR33. In some embodiments, quantum computing elements CR31 to CR33 correspond to controlled rotation operations. In some embodiments, quantum computing element CR31 is used to rotate qubit D32 according to the logic state of qubit D31. For example, when qubit D31 has a logic value of 1, quantum computing element CR31 is used to rotate qubit D32 by an angle to generate qubit D36. When qubit D31 has a logic value of 0, quantum computing element CR31 does not rotate qubit D32, and qubit D36 is substantially equivalent to qubit D32.
[0054] Similarly, in some embodiments, quantum computing element CR32 is used to rotate qubit D33 according to the logical state of qubit D36 to generate qubit D37. Quantum computing element CR33 is used to rotate qubit D34 according to the logical state of qubit D37 to generate qubit D38. The operations of quantum computing element CR32 on qubits D36, D33, and D37, and the operations of quantum computing element CR33 on qubits D37, D34, and D38, are similar to the operations of quantum computing element CR31 on qubits D31, D32, and D36. Therefore, some details will not be repeated. In some embodiments, qubit D35 is substantially equivalent to qubit D31.
[0055] Please refer to Figure 3B and Figure 1 In some embodiments, each of quantum circuits QC1 to QC6 may be configured as quantum circuit 300B, and quantum operation U1 is performed through quantum operation elements CR31 to CR33. When one of the quantum circuits QC1 to QC6 is implemented as quantum circuit 300B, the correspondence of qubits D31 to D38 is similar to the correspondence of qubits B31 to B38 when one of the quantum circuits QC1 to QC6 is implemented as quantum circuit 300A, as described above. Therefore, some details will not be repeated.
[0056] Figure 4 This is a schematic diagram illustrating a quantum-assisted device 400 according to one embodiment of this case. Figure 4 As shown, the quantum auxiliary device 400 includes K quantum circuit rows QR1 to QRK and a measurement circuit group 410. Here, K is a positive integer. Please refer to... Figure 4 and Figure 1 Quantum-assisted device 400 is one embodiment of quantum-assisted device 110. Measurement circuit group 410 operates similarly to measurement circuit group 130. Therefore, some details will not be repeated.
[0057] In some embodiments, for a positive integer N less than or equal to K, the Nth row of quantum circuits, QRN, is used to receive a portion of the qubits of the quantum signal QS1 and perform N quantum operations U1 on the qubits to generate multiple qubits, so that the measurement circuit group 410 can perform multiple measurements on the aforementioned qubits to generate corresponding classical characteristic values. In some embodiments, such as Figure 1 The feature learning processor 120 shown is also used to generate a function F1 based on the aforementioned classical feature values.
[0058] In some embodiments, the Nth quantum circuit row QRN contains N series-coupled quantum circuits, and each of the N quantum circuits is used to perform the same quantum operation. For example, the third quantum circuit row QR3 contains three series-coupled quantum circuits QC4 to QC6, and each of the quantum circuits QC4 to QC6 is used to perform the same quantum operation U1.
[0059] like Figure 4 As shown, the quantum circuit row QRK includes quantum circuits QC41 and QC42, and (K-2) quantum circuits QC43 connected in series between quantum circuits QC41 and QC42. In some embodiments, quantum circuit QC41 is used to generate qubits MB41 to MB44 based on qubits IB41 to IB44 of quantum signal QS1. Quantum circuit QC42 is used to generate qubits OB41 to OB44 based on qubits MB45 to MB48. The (K-2) quantum circuits QC43 are used to perform (K-2) quantum operations U1 on qubits MB41 to MB44 to generate qubits MB45 to MB48.
[0060] In some embodiments, the number of quantum circuits in the quantum auxiliary device 400 can be represented by an arithmetic series formula. For example, the quantum auxiliary device 400 has (1 + ((K-1) × K / 2)) quantum circuits.
[0061] Please refer to Figure 3A , Figure 3B and Figure 4 In some embodiments, each of the quantum circuits QC41, QC42 and (K-2) quantum circuits QC43 can be implemented as either quantum circuit 300A or quantum circuit 300B.
[0062] In some embodiments, the measurement circuit group 410 includes measurement circuits MC41 to MC44. In some embodiments, measurement circuits MC41 to MC44 are used to perform multiple measurements on each of qubits OB41 to OB44 to generate a corresponding classical eigenvalue FV41 to FV44. In some embodiments, such as Figure 1The feature learning processor 120 shown is also used to generate a function F1 based on the classical feature values FV41 to FV44.
[0063] Figure 5 This is a flowchart illustrating a method 500 for operating a quantum-assisted learning system 100 according to an embodiment of this case. Figure 5 As shown, method 500 includes operations OP51 to OP58. In various embodiments, Figure 1 The quantum-assisted learning system 100 shown is used to perform some or all of operations OP51 to OP58. In some variations, some or all of operations OP51 to OP58 may also be performed using a quantum-assisted learning system different from the quantum-assisted learning system 100.
[0064] like Figure 5 As shown, during operation OP51, the quantum-assisted learning system 100 determines the number of quantum circuits in the quantum-assisted device 110 based on the objective function G1. For example, the quantum-assisted device 110 contains six quantum circuits QC1 to QC6, determined by the frequency of the objective function G1.
[0065] During operation OP52, the quantum-assisted learning system 100 generates classical eigenvalues based on the quantum signal. For example, the quantum-assisted device 110 performs quantum operations U1 on the quantum signal QS1 using quantum circuits QC1 to QC6 to generate classical eigenvalues FV1 to FV12. During operation OP53, the feature learning processor 120 generates a function F1 based on the classical eigenvalues FV1 to FV12.
[0066] In operation OP54, the feature learning processor 120 generates the difference E1 between the function F1 and the objective function G1. In some embodiments, the difference E1 can be represented by a loss function.
[0067] In operation OP55, the feature learning processor 120 compares the difference E1 with the preset difference PE1. In operation OP56, the feature learning processor 120 determines whether the difference E1 is greater than the preset difference PE1. If the difference E1 is greater than the default difference PE1, the feature learning processor 120 proceeds to operation OP58. If the difference E1 is less than or equal to the default difference PE1, the feature learning processor 120 proceeds to operation OP57. Details regarding the difference E1 are as follows... Figure 6 The embodiments are further illustrated below.
[0068] During operation OP58, the feature learning processor 120 adjusts the number of quantum circuits in the quantum auxiliary device 110. Details regarding the operation of OP58 are as follows. Figures 7 to 9 The embodiments are further illustrated below.
[0069] After operation OP58, the adjusted quantum auxiliary device 110 repeats operations OP52-OP56 to determine whether to continue adjusting the number of quantum circuits. In operation OP57, in response to the difference E1 being less than or equal to the default difference PE1, the feature learning processor 120 determines that the function F1 and the objective function G1 are sufficiently close and training is complete.
[0070] In some embodiments, method 500 can be used to solve nonlinear differential equations. For example, feature learning processor 120 generates a function F1 that approximates the objective function G1 of the differential equation corresponding to a convergent-divergent nozzle by performing method 500. In various embodiments, feature learning processor 120 generates a function F1 that approximates the objective function G1 by performing method 500 for various differential equations.
[0071] Figure 6 This is a schematic diagram 600 illustrating the function F1 and the objective function G1 generated by a quantum-assisted learning system 100 according to an embodiment of this case. Figure 6 As shown in the diagram 600, the horizontal axis represents the variable x. Function F1 and objective function G1 can have different function values depending on the value of the variable x. For example... Figure 6 As shown in the diagram, the vertical axis of the schematic diagram 600 represents the function value F1(x) of function F1 and the function value G1(x) of objective function G1.
[0072] In some embodiments, the difference E1 between function F1 and objective function G1 can be expressed as |F1-G1|. In other words, in schematic diagram 600, the function value E1(x) of the difference E1 can be expressed as |F1(x)-G1(x)|. In various embodiments, the difference E1 can also be expressed in various other mathematical forms. For example, the difference E1 can also be expressed as the integral of |F1(x)-G1(x)|.
[0073] Figure 7 This is a flowchart illustrating an operational quantum-assisted learning system 100 according to an embodiment of this case. Please refer to... Figure 7 and Figure 5 , Figure 7 The diagram illustrates details of operation OP58 in some embodiments. For example... Figure 7 As shown, operation OP58 can include operations OP71 to OP73.
[0074] In operation OP71, it is determined whether function F1 is overfitting. In operation OP72, when function F1 is overfitting, feature learning processor 120 reduces the number of quantum circuits in quantum auxiliary device 110. In operation OP73, when function F1 is not overfitting, feature learning processor 120 increases the number of quantum circuits in quantum auxiliary device 110. Details regarding operations OP72 and OP73 are provided below. Figure 8 and Figure 9 The embodiments are further illustrated below.
[0075] Figure 8 This is a schematic diagram 800 illustrating operation OP73 corresponding to increasing the number of quantum circuits according to an embodiment of this invention. In some embodiments, the feature learning processor 120 performs operation OP73 on the quantum auxiliary device 110 to increase the number of quantum circuit rows QR4 in the quantum auxiliary device 110. Please refer to... Figure 8 and Figure 4 The quantum circuit row QR4 is an embodiment of the quantum circuit row QRK corresponding to K equal to four. Therefore, some details will not be repeated.
[0076] In some embodiments, the quantum circuit row QR4 includes four quantum circuits QC7 to QC10. The quantum circuit row QR4 is used to generate qubits OB13 to OB16. Measurement circuit group (e.g.) Figure 4 The measurement circuit group 410 shown is used to measure sub-bits OB13 to OB16 to generate classical characteristic values FV13 to FV16. Please refer to... Figure 8 and Figure 4 Quantum bits OB13 to OB16 are embodiments of qubits OB41 to OB44, and classical eigenvalues FV13 to FV16 are embodiments of classical eigenvalues FV41 to FV44.
[0077] Please refer to Figure 8 and Figure 1 In some embodiments, the feature learning processor 120 is further configured to generate a function F1 based on classical feature values FV1 to FV16. In some embodiments, the difference E1 between the function F1 generated based on classical feature values FV1 to FV16 and the target function G1 is smaller than that between the function F1 generated based on classical feature values FV1 to FV12.
[0078] In some embodiments, the quantum auxiliary device 110, which includes K rows of quantum circuits, contains (1 + ((K-1)×K / 2)) quantum circuits. The first row of quantum circuits contains one quantum circuit, the second row contains two quantum circuits, and so on, with the Kth row containing K quantum circuits.
[0079] When operating OP73 on the aforementioned quantum-assisted device 110, the (K+1)th row of quantum circuits containing (K+1) quantum circuits is added to the quantum-assisted device 110. In other words, in some embodiments, during operation OP73, in response to the number of quantum circuits in the quantum-assisted device 110 being (1+((K-1)×K / 2)), the feature learning processor 120 adds (K+1) quantum circuits to the quantum-assisted device 110. For example, in Figure 8 In the illustrated embodiment, in response to the number of six quantum circuits QC1 to QC6 in the quantum auxiliary device 110, the feature learning processor 120 adds four quantum circuits to the quantum auxiliary device 110.
[0080] In some approaches, during machine learning, the quantum computer is repeatedly trained on the parameters of the quantum gates. The number of quantum gates used for machine learning remains unchanged.
[0081] Compared to the above approach, in this embodiment of the invention, during operation OP73, in response to the number of quantum circuits in the quantum auxiliary device 110 being (1 + ((K-1) × K / 2)), the feature learning processor 120 adds (K+1) quantum circuits to the quantum auxiliary device 110. In this way, the feature learning processor 120 can systematically increase the number of quantum circuits to train the function F1.
[0082] Figure 9 This is a schematic diagram 900 illustrating an operation OP72 corresponding to reducing the number of quantum circuits according to an embodiment of the present invention. In some embodiments, the feature learning processor 120 performs operation OP72 on the quantum auxiliary device 110 to remove the quantum circuit row QR3 in the quantum auxiliary device 110.
[0083] Please refer to Figure 9 and Figure 1 In some embodiments, the modified quantum-assisted device 110 does not include the quantum circuit row QR3 and is used only to generate classical eigenvalues FV1 to FV8. Correspondingly, the feature learning processor 120 is used to generate a function F1 based only on the classical eigenvalues FV1 to FV8. In some embodiments, the difference E1 between the function F1 generated based only on the classical eigenvalues FV1 to FV8 and the target function G1 is smaller than that between the function F1 generated based on the classical eigenvalues FV1 to FV12.
[0084] Although the present invention has been disclosed above by way of embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications and refinements without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.
[0085] [Symbol Explanation]
[0086] 100: Quantum-Assisted Learning System
[0087] 110, 400: Quantum auxiliary device
[0088] 120: Feature Learning Processor
[0089] QS1: Quantum Signal
[0090] FV1~FV16, FV41~FV44: Classical eigenvalues
[0091] F1: Function
[0092] G1: Objective function
[0093] IB1~IB12, OB1~OB16, MB1~MB12, B31~B38, D31~D38, BM32~BM34, IB41~IB44, MB41~MB48, OB41~OB44: Quantum bits
[0094] QR1~QR4, QRN, QRK: Quantum circuits
[0095] QC1~QC10, QC41~QC43, 300A, 300B: Quantum Circuits
[0096] 130, 410: Measurement circuit group
[0097] MC1~MC12, MC41~MC44: Measurement circuits
[0098] U1: Quantum computation
[0099] 200, 500: Method
[0100] OP21~OP25, OP51~OP58, OP71~OP73: Operation
[0101] R31~R34, CN31~CN33, CR31~CR33: Quantum computing elements
[0102] E1: Difference
[0103] PE1: Preset Difference
[0104] 600, 800, 900: Schematic diagram
[0105] G1(x), F1(x), E1(x): Function values.
Claims
1. A quantum-assisted learning system, characterized in that, include: A quantum-assisted device for measuring multiple qubits of a corresponding quantum signal to generate multiple classical eigenvalues, and comprising multiple quantum circuits for processing the quantum signal, wherein each of the multiple quantum circuits performs the same quantum operation. The quantum-assisted device comprises K rows of quantum circuits, wherein the first row of quantum circuits contains one quantum circuit of the plurality of quantum circuits, the second row of quantum circuits contains two quantum circuits of the plurality of quantum circuits, and the Kth row of quantum circuits contains K quantum circuits of the plurality of quantum circuits. The number of the plurality of quantum circuits in the quantum-assisted device is represented by the arithmetic series formula (K+1)×K / 2, wherein each quantum circuit has the same configuration of multiple quantum computing elements, which are used to perform controlled rotation operations on the plurality of qubits. as well as A feature learning processor, coupled to the quantum-assisted device, is used to train a function based on the plurality of classical feature values. When the difference between the function generated based on the plurality of classical feature values and the target function is greater than a preset difference, in response to the number of the plurality of quantum circuits being (K+1)×K / 2, K+1 quantum circuits are added to the quantum-assisted device, where K is a positive integer, and each of the K+1 quantum circuits is used to perform the same quantum operation.
2. The quantum-assisted learning system according to claim 1, wherein the plurality of quantum circuits comprises: A first quantum circuit is used to perform the quantum operation on a first set of qubits of the quantum signal to generate a second set of qubits from the plurality of qubits. A second quantum circuit is used to perform the quantum operation on the third set of qubits of the quantum signal to generate a fourth set of qubits; as well as A third quantum circuit is connected in series with the second quantum circuit and is used to perform the quantum operation on the fourth group of qubits to generate a fifth group of qubits among the plurality of qubits.
3. The quantum-assisted learning system according to claim 2, wherein the feature learning processor is coupled to the first quantum circuit and the third quantum circuit, and is used to train the function based on the first set of classical feature values corresponding to the second set of qubits in the plurality of classical feature values and the second set of classical feature values corresponding to the fifth set of qubits in the plurality of classical feature values.
4. The quantum-assisted learning system according to claim 2, further comprising: A measurement circuit group is coupled between the feature learning processor and the first quantum circuit, and is used to perform multiple measurements on the first qubit of the second group of qubits to generate a first classical feature value corresponding to the first qubit among the plurality of classical feature values, and to perform multiple measurements on the second qubit of the fifth group of qubits to generate a second classical feature value corresponding to the second qubit among the plurality of classical feature values.
5. The quantum-assisted learning system according to claim 2, wherein the plurality of quantum circuits further comprises: A fourth quantum circuit is used to perform the quantum operation on the sixth set of qubits of the quantum signal to generate a seventh set of qubits; The fifth quantum circuit, connected in series with the fourth quantum circuit, is used to perform the quantum operation on the seventh group of qubits to generate the eighth group of qubits; as well as A sixth quantum circuit is connected in series with the fifth quantum circuit and is used to perform the quantum operation on the eighth group of qubits to generate a ninth group of qubits among the plurality of qubits.
6. The quantum-assisted learning system according to any one of claims 1 to 5, wherein the feature learning processor is further configured to adjust the number of the plurality of quantum circuits when the difference between the function and the target function is greater than the preset difference.
7. A method for operating a quantum-assisted learning system, characterized in that, include: The number of quantum circuits in the quantum-assisted device is determined based on the objective function; The quantum-assisted device generates multiple classical eigenvalues based on quantum signals. Multiple qubits are generated through the aforementioned multiple quantum circuits; Each of the plurality of qubits is measured multiple times to generate the plurality of classical eigenvalues; Based on the aforementioned classical eigenvalues, a first function is generated; as well as The number of the plurality of quantum circuits is adjusted based on the difference between the first function and the target function. Adjusting the number of the plurality of quantum circuits includes: When the difference is greater than a preset difference, in response to the quantity of the plurality of quantum circuits being (K+1)×K / 2, K+1 quantum circuits are added to the quantum auxiliary device, where K is a positive integer, and each of the K+1 quantum circuits is used to perform the same quantum operation. The quantum-assisted device comprises K rows of quantum circuits, wherein the first row of quantum circuits contains one quantum circuit of the plurality of quantum circuits, the second row of quantum circuits contains two quantum circuits of the plurality of quantum circuits, and the Kth row of quantum circuits contains K quantum circuits of the plurality of quantum circuits. The number of the plurality of quantum circuits in the quantum-assisted device is represented by the arithmetic series formula (K+1)×K / 2, wherein each quantum circuit has the same configuration of multiple quantum computing elements, which are used to perform controlled rotation operations on the plurality of qubits.
8. The method of claim 7, wherein generating the plurality of classical eigenvalues comprises: Quantum operations corresponding to the rotation angle are performed through each row of the plurality of quantum circuits.
9. The method of claim 7, wherein generating the plurality of classical eigenvalues comprises: The quantum operation is performed on the first set of qubits of the quantum signal to generate the second set of qubits; The quantum operation is performed on the third set of qubits of the quantum signal to generate the fourth set of qubits; The quantum operation is performed on the fourth group of qubits of the quantum signal to generate the fifth group of qubits; as well as Each of the second group of qubits and the fifth group of qubits is measured multiple times to generate at least a portion of the plurality of classical eigenvalues.
10. A method for operating a quantum-assisted learning system, characterized in that, include: The same quantum operation is performed on each of the multiple quantum circuits in the quantum-assisted device to generate multiple qubits of the corresponding quantum signal; Measuring the multiple qubits to generate multiple classical eigenvalues; The function is trained based on the aforementioned classical feature values; as well as When the difference between the stated function and the objective function exceeds a preset difference, the number of the plurality of quantum circuits is adjusted. Adjusting the number of the plurality of quantum circuits includes: When the difference is greater than the preset difference, in response to the number of the plurality of quantum circuits being (K+1)×K / 2, K+1 quantum circuits are added to the quantum auxiliary device, where K is a positive integer, and each of the K+1 quantum circuits is used to perform the same quantum operation. The quantum-assisted device comprises K rows of quantum circuits, wherein the first row of quantum circuits contains one quantum circuit of the plurality of quantum circuits, the second row of quantum circuits contains two quantum circuits of the plurality of quantum circuits, and the Kth row of quantum circuits contains K quantum circuits of the plurality of quantum circuits. The number of the plurality of quantum circuits in the quantum-assisted device is represented by the arithmetic series formula (K+1)×K / 2, wherein each quantum circuit has the same configuration of multiple quantum computing elements, which are used to perform controlled rotation operations on the plurality of qubits.
11. The method of claim 10, wherein performing the same quantum operation further comprises: The quantum operation is performed on the first set of qubits of the quantum signal through the first quantum circuit of the plurality of quantum circuits to generate the second set of qubits of the plurality of qubits; as well as The third set of qubits of the quantum signal is subjected to N quantum operations through N second quantum circuits that are connected in series in the plurality of quantum circuits to generate a fourth set of qubits in the plurality of qubits, where N is a positive integer.
12. The method of claim 11, wherein measuring the plurality of qubits to generate the plurality of classical eigenvalues further comprises: The first qubit of the second group of qubits is measured multiple times to generate the first classical feature value corresponding to the first qubit among the plurality of classical feature values; as well as Multiple measurements are performed on the second qubit of the fourth group of qubits to generate the second classical characteristic value corresponding to the second qubit among the multiple classical characteristic values.