Quantum linear solver parameter design method and solving method based on characteristic values

By optimizing the parameter design of the quantum linear solver, the problems of low accuracy and poor stability in the existing technology have been solved, achieving efficient and accurate quantum linear solving and improving the computational accuracy and efficiency in multiple application fields.

CN119272892AInactive Publication Date: 2025-01-07ZHEJIANG UNIV
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411122675.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2025-01-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing quantum linear solvers suffer from low computational accuracy and poor stability when solving large-scale linear equation systems. In particular, they are difficult to achieve the accuracy of classical algorithms in practical applications, and existing circuit designs lack versatility and flexibility.

Method used

By designing parameters in the quantum linear solver, including the Hamiltonian simulation time, number of qubits, normalization constant, and correlation with the absolute values ​​of the eigenvalues ​​of the linear equation system in the quantum phase estimation stage, the design of the quantum circuit can be optimized to improve accuracy.

Benefits of technology

It significantly improves the solution accuracy of quantum linear solvers, enabling significant social, economic, and technological benefits in multiple application areas, particularly in AC power flow analysis, Black model, and solving stochastic linear equations, thereby enhancing computational accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119272892A_ABST
    Figure CN119272892A_ABST
Patent Text Reader

Abstract

The invention discloses a characteristic value-based quantum linear solver parameter design method and solving method, and the method comprises the following steps: designing Hamiltonian simulation time Ht = pi in a quantum phase estimation stage in a quantum linear solver, and enabling the number of quantum bits to be related to the maximum value and the minimum value of the absolute value of the characteristic value of a matrix in a linear equation set; the normalization constant of the controlled rotation stage in the quantum linear solver is designed to be related to the minimum value of the absolute value of the characteristic value of the matrix in the linear equation set, and meanwhile, solving is carried out based on the designed parameters, so that the solving precision of the quantum linear solver can be remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of quantum computing, and in particular relates to a parameter design method and a solution method of a quantum linear solver based on eigenvalues. Background Art

[0002] Quantum linear solvers are quantum algorithms for solving linear equations (Ax = b). The earliest one was proposed by Harrow, Hassidim, and Lloyd, and is called the HHL algorithm. The HHL algorithm is expected to provide exponential speedup compared to classical algorithms by leveraging a new quantum computing paradigm. Classical algorithms such as Gaussian elimination have a complexity of O(N 3 ), and the conjugate gradient method, the complexity is In contrast, the complexity of the HHL algorithm with respect to the size of the equation system N is only O(logN), which theoretically has computational advantages in solving large-scale linear equations.

[0003] The original literature only described the quantum state evolution of the HHL algorithm layer, and did not explain the quantum circuit representation of the quantum algorithm. Cao et al. first proposed the design method of the HHL quantum circuit layer and tested the solution of a 4×4 scale linear equation system. However, the scope of application of this method is limited, mainly because it does not solve the problem of solving large-scale linear equations, and the quantum circuit needs to be adjusted for different equations, which lacks versatility.

[0004] Since then, more and more researchers have devoted themselves to developing more universal quantum circuits. The well-known quantum computing library Qiskit published in the document "Javadi-Abhari A, Treinish M, Krsulich K, et al. Quantum computing with Qiskit[J].arXivpreprint arXiv:2405.08810,2024" provides a more universal quantum circuit implementation. However, due to the randomness of the circuit parameter settings, the implementation in Qiskit shows low accuracy when solving linear equations in practice, and the application effect is insufficient.

[0005] In addition, some hybrid methods that have recently emerged combine the advantages of classical computing and quantum computing, called hybrid quantum linear solvers. Hybrid quantum linear solvers insert measurement operations into quantum circuits and use quantum phase estimation to pre-extract all eigenvalue information of the matrix A to guide the design of subsequent quantum circuits. However, since these methods find it difficult to determine the quantum circuit scale required to obtain all high-precision eigenvalues, this makes specific hybrid solution quantum circuits extremely sensitive to eigenvalue data and still faces problems of accuracy and stability.

[0006] In summary, although the current quantum linear solver technology provides significant acceleration advantages in theory, there are still many problems and challenges in practical applications, especially in terms of computational accuracy, which is far inferior to classical algorithms. Existing technologies still need to be further improved in terms of quantum gate depth and solution accuracy in circuit design to fully tap the potential of quantum computing in solving linear equations. How to design efficient, general and accurate quantum circuits is still an important issue that needs to be solved in this field. Summary of the invention

