Method and device for determining the state of a target object through a quantum circuit

By dividing the target object into different parts and using quantum circuits to evolve the Hamiltonian of each part, the limitations of efficiency and accuracy in solving the combinatorial optimization problem are solved, and a more efficient and accurate solution effect is achieved.

CN115423107BActive Publication Date: 2025-05-16HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110522812.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-13
Publication Date
2025-05-16
Estimated Expiration
2041-05-13

AI Technical Summary

Technical Problem

Quantum computing has limitations in efficiency and accuracy in solving combinatorial optimization problems, especially on large-scale problems, which are difficult to effectively solve in the existing technology.

Method used

The state of each part is determined by dividing the target object into different parts and evolving the Hamiltonian of each part using quantum circuits, thereby determining the state of the entire target object. This method reduces the operating object scale of quantum circuits and reduces simulation time and error.

Benefits of technology

By reducing the operating object scale of quantum circuits, the simulation time is shortened, the error and optimization difficulty are reduced, and the solution efficiency and accuracy of combined optimization problems are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115423107B_ABST
    Figure CN115423107B_ABST
Patent Text Reader

Abstract

A method and device for determining the state of a target object by a quantum circuit. According to the method, the quantum circuit evolves a first Hamiltonian corresponding to a first portion of the target object to obtain a first state of the first portion of the target object. Based on the first state of the first portion of the target object, the quantum circuit evolves a second Hamiltonian corresponding to a second portion of the target object and a link connecting the first portion and the second portion to determine a second state of the second portion of the target object. Based on the second state of the second portion of the target object, the quantum circuit evolves a third Hamiltonian corresponding to the first portion of the target object and a link connecting the first portion and the second portion to determine a third state of the first portion of the target object, and determines the state of the target object based on the second state of the second portion of the target object and the third state of the first portion of the target object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure generally relate to the field of quantum computing, and more particularly to methods and devices for determining a state of a target object through a quantum circuit. Background Art

[0002] The field of quantum computing is one of the hottest fields in recent years. Quantum computing is an interdisciplinary subject that integrates physics, information science, computer science and other disciplines. Its main purpose is to create a practical quantum computer. As the basic computing unit of quantum computing, the quantum bit (Qubit) is a real hardware system created to simulate the quantum energy level system in physics. Classical bits exist in the form of either 0 or 1 in classical computers, corresponding to low and high levels respectively. Classical bits can only represent one state at the same time. Different from classical bits, quantum bits exist in the form of probability. At a certain time, it can have cos 2 The probability of (θ) exists in the 0 state, and the ... 2 The probability of (θ) exists in the 1 state. Before measurement, it can be considered that a quantum bit "simultaneously" represents the 0 state and the 1 state. After measurement, the quantum bit will collapse to a certain state. A quantum bit is usually represented by the following formula (1):

[0003] |qubit)=cos(θ)|o)+sin(θ)|1> (1)

[0004] With this unique structure, quantum computers have two major advantages that classical computers do not have:

[0005] 1. If the representation space of each quantum bit is 2, then the representation space of n quantum bits is 2 n , so the representation space of quantum computers grows exponentially. When the number of quantum bits reaches 50, the resulting representation space is close to the sum of the amount of information stored in all storage units in the world; 2. Quantum computing can control the amplitude, phase and other information of quantum bits through quantum bit gates. Therefore, for the quantum bit gates used in the calculation, it is equivalent to acting in the entire representation space and controlling all representation states at the same time. Therefore, quantum computing is actually a fully parallel calculation, and its calculation speed will have a natural advantage.

[0006] Nevertheless, there is still room for further improvement in quantum computing in problem solving, especially in solving combinatorial optimization problems. Summary of the invention

[0007] In view of the above problems, embodiments of the present disclosure are intended to provide a method and device for determining the state of a target object through a quantum circuit.

[0008] According to the first aspect of the present disclosure, a method for determining the state of a target object by a quantum circuit is provided. The method comprises: the quantum circuit evolves a first Hamiltonian corresponding to a first part of the target object to obtain a first state of the first part of the target object; based on the first state of the first part of the target object, the quantum circuit evolves a second Hamiltonian corresponding to a second part of the target object and a link connecting the first part and the second part to determine a second state of the second part of the target object; based on the second state of the second part of the target object, the quantum circuit evolves a third Hamiltonian corresponding to the first part of the target object and a link connecting the first part and the second part to determine a third state of the first part of the target object; and based on the second state of the second part of the target object and the third state of the first part of the target object, determines the state of the target object.

[0009] According to the embodiments of the present disclosure, by dividing the target object into different parts, the scale of the operation object of the quantum circuit can be reduced, thereby greatly shortening the simulation time. For real quantum simulation, after the scale of the operation object of the quantum circuit is reduced, the number and difficulty of sampling will be reduced. In addition, when the scale of the target object is reduced, the number of quantum gates used in the quantum simulation process will also be greatly reduced. For smaller Hamiltonians, the evolution of the Hamiltonian can be completed using fewer quantum gate operations. In the case where the quantum gate operation has errors, reducing the number of quantum gates can reduce the cumulative errors caused by multiple operations. In addition, the depth of the quantum circuit will increase with the increase in scale. In addition to increasing the number of operation gates, the increase in depth will also bring more parameters, increasing the difficulty of parameter optimization. By reducing the scale of the operation object of the quantum circuit, the number of optimization layers required to achieve the same accuracy can also be reduced, which accelerates the optimization process.

[0010] In some embodiments, the first portion of the target object includes a first number of nodes, the second portion of the target object includes a second number of nodes, the target object includes a third number of nodes, and the quantum circuit includes a fourth number of quantum bits, wherein the third number is greater than the fourth number, and the first number and the second number are both less than or equal to the fourth number. By reducing the scale of the target object, not only can the efficiency of optimization be improved, the difficulty and error of optimization be reduced, but also problems of a larger scale than the number of quantum bits of the quantum circuit can be solved.

[0011] In some embodiments, the first part of the target object includes an edge node connected to the second part of the target object, and the number of links between the edge node and the node of the first part of the target object is greater than or equal to the number of links between the edge node and the node of the second part. The fewer the number of links between the first part and the second part, the weaker the coupling between the first part and the second part, the better the effect of optimizing the two parts separately, and the lower the difficulty of joint optimization.

[0012] In some embodiments, the first portion of the target object includes a first number of nodes, the second portion of the target object includes a second number of nodes, and the difference between the first number and the second number is less than or equal to a predetermined threshold. By optimizing the first portion and the second portion to have similar sizes, the requirements for the number of qubits contained in the quantum circuit can be further reduced. For example, if the target object has 100 nodes, the 100 nodes are divided into 50 nodes, and a quantum circuit of 50 qubits can be used to determine the state of the target object.

[0013] In some embodiments, the first portion of the target object includes an edge node connected to the second portion of the target object, and evolving the second Hamiltonian includes: evolving the second Hamiltonian based on a first state of the edge node of the first portion of the target object. The second Hamiltonian may not reflect the internal nodes of the first portion of the target object, but only the edge nodes of the first portion of the target object, so as to facilitate the optimization operation.

