A method and device for solving nonlinear equations based on quantum circuits

By constructing quantum circuits with quantum state evolution by a method based on quantum circuits, updating the approximate solution and iterating to the accuracy value, solving the problem of high complexity in nonlinear systems in the prior art, and achieving a more efficient solution process.

CN114969629BActive Publication Date: 2025-02-11ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110217441.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-26
Publication Date
2025-02-11
Estimated Expiration
2041-02-26

AI Technical Summary

Technical Problem

When existing iterative methods are used to solve nonlinear systems, the complexity increases exponentially with the increase of iteration time, resulting in high complexity and high difficulty.

Method used

The nonlinear system of equations based on quantum circuits is used to obtain the information of quantum bits and nonlinear system of equations, and the quantum system of equations is constructed, the approximate solution is updated using quantum states, and the iterative process is carried out until the preset accuracy value is reached.

Benefits of technology

The complexity and difficulty of solving nonlinear systems are reduced, and the solution process is accelerated by using the superposition characteristics of quantum, filling the relevant technical gaps in the field of quantum computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114969629B_ABST
    Figure CN114969629B_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for solving a nonlinear equation group based on a quantum circuit. The method comprises: obtaining information of a group of quantum bits and a nonlinear equation group to be processed, determining an initial approximate solution and a preset precision value of the nonlinear equation group and constructing a quantum circuit representing the quantum state evolution of the approximate solution, executing a quantum state evolution operation on the quantum circuit to obtain the quantum state of the evolved quantum circuit, updating the current approximate solution according to the quantum state, determining a state estimation parameter of the nonlinear equation group, and judging the magnitude relationship between the state estimation parameter and the preset precision value, iteratively executing the quantum circuit for constructing the quantum state evolution of the approximate solution until the state estimation parameter is less than or equal to the preset precision value, determining the solution of the nonlinear equation group according to the evolved target quantum state, and utilizing the superposition characteristic of quantum to realize a solution technology that can satisfy the nonlinear system and reduce the complexity of the solution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of quantum computing technology, and in particular to a method and device for solving a nonlinear equation group based on quantum circuits. Background Art

[0002] Solving nonlinear systems is an important problem in numerical algebra and numerical optimization, and is also a core problem in scientific computing and computational mathematics. Researching numerical methods for quickly and effectively solving nonlinear systems has important theoretical significance and practical value. Quantum computing is a new type of computing method. The principle is to build a computing framework based on quantum mechanics theory. When solving some problems, quantum computing has an exponential acceleration effect compared to the optimal classical algorithm.

[0003] The existing iterative methods for solving nonlinear systems use multiple copies, and their complexity increases exponentially with the increase of iteration time. The complexity is high and the solution is difficult.

[0004] Based on this, it is necessary to propose an effective quantum algorithm for solving nonlinear systems, which can be used to solve nonlinear systems, reduce the complexity and difficulty of solving nonlinear systems, and fill the gaps in related technologies. Summary of the invention

[0005] The purpose of the present invention is to provide a method and device for solving a system of nonlinear equations based on quantum circuits to address the deficiencies in the prior art. The method can realize a solution technology that can satisfy nonlinear systems and be used for solving nonlinear systems, thereby reducing the complexity and difficulty of solving nonlinear systems and filling the gap in related technologies in the field of quantum computing.

[0006] An embodiment of the present application provides a method for solving a nonlinear equation system based on a quantum circuit, comprising:

[0007] Obtain information of a set of quantum bits and a nonlinear equation set to be processed F(x)=0;

[0008] Determine the initial approximate solution x to the nonlinear system of equations 0 and a preset precision value ∈ and construct a quantum circuit representing the quantum state evolution of an approximate solution of a nonlinear equation group, and perform a quantum state evolution operation on the quantum circuit to obtain the quantum state of the quantum circuit after evolution;

[0009] Update the current approximate solution according to the quantum state, determine the state estimation parameters of the nonlinear equation group, and judge the magnitude relationship between the state estimation parameters and the preset precision value;

[0010] If the state estimation parameter is greater than the preset precision value, return to execute: construct a quantum circuit representing the quantum state evolution of the approximate solution of the nonlinear equation group, perform a quantum state evolution operation on the quantum circuit, and obtain the quantum state of the evolved quantum circuit until the state estimation parameter is less than or equal to the preset precision value;

[0011] The solution of the nonlinear equation group is determined according to the target quantum state of the evolved quantum circuit.

[0012] In the above-mentioned method for solving a nonlinear equation system based on quantum circuits, preferably, the information of the nonlinear equation system to be processed includes:

[0013] A first vector x constructed by the independent variables of the nonlinear equation system and a second vector F(x) constructed by the dependent variables, wherein the N is the dimension of the nonlinear equation system.

[0014] In the above-mentioned method for solving a nonlinear equation system based on quantum circuits, preferably, the information of the nonlinear equation system to be processed further includes:

[0015] The Jacobian matrix F′(x) and the matrix A for preprocessing constructed according to the second vector, wherein the The matrix is the maximum value of the elements of the Jacobian matrix F′(x).

[0016] A method for solving a nonlinear system of equations based on quantum circuits as described above, wherein, preferably, the quantum circuit for constructing the quantum state evolution representing the initial approximate solution of the nonlinear system of equations comprises Oracle A1 、OracleO A2 and OracleO b , the Oracle A1 、OracleO A2 and OracleO b Used to achieve:

[0017] O A1 |j,l>=|j,h(j,l)>

[0018]

[0019]

[0020] Where h(j,l) represents the column number of the lth non-zero element in the jth row of matrix A, C b is the norm of F(x).

[0021] A method for solving a nonlinear system of equations based on quantum circuits as described above, wherein, preferably, the Oracle A1 、OracleO A2 and OracleO b Based on Oracle f1 、OracleO f2 Sure;

[0022] Among them, the Oracle f1 For extracting the subscript information of the independent variable in the ith function of the nonlinear equation system, the Oracle f1 The role is:

[0023] O f1 |,j>=|i,f(i,j)>

[0024] Where i = 1, 2, ..., N, j = 1, 2, ..., d, and f(i, j) represents f i (x) is the subscript of the j-th variable, and d is the sparsity of the Jacobian matrix;

[0025] The Oracle f2 For calculating the value of the ith function of the nonlinear equations, the Oracle f2 The role is:

[0026] O f2 |i>|x (i) >|0>=|i>|x (i) >|f i (x (i) )>

[0027] Among them, i=1,2,..,N.

[0028] In the above-mentioned method for solving a nonlinear system of equations based on quantum circuits, preferably, determining the state estimation parameters of the nonlinear system of equations comprises:

[0029] According to a pre-constructed quantum data structure for accessing quantum data, the quantum states of the first-layer leaf nodes distributed and stored in the quantum data structure and the x represented by them are determined. i and f i (x) address information; wherein the quantum data structure is a binary tree structure;

[0030] According to the address information, the data stored in the leaf node is transferred to the next layer of leaf nodes through the quantum circuit until the quantum state data f corresponding to the address information is outputted at the root node in the binary tree structure. k (x) to determine the state estimation parameters Where n=log2N.

[0031] Another embodiment of the present application provides a device for solving a nonlinear equation system based on a quantum circuit, the device comprising:

[0032] An acquisition module, used to acquire information of a group of quantum bits and a nonlinear equation group F(x)=0 to be processed;

[0033] Building block for determining an initial approximate solution x to a nonlinear system of equations 0 and a preset precision value ∈ and construct a quantum circuit representing the quantum state evolution of an approximate solution of a nonlinear equation group, and perform a quantum state evolution operation on the quantum circuit to obtain the quantum state of the quantum circuit after evolution;

[0034] A judgment module, used to update the current approximate solution according to the quantum state, determine the state estimation parameters of the nonlinear equation group, and judge the magnitude relationship between the state estimation parameters and the preset precision value;

[0035] an iterative module, configured to return to execute, if the state estimation parameter is greater than the preset precision value: constructing a quantum circuit representing the quantum state evolution of the approximate solution of the nonlinear equation group, performing a quantum state evolution operation on the quantum circuit, and obtaining the quantum state of the evolved quantum circuit, until the state estimation parameter is less than or equal to the preset precision value;

[0036] A determination module is used to determine the solution of the nonlinear equation group according to the target quantum state of the evolved quantum circuit.

[0037] In the above-mentioned device for solving nonlinear equations based on quantum circuits, preferably, the acquisition module comprises:

[0038] An acquisition unit is used to acquire a first vector x constructed by the independent variables of the nonlinear equation group and a second vector F(x) constructed by the dependent variables, wherein the N is the dimension of the nonlinear equation system.

[0039] In the above-mentioned device for solving nonlinear equations based on quantum circuits, preferably, the acquisition module further includes:

[0040] A construction unit, for constructing a Jacobian matrix F′(x) and a matrix A for preprocessing according to the second vector, wherein the The matrix |F′(x)| max is the maximum value of the elements of the Jacobian matrix F′(x).

[0041] In the above-mentioned device for solving nonlinear equations based on quantum circuits, preferably, the building module comprises:

[0042] Oracle A1 Module, OracleO A2 Modules and OracleO b module, the Oracle A1 Module, OracleO A2 Modules and OracleO b Modules are used to implement:

[0043] O A1 |j,l>=|j,h(j,l)>

[0044]

[0045]

[0046] Where h(j,l) represents the column number of the lth non-zero element in the jth row of matrix A, C b is the norm of F(x).

[0047] As described above, a nonlinear equation solving device based on quantum circuits, wherein, preferably, the Oracle A1 Module, OracleO A2 Modules and OracleO b Module based on OracleO f1 Module, OracleO f2 Module determination;

[0048] Among them, the Oracle f1 The module is used to extract the subscript information of the independent variable in the ith function of the nonlinear equation system, and the Oracle f1 The role is:

[0049] O f1 |i,j>=|i,f(i,j)>

[0050] Where i = 1, 2, ..., N, j = 1, 2, ..., d, and f(i, j) represents f i (x) is the subscript of the j-th variable, and d is the sparsity of the Jacobian matrix;

[0051] The Oracle f2 The module is used to calculate the value of the ith function of the nonlinear equation system, and the Oracle f2 The role is:

[0052] Of2 |i>|x (i) >|0>=|i>|x (i) >|f i (x (i) )>

[0053] Among them, i=1,2,..,N.

[0054] In the above-mentioned device for solving nonlinear equations based on quantum circuits, preferably, the judgment module comprises:

[0055] A storage unit, for determining the quantum states and x represented by the first-layer leaf nodes distributed and stored in the quantum data structure according to a pre-constructed quantum data structure for accessing quantum data. i and f i (x) address information; wherein the quantum data structure is a binary tree structure;

[0056] An output unit is used to transfer the data stored in the leaf node to the next layer of leaf nodes through the quantum circuit according to the address information, until the quantum state data f corresponding to the address information is outputted at the root node in the binary tree structure. k (x) to determine the state estimation parameters Where n=log2N.

[0057] Yet another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, wherein the computer program is configured to execute any of the above methods when running.

[0058] Yet another embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any of the methods described above.

[0059] Compared with the prior art, the present invention first obtains a group of quantum bits and information of the nonlinear equation group F(x)=0 to be processed, and determines the initial approximate solution x of the nonlinear equation group. 0and preset precision value∈ and construct a quantum circuit representing the evolution of the quantum state of the approximate solution of the nonlinear system of equations, perform the evolution operation of the quantum state on the quantum circuit, obtain the quantum state of the evolved quantum circuit, update the current approximate solution according to the quantum state, determine the state estimation parameter of the nonlinear system of equations, and judge the relationship between the state estimation parameter and the preset precision value. If the state estimation parameter is greater than the preset precision value, return to execute: construct a quantum circuit representing the evolution of the quantum state of the approximate solution of the nonlinear system of equations, perform the evolution operation of the quantum state on the quantum circuit, and obtain the quantum state of the evolved quantum circuit, until the state estimation parameter is less than or equal to the preset precision value, determine the solution of the nonlinear system according to the target quantum state of the evolved quantum circuit, and use the superposition characteristic of quantum to realize a solution technology that can satisfy the nonlinear system, which is used for solving the nonlinear system, reduces the complexity and difficulty of solving the nonlinear system, and fills the related technical gaps in the field of quantum computing. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 It is a hardware structure block diagram of a computer terminal for a method for solving a nonlinear equation system based on quantum circuits provided in an embodiment of the present invention;