[0007] In view of the above, the purpose of the present invention is to provide a quantum linear solver parameter design method and solution method based on eigenvalues, which can significantly improve the solution accuracy of the quantum linear solver by precisely controlling various parameters appearing in the quantum linear solver.

[0008] To achieve the above-mentioned object of the invention, an embodiment provides a quantum linear solver parameter design method based on eigenvalues, comprising the following steps:

[0009] Design of Hamiltonian simulation time H for quantum phase estimation in quantum linear solver t =π, the number of quantum bits is related to the maximum and minimum absolute values ​​of the eigenvalues ​​of the matrix in the linear equation system;

[0010] The normalization constants of the controlled rotation stages in the quantum linear solver are designed to be related to the minimum of the absolute values ​​of the eigenvalues ​​of the matrix in the linear system of equations.

[0011] Preferably, in the parameter design method, the number of quantum bits in the quantum phase estimation stage in the quantum linear solver is designed to be related to the maximum and minimum values ​​of the absolute values ​​of the eigenvalues ​​of the matrix in the linear equation system, including:

[0012] Design number of qubits Among them, |λ| min It represents the minimum absolute value of the eigenvalue in the matrix, and ∈ represents the control accuracy parameter.

[0013] Preferably, in the parameter design method, the normalization constant of the controlled rotation stage in the quantum linear solver is designed to be related to the minimum absolute value of the eigenvalue of the matrix in the linear equation system, including:

[0014] Design normalization constant Const = |λ| min , where |λ| min Represents the minimum absolute value of the eigenvalues ​​in the matrix.

[0015] To achieve the above-mentioned object of the invention, an embodiment of the present invention further provides a quantum linear solution method based on eigenvalues, comprising the following steps:

[0016] Designing a scaling parameter of a matrix in the linear equation system is related to the maximum absolute value of the eigenvalues ​​in the matrix, and scaling the matrix in the linear equation system according to the designed scaling parameter;

[0017] Design a quantum circuit based on the scaled matrix, and use the above parameter design method to design the Hamiltonian simulation time in the quantum linear solver corresponding to the quantum circuit, the number of quantum bits required for quantum phase estimation, and the specific value of the normalization constant;

[0018] Run the quantum circuit and use the quantum linear solver to solve the linear equations.

[0019] Preferably, in the solution method, the scaling parameter of the matrix in the linear equation system is designed to be related to the maximum absolute value of the eigenvalue in the matrix, including:

[0020] Designing Scaling Parameters for Matrices in Linear Systems Among them, |λ| max Represents the maximum absolute value of the eigenvalues ​​in the matrix.

[0021] Preferably, in the solution method, the linear equation group to be solved may be a linear equation group for performing AC power flow analysis in power system analysis.

[0022] Preferably, in the solution method, the linear equation group to be solved may be a linear equation group in the Black model used for portfolio optimization problems in the financial field.

[0023] Preferably, in the solution method, the matrix in the linear equation system to be solved may be a random Hamiltonian matrix.

[0024] Compared with the prior art, the present invention has the following beneficial effects:

[0025] The Hamiltonian simulation time H is calculated by designing a quantum linear solver based on the eigenvalues t =π, the number of quantum bits is related to the maximum and minimum absolute values ​​of the eigenvalues ​​of the matrix in the linear equations, and the normalization constant is related to the minimum absolute value of the eigenvalues ​​of the matrix in the linear equations. Solving based on these parameters can significantly improve the solution accuracy of the quantum linear solver, thereby achieving significant social, economic and technological benefits in multiple application fields. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0027] Figure 1 is a flow chart of a quantum linear solver parameter design method based on eigenvalues ​​provided in an embodiment;

[0028] Figure 2 is a structural diagram of a quantum linear solver provided in an embodiment;

[0029] Figure 3 It is a flow chart of a quantum linear solver parameter design method and a solution method based on eigenvalues ​​provided in an embodiment. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation methods described herein are only used to explain the present invention and do not limit the protection scope of the present invention.

[0031] The inventive concept of the present invention is: in order to overcome the low precision problem of the existing quantum linear solver, the present invention deeply analyzes the influence of each parameter in the quantum linear solver on the final result, and specifically analyzes and finds that: each step of the HHL algorithm is closely related to the eigenvalue of the matrix of the linear equation system: 1) The upper and lower bounds of the absolute value of the matrix eigenvalue determine the circuit scale of the HHL algorithm; 2) The output of the quantum phase estimation expresses the quantum superposition state of the eigenvalue, and a controllable number of quantum bits is required to accurately express the eigenvalue; 3) The controlled rotation process inverts the eigenvalue so that it appears on the amplitude term of the quantum state, and the normalization constant Const introduced in the process is required not to exceed the minimum value of the absolute value of the eigenvalue. If partial information about the eigenvalue of the input matrix can be known, it will be of great benefit to the accuracy improvement of the HHL algorithm in solving the portfolio optimization problem. Therefore, the goal of the present invention is to propose a series of parameter setting strategies based on the eigenvalue of the matrix to achieve parameter design for the quantum linear solver.

