Distributed Quantum Computing Method, Apparatus, Device and Medium for Combinatorial Optimization

The distributed quantum computing method addresses the challenges of large-scale combinatorial optimization by iteratively optimizing subsets of decision variables, reducing quantum resource needs and enhancing computational efficiency.

CN119808982BActive Publication Date: 2025-07-15GUOKAIKE QUANTUM TECH (ANHUI) CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510293693.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-13
Publication Date
2025-07-15
Estimated Expiration
2045-03-13

AI Technical Summary

Technical Problem

The existing technology is difficult to efficiently solve the problem of large-scale combination optimization, especially in combination explosions, complex constraints and real-time requirements, which leads to too long calculation time and difficult to meet practical application requirements.

Method used

The distributed quantum computing method is used to solve the combination optimization problem by constructing Hamiltonian and quantum circuits, and subset optimization iteration is used to use qubits and tunable parameters to gradually find the optimal solution.

Benefits of technology

It significantly reduces the demand for computing resources, improves computing efficiency and accuracy, simplifies the implementation complexity of real-time quantum computers, and can quickly find the optimal solution to the combined optimization problem.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808982B_ABST
    Figure CN119808982B_ABST
Patent Text Reader

Abstract

The present invention relates to a distributed quantum computing method, device, equipment and medium for combinatorial optimization. The method includes: modeling a combinatorial optimization problem to be solved to obtain a problem function and a global solution space, and constructing a corresponding Hamiltonian based on the problem function of the combinatorial optimization problem to be solved; randomly taking values from the value range of each bit in the global solution space to generate an initial global solution; extracting a first preset number of bit values from the initial global solution to construct a first subset; constructing a quantum circuit corresponding to the first subset; optimizing the first subset through the quantum circuit to obtain an updated global solution and calculating the expectation value of the Hamiltonian corresponding to the updated global solution, and taking the global solution corresponding to the minimum Hamiltonian expectation value as the optimal solution of the combinatorial optimization problem to be solved. The present invention effectively solves the computing power requirement problem of large-scale combinatorial optimization problems, improves the performance and accuracy of the algorithm, and has wide applicability and flexibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of quantum computing, and in particular to a distributed quantum computing method, apparatus, device and medium for combinatorial optimization. Background Art

[0002] Combinatorial optimization problems refer to a class of problems with limited and discrete variables that seek extreme values. They play an important role in industries such as network communications, logistics management, traffic planning, and energy scheduling. For example, the unit commitment problem (UC problem) in power system planning and operation, the combinatorial optimization problem of network base stations in the field of mobile communications, etc. The usual solution to combinatorial optimization problems is to use professional mathematical optimization tools, such as CPLEX, Gurobi, SCIP, etc., and use the algorithms provided by mathematical optimization tools to solve them, such as branch and bound method, exhaustive method, priority list method, Lagrangian relaxation method, and some hybrid algorithms, such as genetic algorithm and evolutionary programming method. However, since the combinatorial optimization problem is a nonlinear mixed programming problem with both continuous variables and integer variables, it is an NP-hard problem. Although the branch and bound method and the exhaustive method can find the optimal solution of the combinatorial optimization problem in theory, when the scale is large, the calculation time of the above algorithms is too long, and it is difficult to apply in practice; the priority list method and Lagrangian relaxation method cannot guarantee the optimal solution; the hybrid algorithm also has some challenges and bottlenecks, which are mainly reflected in the following aspects:

[0003] 1. Combinatorial explosion problem: As the scale of variables in the combinatorial optimization problem increases, the number of feasible solutions for combinatorial optimization grows exponentially, which makes the search space for the optimal solution grow exponentially, and solving the problem becomes very difficult.

[0004] 2. Complex constraints: Combinatorial optimization problems usually contain multiple constraints. Complex constraints will increase the difficulty of solving the problem, limit the solution space of the problem, increase the complexity of the problem, and require more computing resources to solve.

[0005] 3. Real-time requirements: In practical applications, combinatorial optimization problems usually need to be solved in a short time to meet the real-time changes of application scenarios. Therefore, the solution algorithm needs to be efficient and real-time, but the existing algorithms are difficult to meet the real-time requirements. Summary of the invention

[0006] In response to the technical problems existing in the prior art, the present invention proposes a distributed quantum computing method, device, equipment and medium for combinatorial optimization, which can solve large-scale combinatorial optimization problems with fewer quantum computing resources.

[0007] To solve the above technical problems, according to one aspect of the present invention, the present invention provides a distributed quantum computing method for combinatorial optimization, including the following steps:

[0008] Step 1: Model the combinatorial optimization problem to be solved to obtain a problem function and a global solution space. The global solution space includes a plurality of bits corresponding to different decision variables of the combinatorial optimization problem to be solved. The value range of each bit in the global solution space corresponds to the value range of the corresponding decision variable.

[0009] Step 2: Construct a corresponding Hamiltonian based on the problem function of the combinatorial optimization problem to be solved.

[0010] Step 3: Randomly select values from the value range of each bit in the global solution space to generate an initial global solution.

[0011] Step 4: Extract the first preset number of bit values from the initial global solution to construct a first subset.

[0012] Step 5: Construct a quantum circuit with adjustable parameters corresponding to the first subset.

[0013] Step 6: Optimize the first subset through the quantum circuit to obtain an updated global solution and calculate the expectation value of the Hamiltonian corresponding to the updated global solution.

[0014] Step 7: Check whether the updated global solution meets the first preset requirement for stopping optimization. In response to the updated global solution meeting the first preset requirement for stopping optimization, execute Step 8. In response to the updated global solution not meeting the first preset requirement for stopping optimization, execute Step 9.

[0015] Step 8: Determine the global solution corresponding to the minimum Hamiltonian expectation value as the optimal solution of the combinatorial optimization problem to be solved and end.

[0016] Step 9: Extract the first preset number of bit values from the updated global solution to construct a new first subset, and return to Step 6.

[0017] Wherein, Step 4: Extract the first preset number of bit values from the initial global solution to construct a first subset, including:

[0018] Traverse each bit in the initial global solution, change the value of each bit, calculate the expectation values of the Hamiltonian corresponding to the two global solutions before and after changing the value of each bit, and calculate the difference between the two expectation values of the Hamiltonian.

[0019] Determine the first preset number of corresponding bits in descending order of the difference between the expectation values of the Hamiltonian.

[0020] Extract the bit values of the corresponding bits from the initial global solution to obtain the first subset.

[0021] Optionally, step 7: Check whether the updated global solution meets the first preset requirement for optimization termination, including:

[0022] Count the number of iterations for optimizing the first subset to obtain the updated global solution;

[0023] Determine that the first preset requirement for optimization termination is met when the number of iterations reaches the preset number threshold;

[0024] Alternatively, check whether the expected value of the Hamiltonian corresponding to the updated global solution converges to the minimum value;

[0025] Determine that the first preset requirement for optimization termination is met when it is checked that the expected value of the Hamiltonian corresponding to the updated global solution converges to the minimum value.

[0026] Optionally, step 6: Optimize the first subset through the quantum circuit to obtain the updated global solution and calculate the expected value of the Hamiltonian corresponding to the updated global solution, including:

[0027] Step 61, perform quantum optimization on the first subset using a quantum circuit with adjustable parameters to obtain the first local optimal solution;