[0061] Figure 2 It is a flowchart of a method for solving a nonlinear equation system based on quantum circuits provided by an embodiment of the present invention;

[0062] Figure 3 is a schematic diagram of a quantum circuit about T provided by an embodiment of the present invention;

[0063] Figure 4 is a schematic diagram of a quantum circuit for a walking operator W provided in an embodiment of the present invention;

[0064] Figure 5 is a schematic diagram of a quantum circuit for implementing a quantum linear solver provided by an embodiment of the present invention;

[0065] Figure 6 It is a schematic diagram of the structure of a device for solving a nonlinear equation system based on quantum circuits provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0066] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, but should not be construed as limiting the present invention.

[0067] The embodiment of the present invention first provides a method for solving a nonlinear equation system based on quantum circuits. The method can be applied to electronic devices such as computer terminals, specifically ordinary computers, quantum computers, etc.

[0068] The following describes it in detail by taking running on a computer terminal as an example. Figure 1 The hardware structure block diagram of a computer terminal for solving a nonlinear equation system based on quantum circuits provided by an embodiment of the present invention. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the computer terminal may also include a transmission device 106 for communication functions and an input and output device 108. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0069] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / modules corresponding to the implementation of a method for solving a nonlinear system of equations based on quantum circuits in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to a computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0070] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0071] It should be noted that a true quantum computer is a hybrid structure, which consists of two parts: one part is a classical computer, which is responsible for performing classical calculations and control; the other part is a quantum device, which is responsible for running quantum programs and thus realizing quantum computing. A quantum program is a sequence of instructions written in a quantum language such as QRunes that can be run on a quantum computer, which supports quantum logic gate operations and ultimately realizes quantum computing. Specifically, a quantum program is a sequence of instructions that operate quantum logic gates in a certain sequence.

[0072] In practical applications, due to the limitations of the development of quantum device hardware, quantum computing simulation is usually required to verify quantum algorithms, quantum applications, etc. Quantum computing simulation is the process of simulating the operation of quantum programs corresponding to specific problems using a virtual architecture (i.e., quantum virtual machine) built with the resources of ordinary computers. Usually, it is necessary to build a quantum program corresponding to a specific problem. The quantum program referred to in the embodiment of the present invention is a program written in a classical language to characterize quantum bits and their evolution, in which quantum bits, quantum logic gates, etc. related to quantum computing are represented by corresponding classical codes.

[0073] Quantum circuits, as a manifestation of quantum programs, are also called quantum logic circuits. They are the most commonly used general quantum computing model. They represent circuits that operate on quantum bits in an abstract concept. They are composed of quantum bits, circuits (timelines), and various quantum logic gates. Finally, the results often need to be read out through quantum measurement operations.

[0074] Unlike traditional circuits that are connected by metal wires to transmit voltage or current signals, in quantum circuits, the circuits can be seen as connected by time, that is, the state of the quantum bit evolves naturally over time, following the instructions of the Hamiltonian operator until it encounters a logic gate and is operated.

[0075] A quantum program as a whole corresponds to a total quantum circuit. The quantum program described in the present invention refers to the total quantum circuit, wherein the total number of quantum bits in the total quantum circuit is the same as the total number of quantum bits in the quantum program. It can be understood that a quantum program can be composed of a quantum circuit, measurement operations on quantum bits in the quantum circuit, registers for storing measurement results, and control flow nodes (jump instructions). A quantum circuit can contain dozens, hundreds, or even thousands of quantum logic gate operations. The execution process of a quantum program is the process of executing all quantum logic gates in a certain time sequence. It should be noted that the time sequence is the time order in which a single quantum logic gate is executed.

[0076] It should be noted that in classical computing, the most basic unit is the bit, and the most basic control mode is the logic gate, which can achieve the purpose of controlling the circuit through the combination of logic gates. Similarly, the way to process quantum bits is quantum logic gates. Using quantum logic gates, quantum states can evolve. Quantum logic gates are the basis of quantum circuits. Quantum logic gates include single-bit quantum logic gates, such as Hadamard gates (H gates), Pauli-X gates (X gates), Pauli-Y gates (Y gates), Pauli-Z gates (Z gates), RX gates, RY gates, RZ gates, etc.; multi-bit quantum logic gates, such as CNOT gates, CR gates, iSWAP gates, Toffoli gates, etc. Quantum logic gates are generally represented by unitary matrices, which are not only in matrix form, but also an operation and transformation. The effect of a general quantum logic gate on a quantum state is calculated by multiplying the unitary matrix on the left by the matrix corresponding to the right vector of the quantum state.

[0077] Those skilled in the art will understand that in classical computers, the basic unit of information is a bit, which has two states, 0 and 1. The most common physical implementation is to represent these two states by the level of the voltage. In quantum computing, the basic unit of information is a quantum bit, which also has two states, 0 and 1, denoted as |0> and |1>, but it can be in a superposition state of the two states, 0 and 1, which can be represented as Among them, a and b are complex numbers representing the amplitude (probability amplitude) of the |0> state and |1> state, which are not available in classical bits. After measurement, the state of the quantum bit will collapse to a certain state (eigenstate, here |0> state, |1> state), where the probability of collapsing to |0> is |a| 2 , the probability of collapsing to |1> is |b| 2 , |a| 2 +|b| 2 =1, |> is the Dirac symbol.

[0078] Quantum state refers to the state of a quantum bit. Its eigenstate is represented by binary in quantum algorithms (or quantum programs). For example, a group of quantum bits is q0, q1, q2, which represent the 0th, 1st, and 2nd quantum bits. The order from high to low is q2q1q0. The quantum state of this group of quantum bits is 2 3 The superposition state of eigenstates, 8 eigenstates (determined states) are: |000>, |001>, |010>, |011>, |100>, |101>, |110>, |111>, each eigenstate corresponds to the same quantum bit, such as |000> state, 000 corresponds to q2q1q0 from high to low. In short, the quantum state is a superposition state composed of eigenstates. When the probability amplitude of other states is 0, it is in one of the determined eigenstates.

[0079] See also Figure 2 , Figure 2 A schematic flow chart of a method for solving a nonlinear system of equations based on quantum circuits provided in an embodiment of the present invention may include the following steps:

[0080] S201: Obtain information of a group of quantum bits and a nonlinear equation group to be processed F(x)=0.