[0014] In some embodiments, evolving the second Hamiltonian based on the first state of the edge nodes of the first part of the target object includes: selecting edge nodes whose first state is a determined state from the edge nodes of the first part of the target object; and evolving the second Hamiltonian based on the first state of the edge nodes whose first state is a determined state. By selecting edge nodes whose states are determined, optimization can be performed in a targeted manner, thereby improving optimization efficiency and accuracy.

[0015] In some embodiments, evolving the third Hamiltonian based on the second state of the second part of the target object includes: merging the first state of the first part of the target object and the second state of the second part of the target object to determine the first intermediate state of the target object; optimizing the first intermediate state of the target object by flipping the first intermediate state of the node of the target object to obtain the second intermediate state of the target object; and evolving the third Hamiltonian based on the second intermediate state of the second part of the target object. For example, after flipping the node of the target object, if the state of the target object is better, when optimizing the second intermediate state, the second intermediate state is changed to the state after flipping; conversely, after flipping the node of the target object, if the state of the target object is worse, when optimizing the second intermediate state, the second intermediate state is still maintained. The accuracy of the optimization can be further improved by the scanning operation.

[0016] In some embodiments, the second portion of the target object includes an edge node connected to the first portion of the target object, and evolving the third Hamiltonian based on a second intermediate state of the second portion of the target object includes evolving the third Hamiltonian based on the second intermediate state of the edge node of the second portion of the target object.

[0017] In some embodiments, based on the second state of the second part of the target object and the third state of the first part of the target object, determining the state of the target object includes: merging the second state of the second part of the target object and the third state of the first part of the target object to determine the third intermediate state of the target object; and optimizing the third intermediate state of the target object by flipping the third intermediate state of the node of the target object to determine the state of the target object. For example, after flipping the node of the target object, if the state of the target object is better, when optimizing the third intermediate state, the third intermediate state is changed to the state after flipping; conversely, after flipping the node of the target object, if the state of the target object is worse, when optimizing the third intermediate state, the third intermediate state is still maintained. Through the scanning operation, the accuracy of the optimization can be further improved.

[0018] According to a second aspect of the present disclosure, a device for determining the state of a target object is provided. The device includes: a quantum circuit, configured to: evolve a first Hamiltonian corresponding to a first portion of the target object to obtain a first state of the first portion of the target object; based on the first state of the first portion of the target object, evolve a second Hamiltonian corresponding to a second portion of the target object and a link connecting the first portion and the second portion to determine a second state of the second portion of the target object; based on the second state of the second portion of the target object, evolve a third Hamiltonian corresponding to the first portion of the target object and a link connecting the first portion and the second portion to determine a third state of the first portion of the target object; and a processor, configured to determine the state of the target object based on the second state of the second portion of the target object and the third state of the first portion of the target object.

[0019] In some embodiments, the first portion of the target object includes a first number of nodes, the second portion of the target object includes a second number of nodes, the target object includes a third number of nodes, and the quantum circuit includes a fourth number of quantum bits, wherein the third number is greater than the fourth number, and the first number and the second number are both less than or equal to the fourth number.

[0020] In some embodiments, the first part of the target object includes an edge node connected to the second part of the target object, and the number of links between the edge node and the nodes of the first part of the target object is greater than or equal to the number of links between the edge node and the nodes of the second part.

[0021] In some embodiments, the first portion of the target object includes a first number of nodes, the second portion of the target object includes a second number of nodes, and the difference between the first number and the second number is less than or equal to a predetermined threshold.

[0022] In some embodiments, the first portion of the target object includes an edge node connected to the second portion of the target object, and the quantum circuit is further configured to evolve the second Hamiltonian based on a first state of the edge node of the first portion of the target object.

[0023] In some embodiments, the processor is further configured to select, from the edge nodes of the first part of the target object, an edge node whose first state is a definite state, and the quantum circuit is further configured to evolve the second Hamiltonian based on the first state of the edge node whose first state is a definite state.

[0024] In some embodiments, the processor is further configured to merge a first state of a first portion of the target object and a second state of a second portion of the target object to determine a first intermediate state of the target object, and optimize the first intermediate state of the target object by flipping the first intermediate state of a node of the target object to obtain a second intermediate state of the target object, and the quantum circuit is further configured to evolve the third Hamiltonian based on the second intermediate state of the second portion of the target object.

[0025] In some embodiments, the second portion of the target object includes an edge node connected to the first portion of the target object, and the quantum circuit is further configured to evolve the third Hamiltonian based on a second intermediate state of the edge node of the second portion of the target object.

[0026] In some embodiments, the processor is further configured to: merge the second state of the second part of the target object and the third state of the first part of the target object to determine a third intermediate state of the target object; and optimize the third intermediate state of the target object by flipping the third intermediate state of the node of the target object to determine the state of the target object.

[0027] In a third aspect, the present application further provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer executes the method described in the first aspect and each possible implementation manner of the first aspect.

[0028] In a fourth aspect, the present application further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method described in the first aspect and various possible implementations of the first aspect.

[0029] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the disclosure, nor is it intended to limit the scope of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components in the exemplary embodiments of the present disclosure.

[0031] Figure 1 A schematic diagram of a quantum approximate optimization algorithm system according to some embodiments of the present disclosure is shown.

[0032] Figure 2 A flowchart of a method for determining a state of a target object according to some embodiments of the present disclosure is shown.

[0033] Figure 3 A diagram corresponding to a target object according to some embodiments of the present disclosure is shown.

[0034] Figure 4 A schematic diagram showing edge node states according to some embodiments of the present disclosure is shown.

[0035] Figure 5 A schematic diagram showing edge node states according to some embodiments of the present disclosure is shown.

[0036] Figure 6 A schematic diagram showing optimization results according to some embodiments of the present disclosure is shown.

[0037] Figure 7 A schematic diagram of a quantum classical hybrid system according to some embodiments of the present disclosure is shown.

[0038] Figure 8 A schematic diagram of a classical computer according to some embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0039] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0040] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects. The term "and / or" means at least one of the two items associated with it. For example, "A and / or B" means A, B, or A and B. Other explicit and implicit definitions may also be included below.

[0041] It should be understood that in the technical solutions provided by the embodiments of the present application, some repetitions may not be repeated in the introduction of the following specific embodiments, but these specific embodiments should be regarded as having been referenced to each other and can be combined with each other.

[0042] There are many ways to realize quantum computers, such as using the polarization of photons and other properties for simulation in optics, using the energy levels of ions for simulation in ion traps, and using Josephson junctions to simulate multi-level harmonic resonance cavities in superconductivity. Among them, superconducting quantum computers based on superconductors are considered to be one of the most likely solutions for realizing quantum computers because of their low noise, high integration, and excellent coherence.