[0028] Step 62, replace the corresponding bit values in the current global solution with the first local optimal solution to obtain the first global solution, and calculate the expected value of the Hamiltonian corresponding to the first global solution, where the current global solution is the initial global solution or the global solution updated after the previous iteration;

[0029] Step 63, extract the second preset number of bit values from the first global solution to construct the second subset;

[0030] Step 64, optimize the second subset through a quantum circuit with adjustable parameters to obtain the second local optimal solution;

[0031] Step 65, replace the corresponding bit values in the first global solution with the second local optimal solution to obtain the updated first global solution and calculate the expected value of the Hamiltonian corresponding to the updated first global solution;

[0032] Step 66, check whether the updated first global solution meets the second preset requirement for optimization termination; in response to the updated first global solution meeting the second preset requirement for optimization termination, execute step 67, and in response to the updated first global solution not meeting the second preset requirement for optimization termination, execute step 68;

[0033] Step 67: Determine the first global solution corresponding to the minimum Hamiltonian expectation value as the updated global solution obtained by optimizing the first subset, and end;

[0034] Step 68: Extract a second preset number of bit values from the updated first global solution to construct a new second subset, and return to Step 64.

[0035] Optionally, Step 68: Extract a second preset number of bit values from the updated first global solution to construct a new second subset, further including: determining the second preset number based on a decay function.

[0036] Optionally, the decay function is a linear function, the function value of the linear function is the second preset number applied in the currently constructed second subset, the independent variable of the linear function is the second preset number applied when constructing the second subset last time, the linear coefficient is a value less than 1, and the initial value of the independent variable is the first preset number.

[0037] Optionally, Step 66: Check whether the updated first global solution meets the second preset requirement for stopping optimization, including: determining whether the second preset number reaches a preset number threshold, and in response to the second preset number reaching the preset number threshold, determining that the second preset requirement for stopping optimization is met.

[0038] Optionally, Step 61: Perform quantum optimization on the first subset using a quantum circuit with adjustable parameters to obtain a first local optimal solution, including:

[0039] Adjust the parameter values in the quantum circuit so that the expectation value of the Hamiltonian obtained by running the quantum circuit decreases until convergence;

[0040] Measure the quantum state when the expectation value of the Hamiltonian converges, and determine the quantum state with the highest probability in the measurement result as the first local optimal solution.

[0041] According to another aspect of the present invention, the present invention provides a distributed quantum computing device for combinatorial optimization, including:

[0042] A modeling module configured to model the combinatorial optimization problem to be solved to obtain a problem function and a global solution space, the global solution space including a plurality of bits respectively corresponding to different decision variables of the combinatorial optimization problem to be solved, the value range of each bit in the global solution space corresponding to the value range of the corresponding decision variable, and constructing a corresponding Hamiltonian based on the problem function of the combinatorial optimization problem to be solved;

[0043] An initial global solution generation module configured to randomly take values from the value ranges of each bit in the global solution space to generate an initial global solution;

[0044] A subset construction module, configured to extract a first preset number of bit values from an initial global solution to construct a first subset;

[0045] A quantum circuit module, configured to construct a quantum circuit with adjustable parameters corresponding to the first subset;

[0046] An optimization module, configured to optimize the first subset through the quantum circuit to obtain an updated global solution and calculate the Hamiltonian expectation value corresponding to the updated global solution;

[0047] A verification module, configured to verify whether the updated global solution meets a first preset requirement for stopping optimization;

[0048] An optimal solution determination module, configured to, in response to the updated global solution meeting the first preset requirement for stopping optimization, determine the global solution corresponding to the minimum Hamiltonian expectation value as the optimal solution to the combinatorial optimization problem to be solved;

[0049] An iterative optimization module, configured to, in response to the updated global solution not meeting the first preset requirement for stopping optimization, extract a first preset number of bit values from the updated global solution to construct a new first subset, and repeatedly execute the optimization module, the verification module, the optimal solution determination module, and the iterative optimization module until the updated global solution meets the first preset requirement for stopping optimization;

[0050] Wherein, after being further configured, the subset construction module traverses each bit in the initial global solution, changes the value of each bit, calculates the Hamiltonian expectation values corresponding to the two global solutions before and after changing the value of each bit, and calculates the difference between the two Hamiltonian expectation values; determines a first preset number of corresponding bits in descending order of the difference between the Hamiltonian expectation values; and extracts the bit values of the corresponding bits from the initial global solution to obtain the first subset.

[0051] According to another aspect of the present invention, the present invention further provides an electronic device, including a processor and a memory, wherein computer instructions are stored in the memory, and when the processor runs the computer instructions, it executes the foregoing distributed quantum computing method for combinatorial optimization.

[0052] According to another aspect of the present invention, the present invention further provides a computer-readable storage medium, wherein computer instructions are stored in the computer-readable storage medium, and when the computer instructions are run by a processor, they execute the foregoing distributed quantum computing method for combinatorial optimization.

[0053] The present invention is applicable to any combinatorial optimization problem that can construct an objective function and constraints into a Hamiltonian, and is also applicable to any quantum circuit corresponding to a quantum variational algorithm that converges by reducing a loss function. It has a wide range of applications, diverse usage scenarios, and flexible algorithm selection.

[0054] Since the present invention solves the combinatorial optimization problem by sampling subset optimization iteration, compared with the quantum computing method of global encoding combinatorial optimization, the quantum circuit used in a single iteration of the present invention requires fewer qubits and has a shallower quantum circuit depth, thus significantly reducing computing resources. Especially for solving large-scale combinatorial optimization problems, the effect is more remarkable.

[0055] In addition, since the present invention requires less quantum resources, it is easier to implement in physical experiments, effectively simplifies the execution complexity in a real quantum computer, and improves the computing accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Next, the preferred embodiments of the present invention will be further described in detail with reference to the drawings, where:

[0057] Figure 1 is a flowchart of a distributed quantum computing method for combinatorial optimization according to an embodiment of the present invention;

[0058] Figure 2 is a flowchart of a method for constructing a first subset according to an embodiment of the present invention;

[0059] Figure 3 is a flowchart of a method for quantum optimization based on the first subset to obtain the latest global solution according to an embodiment of the present invention;

[0060] Figure 4 is a quantum circuit diagram acting on 5 qubits according to an embodiment of the present invention;

[0061] Figure 5 is a quantum circuit diagram acting on 4 qubits according to another embodiment of the present invention;

[0062] Figure 6 is a schematic block diagram of a distributed quantum computing device according to an embodiment of the present invention;

[0063] Figure 7 is a schematic block diagram of a distributed quantum computing system for combinatorial optimization according to an embodiment of the present invention;

[0064] Figure 8 is a schematic diagram of an undirected graph constructed based on a sensor network according to Application Example 1 of the present invention;

[0065] Figure 9It is an undirected graph corresponding to the grouping of goods to be transported after the application of the second embodiment of the present invention;

[0066] Figure 10 It is a structural principle block diagram of an electronic device according to an embodiment of the present invention. Detailed implementation manners

[0067] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0068] In the following detailed description, reference may be made to the various specification drawings that form a part of this application and illustrate specific embodiments of the application. In the drawings, like reference numerals generally describe substantially similar components in different figures. The various specific embodiments of the present application have been described in sufficient detail below so that those of ordinary skill in the art with relevant knowledge and technology can implement the technical solutions of the present application. It should be understood that other embodiments may also be utilized or structural, logical, or electrical changes may be made to the embodiments of the present application. Additionally, the "first", "second", etc. in the technical feature names of the present invention do not indicate an order, but are only used to distinguish technical features with the same name.