[0081] A nonlinear equation is one in which the relationship between the dependent variable and the independent variable is not linear. For example, the system of equations contains square relationships, logarithmic relationships, exponential relationships, trigonometric function relationships, etc. It is often difficult to obtain an exact solution to such equations, and approximate solutions are often required.

[0082] Specifically, it includes respectively obtaining a set of quantum bits and a first vector x constructed by the independent variables of the nonlinear equation group and a second vector F(x) constructed by the dependent variables in the nonlinear equation group F(x)=0, wherein the N is the dimension of the nonlinear equation system.

[0083] The information of the nonlinear equation group to be processed also includes: the Jacobian matrix F′(x) and the matrix A for preprocessing constructed according to the second vector, wherein the The matrix |F′(x)| max is the maximum value of the elements of the Jacobian matrix F′(x).

[0084] For example, for the nonlinear system x1+sinx2=2, at this time N=2, in f2(x)=x1+sinx2-2=0.

[0085] Among them, the Jacobian matrix used for preprocessing matrix |F′(x)| max Represents the maximum value of the elements of the Jacobian matrix F′(x).

[0086] It should be noted that the above examples use a smaller dimension of the nonlinear equation group just to facilitate the subsequent illustrations. In actual engineering applications, the dimension of the nonlinear equation group to be solved is often larger, and the complexity also increases accordingly.

[0087] S202: Determine the initial approximate solution x of the nonlinear equation system 0 and a preset precision value ∈ and construct a quantum circuit representing the quantum state evolution of an approximate solution to a nonlinear equation group, perform a quantum state evolution operation on the quantum circuit, and obtain the quantum state of the evolved quantum circuit.

[0088] Specifically, we first determine the initial approximate solution x of the nonlinear equations 0 (as an approximation of the true solution) and a preset precision value ∈, where the value of ∈ can be customized according to user needs and is generally set to 10 -6 .

[0089] Exemplarily, following the above example, determine the initial approximate solution x of the nonlinear equation system 0 =(1,1), then we can get Then the matrix

[0090] A quantum circuit representing the quantum state evolution of an approximate solution to a nonlinear equation group is constructed, and a quantum state evolution operation is performed on the quantum circuit to obtain the quantum state of the quantum circuit after evolution.

[0091] Specifically, the quantum circuits representing the quantum state evolution of the initial approximate solution of the nonlinear equations include Oracle A1 、OracleO A2 and OracleO b , the Oracle A1 、OracleO A2 and OracleO b Used to achieve:

[0092] O A1 |j,l>=|j,h(j,l)>

[0093]

[0094]

[0095] Where h(j,l) represents the column number of the lth non-zero element in the jth row of matrix A, C b is the norm of F(x).

[0096] Specifically, the Oracle A1 、OracleO A2 and OracleO b Based on Oracle f1 、OracleO f2 Sure;

[0097] Among them, the Oracle f1 For extracting the subscript information of the independent variable in the ith function of the nonlinear equation system, the Oracle f1 The role is:

[0098] O f1 |i,j>=|i,f(i,j)>

[0099] Where i = 1, 2, ..., N, j = 1, 2, ..., d, and f(i, j) represents f i The subscript of the j-th variable of (x), d is the sparsity of the Jacobian matrix, that is, the number of non-zero elements in any row and column of F′(x) does not exceed d;

[0100] The Oracle f2 For calculating the value of the ith function of the nonlinear equations, the Oracle f2 The role is:

[0101] O f2 |i>|x (i) >|0>=|i>|x (i) >|f i (x (i) )>

[0102] Where i = 1, 2, .., N, and the value of f(i, j) is determined by the difference format, x (i) Indicates that in f i The relevant x in (x) j .

[0103] S203: updating the current approximate solution according to the quantum state, determining the state estimation parameters of the nonlinear equation group, and judging the magnitude relationship between the state estimation parameters and the preset precision value.

[0104] Specifically, the initial approximate solution x of the nonlinear system has been determined 0 (as an approximation of the true solution), and then iterate. Assuming that the iteration reaches the kth step, update the current approximate solution to obtain x k ,F(x k ), so according to

[0105] x k+1 =x k -[F′(x k )] -1 F(x k )

[0106] In this process, it is necessary to solve a system of linear equations

[0107] F′(x k )Δx k =-F(x k )

[0108] The above formula can be transformed into

[0109] x k+1 =x k +Δx k

[0110] Continue iterating until F(x k+1 ) is less than a given preset precision value.

[0111] Specifically, at each iteration, a linear system needs to be constructed

[0112] AΔx=-|b>

[0113] Based on the constructed |b>, A and the corresponding Oracle, the Quantum Linear System Solver (QLSS) is used to solve the linear system. The input of QLSS is OracleO b , O A1 and O A2 , solve the linear system by QLSS to obtain its normalized solution |Δx>, where

[0114] Determining state estimation parameters of the nonlinear equation group includes:

[0115] According to a pre-constructed quantum data structure for accessing quantum data, the quantum states of the first-layer leaf nodes distributed and stored in the quantum data structure and the x represented by them are determined. i and f i (x) address information; wherein the quantum data structure is a binary tree structure.

[0116] Preset|M F > is quantum data, which is used to convert classical data into quantum data (as an intermediate storage for converting classical data into quantum data), |M F >The data structure is similar to the QRAM quantum data structure, both of which are binary tree structures. Determine the distribution and store it in the quantum data structure |M F >The quantum state of the first layer leaf node and its x i and f i (x) address information. Specifically, |M F >In quantum data, each node stores x i and f i (x), in each internal node, the relevant x from the next layer is saved i and f i The square root of the sum of the squares of (x), so the root node stores ‖x‖ and ‖F(x)‖. In each iteration of solving the nonlinear equation system, the data structure |M is updated F >The relevant data about x and F(x) in the leaf nodes of |M F >The internal nodes in the quantum data are also automatically updated.

[0117] Specifically, given an N-dimensional quantum data |M F >, which has the following properties:

[0118] In Quantum Data | M F >, extract x i , the process can be expressed as:

[0119] O M1 |M F >|i>|0>=|M F >|i>|x i >,i=0,1,…,N-1

[0120] In Quantum Data | M F >, extract f i (), the process can be expressed as:

[0121] O M2 |M F >|i>|0>=|M F >|i>|f i (x)>,i=0,1,…,N-1

