Method and device for obtaining maximum power cross section, electronic equipment and medium

By constructing a weighted graph of a distributed power energy system and calculating the maximum power cross-section using quantum algorithm lines, the problem of inefficiency of traditional methods in large-scale and complex power systems is solved, and efficient maximum power cross-section calculation is achieved.

CN120146211APending Publication Date: 2025-06-13CHINA GREATWALL TECH GRP CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510178153.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

When dealing with large-scale and complex power systems, the traditional method of obtaining maximum power sections is huge in calculation and slow in convergence, resulting in low efficiency.

Method used

By constructing a weighted graph of the power distributed energy system, a quantum algorithm line is constructed based on this graph, the target parameter vector of the quantum algorithm line is obtained, and it is brought into the quantum algorithm line, and the output result is obtained to calculate the maximum power cross-section.

Benefits of technology

It realizes efficient calculation of the maximum power cross-section of the power distributed energy system in the quantum system, meets the computing needs of large-scale and complex systems, and improves the efficiency of finding the maximum power cross-section.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146211A_ABST
    Figure CN120146211A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a method and device for obtaining the maximum power cross section, electronic equipment and a storage medium. The method comprises the following steps: constructing a weighted graph corresponding to the power distributed energy system; constructing a quantum algorithm line according to the weighted graph; obtaining a target parameter vector corresponding to the quantum algorithm line, and substituting the target parameter vector into the quantum algorithm line to obtain an output result of the quantum algorithm line; and obtaining the maximum power cross section of the power distributed energy system based on the output result. Thus, compared with a traditional maximum power cross section solving method, the efficiency of calculating the maximum power cross section of a large-scale and complex electric power system is low, the maximum power cross section can be calculated in the quantum system, the calculation requirement of the large-scale and complex electric power system can be met, and the efficiency of solving the maximum power cross section is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of quantum computing technology, and particularly to a method and device for obtaining a maximum power cross-section, an electronic device, and a medium. Background Art

[0002] Currently, distributed energy is the main source of electrical energy in the future decarbonized power system, such as photovoltaic, wind turbines, etc. These renewable resources with good flexibility and environmental protection performance are playing an increasingly important role in today's energy field. With the deployment of a large number of distributed energy networks, to achieve effective monitoring, operation, and control of the distributed system, it is necessary to understand the largest part of power and data transmission in the distributed energy system. Therefore, obtaining the maximum power cross-section in a power distributed energy system has become a key challenge in modern power systems. Obtaining the maximum power cross-section involves finding the maximum power transmission capacity in a given distributed energy network. Traditional methods for obtaining the maximum power cross-section include linear programming algorithms, integer programming algorithms, or heuristic algorithms, etc.

[0003] However, when dealing with large-scale and complex power systems, the above algorithms require a huge amount of computation and a slow convergence speed, resulting in low efficiency of the above methods for obtaining the maximum power cross-section. Summary of the Invention

[0004] To solve the above technical problems, embodiments of the present application provide a method and device for obtaining a maximum power cross-section, an electronic device, and a storage medium to improve the efficiency of obtaining the maximum power cross-section.

[0005] According to one aspect of the embodiments of the present application, a method for obtaining a maximum power cross-section is provided, including: constructing a weighted graph corresponding to a power distributed energy system; constructing a quantum algorithm circuit according to the weighted graph; obtaining a target parameter vector corresponding to the quantum algorithm circuit, and substituting the target parameter vector into the quantum algorithm circuit to obtain an output result of the quantum algorithm circuit; obtaining the maximum power cross-section of the power distributed energy system based on the output result.

[0006] In some embodiments, the constructing a weighted graph corresponding to a power distributed energy system includes: respectively determining each power component in the power distributed system as each vertex of the weighted graph; determining the edges connecting each vertex based on the connection lines between each power component in the power distributed system; obtaining the apparent power corresponding to each connection line; determining the weight of each edge corresponding to each connection line according to the apparent power; constructing the weighted graph based on each vertex, the edges connecting each vertex, and the weights of each edge.

[0007] In some embodiments, constructing a quantum algorithm circuit according to the weighted graph includes: obtaining a reference Hamiltonian of the power distributed energy system according to the weighted graph; and constructing the quantum algorithm circuit according to the reference Hamiltonian.

[0008] In some embodiments, constructing the quantum algorithm circuit according to the reference Hamiltonian includes: determining an initial Hamiltonian corresponding to the maximum power cross-section; constructing a hybrid layer circuit according to the initial Hamiltonian; constructing a cost layer circuit according to the reference Hamiltonian; superimposing the hybrid layer circuit and the cost layer circuit multiple times to construct a variational layer circuit of the power distributed system; and constructing the quantum algorithm circuit according to a preset Hadamard gate layer circuit and the variational layer circuit.

[0009] In some embodiments, obtaining a target parameter vector corresponding to the quantum algorithm circuit includes: obtaining an initial parameter vector by using a preset random initialization parameter strategy algorithm or a preset quasi-parameter strategy algorithm; the initial parameter vector being the parameter vector obtained for the first time; and optimizing the parameter vector obtained in the previous time by using the gradient descent method to obtain a new parameter vector.

[0010] In some embodiments, bringing the target parameter vector into the quantum algorithm circuit to obtain an output result of the quantum algorithm circuit includes: updating the parameters in the quantum algorithm circuit by using the parameter vector; using a quantum bit in the all-zero state as an input of the quantum algorithm circuit, and then measuring the quantum state of the quantum bit multiple times at the end of the quantum algorithm circuit to obtain the output result.

[0011] In some embodiments, obtaining the maximum power cross-section of the power distributed energy system based on the output result includes: determining an objective function corresponding to the maximum power cross-section; and determining the maximum power cross-section of the power distributed energy system based on the output result corresponding to the target parameter vector and the objective function.

[0012] According to one aspect of the embodiments of the present application, there is provided an apparatus for obtaining a maximum power cross-section, including: a weighted graph construction module configured to construct a weighted graph corresponding to a power distributed energy system; a circuit construction module configured to construct a quantum algorithm circuit according to the weighted graph; a parameter substitution module configured to obtain a target parameter vector corresponding to the quantum algorithm circuit and bring the target parameter vector into the quantum algorithm circuit to obtain an output result of the quantum algorithm circuit; and a determination module configured to determine the maximum power cross-section of the power distributed energy system based on the output result.

[0013] According to one aspect of the embodiments of the present application, there is provided an electronic device, including: one or more processors; a storage device for storing one or more programs, which, when executed by the one or more processors, enable the electronic device to implement the above-mentioned method for obtaining the maximum power cross-section.

[0014] According to one aspect of the embodiments of the present application, there is provided a computer-readable storage medium, on which computer-readable instructions are stored, which, when executed by a processor of a computer, cause the computer to execute the above-mentioned method for obtaining the maximum power cross-section.

[0015] In the technical solution provided by the embodiments of the present application, by constructing a weighted graph corresponding to the power distributed energy system, constructing a quantum algorithm circuit according to the weighted graph, then obtaining the target parameter vector corresponding to the quantum algorithm circuit, and substituting the target parameter vector into the quantum algorithm circuit to obtain the output result of the quantum algorithm circuit, and then obtaining the maximum power cross-section of the power distributed energy system based on the output result. In this way, by constructing a quantum algorithm circuit through the weighted graph corresponding to the power distributed energy system, then obtaining the target parameter vector of the quantum algorithm circuit, and obtaining the maximum power cross-section of the power distributed energy system based on the output result brought by the target parameter vector, the calculation of the maximum power cross-section within the quantum system is realized. Compared with the traditional method for obtaining the maximum power cross-section, the efficiency of calculating the maximum power cross-section of a large-scale and complex power system is relatively low. The present application can calculate the maximum power cross-section within the quantum system, can meet the calculation requirements of large-scale and complex power systems, and improves the efficiency of obtaining the maximum power cross-section.