[0069] The present invention provides a distributed quantum computing method for various combinatorial optimization problems. For combinatorial optimization problems, generally, there are goals to be achieved, multiple decision variables that affect the achievement of the goal, and / or constraints on the decision variables, etc. For the convenience of description, a target function is modeled based on the goal to be achieved and the decision variables, and constraint conditions are modeled based on the constraints on the decision variables, and a combination of decision variables that satisfies the constraint conditions is obtained. A combination of values of any one or more decision variables is called a solution to the combinatorial optimization problem. Therefore, there can be multiple solutions to a combinatorial optimization problem. Among them, a combination of decision variables that satisfies all the constraint conditions G(x) and makes the target function F(x) reach a set goal (such as maximum, minimum, etc.) is called an optimal solution. The purpose of a combinatorial optimization problem is to find the optimal solution.

[0070] For the convenience of description, in the present invention, all functions corresponding to a combinatorial optimization problem to be solved are simply referred to as problem functions. Generally, according to the actual combinatorial optimization problem to be solved, there is a corresponding target function. In the present invention, the target function of various combinatorial optimization problems is described by the following expression 1-1.

[0071] F(x)|x∈{0,1}n 1-1

[0072] Let \(F(x)\) be the objective function of the combinatorial optimization problem, and the specific form of the function is adapted to the specific combinatorial optimization problem; \(n\) is the number of decision variables of the combinatorial optimization problem, \(x\) is a global solution of the objective function, which is an \(n\)-bit binary string. The bits in the binary string correspond one-to-one with the decision variables of the combinatorial optimization problem, and the value range of each bit is \(\{0, 1\}\), corresponding to the value ranges of the corresponding decision variables respectively. The value ranges of the decision variables correspond to two values, representing the selected value and the non-selected value. For the convenience of description, in the following description, the value "1" of the bit corresponds to the selected value of the decision variable, and the value "0" of the bit corresponds to the non-selected value of the decision variable. Of course, it can also be the other way around. Thus, it can be seen that for a global solution, when a bit value is 1, it means that the decision variable corresponding to the bit is selected, and when the bit value is 0, it means that the decision variable corresponding to the bit is not selected. When different decision variables are selected, different global solutions are formed. In the following description, the set of all global solutions is called the global solution space.

[0073] If the combinatorial optimization problem to be solved has corresponding constraint conditions, in the present invention, the corresponding constraint conditions are described by Expression 1-2. It should be noted that some problems may not have constraint conditions.

[0074]

[0075] Let \(G(x)\) be the constraint conditions that the combinatorial optimization problem needs to satisfy, and \(D\) is a finite discrete decision space, which includes all combinations of decision variables that satisfy the constraint conditions. means arbitrary selection. In the optimal global solution \(x\), the bit values corresponding to the decision variables that satisfy all the constraint conditions \(G(x)\) and make the objective function \(F(x)\) meet specific conditions (such as maximum, minimum, etc.) are 1, and the other bit values are 0. The purpose of the present invention is to determine the optimal global solution \(x\).

[0076] See Figure 1 , Figure 1 is a flowchart of a distributed quantum computing method for combinatorial optimization according to an embodiment of the present invention. The method includes:

[0077] Step S101, model the combinatorial optimization problem to be solved, randomly generate an initial global solution, and set the initial global solution as the latest global solution.

[0078] Step S102, construct a corresponding Hamiltonian based on the problem function of the combinatorial optimization problem to be solved.

[0079] Step S103, construct a first subset based on the latest global solution.

[0080] Step S104: Construct a quantum circuit with adjustable parameters corresponding to the first subset.

[0081] Step S105: Optimize the first subset through the quantum circuit to obtain a new global solution.

[0082] Step S106: Calculate the expectation value of the Hamiltonian corresponding to the new global solution.

[0083] Step S107: Determine whether the first preset requirement for stopping optimization is satisfied; if satisfied, execute Step S108, if not satisfied, execute Step S110.

[0084] Step S108: Sort the expectation values of the Hamiltonian obtained each time the latest global solution is obtained.

[0085] Step S109: Determine the global solution corresponding to the minimum expectation value of the Hamiltonian as the optimal solution to the combinatorial optimization problem to be solved, and end the processing flow.

[0086] Step S110: Set the current new global solution as the latest global solution, and return to Step S103.

[0087] Among them, in Step S101, based on the global solution space of the combinatorial optimization problem to be solved, a value 0 or 1 is randomly determined from the value range of each bit to generate an initial global solution x, and the initial global solution x represents a specific combination of decision variables.

[0088] In Step S102, the constructed Hamiltonian is adapted to the objective function and constraint conditions of the specific combinatorial optimization problem to be solved, etc.

[0089] In Step S103, when constructing the first subset, refer to Figure 2 , Figure 2 is a flowchart of a method for constructing a first subset according to an embodiment of the present invention. Specifically, it includes the following steps:

[0090] Step S201: Determine the corresponding global solution x i . For example, the global solution is represented as x i =(y0,y1,y k ,…,y n-1 ). Where i represents the serial number of the global solution, k represents the bit serial number, and corresponds to the corresponding decision variable, y k represents the value of the k-th bit, corresponding to the decision variable value, 1 means the corresponding decision variable is selected, and 0 means the decision variable is not selected. The global solution x i is the initial global solution or the global solution updated through iterative optimization.

[0091] Step S202, calculate the global solution x i of the Hamiltonian expectation value \(C_{Hamil}\).

[0092] Step S203, set \(k = 0\).

[0093] Step S204, obtain the \(k\)-th bit value.

[0094] Step S205, change the \(k\)-th bit value to obtain a new global solution x i_k . For example, when the original bit value is 1, change it to 0; when the original is 0, change it to 1.

[0095] Step S206, calculate the Hamiltonian expectation value \(C_{Hamil\_k}\) corresponding to the new global solution x i_k .

[0096] Step S207, calculate the difference \(\Delta C_{Hamil\_k}\) between the Hamiltonian expectation values corresponding to the two global solutions before and after changing the \(k\)-th bit value.

[0097] where \(\Delta C_{Hamil\_k}=\vert C_{Hamil\_k}-C_{Hamil}\vert\).

[0098] Step S208, determine whether \(k\) is less than \(n - 1\). If \(k\) is not less than \(n - 1\), that is, \(k=n - 1\), then execute Step S209; if \(k\) is less than \(n - 1\), then set \(k = k + 1\) in Step S212 and return to Step S204.

[0099] Step S209, sort all the differences \(\Delta C_{Hamil\_k}\) of the Hamiltonian expectation values from largest to smallest.

[0100] Step S210, determine the preset number of differences \(\Delta C_{Hamil\_k}\) of the Hamiltonian expectation values sorted in the front and obtain the corresponding bit numbers.

[0101] Step S211, extract the corresponding bit values from the global solution x i to construct the first subset.

[0102] In Step S201, determine the corresponding global solution x i according to the subset to be constructed. For example, when constructing the first first subset in Step S103, the global solution x i applied is the initial global solution; when it is determined in Step S107 that the first preset requirement for optimizing the stop is not met and the first subset is constructed again, the global solution x i applied is the latest global solution optimized based on the previous first subset.