[0043] Under such a quantum computing framework, the most promising quantum algorithms are divided into two categories. One is the related algorithms derived from quantum Fourier transform. Compared with the classical Fourier transform algorithm, quantum Fourier transform can improve the exponential level of acceleration. This algorithm also has important applications in classical problems such as finding function period, prime number decomposition, and password cracking. However, because its algorithm implementation requires extremely complex quantum logic gate circuits and a huge number of quantum bits, there has been no significant progress in recent years. The other is a series of quantum search algorithms derived from the Grover search algorithm. Although compared with classical search, quantum search algorithms can only achieve single root level acceleration, but for large-scale search problems or high-precision search problems, the performance of classical search algorithms has declined rapidly, and quantum search algorithms are very advantageous. In recent years, among quantum search algorithms, quantum variational algorithms have attracted widespread attention because of their many important advantages such as the combination of classical calculation methods and a certain hardware fault tolerance rate. Among them, variational quantum eigenvalue solution (VQE) and quantum approximate optimization algorithm (QAOA) have become the two most promising quantum variational algorithms due to their different characteristics. VQE is mainly used in molecular simulation, physical system simulation, etc., and can obtain high-precision results, while QAOA is more often used in combinatorial optimization problems, such as the classic Maxcut problem, MaxIndependent set (MIS), Satisfiability Problem, Traveling Salesman Problem, etc. When faced with large-scale featureless or unclear feature combinatorial optimization problems, the behavior of classical algorithms is more inclined to random generators, while QAOA can ensure that the correct solution is obtained without setting too many parameters to be optimized and building deep quantum circuits. This is a huge advantage of QAOA compared to classical algorithms.

[0044] However, due to the limitation of hardware technology, quantum computing is currently and may be in the noisy intermediate-scale quantum (NISQ) era for a long time, with the available physical bits being about 50-1000 bits. At the same time, the coherence time and gate fidelity of the system limit the depth of quantum circuits, which in turn limits the ability of quantum computers to solve larger-scale combinatorial optimization problems.

[0045] The embodiments of the present disclosure break through the limitations of existing hardware systems through the idea of ​​edge cutting and reuse of quantum bits, and then solve larger-scale combinatorial optimization problems. For example, for many combinatorial optimization problems, they can be converted into the Ising model after encoding, that is, the 2-well-posedness (2-SAT) problem. This type of problem can be abstracted into a two-dimensional plane graph, such as the traveling salesman problem, the traffic planning problem, the maximum flow-minimum cut in the network and other practical problems. Therefore, the cutting of the problem can be abstracted into the division of the edges of the graph. In some embodiments, after the combinatorial optimization problem to be solved is encoded into the corresponding Hamiltonian, the corresponding Hamiltonian is understood from the perspective of the graph. For example, some embodiments of the present disclosure are based on the edge cutting method, which decomposes a large Hamiltonian system into two or more subsystems, and solves the solutions of each subsystem one by one. In the solution process, multiple subsystems and coupling terms between subsystems can be jointly optimized to get as close as possible to the optimal solution of the original problem under the quantum circuit. The subsystem can reduce the number of sampling times at an exponential level and effectively reduce the depth of the circuit, thereby reducing the impact of errors at a certain number of layers and promoting the solution of the objective function to approach the ideal solution.

[0046] The quantum approximate optimization algorithm (QAOA) can be roughly understood as a complex of the discrete version and the variational version of the quantum annealing algorithm. The quantum approximate optimization algorithm can transform an adiabatic time-dependent evolution operator exp(-itH(t)) into a discrete quantum gate-based evolution according to Trotter decomposition, as shown in the following formula (2):

[0047]

[0048] in, represents the overall Hamiltonian, H C The Hamiltonian of the target object, H B represents the ground state Hamiltonian. For example, the adiabatic time-dependent evolution operator exp(-itH(t)) at time t0 is In t i Time is In t T Time is At the end of the evolution time t i =T, H(t) evolves to H C , that is, the Hamiltonian of the target object. The target object can be used to represent the target problem, and the state of the target object can be used to represent the solution to the target problem. Therefore, in some embodiments, the state of the target object can be used to solve the target problem. For the convenience of discussion, the following will be described in conjunction with solving the target problem, but it should be understood that the embodiments of the present disclosure can also be used in any other appropriate scenarios.

[0049] Theoretically, it can be proved that when the time segment is small enough, the above evolutionary algorithm can be approximated as an adiabatic algorithm. Considering that the depth of quantum circuits is very limited in the NISQ scenario, part of the complexity of the target problem can be handed over to classical computers to complete, which is the so-called quantum-classical hybrid framework.

[0050] Figure 1 Schematic diagram of a quantum approximate optimization algorithm (QAOA) system 100 according to some embodiments of the present disclosure is shown. Figure 1 As shown, the quantum computer is initialized to a superposition state |++++>, or The number of quantum bits 102 is N. As mentioned above, in the current hardware implementation, the number N of quantum bits 102 is about 50-1000.

[0051] exist Figure 1 Middle,U C (γ i )=exp(-iγ i H C ), U B (β i )=exp(-iβ i H B ),in, The value range of i is 1 to p, and p represents the depth of the quantum circuit. i and Tt i The target Hamiltonian H is applied alternately to the quantum bit 102 C and the ground state Hamiltonian H B , that is, alternately apply U C (γ i ) and U B (β i ) quantum gate operation. Quantum gate 104 is a first-level quantum gate that applies U to quanta bit 102. C (γ1) The quantum gate operation lasts for t1, then, U is applied B (β1) quantum gate operation duration T-t1. The 2nd to p-1th level quantum gate operations are applied in sequence. Finally, quantum gate 110 is the pth level quantum gate, and the quantum bits output by the p-1th level quantum gate are applied in sequence. C (γ p ) and U B (β p ) quantum gate operation. Specifically, quantum gate 110 applies U to the quantum bit output by the p-1th quantum gate. C (γ p ) Quantum gate operation duration t p, then, apply U B (β p ) Quantum gate operation duration Tt p .

[0052] The measurement unit 116 can measure the quantum state output by the quantum gate 110, thereby sampling the output of the quantum circuit. In quantum mechanics, quantum states have superposition, that is, the final state of the quantum circuit has a certain probability of being in quantum state a, and also has a certain probability of being in quantum state b. Therefore, if you calculate the expected value of the target Hamiltonian, you need to know the value of the Hamiltonian in a certain quantum state and the probability of the quantum state in the final state of the quantum circuit, and then perform a weighted average of the value of each quantum state according to the corresponding probability to obtain the expected value of the Hamiltonian. The probability of each quantum state can be determined by sampling. For example, multiple measurements can be performed to achieve sampling, where each measurement obtains a certain quantum state, and the probability of each quantum state is the number of times it appears in the sampling process divided by the total number of samplings. By measuring, it can be determined that in the quantum state |ψ′ C >, that is, the expected value of the loss function <ψ′ C |H C |ψ′ C 〉. The loss function can be fed back to the optimizer 118. The optimizer 118 can be implemented in a classical computer. The optimizer 118 can optimize the variational parameter 120 by maximizing the loss function according to an optimization algorithm, wherein the variational parameter 120 can be expressed as (γ, β), where β = [β1, β2 ... β p ],γ=[γ1,γ2……γ p ]. The optimized or updated variational parameters 120 can be provided to the quantum gates 104 and 110, etc., so as to repeat the above optimization steps until convergence or the maximum number of iterations is reached. The optimizer 118 can optimize the variational parameters 120 using various optimization algorithms, such as conjugate gradient, stochastic gradient, L-BFGS, etc.