[0016] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. Brief Description of the Drawings

[0017] The accompanying drawings here are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts. In the drawings:

[0018] Figure 1 is a flowchart of the method for obtaining the maximum power cross-section shown in an exemplary embodiment of the present application;

[0019] Figure 2 is a schematic diagram of the hybrid layer circuit shown in an exemplary embodiment of the present application;

[0020] Figure 3 It is a schematic diagram of a cost layer circuit shown in an exemplary embodiment of the present application;

[0021] Figure 4 It is a schematic diagram of a variable layer circuit shown in an exemplary embodiment of the present application;

[0022] Figure 5 It is a schematic diagram of a preset Hadamard gate layer circuit shown in an exemplary embodiment of the present application;

[0023] Figure 6 It is a schematic diagram of a quantum algorithm circuit shown in an exemplary embodiment of the present application;

[0024] Figure 7 It is a flowchart of a method for obtaining a maximum power cross-section shown in another exemplary embodiment of the present application;

[0025] Figure 8 It is a block diagram of a device for obtaining a maximum power cross-section shown in an exemplary embodiment of the present application;

[0026] Figure 9 It shows a schematic structural diagram of an electronic device suitable for implementing the embodiments of the present application. Detailed implementation manners

[0027] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present application. On the contrary, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0028] The block diagrams shown in the drawings are only functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0029] The flowcharts shown in the drawings are only exemplary descriptions and do not necessarily include all contents and operations / steps, nor do they necessarily need to be executed in the described order. For example, some operations / steps can be decomposed, while some operations / steps can be combined or partially combined. Therefore, the actual execution order may change according to the actual situation.

[0030] As used in this application, "a plurality of" means two or more. " / or" describes the relationship between associated objects, indicating that there are three possible relationships. For example, A / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally indicates an "or" relationship between the associated objects before and after.

[0031] See Figure 1 , Figure 1 is a flowchart of a method for obtaining a maximum power cross-section shown in an exemplary embodiment of this application.

[0032] As Figure 1 shown, in an exemplary embodiment, the method for obtaining a maximum power cross-section at least includes steps S110 to S140, which are introduced in detail as follows:

[0033] Step S110, construct a weighted graph corresponding to the power distributed energy system.

[0034] It should be noted that, compared with the traditional centralized power supply method, the power distributed energy system arranges the combined cooling, heat and power system in a smaller scale, smaller capacity, modular and decentralized manner near the users, so as to be able to independently output cooling, heat and / or electric energy.

[0035] Furthermore, constructing a weighted graph corresponding to the power distributed energy system includes: respectively determining each power component in the power distributed system as each vertex of the weighted graph; determining the edges connecting each vertex based on the connection lines between each power component in the power distributed system; obtaining the apparent power corresponding to each connection line; determining the weight of each edge corresponding to each connection line according to the apparent power; constructing a weighted graph based on each vertex, the edges connecting each vertex, and the weights of each edge. In this way, by determining vertices according to each power component in the power distributed system, determining edges according to the connection lines between each power component, determining the weights of edges according to the apparent power corresponding to each connection line, and constructing a weighted graph with vertices, edges and weights, the weighted graph can accurately reflect the connection layout and power situation of the power distributed system, so as to improve the accuracy of the maximum power cross-section obtained according to the weighted graph.

[0036] It should be noted that each power component in the power distributed system includes: power generation stations, energy storage devices, loads, etc. in the power distributed system. Among them, the power generation stations include: power generation devices such as solar photovoltaic devices, wind power generation devices, and hydroelectric power generation devices; the energy storage devices include: batteries, multilevel converters, substations, etc.; the loads include: power consumption devices such as commercial power consumption devices, civilian power consumption devices, and industrial power consumption devices.

[0037] The connection lines between the power components in the power distribution system characterize the connection relationships of the power components, which can be visualized as the actual physical layout and connection information.

[0038] Specifically, when two power components are connected by devices such as power transmission lines, transformers, and switches, it is determined that each power component has a connection line.

[0039] Based on the connection lines between the power components in the power distribution system, the edges connecting the vertices are determined, that is: in the power distribution system, the power components corresponding to the existing connection lines are determined; the vertices corresponding to the power components corresponding to the connection lines are determined as both ends of the edge.

[0040] Specifically, in the power distribution system, if there is a line connection between power component 1 and power component 2, it is determined that there is a connection relationship between vertex 1 corresponding to power component 1 and vertex 2 corresponding to power component 2, that is, vertex 1 corresponding to power component 1 and vertex 2 corresponding to power component 2 are both ends of the edge, and there is an edge connection between vertex 1 corresponding to power component 1 and vertex 2 corresponding to power component 2. By the same method, the vertices with connection relationships can be determined through the connection lines between the power components, and then all the edges can be determined.

[0041] Optionally, obtaining the apparent power corresponding to each connection line includes: obtaining the voltage corresponding to each vertex and the admittance between each vertex; obtaining the power flow of each connection line according to the voltage corresponding to each vertex and the admittance between each vertex; obtaining the apparent power corresponding to each connection line respectively according to the power flow of each connection line.

[0042] In some embodiments, obtaining the power flow of each connection line according to the voltage corresponding to each vertex and the admittance between each vertex includes: by calculating to obtain the power flow of the connection line connecting the i-th vertex and the k-th vertex. Where S ik is the power flow of the connection line connecting the i-th vertex and the k-th vertex, which characterizes the power transmission from the i-th vertex to the k-th vertex; is the voltage corresponding to the i-th vertex; is the voltage corresponding to the k-th vertex; is the admittance between the i-th vertex and the k-th vertex.

[0043] Optionally, obtaining the apparent power corresponding to each connection line includes: obtaining the active power between each vertex and the reactive power between each vertex; obtaining the power flow of each connection line according to the active power between the vertices and the reactive power between each vertex; obtaining the apparent power corresponding to each connection line respectively according to the power flow of each connection line.

[0044] In some embodiments, obtaining the power flow of each connection line according to the active power between vertices and the reactive power between each pair of vertices includes: by calculating S ik = P ik + jQ ik , obtaining the power flow of the connection line connecting the i-th vertex and the k-th vertex. Wherein, S ik is the power flow of the connection line connecting the i-th vertex and the k-th vertex, which represents the power transmission from the i-th vertex to the k-th vertex; P ik is the active power from the i-th vertex to the k-th vertex; j is the imaginary unit, j 2 = -1; Q ik is the reactive power from the i-th vertex to the k-th vertex.

[0045] Furthermore, obtaining the apparent power corresponding to each connection line according to the power flow of each connection line includes: by calculating W ik = |S ik |, obtaining the apparent power corresponding to the connection line connecting the i-th vertex and the k-th vertex. Wherein, W ik is the apparent power corresponding to the connection line connecting the i-th vertex and the k-th vertex; "|S ik |" represents obtaining the modulus of S ik .

[0046] Optionally, determining the weight of the edge corresponding to each connection line according to the apparent power includes: correspondingly determining the apparent power corresponding to each connection line as the weight of the edge corresponding to the same connection line.