[0103] Through Figure 2For the process shown, several decision variables with the greatest influence are determined from the current global solution to construct a first subset, so that the decision variables with the greatest influence on the global can be preferentially optimized, thereby improving the optimization efficiency.

[0104] In this embodiment, the number of bits in the first subset can be determined by the number of qubits supported by the quantum computing device implementing the optimization. For example, according to the existing quantum resources of the user, the maximum supported number of qubits is determined as the number of bits in the first subset.

[0105] In one embodiment, the first preset requirement for satisfying the optimization stop described in step S107 is that the number of times of performing quantum optimization based on the first subset to obtain the latest global solution reaches the preset number of optimizations. The specific number can be determined according to the total number of decision variables in the combinatorial optimization problem to be solved. If the total number of decision variables is large, the number of optimizations is large; if the total number of decision variables is small, the number of optimizations is small. A suitable number can be determined through effective experiments. Or, when the expectation value of the Hamiltonian corresponding to the global solution converges to the minimum value, it is determined that the first preset requirement for satisfying the optimization stop is met.

[0106] In step S104, the quantum computing device corresponding to the first subset is provided with at least a first preset number of qubits, that is, the number of bits in the first subset. The quantum circuit with adjustable parameters is, for example, a quantum circuit implementing the quantum approximate optimization algorithm (QAOA), a quantum circuit implementing the variational quantum eigenvalue solving algorithm (VQE), or a quantum circuit implementing the quantum neural network (QNN). Those skilled in the art can construct any one of the quantum circuits according to their usage habits, which will not be elaborated here.

[0107] Regarding step S105, see Figure 3 , Figure 3 is a flowchart of a method for performing quantum optimization based on the first subset to obtain the latest global solution according to an embodiment of the present invention, including the following steps:

[0108] Step S301, performing quantum optimization on the first subset using a quantum circuit with adjustable parameters to obtain a first local optimal solution.

[0109] Step S302, replacing the corresponding bit values in the current global solution with the first local optimal solution to obtain a first global solution, and calculating the expectation value of the Hamiltonian corresponding to the first global solution.

[0110] Step S303, extracting a second preset number of bit values from the first global solution to construct a second subset.

[0111] Step S304, performing quantum optimization on the second subset using a quantum circuit with adjustable parameters to obtain a second local optimal solution.

[0112] Step S305: Replace the corresponding bit values in the first global solution with the second local optimal solution to obtain the current latest first global solution, and calculate the Hamiltonian expectation value corresponding to the latest first global solution.

[0113] Step S306: Determine whether the second preset requirement for optimizing stop is satisfied. If it is satisfied, execute Step S307; if not, execute Step S309.

[0114] Step S307: Sort the Hamiltonian expectation values corresponding to each first global solution.

[0115] Step S308: Determine the first global solution corresponding to the minimum Hamiltonian expectation value as the latest global solution obtained by quantum optimization of the first subset.

[0116] Step S309: Take the current latest first global solution as the first global solution, and return to Step S303.

[0117] In the foregoing process, the second preset quantity can be a fixed value, that is, the number of bits for constructing the second subset each time is fixed and equal. The second preset quantity can also be a variable value, that is, the number of bits for constructing the second subset each time is not equal. In one embodiment, the second preset quantity is determined based on a decay function, that is, the number of bits for constructing the second subset each time decreases sequentially. In a more specific embodiment, the decay function is a linear function, the function value of the linear function is the second preset quantity applied in the currently constructed second subset, the independent variable of the linear function is the second preset quantity applied when constructing the second subset last time, the linear coefficient is a value less than 1, and the initial value of the independent variable is the first preset quantity, that is, the number of bits in the first subset. For example, when determining the specific value of the second preset quantity each time, it is calculated according to the following formula: n_sub = n_sub · decay_rate. Where n_sub on the left side of the equal sign is the value of the second preset quantity to be obtained this time, and n_sub on the right side of the equal sign is the value of the second preset quantity applied when constructing the second subset last time. When calculating the number of bits of the first second subset, n_sub on the left side of the equal sign is the initial value of the second preset quantity, and n_sub on the right side of the equal sign is the value of the first preset quantity. Since decay_rate on the right side of the equal sign is a decimal less than 1, the value of the second preset quantity obtained each time will be less than or equal to the value of the second preset quantity applied last time.

[0118] Of course, the linear function can also be a function shown in Expression 2-1 as follows:

[0119] f(n) = a - b · n 2-1

[0120] Among them, a is the initial value, b is the attenuation rate, and n is the number of iterations. Through this function, in each iteration, the number of bits in the second subset decreases according to a fixed ratio or quantity.

[0121] The aforementioned linear attenuation function has a simple form and is easy to implement.

[0122] It should be noted that the attenuation function can also be other function instances, such as the exponential attenuation function shown in Expression 2-2:

[0123] f(n) = a·b n 2-2

[0124] Among them, a is the initial value, b is a positive number less than 1, indicating that the size of the number of bits in the second subset decreases exponentially after each iteration, and n is the number of iterations. The aforementioned exponential attenuation function simulates a process of rapid decrease and then gradually tending to be stable.

[0125] Another example is the logarithmic attenuation function shown in Expression 2-3:

[0126] f(n) = a·log(b·n) 2-3

[0127] Among them, a and b are constants, and n is the number of iterations. As the number of iterations increases, the reduction rate of the number of bits in the second subset gradually slows down.

[0128] Another example is the reciprocal attenuation function (f(n) = a / n), polynomial attenuation function, and user-defined attenuation function, etc. Those of ordinary skill in the art can select any attenuation function according to the scale of the problem to be combined and optimized, application habits, etc. to determine the number of decision variable values in the second subset.

[0129] In this embodiment, the second preset requirement is that the second preset quantity is not greater than a preset quantity threshold. The preset quantity threshold is, for example, a positive integer, such as 3, that is, when the number of bits in the second subset is not greater than 3, this process ends.

[0130] In this embodiment, when optimizing the global solution based on the second subset, the global solution is optimized in the order from a large range to a small range, thereby improving the optimization efficiency.

[0131] The method of constructing the second subset in the aforementioned process is the same as the method of constructing the first subset, and will not be elaborated here.

[0132] In steps S301 and S304, the method of using a quantum circuit with adjustable parameters to perform quantum optimization on the first subset and the second subset to obtain a local optimal solution is the same, and mainly includes the following steps:

[0133] Set the parameter values in the quantum circuit, execute the quantum circuit with the parameters by the quantum computing device and measure, and calculate the expectation value of the Hamiltonian based on the measurement results. Then adjust the parameter values, execute the quantum circuit with the parameters again and measure, and calculate the expectation value of the Hamiltonian based on the measurement results. Among them, when adjusting the parameter values, adjust the parameter values in a way that reduces the expectation value of the Hamiltonian until the expectation value of the Hamiltonian converges, that is, the expectation value of the Hamiltonian no longer decreases. Measure the quantum state when the expectation value of the Hamiltonian converges, and determine the quantum state with the highest probability in the measurement results as the local optimal solution.