[0122] In Quantum Data | M F >, extract the norm of the x sequence in the quantum data structure, the process can be expressed as:

[0123] O M3 |M F >|i>|j>=|M F >|i>|j>|d ijx >,i=0,1,…,n; j=0,1,…,2 i -1

[0124] In Quantum Data | M F >, extract the norm of the F(x) sequence in the quantum data structure, the process can be expressed as:

[0125] O M4 |M F >|i>|j>=|M F >|i>|j>|d ijy >,i=0,1,…,n; j=0,1,…,2 i -1

[0126] Among them, O M1 , O M2 , O M3 , O M4 They are all Oracle modules that can realize specific functions. ijx d ijy Represents the x stored in the nodei and f i (x), And d 00x =‖x‖,d 00y =‖F(x)‖.

[0127] According to the address information, the data stored in the leaf node is transferred to the next layer of leaf nodes through the quantum circuit until the quantum state data f corresponding to the address information is outputted at the root node in the binary tree structure. k (x) to determine the state estimation parameters Among them, n=log2N, and finally determine the relationship between the state estimation parameter ‖F(x)‖ and the preset accuracy value ∈.

[0128] S204: If the state estimation parameter is greater than the preset precision value, return to the execution of: constructing a quantum circuit representing the quantum state evolution of the approximate solution of the nonlinear equation group, performing a quantum state evolution operation on the quantum circuit, and obtaining the quantum state of the evolved quantum circuit, until the state estimation parameter is less than or equal to the preset precision value.

[0129] Specifically, if ‖F(x)‖>∈, the process returns to step S202 until the state estimation parameter ‖F(x)‖ is less than or equal to the preset accuracy value ∈.

[0130] Specifically, assume that k steps have been executed and |M has been updated F (x k )>, using the Oracle module in solving linear systems Respectively Input the quantum linear system solver to obtain |Δx k >, using the quantum state sampling algorithm to obtain And calculate |Δx k >The normalization constant Update|M F (x k )> to |M F (x k+1 )>, and finally determine the relationship between the state estimation parameter ‖F(x)‖ and the preset accuracy value ∈. At this time, if ||F(x k +1 )‖>∈, then return to step S202 and continue the iterative process of k+1 steps until the state estimation parameter ‖F(x k+1 )||≤∈.

[0131] It should be noted that the quantum state sampling algorithm is used to obtain And calculate |Δx k >The normalization constant in:

[0132]

[0133]

[0134] from The changed f can be calculated i (x), and update f i (x).

[0135] S205: Determine the solution of the nonlinear equation group according to the target quantum state of the evolved quantum circuit.

[0136] Specifically, if ‖F(x)‖<∈, stop the iteration and obtain the quantum data |M that meets the iteration stop condition F >, and obtain the target quantum state of the evolved quantum circuit, which preserves the solution of the nonlinear equations.

[0137] In quantum applications, an Oracle or Oracle combination is constructed, and the internal principle of the Oracle or combination is the method flow of the present invention. Specifically, Oracle can be understood as a module (similar to a black box) that completes a specific function in a quantum algorithm, and there will be a specific implementation method in a specific problem.

[0138] At present, the existing quantum circuit construction can often only use existing single quantum logic gates, double quantum logic gates, etc., which usually have the following problems:

[0139] For quantum circuits with more complex functions, a large number of quantum bits will be needed, and using classical computers for simulation will consume a huge amount of memory space, require a large number of logic gates, and take a long time to simulate. In addition, some complex algorithms are difficult to implement using quantum circuits.

[0140] Based on this, specific complex functions are implemented by using Oracle simulation, and controlled and transposed conjugate operations are implemented. The parameters that users pass into Oracle can include: Oracle name (used to identify the functional purpose of Oracle, such as Oracle name, ... A1 ), quantum bits, matrix elements, and so on.

[0141] The advantage of this approach is that the Oracle is treated as a known module as a whole, and there is no need to pay attention to its internal implementation details. In quantum application scenarios such as the representation of quantum circuits, it is very simple and clear. Since the Oracle functional module of classical simulation can be equivalent to quantum logic gates, the constructed quantum circuit can be simplified, thus saving the memory space required for runtime and speeding up the simulation verification of quantum algorithms.

[0142] It should be noted that solving a linear system is equivalent to solving the inverse of the coefficient matrix. This application provides a method for solving the approximate inverse of a matrix through a linear combination of algorithms, and uses the linear combination of Chebyshev polynomials to approximate the inverse of the matrix.

[0143] See Figure 3 , Figure 3 which is a schematic diagram of a quantum circuit for T provided by an embodiment of the present invention. Those skilled in the art can understand that H represents the H gate, O A1 , O A2 , M represent Oracles with different functions, and the T module represents the overall functional module of the combination of the H gate and each Oracle. The function of the T module is to transform |j> into |Ψ j >. Moreover, the matrix input to the T module is an N-order matrix, and the constructed T module can be equivalent to a quantum logic gate in the quantum circuit, and its matrix form is: ∑ j∈[N] |Ψ j ><j|, where <j| is the left ket of the quantum state.

[0144] Specifically, using the H gate, a superposition state is constructed:

[0145] O A1 to achieve the transformation:

[0146] O A2 to achieve the transformation:

[0147] Execute the M operator controlled by A jl , that is, M achieves the transformation: where M can be defined as:

[0148]

[0149] Apply O A2 again to recycle the qubit encoding |A jl >, and then output |0>.

[0150] It should be noted that this schematic diagram only shows the part of the quantum circuit related to this application. The marks and connection relationships in the figure are only examples and do not constitute a limitation to the present invention.

[0151] See Figure 4 , Figure 4A schematic diagram of a quantum circuit for a walking operator W provided in an embodiment of the present invention. It can be understood by those skilled in the art that any simple function can be linearly approximated as a linear combination of other functions, and the inverse function of the matrix can be approximated by Chebyshev polynomials. Specifically as follows:

[0152]

[0153] F=∑ i α i G i ,α:=∑ i α i , r = m + t, and

[0154] In this application, we need to find the inverse matrix, which satisfies O(‖A -1 -F‖)=∈. The linear combination is:

[0155]

[0156] Here b=κ 2 log(κ / ∈), g(x) is 2∈,

[0157] In D κ :=(-1,-1 / κ)∪(1 / κ,1). is a Chebyshev polynomial of the first kind.

