Quantum machine learning method and device, storage medium and electronic equipment
By constructing and optimizing the learning Hamiltonian, quantum machine learning methods transform the training process into a natural dynamic process governed by physical laws, solving the problem of model failure in existing methods and enabling the development of more efficient and reliable quantum machine learning models.
Patent Information
- Application Number
- CN202610031398.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-11-13
- Filing Date
- 2026-01-09
- Publication Date
- 2026-05-15
AI Technical Summary
Existing quantum machine learning methods fail to fully utilize the physical evolution laws of quantum systems, resulting in models being prone to failure in noisy environments, the training process potentially getting stuck in local optima or oscillations, and low development efficiency.
By constructing a learning Hamiltonian, the training dataset and task specifications are encoded into data Hamiltonian components and task Hamiltonian components, generating a learning Hamiltonian. The quantum system is then optimized under natural dynamical evolution by adjusting the Hamiltonian parameters. The robustness and performance boundaries of the model are evaluated by combining Hamiltonian analysis and perturbation theory.
It improves the development efficiency of quantum machine learning models, avoids training instability and local optima problems, and ensures the reliability and robustness of models in noisy environments.
Smart Images

Figure CN122047540A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of quantum machine learning, specifically to a quantum machine learning method, apparatus, storage medium, and electronic device. Background Technology
[0002] Quantum machine learning, as a cutting-edge field at the intersection of quantum computing and artificial intelligence, aims to accelerate or enhance classical machine learning tasks by leveraging the unique properties of quantum systems. In recent years, models based on parameterized quantum circuits and variational quantum algorithms have become the mainstream implementation path, demonstrating theoretical potential for certain specific problems.
[0003] Current mainstream quantum machine learning typically treats quantum circuits as parameterized function approximators, minimizing the loss function by iteratively updating classical parameters.
[0004] However, these methods are essentially quantum simulations of optimization processes such as classical gradient descent, failing to fully utilize the inherent physical evolution of quantum systems. Consequently, they cannot inherit or utilize the intrinsic stability of quantum systems to small perturbations. This makes the models prone to failure in noisy environments, and the training process may get stuck in local optima or oscillate, resulting in low efficiency in developing quantum machine learning models. Summary of the Invention
[0005] This application provides a quantum machine learning method, apparatus, storage medium, and electronic device, which can improve the development efficiency of quantum machine learning models.
[0006] In a first aspect, embodiments of this application provide a quantum machine learning method, including: Obtain the task specifications and corresponding training datasets for machine learning tasks; A learning Hamiltonian is constructed based on the task specification and the training dataset, and the natural evolution dynamics of the learning Hamiltonian are configured to achieve the machine learning objective corresponding to the task specification. By adjusting the Hamiltonian parameter of the learned Hamiltonian, the quantum system undergoes natural dynamic evolution under the drive of the learned Hamiltonian, thus obtaining the target learned Hamiltonian. Hamiltonian analysis is performed on the target learning Hamiltonian to determine the performance boundary and robustness of the target learning Hamiltonian under preset perturbation conditions. Based on the stated objective, a Hamiltonian output quantum machine learning model is learned.
[0007] In the quantum machine learning method provided in this application embodiment, the step of constructing a learning Hamiltonian based on the learning task specification and the training dataset includes: The training dataset is encoded into data Hamiltonian components; Define the Hamiltonian components of the task specification; The data Hamiltonian component and the task Hamiltonian component are combined to generate the learning Hamiltonian.
[0008] In the quantum machine learning method provided in this application embodiment, the step of adjusting the Hamiltonian parameter of the learned Hamiltonian to enable the quantum system to undergo natural dynamical evolution under the drive of the learned Hamiltonian to obtain the target learned Hamiltonian includes: The natural dynamical evolution time of a fixed quantum system; The Hamiltonian parameter of the learned Hamiltonian is adjusted iteratively by optimizing the algorithm. When the optimized Hamiltonian parameters maximize the overlap between the final state of the quantum system and the target state, or minimize the value of the task loss function, the Hamiltonian quantity determined by the Hamiltonian parameters at this time is used as the target learning Hamiltonian quantity.
[0009] In the quantum machine learning method provided in this application embodiment, the step of performing Hamiltonian analysis on the target learning Hamiltonian to determine the performance boundary and robustness of the target learning Hamiltonian under preset perturbation conditions includes: The robustness of the target-learned Hamiltonian is obtained by calculating the energy gap between the ground state and the lowest excited state of the target-learned Hamiltonian. Based on the bandgap and the preset perturbation conditions, the range of variation of the target learning Hamiltonian is evaluated to obtain the performance boundary of the target learning Hamiltonian under the preset perturbation conditions.
[0010] In the quantum machine learning method provided in this application embodiment, evaluating the range of change of the target learning Hamiltonian based on the band gap and the preset perturbation condition includes: Using perturbation theory, the range of variation of the ground state energy or system evolution fidelity of the target learning Hamiltonian is calculated based on the band gap and the strength of the preset perturbation conditions.
[0011] In the quantum machine learning method provided in the embodiments of this application, the preset perturbation conditions include at least one of the following: the relaxation time and dephase time limit of the qubit, the operation fidelity error of the quantum logic gate, and the approximation error generated when performing digital or analog simulation of the Hamiltonian.
[0012] Secondly, embodiments of this application provide a quantum machine learning device, comprising: The acquisition unit is used to acquire the task specifications and corresponding training datasets for machine learning tasks. A construction unit is configured to construct a learning Hamiltonian based on the task specification and the training dataset, wherein the natural evolution dynamics of the learning Hamiltonian are configured to achieve the machine learning objective corresponding to the task specification. The adjustment unit is used to adjust the Hamiltonian parameter of the learned Hamiltonian so that the quantum system undergoes natural dynamic evolution under the drive of the learned Hamiltonian to obtain the target learned Hamiltonian. The analysis unit is used to perform Hamiltonian analysis on the target learning Hamiltonian to determine the performance boundary and robustness of the target learning Hamiltonian under preset perturbation conditions. The output unit is used to learn the Hamiltonian output quantum machine learning model based on the target.
[0013] In the quantum machine learning device provided in this application embodiment, the building unit is used for: The training dataset is encoded into a data Hamiltonian component; the task specification defines a task Hamiltonian component; the data Hamiltonian component and the task Hamiltonian component are combined to generate a learning Hamiltonian.
[0014] Thirdly, this application provides a storage medium storing a plurality of instructions adapted for loading by a processor to execute any of the quantum machine learning methods described above.
[0015] Fourthly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the quantum machine learning method described in any of the preceding claims.
[0016] In summary, the quantum machine learning method provided in this application includes: acquiring the task specification of a machine learning task and the corresponding training dataset; constructing a learning Hamiltonian based on the task specification and the training dataset, wherein the natural evolution dynamics of the learning Hamiltonian are configured to achieve the machine learning objective corresponding to the task specification; adjusting the Hamiltonian parameter of the learning Hamiltonian to enable the quantum system to undergo natural dynamic evolution under the drive of the learning Hamiltonian to obtain the target learning Hamiltonian; performing Hamiltonian analysis on the target learning Hamiltonian to determine the performance boundary and robustness of the target learning Hamiltonian under preset perturbation conditions; and outputting a quantum machine learning model based on the target learning Hamiltonian. This application embodiment can improve the development efficiency of quantum machine learning models. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram illustrating an application scenario of the quantum machine learning method provided in the embodiments of this application.
[0019] Figure 2 This is a flowchart illustrating the quantum machine learning method provided in the embodiments of this application.
[0020] Figure 3 This is a schematic diagram of the structure of the quantum machine learning device provided in the embodiments of this application.
[0021] Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0022] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0023] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.
[0024] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0025] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.
[0026] In the description of this application, it should be noted that the terms "upper," "lower," "left," "right," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application. In addition, terms such as "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0027] Current mainstream quantum machine learning typically treats quantum circuits as parameterized function approximators, minimizing the loss function by iteratively updating classical parameters.
[0028] However, these methods are essentially quantum simulations of optimization processes such as classical gradient descent, failing to fully utilize the inherent physical evolution of quantum systems. Consequently, they cannot inherit or utilize the intrinsic stability of quantum systems to small perturbations. This makes the models prone to failure in noisy environments, and the training process may get stuck in local optima or oscillate, resulting in low efficiency in developing quantum machine learning models.
[0029] Based on this, embodiments of this application provide a quantum machine learning method, apparatus, storage medium, and electronic device. Specifically, the quantum machine learning apparatus can be integrated into an electronic device, which can be a server or a terminal, etc. The terminal can include mobile phones, wearable smart devices, tablets, laptops, and personal computers (PCs), etc., as well as other computer and auxiliary devices. The server can be a single server or a server cluster composed of multiple servers, and can be a physical server or a virtual server.
[0030] For example, such as Figure 1As shown, the electronic device can acquire the task specification and corresponding training dataset for a machine learning task; construct a learning Hamiltonian based on the task specification and training dataset, and configure the natural evolution dynamics of the learning Hamiltonian to achieve the machine learning objective corresponding to the task specification; by adjusting the Hamiltonian parameters of the learning Hamiltonian, the quantum system undergoes natural dynamic evolution driven by the learning Hamiltonian to obtain the target learning Hamiltonian; Hamiltonian analysis is performed on the target learning Hamiltonian to determine its performance boundary and robustness under preset perturbation conditions; and a quantum machine learning model is output based on the target learning Hamiltonian. The technical solutions shown in this application will be described in detail below through specific embodiments. It should be noted that the order of description of the following embodiments is not intended to limit the priority of the embodiments.
[0031] Please see Figure 2 , Figure 2 This is a flowchart illustrating the quantum machine learning method provided in an embodiment of this application. The specific flow of this quantum machine learning method can be as follows: 101. Obtain the task specifications and corresponding training dataset for the machine learning task.
[0032] The task specification may include the type of problem to be solved (e.g., image classification, numerical regression, or data generation), performance metrics for evaluating the model (e.g., classification accuracy, mean squared error), and possible constraints (e.g., specific requirements for noisy environments or upper limits on real-time inference latency).
[0033] The training dataset consists of a large number of samples, which can be labeled (such as images with class labels or feature vectors with target values) or unlabeled (such as unlabeled text or signal data).
[0034] After obtaining the training dataset, it is usually necessary to perform data preprocessing on the training dataset, such as normalization and cleaning.
[0035] When the samples are classical data, in order to integrate the classical data into subsequent quantum dynamics processes, each classical data point needs to be mapped to a quantum state that can be operated on by the quantum system. Common encoding schemes include, but are not limited to, amplitude encoding (encoding data values as quantum state amplitudes), ground state encoding (associating data with the Hamiltonian ground state), or more complex quantum feature mappings.
[0036] 102. Construct a learning Hamiltonian based on the task specification and training dataset. The natural evolution dynamics of the learning Hamiltonian are configured to achieve the machine learning objective corresponding to the task specification.
[0037] Specifically, the training dataset can first be encoded into data Hamiltonian components; then the task Hamiltonian components can be defined in the task specification; finally, the data Hamiltonian components and the task Hamiltonian components can be combined to generate the learning Hamiltonian.
[0038] In some embodiments, a preset encoding scheme can be used to construct the training dataset as a data Hamiltonian component. This data Hamiltonian component aims to embed the statistical properties, characteristic relationships, or distribution information of the samples into the structure of the Hamiltonian. The encoding scheme includes, but is not limited to, amplitude encoding (encoding data values as quantum state amplitudes), ground state encoding (associating data with the ground state of the Hamiltonian), or more complex quantum feature mappings.
[0039] For example, for a set of samples, a data Hamiltonian component reflecting the intrinsic geometric or relational structure of the samples can be constructed based on the similarity or distance matrix between the samples. The data Hamiltonian component is the physical manifestation of the "data-driven" part of the learning problem in the quantum realm.
[0040] In some embodiments, a task Hamiltonian component can be constructed based on the type of problem to be solved and performance metrics defined in the task specification. This task Hamiltonian component aims to transform an abstract machine learning objective into an energy objective or evolutionary endpoint of a physical system.
[0041] For example, for classification tasks, a task Hamiltonian component can be designed such that the configuration for correct classification corresponds to its lower-energy state (especially the ground state); for generation tasks, a task Hamiltonian component can be designed whose ground state can characterize the distribution of the target data. The task Hamiltonian component is the physical representation of the "target task" part of a learning problem in the quantum realm.
[0042] In this embodiment, the data Hamiltonian component and the task Hamiltonian component are combined through a specific functional relationship to generate a complete learning Hamiltonian. For example, a linear function can be used for the combination, specifically: Learning Hamiltonian = Coefficient A * Data Hamiltonian Component + Coefficient B * Task Hamiltonian Component, where the coefficients are adjustable parameters. This combination method ensures that the learning Hamiltonian simultaneously encodes both data characteristics and task objectives.
[0043] When a quantum system undergoes natural dynamical evolution (e.g., tending towards its lowest-energy ground state) driven by the learning Hamiltonian, the state change process of the quantum system itself corresponds to the machine learning objective of finding and achieving the optimal solution to the task (such as the optimal classification boundary or data generation distribution) from the data. Thus, the learning process is transformed into a natural dynamical process governed by physical laws. That is, the natural evolutionary dynamics of the learning Hamiltonian are configured to achieve the machine learning objective corresponding to the task specification.
[0044] 103. By adjusting the Hamiltonian parameter of the learned Hamiltonian, the quantum system undergoes natural dynamic evolution under the drive of the learned Hamiltonian, thus obtaining the target learned Hamiltonian.
[0045] In some embodiments, a natural dynamics optimizer can be used to iteratively adjust the Hamiltonian parameters of the learned Hamiltonian. The purpose of the adjustment is not to directly update the model weights, but to change the Hamiltonian itself, thereby altering the natural dynamics evolution path of the entire quantum system. Under each set of Hamiltonian parameters, the quantum system undergoes natural dynamics evolution driven by the adjusted learned Hamiltonian. Then, classical optimization algorithms (such as gradient-based or non-gradient optimizers) are used to evaluate the gap between the evolution result and the objective (e.g., the fidelity between the final state and the target state), and the Hamiltonian parameters are repeatedly adjusted until an optimal set of Hamiltonian parameters is found. At this point, the learned Hamiltonian defined by this optimal set of Hamiltonian parameters can most effectively guide the quantum system to achieve the learning objective through natural dynamics evolution; this learned Hamiltonian is the target learned Hamiltonian.
[0046] In some embodiments, the natural dynamical evolution time of the quantum system can be fixed first.
[0047] For example, a specific evolution time T can be set. Within this time, the quantum system will evolve continuously, strictly following the Schrödinger equation governed by the learned Hamiltonian defined by the current Hamiltonian parameters. The setting of this natural dynamic evolution time can be selected based on physical hardware characteristics, task complexity, or experience.
[0048] Next, the Hamiltonian parameters of the learned Hamiltonian are adjusted iteratively through optimization algorithms.
[0049] In each iteration, the natural dynamics optimizer selects a new set of Hamiltonian parameters. Then, based on the learned Hamiltonian defined by these new parameters, the quantum system runs a natural dynamics evolution for a fixed duration T, starting from a fixed initial state. Finally, the final state of the quantum system is measured or calculated to assess its proximity to the target state.
[0050] Specifically, the overlap between the final state and the target state (e.g., quantum state fidelity) can be calculated. The greater the overlap, the closer the final state is to the target state. Alternatively, the task loss function value (e.g., cross-entropy loss, mean squared error) between the prediction result obtained based on the final state and the true label (or target distribution) can be calculated.
[0051] Then, convergence is determined. When the optimized Hamiltonian parameters maximize the overlap between the final state and the target state of the quantum system, or minimize the task loss function, it is considered that the quantum system has found an optimal set of Hamiltonian parameters that most effectively guides the natural dynamics evolution to achieve the learning objective. In other words, when the optimized Hamiltonian parameters maximize the overlap between the final state and the target state of the quantum system, or minimize the task loss function, the Hamiltonian quantity determined by these parameters can be used as the target learning Hamiltonian quantity.
[0052] In this embodiment, the target state refers to the ideal quantum state that is ultimately achieved through the evolution of the quantum system, as defined by the task specifications. The final evolution state refers to the quantum state that the quantum system actually reaches after evolving for a fixed time based on the current Hamiltonian parameters in each optimization iteration. The purpose of iteration is to adjust the Hamiltonian parameters so that the final evolution state continuously approaches the target state.
[0053] 104. Perform Hamiltonian analysis on the target learning Hamiltonian to determine the performance boundary and robustness of the target learning Hamiltonian under the preset perturbation conditions.
[0054] Specifically, the band gap between the ground state and the lowest excited state of the target learned Hamiltonian can be calculated first to obtain the robustness of the target learned Hamiltonian; then, based on the band gap and the preset perturbation conditions, the range of variation of the target learned Hamiltonian can be evaluated to obtain the performance boundary of the target learned Hamiltonian under the preset perturbation conditions.
[0055] The size of the band gap directly determines the inherent ability of a quantum system to resist minor disturbances: a larger band gap means that the states of the quantum system (especially the ground state, which serves as a solution to the problem) are less likely to undergo transitions or mixing under disturbances, thus exhibiting stronger inherent robustness. Therefore, the calculated band gap itself is a direct and quantifiable representation of the robustness of the target learning Hamiltonian.
[0056] In this embodiment, the ground state refers to the eigenstate with the lowest energy of the target learning Hamiltonian, which encodes the theoretically optimal solution of the machine learning task. The lowest excited state refers to the eigenstate with the second lowest energy. The energy difference between the two is defined as the band gap.
[0057] In some embodiments, perturbation theory can be primarily used as the analytical tool. Based on the intensity of the preset perturbation conditions (such as noise amplitude and error rate) and the band gap, the range of possible changes in key characteristics of the target learning Hamiltonian (such as its ground state energy or the fidelity of the system in maintaining an ideal state during evolution) under perturbation can be theoretically calculated.
[0058] The upper (or lower) bound of this range of variation is the theoretically derived performance boundary. For example, it can be used to derive the theoretical upper limit of the model's prediction error under the worst-case perturbation, or the theoretical lower limit of the probability of successful system evolution. This provides a verifiable, mathematical guarantee for the model's performance in real-world environments.
[0059] In other words, in the specific implementation process, perturbation theory can be used to calculate the range of change of the ground state energy of the target learning Hamiltonian or the system evolution fidelity based on the band gap and the strength of the preset perturbation conditions.
[0060] Understandably, preset perturbation conditions can specifically include common sources of noise and error in quantum hardware and simulation. These preset perturbation conditions are non-ideal factors simulated in a real quantum computing environment, set to comprehensively evaluate the practicality of the model. These preset perturbation conditions include, but are not limited to, the relaxation time and dephase time constraints of qubits, the operational fidelity errors of quantum logic gates, and approximation errors generated during digital or analog simulations of Hamiltonians.
[0061] This embodiment, through Hamiltonian analysis combining physical indicators (bandgap), mathematical tools (perturbation theory), and actual noise models (preset perturbation conditions), can provide a solid theoretical verification for the final output quantum machine learning model, clarifying the conditions for its reliable operation and the lower limit of its performance.
[0062] 105. A quantum machine learning model based on target learning Hamiltonian output.
[0063] Learning the Hamiltonian based on this objective can generate and output a deployable quantum machine learning model.
[0064] It should be noted that this quantum machine learning model not only includes the optimal Hamiltonian parameters required to define the target learning Hamiltonian, but also typically includes recommended natural dynamics evolution time, as well as certification reports on performance boundaries and robustness.
[0065] In summary, the quantum machine learning method provided in this application includes: acquiring the task specification of a machine learning task and the corresponding training dataset; constructing a learning Hamiltonian based on the task specification and training dataset, wherein the natural evolution dynamics of the learning Hamiltonian are configured to achieve the machine learning objective corresponding to the task specification; adjusting the Hamiltonian parameters of the learning Hamiltonian to enable the quantum system to undergo natural dynamic evolution driven by the learning Hamiltonian, thereby obtaining the target learning Hamiltonian; performing Hamiltonian analysis on the target learning Hamiltonian to determine its performance boundaries and robustness under preset perturbation conditions; and outputting a quantum machine learning model based on the target learning Hamiltonian. This application transforms the task specification and training dataset of the machine learning task into data Hamiltonian components and task Hamiltonian components, and combines them to generate the learning Hamiltonian, thus configuring the natural evolution dynamics of the learning Hamiltonian itself to achieve the machine learning objective corresponding to the task specification. This method fundamentally changes the learning paradigm, transforming the learning process into a natural dynamic evolution process of the quantum system governed by physical laws, rather than a numerical optimization involving iterative updates of external parameters. Thus, quantum systems can fully utilize their own physical laws: by calculating the energy gap between the ground state and the lowest excited state of the Hamiltonian, and based on this energy gap and pre-defined perturbation conditions (such as the relaxation time and dephase time constraints of the qubit), perturbation theory is used for analysis, thereby theoretically obtaining inherent robustness to small perturbations and provable performance boundaries. Simultaneously, since the optimization object is the Hamiltonian parameter to guide natural evolution, rather than directly minimizing the loss function, it effectively avoids the problems of training instability and susceptibility to local optima caused by relying on classical gradient descent and other optimization processes in traditional methods, significantly improving the reliability of the training process and the development efficiency of quantum machine learning models.
[0066] To facilitate better implementation of the quantum machine learning method provided in the embodiments of this application, the embodiments of this application also provide a quantum machine learning device. The meanings of the terms used are the same as in the quantum machine learning method described above, and specific implementation details can be found in the descriptions in the method embodiments.
[0067] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of a quantum machine learning device provided in an embodiment of this application. The quantum machine learning device may include an acquisition unit 201, a construction unit 202, an adjustment unit 203, an analysis unit 204, and an output unit 205. The acquisition unit 201 is used to acquire the task specification of the machine learning task and the corresponding training dataset. Construction unit 202 is used to construct a learning Hamiltonian based on the task specification and training dataset. The natural evolution dynamics of the learning Hamiltonian are configured to achieve the machine learning objective corresponding to the task specification. The adjustment unit 203 is used to adjust the Hamiltonian parameter of the learned Hamiltonian so that the quantum system can undergo natural dynamic evolution driven by the learned Hamiltonian to obtain the target learned Hamiltonian. Analysis unit 204 is used to perform Hamiltonian analysis on the target learning Hamiltonian to determine the performance boundary and robustness of the target learning Hamiltonian under preset perturbation conditions. Output unit 205 is used to output a quantum machine learning model based on the target learning Hamiltonian.
[0068] In some embodiments, the building block can be specifically used to: encode the training dataset into data Hamiltonian components; define task Hamiltonian components according to the task specification; and combine the data Hamiltonian components and the task Hamiltonian components to generate a learning Hamiltonian.
[0069] For specific implementation methods of each of the above units, please refer to the embodiments of the quantum machine learning method described above, which will not be repeated here.
[0070] In summary, the quantum machine learning device provided in this application can acquire the task specification and corresponding training dataset of the machine learning task through the acquisition unit 201; the construction unit 202 constructs a learning Hamiltonian based on the task specification and training dataset, and the natural evolution dynamics of the learning Hamiltonian are configured to achieve the machine learning objective corresponding to the task specification; the adjustment unit 203 adjusts the Hamiltonian parameters of the learning Hamiltonian to enable the quantum system to undergo natural dynamic evolution driven by the learning Hamiltonian, thereby obtaining the target learning Hamiltonian; the analysis unit 204 performs Hamiltonian analysis on the target learning Hamiltonian to determine the performance boundary and robustness of the target learning Hamiltonian under preset perturbation conditions; and the output unit 205 outputs a quantum machine learning model based on the target learning Hamiltonian. This application embodiment can improve the reliability of the training process and the development efficiency of the quantum machine learning model.
[0071] This application also provides an electronic device that may integrate the quantum machine learning device of this application embodiment, such as... Figure 4 As shown, it illustrates a structural schematic diagram of the electronic device involved in the embodiments of this application, specifically: The electronic device may include components such as a processor 301 with one or more processing cores and a memory 302 with one or more computer-readable storage media. Those skilled in the art will understand that... Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 301 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs stored in the memory 302 and / or this application, and by calling data stored in the memory 302, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operation of the storage medium, user interface, and application programs, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 301.
[0072] The memory 302 can be used to store software programs and this application. The processor 301 executes various functional applications and data processing by running the software programs and this application stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store applications required for operating the storage medium and at least one function; the data storage area may store data created based on the use of the electronic device. In addition, the memory 302 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.
[0073] Although not shown, the electronic device may also include a display unit, an input unit, and a power supply, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 301 in the electronic device loads the executable files corresponding to the processes of one or more application programs into the memory 302 according to the following instructions, and the processor 301 runs the application programs stored in the memory 302 to realize various functions, as follows: Obtain the task specifications and corresponding training datasets for machine learning tasks; A learning Hamiltonian is constructed based on the task specification and training dataset. The natural evolution dynamics of the learning Hamiltonian are configured to achieve the machine learning objective corresponding to the task specification. By adjusting the Hamiltonian parameter of the learned Hamiltonian, the quantum system undergoes natural dynamic evolution driven by the learned Hamiltonian, thus obtaining the target learned Hamiltonian. Hamiltonian analysis is performed on the target learning Hamiltonian to determine the performance boundary and robustness of the target learning Hamiltonian under the preset perturbation conditions. A quantum machine learning model based on target learning Hamiltonian output.
[0074] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0075] Therefore, embodiments of this application provide a storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the methods provided in embodiments of this application. For example, the instructions can execute the following steps: Obtain the task specifications and corresponding training datasets for machine learning tasks; A learning Hamiltonian is constructed based on the task specification and training dataset. The natural evolution dynamics of the learning Hamiltonian are configured to achieve the machine learning objective corresponding to the task specification. By adjusting the Hamiltonian parameter of the learned Hamiltonian, the quantum system undergoes natural dynamic evolution driven by the learned Hamiltonian, thus obtaining the target learned Hamiltonian. Hamiltonian analysis is performed on the target learning Hamiltonian to determine the performance boundary and robustness of the target learning Hamiltonian under the preset perturbation conditions. A quantum machine learning model based on target learning Hamiltonian output.
[0076] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0077] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0078] Since the instructions stored in the storage medium can execute the steps of any method provided in the embodiments of this application, the beneficial effects that any method provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0079] The quantum machine learning method, device, storage medium, and electronic device provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A quantum machine learning method, characterized in that, include: Obtain the task specifications and corresponding training datasets for machine learning tasks; A learning Hamiltonian is constructed based on the task specification and the training dataset, and the natural evolution dynamics of the learning Hamiltonian are configured to achieve the machine learning objective corresponding to the task specification. By adjusting the Hamiltonian parameter of the learned Hamiltonian, the quantum system undergoes natural dynamic evolution under the drive of the learned Hamiltonian, thus obtaining the target learned Hamiltonian. Hamiltonian analysis is performed on the target learning Hamiltonian to determine the performance boundary and robustness of the target learning Hamiltonian under preset perturbation conditions. Based on the stated objective, a Hamiltonian output quantum machine learning model is learned.
2. The quantum machine learning method as described in claim 1, characterized in that, The step of constructing the learning Hamiltonian based on the learning task specification and the training dataset includes: The training dataset is encoded into data Hamiltonian components; Define the Hamiltonian components of the task specification; The data Hamiltonian component and the task Hamiltonian component are combined to generate the learning Hamiltonian.
3. The quantum machine learning method as described in claim 1, characterized in that, The process of adjusting the Hamiltonian parameter of the learned Hamiltonian to enable the quantum system to undergo natural dynamical evolution under the drive of the learned Hamiltonian, thereby obtaining the target learned Hamiltonian, includes: The natural dynamical evolution time of a fixed quantum system; The Hamiltonian parameter of the learned Hamiltonian is adjusted iteratively by optimizing the algorithm. When the optimized Hamiltonian parameters maximize the overlap between the final state of the quantum system and the target state, or minimize the value of the task loss function, the Hamiltonian quantity determined by the Hamiltonian parameters at this time is used as the target learning Hamiltonian quantity.
4. The quantum machine learning method as described in claim 1, characterized in that, The step of performing Hamiltonian analysis on the target learning Hamiltonian to determine the performance boundary and robustness of the target learning Hamiltonian under preset perturbation conditions includes: The robustness of the target-learned Hamiltonian is obtained by calculating the energy gap between the ground state and the lowest excited state of the target-learned Hamiltonian. Based on the bandgap and the preset perturbation conditions, the range of variation of the target learning Hamiltonian is evaluated to obtain the performance boundary of the target learning Hamiltonian under the preset perturbation conditions.
5. The quantum machine learning method as described in claim 4, characterized in that, The evaluation of the range of variation of the target learning Hamiltonian based on the bandgap and the preset perturbation conditions includes: Using perturbation theory, the range of variation of the ground state energy or system evolution fidelity of the target learning Hamiltonian is calculated based on the band gap and the strength of the preset perturbation conditions.
6. The quantum machine learning method as described in claim 4 or 5, characterized in that, The preset perturbation conditions include at least one of the following: relaxation time and dephase time constraints of qubits, operation fidelity error of quantum logic gates, and approximation error generated when performing digital or analog simulation of Hamiltonians.
7. A quantum machine learning device, characterized in that, include: The acquisition unit is used to acquire the task specifications and corresponding training datasets for machine learning tasks. A construction unit is configured to construct a learning Hamiltonian based on the task specification and the training dataset, wherein the natural evolution dynamics of the learning Hamiltonian are configured to achieve the machine learning objective corresponding to the task specification. The adjustment unit is used to adjust the Hamiltonian parameter of the learned Hamiltonian so that the quantum system undergoes natural dynamic evolution under the drive of the learned Hamiltonian to obtain the target learned Hamiltonian. The analysis unit is used to perform Hamiltonian analysis on the target learning Hamiltonian to determine the performance boundary and robustness of the target learning Hamiltonian under preset perturbation conditions. The output unit is used to learn the Hamiltonian output quantum machine learning model based on the target.
8. The quantum machine learning device as described in claim 7, characterized in that, The building unit is used for: The training dataset is encoded into a data Hamiltonian component; the task specification defines a task Hamiltonian component; the data Hamiltonian component and the task Hamiltonian component are combined to generate a learning Hamiltonian.
9. A storage medium, characterized in that, The storage medium stores a plurality of instructions adapted for loading by a processor to execute the quantum machine learning method according to any one of claims 1-7.
10. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the quantum machine learning method as described in any one of claims 1-7.