Quantum Newton-Raphson load flow calculation method and system based on CKS algorithm
Through the quantum Newton-Ravson trend calculation method based on the CKS algorithm, the problem of high-precision trend calculation in the power system is solved, the quantum line depth and noise error are reduced, the solution of high-dimensional linear equation systems is supported, and the calculation efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411229479.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-12-20
AI Technical Summary
With the improvement of the scale and complexity of power systems, traditional trend computing methods are difficult to meet the needs of high precision. The calculation complexity of the HHL algorithm is highly dependent on the calculation accuracy, making it difficult to build high-precision quantum Newton-Ravson trend computing under limited quantum hardware resources. method.
The quantum Newton-Ravson trend calculation method based on CKS algorithm is adopted to obtain linear equation systems through Newton-Ravson trend calculation, and the classical subspace method is used to map them to small-dimensional problems. The CKS algorithm is used to solve small-dimensional linear equation systems. Update the trend calculation correction equation, judge the convergence accuracy, and output the calculation result.
The depth and number of auxiliary bits of quantum lines are reduced, the errors caused by noise are solved through iterative optimization strategies, and the solution of high-dimensional linear equation systems is supported, which improves the calculation accuracy and efficiency.
Smart Images

Figure CN119167769A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power system flow calculation, and in particular to a quantum Newton-Raphson flow calculation method and system based on a CKS algorithm. Background Art
[0002] Power flow calculation is the core foundation of various power system calculations. As the scale of power systems continues to expand and the complexity increases, the amount of data that needs to be processed by power flow calculations is also increasing. The processing speed of traditional computers is limited, so it takes longer to complete the calculation task. At the same time, the accuracy of traditional power flow calculation methods is limited by factors such as hardware architecture and algorithms, and it is difficult to meet the needs of high-precision power flow calculations.
[0003] The emergence of quantum computers provides a new solution for power system optimization. Quantum computers have the advantages of high-speed computing and parallel processing, which can greatly improve the efficiency and accuracy of power flow calculations. Specifically, quantum computers can achieve faster and more accurate optimization by utilizing quantum phenomena such as quantum entanglement and quantum random walks. At present, the application of quantum computing to solve power flow problems at home and abroad is mainly based on the exploration of the HHL algorithm. For example, the Chinese patent application with publication number CN116706921A discloses a quantum Newton-Raphson power flow calculation method and system based on the HHL algorithm. It uses quantum computers and traditional computers to alternately calculate, which improves the accuracy of existing quantum power flow calculations and can also ensure better convergence times and convergence accuracy. However, the computational complexity of the HHL algorithm is highly dependent on the computational accuracy∈, which makes it difficult to meet the requirements of building a quantum Newton-Raphson power flow calculation method with high precision under the current limited quantum hardware resources. Summary of the invention
[0004] The problem to be solved by the present invention is that, as the scale of power systems continues to expand and the complexity increases, quantum computing based on the CKS algorithm is used to accelerate the power flow calculation process.
[0005] The present invention solves the above technical problems through the following technical means:
[0006] The present invention discloses a quantum Newton-Raphson power flow calculation method based on a CKS algorithm, the method comprising the following steps:
[0007] S1. Obtain the linear equations to be solved by Newton-Raphson power flow calculation;
[0008] S2, using the classical subspace method to map large linear equations to small-dimensional linear equation solving problems;
[0009] S3, solving a small-dimensional linear equation system by the CKS algorithm to obtain a solution to a large linear equation system;
[0010] S4. Based on the solution of the linear equation group described in S3, update the power flow calculation correction equation, determine the convergence accuracy, and output the calculation result.
[0011] Furthermore, the step S1 includes the following steps:
[0012] S11, input the initial model parameters for quantum power flow calculation;
[0013] S12, sorting the node data and constructing an admittance matrix;
[0014] S13. Substitute the initial value and the admittance matrix into the Newton-Raphson flow calculation equation, calculate the partial derivative through the equation, construct the Jacobian matrix A, calculate the unbalanced quantity b, and then construct the linear equation group Ax=b.
[0015] Furthermore, the step S2 is specifically to map the original linear equation system Ax=b to a small-dimensional Hy=e linear solution problem based on the GMERS subspace method.
[0016] Furthermore, the step S3 includes the following steps:
[0017] S31, using the CKS algorithm to solve the small-dimensional Hy=e linear equation;
[0018] S32. Convert the quantum data obtained in step S31 into classical data, map the optimal solution of the linear equation Hy=e in the subspace to the original dimension, and obtain the solution of the equation group Ax=b in the original dimension.
[0019] Furthermore, the step S4 is specifically as follows: updating the non-equilibrium node parameters, determining whether the preset convergence accuracy or the maximum number of iterations of the Newton method is reached, if not, returning to step S13, if yes, outputting the calculation result.
[0020] Furthermore, the CKS algorithm described in step S31 is specifically:
[0021] S311. Obtain the inverse of the coefficient matrix of the subspace small linear system by discrete approximate inversion on the Chebyshev basis; the discrete approximate inversion formula on the Chebyshev basis is:
[0022]
[0023] Or the above formula can be written in a more general form, and we get
[0024] S312, using quantum walking technology, encode the inverse of the coefficient matrix of the small linear system into the quantum circuit, define two Oracle gates, and construct each term of the Chebyshev polynomial through quantum walking technology.
[0025] S313, use unitary operator linear combination technology to encode the inverse of the coefficient matrix of the small linear system into the quantum circuit, and construct the sum form of Chebyshev polynomials through operator linear combination technology
[0026]
[0027] in
[0028] Furthermore, the discrete approximate inversion on the Chebyshev basis described in step S311 is specifically:
[0029] For the function g(x), we have when
[0030]
[0031] here is a Chebyshev polynomial of the first kind, with the following recurrence relation:
[0032]
[0033] ,in,
[0034] Furthermore, the quantum walking technology described in step S312 is specifically:
[0035] For an N-dimensional Hamiltonian A with sparsity d, when ‖A‖ max ≤1, using quantum walk to construct First, define the space of quantum walking. The dimension of the walking space is 2N, and the form is as follows:
[0036]
[0037] have Define the following two operators:
[0038]
[0039] From the above two operators, the quantum walk operator is constructed as follows
[0040]
[0041] From this, we can deduce two properties of the quantum walk operator W: Define the matrix H: =A / d, since ‖A‖ max ≤1, so ‖H‖≤1; let |λ> be the eigenvector of H, λ be the corresponding eigenvalue, the first conclusion is that the quantum walk operator has the following minimum block structure
[0042]
[0043] In particular, when λ=±1, WT|λ>=λT|λ>; the second conclusion is that for any eigenvalue λ, W n The minimum block structure is as follows
[0044]
[0045] here is a Chebyshev polynomial of the second kind of order n;
[0046] Based on the above two properties, the following important formula is derived
[0047]
[0048] Here | ⊥ > represents a direction orthogonal to T|λ>; in particular, when |λ|=1, W n T|λ>=λ n T|λ>; further we get
[0049]
[0050] Here |ψ ⊥ > represents an unnormalized vector orthogonal to T|j>, j∈[N]. The above formula shows that the Chebyshev polynomial of the matrix H is encoded into the quantum state amplitude through multiple quantum walks; considering that the operator T is a A linear mapping of , so we can always find a unitary operation for any Implement the following process
[0051] |0 m >|ψ>→T|ψ>#(15)
[0052] Record this unitary operation as pass This operation can achieve the following mapping
[0053]
[0054] where |Φ ⊥ >Satisfaction Implemented Chebyshevsky encoding.
[0055] Furthermore, the unitary operator linear combination described in step S313 is specifically:
[0056] Define LCU line, given M = ∑ i α i U i, where U i is a unitary matrix, α i >0, obviously M is often non-unitary; through the following two quantum gates V and U, the M operator is simulated,
[0057]
[0058] Here α=∑ i α i Thus constructing a new quantum gate For the new quantum gate
[0059]
[0060] Just measure the first m registers, if the result is |0 m >Then the quantum state of the remaining registers is Thus, the M operator is simulated, and its probability is (‖M|ψ>‖ / α) 2 .
[0061] The present invention also provides a system for a quantum Newton-Raphson power flow calculation method based on the CKS algorithm, characterized in that the system adopts the above algorithm during execution.
[0062] The advantages of the present invention are:
[0063] (1) The quantum Newton-Raphson power flow calculation method based on the CKS algorithm solves the high dependence of the HHL algorithm on the calculation accuracy ∈ and reduces the depth of the quantum circuit and the number of auxiliary bits.
[0064] (2) Based on iterative optimization strategy, the errors caused by noise under current hardware are solved.
[0065] (3) Based on the subspace method, the current hardware cannot support solving linear equations with higher dimensions. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 This is a flow chart of a quantum Newton-Raphson power flow calculation method based on the CKS algorithm according to an embodiment of the present invention. DETAILED DESCRIPTION
[0067] 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 combination with 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.
[0068] Example 1
[0069] like Figure 1 As shown, specifically, the embodiment provides a quantum Newton-Raphson power flow calculation method based on the CKS algorithm, comprising the following steps:
[0070] S1. Obtain the linear equations to be solved through Newton-Raphson power flow calculation.
[0071] Specifically, step S1 includes the following steps:
[0072] S11. Input the initial model parameters for quantum power flow calculation.
[0073] S12. Sort the node data and construct an admittance matrix.
[0074] S13. Substitute the initial value and the admittance matrix into the Newton-Raphson flow calculation equation, calculate the partial derivative through the equation, construct the Jacobian matrix A, calculate the unbalanced quantity b, and then construct the linear equation group Ax=b.
[0075] Furthermore, the step S13 is specifically as follows:
[0076] In polar coordinate system, voltage can be expressed as:
[0077] Among them, V i is the voltage amplitude at node i, j is the imaginary unit, θ i is the phase angle;
[0078] The calculation formula for active and reactive power is:
[0079]
[0080] Among them, P i Active power of node i, that is, the power actually consumed or generated at node i; V j is the voltage amplitude at node j; G ij It is the real part of the admittance (i.e. the sum of conductance and susceptance) between nodes i and j, representing the inverse of the resistance between the two nodes; B ij is the imaginary part of the admittance between nodes i and j, representing the inverse of the inductance between the two nodes; θ ij is the phase angle difference between nodes i and j.
[0081] The calculation formula of node imbalance is:
[0082]
[0083]
[0084] Among them, P is is the initial active power, Qis is the initial reactive power.
[0085] application and the elements of the nodal admittance matrix to calculate the elements of the Jacobian matrix, Solve the modified equation group (5) to find the voltage change of each node, that is, the correction value and
[0086]
[0087] Among them, the off-diagonal elements (i≠j)
[0088]
[0089] Diagonal elements (i=j)
[0090]
[0091] Determine whether the convergence condition is met. If not, calculate the new voltage value of each node according to formula (8), that is, the corrected voltage value of each node, set k=k+1, and perform the next round of iteration according to formula (5).
[0092]
[0093] If converged, the reactive injection power of each PV node is calculated to balance the node power and line power.
[0094] S2. Use the classical subspace method to map large systems of linear equations to small-dimensional linear equation solving problems.
[0095] Furthermore, the step S2 is specifically as follows:
[0096] Based on the GMERS subspace method, the original linear equation system Ax=b is mapped to a small-dimensional Hy=e linear solution problem.
[0097] Furthermore, the GMERS subspace-based method is specifically as follows:
[0098] Based on the Krylov subspace method, consider the following linear equations
[0099]
[0100] in is the required solution. Currently, the large-scale sparse linear equation system Ax = b is solved.
[0101] The preferred method for (1) is the Krylov subspace method. The basic idea is to use a subspace with a smaller dimension. Therefore, this type of method can also be regarded as a projection method, that is, finding the projection of the analytical solution in the subspace, which can be an orthogonal projection or an oblique projection.
[0102] set up yes A subspace of , with dimension Need to Find a "best" approximation to the exact solution in . The dimension of is m. In order to uniquely determine this approximate solution, m constraints need to be set. In general, the residual is required to satisfy m orthogonality conditions:
[0103]
[0104] in is the approximate solution we are looking for, is another m-dimensional subspace, also called constraint space. This is the Petrov-Garlerkin condition commonly used in numerical calculations. Correspondingly, Often called the search space.
[0105] So a projection method can be described as:
[0106] Search satisfy
[0107] If an initial approximation is given In order to make full use of the relevant information of this initial value, we change it to affine space Find the best approximation to the exact solution. At this time, the method can be described as:
[0108] Search satisfy
[0109] In fact, if Written in the following form: in Then search satisfy that is:
[0110] Search satisfy
[0111] where r 0 = b-Ax (0) is the initial residual. This is similar to finding satisfy The format is the same.
[0112] satisfy Let {v1,v2,…,vm} and {w1,w2,…,wm} be and A set of bases. Let V = [v 1 ,v 2 ,…,v m ],W=[w 1 ,w 2 ,…,w m ].because So there is a vector Make
[0113]
[0114] satisfy It can be seen that:
[0115] r 0 -AVy⊥w i ,i=1,2,…,m
[0116] Right now
[0117] W T AVy=W T r 0
[0118] If W T AV is non-singular, then we can solve y = (W T AV) -1 W T r 0 Therefore, the approximate solution It can be expressed as
[0119]
[0120] In actual calculation, the matrix W T The AV can usually be formed directly without additional calculations.
[0121] From the above derivation process, we can see that the approximate solution The only condition for existence is that the matrix W T AV is not exotic.
[0122] Furthermore, the generalized minimum residual method (GMRES) is used to solve the linear problem Ax = b, where A is a non-singular full-rank n-dimensional matrix. Given an initial solution x0, there is an initial residual r 0 = b-Ax 0 An important definition is as follows
[0123]
[0124] is the matrix A and the initial residual r 0 The m-order Krylov subspace of .
[0125] GMRES starts directly from the condition of minimum r-modulus length, and its optimal criterion can be described as
[0126] Search Solution
[0127] For any vector Existence vector So that x∈x (0) +V m y m ,have
[0128]
[0129] Since V m+1 The column vectors of are orthogonal, so
[0130]
[0131] Therefore, in the GMRES method, the problem is transformed into a least squares problem. When m is not very large, QR decomposition can be used to solve the least squares problem.
[0132]
[0133] H m+1,m QR decomposition, where Q m+1 is an orthogonal matrix, R m+1,m is an upper triangle, so
[0134]
[0135] where q 1 It's Q m+1 The first column, R m For R m+1,m The first m rows of y. m It can be obtained by solving the following upper triangular equations
[0136] βq 1 (1:m)=R m y m
[0137] where q 1 (1:m) represents q 1 A vector consisting of the first m elements of a vector.
[0138] Therefore, the solution space of the GMRES method is The solution constraint space is Its minimum optimal criterion can be described as
[0139] Search Make
[0140] The following is the pseudo code for this method:
[0141]
[0142]
[0143] Without considering rounding errors, when the GMRES method iterates to n steps, the residual is definitely 0, so the method must converge. However, for large-scale linear equations, it is impossible to iterate n steps, because the amount of computation and storage for each iteration of GMRES will increase with the increase of the number of iterations. Therefore, when the number of iterations is large, the computation time and storage will increase greatly, which makes the method lose its competitiveness. Therefore, it is hoped that the number of iterations can be controlled within an acceptable range.
[0144] The current approach to achieve this goal is to adopt an iterative strategy, that is, given a maximum number of iterations m (usually much smaller than n, such as 20, 50, etc.), if GMRES does not converge after iterating to m steps, then calculate the approximate solution Then use it as the new initial value of the iteration, that is, let x (0) =x (m) , re-iterate the GMRES method, and the process can be repeated until a satisfactory approximate solution is found.
[0145]
[0146] In order to achieve high-precision solutions, the algorithm uses the GMRES iterative strategy. The specific iterative process is as follows:
[0147] 1. Confirm that the linear equations to be solved are the subspace linear equations Hy=βe
[0148] 2. i = 0, give any initial solution y i
[0149] 3. Calculate the residual r i =b-Hy i , if the 2-norm of the residual is less than the given convergence criterion ‖r i ‖ 2 ≤∈, then x i It is the solution that meets the standard and is directly output; if ‖r i ‖ 2>∈, then return to step S2;
[0150] 4. Establish the residual equation system Hz = r i , using quantum linear algorithm to obtain the noisy quantum state |z> on a quantum computer. Note that the quantum linear algorithm here is an arbitrary quantum linear algorithm;
[0151] 5. Use the exclusive quantum state to classical data module to convert the noisy quantum state |z> into classical data z, which is the quantum computing solution of the residual equation;
[0152] 6. Update y i+1 =y i +z, return to step S13.
[0153] Obviously, as long as ‖r i ‖ is strictly non-increasing, then the above algorithm can definitely achieve high-precision solution of linear equations.
[0154] S3. Solve the small-dimensional linear equations through the CKS algorithm to obtain the solution of the large linear equations.
[0155] Furthermore, the step S3 includes the following steps:
[0156] S31. Use the CKS algorithm to solve the small-dimensional Hy=e linear equation.
[0157] Furthermore, the step S31 is specifically as follows:
[0158] S311. Obtain the inverse of the coefficient matrix of the subspace small linear system by discrete approximate inversion on the Chebyshev basis; the discrete approximate inversion formula on the Chebyshev basis is:
[0159]
[0160] Or the above formula can be written in a more general form, and we get
[0161] Furthermore, the discrete approximate inversion on the Chebyshev basis is specifically:
[0162] For the function g(x), we have when
[0163]
[0164] here b=κ 2 log(κ / ∈), is a Chebyshev polynomial of the first kind, which is as follows
[0165] Recursive relationship:
[0166]
[0167] ,in,
[0168] S312, using quantum walking technology, encode the inverse of the coefficient matrix of the small linear system into the quantum circuit, define two Oracle gates, and construct each term of the Chebyshev polynomial through quantum walking technology.
[0169] Furthermore, the quantum walking technology is specifically:
[0170] For an N-dimensional Hamiltonian A with sparsity d, when ‖A‖ max ≤1, using quantum walk to construct First, define the space of quantum walking. The dimension of the walking space is 2N, and the form is as follows:
[0171]
[0172] have Define the following two operators:
[0173]
[0174] From the above two operators, we can construct the quantum walk operator as follows
[0175]
[0176] From this, we can deduce two properties of the quantum walk operator W: Define the matrix H: =A / d, since ‖A‖ max ≤1, so ‖H‖≤1; let |λ> be the eigenvector of H, λ be the corresponding eigenvalue, the first conclusion is that the quantum walk operator has the following minimum block structure
[0177]
[0178] In particular, when λ=±1, WT|λ>=λT|λ>. The second conclusion is that for any eigenvalue λ, W n The minimum block structure is as follows
[0179]
[0180] here is a Chebyshev polynomial of the second kind of order n;
[0181] Based on the above two properties, the following important formula is derived
[0182]
[0183] Here | ⊥ > represents the direction orthogonal to T|λ>. In particular, when |λ|=1, W n T|λ>=λ n T|λ>; further we get
[0184]
[0185] Here |ψ ⊥ > represents an unnormalized vector orthogonal to T|j>, j∈[N]. The above formula shows that the Chebyshev polynomial of the matrix H can be encoded into the quantum state amplitude through multiple quantum walks; considering that the operator T is a A linear mapping of , so we can always find a unitary operation for any Implement the following process
[0186] |0 m >|ψ>→T|ψ>#(15)
[0187] Record this unitary operation as pass This operation can achieve the following mapping
[0188]
[0189] where |Φ ⊥ >Satisfaction This implements Chebyshevsky encoding.
[0190] S313, use unitary operator linear combination technology to encode the inverse of the coefficient matrix of the small linear system into the quantum circuit, and construct the sum form of Chebyshev polynomials through operator linear combination technology
[0191]
[0192] in
[0193] Furthermore, the unitary operator linear combination is specifically:
[0194] Define LCU line, given M = ∑ i α i U i , where U i is a unitary matrix, α i >0, obviously M is often non-unitary; through the following two quantum gates V and U, the M operator is simulated,
[0195]
[0196] Here α=∑ iα i Thus constructing a new quantum gate For the new quantum gate
[0197]
[0198] Just measure the first m registers, if the result is |0 m >Then we can get the quantum state of the remaining registers as Thus, the M operator is simulated, and its probability is (||M|ψ>|| / α) 2 .
[0199] S32. Convert the quantum data obtained in step S31 into classical data, map the optimal solution of the linear equation Hy=e in the subspace to the original dimension, and obtain the solution of the equation group Ax=b in the original dimension.
[0200] S4. Based on the solution of the linear equation group described in S3, update the power flow calculation correction equation, determine the convergence accuracy, and output the calculation result.
[0201] Furthermore, the step S4 is specifically as follows: updating the non-equilibrium node parameters, determining whether the preset convergence accuracy or the maximum number of iterations of the Newton method is reached, if not, returning to step S13, if yes, outputting the calculation result.
[0202] Example 2
[0203] It should be further explained that, based on the same inventive concept, the present invention also provides a system for quantum Newton-Raphson power flow calculation method based on CKS algorithm, and the system includes the following modules:
[0204] The linear equations building block is used to obtain the linear equations to be solved through Newton-Raphson power flow calculation.
[0205] The linear equations dimensionality reduction module is used to map large linear equations to small-dimensional linear equation solving problems using classical subspace methods.
[0206] The CKS quantum linear solver module is used to solve small-dimensional linear equations through the CKS algorithm to obtain solutions to large linear equations.
[0207] The linear equation group correction and convergence judgment module is used to update the power flow calculation correction equation according to the solution of the linear equation group obtained by the CKS quantum linear solver module, and to determine whether the output result is a converged solution that meets the calculation accuracy requirements.
[0208] Furthermore, the linear equations building block includes the following units:
[0209] 1. Parameter input unit, used to input the initial model parameters for quantum power flow calculation;
[0210] 2. Matrix construction unit, used to sort the node data and construct the admittance matrix;
[0211] 3. The linear equation group conversion unit is used to substitute the initial value and the admittance matrix into the Newton-Raphson power flow calculation equation, obtain the partial derivative through the equation, construct the Jacobian matrix A, obtain the unbalanced quantity b, and then construct the linear equation group Ax=b.
[0212] The linear equations dimensionality reduction module is specifically used to map the original linear equations Ax=b to a small-dimensional Hy=e linear solution problem based on the GMERS subspace method.
[0213] Furthermore, the CKS quantum linear solver module includes the following units:
[0214] 1. CSK quantum solver unit, used to solve small-dimensional Hy=e linear equations using the CKS algorithm.
[0215] 2. Data conversion unit, used to convert the quantum data obtained in the CKS quantum solution unit into classical data. The optimal solution of the Hy=e linear equation in the subspace is mapped to the original dimension to obtain the solution of the equation system Ax=b in the original dimension;
[0216] Furthermore, the CKS quantum solution unit includes the following components:
[0217] (1) A Chebyshev polynomial inversion component, which is used to obtain the inverse of the coefficient matrix of the subspace small linear system by discrete approximate inversion on the Chebyshev basis; the discrete approximate inversion formula on the Chebyshev basis is:
[0218]
[0219] Or the above formula can be written in a more general form, and we get
[0220] (2) A quantum walk component, which uses quantum walk technology to encode the inverse of the coefficient matrix of the small linear system into the quantum circuit, defines two oracle gates, and constructs each term of the Chebyshev polynomial through quantum walk technology.
[0221]
[0222] (3) Unitary operator linear combination component, which is used to encode the inverse of the coefficient matrix of a small linear system into the quantum circuit using the unitary operator linear combination technique, and to construct the summation form of Chebyshev polynomials through the operator linear combination technique
[0223]
[0224] in
[0225] Furthermore, the Chebyshev polynomial inversion component is specifically:
[0226] For the function g(x), we have when
[0227]
[0228] here b=κ 2 log(κ / ∈), is a Chebyshev polynomial of the first kind, which is as follows
[0229] Recursive relationship:
[0230]
[0231] ,in,
[0232] Furthermore, the quantum walk component is specifically:
[0233] For an N-dimensional Hamiltonian A with sparsity d, when ‖A‖ max ≤1, using quantum walk to construct First, define the space of quantum walking. The dimension of the walking space is 2N, and the form is as follows:
[0234]
[0235] have Define the following two operators:
[0236]
[0237] From the above two operators, the quantum walk operator is constructed as follows
[0238]
[0239] From this, we can deduce two properties of the quantum walk operator W: Define the matrix H: =A / d, since ‖A‖ max ≤1, so ‖H‖≤1; let |λ> be the eigenvector of H, λ be the corresponding eigenvalue, the first conclusion is that the quantum walk operator has the following minimum block structure
[0240]
[0241] In particular, when λ=±1, WT|λ>=λT|λ>. The second conclusion is that for any eigenvalue λ, Wn The minimum block structure is as follows
[0242]
[0243] here is a Chebyshev polynomial of the second kind of order n;
[0244] Based on the above two properties, the following important formula is derived
[0245]
[0246] Here | ⊥ > represents the direction orthogonal to T|λ>. In particular, when |λ|=1, W n T|λ>=λ n T|λ>; further we get
[0247]
[0248] Here |ψ ⊥ > represents an unnormalized vector orthogonal to T|j>, j∈[N]. The above formula shows that the Chebyshev polynomial of the matrix H can be encoded into the quantum state amplitude through multiple quantum walks; considering that the operator T is a A linear mapping of , so we can always find a unitary operation for any Implement the following process
[0249] |0 m >|ψ>→T|ψ>#(15)
[0250] Record this unitary operation as pass This operation can achieve the following mapping
[0251]
[0252] where |Φ ⊥ >Satisfy Π|Φ ⊥ >=0, This implements Chebyshevsky encoding.
[0253] Furthermore, the unitary operator linear combination component is specifically:
[0254] Define LCU line, given M = ∑ i α i U i , where U i is a unitary matrix, α i >0, obviously M is often non-unitary; through the following two quantum gates V and U, the M operator is simulated,
[0255]
[0256] Here α=∑ i α i Thus constructing a new quantum gate For the new quantum gate
[0257]
[0258] Just measure the first m registers, if the result is |0 m >Then we can get the quantum state of the remaining registers as
[0259] Thus, the M operator is simulated, and its probability is (||M|ψ>|| / α) 2 .
[0260] The linear equation group correction and convergence judgment module is specifically used to update the non-equilibrium node parameters and determine whether the preset convergence accuracy or the maximum number of iterations of the Newton method is reached. If not, it returns to the linear equation group construction module. If so, it outputs the calculation results.
[0261] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A quantum Newton-Raphson power flow calculation method based on the CKS algorithm, characterized in that: The method comprises the following steps: S1. Obtain the linear equations to be solved by Newton-Raphson power flow calculation; S2, using the classical subspace method to map large linear equations to small-dimensional linear equation solving problems; S3, solving a small-dimensional linear equation system by the CKS algorithm to obtain a solution to a large linear equation system; S4. Based on the solution of the linear equation group described in S3, update the power flow calculation correction equation, determine the convergence accuracy, and output the calculation result.
2. A quantum Newton-Raphson power flow calculation method based on CKS algorithm according to claim 1, characterized in that: The step S1 comprises the following steps: S11, input the initial model parameters for quantum power flow calculation; S12, sorting the node data and constructing an admittance matrix; S13. Substitute the initial value and the admittance matrix into the Newton-Raphson flow calculation equation, calculate the partial derivative through the equation, construct the Jacobian matrix A, calculate the unbalanced quantity b, and then construct the linear equation group Ax=b.
3. A quantum Newton-Raphson power flow calculation method based on CKS algorithm according to claim 1, characterized in that: Specifically, the step S2 is to map the original linear equation system Ax=b to a linear solution problem of small dimension Hy=e based on the GMERS subspace method.
4. A quantum Newton-Raphson power flow calculation method based on CKS algorithm according to claim 2, characterized in that: The step S3 comprises the following steps: S31, using the CKS algorithm to solve the small-dimensional Hy=e linear equation; S32. Convert the quantum data obtained in step S31 into classical data, map the optimal solution of the linear equation Hy=e in the subspace to the original dimension, and obtain the solution of the equation group Ax=b in the original dimension.
5. A quantum Newton-Raphson power flow calculation method based on CKS algorithm according to claim 1, characterized in that: The step S4 specifically updates the non-equilibrium node parameters and determines whether the preset convergence accuracy or the maximum number of iterations of the Newton method is reached. If not, return to step S13; if so, output the calculation result.
6. A quantum Newton-Raphson power flow calculation method based on CKS algorithm according to claim 4, characterized in that: The CKS algorithm described in step S31 is specifically: S311. Obtain the inverse of the coefficient matrix of the subspace small linear system by discrete approximate inversion on the Chebyshev basis; the discrete approximate inversion formula on the Chebyshev basis is: Or the above formula can be written in a more general form, and we get S312, using quantum walking technology, encode the inverse of the coefficient matrix of the small linear system into the quantum circuit, define two Oracle gates, and construct each term of the Chebyshev polynomial through quantum walking technology. S313, use unitary operator linear combination technology to encode the inverse of the coefficient matrix of the small linear system into the quantum circuit, and construct the sum form of Chebyshev polynomials through operator linear combination technology in 7. A quantum Newton-Raphson power flow calculation method based on CKS algorithm according to claim 6, characterized in that: The discrete approximate inversion on the Chebyshev basis described in step S311 is specifically: For the function g(x), we have when here b=κ 2 log(κ / ∈), is a Chebyshev polynomial of the first kind, with the following recurrence relation: , in, 8. A quantum Newton-Raphson power flow calculation method based on CKS algorithm according to claim 6, characterized in that: The quantum walking technology described in step S312 is specifically: For an N-dimensional Hamiltonian A with sparsity d, when ‖A‖ max ≤1, using quantum walk to construct First, define the space of quantum walking. The dimension of the walking space is 2N, and the form is as follows: have Define the following two operators: From the above two operators, the quantum walk operator is constructed as follows From this, we can deduce two properties of the quantum walk operator W: Define the matrix H: =A / d, since ‖A‖ max ≤1, so ‖H‖≤1; let |λ> be the eigenvector of H, λ be the corresponding eigenvalue, the first conclusion is that the quantum walk operator has the following minimum block structure In particular, when λ=±1, WT|λ>=λT|λ>; the second conclusion is that for any eigenvalue λ, W n The minimum block structure is as follows here is a Chebyshev polynomial of the second kind of order n; Based on the above two properties, the following important formula is derived Here | ⊥ > represents the direction orthogonal to T|λ>; in particular, when |λ|=1, W n T|λ>=λ n T|λ>; further we get Here |ψ ⊥ > represents an unnormalized vector orthogonal to T|j>, j∈[N]. The above formula shows that the Chebyshev polynomial of the matrix H is encoded into the quantum state amplitude through multiple quantum walks; Considering that the operator T is a A linear mapping of , so we can always find a unitary operation for any Implement the following process |0 m >|ψ>→T|ψ>#(15) Record this unitary operation as pass This operation can achieve the following mapping where |Φ ⊥ >Satisfy Π|Φ ⊥ >=0, Implemented Chebyshevsky encoding.
9. A quantum Newton-Raphson power flow calculation method based on CKS algorithm according to claim 6, characterized in that: The unitary operator linear combination described in step S313 is specifically: Define LCU line, given M = ∑ i α i U i , where U i is a unitary matrix, α i >0, obviously M is often non-unitary; through the following two quantum gates V and U, the M operator is simulated, Here α=∑ i α i Thus constructing a new quantum gate For the new quantum gate Just measure the first m registers, if the result is |0 m >Then the quantum state of the remaining registers is Thus, the M operator is simulated, and its probability is (||M|ψ>|| / α) 2 .
10. A system for quantum Newton-Raphson power flow calculation method based on CKS algorithm, characterized in that: include: Linear equation system building module, used to obtain the linear equation system to be solved through Newton-Raphson power flow calculation; The linear equations dimensionality reduction module is used to map large linear equations to small-dimensional linear equation solving problems using classical subspace methods; CKS quantum linear solver module, which is used to solve small-dimensional linear equations through the CKS algorithm to obtain solutions to large linear equations; The linear equation group correction and convergence judgment module is used to update the power flow calculation correction equation according to the solution of the linear equation group obtained by the CKS quantum linear solver module, and to determine whether the output result is a converged solution that meets the calculation accuracy requirements.
Citation Information
Cited By
Power flow iterative calculation method and system based on hybrid preprocessing
CN120675081A
Power system load flow calculation method based on quantum singular value transformation
CN121440562A
