A method and apparatus for solving optimization problems

CN119514713BActive Publication Date: 2026-08-14ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-22
Publication Date
2026-08-14

AI Technical Summary

Benefits of technology

[0025]与现有技术相比,本申请先对存储待求解问题可行解的第一寄存器的初始量子态进行测量演化操作,获得对应待求解问题的哈密顿量的一个本征态对应的第一能量;再对测量演化操作的第一寄存器执行当前所确定的目标态转移操作和测量演化操作得到待求解问题的哈密顿量的另一个本征态对应的第二能量;最后基于所述第一能量和所述第二能量,确定达到Metropolis接受准则的第二能量对应的本征态为待求解问题的目标解。在本申请中,利用量子计算进行态的转移并获得转移前后的量子态的能量,基于两个能量,利用Metropolis接受准则确定是否获得目标解,实现了利用Metropolis和量子计算实现优化问题的求解。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119514713B_ABST
    Figure CN119514713B_ABST
Patent Text Reader

Abstract

This application discloses a method and apparatus for solving optimization problems. The method includes: performing a measurement evolution operation on the initial quantum state of a first register storing feasible solutions to the problem to be solved, obtaining a first energy corresponding to an eigenstate of the Hamiltonian of the problem to be solved; performing a target state transition operation and a measurement evolution operation on the first register of the measurement evolution operation to obtain a second energy corresponding to another eigenstate of the Hamiltonian of the problem to be solved; and determining, based on the first energy and the second energy, the eigenstate corresponding to the second energy that meets the Metropolis acceptance criterion as the target solution to the problem to be solved. Using the embodiments of this application, optimization problems can be solved using the Metropolis algorithm and quantum computing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of quantum computing technology, and in particular to a method and apparatus for solving optimization problems. Background Technology

[0002] Simulated Annealing (SA) is a general optimization algorithm that is based on the similarity between the annealing process of solid materials in physics and general optimization problems. Starting from a certain initial temperature, as the temperature decreases, it randomly searches for the global optimum in the solution space by combining the probabilistic jump characteristics.

[0003] The classic Metropolis algorithm is the core of simulating classical annealing. However, it fails directly when solving optimization problems in quantum systems due to the well-known sign problem in quantum Monte Carlo methods. But with the increasing scale of problems and the development of quantum computing technology, how to utilize the Metropolis algorithm and quantum computing to solve optimization problems has become an urgent issue to be addressed. Summary of the Invention

[0004] The purpose of this application is to provide a method and apparatus for solving optimization problems, which aims to solve optimization problems using the Metropolis algorithm and quantum computing.

[0005] One embodiment of this application provides a method for solving optimization problems, the method comprising:

[0006] The initial quantum state of the first register storing feasible solutions to the problem to be solved is measured and evolved to obtain the first energy corresponding to an eigenstate of the Hamiltonian of the problem to be solved.

[0007] The target state transition operation and the measurement evolution operation are performed on the first register of the measurement evolution operation to obtain the second energy corresponding to another eigenstate of the Hamiltonian of the problem to be solved, wherein the target state transition operation is determined by the Hamiltonian of the problem to be solved;

[0008] Based on the first energy and the second energy, the eigenstate corresponding to the second energy that meets the Metropolis acceptance criterion is determined as the target solution to the problem to be solved.

[0009] Optionally, the measurement evolution operation is a quantum phase estimation operation and a measurement operation.

[0010] Optionally, the target state transition operation is determined by iteratively updating the set of state transition operations;

[0011] The set of state transition operations is determined by the Hamiltonian of the problem to be solved, and the set of state transition operations satisfies the detailed equilibrium condition for state transition.

[0012] Optionally, when the problem to be solved is a molecular docking problem, the set of state transition operations is a set of operations that implement multiple molecular docking methods.

[0013] Optionally, when the problem to be solved is a coloring problem, the set of state transition operations is a set of operations that achieve multiple coloring effects.

[0014] Optionally, achieving the Metropolis acceptance criterion includes an acceptance condition determined based on the first energy and the second energy, and a preset iteration termination condition, wherein the acceptance condition is used to determine whether to accept the eigenstate corresponding to the second energy.

[0015] Optionally, if the eigenstate corresponding to the second energy is accepted but the preset iteration termination condition is not met, the method further includes:

[0016] After performing the same target state transition operation as obtaining the second energy on the quantum state of the second register, a measurement evolution operation is then performed on the second register of the target state transition operation, and the currently determined target state transition operation and measurement evolution operation are performed on the second register of the measurement evolution operation to obtain the updated first energy and second energy, wherein the quantum state of the second register is the conjugate state of the initial quantum state of the first register.

[0017] Optionally, if the eigenstate corresponding to the second energy is rejected but the preset iteration termination condition is not met, the method further includes:

[0018] A measurement evolution operation is performed on the quantum state of the second register, and the selected target state transition operation and measurement evolution operation are then performed on the second register after the measurement evolution operation to obtain the updated first energy and second energy.