[0047] Optionally, determining the weight of the edge corresponding to each connection line according to the apparent power includes: normalizing the apparent power corresponding to each connection line; determining the normalized power of each line as the weight of the edge corresponding to the connection line. In this way, the complexity of the weighted graph and the weight parameters can be simplified, so as to better optimize and analyze the weighted graph, and ensure that the weighted graph can accurately reflect the layout and characteristics of the actual power distribution system.

[0048] It should be noted that the normalized weight is within the range of [0,1].

[0049] It should be noted that a weighted graph is constructed based on each vertex, the edges connecting the vertices, and the weights of each edge, such that the vertices of the weighted graph represent each power component in the power distribution system; the edges of the vertices of the weighted graph represent the connections between each power component in the power distribution system; and the weights of the weighted graph represent power values or power values after normalization processing.

[0050] Step S120, constructing a quantum algorithm circuit according to the weighted graph.

[0051] It should be noted that a quantum algorithm circuit, that is, a circuit for operating on qubits, is composed of one or more quantum logic gates. Among them, a quantum logic gate is the basic unit for processing qubits. When a qubit passes through each quantum logic gate, it will change according to the function of the quantum logic gate it passes through. The operation of a quantum logic gate on a qubit is essentially a unitary transformation, and an important feature of a unitary transformation is reversibility, that is, each quantum logic gate is reversible. Common quantum logic gates include the H gate, X gate, Y gate, Z gate, and multi-quantum logic gates, etc.

[0052] Among them, the H gate, also called the Hadamard gate, is used to convert the state of a qubit from the ground state (|0 or |1) to a superposition state; the X gate, also called the Pauli-X gate or NOT gate, is used to perform a logical NOT operation on a qubit, that is, to flip the state of the qubit; the Z gate, also called the Pauli-Z gate, is used to flip the phase of a qubit without changing its state; the Y gate, also called the Pauli-Y gate, combines the effects of the X gate and the Z gate to perform a composite rotation operation on a qubit; multi-quantum logic gates include the controlled-NOT gate that uses a control qubit to control the flipping of another target qubit, the SWAP gate (Swap gate, interchange gate) used to exchange the states of two qubits, and the Toffoli gate (Toffoli gate) that uses two control qubits to control the flipping of a target qubit.

[0053] Through the combination of each quantum logic gate, a quantum algorithm circuit can achieve the unique advantages of quantum computing such as quantum parallelism and quantum entanglement, so as to solve problems that are difficult to handle by traditional computers.

[0054] Furthermore, constructing a quantum algorithm circuit according to a weighted graph includes: obtaining the reference Hamiltonian of the power distributed energy system according to the weighted graph; constructing a quantum algorithm circuit according to the reference Hamiltonian. In this way, by obtaining the reference Hamiltonian of the power distributed energy system according to the weighted graph and then constructing a quantum algorithm circuit according to the reference Hamiltonian, it is convenient to use this quantum algorithm circuit in a quantum system to obtain the maximum power section of the power distributed energy system, which improves the efficiency of obtaining the maximum power section compared with the traditional maximum power section algorithm.

[0055] It should be noted that the reference Hamiltonian of the power distributed energy system is the Hamiltonian corresponding to calculating the maximum power section of the power distributed energy system.

[0056] It should be noted that in a power distribution system, the maximum power cross-section can be regarded as selecting a sub-edge set C in the weighted graph G=(V, E) corresponding to the power distribution system, such that the sum of the weights of the sub-edge set C is maximized. Among them, G represents the weighted graph corresponding to the power distribution system; V represents the vertex set of the weighted graph; E represents the edge set of the weighted graph; the sub-edge set C is a subset of the edge set E.

[0057] The sub-edge set C needs to meet the following requirements: the weighted graph obtained by simplifying the weighted graph G through the sub-edge set C is a bipartite graph; the sum of the weights of each edge in the sub-edge set C is the largest.

[0058] Specifically, a new weighted graph can be obtained through the sub-edge set C This weighted graph is a bipartite graph. That is, in this weighted graph the vertices V can be partitioned according to the edge set C to obtain two non-overlapping sub-vertex sets, such that each edge of the weighted graph connects vertices in different sub-vertex sets. Therefore, by selecting the sub-edge set C, the sum of the weights of the edges in the sub-edge set C can be maximized, and thus the maximum power cross-section of the power distribution system can be obtained.

[0059] Normalizing the weights does not affect the selection of the sub-edge set C, but after normalization, the weight values are simplified, thereby simplifying the calculation. Therefore, using the weighted graph after weight normalization is beneficial to obtaining the solution efficiency of the maximum power cross-section.

[0060] To calculate the maximum power cross-section problem of the power distribution system, it is necessary to first calculate the classical cost function of this problem, map this classical cost function to the quantum system to obtain the quantum cost function, and then obtain the reference Hamiltonian.

[0061] Furthermore, obtaining the reference Hamiltonian of the power distribution energy system according to the weighted graph includes: obtaining the classical cost function for calculating the maximum power cross-section problem according to the weighted graph; mapping this classical cost function to the quantum system to obtain the quantum cost function; obtaining the reference Hamiltonian according to the quantum cost function.

[0062] It should be noted that in the classical algorithm, the vertex set V of the weighted graph G can be partitioned into two subsets, namely the first sub-vertex set V1 and the second sub-vertex set V2. The number of vertices of the weighted graph is n. Then, an n-bit string S = s 1 Λs i Λs m Λs n ∈{-1,1} n represents the sub-vertex set where each vertex of the weighted graph is located; where i represents the i-th vertex; m represents the m-th vertex; {-1,1} nis a string consisting of n numbers of -1 or 1, and the numbers in this string represent the characters at the same positions in string s 1 Λs i Λs m Λs n in s

[0063] For example: s i has a value of {-1, 1} n and represents the i-th number in it; it should be noted that if s i has a value of 1, it represents that the i-th vertex is in the first subset of vertices V1; if s i has a value of -1, it represents that the i-th vertex is in the second subset of vertices V2

[0064] In the classical algorithm, the classical cost function for calculating the maximum power cross-section is where i represents the i-th vertex; m represents the m-th vertex; E is the set of edges of the weighted graph G; <i, m> ∈ E represents that the edge connecting the i-th vertex and the m-th vertex belongs to the edge set E; w im is the weight of the edge between the i-th vertex and the m-th vertex; s i is used to indicate the subset of vertices where the i-th vertex is located; s m is used to indicate the subset of vertices where the m-th vertex is located. By solving the string S that maximizes the classical cost function f(s), the solution to the problem of the maximum power cross-section of the power distributed energy system can be obtained in the field of classical algorithms. In order to obtain the solution to the problem of the maximum power cross-section of the power distributed energy system in the quantum system, it is necessary to map this classical cost function into the quantum system to obtain the quantum cost function

[0065] Furthermore, obtaining the quantum cost function corresponding to the problem of calculating the maximum power cross-section according to this classical cost function includes: using qubits to indicate the subsets of vertices where the vertices of the weighted graph are located; obtaining the quantum cost function through this qubit and this classical cost function

[0066] It should be noted that using qubits to indicate the subsets of vertices where the vertices of the weighted graph are located means using n qubits |S> = |s 1 s 2 Ks n > to indicate the subsets of vertices where the vertices in the weighted graph are located. Among them, |S> is a quantum string composed of n qubits; |s 1 >, |s 2 >, …, |s n > are all one qubit; each qubit corresponds one-to-one with the vertices of the weighted graph. For example: |s 1 > is used to indicate the subset of vertices where the 1st vertex is located; |s 2>Used to indicate the subset of sub - vertices where the second vertex is located; |s n >Used to indicate the subset of sub - vertices where the nth vertex is located. Each qubit is in a superposition state of |0> and |1>.