[0053] The following will be combined Figure 2 A flow chart of a method 200 for determining a state of a target object according to some embodiments of the present disclosure is introduced. For example, the method 200 may be performed as follows: Figure 1The method 200 is implemented in the QAOA system 100 shown. However, it should be understood that the method 200 can also be implemented in any other suitable quantum system or quantum-classical hybrid system. The target object can be used to represent a target problem, for example, the target problem can be a combinatorial optimization problem, in particular, the maximum cut problem (MaxCut), the maximum independent subset (Max Independent Set, MIS), the satisfiability problem (Satisfiability Problem), the traveling salesman problem (Traveling Salesman Problem) and other problems.

[0054] In some embodiments, a target object such as a classical target problem can be converted into a target Hamiltonian by converting binary variables into quantum spins. For example, if the classical target problem is represented as C(z), where z represents N binary variables, then the target Hamiltonian can be represented as The binary variable z i Mapped to quantum spin For the classical objective problem C(z), the goal is to find the value of the binary variable z that minimizes the loss function C(z). C In general, the goal is to solve the target Hamiltonian H C The target object may include multiple nodes and edges connecting the nodes. For example, the target object may be represented by a graph. Each binary variable or each quantum state may be represented by a node of the graph. Therefore, the above target problem may be represented by a graph with N nodes.

[0055] For example, Figure 3 Graphs corresponding to a target problem or target Hamiltonian according to some embodiments of the present disclosure are shown. Figure 3 As shown in Figure 1, the graph consists of 16 nodes, each of which is connected to other nodes in the graph by three edges. For example, the goal of the MaxCut problem is to classify the points in the graph so that the number of edges cut is the largest. The corresponding target Hamiltonian can be expressed as Where E represents the set of edges in the graph, represents the quantum spin corresponding to node u, represents the quantum spin corresponding to the node v. Therefore, the optimization goal of the MaxCut problem is to calculate the quantum state that maximizes the expected value of the target Hamiltonian.

[0056] According to an embodiment of the present disclosure, the target object may be divided to obtain a first part, a second part, and a link connecting the first part and the second part of the target object. For ease of description, a graph is used as an example to describe the target object, and the first part of the graph is referred to as a first subgraph, and the second part of the graph is referred to as a second subgraph. It should be understood that although a bipartite graph is used as an example for description here, the graph may also be divided into at least three subgraphs, that is, in addition to the first subgraph and the second subgraph, a third subgraph may also be included.

[0057] In some embodiments, the first portion of the target object includes a first number of nodes, the second portion of the target object includes a second number of nodes, the target object includes a third number of nodes, and the quantum circuit includes a fourth number of qubits, wherein the third number is greater than the fourth number, and the first number and the second number are both less than or equal to the fourth number. If the QAOA system 100 is used to process the target Hamiltonian, the number of qubits 102 in the QAOA system 100 will be at least equal to the number of nodes in the original graph. For example, for Figure 3 For example, the number of nodes of the original graph is 16, and the number of quantum bits 102 of the QAOA system 100 is at least 16. By cutting the original graph into a first subgraph and a second subgraph, the number of quantum bits 102 can be equal to the number of nodes contained in the subgraph with more nodes in the first subgraph and the second subgraph. For example, if the number of nodes of the first subgraph and the second subgraph are both 8, the number of quantum bits 102 of the QAOA system 100 can be at least 8 to process the Hamiltonians corresponding to the first subgraph and the second subgraph, respectively. As another example, if the number of nodes of the first subgraph is 9 and the number of nodes of the second subgraph is 7, the number of quantum bits 102 of the QAOA system 100 can be at least 9 to allow processing of the Hamiltonian corresponding to the first subgraph with 9 nodes and the Hamiltonian corresponding to the second subgraph with 7 nodes. In order to further reduce the requirement for the number of qubits 102 of the QAOA system 100, in some embodiments, the difference between the number of nodes in the first subgraph and the number of nodes in the second subgraph may be less than or equal to a predetermined threshold. For example, the predetermined threshold may be 1, 2, or 3, etc. In one example, during the partitioning process, the difference between the number of nodes in the first subgraph and the number of nodes in the second subgraph may be minimized.

[0058] In some embodiments, when a graph is cut, it can be ensured that the links between subgraphs are weaker than the links within the subgraphs. For example, the number of links between the edge nodes of the first subgraph and the nodes of the first subgraph can be greater than or equal to the number of links between the edge nodes and the second subgraph. Correspondingly, the number of links between the edge nodes of the second subgraph and the nodes of the second subgraph is greater than or equal to the number of links between the edge nodes and the first subgraph. When dividing the subgraphs, the fewer the number of edges cut, the weaker the coupling between the subgraphs, and the better the effect of optimizing the two subgraphs separately. For example, in Figure 3 In the example of , the first subgraph includes nodes filled with white color, and the second subgraph includes nodes filled with black color. The number of links between the edge nodes of the first subgraph and the second subgraph is 1, which is less than the number of links between the edge nodes of the first subgraph and the nodes inside the first subgraph. The number of links between the edge nodes of the second subgraph and the first subgraph is also 1, which is less than the number of links between the edge nodes of the second subgraph and the nodes inside the second subgraph.

[0059] In block 202, the quantum circuit evolves a first Hamiltonian corresponding to the first portion to obtain a first state corresponding to the first portion. For example, the first state of the first portion can be a solution corresponding to the first subgraph. This can be accomplished by Figure 1 The QAOA system 100 shown in FIG. 1 is implemented as shown in FIG. 1 . For example, for the MaxCut problem, the first Hamiltonian can be expressed as Where E1 represents the set of edges in the first subgraph, represents the quantum spin corresponding to node u, represents the quantum spin corresponding to the node v. It should be understood that although the QAOA algorithm is used as an example to perform quantum evolution, any other suitable algorithm may be used as a substitute.

[0060] For example, the first Hamiltonian can be used as the target Hamiltonian of the QAOA system 100 or the Hamiltonian of the problem to be solved. C Then, by combining Figure 1 The first Hamiltonian is evolved in the manner described to obtain a solution corresponding to the first Hamiltonian. Figure 3 In the example shown, the solution corresponding to the first Hamiltonian may include the states of the nodes of the first subgraph, for example, the states of nodes 0, 1, 5, 7, and 9-13.

