Distributed quantum computing method and device for combinatorial optimization, equipment and medium
The combined optimization problem is modeled and optimized through distributed quantum computing method. Using Hamiltonian and tunable parameters quantum circuits, the problem of excessive calculation time and difficult to meet real-time real-time calculation of large-scale combined optimization problems is solved, and efficient combination optimization solution is achieved.
Patent Information
- Application Number
- CN202510293693.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-03-13
AI Technical Summary
The existing technology is difficult to efficiently solve the problem of large-scale combination optimization, especially when the variable scale is expanded, the calculation time is too long and it is difficult to meet the real-time requirements.
A distributed quantum computing method is proposed, which models the combination optimization problem, constructs Hamiltonian, and uses quantum lines with tunable parameters to optimize, iteratively solve, and finally determines the optimal solution to the combination optimization problem.
This method can solve the problem of large-scale combination optimization with fewer quantum computing resources, significantly reduce the demand for computing resources, and improve computing efficiency. It is especially suitable for application scenarios with high real-time requirements.
Smart Images

Figure CN119808982A_ABST
Abstract
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, and so on. 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, exhaustive method, priority list method, Lagrange 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 theoretically find the optimal solution to the combinatorial optimization problem, when the scale is large, the calculation time of the above algorithms is too long, and it is difficult to apply them in practice; the priority list method and Lagrange relaxation method cannot guarantee the optimal solution; the hybrid algorithm also has some challenges and bottlenecks, which are mainly reflected in the following aspects: 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.
[0003] 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.
[0004] 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
[0005] 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.
[0006] In order to solve the above technical problem, according to one aspect of the present invention, the present invention provides a distributed quantum computing method for combinatorial optimization, comprising the following steps: Step 1: Modeling the combinatorial optimization problem to be solved to obtain a problem function and a global solution space, wherein the global solution space includes a plurality of bits corresponding to different decision variables of the combinatorial optimization problem to be solved, and the value range of each bit in the global solution space corresponds to the value range of the corresponding decision variable; Step 2: constructing a corresponding Hamiltonian based on the problem function of the combinatorial optimization problem to be solved; Step 3: Randomly select a value from the value range of each bit in the global solution space to generate an initial global solution; Step 4: extracting a first preset number of bit values 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: Optimizing the first subset through the quantum circuit to obtain an updated global solution and calculating the expected 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 the optimization; in response to the updated global solution meeting the first preset requirement for stopping the optimization, execute step 8; in response to the updated global solution not meeting the first preset requirement for stopping the optimization, execute step 9; Step 8: Determine the global solution corresponding to the minimum Hamiltonian expected value as the optimal solution to the combinatorial optimization problem to be solved, and end; Step 9: Extract a first preset number of bit values from the updated global solution to construct a new first subset, and return to step 6.
[0007] Optionally, step 7: checking whether the updated global solution meets the first preset requirement for stopping the optimization includes: Count the number of iterations of optimizing the first subset to obtain an updated global solution; When the number of iterations reaches a preset number threshold, determining that a first preset requirement for stopping the optimization is met; Alternatively, check whether the expected value of the Hamiltonian corresponding to the updated global solution converges to the minimum value; When the expected value of the Hamiltonian corresponding to the updated global solution converges to the minimum value, it is determined that the first preset requirement for stopping the optimization is met.
[0008] Optionally, step 6: optimizing the first subset through the quantum circuit to obtain an updated global solution and calculating the expected value of the Hamiltonian corresponding to the updated global solution, comprises: Step 61, using a quantum circuit with adjustable parameters to perform quantum optimization on the first subset to obtain a first local optimal solution; Step 62, using the first local optimal solution to replace the corresponding bit value in the current global solution to obtain a first global solution, and calculating the expected value of the Hamiltonian corresponding to the first global solution, wherein the current global solution is the initial global solution or the global solution updated by the last iteration; Step 63, extracting a second preset number of bit values from the first global solution to construct a second subset; Step 64, optimizing the second subset through a quantum circuit with adjustable parameters to obtain a second local optimal solution; Step 65, using the second local optimal solution to replace the corresponding bit value in the first global solution to obtain an updated first global solution and calculating the expected value of the Hamiltonian corresponding to the updated first global solution; Step 66, checking whether the updated first global solution meets the second preset requirement for stopping the optimization; in response to the updated first global solution meeting the second preset requirement for stopping the optimization, executing step 67; in response to the updated first global solution not meeting the second preset requirement for stopping the optimization, executing step 68; Step 67: Determine the first global solution corresponding to the minimum Hamiltonian expected 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 .
[0009] Optionally, step 68: extracting a second preset number of bit values from the updated first global solution to construct a new second subset, further includes: determining the second preset number based on a decay function.
[0010] Optionally, the attenuation function is a linear function, the function value of the linear function is the second preset number applied in the current construction of the second subset, the independent variable of the linear function is the second preset number applied when the second subset was last constructed, the linear coefficient is a value less than 1, and the initial value of the independent variable is the first preset number.
[0011] Optionally, step 66: checking whether the updated first global solution satisfies a second preset requirement for stopping optimization, including: judging 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.
[0012] Optionally, step 61: using a quantum circuit with adjustable parameters to perform quantum optimization on the first subset to obtain a first local optimal solution, comprising: Adjusting parameter values in the quantum circuit so that the expected value of the Hamiltonian obtained by running the quantum circuit decreases until convergence; The quantum state when the expected value of the Hamiltonian converges is measured, and the quantum state with the highest probability in the measurement results is determined as the first local optimal solution.
[0013] Optionally, step 4: extracting a first preset number of bit values from the initial global solution to construct a first subset comprises: Traversing each bit in the initial global solution, changing the value of each bit and calculating the expected values of the Hamiltonian corresponding to the two global solutions before and after changing the value of each bit, and calculating the difference between the two expected values of the Hamiltonian; Determine the first preset number of corresponding bits according to the order of the difference of the expected value of the Hamiltonian from large to small; The bit values of the corresponding bits are extracted from the initial global solution to obtain a first subset.
[0014] According to another aspect of the present invention, the present invention provides a distributed quantum computing device for combinatorial optimization, comprising: A modeling module is configured to model the combinatorial optimization problem to be solved to obtain a problem function and a global solution space, wherein 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, and a corresponding Hamiltonian is constructed based on the problem function of the combinatorial optimization problem to be solved; An initial global solution generation module, configured to randomly select a value from a value range 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 an 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 an expected value of the Hamiltonian corresponding to the updated global solution; A testing module configured to test whether the updated global solution satisfies a first preset requirement for stopping the optimization; an optimal solution determination module, configured to determine the global solution corresponding to the minimum Hamiltonian expected value as the optimal solution to the combinatorial optimization problem in response to the updated global solution satisfying the first preset requirement for optimization stop; The iterative optimization module is configured to extract a first preset number of bit values from the updated global solution to construct a new first subset in response to the updated global solution not satisfying the first preset requirement for stopping the optimization, and repeatedly execute the optimization module, the inspection module, the optimal solution determination module and the iterative optimization module until the updated global solution satisfies the first preset requirement for stopping the optimization.
[0015] According to another aspect of the present invention, the present invention also provides an electronic device, including a processor and a memory, wherein the memory stores computer instructions, and when the processor runs the computer instructions, the aforementioned distributed quantum computing method for combinatorial optimization is executed.
[0016] According to another aspect of the present invention, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the aforementioned distributed quantum computing method for combinatorial optimization is executed.
[0017] The present invention is applicable to any combinatorial optimization problem in which the objective function and the constraint conditions can be constructed as Hamiltonians, and is also applicable to any quantum circuit corresponding to a quantum variational algorithm that converges by reducing the loss function. It has a wide range of applications, multiple usage scenarios, and flexible algorithm selection.
[0018] Since the present invention solves the combinatorial optimization problem by sampling 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 quantum bits and a shallower quantum circuit depth, thereby significantly reducing computing resources, especially for solving large-scale combinatorial optimization problems, the effect is more significant.
[0019] In addition, since the present invention requires fewer quantum resources, it is easier to implement in physical experiments, and it also effectively simplifies the execution complexity implemented in a real quantum computer and improves the calculation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The preferred embodiments of the present invention will be further described in detail below with reference to the accompanying drawings, wherein: Figure 1 is a flow chart of a distributed quantum computing method for combinatorial optimization according to an embodiment of the present invention; Figure 2 is a flow chart of a method for constructing a first subset according to an embodiment of the present invention; Figure 3 is a flow chart of a method for performing quantum optimization based on a first subset to obtain a latest global solution according to an embodiment of the present invention; Figure 4 is a quantum circuit diagram acting on 5 quantum bits according to one embodiment of the present invention; Figure 5 is a quantum circuit diagram acting on 4 quantum bits according to another embodiment of the present invention; Figure 6 is a principle block diagram of a distributed quantum computing device according to an embodiment of the present invention; Figure 7is a principle block diagram of a distributed quantum computing system for combinatorial optimization according to an embodiment of the present invention; Figure 8 is a schematic diagram of an undirected graph constructed based on a sensor network according to the first application embodiment of the present invention; Fig. 9 is an undirected graph corresponding to the grouping of the transported goods according to the second application embodiment of the present invention; Fig.10 It is a structural principle block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] In the following detailed description, reference may be made to the various specification drawings that are part of the present application and are used to illustrate specific embodiments of the present application. In the accompanying drawings, similar reference numerals describe substantially similar components in different figures. The various specific embodiments of the present application are described in sufficient detail below so that a person of ordinary skill in the art with relevant knowledge and skills in the art 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. In addition, the "first", "second", etc. in the names of the technical features of the present invention do not indicate ordering, but are only used to distinguish technical features with the same names.
[0023] The present invention provides a distributed quantum computing method for various combinatorial optimization problems. For combinatorial optimization problems, there are generally goals to be achieved, multiple decision variables that affect the achievement of the goals, and / or constraints on the decision variables. For the convenience of description, the objective function is obtained by modeling the goals to be achieved and the decision variables, and the constraints are obtained by modeling the constraints on the decision variables, and the decision variable combination that satisfies the constraints is obtained. The combination of the values of any one or more decision variables is called the solution of the combinatorial optimization problem, so there can be multiple solutions to a combinatorial optimization problem, among which the combination of decision variables that satisfies all the constraints G(x) and makes the objective function F(x) reach the set goal (such as maximum, minimum, etc.) is called the optimal solution. The purpose of the combinatorial optimization problem is to find the optimal solution.
[0024] For the convenience of description, in the present invention, all functions corresponding to a combinatorial optimization problem to be solved are referred to as problem functions. Usually, according to the actual combinatorial optimization problem to be solved, it corresponds to a corresponding objective function. In the present invention, the following expression 1-1 is used to describe the objective function of various combinatorial optimization problems.
[0025] 1-1 F(x) is the objective function of the combinatorial optimization problem, and the specific expression of the function is adapted to the specific combinatorial optimization problem; n is the number of decision variables of the combinatorial optimization problem, and 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 to the decision variables of the combinatorial optimization problem, and the value range of each bit is {0, 1}, which corresponds to the corresponding decision variable value range, and the decision variable value range corresponds to two values, representing the selected value and the value not selected. For the convenience of explanation, in the following description, the bit value "1" corresponds to the value representing the selected decision variable, and the bit value "0" corresponds to the value representing the unselected decision variable. Of course, it can also be reversed. Therefore, 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.
[0026] If the combinatorial optimization problem to be solved has corresponding constraints, in the present invention, the corresponding constraints are described using expressions 1-2. It should be noted that some problems may also have no constraints.
[0027] 1-2 G(x) is the constraint condition that needs to be satisfied by the combinatorial optimization problem, D is a finite discrete decision space, which includes all decision variable combinations that satisfy the constraint condition. Indicates the meaning of arbitrary selection. In the optimal global solution x, the bit value corresponding to the decision variable that satisfies all the constraints G(x) and makes the objective function F(x) meet specific conditions (such as maximum, minimum, etc.) is 1, and the other bit values are 0. The purpose of the present invention is to determine the optimal global solution x.
[0028] See also Figure 1 , Figure 1 is a flow chart of a distributed quantum computing method for combinatorial optimization according to an embodiment of the present invention, the method comprising: Step S101, modeling the combinatorial optimization problem to be solved, and randomly generating an initial global solution, and setting the initial global solution as the latest global solution.
[0029] Step S102: constructing a corresponding Hamiltonian based on the problem function of the combinatorial optimization problem to be solved.
[0030] Step S103: construct a first subset based on the latest global solution.
[0031] Step S104: construct a quantum circuit with adjustable parameters corresponding to the first subset.
[0032] Step S105: optimizing the first subset through the quantum circuit to obtain a new global solution.
[0033] Step S106, calculating the expected value of the Hamiltonian corresponding to the new global solution.
[0034] Step S107, determining whether the first preset requirement for stopping the optimization is met; if so, executing step S108; if not, executing step S110.
[0035] Step S108, sorting the Hamiltonian expectation values obtained each time the latest global solution is obtained.
[0036] Step S109, determining the global solution corresponding to the minimum Hamiltonian expected value as the optimal solution to the combinatorial optimization problem to be solved, and ending the processing flow.
[0037] Step S110, setting the current new global solution as the latest global solution, and returning to step S103.
[0038] 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 certain combination of decision variables.
[0039] In step S102, the constructed Hamiltonian is adapted to the objective function and constraint conditions of the specific combinatorial optimization problem to be solved.
[0040] In step S103, when constructing the first subset, refer to Figure 2 , Figure 2 This is a flow chart of a method for constructing a first subset according to an implementation of the present invention. Specifically, it includes the following steps: Step S201, determine the corresponding global solution x i For example, the global solution is x i = (y0,y1,y k ,…,y n-1 ). Where i represents the number of the global solution, k represents the bit number, and corresponds to the corresponding decision variable, y krepresents the kth bit value, corresponding to the decision variable value, 1 indicates that the corresponding decision variable is selected, and 0 indicates that the decision variable is not selected. i is the initial global solution or the global solution updated through iterative optimization.
[0041] Step S202, calculating the global solution x i The Hamiltonian expectation value C_Hamil.
[0042] Step S203, set k=0.
[0043] Step S204, obtaining the kth bit value.
[0044] Step S205, change the kth bit value to obtain a new global solution x i_k For example, if the original bit value is 1, it is changed to 0, and if it is 0, it is changed to 1.
[0045] Step S206, calculate a new global solution x i_k The corresponding Hamiltonian expected value C_Hamil_k.
[0046] Step S207 , calculating the difference ΔC_Hamil_k between the expected values of the Hamiltonian corresponding to the two global solutions before and after the k-th bit value is changed.
[0047] Among them, △C_Hamil_k=|C_Hamil_k-C_Hamil|.
[0048] Step S208, determine whether k is less than n-1. If k is not less than n-1 but equal to n-1, execute step S209, if k is less than n-1, set k=k+1 in step S212 and return to step S204.
[0049] Step S209: sort all the Hamiltonian expected value differences ΔC_Hamil_k in descending order.
[0050] Step S210 , determining the difference ΔC_Hamil_k of the preset number of Hamiltonian expected values in the front order, and obtaining the corresponding bit sequence number.
[0051] Step S211, from the global solution x i The corresponding bit values are extracted to construct a first subset.
[0052] In step S201, the corresponding global solution x is determined according to the subset to be constructed. i For example, when constructing the first subset in step S103, the global solution x is applied. iis the initial global solution. When it is determined in step S107 that the first preset requirement for optimization stop is not met, the global solution x is applied when the first subset is constructed again. i It is the latest global solution obtained based on the previous first subset optimization.
[0053] pass Figure 2 The process shown determines several decision variables with the greatest impact from the current global solution to construct a first subset, so that the decision variables with the greatest impact on the global solution can be optimized first, thereby improving the optimization efficiency.
[0054] In this embodiment, the number of bits in the first subset may be determined by the number of quantum bits supported by the optimized quantum computing device. For example, based on the user's existing quantum resources, the maximum number of quantum bits supported is determined as the number of bits in the first subset.
[0055] In one embodiment, the first preset requirement for stopping the optimization described in step S107 is that the number of times the quantum optimization is performed based on the first subset to obtain the latest global solution reaches the preset number of optimizations. The specific number of times can be determined according to the total number of decision variables in the combinatorial optimization problem to be solved. The more the total number of decision variables, the greater the number of optimizations, and the fewer the total number of decision variables, the smaller the number of optimizations. The appropriate number of times can be determined by effective experiments. Alternatively, it is determined that the first preset requirement for stopping the optimization is met when the expected value of the Hamiltonian corresponding to the global solution converges to the minimum value.
[0056] In step S104, the quantum computing device corresponding to the first subset is provided with at least a first preset number of quantum bits, that is, the number of bits in the first subset. The quantum circuit with adjustable parameters is, for example, a quantum circuit implementing a quantum approximate optimization algorithm (QAOA), a quantum circuit implementing a variational quantum eigenvalue solution algorithm (VQE), or a quantum circuit implementing a quantum neural network (QNN). Those skilled in the art can construct any quantum circuit according to usage habits, which will not be described in detail here.
[0057] For step S105, see Figure 3 , Figure 3 is a flow chart of a method for performing quantum optimization based on a first subset to obtain a latest global solution according to an embodiment of the present invention, comprising the following steps: Step S301: quantum optimization is performed on the first subset using a quantum circuit with adjustable parameters to obtain a first local optimal solution.
[0058] Step S302: Using the first local optimal solution to replace the corresponding bit value in the current global solution to obtain a first global solution, and calculating the expected value of the Hamiltonian corresponding to the first global solution.
[0059] Step S303: extract a second preset number of bit values from the first global solution to construct a second subset.
[0060] Step S304: quantum optimization is performed on the second subset using a quantum circuit with adjustable parameters to obtain a second local optimal solution.
[0061] Step S305: Use the second local optimal solution to replace the corresponding bit value in the first global solution to obtain the current latest first global solution, and calculate the expected value of the Hamiltonian corresponding to the latest first global solution.
[0062] Step S306, determining whether a second preset requirement for stopping optimization is met, if so, executing step S307, if not, executing step S309.
[0063] Step S307, sorting the Hamiltonian expectation values corresponding to each first global solution.
[0064] Step S308: determining the first global solution corresponding to the minimum Hamiltonian expectation value as the latest global solution obtained by performing quantum optimization on the first subset.
[0065] Step S309: take the current latest first global solution as the first global solution, and return to step S303.
[0066] In the aforementioned process, the second preset number can be a fixed value, that is, the number of bits for each construction of the second subset is fixed and equal. The second preset number can also be a variable value, that is, the number of bits for each construction of the second subset is not equal. In one embodiment, the second preset number is determined based on a decay function, that is, the number of bits for each construction of the second subset is successively reduced. In a more specific embodiment, the decay function is a linear function, the function value of the linear function is the second preset number applied in the current construction of the second subset, the independent variable of the linear function is the second preset number applied when the second subset was constructed last time, the linear coefficient is a value less than 1, and the initial value of the independent variable is the first preset number, that is, the number of bits in the first subset. For example, when determining the specific value of the second preset number each time, it is calculated according to the following formula: n_sub=n_sub•decay_rate. Among them, n_sub on the left side of the equal sign is the value of the second preset number to be determined this time, and n_sub on the right side of the equal sign is the value of the second preset number applied when the second subset was constructed 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 number, and n_sub on the right side of the equal sign is the value of the first preset number. Since decay_rate on the right side of the equal sign is a decimal less than 1, the value of the second preset number obtained each time will be less than or equal to the value of the second preset number applied last time.
[0067] Of course, the linear function can also be the function shown in the following expression 2-1: f(n)=ab•n 2-1 Where a is the initial value, b is the decay rate, and n is the number of iterations. Through this function, the number of bits in the second subset decreases by a fixed ratio or amount in each iteration.
[0068] The aforementioned linear attenuation function is simple in form and easy to implement.
[0069] It should be noted that the decay function can also be represented by other function instances, such as the exponential decay function shown in Expression 2-2: f(n)=a • b n 2-2 Wherein, a is the initial value, b is a positive number less than 1, indicating that the number of bits in the second subset decreases exponentially after each iteration, and n is the number of iterations. The exponential decay function simulates a process of rapid decrease and then gradually stabilization.
[0070] Another example is the logarithmic decay function shown in Expression 2-3: f(n)=a • log(b • n) 2-3 Where a and b are constants, and n is the number of iterations. As the number of iterations increases, the rate at which the number of bits in the second subset decreases gradually slows down.
[0071] For example, the reciprocal attenuation function (f(n)=a / n), the polynomial attenuation function, and the custom attenuation function, etc., ordinary technicians in this field can choose any attenuation function to determine the number of decision variable values in the second subset according to the scale of the combined optimization problem, application habits, etc.
[0072] In this embodiment, the second preset requirement is that the second preset number is not greater than a preset number threshold, and the preset number 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, the process ends.
[0073] When optimizing the global solution based on the second subset, this embodiment optimizes the global solution in order from a large range to a small range, thereby improving optimization efficiency.
[0074] The method for constructing the second subset in the aforementioned process is the same as the method for constructing the first subset, and will not be repeated here.
[0075] In step S301 and step 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: The parameter value in the quantum circuit is set, and the quantum computing device executes the quantum circuit with the parameter and measures it, and calculates the expected value of the Hamiltonian based on the measurement result. Then the parameter value is adjusted, and the quantum circuit with the parameter is executed and measured again, and the expected value of the Hamiltonian is calculated based on the measurement result. Wherein, when adjusting the parameter value, the parameter value is adjusted in a manner that reduces the expected value of the Hamiltonian until the expected value of the Hamiltonian converges, that is, the expected value of the Hamiltonian no longer decreases. The quantum state when the expected value of the Hamiltonian converges is measured, and the quantum state with the highest probability in the measurement result is determined as the local optimal solution.
[0076] See also Figure 4 , Figure 4 It is a quantum circuit diagram acting on 5 quantum bits according to an embodiment of the present invention. In the order of evolution, the quantum circuit includes an initialization module 141, a problem Hamiltonian module 142 and a measurement module 143, wherein the problem Hamiltonian module 142 includes multiple layers of identical quantum circuit units 1420, which include multiple RZ quantum gates and RX quantum gates, each quantum gate is a parameterized quantum gate. In the process of parameter adjustment, the parameter values in each quantum gate are changed so that the expected value of the Hamiltonian obtained based on the measured quantum state gradually decreases until convergence. When the calculated expected value of the Hamiltonian no longer decreases, it is considered that the expected value of the Hamiltonian has converged and the parameter adjustment is completed.
[0077] See also Figure 5 , Figure 5 It is a quantum circuit diagram acting on 4 quantum bits according to another embodiment of the present invention. Figure 5 The quantum circuit diagram in the embodiment includes an initialization module 141, a problem Hamiltonian module 142 and a measurement module 143 in sequence, wherein the problem Hamiltonian module 142 includes multiple layers of identical quantum circuit units 1420, wherein the RZ quantum gate and the RX quantum gate are parameterized quantum gates.
[0078] Figure 4 and Figure 5 The quantum circuit structure shown in is only an example, and a person skilled in the art can design or apply any existing quantum circuit.
[0079] On the other hand, the present invention also provides a distributed quantum computing device for solving combinatorial optimization problems, see Figure 6 It is a principle block diagram of a distributed quantum computing device for combinatorial optimization according to an embodiment of the present invention. The distributed quantum computing device for combinatorial optimization (referred to as 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 and an optimization module 15, a verification module 16, an optimal solution determination module 17 and an iterative optimization module 18.
[0080] 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, 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.
[0081] The initial global solution generation module 12 is configured to randomly select a value from the value range of each bit in the global solution space to generate an initial global solution.
[0082] 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.
[0083] The quantum circuit module 14 is configured to construct a quantum circuit with adjustable parameters corresponding to the first subset.
[0084] The optimization module 15 is configured to optimize the first subset through the quantum circuit to obtain an updated global solution and calculate the expected value of the Hamiltonian corresponding to the updated global solution.
[0085] The checking module 16 is configured to check whether the updated global solution satisfies a first preset requirement for stopping the optimization.
[0086] The optimal solution determination module 17 is configured to determine the global solution corresponding to the minimum Hamiltonian expected value as the optimal solution to the combinatorial optimization problem in response to the updated global solution satisfying the first preset requirement for stopping the optimization.
[0087] The iterative optimization module 18 is configured to extract a first preset number of bit values from the updated global solution to construct a new first subset in response to the updated global solution not satisfying the first preset requirement for stopping the optimization, 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 satisfies the first preset requirement for stopping the optimization.
[0088] See also Figure 7 , Figure 71 is a principle 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 circuit with adjustable parameters corresponding to each first subset constructed by the distributed quantum computing device 10 is sent to the quantum computing device 20 in a serial manner. The quantum computing device 20 sequentially runs the received quantum circuit 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. Please refer to the description of the aforementioned method flow for details. It will not be repeated here.
[0089] in, Figure 7 The distributed quantum computing device 10 in the figure can be implemented by a classical computing device, and the quantum computing device 20 can be a quantum simulator implemented by a classical computing device, or a real quantum machine.
[0090] The present invention is applicable to any combinatorial optimization problem that can construct the problem function as a Hamiltonian, and is also applicable to any quantum circuit corresponding to a quantum variational algorithm that converges by reducing the loss function. It has a wide range of applications, multiple usage scenarios, and flexible selection of quantum circuits.
[0091] Since the present invention solves the combinatorial optimization problem by subset optimization iteration, compared with the quantum computing method of global coded combinatorial optimization, the quantum circuit used in a single iteration of the present invention requires fewer quantum bits and a shallower quantum circuit depth, thereby significantly reducing computing resources, especially for solving large-scale combinatorial optimization problems, the effect is more significant.
[0092] In addition, since the present invention requires fewer quantum resources, it is easier to implement in physical experiments, and it also effectively simplifies the execution complexity implemented in a real quantum computer and improves the calculation accuracy.
[0093] Application Example 1 In the scenario of monitoring the energy efficiency and interference of sensors, it is necessary to optimize the combination of existing sensors, so as to select the group with the lowest energy consumption and avoid interference between sensors while opening the most sensors to increase the monitoring coverage. For this combination optimization problem, an undirected graph can usually be used to describe the specific scenario, such as Figure 8 As shown, Figure 8It is a schematic diagram of an undirected graph constructed based on a sensor network according to the first application embodiment of the present invention. Among them, there are 40 sensors in this embodiment, each node in the figure represents a sensor, the number in the node is the weight value, which represents the energy consumption of the sensor, and the connection between the nodes indicates that there is interference or repeated monitoring between the two sensors. Each node is configured with a corresponding serial number and arranged in sequence. In order to maintain a clear diagram structure, only the first node v1 and the sixth node v6 are identified 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, the purpose of this application embodiment is to select the nodes with the largest number, the smallest weighted sum and which are not connected to each other from the graph, that is, the nodes indicated by the arrows in the graph.
[0094] For simplicity, the node set in the undirected graph is denoted as v, and the jth node in it is denoted as v j , the weight of the node is represented by w j The undirected graph corresponds to the interference of the sensor using the adjacency matrix Indicates that each element in the matrix represents the interference between two nodes. In one embodiment, when there is interference between the two nodes, the element value is 1, and when there is no interference between the two nodes, the element value is 0. The objective function and constraint conditions of this application embodiment can be modeled as follows:
[0095] The first and second lines are the objective function, and the third and following lines are the constraints. Represents any node v j . Represents the value of the adjacency matrix element. According to the above conditions, the maximum number of nodes can be obtained from the undirected graph, and the weighted sum of these nodes is the smallest. Moreover, there should be no interference between these nodes, that is, there should be no connection between these nodes.
[0096] The Hamiltonian obtained according to the objective function and constraints is as follows:
[0097] Where Hp represents the total Hamiltonian, Ho represents the target Hamiltonian; H C represents the constrained Hamiltonian; is the Pauli Z operator acting on the j-th quantum bit, w j is the node weight corresponding to the jth quantum bit, and the quantum bits correspond to the nodes one by one. When the number of nodes is the largest and the sum of the node weights is the smallest, the target Hamiltonian H O The value of is the smallest. and Act on the kth and the l Pauli Z operator on qubits; w k and w l are the kth quantum bit and the l The node weight corresponding to the quantum bit is is the node corresponding to the kth quantum bit and the l The interference value between the nodes corresponding to the quantum bits, when there is interference between the two nodes ; When there is no interference between the two nodes The constraint Hamiltonian H is assuming that the selected nodes are not connected to each other. C The value of is the smallest, and ρ represents the importance of the interference condition relative to the objective function.
[0098] When solving the combinatorial optimization problem of the first application example based on the method provided by the present invention, the global solution includes 40 bits, each bit corresponding to an undirected graph node, that is, a sensor, corresponding to the decision variable in the aforementioned method description. The value of the bit is 0 or 1, 1 represents the selection of the node, and 0 represents the non-selection of the node. If the traditional quantum computing method is used, 40 quantum bits are required, but by applying the method provided by the present invention, only a small number of quantum bits are needed to 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 , construct a first subset of 5 bits in a randomly generated initial global solution, and the corresponding 5 nodes are the 5 nodes with the greatest impact on the Hamiltonian, then obtain a local optimization solution through the optimization of a quantum circuit with a depth of 4, and use the value in the local optimization solution to replace the value of the corresponding bit in the initial global solution to obtain a new global solution, and calculate the corresponding Hamiltonian expectation value. At this time, one iteration is completed. Then, in the new global solution, the 5 nodes with the greatest impact on the Hamiltonian are determined to form a new first subset, and then optimized, and the cycle is repeated 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 Hamiltonian expectation value obtained in each iteration process, and the global solution is the optimal solution to this combinatorial optimization problem.
[0099] Among them, the quantum circuit constructed based on the first subset (such as Figure 4) acts on 5 quantum bits, and the quantum circuit includes an initialization module 141, a problem Hamiltonian module 142 and a measurement module 142 in the order of evolution. Among them, the initialization module 141 includes a Hadamard gate, and a mixed superposition state is obtained by executing the Hadamard gate on the quantum bit in the zero state. In this embodiment, the problem Hamiltonian module 142 includes 4 quantum circuit units 1420 connected in sequence, that is, the depth of the quantum circuit is 4. Each quantum circuit unit 1420 includes a quantum gate with parameters. When the quantum circuit is run in the quantum computing device, after the evolution of the initialization module 141 and the problem Hamiltonian module 142 in turn, the measurement module 143 measures all quantum bits. Then, the expected value of the Hamiltonian is calculated based on the quantum state obtained after the measurement, and the descending gradient of the expected value of the Hamiltonian is calculated. If the descending gradient is 0, it means that the expected value of the Hamiltonian of the current quantum system converges, then the parameter adjustment is completed, and all current quantum bits are measured, and the quantum state with the highest probability in the measurement result is taken as the local optimization solution. If the descending gradient is not 0, it means that the current Hamiltonian expectation value has not converged, and the parameters are adjusted until the descending 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 repeated here.
[0100] Corresponding to this embodiment, after each iteration, after the global solution is determined by the expected value of the Hamiltonian, 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, 154.72807654280592.
[0101] The smallest weighted sum is 154.72807654280592, and the bits with bit values of 1 in the corresponding global solution are 6, 9, 11, 13, 14, 17, 20, 21, 22, 26, 27, 33, 34, and 35, which correspond to Figure 8 Nodes marked by arrows.
[0102] Application Example 2 The combinatorial optimization problem in this embodiment is the Max-Cut problem used in logistics and transportation to improve efficiency. For example, a batch of goods needs to be divided into two groups for transportation. Some goods will generate additional benefits when they are divided into two groups for transportation. In order to determine how to group the batch of goods to maximize the benefits, an undirected graph V is first constructed based on the benefit relationship between the goods. Each good is taken as a node. If there is additional benefit between the goods, an edge e is added between the corresponding nodes. The generated benefits are determined by the edge weight w. e The node set is represented by V, and the edge set is represented by E. For the combinatorial optimization problem of this embodiment, the objective function is constructed as shown in the following expression 3-1: 3-1 Where u and v represent any two nodes in the undirected graph that form a line, that is, the line between node u and node v belongs to the set E. u and x v They are the grouping of nodes u and v in the undirected graph. Taking node u as an example, when x u =1 means node u is in the first set S, x u =0 means that vertex u is in the second set T (T=VS).
[0103] 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 If both are 0 or 1, 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, so the function value is 1.
[0104] The Hamiltonian of the problem mapped according to the objective function is shown in the following expression 3-2: 3-2 Each node corresponds to a quantum bit, the serial number is the same as the node symbol, and σ is the Pauli Z operator acting on the subscript quantum bit.
[0105] Taking the grouping of 20 pieces of goods as an example, when solving the problem according to the method provided by the present invention, in the initial global solution, the nodes corresponding to the 20 pieces of goods are randomly divided into the first set S and the second set T, and the corresponding Hamiltonian expected value can be obtained according to the Hamiltonian of the problem mapped to the global solution. When constructing the first subset, the 5 nodes with the greatest influence on the Hamiltonian expected value are determined from the initial global solution to form the first subset, and then through optimization, the grouping of these 5 nodes is re-divided to obtain a new global solution, and then the 5 nodes are re-determined to form the first subset, and then optimized. In this embodiment, after 6 iterations, the weight sums (called cutting values) calculated based on the global solution obtained in each iteration are respectively: 25, 30, 31, 33, 33, 33 in the order of iteration.
[0106] Among them, the maximum total weight is 33. The grouping obtained for the optimal solution is as follows: Each number in the following grouping is a node number, which corresponds to the goods one by one.
[0107] The first set S: [1, 8, 9, 12, 14, 15, 16, 18], The second set T: [0, 2, 3, 4, 5, 6, 7, 10, 11, 13, 17, 19].
[0108] The grouping corresponding to the optimal solution is as follows Fig. 9 shown. Fig. 9 1 is a schematic diagram of an undirected graph corresponding to the grouping of the transported goods according to the second application example of the present invention. Each node in the graph corresponds to a piece of goods, and the number in the node is a sequence number. The left nodes constitute a first set S, and the right nodes constitute a second set T.
[0109] In addition, in the optimization process of the first subset consisting of 5 nodes, after the optimization of the first subset consisting of 5 nodes is completed, 4 nodes can be selected from the new global solution to form a second subset, and then the second subset is optimized, and the global solution obtained after the optimization of 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.
[0110] Application Example 3 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 of inter-city logistics distribution. Specifically, it is necessary to establish multiple logistics nodes in each of the two cities. When goods need to be transported between the two logistics nodes, there is a passage between the two logistics nodes and a certain transportation cost is incurred. The problem to be solved is to allocate the logistics nodes in the two cities with the lowest transportation cost on average.
[0111] 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. i Corresponding to a logistics node, all v i Nodes constitute a node set. Node v i and node v j The connection between i,j Corresponding to the logistics demand between two logistics nodes, all the links e i,j Constitute the edge set edges.
[0112] A logistics node needs to be established between two cities. For fairness, the total number of logistics nodes in each city needs to be as even as possible. If there is a passage between two logistics nodes, there is an edge connecting them.
[0113] Combining the objective function and constraints of this embodiment results in the cost optimization function shown in the following expression 4-1: 4-1 Where Z i and Z j Represents a node v in an undirected graph V i and v j The partitioning of nodes v i For example, when Z i =1 indicates node v i In the first set S, Z i =0 means node v i In the second set T(VS), penalty is the penalty coefficient. The first term is the objective function, the purpose is to cut the least edges, and the second term is the constraint condition, the purpose is to make the number of nodes in the two groups average.
[0114] The Hamiltonian of the problem obtained based on the above function mapping is shown in the following expression 4-2: 4-2 Taking 20 logistics nodes as an example, the problem is solved according to the method provided by the present invention. The number of times quantum optimization is performed based on the first subset to obtain the latest global solution is set to 6 times, and the number of nodes in the first subset (i.e., decision variables) 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 of the first iteration is 5, and the number of nodes in the second subset of 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 performed according to this process are 30, 20, 19, 17, 16, and 15 in the order of iteration. Therefore, the optimal cutting value is 15, and the corresponding grouping of the optimal solution of the combined optimization is as follows: Each number in the following grouping is the node number of the undirected graph, corresponding to the logistics node one by one.
[0115] The first set S: [0, 4, 6, 13, 14, 15, 16, 17, 18], The first set T: [1, 2, 3, 5, 7, 8, 9, 10, 11, 12, 19].
[0116] On the other hand, an embodiment of the present invention further provides an electronic device, see Fig.10 , Fig.10 is a block diagram of the structure principle of an electronic device according to an embodiment of the present invention. Fig.10 As shown, the electronic device includes a processor and a memory, wherein the memory stores computer instructions, and when the processor runs the computer instructions, the distributed quantum computing for combinatorial optimization provided by the present invention is performed. Specifically, Figure 6 or Figure 7 A distributed quantum computing processing device 10 is provided in FIG.
[0117] 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 may be configured to implement one or more integrated circuits of an embodiment 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 disk, a magneto-optical disk, a tape, a universal serial bus (USB) drive, or other physical / tangible memory storage device. For another example, the memory 602 includes a removable or non-removable (or fixed) medium. For another example, 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, typically the memory 602 includes a tangible (non-transitory) computer-readable storage medium (such as a memory device) encoded with executable instructions, wherein when the stored executable instructions are executed by the processor 601 (such as executed by one or more processors), the distributed quantum computing for combinatorial optimization in the embodiments of the present invention can be implemented.
[0118] In one example, Fig.10 The electronic device shown may also include a communication interface 603 and a bus 610. The processor 601, the memory 602, and the communication interface 603 are connected and communicate with each other via the bus 610. The communication interface 603 is mainly used to implement communication between modules, devices, units, and / or devices in the electronic device.
[0119] The bus 610 includes hardware, software or both, and can couple the components of the online data traffic billing device to each other. For example, the bus may include at least one of the following: an accelerated graphics port (AGP) or other graphics bus, an enhanced industrial standard architecture (EISA) bus, a front-side bus (FSB), a hypertransport (HT) interconnect, an industrial 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 standard association local (VLB) bus or other suitable bus. The bus 610 may include one or more buses. Although the embodiments of the present invention describe or show a specific bus, the embodiments of the present invention may consider any suitable bus or interconnection method.
[0120] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the aforementioned distributed quantum computing method for combinatorial optimization is implemented. The computer-readable storage medium is, for example, a classical computer-readable storage medium, such as a read-only memory (ROM), a random access memory (RAM), a disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device, or 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 a quantum version of RAM in a classical computer. Through QRAM, quantum superposition states containing information can be created. Compared with RAM, which needs to be read one by one, superimposed data can be read with superimposed addresses. QRAM can be implemented in physical ways such as optics, semiconductor quantum dots, superconducting circuits, and ion traps.
[0121] The flowchart and / or block diagram of the method and system of the embodiment of the present invention are described above by way of example, and various aspects of the related aspects are described. It should be understood that each box or 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 can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc.; when implemented in software, it is a program or code segment used to perform the required task. The program or code segment can be stored in a memory, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0122] The above embodiments are only used to illustrate the present invention, but not to limit the present invention. Ordinary technicians 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 present invention.
Claims
1. A distributed quantum computing method for combinatorial optimization, characterized in that: include: Step 1: Modeling the combinatorial optimization problem to be solved to obtain a problem function and a global solution space, wherein the global solution space includes a plurality of bits corresponding to different decision variables of the combinatorial optimization problem to be solved, and the value range of each bit in the global solution space corresponds to the value range of the corresponding decision variable; Step 2: constructing a corresponding Hamiltonian based on the problem function of the combinatorial optimization problem to be solved; Step 3: Randomly select a value from the value range of each bit in the global solution space to generate an initial global solution; Step 4: extracting a first preset number of bit values 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: Optimizing the first subset through the quantum circuit to obtain an updated global solution and calculating the expected 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 the optimization; in response to the updated global solution meeting the first preset requirement for stopping the optimization, execute step 8; in response to the updated global solution not meeting the first preset requirement for stopping the optimization, execute step 9; Step 8: Determine the global solution corresponding to the minimum Hamiltonian expected value as the optimal solution to the combinatorial optimization problem to be solved and end; Step 9: Extract a first preset number of bit values from the updated global solution to construct a new first subset, and return to step 6.
2. The distributed quantum computing method for combinatorial optimization according to claim 1, characterized in that: Step 7: Check whether the updated global solution meets the first preset requirement for stopping the optimization, including: Count the number of iterations of optimizing the first subset to obtain an updated global solution; When the number of iterations reaches a preset number threshold, determining that a first preset requirement for stopping the optimization is met; Alternatively, check whether the expected value of the Hamiltonian corresponding to the updated global solution converges to the minimum value; When the expected value of the Hamiltonian corresponding to the updated global solution converges to the minimum value, it is determined that the first preset requirement for stopping the optimization is met.
3. The distributed quantum computing method for combinatorial optimization according to claim 1, characterized in that: Step 6: Optimizing the first subset through the quantum circuit to obtain an updated global solution and calculating the expected value of the Hamiltonian corresponding to the updated global solution, including: Step 61, using a quantum circuit with adjustable parameters to perform quantum optimization on the first subset to obtain a first local optimal solution; Step 62, using the first local optimal solution to replace the corresponding bit value in the current global solution to obtain a first global solution, and calculating the expected value of the Hamiltonian corresponding to the first global solution, wherein the current global solution is the initial global solution or the global solution updated by the last iteration; Step 63, extracting a second preset number of bit values from the first global solution to construct a second subset; Step 64, optimizing the second subset through a quantum circuit with adjustable parameters to obtain a second local optimal solution; Step 65, using the second local optimal solution to replace the corresponding bit value in the first global solution to obtain an updated first global solution and calculating the expected value of the Hamiltonian corresponding to the updated first global solution; Step 66, checking whether the updated first global solution meets the second preset requirement for stopping the optimization; in response to the updated first global solution meeting the second preset requirement for stopping the optimization, executing step 67; in response to the updated first global solution not meeting the second preset requirement for stopping the optimization, executing step 68; Step 67: Determine the first global solution corresponding to the minimum Hamiltonian expected 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: extracting a second preset number of bit values from the updated first global solution to construct a new second subset, further comprising: determining the second preset number based on a decay function.
5. The distributed quantum computing method for combinatorial optimization according to claim 4, characterized in that: The attenuation function is a linear function, the function value of the linear function is the second preset number applied in the current construction of the second subset, the independent variable of the linear function is the second preset number applied when the second subset was last constructed, 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 the optimization, including: judging 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 the optimization is met.
7. The distributed quantum computing method for combinatorial optimization according to claim 3, characterized in that: Step 61: Using a quantum circuit with adjustable parameters to perform quantum optimization on the first subset to obtain a first local optimal solution, including: Adjusting parameter values in the quantum circuit so that the expected value of the Hamiltonian obtained by running the quantum circuit decreases until convergence; The quantum state when the expected value of the Hamiltonian converges is measured, and the quantum state with the highest probability in the measurement results is determined as the first local optimal solution.
8. The distributed quantum computing method for combinatorial optimization according to claim 1, characterized in that: Step 4: extracting a first preset number of bit values 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 expected value 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 expected values of the Hamiltonian; Determine the first preset number of corresponding bits according to the order of the difference of the expected value of the Hamiltonian from large to small; The bit values of the corresponding bits are extracted from the initial global solution to obtain a first subset.
9. A distributed quantum computing device for combinatorial optimization, characterized in that: include: A modeling module is configured to model the combinatorial optimization problem to be solved to obtain a problem function and a global solution space, wherein 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, and a corresponding Hamiltonian is constructed based on the problem function of the combinatorial optimization problem to be solved; An initial global solution generation module, configured to randomly select a value from a value range 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 an 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 an expected value of the Hamiltonian corresponding to the updated global solution; A testing module configured to test whether the updated global solution satisfies a first preset requirement for stopping the optimization; an optimal solution determination module, configured to determine the global solution corresponding to the minimum Hamiltonian expected value as the optimal solution to the combinatorial optimization problem in response to the updated global solution satisfying the first preset requirement for optimization stop; The iterative optimization module is configured to extract a first preset number of bit values from the updated global solution to construct a new first subset in response to the updated global solution not satisfying the first preset requirement for stopping the optimization, and repeatedly execute the optimization module, the inspection module, the optimal solution determination module and the iterative optimization module until the updated global solution satisfies the first preset requirement for stopping the optimization.
10. 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, the distributed quantum computing method for combinatorial optimization as described in any one of claims 1 to 8 is executed.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the distributed quantum computing method for combinatorial optimization according to any one of claims 1 to 8 is executed.
Citation Information
Patent Citations
Method and equipment for determining state of target object through quantum circuit
CN115423107A
Quantum calculation method and device, electronic equipment and storage medium
CN116306951A
Power network topology optimization method based on quantum computing
CN116842669A
Path optimization method and device, electronic equipment and storage medium
CN116933954A
Quantum computing method, device and equipment for unit commitment optimization and medium
CN118966371A
Cited By
Coding method and device for quantum optimization solution, program and storage medium
CN121457653A