[0067] Then for the ith qubit |s i >, it can be represented as |s i >=a|0> + b|1>. Where a is a complex number, representing the probability amplitude of the ith qubit |s i >being in the |0> state; b is a complex number, representing the probability amplitude of the ith qubit |s i >being in the |1> state.

[0068] Since the |0> state and the |1> state are the eigenstates of the Pauli Z operator σ z and their corresponding eigenvalues are +1 and -1 respectively.

[0069] When measuring a qubit in the computational basis, i.e., the Z - basis, the qubit will collapse to |0> with probability a 2 and collapse to |1> with probability b 2 . For the ith qubit |s i , if the qubit |s i >collapses to the |0> state, the result of this measurement is +1, which means the ith vertex is in the first subset of sub - vertices V1; if the qubit |s i >collapses to the |1> state, the result of this measurement is -1, which means the ith vertex is in the second subset of sub - vertices V2. Therefore, by measuring n qubits, an n - bit classical string S = s 1 Λs i Λs j Λs n ∈{-1, 1} n can be obtained.

[0070] Based on the above, by measuring n qubits |S> in 2 n computational basis eigenstates, an n - bit classical string S k can be obtained. Among them, in the computational basis eigenstate |S k >, |s k,i >=|0> or |1>, then where, |s k,i >is the state of the ith qubit; represents the Pauli Z operator corresponding to the ith qubit; s k,i and represent the expected value of the Pauli Z operator acting on |s k,i >.

[0071] Will Substitute into the classical cost function We can obtain Therefore, the quantum cost function is f(s k,i ) = <|S k |H F |S k >. Among them, H F is the reference Hamiltonian of the power distributed energy system. Specifically, Among them, represents the Pauli Z operator corresponding to the m-th qubit.

[0072] Furthermore, construct a quantum algorithm circuit according to the reference Hamiltonian, including: determining the initial Hamiltonian corresponding to the maximum power section; constructing a mixing layer circuit according to the initial Hamiltonian; constructing a cost layer circuit according to the reference Hamiltonian; superimposing the mixing layer circuit and the cost layer circuit multiple times to construct a variational layer circuit of the power distributed system; constructing a quantum algorithm circuit according to the preset Hadamard gate layer circuit and the variational layer circuit. In this way, by constructing a quantum algorithm circuit according to the preset Hadamard gate layer circuit and the variational layer circuit constructed according to the initial Hamiltonian and the reference Hamiltonian, it is convenient to use this quantum algorithm circuit in the quantum system to obtain the maximum power section of the power distributed energy system. Compared with the traditional maximum power section algorithm, the efficiency of obtaining the maximum power section is improved.

[0073] Furthermore, determining the initial Hamiltonian corresponding to the maximum power section includes: obtaining the initial Hamiltonian corresponding to the maximum power section by calculating Among them, H B is the initial Hamiltonian corresponding to the maximum power section, is the Pauli X operator corresponding to the m-th qubit.

[0074] It should be noted that this application approximately solves the problem of solving the maximum power section of the power distributed system through the adiabatic evolution from the maximum energy state of the initial Hamiltonian H B to the maximum energy state of the reference Hamiltonian H F . According to the quantum adiabatic evolution theorem, in an ideal situation, if a system starts from a certain definite energy state of its initial Hamiltonian and the evolution speed of this Hamiltonian is slow enough, then the system will remain in the definite energy state of its Hamiltonian. For simplicity, set the initial Hamiltonian in the form of a hybrid Hamiltonian, then the determined initial Hamiltonian is The quantum state corresponding to the maximum energy of the initial Hamiltonian is a uniform superposition state Among them, n represents the number of qubits; represents the uniform superposition of n qubits from the all-0 state to the all-1 state.

[0075] Furthermore, construct a hybrid layer circuit based on the initial Hamiltonian, including: determining the quantum logic gates required for constructing the hybrid layer circuit according to the operators corresponding to the initial Hamiltonian. Construct the hybrid layer circuit based on the quantum logic gates.

[0076] Specifically, for the hybrid layer circuit, its goal is to achieve where β is a hybrid layer parameter, which is a parameter to be obtained subsequently. The initial Hamiltonian H B uses the Pauli X operator. Therefore, the quantum logic gate required for the hybrid circuit layer is the rotation X gate. Then where RX() represents the rotation X gate. Specifically,

[0077] In some embodiments, combine Figure 2 , Figure 2 is a schematic diagram of the hybrid layer circuit. As Figure 2 shown, the hybrid layer circuit 205 requires 4 rotation X gates, namely the first rotation X gate 201, the second rotation X gate 202, the third rotation X gate 203, and the fourth rotation X gate 204. Each rotation X gate is placed in series.

[0078] Furthermore, construct a cost layer circuit based on the reference Hamiltonian, including: determining the quantum logic gates required for constructing the cost layer circuit according to the operators corresponding to the reference Hamiltonian. Construct the hybrid layer circuit based on the quantum logic gates.

[0079] Specifically, for the cost layer circuit, its goal is to achieve where γ is a cost layer parameter, which is a parameter to be obtained subsequently. The reference Hamiltonian H F uses the Pauli Z operator. Therefore, the quantum logic gate required for the cost layer is the rotation Z gate.

[0080] Specifically, through achieve where RZ() represents the rotation X gate; RZZ() represents the RZZ gate.

[0081] It should be noted that the RZZ gate, that is, a two-qubit quantum logic gate. The RZZ gate is used to introduce a phase between two qubits, and the matrix representation of the RZZ gate is ZZ represents the tensor product operation on two qubits; φ is the phase angle of the RZZ gate.

[0082] In some embodiments, combine Figure 3 , Figure 3 is a schematic diagram of the cost layer circuit. As Figure 3As shown, the cost layer circuit 305 requires 4 rotation Z gates, namely the first rotation Z gate 301, the second rotation Z gate 302, the third rotation Z gate 303, and the fourth rotation Z gate 304. The first rotation Z gate 301 is respectively connected to the second rotation Z gate 302, the third rotation Z gate 303, and the fourth rotation Z gate 304; the second rotation Z gate 302 is also respectively connected to the third rotation Z gate 303 and the fourth rotation Z gate 304; the third rotation Z gate 303 is also connected to the fourth rotation Z gate 304.

[0083] It should be noted that the hybrid layer circuit and the cost layer circuit are stacked multiple times to construct the variable layer circuit of the power distribution system, that is, the hybrid layer circuit is stacked first and the cost layer circuit is stacked later in sequence to construct the variable layer circuit of the power distribution system.

[0084] Specifically, in combination with Figure 4 , Figure 4 is a schematic diagram of the variable layer circuit. As Figure 4 shown, the number of times of stacking the hybrid layer circuit and the cost layer circuit is p. The variable layer circuit 403 includes the first hybrid layer circuit 401-1, the first cost layer circuit 402-1, the second hybrid layer circuit 401-2, the second cost layer circuit 402-2,..., the p-th hybrid layer circuit 401-p, and the second cost layer circuit 402-p. The hybrid layer circuit and the cost layer circuit are alternately connected. For example: the first hybrid layer circuit 401-1 is connected to the first cost layer circuit 402-1, the first cost layer circuit 402-1 is connected to the second hybrid layer circuit 401-2, the second hybrid layer circuit 401-2 is connected to the second cost layer circuit 402-2,..., the p-th hybrid layer circuit 401-p is connected to the second cost layer circuit 402-p.