[0061] At block 204, based on the first state of the first portion of the target object, the quantum circuit evolves a second Hamiltonian corresponding to the second portion of the target object and the link connecting the first portion and the second portion to determine a second state of the second portion of the target object. The second state can be used to represent a solution corresponding to the second subgraph. For example, the second Hamiltonian can be used as the target Hamiltonian of the QAOA system 100 or the Hamiltonian of the problem to be solved H C Then, by combining Figure 1 The second Hamiltonian is evolved in the manner described to obtain a solution corresponding to the second Hamiltonian.

[0062] In some embodiments, the second Hamiltonian is evolved based on the first state of the edge nodes of the first part of the target object. For example, the second Hamiltonian is evolved based on the state of the edge nodes of the first subgraph in the solution corresponding to the first Hamiltonian. The solution corresponding to the first Hamiltonian includes not only the states of the edge nodes of the first subgraph, but also the states of the internal nodes of the first subgraph. However, in the optimization process of the second Hamiltonian, the states of the internal nodes of the first subgraph may not be used, but only the states of the edge nodes of the first subgraph may be used. The states of these edge nodes are reflected in the links between the first subgraph and the second subgraph. For example, the second Hamiltonian may include two parts, wherein the first part includes the Hamiltonian corresponding to the second subgraph, and the second part includes the Hamiltonian corresponding to the link between the first subgraph and the second subgraph. For the MaxCut problem, the second Hamiltonian can be expressed as Where E2 represents the set of edges in the second subgraph, represents the quantum spin corresponding to node u, represents the quantum spin corresponding to node v, E 12 represents the set of links between the first subgraph and the second subgraph, and s1(u) represents the state of the edge nodes in the solution corresponding to the first Hamiltonian. It can be seen that the second Hamiltonian of the MaxCut problem consists of two parts. The first part is represents the Hamiltonian corresponding to the second subgraph, and the second part is Denotes the Hamiltonian corresponding to the link between the first subgraph and the second subgraph, where the state s1(u) of the edge node in the solution corresponding to the first Hamiltonian is utilized.

[0063] In some embodiments, edge nodes whose first states are determined are selected from edge nodes of the first part of the target object, and the second Hamiltonian is evolved based on the first states of the edge nodes whose first states are determined. In the solution corresponding to the first Hamiltonian, the state of the edge node (e.g., s1(u)) may not be determined. For example, Figure 4 As shown, in the solution corresponding to the first Hamiltonian, the edge node 406 in the first subgraph 402 has a certain state, i.e., 1. Therefore, the state of the edge node 406 can be used as an input point to evolve the second Hamiltonian. Figure 5 As shown, in the solution corresponding to the first Hamiltonian, the state of the edge node 506 of the first subgraph 502 is uncertain, that is, according to the evolution of the first Hamiltonian, it is impossible to determine whether the state of the edge node 506 is 0 or 1. In this case, the state of the edge node 506 may depend on the optimization result of the second subgraph 504, and therefore, the edge node 506 may not be used as an input point of the second Hamiltonian. Therefore, the edge nodes with a definite state in the solution corresponding to the first Hamiltonian can be selected from the edge nodes of the first subgraph, and the second Hamiltonian can be evolved based on the state of the edge nodes with a definite state in the solution corresponding to the first Hamiltonian.

[0064] At block 206, based on the second state of the second portion of the target object, the quantum circuit evolves a third Hamiltonian corresponding to the first portion of the target object and a link connecting the first portion and the second portion to determine a third state of the first portion of the target object. For example, for the MaxCut problem, the third Hamiltonian can be expressed as Where E1 represents the set of edges in the first subgraph, represents the quantum spin corresponding to node u, represents the quantum spin corresponding to node v, E 21 represents the set of links between the first subgraph and the second subgraph, and s2(u) represents the state of the edge nodes in the solution corresponding to the second Hamiltonian. It can be seen that the third Hamiltonian consists of two parts. The first part is Same as the first Hamiltonian, which represents the Hamiltonian corresponding to the first subgraph, and the second part is represents the Hamiltonian corresponding to the link between the first subgraph and the second subgraph.

[0065] In some embodiments, the first state of the first part of the target object and the second state of the second part of the target object are combined to determine the first intermediate state of the target object. The first intermediate state of the target object is optimized by flipping the first intermediate state of the node of the target object to obtain the second intermediate state of the target object. Based on the second intermediate state of the second part of the target object, the third Hamiltonian is evolved. For example, after flipping the node of the target object, if the state of the target object is better, when optimizing the second intermediate state, the second intermediate state is changed to the state after flipping; conversely, after flipping the node of the target object, if the state of the target object is worse, when optimizing the second intermediate state, the second intermediate state is still maintained. As the degree of the graph increases, the links between the nodes increase, and the difficulty of dividing the graph gradually increases. When the proportion of links is large, the result of subgraph optimization may deviate greatly from the result of overall optimization. In order to compensate for this large deviation, the optimization result can be post-processed, which is called a "sweep" operation. In some embodiments, the sweep operation can be performed at the level of a single bit. For example, the optimization results of the first subgraph and the second subgraph can be merged on a classical computer, and the result (i.e., the first intermediate state) can be input into the loss function to calculate the value of the loss function. Then, the state of each node in the graph is flipped in turn, and the value of the corresponding loss function is calculated after each flip. If the value of the loss function after the flip is smaller, that is, the result is better, then the distribution and the value of the loss function at this time are retained until all nodes are traversed. The above process can be repeated many times to ensure that the post-processing result is optimal at the single-bit level. Therefore, the first intermediate state of the target object is optimized by flipping the first intermediate state of the node of the target object, thereby obtaining the second intermediate state of the target object. Based on the second intermediate state, the quantum circuit evolves the third Hamiltonian.

[0066] In some implementations, scanning operations at multiple bit levels, such as 2 bits or 3 bits, can also be performed, which can further ensure the optimization effect and improve the accuracy. The algorithm complexity of scanning operations at multiple bit levels will increase. For example, for scanning at an m-bit level, the time complexity is O(n m ).

[0067] The optimized merge solution can be obtained by scanning operation Then, the optimized solution corresponding to the second subgraph can be extracted from the optimized merged solution Then, based on the optimized solution of the second Hamiltonian Evolving the third Hamiltonian corresponding to the first subgraph and the link between the first subgraph and the second subgraph. For the MaxCut problem, when performing a sweep operation, the third Hamiltonian can be expressed as Where E1 represents the set of edges in the first subgraph, represents the quantum spin corresponding to node u, represents the quantum spin corresponding to node v, E 21 represents the set of links between the first subgraph and the second subgraph, and s2(u) represents the state of the edge nodes in the solution corresponding to the second Hamiltonian. It can be seen that the third Hamiltonian consists of two parts. The first part is Same as the first Hamiltonian, which represents the Hamiltonian corresponding to the first subgraph, and the second part is represents the Hamiltonian corresponding to the link between the first subgraph and the second subgraph.

[0068] In some embodiments, Figure 5 Similarly, in the solution s2 or the optimized solution corresponding to the second subgraph In this case, the state s2(u) of the edge nodes of the second subgraph may still be uncertain. In this case, the solution s2 or the optimized solution corresponding to the second Hamiltonian can be selected from the edge nodes of the second subgraph. Then, based on the states of the edge nodes having the determined states in the solution or the optimized solution corresponding to the second Hamiltonian, the third Hamiltonian is evolved to obtain a solution corresponding to the third Hamiltonian.

