Quantum computing method, device, equipment and medium for unit combination optimization

Through quantum computing methods, the UC problem is converted into Hamiltonian quantum system, and the quantum line parameters are adjusted to obtain the optimal solution for unit combination optimization, which solves the problem of too long calculation time and insufficient real-time performance of the UC problem, and achieves rapid and effective power system optimization.

CN118966371BActive Publication Date: 2024-12-27GUOKAIKE QUANTUM TECH (ANHUI) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411450914.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2024-12-27
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

Unit combination optimization problem (UC problem) is calculated in large-scale power systems for too long, making it difficult to meet real-time requirements, and existing algorithms have problems such as combination explosion, complex constraints and insufficient real-time.

Method used

Using quantum computing method, by converting the objective function and constraints of the UC problem into Hamiltonian of the quantum system, a quantum circuit containing tunable parameters is constructed, the parameters are adjusted to make the expected Hamiltonian value converge, and quantum states are measured to obtain the optimal solution. .

Benefits of technology

It realizes rapid solution to UC problems, meets the real-time requirements of large-scale power systems, and reduces the time required to search solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118966371B_ABST
    Figure CN118966371B_ABST
Patent Text Reader

Abstract

The present invention relates to a quantum computing method, device, equipment and medium for unit combination optimization, and belongs to the field of quantum computing. The method comprises: determining the objective function, power balance constraint and spinning standby constraint of the UC problem based on the data of the generator set; converting the two constraints into the first penalty term and the second penalty term of the objective function respectively to form an unconstrained objective function; mapping the unconstrained objective function to a Hamiltonian; constructing a quantum system and a quantum circuit containing adjustable parameters; adjusting the parameter value in the quantum circuit so that the expected value of the Hamiltonian of the quantum system is reduced until convergence; measuring the quantum state of the quantum system when the expected value of the Hamiltonian converges, and taking the quantum state with the highest probability in the measurement result as the optimal solution to the UC problem; determining the generator corresponding to the quantum bit in the optimal solution to the UC problem. The embodiment of the present invention realizes the rapid solution to the UC problem and meets the real-time requirements of large-scale power systems.
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 quantum computing method, device, equipment and medium for unit combination optimization. Background Art

[0002] The unit commitment problem (UC) is one of the important problems in power system planning and operation. It aims to meet the user's demand for electricity by minimizing the power generation cost through reasonable dispatching of the generator sets in the power system. By solving the UC problem, the most suitable combination of generators that can be started at the same time is obtained, so as to determine the start-up and shutdown schedule of the generator sets, thereby minimizing the total production cost and meeting a large number of operating restrictions. In order to solve the unit commitment optimization problem, the usual solution is to use professional mathematical optimization tools such as CPLEX, Gurobi, SCIP, etc., and use the algorithms provided by the mathematical optimization tools to solve it. The solution process specifically includes collecting unit data, establishing or optimizing mathematical models based on applied algorithms, introducing integer variables, establishing mixed integer programming (Mixed-Integer Programming, MIP) problems, solving MIP problems, and analyzing results. The algorithms include, for example, 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 UC 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 UC problem, when the scale of the power system 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 the 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. Combination explosion problem: The unit combination optimization problem involves selecting the best combination from multiple backup units to meet the needs of the power system. As the number of backup units increases, this will cause the search space to grow exponentially, making the problem very difficult to solve.

[0004] 2. Complex constraints: Unit combination optimization problems usually contain multiple constraints, such as the maximum power limit of the unit, startup time limit, operating costs, etc. 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, unit commitment optimization problems usually need to be solved in a short time to cope with real-time changes in the power system. Therefore, the solution algorithm needs to be efficient and real-time, but existing algorithms are difficult to meet real-time requirements. Summary of the invention

[0006] In view of the technical problems existing in the prior art, the present invention proposes a quantum computing method, device, equipment and medium for unit combination optimization, so as to achieve a rapid solution to the UC problem and meet the real-time requirements of large-scale power systems.

[0007] According to one aspect of the present invention, the present invention provides a quantum computing method for unit commitment optimization, comprising:

[0008] Based on the generator set data, determine the objective function, power balance constraint and spinning reserve constraint of the UC problem, wherein the objective function is used to calculate the sum of the operating costs of all generators in the generator set, the power balance constraint includes that the power generation power of the generator set is equal to the load power of the generator set, and the spinning reserve constraint includes that the maximum power generation power of the generator set is greater than the sum of the load power of the generator set and the standby power of the generator set;

[0009] Converting the power balance constraint and the spinning reserve constraint into a first penalty term and a second penalty term of the objective function respectively, and adding the first penalty term and the second penalty term to the objective function to form an unconstrained objective function;

[0010] Mapping the unconstrained objective function into a Hamiltonian of a quantum system;

[0011] Constructing a quantum system corresponding to the generator set, wherein the generators in the generator set correspond to the quantum bits in the quantum system;

[0012] constructing a quantum circuit including adjustable parameters based on the quantum system;

[0013] Adjust the parameter values ​​in the quantum circuit to reduce the expected value of the Hamiltonian of the quantum system until the expected value of the Hamiltonian converges;

[0014] Measure the quantum state of the quantum system when the expected value of the Hamiltonian converges, and take the quantum state with the highest probability in the measurement result as the optimal solution to the UC problem;