[0085] It should be noted that when the hybrid layer circuit is connected to the cost layer circuit, each rotation X gate in the hybrid layer circuit is respectively connected to each rotation Z gate in the cost layer circuit in one-to-one correspondence.

[0086] Furthermore, a quantum algorithm circuit is constructed according to the preset Hadamard gate layer circuit and the variable layer circuit, that is, the preset Hadamard gate layer circuit is connected to the variable layer circuit to obtain the quantum algorithm circuit.

[0087] In some embodiments, in combination with Figure 5 , Figure 5 is a schematic diagram of the preset Hadamard gate layer circuit. As Figure 5As shown, the Hadamard gate layer circuit 505 requires 4 Hadamard gates, namely the first Hadamard gate 501, the second Hadamard gate 502, the third Hadamard gate 503, and the fourth Hadamard gate 504. Each Hadamard gate is placed in series. The preset Hadamard gate layer circuit is used to prepare the quantum corresponding to the maximum energy of the Hamiltonian of the hybrid operator, that is, the uniform superposition state.

[0088] In some embodiments, in combination with Figure 6 , Figure 6 is a schematic diagram of a quantum algorithm circuit. As Figure 6 shown, the quantum algorithm circuit 601 includes a hybrid layer circuit, a variational layer circuit, and a measurement circuit.

[0089] The hybrid layer circuit includes 4 Hadamard gates, namely the first Hadamard gate 501, the second Hadamard gate 502, the third Hadamard gate 503, and the fourth Hadamard gate 504. Each Hadamard gate is placed in series.

[0090] The variational layer circuit includes the first hybrid layer circuit 401-1, the first cost layer circuit 402-1,..., the p-th hybrid layer circuit 401-p, and the p-th cost layer circuit 402-p. The hybrid layer circuit and the cost layer circuit are alternately connected. For example: the first hybrid layer circuit 401-1 is connected to the first cost layer circuit 402-1,..., the p-th hybrid layer circuit 401-p is connected to the p-th cost layer circuit 402-p.

[0091] Each Hadamard gate is respectively connected in one-to-one correspondence with each rotation X gate in the first hybrid layer circuit 401-1.

[0092] When the hybrid layer circuit is connected to the cost layer circuit, each rotation X gate in the hybrid layer circuit is respectively connected in one-to-one correspondence with each rotation Z gate in the cost layer circuit.

[0093] The measurement circuit includes 4 measurement devices, including the first measurement device 602-1, the second measurement device 602-2, the third measurement device 602-3, and the fourth measurement device 602-4. The first measurement device 602-1, the second measurement device 602-2, the third measurement device 602-3, and the fourth measurement device 602-4 are respectively connected to the p-th cost layer circuit 402-p for measuring the output result of the p-th cost layer circuit 402-p.

[0094] Step S130, obtain the target parameter vector corresponding to the quantum algorithm circuit, and substitute the target parameter vector into the quantum algorithm circuit to obtain the output result of the quantum algorithm circuit.

[0095] It should be noted that in the quantum algorithm circuit, the mixing layer parameter in the mixing layer circuit is β, and the cost layer parameter in the cost layer circuit is γ. Then, for the variational layer circuit obtained by performing p - times of superposition through the mixing layer circuit and the cost layer circuit, it contains a total of 2p parameters, that is, p mixing layer parameters and p cost layer parameters. The target parameter vector corresponding to the quantum algorithm circuit is the vector composed of the values of the 2p parameters.

[0096] Furthermore, obtaining the target parameter vector corresponding to the quantum algorithm circuit includes: obtaining an initial parameter vector by using a preset random initialization parameter strategy algorithm or a preset quasi - parameter strategy algorithm; using the method of gradient descent to iteratively optimize the initial parameter vector to obtain the target parameter vector. In this way, by obtaining the initial parameter vector through a preset random initialization parameter strategy algorithm or a preset quasi - parameter strategy algorithm, and then using the method of gradient descent to iteratively optimize the initial parameter vector to obtain the target parameter vector, the iteration of the parameter vector is realized, so as to reduce the phenomenon of falling into local optimum during the circuit training process of substituting the parameter vector into the quantum algorithm circuit.

[0097] In some embodiments, obtaining the initial parameter vector by using a preset random initialization parameter strategy algorithm includes: determining the parameter range of each parameter; randomly selecting a group of alternative initial parameter vectors with a preset length within the parameter range for multiple times; substituting the parameter values of the selected alternative initial parameter vectors into the quantum algorithm circuit to obtain the output results corresponding to each alternative initial parameter vector; using a preset cost function to obtain the cost values corresponding to each output result; determining the alternative initial parameter vector with the minimum cost value as the initial parameter vector. In this way, by randomly selecting alternative initial parameter vectors for multiple times, and by substituting the alternative initial parameter vectors into the quantum algorithm circuit to obtain the cost values corresponding to their output results, and then determining the alternative initial parameter vector with the minimum cost value as the initial parameter vector, the robustness and global search ability of the quantum algorithm circuit are increased; at the same time, by substituting different alternative initial parameter vectors into the quantum algorithm circuit for multiple times, the probability of the quantum algorithm circuit falling into a local optimal solution is reduced.

[0098] It should be noted that the parameter range of each parameter is [0, 2π). The preset length is 2p. The number of times of randomly selecting alternative initial parameter vectors is the preset number of times.

[0099] Randomly select a set of alternative initial parameter vectors with a preset length within the parameter range multiple times, that is, randomly select a set of alternative initial parameter vectors with a length of 2p within the range of the uniformly distributed interval [0, 2π) according to the preset number of times. Specifically, in each random selection process, for each hybrid layer circuit parameter, it is randomly selected from the range of the uniformly distributed interval [0, 2π). Similarly, for each cost layer parameter, it is randomly selected from the range of the uniformly distributed interval [0, 2π). In this way, each random selection will obtain a randomly initialized alternative initial parameter vector with a length of 2p. A total of the preset number of alternative initial parameter vectors can be obtained.

[0100] In some embodiments, the initial parameter vector is obtained through a preset quasi-parameter strategy algorithm, including: obtaining the weighted graph density corresponding to the weighted graph; using the preset parameter mapping strategy database to perform a lookup operation according to the weighted graph density to obtain the initial parameter vector corresponding to the weighted graph density.

[0101] It should be noted that the preset parameter mapping strategy database stores the reference weighted graph densities corresponding to multiple preset reference power distributed energy systems and the reference parameter vectors corresponding to the reference weighted graph densities. The reference parameter vector is the parameter vector after iterative optimization of the initial parameter vector of the preset reference power distributed energy system.

[0102] It should be noted that the initial parameter vector is iteratively optimized using the gradient descent method to obtain the target parameter vector, including: dividing the parameter vector obtained in the (x - 1)-th time into a hybrid layer parameter vector and a cost layer parameter vector; obtaining the first gradient vector corresponding to the hybrid layer parameter vector and the second gradient vector corresponding to the cost layer parameter vector; optimizing the hybrid layer parameter vector according to the first gradient vector to obtain a new hybrid layer parameter vector; optimizing the cost layer parameter vector according to the second gradient vector to obtain a new cost layer parameter vector; combining the new hybrid layer parameter vector and the new cost layer parameter vector into the parameter vector obtained in the x-th time; in the case where x is greater than or equal to the preset number of iterations, determining the parameter vector obtained in the x-th time as the target parameter vector. x is a positive integer greater than 1.