[0134] See Figure 4 , Figure 4 FIG. is a quantum circuit diagram acting on 5 qubits according to an embodiment of the present invention. In the order of evolution, the quantum circuit sequentially includes an initialization module 141, a problem Hamiltonian module 142, and a measurement module 143. Among them, the problem Hamiltonian module 142 includes multiple layers of identical quantum circuit units 1420, which include a plurality of RZ quantum gates and RX quantum gates, and each quantum gate is a parameterized quantum gate. During the parameter adjustment process, change the parameter values in each quantum gate to gradually reduce the expectation value of the Hamiltonian obtained based on the measured quantum state until convergence. When the calculated expectation value of the Hamiltonian no longer decreases, it is considered that the expectation value of the Hamiltonian has converged and the parameter adjustment is completed.

[0135] See Figure 5 , Figure 5 FIG. is a quantum circuit diagram acting on 4 qubits according to another embodiment of the present invention. Figure 5 The quantum circuit diagram in FIG. sequentially includes an initialization module 141, a problem Hamiltonian module 142, and a measurement module 143. Among them, the problem Hamiltonian module 142 includes multiple layers of identical quantum circuit units 1420, and the RZ quantum gates and RX quantum gates therein are parameterized quantum gates.

[0136] Figure 4 and Figure 5 The quantum circuit structures shown in FIGS. and are only examples, and those of ordinary skill in the art can design or apply any existing quantum circuit by themselves.

[0137] On the other hand, the present invention also provides a distributed quantum computing device for solving combinatorial optimization problems. See Figure 6 FIG. is a schematic block diagram of a distributed quantum computing device for combinatorial optimization according to an embodiment of the present invention. The distributed quantum computing device (abbreviation: distributed quantum computing device) 10 in the present invention includes a modeling module 11, an initial global solution generation module 12, a subset construction module 13, a quantum circuit module 14, an optimization module 15, an inspection module 16, an optimal solution determination module 17, and an iterative optimization module 18.

[0138] The modeling module 11 is configured to model the combinatorial optimization problem to be solved to obtain a problem function and a global solution space; the global solution space includes a plurality of bits corresponding to different decision variables of the combinatorial optimization problem to be solved respectively, and the value range of each bit in the global solution space corresponds to the value range of the corresponding decision variable; and a corresponding Hamiltonian is constructed based on the problem function of the combinatorial optimization problem to be solved.

[0139] The initial global solution generation module 12 is configured to randomly take values from the value ranges of each bit in the global solution space to generate an initial global solution.

[0140] The subset construction module 13 is configured to extract a first preset number of bit values from the initial global solution to construct a first subset.

[0141] The quantum circuit module 14 is configured to construct a quantum circuit with adjustable parameters corresponding to the first subset.

[0142] The optimization module 15 is configured to optimize the first subset through the quantum circuit to obtain an updated global solution and calculate the expectation value of the Hamiltonian corresponding to the updated global solution.

[0143] The verification module 16 is configured to verify whether the updated global solution meets the first preset requirement for stopping optimization.

[0144] The optimal solution determination module 17 is configured to, in response to the updated global solution meeting the first preset requirement for stopping optimization, determine the global solution corresponding to the minimum Hamiltonian expectation value as the optimal solution of the combinatorial optimization problem to be solved.

[0145] The iterative optimization module 18 is configured to, in response to the updated global solution not meeting the first preset requirement for stopping optimization, extract a first preset number of bit values from the updated global solution to construct a new first subset, and repeatedly execute the optimization module 15, the verification module 16, the optimal solution determination module 17, and the iterative optimization module 18 until the updated global solution meets the first preset requirement for stopping optimization.

[0146] See Figure 7 , Figure 7It is a schematic block diagram of a distributed quantum computing system for combinatorial optimization according to an embodiment of the present invention. The system in this embodiment includes a distributed quantum computing device 10 and a quantum computing device 20. In this embodiment, the quantum circuits with adjustable parameters corresponding to each first subset constructed by the distributed quantum computing device 10 are sequentially sent to the quantum computing device 20 in a serial manner. The quantum computing device 20 sequentially runs the received quantum circuits with adjustable parameters and sends the measurement results to the distributed quantum computing device 10. The optimization module 15 in the distributed quantum computing device 10 calculates the corresponding Hamiltonian expectation value based on the received measurement results. For specific details, refer to the description of the foregoing method flow and will not be elaborated here.

[0147] Among them, Figure 7 the distributed quantum computing device 10 in can be implemented by a classical computing device, and the quantum computing device 20, etc. can be a quantum simulator implemented by a classical computing device or a real quantum computer.

[0148] The present invention is applicable to any combinatorial optimization problem that can construct a problem function as a Hamiltonian, and is also applicable to any quantum circuit corresponding to a quantum variational algorithm that converges by reducing a loss function. It has a wide application range, diverse usage scenarios, and flexible selection of quantum circuits.

[0149] Since the present invention solves the combinatorial optimization problem through the way of subset optimization iteration, compared with the quantum computing method of global coding combinatorial optimization, the quantum circuit used in a single iteration of the present invention requires fewer qubits and shallower quantum circuit depth, thus significantly reducing the computing resources. Especially for solving large-scale combinatorial optimization problems, the effect is more significant.

[0150] In addition, since the present invention requires less quantum resources, it is easier to be realized in physical experiments, effectively simplifies the execution complexity in a real quantum computer, and improves the computing accuracy.

[0151] Application Example 1

[0152] In the scenario of monitoring the energy efficiency and interference of sensors, it is necessary to perform combinatorial optimization on existing sensors, so as to select a group with the minimum energy consumption and avoid interference between sensors while turning on the most sensors to increase the monitoring coverage. For this combinatorial optimization problem, an undirected graph is usually used to describe the specific scenario, such as Figure 8 shown Figure 8It is a schematic diagram of an undirected graph constructed based on Application Embodiment 1 of the present invention using a sensor network. Among them, there are a total of 40 sensors in this embodiment. Each node in the figure represents a sensor, and the number in the node is the weight value, which represents the energy consumption of the sensor. The connection lines between the nodes indicate that there is interference or duplicate monitoring between two sensors. Each node is configured with a corresponding serial number and arranged in sequence. To maintain a clear diagram structure, only the first node v1 and the sixth node v6 are marked in the figure. The nodes indicated by the arrows in the figure are the nodes corresponding to the optimal solution obtained after calculation. For Figure 8 For the undirected graph in

[0153] For simplicity of description, the set of nodes in the undirected graph is represented as v, and the j-th node among them is represented as v j , and the weight of the node is represented as w j . The interference situation corresponding to the sensors in the undirected graph is represented by the adjacency matrix ε. Each element in the matrix represents the interference between two nodes. In one embodiment, when there is interference between two nodes, the element value is 1, and when there is no interference between two nodes, the element value is 0. The objective function and constraint conditions of this application embodiment can be modeled as follows:

[0154]

[0155] Among them, the first row and the second row are the objective functions, and the third row and below are the constraint conditions. represents any node v j . ε k,l represents the element value of the adjacency matrix. According to the conditions that should be satisfied as described above, the maximum number of nodes is obtained from the undirected graph. At the same time, the weighted sum of these nodes is the smallest, and moreover, there should be no interference between these nodes, that is, there should be no connection lines between these nodes.

[0156] The Hamiltonian obtained according to the objective function and constraint conditions is as follows:

[0157]