[0032] Based on the above analysis, the parameters designed by the present invention are shown in Table 1:

[0033] Table 1

[0034]

[0035]

[0036] Among them, |λ| min With |λ| max The definition is as follows: Let the matrix of the initial linear equations be A, and its eigenvalue set be definition That is, the maximum absolute value of the eigenvalue of matrix A, defined That is, the minimum absolute value of the eigenvalues ​​of matrix A.

[0037] The above parameters are explained in detail below in combination with parameter design method and solution method.

[0038] like Figure 1 As shown, the eigenvalue-based quantum linear solver parameter design method provided in the embodiment includes the following steps:

[0039] Step 1: Design the Hamiltonian simulation time H of the quantum phase estimation stage in the quantum linear solver t =π.

[0040] In the quantum phase estimation stage of the quantum linear solver, the phase and the eigenvalue λ of the Hamiltonian j The following relationship exists: Among them, H t is the Hamiltonian simulation time, λ j are the eigenvalues ​​of the matrix of the system of equations.

[0041] Design H t =π: to avoid the problem of different eigenvalues ​​being mapped to the same phase. For example, other literature often chooses H t =2π or randomly set the Hamiltonian simulation time, which may result in the same phase corresponding to multiple different eigenvalues, which not only increases the complexity of the calculation but also introduces additional errors. This effective method can ensure the accurate mapping between eigenvalues ​​and phases. This not only simplifies the design of quantum circuits, but also improves the accuracy of quantum phase estimation.

[0042] Step 2, design the number of quantum bits in the quantum phase estimation stage of the quantum linear solver to be related to the maximum and minimum absolute values ​​of the eigenvalues ​​of the matrix in the linear equation system.

[0043] In the embodiment, the number of quantum bits is designed Among them, |λ| min It represents the minimum absolute value of the eigenvalue in the matrix, and ∈ represents the control accuracy parameter.

[0044] In the quantum phase estimation stage, we want to ensure that the estimated error of the eigenvalue is within the allowable range. Assuming the approximate eigenvalue It is very close to the true eigenvalue λ, and the following error formula can be obtained:

[0045]

[0046] Since I use n QPE The phase is estimated by quantum bits. The absolute phase error in the quantum phase estimation stage is Therefore, the corresponding eigenvalue absolute error is According to the given conditions, the minimum eigenvalue can be expressed as Because the absolute value range of the eigenvalues ​​after matrix scaling is Where κ is the matrix condition number, which is equal to the maximum absolute value of the matrix divided by the minimum absolute value of the matrix.

[0047] Will Substituting into the error formula, transforming and solving it, and further considering the range and representation of the eigenvalue, we can get:

[0048]

[0049] Through the above method, n can be set QPE The lower limit of , ensures that the absolute error of quantum phase estimation is within ∈, and guarantees the accuracy of eigenvalue estimation. The design fully considers the error requirements of quantum phase estimation and the range of eigenvalues, ensuring the accuracy of eigenvalue estimation and the effectiveness of quantum circuits.

[0050] Step 3, design the normalization constant of the controlled rotation stage in the quantum linear solver to be related to the minimum absolute value of the eigenvalues ​​of the matrix in the linear equation system.

[0051] In the embodiment, the normalization constant Const is designed to be |λ| min Before the final quantum measurement, the quantum state can be represented as:

[0052]

[0053] In this quantum state, the state of the auxiliary qubit depends on the eigenvalue λ j And the normalization constant Const. Due to the constraint of the square root, Const should satisfy the following conditions:

[0054] Const≤|λ| min

[0055] The larger the Const, The closer the value of the term is to 1, the greater the probability amplitude of the term |1> is maximized. This means that the probability that the measurement result of the auxiliary qubit is |1> is very high, which increases the success rate of the algorithm. To ensure this, and to make the probability of measuring the auxiliary qubit to |1> as close to 1 as possible, |λ| min is the best choice for the Const parameter value.

[0056] like Figure 3 As shown, the embodiment also provides a quantum linear solution method based on eigenvalues, which adopts the above parameter design method and specifically includes the following steps:

[0057] Step 1, designing a scaling parameter of the matrix in the linear equation system that is related to the maximum absolute value of the eigenvalues ​​in the matrix, and scaling the matrix in the linear equation system according to the designed scaling parameter.