[0103] The initial parameter vector is the parameter vector obtained for the first time.

[0104] It should be noted that the hybrid layer parameter vector is a vector composed of p hybrid layer parameters β; each hybrid layer parameter corresponds to a first gradient value, then the first gradient vector corresponding to the hybrid layer parameter vector is a vector composed of the first gradient values corresponding to the p hybrid layer parameters β.

[0105] The cost layer parameter vector is a vector composed of p cost layer parameters γ. Each cost layer parameter corresponds to a second gradient value, so the second gradient vector corresponding to the cost layer parameter vector is a vector composed of the second gradient values corresponding to p mixing layer parameters β.

[0106] It should be noted that the first gradient value is obtained through the following method: by calculating to obtain the first gradient value corresponding to the i-th mixing layer parameter; where is the first gradient value corresponding to the i-th mixing layer parameter; ε is a preset first variation; f() represents a classical cost function.

[0107] The second gradient value is obtained through the following method: by calculating to obtain the second gradient value corresponding to the i-th cost layer parameter; where is the second gradient value corresponding to the i-th cost layer parameter; δ is a preset second variation.

[0108] Furthermore, the mixing layer parameter vector is optimized according to the first gradient vector to obtain a new mixing layer parameter vector, including: by calculating to obtain the new mixing layer parameter vector. Where β new is the new mixing layer parameter vector; β old is the mixing layer parameter vector before optimization; η is the first learning rate, used to control the step size of the update of the mixing layer parameters; is the first gradient vector.

[0109] Furthermore, the cost layer parameter vector is optimized according to the second gradient vector to obtain a new cost layer parameter vector, including: by calculating to obtain the new cost layer parameter vector. Where γ new is the new cost layer parameter vector; γ old is the cost layer parameter vector before optimization; ζ is the second learning rate, used to control the step size of the update of the cost layer parameters; is the first gradient vector.

[0110] It should be noted that the parameter vector obtained in the (x - 1)-th time is brought into the quantum algorithm circuit, and an output result can be obtained. Through this output result, the probabilities corresponding to different output values in the output result can be obtained.

[0111] By calculating to obtain the expectation corresponding to the parameter vector obtained in the previous time; where S′ is the parameter vector obtained in the previous time; E[f(S′)] is the expectation corresponding to the parameter vector obtained in the previous time; P(S′) is the probabilities of different output values in the output result corresponding to the parameter vector obtained in the previous time.

[0112] The parameter vector obtained for the x-th time is brought into the quantum algorithm circuit, and a new output result can be obtained. From this output result, the probabilities corresponding to different output values in the output result can be obtained.

[0113] By calculating the expectation corresponding to the newly obtained parameter vector is obtained; where S″ is the newly obtained parameter vector; E[f(S″)] is the expectation corresponding to the newly obtained parameter vector; P(S″) is the probability of different output values in the output result corresponding to the newly obtained parameter vector.

[0114] By comparing E[f(S′)] and E[f(S″)], the result of E[f(S″)] > E[f(S′)] can be obtained. It can be seen that by optimizing the parameter vector obtained in the previous time using the gradient descent method to obtain a new parameter vector, the expectation corresponding to the new parameter vector can be made greater than the expectation corresponding to the parameter vector obtained in the previous time, so that the target parameter vector is the parameter vector with the maximum expectation.

[0115] In this way, by using the finite difference method, changes are made to each parameter, and then the change amount of the classical cost function is calculated to determine the gradient, and then the original parameters are optimized based on this gradient, thereby realizing the optimization of the entire parameter vector.

[0116] Furthermore, the target parameter vector is brought into the quantum algorithm circuit to obtain the output result of the quantum algorithm circuit, including: updating the parameters in the quantum algorithm circuit using the target parameter vector; using the quantum bits in the all-zero state as the input of the quantum algorithm circuit, and then measuring the quantum state of the quantum bits multiple times at the end of the quantum algorithm circuit to obtain the output result. In this way, by updating the parameters in the quantum algorithm circuit using the target parameter vector, then using the quantum bits in the all-zero state as the input of the quantum algorithm circuit, and then measuring the quantum state of the quantum bits multiple times at the end of the quantum algorithm circuit to obtain the output result, it is convenient to calculate the maximum power cross-section of the power distributed energy system based on this output result, and the efficiency of obtaining the maximum power cross-section is improved compared with the traditional maximum power cross-section algorithm.

[0117] It should be noted that updating the parameters in the quantum algorithm circuit using the target parameter vector means replacing the values of the corresponding parameters in the quantum algorithm circuit with the parameter values in the target parameter vector.

[0118] The output result characterizes the quantum state of the quantum bits output by the quantum algorithm circuit.

[0119] Specifically, by inputting n qubits in the all-zero state into the quantum algorithm circuit, various gates in the quantum algorithm circuit can be used to perform corresponding operations on the qubits, including: Hadamard gate layer, p-layer repeated mixing layer, and cost layer, and then measuring the output quantum state in the z basis. Measuring the quantum state of a qubit is a destructive operation that collapses the qubit from the quantum state to a specific state of the measurement basis. In some embodiments, if the qubit collapses to the |0> state, the result of the measurement is +1; if the qubit collapses to the |1> state, the result of the measurement is -1.

[0120] By measuring the output quantum state in the z basis, the output result in the z basis is an n-bit classical string, which includes the output results of each qubit.

[0121] It should be noted that the output result is an n-bit classical string, and the value of the i-th bit in the classical string represents the sub-vertex set where the i-th vertex in the weighted graph is located.

[0122] Specifically, if the qubit collapses to the |0> state, the result of the measurement is +1, which means that the vertex corresponding to this qubit is in a sub-vertex set V1; if the qubit collapses to the |1> state, the result of the measurement is -1, which means that the vertex corresponding to this qubit is in another sub-vertex set V2.

[0123] Step S140, obtaining the maximum power cross-section of the power distributed energy system based on the output result.

[0124] In this embodiment, by constructing a weighted graph corresponding to the power distributed energy system, constructing a quantum algorithm circuit according to the weighted graph, then obtaining the target parameter vector corresponding to the quantum algorithm circuit, and substituting the target parameter vector into the quantum algorithm circuit to obtain the output result of the quantum algorithm circuit, and then obtaining the maximum power cross-section of the power distributed energy system based on the output result. In this way, by constructing a quantum algorithm circuit through the weighted graph corresponding to the power distributed energy system, then obtaining the target parameter vector of the quantum algorithm circuit, and obtaining the maximum power cross-section of the power distributed energy system based on the output result of substituting the target parameter vector into the quantum algorithm circuit, the calculation of the maximum power cross-section within the quantum system is realized. Compared with the traditional method for obtaining the maximum power cross-section, the efficiency of calculating the maximum power cross-section of a large-scale and complex power system is relatively low. This application can calculate the maximum power cross-section within the quantum system, can meet the calculation requirements of a large-scale and complex power system, and improves the efficiency of obtaining the maximum power cross-section.

[0125] Further, obtaining the maximum power cross-section of the power distributed energy system based on the output result includes: determining the objective function corresponding to the maximum power cross-section; determining the maximum power cross-section of the power distributed energy system based on the output result corresponding to the target parameter vector and the objective function. In this way, the maximum power cross-section of the power distributed energy system can be determined through the output result corresponding to the target parameter vector and the objective function, and the maximum power cross-section of the power distributed energy system can be determined.