[0019] Another embodiment of this application provides an optimization problem solving apparatus, the apparatus comprising:

[0020] The first acquisition module is used to perform a measurement evolution operation on the initial quantum state of the first register storing feasible solutions to the problem to be solved, and to obtain the first energy corresponding to an eigenstate of the Hamiltonian of the problem to be solved;

[0021] The second acquisition module is used to perform the currently determined target state transition operation and measurement evolution operation on the first register of the measurement evolution operation to obtain the second energy corresponding to another eigenstate of the Hamiltonian of the problem to be solved, wherein the target state transition operation is determined by the Hamiltonian of the problem to be solved;

[0022] The determination module is used to determine, based on the first energy and the second energy, the eigenstate corresponding to the second energy that meets the Metropolis acceptance criterion as the target solution to the problem to be solved.

[0023] One embodiment of this application provides a storage medium storing a computer program, wherein the computer program is configured to implement the method described in any of the above-described embodiments when running.

[0024] One embodiment of this application provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to implement the method described in any of the above-described embodiments.

[0025] Compared with existing technologies, this application first performs a measurement evolution operation on the initial quantum state of the first register storing feasible solutions to the problem to be solved, obtaining a first energy corresponding to an eigenstate of the Hamiltonian of the problem to be solved; then, it performs a target state transition operation and a measurement evolution operation on the first register of the measurement evolution operation to obtain a second energy corresponding to another eigenstate of the Hamiltonian of the problem to be solved; finally, based on the first energy and the second energy, it determines the eigenstate corresponding to the second energy that meets the Metropolis acceptance criterion as the target solution to the problem to be solved. In this application, quantum computing is used to perform state transitions and obtain the energies of the quantum states before and after the transition. Based on the two energies, the Metropolis acceptance criterion is used to determine whether the target solution has been obtained, thus realizing the solution of optimization problems using Metropolis and quantum computing. Attached Figure Description

[0026] Figure 1 This is a network block diagram of an optimization problem solving system provided in an embodiment of this application;

[0027] Figure 2 A flowchart illustrating an optimization problem-solving method provided in an embodiment of this application;

[0028] Figure 3 A flowchart illustrating another optimization problem-solving method provided in this application embodiment;

[0029] Figure 4 This is a schematic diagram of an optimization problem solving device provided in an embodiment of this application. Detailed Implementation

[0030] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0031] Figure 1This is a network block diagram of an optimization problem solving system provided in an embodiment of this application. The optimization problem solving system may include a network 110, a server 120, a wireless device 130, a client 140, a storage unit 150, a classical processing system 160, a quantum processing system 170, and may also include additional memory, classical processor, quantum processor and other devices not shown.

[0032] Network 110 is a medium used to provide communication links between various devices and computers connected together within an optimization problem-solving system, including but not limited to the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The connection method can be wired, wireless communication links, or fiber optic cables.

[0033] Server 120 and client 140 are conventional data processing systems that may contain data and applications or software tools that perform conventional computational processes. Client 140 may be a personal computer or a network computer, so the data may also be provided by server 120. Wireless device 130 may be a smartphone, tablet, laptop, smart wearable device, etc. Storage unit 150 may include database 151, which can be configured to store data such as qubit parameters, quantum logic gate parameters, quantum circuits, and quantum programs.

[0034] The classical processing system 160 (quantum processing system 170) may include a classical processor 161 (quantum processor 171) for processing classical data (quantum data) and a memory 163 (memory 172) for storing classical data (quantum data). The classical data (quantum data) may be a boot file, an operating system image, and an application program 162 (application program 173). The application program 162 (application program 173) may be used to implement a quantum algorithm compiled according to the optimization problem solving method provided in the embodiments of this application.

[0035] Any data or information stored or generated in the classical processing system 160 (quantum processing system 170) can also be configured to be stored or generated in another classical (quantum) processing system in a similar manner, and any application executed therein can also be configured to be executed in another classical (quantum) processing system in a similar manner.

[0036] It should be noted that a true quantum computer has a hybrid structure, which includes at least... Figure 1 The system consists of two main parts: the classical processing system 160, which is responsible for performing classical calculations and control; and the quantum processing system 170, which is responsible for running quantum programs and thus realizing quantum computing.

[0037] The aforementioned classical processing system 160 and quantum processing system 170 can be integrated into a single device or distributed across two different devices. For example, the first device, including the classical processing system 160, runs a classical computer operating system that provides quantum application development tools and services, as well as the storage and network services required for quantum applications. Users develop quantum applications using the quantum application development tools and services on the second device and send the quantum program to the second device, including the quantum processing system 170, via the network services. The second device runs a quantum computer operating system, which parses the code of the quantum program and compiles it into instructions that can be recognized and executed by the quantum computer control system. The quantum processor 170 then implements the quantum algorithm corresponding to the quantum program based on these instructions.