[0158] Quantum walk: In order to realize Chebyshev polynomials, it is necessary to do it in the quantum walk framework.

[0159] Because quantum walks are performed in space Some states in On the top, define a mapping from arrive

[0160]

[0161] And the walk operator:

[0162]

[0163] Operator S executes The flipping operation of the product state in . So we have:

[0164]

[0165] is a Chebyshev polynomial of the first kind.

[0166] It should be noted that, in the form as described above |Ψ j >, a combination of a vertical line and angle brackets is used to describe a quantum state, indicating that the quantum state is a vector (referred to as a state vector, basis vector, etc.). |Ψ j > represents a ket vector, and <Ψ j | represents a bra vector.

[0167] Exemplarily, for example Figure 4 as shown, illustrate the quantum circuit of the walk operator W. Because S can be constructed from a group of commutation operations (for example, a SWAP gate, Figure 4 the symbol connecting two bold Xs in a qubit represents a SWAP gate), and the remaining is

[0168] In order to construct the unitary operator form of T is required. Define the unitary operator T u should satisfy:

[0169] T u |j>|0> = |Ψ j >

[0170] Therefore, there is:

[0171]

[0172] Among them,

[0173]

[0174] and: K = 2|0><0| - I 2N .

[0175] Refer to Figure 5 , Figure 5 which is a schematic diagram of a quantum circuit for implementing a quantum linear solver provided by an embodiment of the present invention.

[0176] Specifically, in the schematic diagram of the quantum circuit as Figure 5 shown, V and T represent Oracles with different functions, represents the conjugate transpose, T represents the overall functional module T composed of the H gate and each Oracle. The function of the T module is to transform |j> into |Ψ j >. And the matrix obtained by inputting to this T module is an N-order matrix. The constructed T module in the quantum circuit can be equivalent to a quantum logic gate, and its matrix form is: ∑ j∈[N] |Ψ j ><j|, where <j| is the bra vector of the quantum state. As Figure 5 shown, the quantum circuit can execute the transformation of the quantum state from |b> to |A-1 b>, specifically, run the entire quantum circuit and measure |j> and |anc>. When |j> and |anc> both collapse to |0>, |A can be obtained in the second register. -1 b>.

[0177] A quantum oracle is a black box that represents a transition of some quantum state. A typical example of a quantum oracle is the linear system: O|x>|0>=|x>|f(x)>, where the calculation of f(x) uses the first quantum register as input and the second quantum register as output. Another example is that QRAM can be considered as an oracle. Many quantum algorithms use Oracles, and many quantum algorithms use Oracles, but they don't care about the implementation of Oracle, which can be decomposed into quantum gates or QRAM. In QPanda, this can be defined using the "Oracle" function. Oracle is considered to have a user-provided name.

[0178] It can be seen that the present application encodes the matrix and vector information of the nonlinear system into the quantum state, links the classical data structure with the quantum state in the quantum field, and performs the evolution operation of encoding the classical data structure into the quantum state to obtain the quantum state of the evolved quantum circuit. It can utilize the superposition characteristics of quantum to accelerate the solution of nonlinear systems with higher complexity and expand the simulation application scenarios of quantum computing.

[0179] Compared with the prior art, the present invention first obtains a group of quantum bits and information of the nonlinear equation group F(x)=0 to be processed, and determines the initial approximate solution x of the nonlinear equation group. 0 and preset precision value∈ and construct a quantum circuit representing the evolution of the quantum state of the approximate solution of the nonlinear system of equations, perform the evolution operation of the quantum state on the quantum circuit, obtain the quantum state of the evolved quantum circuit, update the current approximate solution according to the quantum state, determine the state estimation parameter of the nonlinear system of equations, and judge the relationship between the state estimation parameter and the preset precision value. If the state estimation parameter is greater than the preset precision value, return to execute: construct a quantum circuit representing the evolution of the quantum state of the approximate solution of the nonlinear system of equations, perform the evolution operation of the quantum state on the quantum circuit, and obtain the quantum state of the evolved quantum circuit, until the state estimation parameter is less than or equal to the preset precision value, determine the solution of the nonlinear system according to the target quantum state of the evolved quantum circuit, and use the superposition characteristic of quantum to realize a solution technology that can satisfy the nonlinear system, which is used for solving the nonlinear system, reduces the complexity and difficulty of solving the nonlinear system, and fills the related technical gaps in the field of quantum computing.

[0180] See also Figure 6 , Figure 6A schematic diagram of a nonlinear equation solving device based on quantum circuits provided in an embodiment of the present invention, and Figure 2 The process shown here corresponds to the following:

[0181] An acquisition module 601 is used to acquire information of a group of quantum bits and a nonlinear equation group to be processed F(x)=0;

[0182] Construction module 602 is used to determine the initial approximate solution x of the nonlinear equation system 0 and a preset precision value ∈ and construct a quantum circuit representing the quantum state evolution of an approximate solution of a nonlinear equation group, and perform a quantum state evolution operation on the quantum circuit to obtain the quantum state of the quantum circuit after evolution;

[0183] A judgment module 603 is used to update the current approximate solution according to the quantum state, determine the state estimation parameters of the nonlinear equation group, and judge the relationship between the state estimation parameters and the preset precision value;

[0184] Iteration module 604 is used for returning to execute the steps of constructing a quantum circuit representing the quantum state evolution of the approximate solution of the nonlinear equation group, performing a quantum state evolution operation on the quantum circuit, and obtaining the quantum state of the evolved quantum circuit, if the state estimation parameter is greater than the preset precision value, until the state estimation parameter is less than or equal to the preset precision value;

[0185] The determination module 605 is used to determine the solution of the nonlinear equation group according to the target quantum state of the evolved quantum circuit.

[0186] Specifically, the acquisition module includes:

[0187] An acquisition unit is used to acquire a first vector x constructed by the independent variables of the nonlinear equation group and a second vector F(x) constructed by the dependent variables, wherein the N is the dimension of the nonlinear equation system.

[0188] Specifically, the acquisition module further includes:

[0189] A construction unit, for constructing a Jacobian matrix F′(x) and a matrix A for preprocessing according to the second vector, wherein the The matrix |F′(x)| max is the maximum value of the elements of the Jacobian matrix F′(x).

[0190] Specifically, the building blocks include:

[0191] Oracle A1 Module, OracleOA2 Modules and OracleO b module, the Oracle A1 Module, OracleO A2 Modules and OracleO b Modules are used to implement:

[0192] O A1 |j,l>=|j,h(j,l)>

[0193]

[0194]

[0195] Where h(j,l) represents the column number of the lth non-zero element in the jth row of matrix A, C b is the norm of F(x).

[0196] Specifically, the Oracle A1 Module, OracleO A2 Modules and OracleO b Module based on OracleO f1 Module, OracleO f2 Module determination;

[0197] Among them, the Oracle f1 The module is used to extract the subscript information of the independent variable in the ith function of the nonlinear equation system, and the Oracle f1 The role is:

[0198] O f1 |i,j>=|i,f(i,j)>

[0199] Where i = 1, 2, ..., N, j = 1, 2, ..., d, and f(i, j) represents f i The subscript of the j-th variable of (x) is the sparsity of the Jacobian matrix;

[0200] The Oracle f2 The module is used to calculate the value of the ith function of the nonlinear equation system, and the Oracle f2 The role is:

[0201] O f2 |i>|x (i) >|0>=|i>|x (i) >|f i (x (i) )>

[0202] Among them, =1,2,..,N.

[0203] Specifically, the judgment module includes:

[0204] A storage unit, for determining the quantum states and x represented by the first-layer leaf nodes distributed and stored in the quantum data structure according to a pre-constructed quantum data structure for accessing quantum data. i and f i (x) address information; wherein the quantum data structure is a binary tree structure;

[0205] An output unit is used to transfer the data stored in the leaf node to the next layer of leaf nodes through the quantum circuit according to the address information, until the quantum state data f corresponding to the address information is outputted at the root node in the binary tree structure. k (x) to determine the state estimation parameters Where n=log2N.

[0206] Compared with the prior art, the present invention first obtains a group of quantum bits and information of the nonlinear equation group F(x)=0 to be processed, and determines the initial approximate solution x of the nonlinear equation group. 0 and preset precision value∈ and construct a quantum circuit representing the evolution of the quantum state of the approximate solution of the nonlinear system of equations, perform the evolution operation of the quantum state on the quantum circuit, obtain the quantum state of the evolved quantum circuit, update the current approximate solution according to the quantum state, determine the state estimation parameter of the nonlinear system of equations, and judge the relationship between the state estimation parameter and the preset precision value. If the state estimation parameter is greater than the preset precision value, return to execute: construct a quantum circuit representing the evolution of the quantum state of the approximate solution of the nonlinear system of equations, perform the evolution operation of the quantum state on the quantum circuit, and obtain the quantum state of the evolved quantum circuit, until the state estimation parameter is less than or equal to the preset precision value, determine the solution of the nonlinear system according to the target quantum state of the evolved quantum circuit, and use the superposition characteristic of quantum to realize a solution technology that can satisfy the nonlinear system, which is used for solving the nonlinear system, reduces the complexity and difficulty of solving the nonlinear system, and fills the related technical gaps in the field of quantum computing.

[0207] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.

[0208] Specifically, in this embodiment, the above storage medium may be configured to store a computer program for performing the following steps:

[0209] S201: Obtain information of a group of quantum bits and a nonlinear equation group to be processed F(x)=0;

[0210] S202: Determine the initial approximate solution x of the nonlinear equation system 0 and a preset precision value ∈ and construct a quantum circuit representing the quantum state evolution of an approximate solution of a nonlinear equation group, and perform a quantum state evolution operation on the quantum circuit to obtain the quantum state of the quantum circuit after evolution;

[0211] S203: updating the current approximate solution according to the quantum state, determining the state estimation parameters of the nonlinear equation group, and judging the magnitude relationship between the state estimation parameters and the preset precision value;

[0212] S204: if the state estimation parameter is greater than the preset precision value, return to the step of constructing a quantum circuit representing the quantum state evolution of the approximate solution of the nonlinear equation group, performing a quantum state evolution operation on the quantum circuit, and obtaining the quantum state of the evolved quantum circuit, until the state estimation parameter is less than or equal to the preset precision value;

[0213] S205: Determine the solution of the nonlinear equation group according to the target quantum state of the evolved quantum circuit.

[0214] Specifically, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0215] Compared with the prior art, the present invention first obtains a group of quantum bits and information of the nonlinear equation group F(x)=0 to be processed, and determines the initial approximate solution x of the nonlinear equation group. 0 and preset precision value∈ and construct a quantum circuit representing the evolution of the quantum state of the approximate solution of the nonlinear system of equations, perform the evolution operation of the quantum state on the quantum circuit, obtain the quantum state of the evolved quantum circuit, update the current approximate solution according to the quantum state, determine the state estimation parameter of the nonlinear system of equations, and judge the relationship between the state estimation parameter and the preset precision value. If the state estimation parameter is greater than the preset precision value, return to execute: construct a quantum circuit representing the evolution of the quantum state of the approximate solution of the nonlinear system of equations, perform the evolution operation of the quantum state on the quantum circuit, and obtain the quantum state of the evolved quantum circuit, until the state estimation parameter is less than or equal to the preset precision value, determine the solution of the nonlinear system according to the target quantum state of the evolved quantum circuit, and use the superposition characteristic of quantum to realize a solution technology that can satisfy the nonlinear system, which is used for solving the nonlinear system, reduces the complexity and difficulty of solving the nonlinear system, and fills the related technical gaps in the field of quantum computing.

[0216] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0217] Specifically, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0218] Specifically, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0219] S201: Obtain information of a group of quantum bits and a nonlinear equation group to be processed F(x)=0;

[0220] S202: Determine the initial approximate solution x of the nonlinear equation system 0 and a preset precision value ∈ and construct a quantum circuit representing the quantum state evolution of an approximate solution of a nonlinear equation group, and perform a quantum state evolution operation on the quantum circuit to obtain the quantum state of the quantum circuit after evolution;

[0221] S203: updating the current approximate solution according to the quantum state, determining the state estimation parameters of the nonlinear equation group, and judging the magnitude relationship between the state estimation parameters and the preset precision value;

[0222] S204: if the state estimation parameter is greater than the preset precision value, return to the step of constructing a quantum circuit representing the quantum state evolution of the approximate solution of the nonlinear equation group, performing a quantum state evolution operation on the quantum circuit, and obtaining the quantum state of the evolved quantum circuit, until the state estimation parameter is less than or equal to the preset precision value;