[0126] It should be noted that the target parameter vector of the quantum algorithm circuit is determined among the parameter vectors obtained multiple times, that is, the parameter vector obtained last time is determined as the target parameter vector of the quantum algorithm circuit.

[0127] After obtaining the optimal parameters, the weighted graph density of the power distributed energy system can be used as the reference weighted graph density, and the target parameter vector of the quantum algorithm circuit can be stored in the preset parameter mapping strategy database as the target parameter vector corresponding to the reference weighted graph density to update the parameter mapping strategy database. In this way, by continuously updating and maintaining the parameter mapping strategy database, the data in the parameter mapping strategy database becomes more and more, improving the coverage rate of obtaining the maximum power cross-section of different power distributed energy systems, and further making the initial parameter vector obtained according to the power distributed energy system more in line with the power distributed energy system, thus providing the accuracy of obtaining the maximum power cross-section.

[0128] The output result corresponding to the target parameter vector, that is, the parameter vector is brought into the quantum algorithm circuit, and the output result of the quantum algorithm circuit is obtained.

[0129] Determining the objective function corresponding to the maximum power cross-section, that is, determining the classical cost function as the objective function corresponding to the maximum power cross-section.

[0130] Further, determining the maximum power cross-section of the power distributed energy system based on the output result corresponding to the target parameter vector includes: partitioning the vertices of the weighted graph based on the output result to obtain two non-overlapping sub-vertex sets; obtaining the set of cutting edges that cut the two sub-vertex sets; determining the connection line corresponding to the set of cutting edges as the maximum power cross-section.

[0131] In some embodiments, since each numerical value in the output result represents a sub-vertex set where a vertex is located. Therefore, through the output result, it is possible to determine the sub-vertex set where the vertex corresponding to each numerical value is located, and thus the partitioning of the vertices in the weighted graph is realized.

[0132] It should be noted that the set of cutting edges may include only one edge, and the connection line corresponding to the set of cutting edges is the connection line corresponding to the edge.

[0133] The set of cutting edges may only include multiple edges, where each edge corresponds to a connection line. After merging the connection lines corresponding to the edges of the connection line corresponding to the set of cutting edges, the obtained connection line.

[0134] For example: the set of cutting edges is {A, B}; among them, the connection line corresponding to edge A is E; the connection line corresponding to edge B is F. The connection line after merging connection line E and connection line F is G. Then the connection line corresponding to the set of cutting edges is connection line G.

[0135] See Figure 7 , Figure 7 is a flowchart of a method for obtaining the maximum power cross-section shown in an exemplary embodiment of the present application.

[0136] As Figure 7 shown, in an exemplary embodiment, the method for obtaining the maximum power cross-section at least includes steps S701 to S708, which are introduced in detail as follows:

[0137] S701, construct a weighted graph corresponding to the power distributed energy system.

[0138] S702, obtain the reference Hamiltonian of the power distributed energy system according to the weighted graph.

[0139] S703, construct a quantum algorithm circuit according to the reference Hamiltonian.

[0140] S704, obtain the initial parameter vector by using a preset random initialization parameter strategy algorithm or a preset quasi-parameter strategy algorithm.

[0141] S705, iteratively optimize the initial parameter vector by using the gradient descent method to obtain the target parameter vector.

[0142] S706, update the parameters in the quantum algorithm circuit by using the target parameter vector.

[0143] S707, use the quantum bits in the all-zero state as the input of the quantum algorithm circuit, and then perform multiple measurements on the quantum state of the quantum bits at the end of the quantum algorithm circuit to obtain the output result of the quantum algorithm circuit.

[0144] S708, obtain the maximum power cross-section of the power distributed energy system based on the output result.

[0145] In this embodiment, by constructing a weighted graph corresponding to the power distributed energy system, the reference Hamiltonian of the power distributed energy system is obtained according to the weighted graph, so as to construct a quantum algorithm circuit. Then, an initial parameter vector is obtained by using a preset random initialization parameter strategy algorithm or a preset quasi-parameter strategy algorithm, and it is iteratively optimized to obtain a target parameter vector. Then, the parameters in the quantum algorithm circuit are updated by using the target parameter vector. The qubits in the all-zero state are used as the input of the quantum algorithm circuit, and then the quantum states of the qubits are measured multiple times at the end of the quantum algorithm circuit to obtain the output result of the quantum algorithm circuit. Based on the output result, the maximum power cross-section of the power distributed energy system is obtained. In this way, by constructing a quantum algorithm circuit through the weighted graph corresponding to the power distributed energy system, then obtaining the target parameter vector of the quantum algorithm circuit, and based on the target parameter vector, the output result of the quantum algorithm circuit is used to obtain the maximum power cross-section of the power distributed energy system, realizing the calculation of the maximum power cross-section in the quantum system. Compared with the traditional method for obtaining the maximum power cross-section, the efficiency of calculating the maximum power cross-section of a large-scale and complex power system is relatively low. This application can calculate the maximum power cross-section in the quantum system, can meet the calculation requirements of a large-scale and complex power system, and improves the efficiency of obtaining the maximum power cross-section.

[0146] In some embodiments, please refer to Figure 8 , Figure 8 which is a block diagram of a device for obtaining the maximum power cross-section shown in an exemplary embodiment of the present application.

[0147] As Figure 8 shown, the exemplary device for obtaining the maximum power cross-section includes:

[0148] A weighted graph construction module 801, configured to construct a weighted graph corresponding to the power distributed energy system;

[0149] A circuit construction module 802, configured to construct a quantum algorithm circuit according to the weighted graph;

[0150] A parameter substitution module 803, configured to obtain the target parameter vector corresponding to the quantum algorithm circuit, and substitute the target parameter vector into the quantum algorithm circuit to obtain the output result of the quantum algorithm circuit;

[0151] A determination module 804, configured to determine the maximum power cross-section of the power distributed energy system based on the output result.

[0152] In an exemplary embodiment, the weighted graph construction module 801 includes:

[0153] A vertex determination sub-module, configured to respectively determine each power component in the power distributed system as each vertex edge of the weighted graph;

[0154] An edge determination sub-module, configured to determine the edges connecting each vertex based on the connection lines between each power component in the power distribution system;

[0155] A power acquisition sub-module, configured to acquire the apparent power corresponding to each connection line.

[0156] A weight acquisition sub-module, configured to determine the weight of each edge corresponding to each connection line according to the apparent power.

[0157] A construction sub-module, configured to construct a weighted graph based on each vertex, the edges connecting each vertex, and the weights of each edge.

[0158] In an exemplary embodiment, the construction sub-module includes:

[0159] A reference Hamiltonian acquisition sub-module, configured to acquire the reference Hamiltonian of the power distribution energy system according to the weighted graph;

[0160] A circuit construction sub-module, configured to construct a quantum algorithm circuit according to the reference Hamiltonian.

[0161] In an exemplary embodiment, the reference Hamiltonian acquisition sub-module includes:

[0162] An initial Hamiltonian acquisition sub-module, configured to determine the initial Hamiltonian corresponding to the maximum power section;

[0163] A hybrid layer circuit construction sub-module, configured to construct a hybrid layer circuit according to the initial Hamiltonian;

[0164] A cost layer circuit construction sub-module, configured to construct a cost layer circuit according to the reference Hamiltonian;