[0015] Based on the correspondence between quantum bits and generators, determine the generator corresponding to the quantum bits in the optimal solution to the UC problem;

[0016] Among them, the first penalty term includes a smooth monotonically increasing function with a first difference obtained by subtracting the load power of the generator set from the power generation power of the generator set as the independent variable and a function value greater than or equal to zero, and the second penalty term includes a smooth monotonically increasing function with a second difference obtained by subtracting the load power of the generator set, the standby power of the generator set and the slack variable from the maximum power generation power of the generator set as the independent variable and a function value greater than or equal to zero.

[0017] Preferably, the smooth monotonically increasing function is a power function.

[0018] Preferably, the exponent of the power function is an even number greater than or equal to 2.

[0019] Preferably, the first penalty term and the second penalty term include respective weight coefficients.

[0020] Preferably, the quantum circuit with adjustable parameters comprises multiple layers of quantum circuit units connected end to end, and the adjustable parameter value in each layer of quantum circuit can be adjusted independently during the adjustment process.

[0021] Preferably, each layer of quantum circuit units includes a single-bit rotation gate acting on each quantum bit and a CNOT gate acting on two adjacent quantum bits, wherein the quantum bit with a smaller serial number is the control bit of the CNOT gate, and the quantum bit with a larger serial number is the target bit of the CNOT gate.

[0022] Preferably, each layer of quantum circuit units includes two sub-units with the same structure, each sub-unit includes a single-bit rotation gate acting on each quantum bit and a CNOT gate acting on two adjacent quantum bits, wherein the quantum bit with a smaller serial number is the control bit of the CNOT gate, and the quantum bit with a larger serial number is the target bit of the CNOT gate; the number of quantum bits acted on by one of the sub-units is the same as the number of generators in the generator set, and the number of quantum bits acted on by the other sub-unit is the same as the number of bits of the binary number of the slack variable in the second penalty term.

[0023] Preferably, the operating cost of each generator in the objective function is expressed as the product of the generator operating cost and a first variable expressing whether the generator is in an on state or an off state; the power generation power of the generator set in the power balance constraint is expressed as the sum of the power generation powers of all generators, and the power generation power of each generator is expressed as the product of the power generation power of the generator and the first variable; the maximum power generation power of the generator set in the rotating standby constraint is the sum of the maximum power generation powers of all generators, and the maximum power generation power of each generator is expressed as the product of the maximum power generation power of the generator and the first variable; correspondingly, the unconstrained objective function is mapped to the Hamiltonian of the quantum system by converting the first variable in the unconstrained objective function into a Pauli Z operator expression.

[0024] According to another aspect of the present invention, the present invention also provides a quantum computing device for unit combination optimization, including a function construction module, a function conversion module, a Hamiltonian construction module, a quantum system construction module, a quantum circuit module, a parameter adjustment module and an optimal solution acquisition module; wherein the function construction module is configured to determine the objective function, power balance constraint and spinning standby constraint of the UC problem based on the generator set data, wherein the objective function is used to calculate the sum of the operating costs of all generators in the generator set; the power balance constraint includes that the power generation power of the generator set is equal to the load power of the generator set; the spinning standby constraint includes that the maximum power generation power of the generator set is greater than the sum of the load power of the generator set and the standby power of the generator set; the function conversion module is configured to convert the power balance constraint and the spinning standby constraint into the first penalty term and the second penalty term of the objective function respectively, and add the first penalty term and the second penalty term to the objective function to form an unconstrained objective function; the Hamiltonian construction module is configured to convert the unconstrained objective function The invention relates to a method for mapping a quantum system into a Hamiltonian of a quantum system; the quantum system construction module is configured to construct a quantum system corresponding to a generator set, wherein the generator in the generator set corresponds to a quantum bit in the quantum system; the quantum circuit module is configured to construct a quantum circuit containing adjustable parameters based on the quantum system; the parameter adjustment module is configured to adjust the parameter value in the quantum circuit in a manner that reduces the expected value of the Hamiltonian of the quantum system until the expected value of the Hamiltonian converges; the optimal solution acquisition module is configured to measure the quantum state of the quantum system when the expected value of the Hamiltonian converges, and determine the generator corresponding to the optimal solution of the UC problem based on the quantum state of the quantum bit corresponding to the generator; the first penalty term includes a smooth monotonically increasing function whose independent variable is a first difference obtained by subtracting the load power of the generator set from the generated power of the generator set and whose function value is greater than or equal to zero, and the second penalty term includes a smooth monotonically increasing function whose independent variable is a second difference obtained by subtracting the load power of the generator set, the standby power of the generator set and the slack variable from the maximum generated power of the generator set and whose function value is greater than or equal to zero.

[0025] According to another aspect of the present invention, the present invention further 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 quantum computing method for unit combination optimization is executed.

[0026] 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 quantum computing method for unit combination optimization is executed.

[0027] The embodiment of the present invention realizes a rapid solution to the UC problem and meets the real-time requirements of a large-scale power system. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The preferred embodiments of the present invention will be further described in detail below with reference to the accompanying drawings, wherein:

[0029] Figure 1 is a flow chart of a quantum computing method for unit commitment optimization according to an embodiment of the present invention;

[0030] Figure 2 is a schematic diagram of a quantum circuit and parameter adjustment principle according to an embodiment of the present invention;