[0069] At block 208, the state of the target object is determined based on the second state of the second portion of the target object and the third state of the first portion of the target object. For example, the solution s2 or s3 corresponding to the second Hamiltonian may be and the solution corresponding to the third Hamiltonian Merge to obtain a merged solution or In some implementations, the merge solution may be ** As a solution corresponding to the target Hamiltonian. However, in some embodiments, the second state of the second part of the target object and the third state of the first part of the target object are merged to determine a third intermediate state of the target object; and the third intermediate state of the target object is optimized by flipping the third intermediate state of the node of the target object to determine the state of the target object. For example, after flipping the node of the target object, if the state of the target object is better, then when optimizing the second intermediate state, the second intermediate state is changed to the state after flipping; conversely, after flipping the node of the target object, if the state of the target object is worse, then when optimizing the second intermediate state, the second intermediate state is still maintained. Specifically, the merged solution s ** As a third intermediate state, we can then solve the merge s **A sweep operation is applied to further optimize the merged solution, and the optimized merged solution is taken as the solution corresponding to the target Hamiltonian.

[0070] According to multiple embodiments of the present disclosure, by dividing the graph, quantum bits can be reused, so that a limited number of quantum bits can be used to solve larger problems. In addition, since the complexity of the problem is reduced, the depth of the quantum circuit can also be reduced, further reducing the cumulative error caused by noise in the gate operation. In addition, due to the reduction of the search space, the number of sampling is reduced, the optimization time is shortened, and the difficulty of measurement is reduced.

[0071] The following will introduce the optimization methods according to some embodiments of the present disclosure in detail in conjunction with the MaxCut problem. The complexity of the MaxCut problem is exponential. The size of the search space of a graph with n nodes is 2 n Therefore, classical computers are powerless in large-scale MaxCut problems. However, quantum computers have natural parallelism, and any operation can act on superposition states at the same time. Therefore, for the MaxCut problem, quantum computers are equivalent to searching 2 n states, avoiding exponential complexity. In the QAOA method, the complexity of the MaxCut problem depends on the number of layers or depth (p) of the quantum circuit and the scale of the problem, which is approximately O(p*n 2 ), it is very likely to achieve quantum advantage. In addition, for many other practical problems, such as the traveling salesman problem and traffic planning problem, after using one-hot encoding, these problems can be converted into the Ising model, that is, the 2-well-posedness (2-SAT) problem. The Hamiltonian of 2-SAT can also be converted into a graph, except that in addition to the links, each vertex will have an additional first-order term, and the optimization method according to the embodiment of the present disclosure is also applicable. For example, in the 2-SAT problem, for n variables, there are m constraints, and each constraint is related to at most two variables. In quantum computing, the Hamiltonian of the 2-SAT problem can be expressed as a Pauli matrix:

[0072] In the MaxCut problem, the main thing is to properly classify the points in the graph so that the number of edges cut is the largest. When the problem scale is relatively large, the edge partitioning method according to the embodiment of the present disclosure can properly cut the graph into two or more small-scale subgraphs, solve the MaxCut problem for each subgraph separately, and then process the links between the subgraphs, and finally get a good approximate solution to the MaxCut problem of the original large graph.

[0073] In the following examples, the embodiments of the present disclosure are mainly described by taking regularity graphs as examples, however, it should be understood that the embodiments of the present disclosure are also applicable to irregularity graphs. A regularity graph means that all points in the graph have the same number of edges. For example, in a graph of regularity, all nodes in the graph only extend 5 edges, that is, they are only connected to 5 other nodes. In the edge partitioning process, for example, for a node with a regularity of d, the edges of the node can be divided into two parts, one part containing [d / 2] edges and the other part containing (d-[d / 2] edges), where [.] means rounding down. For edge nodes, the part with fewer edges can be used as links. After such a partitioning, the graph can be divided into two subgraphs of similar size and fewer links. Figure 3 A graph of 16 nodes with a regularity of 3 according to some embodiments of the present disclosure is shown. The graph can be divided into two parts according to the above principle, where the nodes in black font can be considered as the first part, and the nodes in white font can be considered as the second part.

[0074] In some embodiments, when performing the sub-graph, the first part and the second part can be initialized to be empty at first. Then, traverse each node in the graph, add the node to the first part, and update the number of nodes in the first part. If the number of nodes in the first part is less than half of the number of nodes in the original graph, determine whether the number of neighbors of the node in the first part is less than or equal to [d / 2], where d represents the degree of the graph, and [.] represents rounding down. If so, add the node to the first part. Then, the above result can be further verified. For example, the nodes in the first part can be traversed to determine whether the number of neighbors of the node in the first part is less than or equal to [d / 2]. If so, remove the node from the first part. Then, the nodes not in the first part can be traversed to determine whether the number of neighbors of the node in the first part is less than or equal to [d / 2]. If so, add the node to the second part, otherwise, add the node to the first part. If the difference between the number of nodes in the two parts is less than the threshold, the threshold can be updated to the difference between the number of nodes in the first part and the second part, and the next round of iteration is performed until all nodes of the graph are traversed. During initialization, the threshold can be set to the total number of nodes in the graph. For example, the above method can be represented by the pseudo code shown in Table 1:

[0075] Table 1 Pseudo code of the graph partitioning algorithm

[0076]

[0077]

[0078] After the sub-graphing is completed, the sub-system Hamiltonian generated by the sub-graphing result is provided to the QAOA system 100. For example, the QAOA system 100 can be used to optimize the sub-system Hamiltonian corresponding to the first part After the required accuracy is reached or after this part of the subsystem converges, the results are sampled. Then, the best result is selected from the sampled results (if the best result is degenerate, one can be randomly selected). The string of the best result obtained by sampling is mapped to each node. The edge nodes of the first part are linked to the second part, and at least some of the edge nodes are selected from these links as input.

[0079] Link the results of the boundary points of the first part required, substitute them into the second part, and optimize the Hamiltonian of the subsystem corresponding to the second part After the second part reaches convergence, the best result will be selected from the sampling results. The strings corresponding to the two samples will be merged, and a scan operation will be performed to retain the best result. Because the first part in the first step is optimized separately, and the relationship between the first and second parts is not considered, in order to ensure a better global optimization solution, the boundary of the second part is used as input to optimize the first part, and then the results are merged and scanned to obtain the final result.

[0080] For the selection of input points, taking MaxCut of a graph with a regularity of 3 as an example, there are two cases: Figure 4 In the case of , the state of the edge node can be directly determined by the first part; Figure 5 In the case of , the state of the edge node is equivalent to the result of the first part, so the value of the node actually depends on the optimization of the second part, so the node is not used as an input point. The result of the node can be determined by the result after merging the two parts and scanning.