[0165] A variational layer circuit construction sub-module, configured to stack the hybrid layer circuit and the cost layer circuit multiple times to construct the variational layer circuit of the power distribution system;

[0166] A quantum algorithm circuit construction sub-module, configured to construct a quantum algorithm circuit according to the preset Hadamard gate layer circuit and the variational layer circuit.

[0167] In an exemplary embodiment, the parameter substitution module 803 includes:

[0168] A parameter acquisition sub-module, configured to acquire an initial parameter vector by using a preset random initialization parameter strategy algorithm or a preset quasi-parameter strategy algorithm;

[0169] A parameter optimization sub-module, configured to iteratively optimize the initial parameter vector by using the gradient descent method to obtain a target parameter vector.

[0170] In an exemplary embodiment, the parameter substitution module 803 includes:

[0171] An update sub-module, configured to update the parameters in the quantum algorithm circuit by using the target parameter vector;

[0172] A measurement sub-module, configured to use qubits in the all-zero state as the input of the quantum algorithm circuit, and then perform multiple measurements on the quantum state of the qubits at the end of the quantum algorithm circuit to obtain an output result.

[0173] In an exemplary embodiment, the determination module includes:

[0174] A target function determination sub-module, configured to determine the target function corresponding to the maximum power cross-section;

[0175] A maximum power cross-section determination sub-module, configured to determine the maximum power cross-section of the power distributed energy system based on the output result corresponding to the target parameter vector and the target function.

[0176] It should be noted that the device for obtaining the maximum power cross-section provided in the above embodiments belongs to the same concept as the method for obtaining the maximum power cross-section provided in the above embodiments. The specific manners in which each module and unit perform operations have been described in detail in the method embodiments and will not be elaborated here. In practical applications, the device for obtaining the maximum power cross-section provided in the above embodiments may, according to needs, allocate the above functions to different functional modules, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above. This is not limited here either.

[0177] An embodiment of the present application further provides an electronic device, including: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device implements the method for obtaining the maximum power cross-section provided in each of the above embodiments.

[0178] Figure 9 The structural schematic diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application is shown. It should be noted that Figure 9 The computer system 900 of the electronic device shown is only an example and should not bring any limitation to the functions and usage scope of the embodiments of the present application.

[0179] Such as Figure 9As shown, computer system 900 includes a Central Processing Unit (CPU) 901, which can perform various appropriate actions and processes according to programs stored in a Read-Only Memory (ROM) 902 or programs loaded from a storage section 908 into a Random Access Memory (RAM) 903, such as executing the methods described in the above embodiments. In the RAM 903, various programs and data required for system operations are also stored. The CPU 901, ROM 902, and RAM 903 are connected to each other via a bus 904. An Input / Output (I / O) interface 905 is also connected to the bus 904.

[0180] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including, for example, a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc. and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed so that a computer program read therefrom can be installed into the storage section 908 as needed.

[0181] Specifically, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from the removable medium 911. When the computer program is executed by a Central Processing Unit (CPU) 901, various functions defined in the system of the present application are executed.

[0182] It should be noted that the computer-readable medium shown in the embodiments of the present application may be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable computer program. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted by any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0183] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. Among them, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.

[0184] The units involved in the embodiments described in this application can be implemented in software or in hardware, and the described units can also be provided in a processor. Among them, the names of these units do not constitute a limitation to the unit itself in some cases.

[0185] Another aspect of this application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the method for obtaining the maximum power cross-section as described above. The computer-readable storage medium can be included in the electronic device described in the above embodiments, or can exist alone without being assembled into the electronic device.

[0186] Another aspect of this application also provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method for obtaining the maximum power cross-section provided in the above various embodiments.

[0187] The above content is only a preferred exemplary embodiment of this application and is not used to limit the implementation of this application. Those of ordinary skill in the art can easily make corresponding adaptations or modifications according to the main concept and spirit of this application. Therefore, the protection scope of this application should be subject to the protection scope required by the claims.

Claims

1. A method for obtaining a maximum power cross section, characterized in that: include: Construct a weighted graph corresponding to the electric distributed energy system; Constructing a quantum algorithm circuit according to the weighted graph; Obtaining a target parameter vector corresponding to the quantum algorithm circuit, and bringing the target parameter vector into the quantum algorithm circuit to obtain an output result of the quantum algorithm circuit; The maximum power cross section of the electric distributed energy system is obtained based on the output result.

2. The method according to claim 1, characterized in that: The construction of a weighted graph corresponding to the electric power distributed energy system includes: Determine each power component in the power distribution system as each vertex of the weighted graph; Determining edges connecting the vertices based on connection lines between power components in the power distribution system; Obtain the apparent power corresponding to each connection line; Determine the weight of the edge corresponding to each of the connection lines according to the apparent power; The weighted graph is constructed based on the vertices, the edges connecting the vertices, and the weights of the edges.

3. The method according to claim 1, characterized in that The step of constructing a quantum algorithm circuit according to the weighted graph comprises: Acquiring a reference Hamiltonian of the electric distributed energy system according to the weighted graph; The quantum algorithm circuit is constructed according to the reference Hamiltonian.

4. The method according to claim 3, characterized in that The step of constructing the quantum algorithm circuit according to the reference Hamiltonian comprises: Determining an initial Hamiltonian corresponding to the maximum power cross section; constructing a mixing layer circuit according to the initial Hamiltonian; constructing a cost layer circuit according to the reference Hamiltonian; superimposing the hybrid layer line and the cost layer line multiple times to construct a variable layer line of the power distribution system; The quantum algorithm circuit is constructed according to the preset Hadamard gate layer circuit and the variation layer circuit.

5. The method according to claim 1, characterized in that The obtaining of the target parameter vector corresponding to the quantum algorithm circuit includes: Obtaining an initial parameter vector using a preset random initialization parameter strategy algorithm or a preset quasi-parameter strategy algorithm; The initial parameter vector is iteratively optimized using a gradient descent method to obtain the target parameter vector.

6. The method according to claim 1, characterized in that The step of bringing the target parameter vector into the quantum algorithm circuit to obtain an output result of the quantum algorithm circuit includes: Using the target parameter vector to update the parameters in the quantum algorithm circuit; A quantum bit in a fully zero state is used as the input of the quantum algorithm circuit, and then the quantum state of the quantum bit is measured multiple times at the end of the quantum algorithm circuit to obtain the output result.

7. The method according to claim 1, characterized in that The obtaining the maximum power cross section of the electric distributed energy system based on the output result includes: Determining an objective function corresponding to the maximum power cross section; Based on the output result corresponding to the target parameter vector and the target function, the maximum power cross section of the electric distributed energy system is determined.

8. A device for obtaining a maximum power cross section, characterized in that: include: A weighted graph construction module, configured to construct a weighted graph corresponding to the electric distributed energy system; A circuit construction module, configured to construct a quantum algorithm circuit according to the weighted graph; A parameter import module is configured to obtain a target parameter vector corresponding to the quantum algorithm circuit, and import the target parameter vector into the quantum algorithm circuit to obtain an output result of the quantum algorithm circuit; A determination module is configured to determine the maximum power cross-section of the electric distributed energy system based on the output result.

9. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the method for obtaining a maximum power cross section as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the method for obtaining a maximum power cross section according to any one of claims 1 to 7.

Citation Information

Cited By

  • Quantum approximate optimization calculation system and quantum approximate optimization calculation method

    CN122347233A