[0158] Among them, Hp represents the total Hamiltonian, Ho represents the target Hamiltonian; H C represents the constraint Hamiltonian; is the Pauli Z operator acting on the j-th qubit, w j is the node weight corresponding to the j-th qubit, and the qubits correspond to the nodes one by one. When the number of nodes is the largest and the weighted sum value of the nodes is the smallest, the value of the target Hamiltonian H O is the smallest. and are the Pauli Z operators acting on the k-th and l-th qubits respectively; w k and w l are the node weights corresponding to the k-th qubit and the l-th qubit respectively, and ε k,l is the interference value between the node corresponding to the k-th qubit and the node corresponding to the l-th qubit. When there is interference between the two nodes, ε k,l = 1; when there is no interference between the two nodes, ε k,l = 0. When and only when the selected nodes are not connected to each other, the value of the constrained Hamiltonian H C is minimized, and ρ represents the importance of the interference condition relative to the objective function.

[0159] When solving the combinatorial optimization problem of Embodiment 1 of this application based on the method provided by the present invention, the global solution includes 40 bits, and each bit corresponds to an undirected graph node, that is, a sensor, corresponding to the decision variable in the foregoing method description. The value of the bit is 0 or 1, where 1 represents selecting the node and 0 represents not selecting the node. If the traditional quantum computing method is used, 40 qubits are required, while by applying the method provided by the present invention, only a small number of qubits can complete the solution. In this embodiment, the number of decision variables in the first subset is 5, the depth of the applied quantum circuit is 4, and the maximum number of iterations is set to 7. Corresponding to Figure 8 , a first subset including 5 bits is constructed in a randomly generated initial global solution, and the corresponding 5 nodes are the 5 nodes that have the greatest impact on the Hamiltonian. Then, a local optimized solution is obtained through the optimization of the quantum circuit with a depth of 4. The values in the local optimized solution are used to replace the values of the corresponding bits in the initial global solution to obtain a new global solution, and the expected value of the corresponding Hamiltonian is calculated. At this time, one iteration is completed. Then, the 5 nodes that have the greatest impact on the Hamiltonian are determined in the new global solution to form a new first subset, and then optimization is performed. This cycle continues until the number of iterations reaches 7 times, that is, the first preset requirement for stopping optimization is met. At this time, the smallest global solution is selected from the expected values of the Hamiltonian obtained in each iteration process, and this global solution is the optimal solution to this combinatorial optimization problem.

[0160] Among them, the quantum circuit constructed based on the first subset (such as Figure 4)Acting on 5 qubits, the quantum circuit sequentially includes an initialization module 141, a problem Hamiltonian module 142, and a measurement module 143 according to the evolution order. Among them, the initialization module 141 includes a Hadamard gate, and a mixed superposition state is obtained by performing the Hadamard gate on the qubit in the zero state. In this embodiment, the problem Hamiltonian module 142 includes 4 sequentially connected quantum circuit units 1420, that is, the quantum circuit depth is 4. Each quantum circuit unit 1420 includes a quantum gate with parameters. When the quantum circuit is run on the quantum computing device, after evolving through the initialization module 141 and the problem Hamiltonian module 142 in sequence, the measurement module 143 measures all qubits. Then, the Hamiltonian expectation value is calculated based on the measured quantum state, and the descent gradient of the Hamiltonian expectation value is calculated. If the descent gradient is 0, it means that the Hamiltonian expectation value of the current quantum system converges, then the parameter tuning is completed, and all current qubits are measured, and the quantum state with the highest probability in the measurement result is used as the local optimal solution. If the descent gradient is not 0, it means that the current Hamiltonian expectation value has not converged, then the parameters are adjusted until the descent gradient is 0. The problem Hamiltonian module in the quantum circuit in this application embodiment can also be other variational quantum circuits, such as VQE, QNN, etc., which will not be elaborated here.

[0161] Corresponding to this embodiment, after each iteration, after determining the global solution through the Hamiltonian expectation value, the weighted sums calculated based on the global solution are respectively: 186.70153532083782, 186.70153532083782, 154.72807654280592, 154.72807654280592, 154.72807654280592, 154.72807654280592, 154.72807654280592 in the order of iteration.

[0162] Among them, the smallest weighted sum is 154.72807654280592, and the bits with bit values of 1 corresponding to the global solution are 6, 9, 11, 13, 14, 17, 20, 21, 22, 26, 27, 33, 34, and 35, that is, they respectively correspond to Figure 8 the nodes marked by the arrows in

[0163] Application Embodiment 2

[0164] The combinatorial optimization problem in this embodiment is the Max-Cut problem for benefit improvement applied in logistics transportation. For example, a batch of goods needs to be divided into two groups for transportation respectively, and there will be additional benefits when some goods are transported in two groups. To determine how to group this batch of goods to maximize the benefits, first construct an undirected graph V according to the benefit relationship between the goods. Each good is taken as a node, and if there is an additional benefit between the goods, an edge e is added between the corresponding nodes, and the generated revenue is represented by the weight w of the edge. The node set is represented as V, and the edge set is represented as E. For the combinatorial optimization problem of this embodiment, the objective function is constructed as shown in the following expression 3-1: e It is represented. The node set is represented as V, and the edge set is represented as E. For the combinatorial optimization problem of this embodiment, the objective function is constructed as follows in Expression 3-1:

[0165]

[0166] where u and v respectively represent any two nodes forming a connection in the undirected graph, that is, the connection between node u and node v belongs to the set E. x u and x v are respectively the grouping situations of node u and node v in the undirected graph. Taking node u as an example, when x u =1, it means that node u is in the first set S, and when x u =0, it means that vertex u is in the second set T (T = V - S).

[0167] For the objective function x u +x v -2x u x v , if node u and node v are in the same set, then x u and x v are both 0 or both 1, and the function value is 0; if node u and node v are in different sets, then x u and x v one is 0 and the other is 1, and the function value is 1.

[0168] The problem Hamiltonian mapped according to the objective function is as shown in the following expression 3-2:

[0169]

[0170] Each node corresponds to a qubit, and the serial number is the same as the node symbol. σ is the Pauli Z operator acting on the subscript qubit.

[0171] Taking a group of 20 goods as an example, when solving this problem according to the method provided by the present invention, in the initial global solution, the nodes corresponding to the 20 goods are randomly placed in the first set S and the second set T. Then, according to the Hamiltonian of the problem mapped by the global solution, the corresponding expected value of the Hamiltonian can be obtained. When constructing the first subset, 5 nodes that have the greatest influence on the expected value of the Hamiltonian are determined from the initial global solution to form the first subset. Then, through optimization, the grouping of these 5 nodes is re-divided to obtain a new global solution. Then, 5 nodes are re-determined to form the first subset and optimized again. In this embodiment, after 6 iterations, the total weights (referred to as the cut value) calculated based on the global solution obtained in each iteration are: 25, 30, 31, 33, 33, 33 in sequence according to the iteration order.

[0172] Among them, the maximum total weight is 33, and the grouping obtained for this optimal solution is as follows: Each number in the following grouping is the node number, corresponding to the goods one by one.

[0173] First set S: [1, 8, 9, 12, 14, 15, 16, 18],

[0174] Second set T: [0, 2, 3, 4, 5, 6, 7, 10, 11, 13, 17, 19].

[0175] The grouping corresponding to the optimal solution is as Figure 9 shown. Figure 9 It is a schematic diagram of an undirected graph corresponding to the grouping of goods to be transported after the application of the second embodiment of the present invention. Each node in the graph corresponds to a piece of goods, and the number in the node is the serial number. The nodes on the left form the first set S, and the nodes on the right form the second set T.