[0081] In some embodiments, the nodes in the first subgraph can be traversed to determine whether the edge (also called link) connected to the node can be cut. For example, for the MaxCut problem, if the states of the nodes at both ends of an edge are different (one node is 0 and the other node is 1), it can be cut; if the states of the nodes at both ends of an edge are the same (both are 0, or both are 1), it cannot be cut. If the number of edges connected to the node that can be cut is greater than [d / 2], the node is considered to have a certain state and can be used as an input point; otherwise, the node may not be used as an input point. Table 2 shows an example of pseudocode for selecting input points, the main part of which is the pseudocode for the MaxCut problem, and the pseudocode for the 2-SAT problem is shown in the annotation.

[0082] Table 2 Algorithm for selecting input points

[0083]

[0084]

[0085] Since there are undetermined points and the possible merged results deviate from the optimal solution, the results need to be post-processed, which is a scanning operation. The specific process of the scanning operation is that after obtaining the optimal results of the two partial samplings, the results of the two parts are merged on a classical computer, and the results are substituted into the loss function to calculate the corresponding value and store it. Then the results of each node are flipped in turn, and the corresponding loss function value is calculated after each flip. If the result after flipping is better, the distribution and loss function value at this time are retained until all points are traversed. The scanning process can be repeated several times to ensure the optimal post-processing at the single-bit level. In principle, scanning at the 2-bit, 3-bit and other levels can also be performed, which can further ensure the optimization effect and improve the accuracy. However, the complexity of the algorithm will increase. For scanning at the m-bit level, the time complexity is O(n m ). Table 3 shows a pseudo code example of the scanning algorithm.

[0086] Table 3 Scanning algorithm

[0087]

[0088]

[0089] For completeness, Table 4 shows a pseudocode example of the entire optimization algorithm.

[0090] Table 4 Overall algorithm

[0091]

[0092]

[0093] In some implementations, for the Hamiltonian when the subgraph and the link are jointly evolved, a coefficient less than 1 but close to 1 may be added to the link term to break the degeneracy, for example, In this way, when the number of edges to be cut is the same, the edges inside the subgraph will be cut first. This is because the optimization of the links will also optimize H in the next step. 1+l With further improvements, this method can further improve the accuracy.

[0094] According to some embodiments of the present disclosure, the problem scale is reduced by dividing the graph, so the simulation time is greatly shortened. For real quantum simulation, after the scale is reduced, the number of sampling and difficulty will be reduced. And the number of gates will also be greatly reduced. In the current NISQ era, when quantum gate operations still have errors, it can reduce the cumulative errors caused by multiple operations and ensure the optimization effect of the algorithm. In addition, from the perspective of the QAOA algorithm, the number of optimization layers p will increase with the increase in scale. In addition to increasing the number of operation gates, the increase in depth p will also bring more parameters, increasing the difficulty of parameter optimization. After the problem is cut, the scale is reduced, and the number of optimization layers required to achieve the same accuracy is also reduced, which accelerates the optimization process.

[0095] To further verify the embodiments of the present disclosure, tests were conducted in different scenarios, including the MaxCut problem under regular and irregular degree graphs with degrees ranging from 3 to 4, and the 2-SAT problem was also tested. When the results were similar, the simulation time of the method according to some embodiments of the present disclosure was saved by about ten times.

[0096] Due to the reduction in the size of the subproblem, the number of optimization layers required for edge partitioning is also reduced, as shown in Table 5, which is a comparison of the number of optimization layers before and after the above four cases are used in the embodiment of the present disclosure. Since the embodiment of the present disclosure includes three QAOA optimizations, the values ​​in the bottom row are the number of layers p required for each optimization. Compared with the original overall optimization, the number of layers is reduced. Because the scale is smaller, fewer gates are required for each layer, which makes the actual quantum operation process simpler and has higher fidelity, as shown in Table 6.

[0097] Table 5: Comparison of the number of layers required after overall evolution and edge partitioning

[0098]

[0099] By co-optimizing the subgraphs and links, a good approximate solution can be effectively ensured. In the MaxCut test of regularity 3 and regularity 4, the embodiments of the present disclosure can obtain the optimal solution or a suboptimal solution very close to the optimal solution with a high probability. Table 6 is the MaxCut problem of regularity 3 and regularity 4, and the change of the accuracy with the number of nodes.

[0100] Table 6: Corresponding fidelity of overall evolution and edge partitioning

[0101]

[0102] As shown in Table 6, for the two cases of regularity 3 and regularity 4, at the scale of 20 nodes, after using the edge partitioning method for 100 random graphs, most of them obtained the optimal solution, and the approximate solutions obtained in the remaining cases were also very close to the optimal solution, at least 0.9 times the optimal solution, such as Figure 6 As shown, C represents the optimization result and C max Indicates the optimal result.

[0103] As the degree of the graph increases, there are more and more links between the points, and the difficulty of division will increase accordingly. With the current edge division scheme, the probability of obtaining the optimal solution will be reduced when the degree is relatively high. Because when the scale is not large, after the height graph is divided, the proportion of edges contained in the link part is relatively large, resulting in the deviation of the individual optimization of the subgraph from the result corresponding to the overall optimization. However, due to the introduction of the collaborative optimization of subgraphs and links, as well as post-processing scanning, the edge division method can also give a good approximate solution for graphs with higher degrees. As shown in Table 7, in graphs with different degrees of 20 nodes, the obtained result C is different from the optimal result C. max The average value of the ratio ave(C) = average(C / C max ).

[0104] Table 7: Comparison of average optimal values ​​corresponding to regularity 3 to regularity 6 under 20 nodes

[0105] Regulation 3 Regulation 4 Regulation 5 Regulation 6 ave(C) 0.999007 0.997389 0.994895 0.989548

[0106] Figure 7 Schematic diagram of a quantum classical hybrid system 700 according to some embodiments of the present disclosure is shown. The system 700 may be as follows Figure 1 The physical implementation of the QAOA system 100 shown in FIG. 1 and can be used to implement Figure 2 The method 200 shown. Figure 7 As shown, the quantum classical hybrid system 800 includes a quantum computer 702, which may include a quantum circuit 704. The quantum circuit 704 may be implemented by various different technologies, for example, by simulating the polarization of photons in optics, by simulating the energy level of ions in ion traps, and by using a Josephson junction to prepare a multi-level harmonic resonance cavity in superconductivity. The quantum computer 702 is connected to a classical computer 706 for communication and exchange of data. For example, the quantum circuit 706 may be implemented as follows: Figure 1 The quantum gates 104 and 110 shown, and the classical computer 706 can be used to implement Figure 1 The optimizer 118 shown in FIG. 1A and the optimized parameters are provided to the quantum circuit 704 to evolve the Hamiltonian by the quantum gates 104 and 110 implemented by the quantum circuit 704. Figure 2In the method shown, the quantum evolution process can be implemented by quantum circuit 704, and the graph partitioning, flipping operation and merging operation can be implemented by classical computer 706.