[0058] In the embodiment, the scaling parameters of the matrix A in the linear equation system are designed Among them, |λ| max Indicates the maximum absolute value of the eigenvalues ​​in the matrix. Parameter s M is designed to ensure that quantum phase estimation (QPE) only processes matrices with eigenvalues ​​in the range |λ|<1: in the quantum phase estimation of the HHL algorithm, its output phase and the matrix eigenvalue λ j There is a mapping relationship between them. In order to ensure that |λ|<1, this scheme proposes to scale the solution matrix, which is defined as follows:

[0059] A=s M A, where

[0060] We chose l = 0.5, which reduces the absolute value range of the matrix eigenvalues ​​to This simplifies the design of controlled rotation operations. The scaled matrix eigenvalue range ensures that the absolute value of all eigenvalues ​​is less than 1.

[0061] Assume that the linear equation system to be solved is Ax=b, where A is a known coefficient matrix, b is a known constant vector, and x is a variable vector to be solved. In order to ensure that the eigenvalues ​​of matrix A fall within a range suitable for quantum phase estimation (QPE) processing, it is necessary to use parameter s for matrix A. M Scaling, the scaled matrix Through this scaling operation, the absolute values ​​of all eigenvalues ​​will fall within a range less than 1, thus ensuring the accuracy of phase estimation.

[0062] Step 2, designing a quantum circuit based on the scaled matrix, and using the above parameter design method to design the Hamiltonian simulation time, the number of quantum bits, and the specific value of the normalization constant in the quantum linear solver corresponding to the quantum circuit.

[0063] like Figure 2 As shown, the quantum circuit of the HHL algorithm mainly includes three stages: quantum phase estimation stage, controlled rotation stage and inverse quantum phase estimation stage.

[0064] For the quantum phase estimation stage, the unitary operator U is used to perform a controlled unitary operation, which acts on the quantum register Q storing the quantum state of the vector b. v Upper: Milton simulation time H t The phase is converted into With eigenvalue λj Connected: H t is set to π, which means that H t Determines the eigenvalue λ j In the Hamiltonian operator action time H t The phase produced under this condition ensures the accuracy of quantum phase estimation. It also sets the number of qubits required. Indicates the number of qubits used in the QPE module.

[0065] For the controlled rotation stage, the phase information output by the quantum phase estimation stage is used to derive the eigenvalue information of the matrix A of the linear equation system, and these eigenvalues ​​are rotated to the amplitude position of the quantum state. Figure 2 The controlled revolving door R Y (2arcsin(Const / λ)), where the normalization constant Const = |λ| min Designed to maximize the success rate of the HHL algorithm, 2arcsin(Const / λ) can characterize the rotation angle of the quantum state. The position of the controlled rotation gate is used in the quantum phase estimation (QPE) stage and the inverse quantum phase estimation. Between stages.

[0066] For inverse quantum phase estimation The entanglement between the quantum bits is resolved in this stage, so that the final measurement can extract the desired solution. Before the final measurement, the quantum state becomes:

[0067]

[0068] pass Figure 2 With these parameter settings in , the HHL algorithm can effectively perform quantum phase estimation, controlled rotation and inverse quantum phase estimation, thereby solving the linear equations.

[0069] Step 3: Run the quantum circuit and use the quantum linear solver to solve the linear equations to obtain the solution.

[0070] The quantum phase estimation, controlled rotation and inverse quantum phase estimation operations are performed respectively. After the quantum circuit is finished running, the quantum state is measured to obtain the approximate value of the solution x. The quantum state is expressed as:

[0071]

[0072] Through the above steps 1 to 3, efficient and high-precision quantum solutions to linear equations can be achieved. The above parameter design method and quantum linear solution method have achieved significant social, economic and technical benefits in multiple application fields. The following are specific beneficial effects on the Black model, AC power flow analysis and solution of random equations:

[0073] 1. AC power flow analysis

[0074] AC power flow analysis is a key issue in power system analysis, and its core is to solve large-scale linear equations. In traditional classical algorithms, due to the complexity of large-scale data, calculation time and accuracy have always been bottlenecks that are difficult to break through. By adopting the quantum linear solver after parameter design of the present invention, these complex computing tasks can be processed more efficiently. This improvement is of great significance to the real-time monitoring and optimal scheduling of power systems, and can greatly improve the stability and economy of power systems. On the 3-bus problem constructed by PySCA, the calculation accuracy of the present invention reaches 0.998337-0.999995, with an average of 0.999744.