[0176] In addition, during the optimization process of the first subset composed of 5 nodes, after the optimization of the first subset composed of 5 nodes is completed, 4 nodes can be further selected from the new global solution to form the second subset, and then the second subset is optimized. The global solution obtained after optimizing the second subset is used as the global solution obtained in this iteration. By nesting another optimization iteration in each optimization iteration of the first subset, the efficiency of obtaining the optimal solution can be effectively improved.

[0177] Application Embodiment Three

[0178] The combinatorial optimization problem in this embodiment is a balanced minimum cut problem. The application scenario of the problem is, for example, to optimize the cost in the logistics distribution between cities. Specifically, it is necessary to establish multiple logistics nodes in each of the two cities. When goods need to be transported between two logistics nodes, there is a passage between the two logistics nodes and a certain transportation cost is generated. The problem to be solved is to allocate the logistics nodes with the lowest transportation cost on average in the two cities.

[0179] Based on the combinatorial optimization problem of this embodiment, an undirected graph V is constructed according to the logistics nodes and the logistics demands between the nodes. Each node v in the graph i corresponds to a logistics node, and all v i nodes form a node set. Node v i and node v j are connected by a line e i,j corresponding to the logistics demand between two logistics nodes, and all the lines e i,j form an edge set edges.

[0180] Logistics nodes need to be established between two cities. For fairness, the total number of logistics nodes in each city needs to be as average as possible. If there is a path between two logistics nodes, there is an edge connecting them.

[0181] Combining the objective function and constraint conditions of this embodiment, the cost optimization function shown in the following expression 4-1 is obtained:

[0182] Cost = -Σ <i,j>cedge (1 - Z i Z j ) / 2 + penalty×(∑ i z i ) 2 4-1

[0183] where Z i and Z j represent the partitioning of nodes v i and v j in the undirected graph V. Taking node v i as an example, when Z i = 1, it means that node v i is in the first set S, and when Z i = 0, it means that node v i is in the second set T(V - S). Penalty is the penalty coefficient. The first term is the objective function, aiming to minimize the number of cut edges, and the second term is the constraint condition, aiming to make the number of nodes in the two groups average.

[0184] Based on the above function mapping, the problem Hamiltonian is shown in the following expression 4-2:

[0185]

[0186] Taking 20 logistics nodes as an example, the problem is solved according to the method provided by the present invention. The number of times of quantum optimization based on the first subset to obtain the latest global solution is set to 6 times, and the number of nodes (i.e., decision variables) in the first subset is set to 6. In each optimization iteration of the first subset, a second subset is also constructed. The number of nodes in the second subset in the first iteration is 5, and the number of nodes in the second subset in the second iteration is 4. After the optimization of the second subset based on the second iteration is completed, the optimization of the current first subset is completed, and the global solution obtained at this time is used as the latest global solution. The cutting values obtained by the 6 optimizations carried out according to this process are: 30, 20, 19, 17, 16, 15 in the iteration order. Therefore, the best cutting value is 15, and the grouping of the optimal solution of the corresponding combinatorial optimization is as follows: Each number in the following grouping is the node number of the undirected graph, corresponding one by one to the logistics nodes.

[0187] The first set S: [0, 4, 6, 13, 14, 15, 16, 17, 18],

[0188] The first set T: [1, 2, 3, 5, 7, 8, 9, 10, 11, 12, 19].

[0189] On the other hand, the embodiment of the present invention also provides an electronic device. Refer to Figure 10 , Figure 10 which is the structural principle block diagram of the electronic device according to an embodiment of the present invention. As shown in Figure 10 , the electronic device includes a processor and a memory. Computer instructions are stored in the memory, and when the processor runs the computer instructions, it executes the distributed quantum computing for combinatorial optimization provided by the present invention. Specifically, such as Figure 6 or Figure 7 the distributed quantum computing processing device 10 in.

[0190] Specifically, the processor 601 may include a central processing unit (CPU) or a graphics processing unit (GPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The memory 602 may include a memory for data or instructions. For example, the memory 602 may be at least one of the following: a hard disk drive (HDD), a read only memory (ROM), a random access memory (RAM), a floppy disk drive, a flash memory, an optical disc, a magneto-optical disc, a magnetic tape, a universal serial bus (USB) drive, or other physical / tangible memory storage devices. Further, the memory 602 includes removable or non-removable (or fixed) media. Additionally, the memory 602 may be inside or outside the integrated gateway disaster recovery device. The memory 602 may be a non-volatile solid state memory. In other words, generally, the memory 602 includes a tangible (non-transitory) computer-readable storage medium (such as a memory device) encoded with executable instructions, and when the stored executable instructions are executed by the processor 601 (such as by one or more processors), the distributed quantum computing for combinatorial optimization in the embodiments of the present invention can be implemented.

[0191] In one example, Figure 10 The illustrated electronic device may further include a communication interface 603 and a bus 610. Among them, the processor 601, the memory 602, and the communication interface 603 are connected through the bus 610 to complete communication with each other. The communication interface 603 is mainly used to implement communication between various modules, devices, units, and / or devices in the electronic device.

[0192] The bus 610 includes hardware, software, or both, and can couple the components of the online data flow charging device to each other. For example, the bus may include at least one of the following: an accelerated graphics port (AGP) or other graphics buses, an enhanced industry standard architecture (EISA) bus, a front side bus (FSB), a hypertransport (HT) interconnect, an industry standard architecture (ISA) bus, an infinite bandwidth interconnect, a low pin count (LPC) bus, a memory bus, a microchannel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable buses. The bus 610 may include one or more buses. Although the embodiments of the present invention describe or illustrate specific buses, the embodiments of the present invention may contemplate any suitable bus or interconnect method.

[0193] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the foregoing distributed quantum computing method for combinatorial optimization is implemented. The computer-readable storage medium may be, for example, a classical computer-readable storage medium, such as a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. It may also be a storage medium for storing quantum information and readable by a quantum computer, such as a quantum random access memory (QRAM). QRAM can be regarded as the quantum version of RAM in a classical computer. Through QRAM, a quantum superposition state containing information can be created. Compared with RAM that needs to read one by one, data in superposition can be read at superposition addresses. QRAM can be implemented in physical ways such as optics, semiconductor quantum dots, superconducting circuits, ion traps, etc.

[0194] The flowcharts and / or block diagrams of the methods and systems of the embodiments of the present invention are described above by way of example, and the relevant aspects are described. It should be understood that each block or a combination thereof in the flowchart and / or block diagram can be implemented by computer program instructions, or by dedicated hardware that performs a specified function or action, or by a combination of dedicated hardware and computer instructions. When implemented in hardware, it may be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, etc.; when implemented in software, it is a program or a code segment for performing the required task. The program or code segment can be stored in a memory, or transmitted through a data signal carried in a carrier wave on a transmission medium or a communication link. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0195] The above embodiments are only for illustrative purposes of the present invention and are not intended to limit the present invention. Those of ordinary skill in the relevant technical field can make various changes and modifications without departing from the scope of the present invention. Therefore, all equivalent technical solutions should also fall within the scope of the disclosure of the present invention.

Claims