[0031] Figure 3 is a flow chart of a quantum circuit parameter adjustment method according to an embodiment of the present invention;

[0032] Figure 4 is a schematic diagram of a quantum circuit and parameter adjustment principle according to another embodiment of the present invention;

[0033] Figure 5 is a principle block diagram of a quantum computing device for unit combination optimization according to an embodiment of the present invention;

[0034] Figure 6 is a principle block diagram of a quantum computing system for unit combination optimization according to an embodiment of the present invention;

[0035] Figure 7 is a principle block diagram of a quantum computing system for unit combination optimization according to another embodiment of the present invention;

[0036] Figure 8 It is a structural principle block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0037] 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.

[0038] 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 below in sufficient detail 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 used or structural, logical or electrical changes may be made to the embodiments of the present application.

[0039] The present invention uses quantum computing to solve the UC problem to optimize the combination of generator sets, which can explore the solution space of large-scale UC problems more quickly and reduce the time required to search for solutions to the UC problem to meet real-time requirements.

[0040] See also Figure 1 , Figure 1 1 is a flow chart of a quantum computing method for unit combination optimization according to an embodiment of the present invention. In this embodiment, the method includes the following steps:

[0041] Step S11, determining the objective function and constraint conditions of the UC problem based on the generator set data.

[0042] Step S12, converting the constraint condition into a penalty term of the objective function, and adding the penalty term to the objective function to form an unconstrained objective function.

[0043] Step S13, mapping the unconstrained objective function to the Hamiltonian of the quantum system.

[0044] Step S14, constructing a quantum system corresponding to the generator set, wherein the generators in the generator set correspond to the quantum bits in the quantum system.

[0045] Step S15: constructing a quantum circuit including adjustable parameters based on the quantum system.

[0046] Step S16, adjusting the parameter values ​​in the quantum circuit to reduce the expected value of the Hamiltonian of the quantum system until convergence.

[0047] Step S17, measuring the quantum state of the quantum system when the expected value of the Hamiltonian converges, and taking the quantum state with the highest probability in the measurement results as the optimal solution to the UC problem.

[0048] Step S18, based on the correspondence between quantum bits and generators, determine the generator corresponding to the quantum bits in the optimal solution to the UC problem.

[0049] Among them, in the unit combination optimization problem, the cost calculation formula for each generator is shown in the following formula 1-1:

[0050] , 1-1

[0051] Among them, f i is the cost of the ith generator, p i is the power generation of the i-th generator, or called the operating power, i=1,2,…,n, n is the total number of generators in the generator set; a i , b i , c i are the quadratic coefficient, the primary coefficient and the startup cost, all of which are known constants. Therefore, the objective function of the UC problem is the sum of the operating costs of all generators in the generator set, as shown in the following formula 1-2:

[0052] 1-2

[0053] Where n is the number of generators in the generator set, y i is the first variable indicating whether the generator is in the on or off state. In this embodiment, the value of the first variable is a binary number, and its value is either 0 or 1, which is used as the decision variable for determining the start and stop of the current generator. Therefore, in the objective function, the operating cost of each generator is expressed as the generator operating cost f i and the first variable y indicating whether the generator is on or off i The product of .

[0054] In one embodiment, the constraints of the UC problem include a power balance constraint and a spinning reserve constraint, wherein the power generation power of the generator set is equal to the load power as the power balance constraint, which is an equation, as shown in the following equations 1-3:

[0055] 1-3

[0056] The power generation of the generator set is the sum of the power generation of all generators, and the power generation of each generator is expressed as the power generation of the generator p i and the first variable y i The product of L is the load power. When the power generated by the generator set is equal to the load power, the load power requirement is met without wasting energy.

[0057] The maximum power generation of the generator set is greater than the sum of the load power of the generator set and the standby power of the generator set as the spinning standby constraint condition of the generator set, which is an inequality, as shown in the following equation 1-4:

[0058] 1-4

[0059] Among them, p i,maxis the maximum power generation of the ith generator. The maximum power generation of a generator set is the sum of the maximum power generation of all generators. The maximum power generation of each generator is expressed as the maximum power generation of the generator p i,max and the first variable y i The product of L is the load power; P S For backup power.

[0060] Based on the aforementioned constraints, when converting the constraints into penalty items of the objective function in step S12, the power balance constraints and the rotational standby constraints are respectively converted into the first penalty item and the second penalty item of the objective function, and the first penalty item and the second penalty item are added to the objective function to form an unconstrained objective function.

[0061] The purpose of the penalty term is to generate a penalty value in the cost calculation result of the objective function when the constraint condition is not satisfied. Therefore, the first penalty term corresponding to the power balance constraint condition of the aforementioned equation relationship is a smooth monotonically increasing function whose function value is greater than or equal to zero, and the first difference between the power generation power and the load power of the generator set is the independent variable; the second penalty term corresponding to the spinning reserve constraint condition is a smooth monotonically increasing function whose function value is greater than or equal to zero, and the second difference between the maximum power generation power of the generator set and the load power of the generator set, the reserve power of the generator set and the slack variable is the independent variable.