[0107] Figure 8 Schematic block diagram of a classical computer 706 that can be used to implement embodiments of the present disclosure is shown. Figure 2 The operations in the illustrated method 200 that are performed by a classical processor or a classical computer may be implemented by a classical computer 706 .

[0108] like Figure 8 As shown, the classical computer 706 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 802 or computer program instructions loaded from a storage unit 808 to a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the classical computer 706 can also be stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0109] A number of components in the classical computer 706 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the classical computer 706 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0110] The various processes and processing described above, such as method 200, may be performed by processing unit 801. For example, in some embodiments, method 806 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on a classical computer 806 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by CPU 801, one or more steps of method 200 described above may be performed. Alternatively, in other embodiments, CPU 801 may be configured to perform method 200 in any other suitable manner (e.g., by means of firmware).

[0111] The present disclosure may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.

[0112] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0113] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0114] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, Python, C++, etc., and conventional procedural programming languages ​​such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0115] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0116] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0117] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0118] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0119] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A method for determining the state of a target object by means of a quantum circuit, comprising: The quantum circuit evolves a first Hamiltonian corresponding to a first portion of the target object to obtain a first state of the first portion of the target object; Based on the first state of the first portion of the target object, the quantum circuit evolves a second Hamiltonian corresponding to the second portion of the target object and a link connecting the first portion and the second portion to determine a second state of the second portion of the target object; Based on the second state of the second portion of the target object, the quantum circuit evolves a third Hamiltonian corresponding to the first portion of the target object and a link connecting the first portion and the second portion to determine a third state of the first portion of the target object; as well as determining a state of the target object based on a second state of the second portion of the target object and a third state of the first portion of the target object, The target object includes a graph, The link connecting the first part and the second part comprises: an edge connecting a node of the first part of the graph and a node of the second part of the graph, The first portion of the target object includes a first number of nodes, the second portion of the target object includes a second number of nodes, The first portion of the target object includes an edge node connected to the second portion of the target object, and evolving the second Hamiltonian includes: evolving the second Hamiltonian based on a first state of the edge node of the first portion of the target object, Based on the second state of the second part of the target object, evolving the third Hamiltonian includes: combining a first state of a first portion of the target object and a second state of a second portion of the target object to determine a first intermediate state of the target object; optimizing the first intermediate state of the target object by flipping the first intermediate state of the node of the target object to obtain a second intermediate state of the target object; and The third Hamiltonian is evolved based on a second intermediate state of the second portion of the target object.

2. The method according to claim 1, characterized in that The target object includes a third number of nodes, and the quantum circuit includes a fourth number of quantum bits, wherein the third number is greater than the fourth number, and the first number and the second number are both less than or equal to the fourth number.

3. The method according to claim 1, characterized in that The first part of the target object includes an edge node connected to the second part of the target object, and the number of links between the edge node and the nodes of the first part of the target object is greater than or equal to the number of links between the edge node and the nodes of the second part.

4. The method according to claim 1, characterized in that: The first portion of the target object includes a first number of nodes, the second portion of the target object includes a second number of nodes, and a difference between the first number and the second number is less than or equal to a predetermined threshold.

5. The method according to claim 1, characterized in that Based on the first state of the edge node of the first part of the target object, evolving the second Hamiltonian includes: Selecting, from the edge nodes of the first part of the target object, an edge node whose first state is a determined state; and Based on the first state of the edge node whose first state is a determined state, the second Hamiltonian is evolved.

6. The method according to claim 1, characterized in that The second portion of the target object includes an edge node connected to the first portion of the target object, and based on a second intermediate state of the second portion of the target object, evolving the third Hamiltonian includes: The third Hamiltonian is evolved based on a second intermediate state of the edge nodes of the second part of the target object.

7. The method according to claim 1, characterized in that Based on the second state of the second part of the target object and the third state of the first part of the target object, determining the state of the target object includes: combining the second state of the second portion of the target object and the third state of the first portion of the target object to determine a third intermediate state of the target object; and The third intermediate state of the target object is optimized by flipping the third intermediate state of the node of the target object to determine the state of the target object.

8. A device for determining a state of a target object, comprising: The quantum circuit is configured as: evolving a first Hamiltonian corresponding to a first portion of the target object to obtain a first state of the first portion of the target object; Based on the first state of the first portion of the target object, evolving a second Hamiltonian corresponding to the second portion of the target object and a link connecting the first portion and the second portion to determine a second state of the second portion of the target object; evolving a third Hamiltonian corresponding to the first portion of the target object and a link connecting the first portion and the second portion based on the second state of the second portion of the target object to determine a third state of the first portion of the target object; as well as a processor configured to determine a state of the target object based on a second state of the second portion of the target object and a third state of the first portion of the target object, The target object includes a graph, The link connecting the first part and the second part comprises: an edge connecting a node of the first part of the graph and a node of the second part of the graph, The first portion of the target object includes a first number of nodes, the second portion of the target object includes a second number of nodes, The first portion of the target object includes an edge node connected to the second portion of the target object, and the quantum circuit is further configured as follows: evolving the second Hamiltonian based on a first state of an edge node of a first portion of the target object, The processor is further configured to merge the first state of the first part of the target object and the second state of the second part of the target object to determine a first intermediate state of the target object, and optimize the first intermediate state of the target object by flipping the first intermediate state of the node of the target object to obtain a second intermediate state of the target object, The quantum circuit is further configured to evolve the third Hamiltonian based on a second intermediate state of a second portion of the target object.

9. The device according to claim 8, characterized in that The target object includes a third number of nodes, and the quantum circuit includes a fourth number of quantum bits, wherein the third number is greater than the fourth number, and the first number and the second number are both less than or equal to the fourth number.

10. The device according to claim 8, characterized in that The first part of the target object includes an edge node connected to the second part of the target object, and the number of links between the edge node and the nodes of the first part of the target object is greater than or equal to the number of links between the edge node and the nodes of the second part.

11. The device according to claim 8, characterized in that The first portion of the target object includes a first number of nodes, the second portion of the target object includes a second number of nodes, and a difference between the first number and the second number is less than or equal to a predetermined threshold.

12. The device according to claim 8, characterized in that The processor is further configured to select an edge node whose first state is a determined state from edge nodes of a first part of the target object, and The quantum circuit is further configured to evolve the second Hamiltonian based on a first state of an edge node whose first state is a determined state.

13. The device according to claim 8, characterized in that The second portion of the target object includes an edge node connected to the first portion of the target object, and the quantum circuit is further configured as follows: The third Hamiltonian is evolved based on a second intermediate state of the edge nodes of the second part of the target object.

14. The device according to claim 8, characterized in that The processor is further configured to: combining the second state of the second portion of the target object and the third state of the first portion of the target object to determine a third intermediate state of the target object; as well as The third intermediate state of the target object is optimized by flipping the third intermediate state of the node of the target object to determine the state of the target object.

Citation Information

Patent Citations

  • Cost function deformation in quantum approximate optimization

    CN111373420A

  • Simulation method, computing equipment, classic equipment, storage device and product

    CN112561068A