[0075] 2. Black Model

[0076] The Black model is a commonly used model for portfolio optimization problems in the financial field. When applying the quantum linear solver optimized by the HHL algorithm, by reducing the condition number of the matrix and optimizing the parameter selection, the present invention enables accurate pricing results to be obtained more quickly in complex financial data processing, and can significantly improve the calculation accuracy and efficiency of the Black model. According to experimental measurements, the optimized quantum linear solver improves the accuracy by 220.4 times and 54.5 times respectively when processing large-scale data compared with Qiskit and hybrid quantum solution solutions. This improvement not only improves the accuracy of financial analysis, but also effectively reduces the computational cost in financial risk management.

[0077] 3. Random Linear Equations

[0078] Matrix computing is widely used in fields such as physics, statistics, and data science. In these applications, it is a major problem to quickly and accurately solve linear equations composed of large-scale matrices. The present invention optimizes the parameter settings of the quantum linear solver so that the calculation accuracy can be significantly improved when processing random linear equations. We construct a random Hamiltonian matrix to test the performance of this method in processing random linear equations, and the accuracy reaches 0.970597.

[0079] The specific implementation methods described above provide a detailed description of the technical solutions and beneficial effects of the present invention. It should be understood that the above is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, supplements and equivalent substitutions made within the scope of the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A quantum linear solver parameter design method based on eigenvalues, characterized in that: The following steps are involved: Design of Hamiltonian simulation time H for quantum phase estimation in quantum linear solver t =π; The number of qubits in the quantum phase estimation stage of the quantum linear solver is designed to be related to both the maximum and minimum absolute values ​​of the eigenvalues ​​of the matrix in the linear equation system; The normalization constants of the controlled rotation stages in the quantum linear solver are designed to be related to the minimum of the absolute values ​​of the eigenvalues ​​of the matrix in the linear system of equations.

2. The method for designing parameters of a quantum linear solver based on eigenvalues ​​according to claim 1, characterized in that: The number of qubits in the quantum phase estimation stage of the quantum linear solver is designed to be related to the maximum and minimum absolute values ​​of the eigenvalues ​​of the matrix in the linear system of equations, including: Design number of qubits Among them, |λ| min It represents the minimum absolute value of the eigenvalue in the matrix, and ∈ represents the control accuracy parameter.

3. The method for designing parameters of a quantum linear solver based on eigenvalues ​​according to claim 1, characterized in that: The design of the normalization constants for the controlled rotation stage in the quantum linear solver is related to the minimum absolute value of the eigenvalues ​​of the matrix in the linear system of equations, including: Design normalization constant Const = |λ| min , where |λ| min Represents the minimum absolute value of the eigenvalues ​​in the matrix.

4. A quantum linear solution method based on eigenvalues, characterized in that: The following steps are involved: Designing a scaling parameter of a matrix in the linear equation system is related to the maximum absolute value of the eigenvalues ​​in the matrix, and scaling the matrix in the linear equation system according to the designed scaling parameter; Designing a quantum circuit according to the scaled matrix, and using the design method described in claims 1-3 to design the Hamiltonian simulation time in the quantum linear solver corresponding to the quantum circuit, the number of quantum bits required for quantum phase estimation, and the specific value of the normalization constant; Run the quantum circuit and use the quantum linear solver to solve the linear equations.

5. The eigenvalue-based quantum linear solution method according to claim 4, characterized in that: The scaling parameters of the matrix in the design linear system are related to the maximum absolute value of the eigenvalues ​​in the matrix, including: Designing Scaling Parameters for Matrices in Linear Systems Among them, |λ| max Represents the maximum absolute value of the eigenvalues ​​in the matrix.

6. The eigenvalue-based quantum linear solution method according to claim 4, characterized in that: The linear equations to be solved are linear equations for performing AC power flow analysis in power system analysis.

7. The eigenvalue-based quantum linear solution method according to claim 4, characterized in that: The linear equations to be solved are those in the Black model used in the financial field for portfolio optimization problems.

8. The eigenvalue-based quantum linear solution method according to claim 4, characterized in that: The matrix in the linear equations to be solved is a random Hamiltonian matrix.

Citation Information

Patent Citations

  • Quantum computing simulation platform and linear equation set quantum solving simulation method and system

    CN112232512A

  • Investment portfolio optimization method and device and storage medium

    CN114187118A

  • Data processing method and device, equipment and storage medium

    CN114897172A

  • Quantum machine learning simulation method and system based on OpenMP parallel model

    CN115409187A

  • Method and device for solving system of linear equations based on quantum computing

    CN118227928A