[0062] Since the present invention needs to map the objective function to the Hamiltonian of the quantum system in the subsequent steps, and the Hamiltonian represents energy, and no mutation can be generated, and for the convenience of optimization, the penalty term of the present invention adopts a smooth monotonically increasing function, in order to generate a penalty value in the objective function when the constraint condition is not satisfied, and 0 in the objective function when the constraint condition is satisfied, the function value of the smooth monotonically increasing function corresponding to the penalty term should be greater than or equal to 0. In one embodiment, the smooth monotonically increasing function is a power function, and further, the power function exponent is greater than or equal to an even number of 2.

[0063] Of course, the first penalty term and the second penalty term may also be other functions. For example, the first penalty term may be an exponential function or a sigmoid function with e as the base and the first difference between the power generation power of the generator set and the load power as the independent variable. A person skilled in the art may select any function according to application habits.

[0064] Specifically, Formula 1-3 is converted into the following Formula 1-5 as the first penalty term:

[0065] 1-5

[0066] Convert equation 1-4 to the following equation 1-6 as the second penalty term:

[0067] 1-6

[0068] The first penalty term and the second penalty term are added to the objective function to form an unconstrained objective function G, as shown in the following formula 1-7:

[0069] 1-7

[0070] Among them, in formula 1-5 The weight coefficient is the weight of the balanced power constraint condition. The weight coefficient determines the weight of the balanced power constraint condition. Increasing the coefficient value will make the corresponding balanced power constraint more strictly satisfied. On the contrary, reducing the coefficient value will relax the corresponding constraint.

[0071] According to formula 1-5, when the power generation of the generator set is equal to the load power, that is, when formula 1-3 is satisfied, the result of formula 1-5 is 0. According to formula 1-7, this means that when the power balance constraint is satisfied, the cost calculation result of the objective function is not penalized; and when the power generation of the generator set is not equal to the load power, that is, when formula 1-3 is not satisfied, the result of formula 1-5 is greater than 0. According to formula 1-7, this means that when the power balance constraint is not satisfied, a penalty value is generated in the cost calculation result of the objective function, and the size of the penalty value is proportional to the square of the degree of deviation from the constraint.

[0072] In formula 1-6 is the weight coefficient of the system spinning reserve constraint. This coefficient determines the weight of the spinning reserve constraint, which is determined according to the user's emphasis on the system spinning reserve constraint. R in equation 1-6 is a slack variable. By adding the slack variable R, the inequality is converted to the following equation 1-8.

[0073] 1-8

[0074] The inequality is converted into an equation through the slack variable R, and thus the inequality is converted into the penalty term of the objective function. When the inequality shown in Formula 1-4 is satisfied, Formula 1-8 is established. For Formula 1-7, the cost calculation result of the objective function is not penalized. When the inequality shown in Formula 1-4 is not satisfied, Formula 1-8 is not established. At this time, a penalty value is generated in the cost calculation result of the objective function. The slack variable R is a constant estimated based on experiments.

[0075] Therefore, when optimizing and finding the minimum value of a new objective function 1-7 including cost terms and penalty terms, it means that the unit combination with the minimum cost can be obtained while satisfying the power balance constraint and the spinning reserve constraint.

[0076] In this embodiment, the penalty term uses a power function with an exponent of 2. However, it can be known that the exponent can also be other values. In order to ensure that a positive penalty value can be generated for the cost calculation result of the objective function when the condition is not met, the exponent of the power function can also be other even numbers greater than 2.

[0077] In addition, in order to facilitate subsequent quantum calculations, the slack variable R is converted into a binary number. In one embodiment, the slack variable R is converted according to the following formula 1-9:

[0078] 1-9

[0079] Among them, Cc is an adjustable parameter, which is determined by the characteristics of the generator set data. For example, when the generator set power is an integer multiple of 10, Cc=10 can be taken; y in formula 1-9 n+j It is a second variable representing 0 or 1, and does not mean whether the generator is turned on or off. The value of the current binary digit is expressed by the product of the bit weight of the binary number and the second variable.

[0080] In step S13, when the unconstrained objective function is mapped to the Hamiltonian of the quantum system, according to the spin-binary transformation, the binary 0 and 1 have a corresponding relationship with the Pauli Z operator in the quantum system. In this embodiment, referring to formula 1-7, it can be seen that when the generator set data is determined, only the first variable y in the unconstrained objective function G i is an uncertain variable, and the values ​​of other parameters are all known. i is a binary quantity, so the first variable y i Convert to Pauli Z operator expression , the unconstrained objective function is mapped to the Hamiltonian of the quantum system, where the second variable y in the relaxation variable R is n+j It is also converted into the Pauli Z operator expression. After expanding the unconstrained objective function G and combining similar terms, the following equation 1-10 is finally obtained:

[0081] 1-10

[0082] Where, N=n+k, C ii and C ij is the constant obtained by expanding the unconstrained objective function G and merging similar terms.

[0083] It can be seen from formula 1-10 that in step S14, the constructed quantum system requires N quantum bits, of which n quantum bits correspond one-to-one to the generators in the generator set. Since the relaxation variable R is introduced, the other k quantum bits correspond to the binary bits of the relaxation variable R.