1. A distributed quantum computing method for combinatorial optimization, characterized in that, Including: Step 1: Model the combinatorial optimization problem to be solved to obtain a problem function and a global solution space. The global solution space includes a plurality of bits respectively corresponding to different decision variables of the combinatorial optimization problem to be solved. The value range of each bit in the global solution space corresponds to the value range of the corresponding decision variable; Step 2: Construct a corresponding Hamiltonian based on the problem function of the combinatorial optimization problem to be solved; Step 3: Randomly take values from the value range of each bit in the global solution space to generate an initial global solution; Step 4: Extract the bit values of the first preset quantity from the initial global solution to construct a first subset; Step 5: Construct a quantum circuit with adjustable parameters corresponding to the first subset; Step 6: Optimize the first subset through the quantum circuit to obtain an updated global solution and calculate the expectation value of the Hamiltonian corresponding to the updated global solution; Step 7: Check whether the updated global solution meets the first preset requirement for stopping optimization; in response to the updated global solution meeting the first preset requirement for stopping optimization, execute Step 8, and in response to the updated global solution not meeting the first preset requirement for stopping optimization, execute Step 9; Step 8: Determine the global solution corresponding to the minimum Hamiltonian expectation value as the optimal solution of the combinatorial optimization problem to be solved and end; Step 9: Extract the bit values of the first preset quantity from the updated global solution to construct a new first subset, and return to Step 6; Wherein, Step 4: Extract the bit values of the first preset quantity from the initial global solution to construct a first subset, including: Traverse each bit in the initial global solution, change the value of each bit and calculate the expectation values of the Hamiltonian corresponding to the two global solutions before and after changing the value of each bit, and calculate the difference between the two expectation values of the Hamiltonian; Determine the bits corresponding to the first preset quantity in descending order of the difference between the expectation values of the Hamiltonian; Extract the bit values of the corresponding bits from the initial global solution to obtain a first subset.

2. The distributed quantum computing method for combinatorial optimization according to claim 1, wherein Step 7: Check whether the updated global solution meets the first preset requirement for stopping optimization, including: Count the number of iterations for optimizing the first subset to obtain the updated global solution; Determine that the first preset requirement for stopping optimization is met when the number of iterations reaches the preset number threshold; Alternatively, check whether the expectation value of the Hamiltonian corresponding to the updated global solution converges to the minimum value; Determine that the first preset requirement for stopping optimization is met when it is checked that the expectation value of the Hamiltonian corresponding to the updated global solution converges to the minimum value.

3. The distributed quantum computing method for combinatorial optimization according to claim 1, wherein Step 6: Optimize the first subset through the quantum circuit to obtain an updated global solution and calculate the expectation value of the Hamiltonian corresponding to the updated global solution, including: Step 61, perform quantum optimization on the first subset using a quantum circuit with adjustable parameters to obtain a first local optimal solution; Step 62, replace the corresponding bit values in the current global solution with the first local optimal solution to obtain a first global solution, and calculate the expectation value of the Hamiltonian corresponding to the first global solution. The current global solution is the initial global solution or the global solution updated after the previous iteration; Step 63, extract the bit values of the second preset quantity from the first global solution to construct a second subset; Step 64: Optimize the second subset through a quantum circuit with adjustable parameters to obtain a second local optimal solution; Step 65: Replace the corresponding bit values in the first global solution with the second local optimal solution to obtain an updated first global solution and calculate the expectation value of the Hamiltonian corresponding to the updated first global solution; Step 66: Check whether the updated first global solution meets the second preset requirement for stopping optimization; in response to the updated first global solution meeting the second preset requirement for stopping optimization, execute Step 67, and in response to the updated first global solution not meeting the second preset requirement for stopping optimization, execute Step 68; Step 67: Determine the first global solution corresponding to the minimum Hamiltonian expectation value as the updated global solution obtained by optimizing the first subset and end; Step 68: Extract a second preset number of bit values from the updated first global solution to construct a new second subset, and return to Step 64.

4. The distributed quantum computing method for combinatorial optimization according to claim 3, characterized in that Step 68: Extract a second preset number of bit values from the updated first global solution to construct a new second subset, further including: determining the second preset number based on a decay function.

5. The distributed quantum computing method for combinatorial optimization according to claim 4, wherein The decay function is a linear function, the function value of the linear function is the second preset number applied in the currently constructed second subset, the independent variable of the linear function is the second preset number applied when constructing the second subset last time, the linear coefficient is a value less than 1, and the initial value of the independent variable is the first preset number.

6. The distributed quantum computing method for combinatorial optimization according to claim 3, characterized in that, Step 66: Check whether the updated first global solution meets the second preset requirement for stopping optimization, including: determining whether the second preset number reaches a preset number threshold, and in response to the second preset number reaching the preset number threshold, determining that the second preset requirement for stopping optimization is met.

7. The distributed quantum computing method for combinatorial optimization according to claim 3, characterized in that Step 61: Perform quantum optimization on the first subset through a quantum circuit with adjustable parameters to obtain a first local optimal solution, including: Adjust the parameter values in the quantum circuit so that the expectation value of the Hamiltonian obtained by running the quantum circuit decreases until convergence; Measure the quantum state when the expectation value of the Hamiltonian converges, and determine the quantum state with the highest probability in the measurement result as the first local optimal solution.

8. A distributed quantum computing device for combinatorial optimization, characterized in that, Including: A modeling module configured to model the combinatorial optimization problem to be solved to obtain a problem function and a global solution space. The global solution space includes multiple bits corresponding to different decision variables of the combinatorial optimization problem to be solved. The value range of each bit in the global solution space corresponds to the value range of the corresponding decision variable, and construct a corresponding Hamiltonian based on the problem function of the combinatorial optimization problem to be solved; An initial global solution generation module configured to randomly select values from the value ranges of each bit in the global solution space to generate an initial global solution; A subset construction module configured to extract a first preset number of bit values from the initial global solution to construct a first subset; A quantum circuit module configured to construct a quantum circuit with adjustable parameters corresponding to the first subset; An optimization module configured to optimize the first subset through the quantum circuit to obtain an updated global solution and calculate the expectation value of the Hamiltonian corresponding to the updated global solution; A verification module, configured to verify whether the updated global solution meets the first preset requirement for optimization termination; An optimal solution determination module, configured to, in response to the updated global solution meeting the first preset requirement for optimization termination, determine the global solution corresponding to the minimum Hamiltonian expectation value as the optimal solution to the combinatorial optimization problem to be solved; An iterative optimization module, configured to, in response to the updated global solution not meeting the first preset requirement for optimization termination, extract a first preset number of bit values from the updated global solution to construct a new first subset, and repeatedly execute the optimization module, the verification module, the optimal solution determination module, and the iterative optimization module until the updated global solution meets the first preset requirement for optimization termination; Wherein, after the subset construction module is further configured, it traverses each bit in the initial global solution, changes the value of each bit, calculates the Hamiltonian expectation values corresponding to the two global solutions before and after changing the value of each bit, and calculates the difference between the two Hamiltonian expectation values; according to the order of the differences between the Hamiltonian expectation values from large to small, determine the first preset number of corresponding bits; Extract the bit values of the corresponding bits from the initial global solution to obtain a first subset.

9. An electronic device, comprising a processor and a memory, characterized in that, The memory stores computer instructions, and when the processor runs the computer instructions, it executes the distributed quantum computing method for combinatorial optimization according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions, and when the computer instructions are run by the processor, it executes the distributed quantum computing method for combinatorial optimization according to any one of claims 1-7.

Citation Information

Patent Citations

  • Power network topology optimization method based on quantum computing

    CN116842669A

  • Path optimization method and device, electronic equipment and storage medium

    CN116933954A