[0038] In the classic silicon-based processing system 160, the units of the classic processor 161 are CMOS transistors. These computing units are not limited by time or coherence; that is, they are available at any time without time constraints. Furthermore, the number of these computing units in a silicon chip is sufficient; currently, a classic processor contains tens of thousands of computing units. The sufficient number of computing units and the fixed selectable computing logic of the CMOS transistors, such as AND logic, allow for computational efficiency through a combination of numerous CMOS transistors and limited logic functions.

[0039] Unlike the logic units in the classical processing system 160, the basic computational unit of the quantum processor 171 in the quantum processing system 170 is the qubit. The input of a qubit is limited by coherence and coherence time; that is, a qubit is limited by its available usage time and is not always readily available. Making full use of qubits within their available usage time is a key challenge in quantum computing. Furthermore, the number of qubits in a quantum computer is one of the representative indicators of its performance. Each qubit performs computational functions through on-demand configured logic functions. Given the limited number of qubits and the diverse logic functions available in quantum computing, such as Hadamard gates (H gates), Pauli-X gates (X gates), Pauli-Y gates (Y gates), Pauli-Z gates (Z gates), X gates, RY gates, RZ gates, CNOT gates, CR gates, iSWAP gates, Tofoli gates, etc., quantum computing requires combining a limited number of qubits with diverse logic function combinations to achieve computational effects.

[0040] Based on these differences, the design of logical functions applied to qubits (including the design of whether qubits are used and the design of the efficiency of each qubit) is crucial to improving the computational performance of quantum computers and requires special design. The aforementioned design considerations for qubits are technical problems that ordinary computing devices do not need to address. Therefore, this application proposes an optimization problem-solving method and apparatus to address how to implement the Metropolis algorithm for solving optimization problems in quantum computing, aiming to solve optimization problems using the Metropolis algorithm and quantum computing.

[0041] See Figure 2 , Figure 2 A flowchart illustrating an optimization problem-solving method provided in this application embodiment may include the following steps:

[0042] S201: Perform a measurement evolution operation on the initial quantum state of the first register storing feasible solutions to the problem to be solved, and obtain the first energy corresponding to an eigenstate of the Hamiltonian of the problem to be solved.

[0043] The initial quantum state is determined based on the problem to be solved; different problems may correspond to different initial quantum states. During the initial solution process, the feasible solution can be a conjectured solution to the problem, a known solution obtained empirically, and so on. The Hamiltonian of the problem to be solved can be obtained in advance; specifically, it can be obtained based on the mapping relationship between the optimization problem and the Hamiltonian, or it can be constructed through analysis of the problem. The first register is used to store the quantum states of the currently studied quantum system (the problem to be solved). The stored quantum states include the initial quantum state, which is the quantum state of the first register at the beginning of each iteration of the smallest unit during the iterative solution process. A measurement evolution operation is performed on the initial quantum state; the measured quantum state collapses to a certain eigenstate of the Hamiltonian of the problem to be solved. This can be called the first eigenstate, and the energy corresponding to the measured eigenstate is the first energy.

[0044] In some possible embodiments of this application, the measurement evolution operation can be a quantum phase estimation operation and a measurement operation. Specifically, the operation can be:

[0045] Perform a QPE operation on the initial quantum state of the first register (which is in its initial quantum state) and the third register (which is in its 0 state).

[0046] A measurement operation is performed on the third register to obtain the first energy corresponding to an eigenstate of the Hamiltonian of the problem to be solved.

[0047] QPE (quantum phase estimation) is a quantum computing operation based on the quantum Fourier transform, which can provide a certain degree of accuracy in estimating the phase of a target quantum state. For a quantum state with n qubits, phase estimation requires an additional r qubits as auxiliary bits, the specific size of which depends on the required accuracy. According to relevant theoretical derivations, generally speaking:

[0048]

[0049] Here, ε is the required estimation accuracy. The phase estimation operation is performed on these n+r qubits, storing the phase information of the original n-qubit quantum state into the computational basis of the auxiliary qubits.

[0050] Specifically, the QPE operation can evolve |ψ>|0>. Specifically, it constructs a unitary gate U = e^(-ψ) using quantum simulation of the Hamiltonian H of the problem to be solved. iHθ The QPE operation obtains the eigenvalues ​​of U. Since Hamilton is the energy operator, in quantum mechanics, the obtained eigenvalues ​​are equivalent to energy. |ψ> is the initial quantum state stored in the first register, which can be a superposition of several H eigenstates. Phase estimation is performed on it to obtain... Where E j Actually, it's E j The binary representation of θ / 2π. After measurement, a specific value is obtained. At this point, E can be... k It can be considered a classic piece of information.