[0084] According to Hamiltonian expressions 1-10, it can be known that a single Pauli Z operator and two Pauli Z operators in a product relationship are included. The Pauli Z operator can be implemented by a single-bit rotation gate. For a single Pauli Z operator, it is embodied by a single-bit rotation gate acting on a single quantum bit. For a product relationship, it can be embodied by an entanglement gate (such as a CNOT gate) acting on two adjacent quantum bits. For two adjacent quantum bits, the quantum bit with a small serial number is the control bit of the CNOT gate, and the quantum bit with a large serial number is the target bit of the CNOT gate. Among them, the rotation angle of the rotation gate is used as an adjustable parameter. In order to improve the expression ability of the quantum circuit, this embodiment will implement the quantum gate of Hamiltonian expressions 1-10 as a quantum circuit unit, so as to construct a quantum circuit containing adjustable parameters through step S15, and the entire quantum circuit includes multiple layers of quantum circuit units connected end to end.

[0085] See also Figure 2 , Figure 2 FIG. 1 is a schematic diagram of a quantum circuit and parameter adjustment principle according to an embodiment of the present invention. In this embodiment, the quantum circuit includes an input part, multiple layers of quantum circuit units connected end to end, and a measurement part. The multiple layers of quantum circuit units connected end to end are shown in the dotted box in the figure. The principle of each layer of quantum circuit unit is as follows: Figure 2 As shown in the solid box in the figure, it includes a rotating gate that acts on each quantum bit separately. , revolving door It can be R X , R Y or R Z , its rotation angle is an adjustable parameter, and it can be known that the revolving door It can be one or more. Figure 2 Only one is shown in the schematic diagram. Entanglement gates are set between all two adjacent quantum bits, such as the CNOT gate in the figure. The number of quantum bits is n+k. In one embodiment, the first n quantum bits correspond to the generators in the generator set one by one. In the present invention, the parameter value in the quantum circuit, that is, the rotation angle of each rotating gate, is adjusted by a classical optimizer in a manner that reduces the expected value of the Hamiltonian of the quantum system until the expected value of the Hamiltonian converges.

[0086] See also Figure 3 , Figure 3 is a flow chart of a quantum circuit parameter adjustment method according to an embodiment of the present invention, combined with Figure 2 , the parameter adjustment method comprises the following steps:

[0087] Step S151, setting various parameter values ​​in the quantum circuit through a classical optimizer, and sending the parameter values ​​to a quantum computing device, wherein the classical optimizer is implemented by a classical processor, and the quantum computing device is implemented by a quantum processor, Figure 3 The quantum processor in can be the processor of a real quantum machine or a classical processor that implements a quantum simulator.

[0088] Step S152, initializing the quantum state of all quantum bits to zero state.

[0089] Step S153, executing the Hadamard gate on all quantum bits respectively to obtain a mixed uniform state, wherein this step is an optional step.

[0090] Step S154, set the quantum circuit layer number t=1.

[0091] Step S155, traverse i from 1 to N, and perform i Execute a revolving door.

[0092] Step S156, traverse i from 1 to N, and execute the CNOT gate on two adjacent quantum bits.

[0093] Step S157, set the number of quantum circuit layers t=t+1.

[0094] Step S158, determine whether the quantum circuit layer number t is equal to the current total number of quantum circuit layers T. If the quantum circuit layer number t is equal to the current total number of quantum circuit layers T, it means that the current quantum circuit has evolved and the evolved quantum state is generated. , then execute step S159. If the number of quantum circuit layers t is not equal to the total number of quantum circuit layers T, then return to step S155 and execute the next quantum circuit unit.

[0095] Step S159, measuring the Pauli Z operator of each quantum bit and the Pauli Z operator of any two quantum bits, and sending the measurement result to the classical optimizer; wherein the measurement result is the expected value of the following Pauli Z operator string:

[0096] ,

[0097] Step S1510, the classical optimizer calculates the expected value of the Hamiltonian H based on equations 1-10 and the measurement results.

[0098] Step S1511, the classical optimizer calculates the expected value descent gradient of the current Hamiltonian H.

[0099] Step S1512, determine whether the descent gradient is zero, that is, whether the currently calculated Hamiltonian H is decreasing. If it is decreasing, it means that the expected value of the current Hamiltonian H has not converged, then return to step S151, and continue to adjust the specific value of the parameter. If the descent gradient is zero, it means that the expected value of the currently calculated Hamiltonian H is no longer decreasing, then it is considered that the expected value of the Hamiltonian H has converged, and the parameter adjustment is completed, and the energy of the system is the lowest at this time.

[0100] After the parameter adjustment is completed, the ground state of all quantum bits is measured in step S16. The ground state of the quantum bit with the highest probability in the measurement result and corresponding to the generator one by one corresponds to the optimal solution of the UC problem. That is, when the ground state of the quantum bit is 1, the generator corresponding to the quantum bit is turned on, and when the ground state of the quantum bit is 0, the generator corresponding to the quantum bit is turned off, thereby obtaining a generator combination that meets the lowest cost and the constraints at the same time. Among them, whether the optimal solution can be obtained in the measurement result is usually related to the total number of quantum circuit layers T. When the total number of quantum circuit layers T is within the range defined by two thresholds, multiple probabilistic quantum states appear in the measurement result, and the quantum state with the highest probability is the quantum state corresponding to the optimal solution of the UC problem. That is, the total number of quantum circuit layers T cannot be too small or too large. A relatively suitable total number of quantum circuit layers T can be obtained through a limited number of experiments.