[0223] S205: Determine the solution of the nonlinear equation group according to the target quantum state of the evolved quantum circuit.

[0224] Compared with the prior art, the present invention first obtains a group of quantum bits and information of the nonlinear equation group F(x)=0 to be processed, and determines the initial approximate solution x of the nonlinear equation group. 0and preset precision value∈ and construct a quantum circuit representing the evolution of the quantum state of the approximate solution of the nonlinear system of equations, perform the evolution operation of the quantum state on the quantum circuit, obtain the quantum state of the evolved quantum circuit, update the current approximate solution according to the quantum state, determine the state estimation parameter of the nonlinear system of equations, and judge the relationship between the state estimation parameter and the preset precision value. If the state estimation parameter is greater than the preset precision value, return to execute: construct a quantum circuit representing the evolution of the quantum state of the approximate solution of the nonlinear system of equations, perform the evolution operation of the quantum state on the quantum circuit, and obtain the quantum state of the evolved quantum circuit, until the state estimation parameter is less than or equal to the preset precision value, determine the solution of the nonlinear system according to the target quantum state of the evolved quantum circuit, and use the superposition characteristic of quantum to realize a solution technology that can satisfy the nonlinear system, which is used for solving the nonlinear system, reduces the complexity and difficulty of solving the nonlinear system, and fills the related technical gaps in the field of quantum computing.

[0225] The above describes in detail the structure, features and effects of the present invention based on the embodiments shown in the drawings. The above is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the drawings. Any changes made according to the concept of the present invention, or modifications to equivalent embodiments with equivalent changes, which still do not exceed the spirit covered by the description and drawings, should be within the protection scope of the present invention.

Claims

1. A method for solving a nonlinear system of equations based on quantum circuits, characterized in that: include: Get a set of qubits and a set of nonlinear equations to be processed Information; wherein the first vector constructed by the independent variable of the nonlinear equation system and the second vector constructed from the dependent variable , , is the dimension of the nonlinear equation system; the Jacobian matrix for preprocessing constructed according to the second vector and matrix , wherein the , the matrix , is the Jacobian matrix The maximum value of an element; Determine an initial approximate solution to a system of nonlinear equations and preset precision values A quantum circuit representing the quantum state evolution of the approximate solution of the nonlinear equation group is constructed, and a quantum state evolution operation is performed on the quantum circuit to obtain the quantum state of the quantum circuit after evolution; wherein the quantum circuit includes an oracle 、Oracle and Oracle , the Oracle 、Oracle and Oracle Used to achieve: ; ;in, Representation Matrix No. Line The column numbers of the non-zero elements, for The norm of the Oracle 、Oracle and Oracle Oracle-based 、Oracle Determine; wherein the Oracle For extracting the nonlinear equations The Oracle The role is: ;in , express No. The subscript of a variable, is the sparsity of the Jacobian matrix; the Oracle For calculating the nonlinear equations The value of the function, the Oracle The role is: in ; updating the current approximate solution according to the quantum state, determining the state estimation parameters of the nonlinear equation group, and judging the magnitude relationship between the state estimation parameters and the preset precision value; If the state estimation parameter is greater than the preset precision value, return to execute: construct a quantum circuit representing the quantum state evolution of the approximate solution of the nonlinear equation group, perform a quantum state evolution operation on the quantum circuit, and obtain the quantum state of the evolved quantum circuit until the state estimation parameter is less than or equal to the preset precision value; The solution of the nonlinear equation group is determined according to the target quantum state of the evolved quantum circuit.

2. The method according to claim 1, characterized in that: Determining the state estimation parameters of the nonlinear equation group includes: According to a pre-constructed quantum data structure for accessing quantum data, the quantum states and the quantum states represented by the first-layer leaf nodes distributed and stored in the quantum data structure are determined. and The address information of the quantum data structure is a binary tree structure; According to the address information, the data stored in the leaf node is transferred to the next layer of leaf nodes through the quantum circuit until the quantum state data corresponding to the address information is output at the root node in the binary tree structure. , to determine the state estimation parameters ,in, .

3. A device for solving nonlinear equations based on quantum circuits, characterized in that: include: The acquisition module is used to obtain a set of quantum bits and a set of nonlinear equations to be processed. Information; wherein the first vector constructed by the independent variable of the nonlinear equation system and the second vector constructed from the dependent variable , , is the dimension of the nonlinear equation system; the Jacobian matrix for preprocessing constructed according to the second vector and matrix , wherein the , the matrix , is the Jacobian matrix The maximum value of an element; Building blocks for determining initial approximate solutions to nonlinear systems of equations and preset precision values A quantum circuit representing the quantum state evolution of the approximate solution of the nonlinear equation group is constructed, and a quantum state evolution operation is performed on the quantum circuit to obtain the quantum state of the quantum circuit after evolution; wherein the quantum circuit includes an oracle 、Oracle and Oracle , the Oracle 、Oracle and Oracle Used to achieve: ; ;in, Representation Matrix No. Line The column numbers of the non-zero elements, for The norm of the Oracle 、Oracle and Oracle Oracle-based 、Oracle Determine; wherein the Oracle For extracting the nonlinear equations The Oracle The role is: ;in , express No. The subscript of a variable, is the sparsity of the Jacobian matrix; the Oracle For calculating the nonlinear equations The value of the function, the Oracle The role is: in ; A judgment module, used to update the current approximate solution according to the quantum state, determine the state estimation parameters of the nonlinear equation group, and judge the relationship between the state estimation parameters and the preset accuracy value; an iterative module, configured to return to execute, if the state estimation parameter is greater than the preset precision value: constructing a quantum circuit representing the quantum state evolution of the approximate solution of the nonlinear equation group, performing a quantum state evolution operation on the quantum circuit, and obtaining the quantum state of the evolved quantum circuit, until the state estimation parameter is less than or equal to the preset precision value; A determination module is used to determine the solution of the nonlinear equation group according to the target quantum state of the evolved quantum circuit.

4. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 2 when executed.

5. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 2.

Citation Information

Patent Citations

  • Hybrid quantum-classical computer for variational coupled cluster method

    CA3112351A1

  • Method for evaluating quantum operator averages

    US8612499B1