[0051] In this application, the first register and the third register are quantum registers, each of which can include multiple qubits. The number of qubits in each quantum register can be determined based on the data stored. The number of qubits in the first register is determined by the problem to be solved, specifically by the problem size. Performing a QPE operation on the first and third registers changes the quantum state of the first register from |ψ> to... The qubits in the third register are the auxiliary qubits mentioned above. The number of qubits is determined by the initial quantum state and the estimation accuracy. The quantum state of the third register is 0. Since the quantum states of the first and third registers are entangled due to the QPE operation, when measuring the third register, the quantum state of the first register is... Collapsed to Simultaneously, the first energy E is obtained. k After obtaining the first energy, the third register is reset so that the quantum state of the third register is 0, which facilitates subsequent operations.

[0052] S202: Execute the currently determined target state transition operation and measurement evolution operation on the first register of the measurement evolution operation to obtain the second energy corresponding to another eigenstate of the Hamiltonian of the problem to be solved, wherein the target state transition operation is determined by the Hamiltonian of the problem to be solved.

[0053] After the measurement evolution operation on the first register, the quantum state currently stored in the first register is the eigenstate corresponding to the first energy, which can be called the first eigenstate. Performing a target state transition operation on the first eigenstate causes it to evolve into a new quantum state. Performing a measurement evolution operation on the new quantum state yields the second energy. The target state transition operation updates the first eigenstate, transforming it from one quantum state to another that represents the solution to the problem, similar to the state transition operation in classical algorithms.

[0054] The target state transition operation can be determined iteratively from the set of state transition operations. In each minimum iteration unit, the target state transition operation needs to be determined from the set of state transition operations. The set of state transition operations is a unitary set of operations {S}, which needs to satisfy the detailed balance condition for state transitions. The detailed balance condition for state transitions is the detailed balance condition for Markov chains. The specific unitary operations are related to the Hamiltonian of the problem to be solved and can be pre-set for the problem. Specifically, different sets of state transition operations can be set based on different problems, but the only requirement is that the probability of selecting S must be equal to the probability of selecting... A set of state transition operations transforms a quantum state representing one solution to a problem into a quantum state representing one or more other solutions to the problem. When the problem is a molecular docking problem, the set of state transition operations is a set of operations that implement multiple molecular docking methods. A unitary operation can transform a first eigenstate representing a docking method into a second quantum state containing at least one docking method. When the problem is a coloring problem, the set of state transition operations is a set of operations that implement multiple coloring effects. Specifically, a unitary operation can flip the state of a specific qubit in the first eigenstate, evolving the first eigenstate into a second quantum state.

[0055] In this embodiment, a state transition operation can be randomly selected or selected in another manner that satisfies the detailed balance condition as the target state transition operation, and applied to the first eigenstate such that the first eigenstate... Updated to That is, the quantum state stored in the first register is from the first eigenstate. Update to the new quantum state By performing QPE operations and measurement operations on the new quantum state, the second energy E can be obtained. i The QPE operations and measurements for the new quantum state are the same as those for the first quantum state.

[0056] Different first eigenstates can be evolved using different target state transition operations. The evolution result of the first eigenstate is measured, and the evolution result collapses to another eigenstate of the Hamiltonian of the problem to be solved. This eigenstate can be called the second eigenstate.

[0057] In some possible embodiments of this application, the step of performing the currently determined target state transition operation and the measurement evolution operation on the first register of the measurement evolution operation to obtain the second energy corresponding to another eigenstate of the Hamiltonian of the problem to be solved includes:

[0058] Obtain a set of state transition operations, and select one from the set of state transition operations as the target state transition operation;

[0059] Perform a target state transfer operation on the first register to evolve the quantum state of the first quantum register from the first eigenstate to a new quantum state;

[0060] Based on the new quantum state, the second energy corresponding to another eigenstate of the Hamiltonian of the problem to be solved is obtained by using QPE operations and measurement operations.

[0061] S203: Based on the first energy and the second energy, determine the eigenstate corresponding to the second energy that meets the Metropolis acceptance criterion as the target solution to the problem to be solved.

[0062] The first and second energies can be in classical data form, specifically stored in classical registers. The Metropolis acceptance criterion is determined based on the difference between the first and second energies. When the Metropolis acceptance criterion is met, it indicates that the target solution to the problem has been obtained: the optimal solution or a near-optimal solution. At this point, the second eigenstate can be determined as the target solution. Specifically, there is a certain relationship between the second eigenstate and the target solution. How to process the second eigenstate to obtain the target solution varies depending on the problem. For some optimization problems, the solution corresponding to the second eigenstate can be used as the target solution; for other optimization problems, the second eigenstate can be measured multiple times, and the solution with the highest probability can be selected as the target solution.