[0101] See also Figure 4 , Figure 4 Schematic diagram of quantum circuit and parameter adjustment principle according to another embodiment of the present invention. In this embodiment, based on equations 1-7, it can be seen that the unconstrained objective function G consists of three parts, and the optimization problem can be equivalent to the joint optimization of total cost F, total power P, maximum total power M and relaxation variable R. Since the total cost F, total power P and maximum total power M correspond to the same number of quantum bits, and are different from the quantum bits corresponding to the relaxation variables, a quantum circuit unit can be divided into two independent sub-units, such as Figure 4 Block-1 and Block-2 in the example, where the quantum circuit of each subunit is composed of Figure 2 As shown in , each subunit includes a single-bit rotation gate acting on each quantum bit and a CNOT gate acting on two adjacent quantum bits, the difference being that the corresponding number of quantum bits is different. Among them, the number of quantum bits acted on by Block-1 is the same as the number of generators in the generator set, such as n in the aforementioned formula 1-7, and the number of quantum bits acted on by Block-2 is the same as the number of bits of the binary number of the slack variable in the second penalty term, such as k as shown in the aforementioned formula 1-9. Each subunit includes a CNOT gate acting on two adjacent quantum bits, but there is no CNOT gate between the last quantum bit of Block-1 and the first quantum bit of Block-2.

[0102] right Figure 4 The parameter adjustment process of the quantum circuit shown in Figure 2 The parameter adjustment process of the quantum circuit shown is the same and will not be repeated here. Figure 4 The quantum circuit shown also includes multiple layers of quantum circuit units connected end to end. The adjustable parameter value in each layer of quantum circuit units, that is, the rotation angle of each revolving door, can be adjusted independently during the adjustment process. When the total number of layers T of quantum circuit units exceeds a threshold, the quantum state can be collapsed to the optimal solution with a 100% probability by adjusting the parameters in the circuit. In other words, when the total number of layers T of quantum circuit units exceeds a threshold, when performing ground state measurement, a quantum state with a probability of 1 will appear in the measurement result. This quantum state is the optimal solution to the corresponding UC problem and is also the quantum state of the exact solution.

[0103] Example

[0104] In one embodiment, the generator set has a total of 5 generators, which are numbered separately. The data of the generator set is shown in the following Table 1:

[0105] Table 1

[0106]

[0107] For this embodiment, according to Figure 2 The quantum circuit shown (hereinafter referred to as the general hardware efficient ansatz quantum neural network, Hardware-Efficient Ansatz Quantum Neural Network, HEA QNN for short) and Figure 4 The quantum circuit shown (hereinafter referred to as Partially Connected Quantum Neural Network, PCQNN for short) calculates the solution of the optimal combination of the generator set with different load powers and standby powers. The results of the above two quantum circuits and the classical solution are shown in Table 2, among which the classical solution obtains the exact solution.

[0108] Table 2

[0109]

[0110] In Table 2, the first column L and the second column S correspond to the load power P in formula 1-8 respectively. L and reserve power P S Two application data; the third and sixth columns represent the use of Figure 2 and Figure 4The quantum state measurement results of the quantum bits corresponding to the generators calculated by the quantum circuit shown are binary data, which are composed of the quantum states of 5 quantum bits. These 5 quantum bits correspond to the generators in the generator set one by one. When the value is 1, it means that the corresponding generator is turned on, and when the value is 0, it means that the corresponding generator is turned off. Therefore, the optimal combination of the generator set is determined according to the quantum state measurement results. Probability represents the probability of obtaining the corresponding quantum state in the previous column; layers represents the total number of layers of the quantum circuit. The last column represents the optimal combination of the generator set obtained by the classical calculation method.

[0111] According to Table 2, for Figure 2 For the quantum circuit shown in the figure, when the total number of quantum circuit layers is 7, a suboptimal solution is obtained for the application data in the first row, while an optimal solution is obtained for the application data in the second row. Figure 4 For the quantum circuit shown, for the application data in the first row, the optimal solution can be obtained when the number of layers is 6, and for the application data in the second row, the optimal solution can be obtained when the number of layers is 4. For the application data in the third and fourth rows, both quantum circuits can provide optimal solutions. In this embodiment, the optimal solution corresponds to the exact solution, which is a solution verified by classical calculation method.

[0112] for Figure 2 The quantum circuit shown in the figure can obtain the optimal solution in most cases through experiments. Figure 4 The quantum circuit shown can obtain the optimal solution, and Figure 4 The quantum circuit shown has fewer layers and fewer parameters, so the parameter adjustment speed is fast. Figure 4 The number of bit connections in each layer of quantum circuits is small, which reduces the complexity of parameter adjustment and further improves the speed of parameter adjustment.

[0113] The present invention utilizes the parallelism of quantum computing to improve the speed of exploring large-scale solution spaces and reduce the time required for searching, thereby being able to quickly solve the combined optimization problem of generator sets and meeting real-time requirements.