[0063] Reaching the Metropolis acceptance criterion can include an acceptance condition determined based on a first energy and a second energy, and a preset iteration termination condition. The acceptance condition is used to determine whether to accept the eigenstate corresponding to the second energy, specifically, it can be based on the difference between the first energy and the second energy. The acceptance condition can be calculated first. Where β = 1 / T, T is the current annealing temperature. Then, the relationship between the generated random number and f is calculated. Based on this relationship, it is determined whether to accept the eigenstate corresponding to the second energy. This could be: if it is less than f, accept; if it is not less than f, reject. Alternatively, it could be calculated first... Based on the magnitude of f and a given number, determine whether to accept the eigenstate corresponding to the second energy. This number can be a fixed number, a random number that changes with iteration, or a value calculated beforehand. Then, the ratio of f to a random number is calculated, and based on the relationship between this ratio and a fixed number, it is determined whether to accept the second eigenstate. In this embodiment, after measuring the first energy and the second energy, the corresponding energies are sent to the classical processor. After obtaining the second energy, the classical processor determines whether the Metropolis acceptance criterion is met, thereby determining whether the target solution is obtained.

[0064] In this embodiment, an iteration at an annealing temperature is considered a basic iterative unit. Within a basic iterative unit, each iteration that determines whether the Metropolis acceptance criterion is met constitutes a minimum iterative unit. When the number of times the second eigenstate is accepted, determined by the acceptance condition, reaches a preset threshold within a basic iterative unit, the annealing temperature is increased, and the operation of the next basic iterative unit begins. The preset termination condition can be that within a basic iterative unit, the second energy obtained is the same or the difference is within a preset range for several consecutive iterations (the specific value can be set according to the actual situation), indicating that the second eigenstate includes the optimal solution or near-optimal solution to the problem to be solved, at which point the iteration can be terminated. Alternatively, the iteration can be terminated when a basic iterative unit ends and the annealing temperature reaches the preset temperature; or when a basic iterative unit ends and the number of iterations in the basic iterative unit has reached the preset threshold. Of course, other termination conditions can also exist, as long as they conform to the characteristics of the classical simulated annealing algorithm, which will not be elaborated here.

[0065] In some embodiments of this application, if the eigenstate corresponding to the second energy is accepted but the preset iteration termination condition is not met, the method may further include:

[0066] After performing the same target state transition operation on the quantum state of the second register to obtain the second energy, a measurement evolution operation is then performed on the second register that performed the target state transition operation. The currently determined target state transition operation and measurement evolution operation are then performed on the second register that performed the measurement evolution operation to obtain the updated first energy and second energy. The quantum state of the second register is the conjugate state of the initial quantum state of the first register.

[0067] In some specific embodiments of this application, the conjugate state of the initial quantum state is obtained by performing a conjugate state backup operation on a first register whose quantum state is the initial quantum state and a second register whose quantum state is 0.

[0068] One of the difficulties in the quantum generalization of the classical Metropolis algorithm lies in the retention / rejection step of the newly generated states. Taking the solution of the optimal molecular configuration as an example, in the classical algorithm, starting from a system configuration C... old Starting from C old The operation yields a new configuration C. new Afterwards, a copy of the old configuration can still be retained. After comparing the energy differences between the old and new configurations, the new configuration is accepted with a certain probability, weighted by the energy difference. However, for quantum computing, C... old It must be stored in a set of qubits, and a new configuration C is obtained after performing a state transfer operation on the configuration. new Subsequently, performing energy measurements would inevitably lead to irreversible collapse, resulting in the loss of information from the old configuration. In this application, information from the old configuration is preserved through conjugate state backup, making it possible to return to the old configuration from the new configuration.

[0069] In a basic iterative unit, at the start of an iteration, the first register stores the initial quantum state, and the second register is in the 0 state. An H gate is applied to the first quantum register, and then a CNOT gate controlled by the first register is applied to the second register, so that the two quantum registers are in a maximally entangled state. The prepared maximally entangled state can be represented as a linear superposition of all eigenstates and their conjugate entangled states:

[0070]

[0071] If the phase of the first register is estimated and measured, the result will collapse to a certain eigenstate |ψ i The second register, being entangled, will also collapse into its conjugate state. Since the energy eigenvalues ​​of the conjugate state correspond to the conjugate H of the original Hamiltonian... * Therefore, when it is necessary to reject the second eigenstate in a subsequent step, it is not necessary to re-prepare the first eigenstate; instead, the conjugate state stored in the second register can be used.

[0072] For an optimization problem-solving system comprising both quantum and classical processing systems, the quantum processing system sends a first energy and a second energy to the classical processing system. After receiving the two energies, the classical processing system determines whether the Metropolis acceptance criterion is met. If not, it feeds back the result to the quantum processing system, which then proceeds to the next step. It's important to note that after determining the target state transition operation, the quantum processing system needs to record this information. When accepting the second eigenstate, it needs to apply the same target state transition operation to the conjugate state of the first eigenstate. For example, the target state transition operation applied to the first eigenstate is S1, and the target state transition operation applied to the conjugate state of the first eigenstate is also S1. The purpose of this operation is to transform the conjugate state of the first eigenstate into the aforementioned new quantum state, thereby achieving the acceptance of the second eigenstate, i.e., accepting the update of the quantum state.

[0073] In some possible embodiments of this application, after performing the same target state transition operation on the quantum state of the second register to obtain the second energy, a measurement evolution operation is then performed on the second register of the target state transition operation, and the currently determined target state transition operation and measurement evolution operation are performed on the second register of the measurement evolution operation to obtain an updated first energy and second energy. The quantum state of the second register is the conjugate state of the initial quantum state of the first register, and may include:

[0074] Performing a target state transition operation on the second register is the same as obtaining the second energy, causing the quantum state of the second register to evolve from the conjugate state of the first eigenstate to a new initial quantum state, wherein the conjugate state of the first eigenstate is obtained by measuring the conjugate state of the first quantum state;

[0075] The second register is used as the new first register, and the original first register is reset and used as the new second register.

[0076] When the second eigenstate is accepted, the quantum state of the second register is the conjugate state of the first eigenstate. Because the second register is entangled with the quantum state of the first register, when the quantum state of the first register collapses from its initial quantum state to the first eigenstate, the quantum state of the second register collapses from its conjugate state to the conjugate state of the first eigenstate. The conjugate state of the initial quantum state of the second register can be obtained through backup or through other means.

[0077] After the second register performs the corresponding target state transition operation, the quantum state becomes a new quantum state. This new quantum state needs to be used as the new initial quantum state. Specifically, the second register can be used as the new first register, and the original first register can be reset and used as the new second register. For example, the third register is used to assist in performing the QPE operation, including qubits q0-q3, the first register includes qubits q4-q7, and the second register includes qubits q8-q10. If the second eigenstate is accepted, q0-q7 are cleared, and after performing a target state transition operation on q8-q10, q8-q10 are renamed to q4-q7, and the original q4-q7 are renamed to q8-q10, then the iteration continues.

[0078] In some embodiments of this application, if the eigenstate corresponding to the second energy is rejected but the preset iteration termination condition is not met, the method may further include:

[0079] A measurement evolution operation is performed on the quantum state of the second register, and the selected target state transition operation and measurement evolution operation are then performed on the second register after the measurement evolution operation to obtain the updated first energy and second energy.

[0080] When the eigenstate corresponding to the second energy is rejected but the preset iteration termination condition is not met, it indicates that the updated solution may be inferior to the original solution. Therefore, the quantum state update is rejected, and evolution resumes with the first eigenstate. However, since the first eigenstate has already changed through the target state transition operation, it cannot be obtained again. In this case, the second register can be manipulated. The second register stores the conjugate state of the first eigenstate, and this conjugate state is used as the new initial quantum state. The same operation used to obtain the first and second energies is performed on the second register. Specifically, the second register can be used as the new first register, and the original first register can be reset and used as the new second register.

[0081] The second register currently stores the conjugate state of the first eigenstate. For the convenience of subsequent operations, the current second register needs to be used as the new first register, that is, the number of the quantum register is changed, and the original first register is used as the new second register. Based on the above operations, the conjugate state of the first eigenstate becomes the new initial quantum state.

[0082] As can be seen, this application first performs a measurement evolution operation on the initial quantum state of the first register storing feasible solutions to the problem to be solved, obtaining the first energy corresponding to an eigenstate of the Hamiltonian of the problem to be solved; then, it performs a target state transition operation and a measurement evolution operation on the first register of the measurement evolution operation to obtain the second energy corresponding to another eigenstate of the Hamiltonian of the problem to be solved; finally, based on the first energy and the second energy, it determines the eigenstate corresponding to the second energy that meets the Metropolis acceptance criterion as the target solution to the problem to be solved. In this application, quantum computing is used to perform state transitions and obtain the energies of the quantum states before and after the transition. Based on the two energies, the Metropolis acceptance criterion is used to determine whether the target solution has been obtained, thus realizing the solution of the optimization problem using Metropolis and quantum computing.

[0083] Figure 3 This is a flowchart illustrating another optimization problem-solving method provided in this application. A first register stores the quantum states of the quantum system under study (the problem to be solved), a second register is used to back up the conjugate state of the first quantum state, and a third quantum register assists in the QPE operation. After the quantum state in the first register is backed up, a QPE operation is performed, then the first energy is measured and recorded, stored in a classical register, and the third register is reset. Then, a selected state transition operation (target state transition operation) is performed on the quantum state in the first register, followed by the QPE operation and measurement operation to obtain the second energy. Then, based on the energy stored in the classical register, it is determined whether to accept a state update. Based on the determination result, the initial quantum state required for the next iteration is determined, and the process continues. Figure 3 The operation shown.

[0084] See Figure 4 , Figure 4 This is a schematic diagram of the structure of an optimization problem solving device provided in an embodiment of this application. Figure 2 Corresponding to the process shown, the apparatus includes:

[0085] The first acquisition module 401 is used to perform a measurement evolution operation on the initial quantum state of the first register storing feasible solutions to the problem to be solved, and to obtain the first energy corresponding to an eigenstate of the Hamiltonian of the problem to be solved;