[0114] In another aspect, the present invention also provides a quantum computing device for unit combination optimization. Figure 5 , Figure 51 is a principle block diagram of a quantum computing device for unit combination optimization according to an embodiment of the present invention. The unit combination optimization device 10 in this embodiment includes a function construction module 11, a function conversion module 12, a Hamiltonian construction module 13, a quantum system construction module 14, a quantum circuit module 15, a parameter adjustment module 16 and an optimal solution acquisition module 17, wherein the function construction module 11 determines the objective function and constraint conditions of the UC problem based on the generator set data, wherein the sum of the operating costs of all generators in the generator set is taken as the objective function, and its expression is shown in Formula 1-2; the generated power of the generator set is equal to the load power as the power balance constraint condition of the generator set, and its expression is shown in Formula 1-3; the maximum generated power of the generator set is greater than the sum of the load power and the standby power of the generator set as the rotating standby constraint condition of the generator set, and its expression is shown in Formula 1-4.

[0115] The function conversion module 12 converts the power balance constraint and the rotational standby constraint into the first penalty term and the second penalty term of the objective function respectively, as shown in Formulas 1-5 and 1-6, and adds the first penalty term and the second penalty term to the objective function to form an unconstrained objective function, as shown in Formula 1-7.

[0116] The Hamiltonian construction module 13 maps the unconstrained objective function to the Hamiltonian of the quantum system, and its expression is shown in Formula 1-10.

[0117] The quantum system building module 14 builds a quantum system corresponding to the generator set, wherein the generators in the generator set correspond to the quantum bits in the quantum system.

[0118] The quantum circuit module 15 constructs a quantum circuit with adjustable parameters. Figure 2 or Figure 4 As shown, please refer to the description of the aforementioned method section for details, which will not be repeated here.

[0119] The parameter adjustment module 16 is used to adjust the parameter value in the quantum circuit so as to reduce the expected value of the Hamiltonian of the quantum system until convergence.

[0120] The optimal solution acquisition module 17 is used to measure the quantum state of the quantum system when the expected value of the Hamiltonian converges, and take the quantum state with the highest probability in the measurement result as the optimal solution to the UC problem; based on the corresponding relationship between the quantum bit and the generator, determine the generator corresponding to the quantum bit in the optimal solution to the UC problem.

[0121] See also Figure 6 , Figure 61 is a principle block diagram of a quantum computing system for unit combination optimization according to an embodiment of the present invention. The system includes a classical computing device 100 and a quantum computing device 200, wherein the classical computing device 100 includes a classical data processing module 110 and an optimizer 120, wherein the classical data processing module 110 determines the objective function, balance constraint and spinning reserve constraint of the UC problem based on the data of the generator set, and then converts the power balance constraint and the spinning reserve constraint into the first penalty term and the second penalty term of the objective function respectively, and adds the first penalty term and the second penalty term to the objective function to form an unconstrained objective function; the unconstrained objective function is mapped to the Hamiltonian expression of the quantum system, a quantum circuit is constructed, and the quantum circuit is sent to the quantum computing device 200. The optimizer 120 communicates with the quantum computing device 200, adjusts the parameters of the quantum circuit to determine the parameters when the Hamiltonian expectation value converges, and then the quantum computing device 200 performs the ground state measurement of the quantum state and sends the measurement result to the classical computing device 100. The classical data processing module 110 determines the generator corresponding to the optimal solution of the UC problem according to the quantum state measurement result returned by the quantum computing device 200. In this embodiment, the quantum computing device 200 can be an ion trap computer, an optical quantum computer, a superconducting quantum computer, a neutral atom quantum computer, and the like.

[0122] See also Figure 7 , Figure 7 1 is a block diagram of a quantum computing system for unit combination optimization according to another embodiment of the present invention. The system is implemented by a classical computing device 100, which includes a classical data processing module 110, an optimizer 120 and a quantum simulator 130. Figure 6 The difference between the system shown in the figure is that the quantum computing device is replaced by a quantum simulator 130 in this embodiment, but the working process and principle of the system in this embodiment are the same as those in the embodiment shown in the figure. Figure 6 The system is similar and will not be described here.

[0123] On the other hand, an embodiment of the present invention further provides an electronic device, see Figure 8 , Figure 8 is a block diagram of the structure principle of an electronic device according to an embodiment of the present invention. Figure 8 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, it executes the quantum computing method for unit combination optimization provided by the present invention.

[0124] 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 quantum computing method for unit combination optimization in an embodiment of the present invention can be implemented.

[0125] In one example, Figure 8 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.

[0126] 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.

[0127] 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 quantum computing method for unit combination 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, a quantum superposition state 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.

[0128] 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.

[0129] 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 quantum computing method for unit combination optimization, characterized in that: include: Based on the generator set data, determine the objective function, power balance constraint and spinning reserve constraint of the UC problem, wherein the objective function is used to calculate the sum of the operating costs of all generators in the generator set, the power balance constraint includes that the power generation power of the generator set is equal to the load power of the generator set, and the spinning reserve constraint includes that the maximum power generation power of the generator set is greater than the sum of the load power of the generator set and the standby power of the generator set; Converting the power balance constraint and the spinning reserve constraint into a first penalty term and a second penalty term of the objective function respectively, and adding the first penalty term and the second penalty term to the objective function to form an unconstrained objective function; Mapping the unconstrained objective function into a Hamiltonian of a quantum system; Constructing a quantum system corresponding to the generator set, wherein the generators in the generator set correspond to the quantum bits in the quantum system; constructing a quantum circuit including adjustable parameters based on the quantum system; Adjust the parameter values ​​in the quantum circuit to reduce the expected value of the Hamiltonian of the quantum system until convergence; Measure the quantum state of the quantum system when the expected value of the Hamiltonian converges, and take the quantum state with the highest probability in the measurement result as the optimal solution to the UC problem; Based on the correspondence between quantum bits and generators, determine the generator corresponding to the quantum bits in the optimal solution to the UC problem. Among them, the first penalty term includes a smooth monotonically increasing function with a first difference obtained by subtracting the load power of the generator set from the power generation power of the generator set as the independent variable and a function value greater than or equal to zero, and the second penalty term includes a smooth monotonically increasing function with a second difference obtained by subtracting the load power of the generator set, the standby power of the generator set and the slack variable from the maximum power generation power of the generator set as the independent variable and a function value greater than or equal to zero.