[0086] The second acquisition module 402 is used to perform the currently determined target state transition operation and measurement evolution operation on the first register of the measurement evolution operation to obtain the second energy corresponding to another eigenstate of the Hamiltonian of the problem to be solved, wherein the target state transition operation is determined by the Hamiltonian of the problem to be solved;

[0087] The determination module 403 is used to determine, based on the first energy and the second energy, the eigenstate corresponding to the second energy that meets the Metropolis acceptance criterion as the target solution to the problem to be solved.

[0088] In some possible implementations of this application, the measurement evolution operation can be a quantum phase estimation operation and a measurement operation.

[0089] In some possible embodiments of this application, the target state transition operation can be determined by iterative updating from the set of state transition operations;

[0090] The set of state transition operations can be determined by the Hamiltonian of the problem to be solved, and the set of state transition operations satisfies the detailed equilibrium condition for state transition.

[0091] In some possible implementations of this application, when the problem to be solved is a molecular docking problem, the set of state transition operations can be a set of operations that implement multiple molecular docking methods.

[0092] In some possible implementations of this application, when the problem to be solved is a coloring problem, the set of state transition operations can be a set of operations that achieve various coloring effects.

[0093] In some possible implementations of this application, achieving the Metropolis acceptance criterion includes an acceptance condition determined based on a first energy and a second energy, and a preset iteration termination condition, wherein the acceptance condition is used to determine whether to accept the eigenstate corresponding to the second energy.

[0094] In some possible embodiments of this application, the apparatus may further include:

[0095] The first operation module is configured to, if the eigenstate corresponding to the second energy is accepted but the preset iteration termination condition is not met, perform the same target state transfer operation on the quantum state of the second register as obtaining the second energy, then perform a measurement evolution operation on the second register that performed the target state transfer operation, and perform the currently determined target state transfer operation and measurement evolution operation on the second register that performed the measurement evolution operation to obtain the updated first energy and second energy, wherein the quantum state of the second register is the conjugate state of the initial quantum state of the first register.

[0096] In some possible embodiments of this application, the apparatus may further include:

[0097] The first operation module is used to perform a measurement evolution operation on the quantum state of the second register if the eigenstate corresponding to the second energy is rejected but the preset iteration termination condition is not met, and to perform the currently selected target state transfer operation and measurement evolution operation on the second register after the measurement evolution operation to obtain the updated first energy and second energy.

[0098] As can be seen, this application first performs a measurement evolution operation on the initial quantum state of the first register storing feasible solutions to the problem to be solved, obtaining the first energy corresponding to an eigenstate of the Hamiltonian of the problem to be solved; then, it performs a target state transition operation and a measurement evolution operation on the first register of the measurement evolution operation to obtain the second energy corresponding to another eigenstate of the Hamiltonian of the problem to be solved; finally, based on the first energy and the second energy, it determines the eigenstate corresponding to the second energy that meets the Metropolis acceptance criterion as the target solution to the problem to be solved. In this application, quantum computing is used to perform state transitions and obtain the energies of the quantum states before and after the transition. Based on the two energies, the Metropolis acceptance criterion is used to determine whether the target solution has been obtained, thus realizing the solution of optimization problems using Metropolis and quantum computing.

[0099] This application also provides a storage medium storing a computer program, wherein the computer program is configured to implement the steps in any of the above method embodiments when running.

[0100] Specifically, in this embodiment, the storage medium can be configured to store a computer program for implementing the following steps:

[0101] S201: Perform a measurement evolution operation on the initial quantum state of the first register storing feasible solutions to the problem to be solved, and obtain the first energy corresponding to an eigenstate of the Hamiltonian of the problem to be solved;

[0102] S202: Execute the currently determined target state transition operation and measurement evolution operation on the first register of the measurement evolution operation to obtain the second energy corresponding to another eigenstate of the Hamiltonian of the problem to be solved, wherein the target state transition operation is determined by the Hamiltonian of the problem to be solved;

[0103] S203: Based on the first energy and the second energy, determine the eigenstate corresponding to the second energy that meets the Metropolis acceptance criterion as the target solution to the problem to be solved.

[0104] This application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to implement the steps in any of the above method embodiments.

[0105] Specifically, the aforementioned electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the aforementioned processor, and the input / output device is connected to the aforementioned processor.

[0106] Specifically, in this embodiment, the processor described above can be configured to implement the following steps via a computer program:

[0107] S201: Perform a measurement evolution operation on the initial quantum state of the first register storing feasible solutions to the problem to be solved, and obtain the first energy corresponding to an eigenstate of the Hamiltonian of the problem to be solved;

[0108] S202: Execute the currently determined target state transition operation and measurement evolution operation on the first register of the measurement evolution operation to obtain the second energy corresponding to another eigenstate of the Hamiltonian of the problem to be solved, wherein the target state transition operation is determined by the Hamiltonian of the problem to be solved;