2. The quantum computing method for unit commitment optimization according to claim 1, characterized in that: The smooth monotonically increasing function is a power function.

3. The quantum computing method for unit commitment optimization according to claim 2, characterized in that: The exponent of the power function is an even number greater than or equal to 2.

4. The quantum computing method for unit commitment optimization according to claim 1, characterized in that: The first penalty term and the second penalty term each include a respective weight coefficient.

5. The quantum computing method for unit combination optimization according to any one of claims 1 to 4, characterized in that: The quantum circuit with adjustable parameters comprises multiple layers of quantum circuit units connected end to end, and the adjustable parameter value in each layer of quantum circuit can be adjusted independently during the adjustment process.

6. The quantum computing method for unit commitment optimization according to claim 5, characterized in that: Each layer of quantum circuit units includes a single-bit rotation gate that acts on each quantum bit and a CNOT gate that acts on two adjacent quantum bits. The quantum bit with a smaller serial number is the control bit of the CNOT gate, and the quantum bit with a larger serial number is the target bit of the CNOT gate.

7. The quantum computing method for unit commitment optimization according to claim 5, characterized in that: Each layer of quantum circuit units includes two sub-units with the same structure. Each sub-unit includes a single-bit rotation gate that acts on each quantum bit and a CNOT gate that acts on two adjacent quantum bits. The quantum bit with a smaller serial number is the control bit of the CNOT gate, and the quantum bit with a larger serial number is the target bit of the CNOT gate. The number of quantum bits acted on by one of the sub-units is the same as the number of generators in the generator set, and the number of quantum bits acted on by the other sub-unit is the same as the number of bits of the binary number of the slack variable in the second penalty term.

8. The quantum computing method for unit commitment optimization according to claim 1, characterized in that: The operating cost of each generator in the objective function is expressed as the product of the operating cost of the generator and a first variable expressing whether the generator is in an on state or an off state; the power generation power of the generator group in the power balance constraint is the sum of the power generation powers of all generators, and the power generation power of each generator is expressed as the product of the power generation power of the generator and the first variable; the maximum power generation power of the generator group in the rotating standby constraint is the sum of the maximum power generation powers of all generators, and the maximum power generation power of each generator is expressed as the product of the maximum power generation power of the generator and the first variable; correspondingly, the unconstrained objective function is mapped to the Hamiltonian of the quantum system by converting the first variable in the unconstrained objective function into a Pauli Z operator expression.

9. A quantum computing device for unit combination optimization, characterized in that: include: a function building module configured to determine an objective function, a power balance constraint and a spinning reserve constraint of the UC problem based on the generator set data, wherein the objective function is used to calculate the sum of the operating costs of all generators in the generator set; the power balance constraint includes that the power generation power of the generator set is equal to the load power of the generator set; and the spinning reserve constraint includes that the maximum power generation power of the generator set is greater than the sum of the load power of the generator set and the reserve power of the generator set; a function conversion module configured to convert the power balance constraint and the spinning reserve constraint into a first penalty term and a second penalty term of an objective function, respectively, and add the first penalty term and the second penalty term to the objective function to form an unconstrained objective function; A Hamiltonian construction module configured to map the unconstrained objective function into a Hamiltonian of a quantum system; A quantum system building module configured to build a quantum system corresponding to a generator set, wherein the generators in the generator set correspond to the quantum bits in the quantum system; A quantum circuit module configured to construct a quantum circuit including adjustable parameters based on a quantum system; A parameter adjustment module, configured to adjust parameter values ​​in the quantum circuit so that the expected value of the Hamiltonian of the quantum system is reduced until convergence; The optimal solution acquisition module is configured to measure the quantum state of the quantum system when the expected value of the Hamiltonian converges, and take the quantum state with the highest probability in the measurement result as the optimal solution to the UC problem; based on the corresponding relationship between the quantum bit and the generator, determine the generator corresponding to the quantum bit in the optimal solution to the UC problem, Among them, the first penalty term includes a smooth monotonically increasing function with a first difference obtained by subtracting the load power of the generator set from the power generation power of the generator set as the independent variable and a function value greater than or equal to zero, and the second penalty term includes a smooth monotonically increasing function with a second difference obtained by subtracting the load power of the generator set, the standby power of the generator set and the slack variable from the maximum power generation power of the generator set as the independent variable and a function value greater than or equal to zero.

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, it executes the quantum computing method for unit combination optimization as described in any one of claims 1 to 8.

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 quantum computing method for unit combination optimization according to any one of claims 1 to 8 is executed.