[0109] S203: Based on the first energy and the second energy, determine the eigenstate corresponding to the second energy that meets the Metropolis acceptance criterion as the target solution to the problem to be solved.

[0110] This application also provides a computer program product containing instructions that, when executed by a computer, cause the computer to perform the optimization problem solution in any of the above embodiments.

[0111] It is understood that in the various embodiments of this specification, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not limit the implementation process of the embodiments of this specification in any way.

[0112] It is understood that the various implementation methods described in this specification can be implemented individually or in combination, and the implementation methods in this specification are not limited in this respect.

[0113] Unless otherwise stated, all technical and scientific terms used in the embodiments of this specification have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this specification. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items. The singular forms "a," "the," and "the" as used in the embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0114] It is understood that the processor in the embodiments of this specification can be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this specification. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this specification can be directly implemented by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above methods.

[0115] It is understood that the memory in the embodiments of this specification may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM). It should be noted that the memory in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0116] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this specification.

[0117] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the aforementioned method implementations, and will not be repeated here.

[0118] In the several embodiments provided in this specification, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0119] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0120] In addition, the functional units in the various embodiments of this specification can be integrated into a processing system, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0121] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of this specification, in essence, or the parts that contribute to the prior art, or parts of the technical solutions, can be embodied in the form of software products. These computer software products are stored in a storage medium and include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this specification. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0122] The above description is merely a specific embodiment of this specification, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this specification should be included within the scope of protection of this specification. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for solving optimization problems, characterized in that, The method includes: The initial quantum state of the first register storing feasible solutions to the problem to be solved is measured and evolved to obtain the first energy corresponding to an eigenstate of the Hamiltonian of the problem to be solved. The first register of the measurement evolution operation is used to perform the currently determined target state transition operation and the measurement evolution operation to obtain the second energy corresponding to another eigenstate of the Hamiltonian of the problem to be solved. The target state transition operation is determined by the Hamiltonian of the problem to be solved, and the target state transition operation is determined by iteratively updating the set of state transition operations. The set of state transition operations is determined by the Hamiltonian of the problem to be solved and satisfies the detailed equilibrium condition for state transition. Based on the first energy and the second energy, the eigenstate corresponding to the second energy that meets the Metropolis acceptance criterion is determined as the target solution to the problem to be solved.

2. The method according to claim 1, characterized in that, The measurement evolution operation consists of a quantum phase estimation operation and a measurement operation.

3. The method according to claim 1, characterized in that, When the problem to be solved is a molecular docking problem, the set of state transition operations is a set of operations that implement multiple molecular docking methods.

4. The method according to claim 1, characterized in that, When the problem to be solved is a coloring problem, the set of state transition operations is a set of operations that achieve various coloring effects.

5. The method according to claim 1, characterized in that, Reaching the Metropolis acceptance criterion includes an acceptance condition determined based on a first energy and a second energy, and a preset iteration termination condition. The acceptance condition is used to determine whether to accept the eigenstate corresponding to the second energy.

6. The method according to claim 5, characterized in that, If the eigenstate corresponding to the second energy is accepted but the preset iteration termination condition is not met, the method further includes: After performing the same target state transition operation on the quantum state of the second register to obtain the second energy, a measurement evolution operation is then performed on the second register that performed the target state transition operation. The currently determined target state transition operation and measurement evolution operation are then performed on the second register that performed the measurement evolution operation to obtain the updated first energy and second energy. The quantum state of the second register is the conjugate state of the initial quantum state of the first register.

7. The method according to claim 5, characterized in that, If the eigenstate corresponding to the second energy is rejected but the preset iteration termination condition is not met, the method further includes: A measurement evolution operation is performed on the quantum state of the second register, and the selected target state transition operation and measurement evolution operation are then performed on the second register after the measurement evolution operation to obtain the updated first energy and second energy.

8. An optimization problem solving apparatus, characterized in that, The device includes: The first acquisition module is used to perform a measurement evolution operation on the initial quantum state of the first register storing feasible solutions to the problem to be solved, and to obtain the first energy corresponding to an eigenstate of the Hamiltonian of the problem to be solved; The second acquisition module is used to execute the currently determined target state transition operation and measurement evolution operation on the first register of the measurement evolution operation to obtain the second energy corresponding to another eigenstate of the Hamiltonian of the problem to be solved. The target state transition operation is determined by the Hamiltonian of the problem to be solved, and the target state transition operation is determined by iteratively updating the set of state transition operations. The set of state transition operations is determined by the Hamiltonian of the problem to be solved and the set of state transition operations satisfies the detailed equilibrium condition for state transition. The determination module is used to determine, based on the first energy and the second energy, the eigenstate corresponding to the second energy that meets the Metropolis acceptance criterion as the target solution to the problem to be solved.

9. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to implement the method described in any one of claims 1 to 7 when it is run.

10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to implement the method of any one of claims 1 to 7.