A fluid state update method and related apparatus based on quantum Newton's method

By using quantum Newton's method to transform fluid states and quantum computing circuits to update fluid states, the problem of high resource consumption in three-dimensional variational data assimilation by classical computers is solved, and efficient high-dimensional data assimilation is achieved.

CN117113874BActive Publication Date: 2026-11-17ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311040341.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-17
Publication Date
2026-11-17
Estimated Expiration
2043-08-17

AI Technical Summary

Technical Problem

Classical computers consume enormous computational resources and are inefficient when performing three-dimensional variational data assimilation, making it difficult to effectively process high-dimensional data.

Method used

A fluid state update method based on quantum Newton's method is adopted. By differentiating the objective function, it is transformed into a system of linear equations for iterative steps. Quantum computing is used to construct a quantum circuit for solving the system of linear equations and update the state to be optimized until the gradient of the objective function converges.

Benefits of technology

It significantly improves the data assimilation efficiency of high-dimensional data, achieves high-precision data assimilation through a finite number of iterations, reduces time complexity, and can still calculate the initial state when the prior estimate is inaccurate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117113874B_ABST
    Figure CN117113874B_ABST
Patent Text Reader

Abstract

This invention discloses a fluid state update method and related apparatus based on the quantum Newton's method, applied in the field of data assimilation technology. The method includes: differentiating the objective function for the three-dimensional variational data assimilation of the state to be optimized, obtaining the nonlinear equation of the state to be optimized when the gradient of the objective function is zero; transforming the nonlinear equation into a system of linear equations corresponding to the iteration steps based on the quantum Newton's method, with the value of the state to be optimized in the system of linear equations corresponding to the first iteration step being a preset initial solution; constructing a quantum circuit for solving the system of linear equations, running the quantum circuit to obtain the state increment, and updating the value of the state to be optimized to the objective sum value; determining whether the gradient of the objective function converges at the objective sum value, and if converged, stopping the update of the value of the state to be optimized. Based on the quantum Newton's method, high-dimensional data can be assimilated with high precision in a finite number of iterations, greatly reducing the time complexity and effectively improving the data assimilation efficiency of high-dimensional data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data assimilation technology, specifically a fluid state update method and related apparatus based on quantum Newton's method. Background Technology

[0002] Data assimilation refers to the fusion of existing knowledge about a system with its observational data; this fusion method is called data assimilation. Data assimilation has a wide range of applications, such as weather forecasting, oil extraction, traffic control, image processing, and epidemic prediction. Computational fluid dynamics is a product of the combination of modern fluid dynamics, numerical mathematics, and computer science. Starting from computational methods, it utilizes the computing power of electronic computers and applies various discretized mathematical methods to solve various problems in fluid mechanics.

[0003] For example, actual weather forecasting involves two core processes: model calculation and data assimilation. Dee et al. from the European Centre for Medium-Range Weather Forecasts (ECMWF) assessed the ERA-Interim reanalysis dataset and concluded that 75% of the improvements in weather forecasting over the past 30 years have stemmed from advancements in data assimilation techniques, demonstrating the crucial role of data assimilation in weather forecasting.

[0004] In the field of computational fluid dynamics, data assimilation is typically performed on high-dimensional data. Therefore, classical computers consume enormous computational resources and exhibit low assimilation efficiency when performing three-dimensional variational data assimilation. Quantum computers, on the other hand, are physical devices that perform high-speed mathematical and logical operations, store and process quantum information according to the laws of quantum mechanics. They possess a significantly higher efficiency in processing mathematical problems than classical computers. Therefore, using quantum computing to accelerate the data assimilation process has significant research and application value. Summary of the Invention

[0005] The purpose of this invention is to provide a fluid state update method and related apparatus based on the quantum Newton method, thereby improving the data assimilation efficiency of high-dimensional data through the exponential acceleration effect of quantum computing.

[0006] One embodiment of the present invention provides a fluid state update method based on the quantum Newton method, the method comprising:

[0007] The objective function of the three-dimensional variational data assimilation of the state to be optimized is differentiated to obtain the nonlinear equation of the state to be optimized when the gradient of the objective function is zero. The state to be optimized is the state of the simulation model of the real fluid system at the initial time. The objective function represents the distance between the state to be optimized and the real state of the real fluid system at the initial time.

[0008] The nonlinear equation is transformed into a system of linear equations corresponding to the iteration step based on the quantum Newton method. The number of linear equations in the system of linear equations is equal to the dimension of the state to be optimized. The value of the state to be optimized in the system of linear equations corresponding to the first iteration step is a preset initial solution.

[0009] Construct a quantum circuit to solve the linear equation system, run the quantum circuit to obtain the state increment, and update the value of the state to be optimized to the target sum value, wherein the target sum value is the sum of the value of the state to be optimized in the linear equation system corresponding to the iteration step and the state increment;

[0010] Determine whether the gradient of the objective function converges at the target value. If it converges, stop updating the value of the state to be optimized.

[0011] Optionally, the method further includes:

[0012] If convergence fails, return to the step of transforming the nonlinear equation into a system of linear equations corresponding to the iterative step using the quantum Newton method, until the gradient of the objective function converges at the target sum value.

[0013] Optionally, determining whether the gradient of the objective function converges at the target and the sum of values ​​includes:

[0014] Calculate the gradient of the objective function at the target and the value, and compare the norm of the function value with the preset calculation precision.

[0015] If the norm of the function value is not greater than the preset calculation precision, the gradient of the objective function is determined to converge at the target sum value;

[0016] If the norm of the function value is greater than the preset calculation precision, it is determined that the gradient of the objective function does not converge at the target sum value.

[0017] Optionally, the quantum circuit includes a first sub-quantum circuit, a second sub-quantum circuit, a third sub-quantum circuit, and a fourth sub-quantum circuit, wherein:

[0018] The first sub-quantum circuit is used to prepare the quantum state of the residual term of the linear equation system;

[0019] The second sub-quantum circuit is used to prepare the quantum state of the coefficient matrix of the linear equation system;

[0020] The third sub-quantum circuit is used to execute a quantum linear algorithm to evolve the quantum state of the residual term and the quantum state of the coefficient matrix to obtain the quantum state of the state increment.

[0021] The fourth sub-quantum circuit is used to execute the quantum state tomography algorithm, which converts the quantum state of the state increment into the classical data of the state increment.

[0022] Optionally, the data of the state to be optimized is stored in a quantum random access memory (QRAM). The QRAM has a binary tree structure and includes n levels of subtree nodes and 1 level of leaf nodes, wherein:

[0023] Each leaf node is used to store one dimension of the state to be optimized, and the gradient value of the objective function for that dimension.

[0024] Each subtree node is used to store the norm of all the dimensional data below the subtree node and the norm of all the gradient values ​​below the subtree node. The total number of subtree nodes n satisfies: n = [logN], where N is the total number of dimensions of the state to be optimized.

[0025] Optionally, the quantum state |b> of the residual term of the linear equation system satisfies:

[0026]

[0027] The quantum state |A> of the coefficient matrix of the linear equation system satisfies:

[0028]

[0029] Where F(x) is the gradient function of the objective function, ||F(x)||² is the norm of F(x) in the data structure, and F′(x) is the Jacobian matrix of F(x), specifically in the form:

[0030]

[0031] The elements in F′(x) are obtained by the following finite difference method:

[0032]

[0033] i represents the data dimension of the state to be optimized, j represents the row label of the coefficient matrix, k represents the column label of the coefficient matrix, and j, k, i ∈ [0, N-1].

[0034] Optionally, before constructing the quantum circuit for solving the linear equations, the method further includes:

[0035] Query the data structure of the QRAM, and construct the controlled gate O in the first sub-quantum circuit based on the data stored in the leaf nodes and the subtree nodes. b And the quantum logic gate O in the second sub-quantum circuit A1Quantum logic gates O A2 ,in:

[0036] The controlled gate O b Quantum states used to encode the residual terms of the linear equation system

[0037] The quantum logic gate O A1 A quantum state |j,k> is used to encode the position information of the non-zero elements in the coefficient matrix of the linear equation system within the coefficient matrix.

[0038] The quantum logic gate O A2 Quantum states used to encode the non-zero elements in the coefficient matrix of the linear equation system

[0039] Optionally, updating the value of the state to be optimized to the target value includes:

[0040] For each leaf node, update one dimension of the state to be optimized stored in that leaf node based on the target and value, and update the gradient value of the objective function of that dimension data;

[0041] For each subtree node, calculate the square root of the sum of squares of all the dimensional data below that subtree node, as the norm of the dimensional data, and calculate the square root of the sum of squares of all the gradient values ​​below that subtree node, as the norm of the gradient values.

[0042] Another embodiment of the present invention provides a fluid state update device based on the quantum Newton method, the device comprising:

[0043] Gradient calculation module: used to differentiate the objective function of the three-dimensional variational data assimilation of the state to be optimized, and to obtain the nonlinear equation of the state to be optimized when the gradient of the objective function is zero. The state to be optimized is the state of the simulation model of the real fluid system at the initial time. The objective function represents the distance between the state to be optimized and the real state of the real fluid system at the initial time.

[0044] The linearization module is used to transform the nonlinear equation into a system of linear equations corresponding to the iteration step based on the quantum Newton method. The number of linear equations in the system of linear equations is equal to the dimension of the state to be optimized. The value of the state to be optimized in the system of linear equations corresponding to the first iteration step is a preset initial solution.

[0045] A quantum computing module is used to construct a quantum circuit for solving the linear equation system, run the quantum circuit to obtain a state increment, and update the value of the state to be optimized to a target sum value, wherein the target sum value is the sum of the value of the state to be optimized in the linear equation system corresponding to the iteration step and the state increment;

[0046] The convergence judgment module is used to determine whether the gradient of the objective function converges at the target and the value. If it converges, the update of the value of the state to be optimized is stopped.

[0047] Another embodiment of the present invention provides a storage medium storing a computer program, wherein the computer program is configured to execute the method described in any of the preceding claims when running.

[0048] Another embodiment of the present invention 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 perform the method described in any of the preceding claims.

[0049] Compared with existing technologies, the fluid state update method based on the quantum Newton method provided by this invention differentiates the objective function of the three-dimensional variational data assimilation of the state to be optimized, obtaining the nonlinear equation of the state to be optimized when the gradient of the objective function is zero. The state to be optimized is the state of the simulation model of the real fluid system at the initial moment, and the objective function represents the distance between the state to be optimized and the real state of the real fluid system at the initial moment. Based on the quantum Newton method, the nonlinear equation is transformed into a system of linear equations corresponding to the iteration step. The number of linear equations in the system of linear equations is equal to the dimension of the state to be optimized. The value of the state to be optimized in the system of linear equations corresponding to the first iteration step is a preset initial solution. A quantum circuit for solving the system of linear equations is constructed, the quantum circuit is run to obtain the state increment, and the value of the state to be optimized is updated to the target sum value. It is determined whether the gradient of the objective function converges at the target sum value, which is the sum of the value of the state to be optimized in the system of linear equations corresponding to the iteration step and the state increment. If convergence is achieved, the update of the value of the state to be optimized is stopped.

[0050] By transforming the optimization of the initial state of the simulation model into solving a system of linear equations representing the state increment in each iteration step, the true state at the initial moment can be gradually approximated as the number of iterations increases. Therefore, when using the quantum Newton method to process high-dimensional data, high-precision data assimilation can be achieved in a finite number of iterations, significantly reducing time complexity. Based on the near-exponential speedup of quantum computing, the efficiency of data assimilation for high-dimensional data is effectively improved. Furthermore, even when the prior estimated background field is inaccurate, the initial state can still be calculated through iterative optimization, demonstrating a very wide range of applications. Attached Figure Description

[0051] Figure 1 A network block diagram of a fluid state update system based on the quantum Newton method is provided for an embodiment of the present invention.

[0052] Figure 2 A schematic flowchart of a fluid state update method based on the quantum Newton method provided in an embodiment of the present invention;

[0053] Figure 3 A schematic diagram of a data structure for a quantum random access memory (QRAM) provided in an embodiment of the present invention;

[0054] Figure 4 A schematic diagram of a fluid state update device based on the quantum Newton method provided in an embodiment of the present invention;

[0055] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation

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

[0057] Figure 1 This is a network block diagram of a fluid state update system based on the quantum Newton method provided in an embodiment of the present invention. The fluid state update system based on the quantum Newton method may include a network 110, a server 120, a wireless device 130, a client 140, storage 150, a classical computing unit 160, a quantum computing unit 170, and may also include additional memory, a classical processor, a quantum processor, and other devices not shown.

[0058] Network 110 is a medium used to provide communication links between various devices and computers connected together within a fluid state update system based on the quantum Newton method, including but not limited to the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof, and the connection method can be wired, wireless communication links, or fiber optic cables.

[0059] Server 120, wireless device 130, and client 140 are conventional data processing systems that may contain data and application programs or software tools that perform conventional computational processes. Client 140 may be a personal computer or a network computer, so the data may also be provided by server 120. Wireless device 130 may be a smartphone, tablet, laptop, smart wearable device, etc. Storage unit 150 may include database 151, which can be configured to store data such as qubit parameters, quantum logic gate parameters, quantum circuits, and quantum programs.

[0060] The classical computing unit 160 (quantum computing unit 170) may include a classical processor 161 (quantum processor 171) for processing classical data (quantum data) and a memory 162 (memory 172) for storing classical data (quantum data). The classical data (quantum data) may be a boot file, an operating system image, and an application program 163 (application program 173). The application program 163 (application program 173) may be used to implement a quantum algorithm compiled according to the fluid state update method based on the quantum Newton method provided in the embodiments of the present invention.

[0061] Any data or information stored or generated in the classical computing unit 160 (quantum computing unit 170) can also be configured to be stored or generated in another classical (quantum) processing system in a similar manner, and any application executed therein can also be configured to be executed in another classical (quantum) processing system in a similar manner.

[0062] It should be noted that a true quantum computer has a hybrid structure, which includes at least... Figure 1 The system consists of two main parts: the classical computing unit 160, which is responsible for performing classical calculations and control; and the quantum computing unit 170, which is responsible for running quantum programs to achieve quantum computing.

[0063] The aforementioned classical computing unit 160 and quantum computing unit 170 can be integrated into a single device or distributed across two different devices. For example, a first device including the classical computing unit 160 runs a classical computer operating system, providing quantum application development tools and services, as well as the storage and network services required for quantum applications. Users develop quantum programs using the quantum application development tools and services on the second device, and send these quantum programs to a second device including the quantum computing unit 170 via the network services. The second device runs a quantum computer operating system, which parses and compiles the quantum program's code into instructions that the quantum processor 170 can recognize and execute. The quantum processor 170 then implements the quantum algorithm corresponding to the quantum program based on these instructions.

[0064] The computing units of the classic processor 161 within the classic computing unit 160 are based on CMOS transistors on a silicon chip. These computing units are not limited by time or coherence; that is, they are available at any time without time constraints. Furthermore, the number of such computing units in a silicon chip is sufficient; currently, a single classic processor 161 contains tens of thousands of computing units. Given this sufficient number of computing units and the fixed selectable computing logic of the CMOS transistors (e.g., AND logic), computational performance is achieved by combining a large number of CMOS transistors with a limited set of logic functions during operation.

[0065] In the quantum computing unit 170, the basic computing unit of the quantum processor 171 is the qubit. The input of a qubit is limited by coherence and coherence time; that is, a qubit is limited by its available usage time and is not always readily available. Making full use of qubits within their available usage time is a key challenge in quantum computing. Furthermore, the number of qubits in a quantum computer is one of the representative indicators of its performance. Each qubit performs computational functions through on-demand configured logical functions. Given the limited number of qubits and the diverse logical functions available in quantum computing, such as Hadamard gates (H gates), Pauli-X gates (X gates), Pauli-Y gates (Y gates), Pauli-Z gates (Z gates), X gates, RY gates, RZ gates, CNOT gates, CR gates, iSWAP gates, Tofoli gates, etc., quantum computing requires combining a limited number of qubits with diverse logical function combinations to achieve computational effects.

[0066] Based on these differences, the design of classical logic functions applied to CMOS transistors and the design of quantum logic functions applied to qubits are significantly and fundamentally different. The design of classical logic functions applied to CMOS transistors does not need to consider the individuality of CMOS transistors. For example, the representation of a CMOS transistor in a silicon chip is its individual identifier, location, and usable time of each CMOS transistor. Therefore, classical algorithms composed of classical logic functions only express the operational relationship of the algorithm, not the algorithm's dependence on individual CMOS transistors.

[0067] Quantum logic functions applied to qubits need to consider the individuality of each qubit, such as its position within the quantum chip, its relationship with surrounding qubits, and the duration of its usable time. Therefore, quantum algorithms composed of quantum logic functions not only express the computational relationships within the algorithm but also its dependence on the individual qubits.

[0068] A quantum chip consists only of qubits and channels for controlling them. Quantum logic gates are implemented using analog signals. Different combinations of analog signals are applied to the qubits through these channels, creating quantum circuits with different functions to process data. Therefore, the design of quantum logic functions in the qubit design (including whether qubits are used and the efficiency of each qubit) is crucial for improving the computational performance of quantum computers and requires specialized design. This is the unique characteristic of quantum algorithms based on quantum logic functions, and it is fundamentally different from classical algorithms based on classical logic functions. The aforementioned design considerations for qubits are technical problems that ordinary computing devices do not need to consider or address.

[0069] This invention proposes a fluid state update method and related apparatus based on the quantum Newton method, aiming to improve the data assimilation efficiency of high-dimensional data through the exponential speedup effect of quantum computing. In a broad sense, data assimilation refers to the fusion of existing knowledge of a system with its observational data. For example, in weather forecasting, to effectively complete forecasts, initial values ​​of atmospheric state variables on discrete grid points must be obtained. In this case, the purpose of data assimilation is to utilize all available knowledge to obtain the initial field for model forecasts. For ease of reading and understanding, this paper first explains some technical terms and their mathematical symbols in the fields of data assimilation and quantum computing.

[0070] Real field: refers to the actual data of the system under study, such as the actual atmospheric conditions in weather forecasting. Due to limitations in observation technology and the complexity of the system itself, the real field can be considered as a set of infinite-dimensional data that cannot be accurately obtained. Unless otherwise specified in this embodiment, x is used. t Represents the real field.

[0071] Observation field: refers to the observation data obtained after observing a real field using tools such as satellites and radar. The observation field can be considered a set of low-dimensional data; as observation technology improves, the observed data will approximate the corresponding real data. In this embodiment, unless otherwise specified, y is used to represent the observation field.

[0072] Model field: refers to the simulation data used to simulate the system under study. For example, in weather forecasting, it refers to forecast data. A model field is a set of high-dimensional data with finite dimensions. Unless otherwise specified in this embodiment, x is used. m Represents the pattern field.

[0073] Analysis field: refers to the data result after data assimilation, whose dimensions are consistent with the model field, and can be considered as a modification of the model field. In this embodiment, unless otherwise specified, x is used. a This represents the analysis field.

[0074] Background field: This concept is introduced by the data assimilation method. It can be considered a prior estimate of the analysis field, and its dimension is consistent with the analysis field. In this embodiment, unless otherwise specified, x is used. b The background field represents the actual data assimilation range after its introduction, which will expand from the analysis space x. a Transformed into variable space (x) a -x b ).

[0075] Pattern operator: Refers to the operator that controls the evolution of the system state between two adjacent time steps during numerical simulation of the system under study. The pattern operator is a nonlinear operator. Unless otherwise specified in this embodiment, it uses... The pattern operator is represented. If the system under study has the Markov property, then... It is true, where the subscript n represents the discrete time.

[0076] Observation operator: The observation operator refers to the mapping from the model field to the observation field. It is a nonlinear operator, typically consisting of two parts: a spatiotemporal interpolation operator from grid points to observation points in model computation, and a transformation operator from model variables to observation variables. This embodiment does not study or process the specific form of the observation operator; unless otherwise specified, it will be used. This represents the observation operator.

[0077] Model error and model error covariance matrix: These define the errors that exist between the numerical model and the actual system evolution. For mode error, the mode error covariance matrix can be further defined. The horizontal line above indicates the expected value, and the same applies below.

[0078] Observation error and observation error covariance matrix: These define the error between the observed value and the true value. For observation error, the observation error covariance matrix can be further defined.

[0079] Background error and background error covariance matrix: These define the error between the background field data and the corresponding true values. b =x b -x t For the background error, the background error covariance matrix can be further defined.

[0080] QRAM: Quantum Random Access Memory, a device used for fast basis encoding.

[0081] QLSS: Quantum Linear System Solver.

[0082] See Figure 2 , Figure 2 A fluid state update method based on quantum Newton's method is provided as an embodiment of the present invention. The method includes:

[0083] Step 201: Differentiate the objective function of the three-dimensional variational data assimilation of the state to be optimized to obtain the nonlinear equation of the state to be optimized when the gradient of the objective function is zero. The state to be optimized is the state of the simulation model of the real fluid system at the initial time. The objective function represents the distance between the state to be optimized and the real state of the real fluid system at the initial time.

[0084] Specifically, the state to be optimized is the initial state of the simulation model of the real fluid system, which is also the target result of data assimilation: the analysis field. Therefore, the model field can be obtained by performing mode integration on the state to be optimized from the initial time to any discrete time thereafter. The time interval from the initial moment to this discrete moment is called the assimilation window [1,K]. In the field of data assimilation, variational data assimilation when the assimilation window K>1 is called four-dimensional variational data assimilation, and correspondingly, variational data assimilation when K=1 is called three-dimensional variational data assimilation. Within the assimilation window [1,K], the model field can be mapped to the observation field, that is, the real fluid system can be observed at this discrete moment to obtain the corresponding observation field y. k Furthermore, prior estimates of the state to be optimized, i.e., the background field x, can be introduced manually. b .

[0085] Furthermore, it can be based on the mode field Observation field y k and background scene x b An equation is established, that is, an objective function for three-dimensional variational data assimilation is obtained through variational methods. This objective function J can represent the distance between the state to be optimized and the true state of the real fluid system at the initial moment, thus transforming the data assimilation problem into finding the extremum of the objective function J. When the objective function J takes a minimum value, the distance between the state to be updated and the true state of the real fluid system at the initial moment is minimized, and the data assimilation effect is optimal.

[0086] In the technical solution provided by this embodiment of the invention, the model field is the simulation data of the simulation model at any discrete moment, and the observation field is the observation data obtained by observing the real fluid system at that discrete moment; the model operator is the evolution operator of the state of the simulation model from the initial moment to that discrete moment; the observation operator is the mapping from the model field to the observation field when observing the real fluid system at that discrete moment. Then, the objective function J of the above-mentioned three-dimensional variational data assimilation can be calculated through the following steps:

[0087] Step 301: Perform mode integration based on the state to be optimized and the mode operator to obtain the mode field of the simulation model at the discrete time.

[0088] Those skilled in the art will understand that the solution provided in this embodiment of the invention accelerates the assimilation of three-dimensional variational data through quantum computing. That is, in this embodiment, K=1, meaning that within the assimilation window [1,K], only a discrete-time mode field is obtained through mode integration. However, in order to provide a clearer and more general explanation of the principles of the data assimilation process and the establishment of the objective function, some formulas in the following text may involve multiple model fields and their corresponding observation fields when K>1. Those skilled in the art should be able to clearly understand the difference between them and the technical solutions provided in the embodiments of the present invention.

[0089] Specifically, within the assimilation window [1,K], we can assume the state to be optimized in the simulation model of the real fluid system at the initial moment, i.e., the analysis field is x. a Using pattern operators Mode integration can be performed continuously within the assimilation window [1,K] to obtain the mode fields at each discrete time point. This allows us to obtain the system state trajectory composed of the analysis field and the field of each mode.

[0090] Step 302: Based on the model field and the observation operator, observe the real fluid system to obtain the observation field of the real fluid system at the discrete time.

[0091] Specifically, the above-mentioned pattern field can be... Mapped to the observation field y K Within, that is, within the assimilation window [1,K], through the observation operator By observing the real fluid system at each discrete time point, the corresponding observation field can be obtained, thus yielding the observation trajectory y = [y1, ..., y2]. k ,…y K ].

[0092] Step 303: Perform prior estimation on the state to be optimized to obtain the background field of the simulation model at the initial time.

[0093] Specifically, the initial state to be optimized in the simulation model of the real fluid system can be estimated a priori to obtain the background field x of the simulation model at the initial moment. b As is known to those skilled in the art, background field x b The accuracy of the estimation will affect the precision and computational cost of subsequent data assimilation.

[0094] Furthermore, in one implementation, during subsequent data assimilation, the gradient function of the objective function J can be transformed into a system of linear equations corresponding to the iteration steps using the quantum Newton method. The value of the state to be optimized in the linear equations corresponding to the first iteration step can be set as the background field x. b Thus, in each iteration step, the background field x b Continuously optimize it to gradually approach the true state of a real fluid system at the initial moment.

[0095] Therefore, when making prior estimates of the optimal state, we can use various types of data, such as existing knowledge of the real fluid system and the assimilation results of previous data, to maximize the background field x. b With the analytical field x to be solved a The degree of similarity. For example, the system state of the simulation model at a certain moment before the initial moment can be obtained, and the mode integral can be performed based on the system state and the mode operator to obtain the background field of the simulation model at the initial moment.

[0096] For example, in a weather forecasting scenario, a 12-hour assimilation window can be set as a data assimilation process. In this assimilation process (e.g., the assimilation window from 12:00 to 24:00 today), to obtain the background field at the initial time of 12:00, we can first obtain the analysis field at 0:00 today obtained from the previous data assimilation, which serves as the system state at a certain time before the initial time. Since the analysis field at 0:00 is obtained from the previous data assimilation (i.e., the assimilation window from 0:00 to 12:00 today), it includes known model evolution knowledge of the weather forecasting model and has been optimized using real atmospheric state data from 0:00 to 12:00, thus enabling a relatively accurate simulation of recent atmospheric conditions. Then, the analysis field at 0:00 today can be integrated using model operators within the 0:00 to 12:00 period today to obtain the background field at the initial time of 12:00. This background field should be close to the target result of this data assimilation, thereby reducing the computational load of the data assimilation process and improving its accuracy.

[0097] Step 304: Based on the mode field, the observation field, and the background field, calculate the posterior probability of the state to be optimized and the mode field when the observation field is known.

[0098] Specifically, in the Bayesian description of data assimilation, given that observations have already occurred (i.e., when an observation trajectory y exists), the aforementioned system state trajectory x appears, which is the state to be optimized, x. a and mode field The posterior probability can be:

[0099]

[0100] The essence of data assimilation is to optimize the state x in the system state trajectory x. a Optimize to make the background field x b The probability of the system state trajectory x occurring is highest when the observed trajectory y is already determined.

[0101] It can be assumed that the simulation model of the real fluid system in the embodiments of the present invention has a first-order Markov property, and thus the prior probability p(x) can be written as:

[0102]

[0103] Furthermore, the observation fields at different discrete times can be independent, while the observations depend only on the mode fields at the corresponding discrete times. Therefore, the likelihood probability p(y|x) can be written as:

[0104]

[0105] Furthermore, based on the observation independence assumption—that is, the observations at different discrete times are independent of each other—the prior probability p(y) can be written as:

[0106] p(y)=p(y K ...p(y1)

[0107] Due to the background field x b It is about optimizing state x a The prior estimate is free from the influence of observations, therefore the background field x b Only with the state to be optimized x a related.

[0108] Substituting the prior probabilities p(x), p(y), and p(y|x) into the formulas for calculating the posterior probabilities of the state to be optimized and the mode field, we can obtain the posterior probability p(x|x). b ,y) is:

[0109]

[0110] Step 305: Take the negative logarithm of the posterior probability to calculate the objective function for the three-dimensional variational data assimilation of the state to be optimized.

[0111] Specifically, for the above posterior probability p(x|x b Taking the negative logarithm of y, we can obtain the objective function of the variational method (three-dimensional data variational method or four-dimensional data variational method) as follows:

[0112] J(x)=J b +J o +J m +c

[0113] Where c represents the constant term, J m Then the mode field error ∈ m Regarding the condition of strongly constrained variational data assimilation, the assimilation window range is generally not very large. In this case, the model calculation error can be considered very small, and J... m =0.

[0114] J b Related to the background field error, data assimilation generally assumes the error to be Gaussian and unbiased, in which case J b It can be written as:

[0115]

[0116] Where B is the background field x b The error covariance matrix.

[0117] J o This is related to the observation field error, and is also based on the Gaussian unbiased assumption, J o It can be written as:

[0118]

[0119] Among them, R k It is the observation error covariance matrix at each discrete time point.

[0120] Based on the above formula, the objective function for three-dimensional variational data assimilation can be calculated as follows:

[0121]

[0122] Since the objective function is a nonlinear equation representing the distance between the state to be optimized and the actual state of the real fluid system at the initial moment, according to the above analysis, when x = x a That is, the initial state of the system to be optimized is the analysis field x. a When the objective function J(x) reaches its minimum value, the distance between the state to be optimized and the actual state of the real fluid system at the initial moment is the smallest, and the effect of three-dimensional variational data assimilation is better.

[0123] Since the error covariance matrix in the objective function of the above three-dimensional variational data assimilation is positive definite, the objective function J(x) must have a minimum value. Finding the minimum value is equivalent to solving... First, it is necessary to differentiate the objective function for the three-dimensional variational data assimilation of the state to be optimized.

[0124] For the nonlinear term in the above objective function J(x) have:

[0125]

[0126] Therefore, when differentiating the objective function J(x), the nonlinear term... have:

[0127]

[0128] Among them, J c (x) is a nonlinear function The Jacobian matrix of x has a value that depends on the specific value of x, but its form is independent of the value of x. Therefore, the gradient function obtained by differentiating the objective function J(x) is... It can be written as:

[0129]

[0130] Based on the above analysis, we can conclude that B in the above formula... R, The specific form of the background field x is independent of the specific value of x, therefore the background field x in the above formula is independent of the specific value of x. b When the values ​​of the observed field y and y are both determined, the gradient function It can be uniquely represented by a nonlinear function, let this nonlinear function be F(x), that is... The gradient of the objective function obtained above is zero, which means solving the nonlinear equation F(x) = 0 for the state to be optimized.

[0131] Step 202: Based on the quantum Newton method, the nonlinear equation is transformed into a system of linear equations corresponding to the iteration step. The number of linear equations in the system of linear equations is equal to the dimension of the state to be optimized. The value of the state to be optimized in the system of linear equations corresponding to the first iteration step is a preset initial solution.

[0132] Understandably, in the computation of three-dimensional variational data assimilation, the quantum Newton method can be used to solve the nonlinear equation F(x) = 0. As an efficient iterative solution method, the core algorithm of Newton's method can be described by the following iterative relationship:

[0133]

[0134] Where, x s ,x s+1 Let F' and F' represent the calculation results of the s-th and s+1-th iteration steps, respectively. Let F' represent the Jacobian matrix of the function F, which can be in the following form:

[0135]

[0136] As can be seen from the above formula, if an initial solution is given at step s=0, a solution x will be obtained at each step of the solution process. s For each solution step, the solution x obtained is... s This can be treated as the updated analysis field in data assimilation, thus obtaining the updated mode field through mode integration, and further updating the objective function. In the next iteration, a new set of solutions x can be calculated. s+1 And so on, iterating in a loop.

[0137] Since the error covariance matrix in the objective function J(x) is positive definite, the quantum Newton method for solving the minimum problem of the objective quadratic form always converges. Newton's method guarantees that lim s→+∞ x s→x a That is, as the number of iterations increases, the solution obtained in each solution step will approximate the true analysis field. Therefore, this invention does not have strict requirements on the accuracy of the background field prediction.

[0138] Specifically, based on the quantum Newton method, the nonlinear equation F(x) = 0 can be transformed into a system of linear equations corresponding to the iteration steps. The nonlinear equation F(x) of the gradient of the objective function can be written as:

[0139]

[0140] Where N represents the total amount of data participating in data assimilation, which is also the total number of dimensions of the state to be optimized.

[0141] In each iteration step, the nonlinear equation F(x) = 0 can be transformed into the corresponding linear equation system A. s Δx s =b s The number of linear equations in this system is equal to the total dimension N of the state to be optimized, where Δx s The state increment, i.e., x s+1 =x s +Δx s Therefore, in order to calculate the state increment Δx in each iteration step... s To obtain the updated analysis field after data assimilation, it is necessary to pre-set the value x of the state to be optimized when s=0 in the first iteration step. 0 .

[0142] Specifically, the value of the state to be optimized in the linear equation system corresponding to the first iteration step can be set as a preset initial solution. As an implementation of this invention, the preset initial solution can be the background field of the simulation model at the initial moment, and the background field is the prior estimation data of the state to be optimized.

[0143] Since the background field is obtained by prior estimation of the state to be optimized and has a high degree of similarity to the state to be optimized, the computational space of the state increment is relatively small during the data assimilation process, and the corresponding computational amount is also smaller. This is beneficial to improve computational accuracy and efficiency, and save computational resources.

[0144] Step 203: Construct a quantum circuit for solving the linear equation system, run the quantum circuit to obtain the state increment, and update the value of the state to be optimized to the target sum value, which is the sum of the value of the state to be optimized in the linear equation system corresponding to the iteration step and the state increment.

[0145] In this step, the linear equation system A needs to be solved using quantum computing. s Δx s=b s This involves constructing a quantum circuit to solve the linear equations and running the circuit to obtain the state increment. To fully utilize the parallel computing capabilities of quantum computing, QRAM (Quantum Random Access Memory) can be used to quickly encode the quantum states required for quantum computing.

[0146] QRAM is a device for fast basis vector encoding. For example, if the value of the state to be optimized in the linear equation system corresponding to the first iteration step is a preset initial solution, then the data of each dimension of the preset initial solution can be stored in the QRAM in advance. Thus, in the first iteration step, the QRAM can be used to quickly complete the quantum state encoding and run the constructed quantum circuit to obtain the state increment, thereby obtaining the updated analysis field in the data assimilation. Then, the data of each dimension of the stored preset initial solution is updated to the data of each dimension of the updated analysis field, thereby completing the iterative process of three-dimensional data assimilation based on the quantum Newton method.

[0147] As one embodiment of the present invention, the data of the state to be optimized can be stored in a quantum random access memory (QRAM). The data structure of the QRAM can be a binary tree structure and can include n layers of subtree nodes and 1 layer of leaf nodes, wherein:

[0148] Each leaf node is used to store one dimension of the state to be optimized, and the gradient value of the objective function for that dimension.

[0149] Each subtree node is used to store the norm of all the dimensional data below the subtree node and the norm of all the gradient values ​​below the subtree node. The total number of subtree nodes n satisfies: n = [logN], where N is the total number of dimensions of the state to be optimized.

[0150] See Figure 3 , Figure 3 This is a schematic diagram of a quantum random access memory (QRAM) data structure provided in an embodiment of the present invention. The total dimension N of the stored state to be optimized is 4, and [] represents rounding up. Therefore, the total number of subtree nodes is n = [logN] = 2. This data structure includes 2 layers of subtree nodes and 1 layer of leaf nodes. Each leaf node can store two types of data: the first type is one dimension of the state to be optimized, x. k ,For example Figure 3If the total number of dimensions N of the state to be optimized is 4, then the leaf nodes can store the data of the 4 dimensions of the state to be optimized, namely x0, x1, x2, and x3. The second type of data is the gradient value of the objective function corresponding to each dimension of data, namely f0(x), f1(x), f2(x), and f3(x) corresponding to the dimension data x0, x1, x2, and x3.

[0151] Correspondingly, each subtree node can also store two types of data. The first type is the norm of all dimensions of data below that subtree node. For example, it can be written as:

[0152]

[0153] The second type is the norm of all gradient values ​​below the node of that subtree layer. For example, it can be written as:

[0154]

[0155] Where i,j represent the j-th subtree node at level i, and n represents the total number of levels in the subtree. Therefore, in this binary tree data structure, the register d in the root node... 00x and d 00y The norm of the state to be optimized, ‖x‖, and the norm of the gradient of the objective function, ‖F(x)‖, can be stored separately. Furthermore, it can be determined that with this data structure, it is possible to achieve optimization in O(logN) time complexity using O(logN) time. M1 O M2 O M3 O M4 Four oracle implementations perform the following fast quantum state encoding process:

[0156] O M1 |k>|0>=|k>|x k >

[0157] O M2 |k>|0>=|k>|f k (x)>

[0158] O M3 |i>|j>|0>=|i>|j>|d ijx >

[0159] O M4 |i>|j>|0>=|i>|j>|d ijy >

[0160] Among them, there are integers k∈[0,N-1], i∈[0,n], j∈[0,2]. i -1].

[0161] When solving large-scale linear equation systems using quantum computing, the coefficient matrix and residual terms of the linear equation system need to be encoded into quantum states, and then entangled and evolved using a quantum linear algorithm to obtain the quantum states of the solution of the linear equation system. Finally, the quantum state tomography algorithm is used to transform the quantum states of the solution into classical form to obtain the classical solution.

[0162] Specifically, in each iteration step, the data stored in the QRAM based on the aforementioned binary tree structure and O M1 O M2 O M3 O M4 Four Oracles can complete the linear equation system A s Δx s =b s The coefficient matrix A in s and residual term b s The quantum state is quickly encoded, and then the quantum linear algorithm and the quantum state tomography algorithm are executed sequentially to finally calculate the classical data of the state increment.

[0163] Therefore, a quantum circuit for solving this system of linear equations can be constructed based on the above solution approach. As one embodiment of the present invention, the quantum circuit may include a first sub-quantum circuit, a second sub-quantum circuit, a third sub-quantum circuit, and a fourth sub-quantum circuit, wherein:

[0164] The first sub-quantum circuit is used to prepare the quantum state of the residual term of the linear equation system.

[0165] The second sub-quantum circuit is used to prepare the quantum state of the coefficient matrix of the linear equation system.

[0166] As one embodiment of the present invention, before constructing the quantum circuit for solving the linear equation system as described above, the method may further include:

[0167] Query the data structure of the QRAM, and construct the controlled gate O in the first sub-quantum circuit based on the data stored in the leaf nodes and the subtree nodes. b And the quantum logic gate O in the second sub-quantum circuit A1 Quantum logic gates O A2 ,in:

[0168] The controlled gate O b Quantum states used to encode the residual terms of the linear equation system

[0169] Specifically, in different iteration steps, since the value of the state to be updated has been updated, the corresponding system of linear equations to be solved has also changed. Therefore, before constructing the quantum circuit for solving the system of linear equations, it is necessary to use the data stored in the QRAM data structure to control the O gates in the sub-quantum circuit. b Quantum logic gates O A1 and quantum logic gate O A2 Simple constructions were performed to prepare the quantum states of the residual terms and coefficient matrix of the modified linear equation system.

[0170] By querying O(logN) times M4 The data stored in QRAM can be used to construct controlled gates O b To achieve the following encoding process:

[0171] O b |0>=|b>

[0172] As one embodiment of the present invention, the quantum state |b> of the residual term of the above linear equation system satisfies:

[0173]

[0174] Where i∈[0,N-1], f i (x) represents the gradient value of the objective function corresponding to each dimension of data, and ||F(x)||2 is the norm of the gradient F(x) of the objective function in the above QRAM data structure, which can be used to normalize the coefficients to facilitate the execution of subsequent quantum linear algorithms and quantum state tomography algorithms.

[0175] The quantum logic gate O A1 The quantum state |j,k> is used to encode the position information of the non-zero elements in the coefficient matrix of the linear equation system within the coefficient matrix.

[0176] The quantum logic gate O A2 Quantum states used to encode the non-zero elements in the coefficient matrix of the linear equation system

[0177] As one embodiment of the present invention, the quantum state |A> of the coefficient matrix of the above linear equation system satisfies:

[0178]

[0179] Where F(x) is the gradient function of the objective function, ||F(x)||² is the norm of F(x) in the data structure, and F′(x) is the Jacobian matrix of F(x), specifically in the form:

[0180]

[0181] The elements of F′(x) can be calculated using the following finite difference method:

[0182]

[0183] i represents the data dimension of the state to be optimized, j represents the row label of the coefficient matrix, k represents the column label of the coefficient matrix, and j, k, i ∈ [0, N-1].

[0184] Specifically, in the quantum Newton method, the coefficient matrix A of the linear equation system in this embodiment of the invention can be represented as:

[0185]

[0186] Where F′(x) is the Jacobian matrix of the gradient function F(x) of the objective function, and ||F′(x)|| max =max j,k |F′(x) ik The value of | can be estimated using classical methods. For example, given the expression for each element of the Jacobi matrix and the domain of the independent variable, the upper bound of the maximum value can be determined based on the expression.

[0187] The encoding of the quantum state |A> of the coefficient matrix A can be achieved through O A1 O A2 Two Oracle implementations, quantum logic gate O A1 The following process can be completed:

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

[0189] Where j and k represent the row and column labels of the coefficient matrix A, respectively, l represents the sparsity of the coefficient matrix A, i.e., the number of elements in the largest non-zero row or column of the coefficient matrix A, and h(j,l) represents the column label of the j-th row and l-th non-zero element. Quantum logic gate O A1 The construction of the matrix A is related to the specific form of the matrix, and is achieved through the aforementioned quantum logic gate O. A1 This allows us to obtain the quantum state |j,k> of the position information of the non-zero elements in the coefficient matrix of a linear system of equations.

[0190] Correspondingly, quantum logic gate O A2 The following process can be completed:

[0191]

[0192] Using the row label j and column label k of the coefficient matrix A, the quantum logic gate O A2The quantum state of a qubit can be transformed from the initial state |0> to... It can be seen that quantum logic gate O A1 The construction of quantum logic gate O is related to the distribution of non-zero elements in the coefficient matrix A. A2 The key to its construction lies in its implementation through quantum circuits. The calculation. And It can be calculated using the following finite difference method:

[0193]

[0194] Therefore, through the above quantum logic gate O A1 And query O M2 Quantum logic gate O can be constructed. A2 This allows us to encode the quantum states of the non-zero elements in the coefficient matrix of a system of linear equations.

[0195] Among them, the controlled gate O is executed. b The time complexity is:

[0196]

[0197] Executing quantum logic gate O A2 The time complexity is:

[0198]

[0199] Where N represents the total dimension of the state to be optimized, ∈ represents the construction accuracy, and l represents the sparsity of the coefficient matrix.

[0200] The third sub-quantum circuit is used to execute a quantum linear algorithm to evolve the quantum state of the residual term and the quantum state of the coefficient matrix to obtain the quantum state of the state increment.

[0201] Specifically, the implementation of the encoding and quantum logic gates O. A1 O A2 After construction, the quantum state |Δx> of the state increment can be calculated using a quantum linear algorithm. The quantum linear algorithm can use the CKS algorithm, whose algorithm complexity can be expressed as:

[0202]

[0203] Where k represents the condition number of the coefficient matrix.

[0204] Ultimately, the overall time complexity of the QLSS process can be determined as follows:

[0205] The fourth sub-quantum circuit is used to execute the quantum state tomography algorithm, which converts the quantum state of the state increment into the classical data of the state increment.

[0206] For example, the quantum state tomography algorithm can choose L ∞ The tomographic algorithm transforms the quantum state |Δx> of the state increment obtained by the quantum linear algorithm into the classical solution Δx. The complexity of this algorithm can be expressed as... Here, U is the time required to execute the quantum circuit to be observed once, and n refers to the number of qubits observed.

[0207] Analyzing the time complexity of each iteration step of the quantum Newton method, we can calculate the time complexity as follows:

[0208]

[0209] Correspondingly, the time complexity of each iteration step of the Classical Newton Method (CNM) is:

[0210]

[0211] A comparison of the two shows that when In this context, the quantum Newton method demonstrates a significant speedup compared to the classical Newton method. Specifically, when assimilating high-dimensional data using three-dimensional variational data, the quantum Newton method can drastically reduce time complexity and effectively improve the data assimilation efficiency for high-dimensional data.

[0212] The following section uses the CKS algorithm as an example of the objective linear algorithm to illustrate the quantum state evolution of qubits during the operation of the quantum circuit in the fluid state update method based on the quantum Newton method.

[0213] At the beginning of each iteration step, the quantum state of the qubits included in the quantum circuit is: in The qubits constitute an auxiliary register, which is essential for the CKS algorithm. The qubits in the auxiliary register constitute the data register, which records the quantum states of the residual terms and solutions of the linear equation system. The number of qubits in the auxiliary register is related to many factors, including the total dimension N of the state to be optimized in the three-dimensional variational data assimilation, the condition number κ of the coefficient matrix A, the sparsity l, and the solution accuracy. The number of qubits in the data register is n = logN.

[0214] The operation of this quantum circuit can be mainly divided into three steps, as follows:

[0215] The first step is to use the controlled gate O bEncoding the residual term yields |b s The quantum state evolution of a qubit can be:

[0216]

[0217] Where the subscript ⊥ represents all orthogonal basis vectors of the quantum state, i.e.

[0218] The second step involves executing the CKS algorithm (which includes quantum logic gates O). A1 and O A2 ), to obtain the quantum state |Δx| of the solution (state increment). s The quantum state evolution of a qubit can be:

[0219]

[0220] in, It is a quantum state that is independent of the calculation of this nonlinear equation system, and it is related to... These are superposition states on the qubits in the data register, and the two can be distinguished by the data results on the qubits in the auxiliary register.

[0221] Third step, execute L ∞ The tomography algorithm divides the quantum states in the quantum circuit. Extracting the classic data, it's clear that when all auxiliary registers are 0, the classic data extracted from the data register is Δx. s At this point, the quantum circuit portion of the computational process in iteration step s has been completed.

[0222] As one embodiment of the present invention, updating the value of the state to be optimized to the target and value may include:

[0223] For each leaf node, update one dimension of the state to be optimized stored in that leaf node based on the target and value, and update the gradient value of the objective function of that dimension.

[0224] For each subtree node, calculate the square root of the sum of squares of all the dimensional data below that subtree node, as the norm of the dimensional data, and calculate the square root of the sum of squares of all the gradient values ​​below that subtree node, as the norm of the gradient values.

[0225] Specifically, in each iteration step, the classical form of the state increment Δx can be calculated using the aforementioned quantum circuitry. s And the state to be optimized in the linear equation system corresponding to this iteration step is x. sIf the target value is known (in the first iteration step, it is the preset initial solution; in other iteration steps, it is the sum of the state to be optimized and the state increment in the previous iteration step), then the target value can be calculated using classical computation methods, and the value of the state to be optimized can be updated, i.e., x is calculated. s+1 =x s +Δx s And update the data stored in the QRAM data structure.

[0226] First, we can base our decision on the target and the value x. s+1 Update one dimension of the unoptimized state stored in the leaf nodes. Next, calculate the gradient function F(x) of the objective function at the given objective value x. s+1 The function value F(x) at the location s+1 ), and then based on F(x) s +1 Update the gradient value of the objective function for this dimension of data.

[0227] Furthermore, after the data stored in the leaf nodes is updated, each subtree node can calculate all dimensional data below that level of the subtree node based on the updated data in the leaf nodes. The square root of the sum of squares is used as the norm of the dimension data, and all gradient values ​​below the nodes of that subtree are calculated. The square root of the sum of squares is used as the norm of the gradient value. Therefore, d in the root node... 00x and d 00y The norm ||x of the updated state to be optimized can be stored separately. s+1 ||norm of the gradient of the objective function||F(x) s+1 )||.

[0228] Step 204: Determine whether the gradient of the objective function converges at the target value. If it converges, stop updating the value of the state to be optimized.

[0229] As one embodiment of the present invention, the above-mentioned determination of whether the gradient of the objective function converges at the target and sum values ​​may include:

[0230] Step 401: Calculate the gradient of the objective function at the target value and compare the norm of the function value with the preset calculation precision.

[0231] Specifically, the gradient function F(x) of the objective function can be calculated on the target and the value x. s+1 The function value F(x) at the location s+1 ), and the norm of the function value ||F(x) s+1 )|| is compared with the magnitude of the preset calculation precision ∈′.

[0232] Step 402: If the norm of the function value is not greater than the preset calculation precision, determine that the gradient of the objective function converges at the target sum value.

[0233] Step 403: If the norm of the function value is greater than the preset calculation precision, determine that the gradient of the objective function does not converge at the target sum value.

[0234] If ||F(x) s+1 If ||≤∈′, we can assume that the gradient of the objective function converges at the target sum and the minimum value, and the objective function reaches its minimum value at the target sum and the minimum value, thus indicating that the data assimilation effect is good. s+1 The distance between x and the actual state of a real fluid system at the initial moment is very close, that is, x can be... s+1 The final analytical field obtained from data assimilation is then output.

[0235] If ||F(x) s+1 If ||>∈′, then we can consider that the gradient of the objective function does not converge at the target value, and the objective function has not yet reached its minimum value, that is, x s+1 Since the value of the state to be optimized is far from the actual state of the real fluid system at the initial moment, it is necessary to iterate and optimize the value of the state to be optimized again using the quantum Newton method so that x is closer to the actual state at the initial moment.

[0236] As one embodiment of the present invention, the above method may further include:

[0237] If convergence fails, return to the step of transforming the nonlinear equation into a system of linear equations corresponding to the iterative step using the quantum Newton method, until the gradient of the objective function converges at the target sum value.

[0238] Specifically, if the gradient of the objective function does not converge at the target value, it is necessary to iterate and optimize the value of the state to be optimized again using the quantum Newton method. This can be achieved by returning to the steps described above, which transform the nonlinear equation into a system of linear equations corresponding to the iterative steps, based on the quantum Newton method. At this point, the mode field x in the nonlinear equation... m Through mode integral on x s+1 After integration, the linear equations derived from the quantum Newton method have also changed, requiring a reconstruction of the controlled gate O in the first sub-quantum circuit. b Quantum logic gate O in the second quantum circuit A1 Quantum logic gates O A2This process involves constructing and running a quantum circuit to obtain a new state increment, recalculating the new target and value, and again determining whether the gradient of the objective function converges at the new target and value. This process is repeated iteratively until the gradient of the objective function converges at the target and value in a certain iteration step. The iteration then ends, and x in that iteration step can be... s+1 The final analytical field obtained from data assimilation is then output.

[0239] As can be seen, in this embodiment, based on the principle of quantum Newton's method, solving the objective function of three-dimensional variational data assimilation is transformed into a system of linear equations A in each iteration step s. s Δx s =b s The problem of solving quantum logic gates (QRs) can be realized by using the selected QRAM data structure. b O A1 O A2 With its simple construction, this method rapidly encodes the coefficient matrix and residual terms of a linear equation system into quantum states. This allows for the solution of the state increment of the target state using quantum computing, continuously updating the analytical field to gradually approximate the true state of the real fluid system at the initial moment. Compared to classical computational methods, this significantly reduces the time complexity of data assimilation and dramatically improves the efficiency of assimilation for high-dimensional data. Furthermore, it effectively avoids the problem of being unable to linearize nonlinear operators in the objective function when the background field prediction is inaccurate, making it applicable to a wide range of situations.

[0240] See Figure 4 , Figure 4 A fluid state update device based on the quantum Newton method is provided as an embodiment of the present invention. The device includes:

[0241] Gradient calculation module 401: used to differentiate the objective function of the three-dimensional variational data assimilation of the state to be optimized, and obtain the nonlinear equation of the state to be optimized when the gradient of the objective function is zero. The state to be optimized is the state of the simulation model of the real fluid system at the initial time. The objective function represents the distance between the state to be optimized and the real state of the real fluid system at the initial time.

[0242] Linearization module 402 is used to transform the nonlinear equation into a system of linear equations corresponding to the iteration step based on the quantum Newton method. The number of linear equations in the system of linear equations is equal to the dimension of the state to be optimized. The value of the state to be optimized in the system of linear equations corresponding to the first iteration step is a preset initial solution.

[0243] The quantum computing module 403 is used to construct a quantum circuit for solving the linear equation system, run the quantum circuit to obtain a state increment, and update the value of the state to be optimized to a target sum value, wherein the target sum value is the sum of the value of the state to be optimized in the linear equation system corresponding to the iteration step and the state increment.

[0244] The convergence judgment module 404 is used to determine whether the gradient of the objective function converges at the target value. If it converges, the update of the value of the state to be optimized is stopped.

[0245] The specific functions and effects of the fluid state update device based on the quantum Newton's method can be explained by referring to other embodiments in this specification, and will not be repeated here. Each module in the fluid state update device based on the quantum Newton's method can be implemented entirely or partially through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in a computer device in hardware form, or it can be stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0246] Please see Figure 5 This specification also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, characterized in that the processor, when executing the computer program, implements the fluid state update method based on the quantum Newton method in any of the above embodiments. Please refer to... Figure 5 The computer device can be a classical computer or a quantum computer.

[0247] This specification also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a computer, causes the computer to perform the fluid state update method based on the quantum Newton method in any of the above embodiments.

[0248] This specification also provides a computer program product containing instructions that, when executed by a computer, cause the computer to perform the fluid state update method based on the quantum Newton method in any of the above embodiments.

[0249] It is understood that the specific examples in this specification are only intended to help those skilled in the art better understand the implementation methods described herein, and are not intended to limit the scope of the invention.

[0250] It is understood that in the various embodiments of this specification, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not limit the implementation process of the embodiments of this specification in any way.

[0251] It is understood that the various implementation methods described in this specification can be implemented individually or in combination, and the implementation methods in this specification are not limited in this respect.

[0252] Unless otherwise stated, all technical and scientific terms used in the embodiments of this specification have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this specification. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items. The singular forms "a," "the," and "the" as used in the embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0253] It is understood that the processor in the embodiments of this specification can be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this specification. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this specification can be directly implemented by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above methods.

[0254] It is understood that the memory in the embodiments of this specification may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM). It should be noted that the memory in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0255] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this specification.

[0256] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the aforementioned method implementations, and will not be repeated here.

[0257] In the several embodiments provided in this specification, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0258] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0259] In addition, the functional units in the various embodiments of this specification can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0260] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of this specification, in essence, or the parts that contribute to the prior art, or parts of the technical solutions, can be embodied in the form of software products. These computer software products are stored in a storage medium and include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this specification. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0261] The above description is merely a specific embodiment of this specification, but the scope of protection of this invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this specification should be included within the scope of protection of this specification. Therefore, the scope of protection of this invention should be determined by the scope of the claims.

Claims

1. A fluid state update method based on quantum Newton's method, characterized in that, The method includes: The objective function of the three-dimensional variational data assimilation of the state to be optimized is differentiated to obtain the nonlinear equation of the state to be optimized when the gradient of the objective function is zero. The state to be optimized is the state of the simulation model of the real fluid system at the initial time. The objective function represents the distance between the state to be optimized and the real state of the real fluid system at the initial time. The nonlinear equation is transformed into a system of linear equations corresponding to the iteration step based on the quantum Newton method. The number of linear equations in the system of linear equations is equal to the dimension of the state to be optimized. The value of the state to be optimized in the system of linear equations corresponding to the first iteration step is a preset initial solution. A quantum circuit is constructed to solve the linear equation system. The quantum circuit is run to obtain the state increment, and the value of the state to be optimized is updated to a target sum, where the target sum is the sum of the value of the state to be optimized and the state increment in the linear equation system corresponding to the iteration step. The quantum circuit includes a first sub-quantum circuit, a second sub-quantum circuit, a third sub-quantum circuit, and a fourth sub-quantum circuit. Specifically: the first sub-quantum circuit is used to prepare the quantum state of the residual term of the linear equation system; the second sub-quantum circuit is used to prepare the quantum state of the coefficient matrix of the linear equation system; the third sub-quantum circuit is used to execute a quantum linear algorithm to evolve the quantum state of the residual term and the quantum state of the coefficient matrix to obtain the quantum state of the state increment; and the fourth sub-quantum circuit is used to execute a quantum state tomography algorithm to convert the quantum state of the state increment into classical data of the state increment. The convergence of the gradient of the objective function at the target sum is determined by comparing its norm with the preset computational precision. If convergence is found, the update of the value of the state to be optimized is stopped.

2. The method as described in claim 1, characterized in that, The method further includes: If convergence is not achieved, the process returns to the step of transforming the nonlinear equation into a system of linear equations corresponding to the iterative steps based on the quantum Newton method, until the gradient of the objective function converges at the target sum value.

3. The method as described in claim 1, characterized in that, Determining whether the gradient of the objective function converges at the target sum by comparing the norm of the function's gradient at the target sum with a preset computational precision includes: Calculate the gradient of the objective function at the target and the value, and compare the norm of the function value with the preset calculation precision. If the norm of the function value is not greater than the preset calculation precision, the gradient of the objective function is determined to converge at the target sum value; If the norm of the function value is greater than the preset calculation precision, it is determined that the gradient of the objective function does not converge at the target sum value.

4. The method according to any one of claims 1-3, characterized in that, The preset initial solution is the background field of the simulation model at the initial moment, and the background field is the prior estimate data of the state to be optimized.

5. The method as described in claim 1, characterized in that, The data of the state to be optimized is stored in a quantum random access memory (QRAM), and the data structure of the QRAM is a binary tree structure and includes... Level 1 subtree nodes and Level 1 leaf nodes, where: Each leaf node is used to store one dimension of the state to be optimized, and the gradient value of the objective function for that dimension. Each subtree node is used to store the norm of all the dimensional data below that subtree node, and the norm of all the gradient values ​​below that subtree node, and the total number of subtree nodes. satisfy: , The total number of dimensions of the state to be optimized.

6. The method as described in claim 5, characterized in that, The quantum state of the residual term of the linear equation system satisfy: The quantum state of the coefficient matrix of the linear equation system satisfy: in, Let be the gradient function of the objective function. for The norm in the data structure, for The Jacobian matrix has the following specific form: The elements in the equation are obtained by the following finite difference method: The data dimension representing the state to be optimized. This represents the row labels of the coefficient matrix. The column labels of the coefficient matrix are represented. .

7. The method as described in claim 6, characterized in that, Prior to constructing the quantum circuit for solving the linear equations, the method further includes: By querying the data structure of the QRAM, the controlled gate in the first sub-quantum circuit is constructed based on the data stored in the leaf nodes and the subtree nodes. and the quantum logic gates in the second sub-quantum circuit Quantum logic gates ,in: The controlled gate Quantum states used to encode the residual terms of the linear equation system ; The quantum logic gate Quantum state used to encode the position information of non-zero elements in the coefficient matrix of the linear equation system. ; The quantum logic gate Quantum states used to encode the non-zero elements in the coefficient matrix of the linear equations .

8. The method as described in claim 7, characterized in that, The step of updating the value of the state to be optimized to the target value includes: For each leaf node, update one dimension of the state to be optimized stored in that leaf node based on the target and value, and update the gradient value of the objective function of that dimension data; For each subtree node, calculate the square root of the sum of squares of all the dimensional data below that subtree node, as the norm of the dimensional data, and calculate the square root of the sum of squares of all the gradient values ​​below that subtree node, as the norm of the gradient values.

9. A fluid state update device based on quantum Newton's method, characterized in that, The device includes: Gradient calculation module: used to differentiate the objective function of the three-dimensional variational data assimilation of the state to be optimized, and to obtain the nonlinear equation of the state to be optimized when the gradient of the objective function is zero. The state to be optimized is the state of the simulation model of the real fluid system at the initial time. The objective function represents the distance between the state to be optimized and the real state of the real fluid system at the initial time. The linearization module is used to transform the nonlinear equation into a system of linear equations corresponding to the iteration step based on the quantum Newton method. The number of linear equations in the system of linear equations is equal to the dimension of the state to be optimized. The value of the state to be optimized in the system of linear equations corresponding to the first iteration step is a preset initial solution. A quantum computing module is used to construct a quantum circuit for solving the linear equation system, run the quantum circuit to obtain a state increment, and update the value of the state to be optimized to a target sum value, wherein the target sum value is the sum of the value of the state to be optimized in the linear equation system corresponding to the iteration step and the state increment; wherein the quantum circuit includes a first sub-quantum circuit, a second sub-quantum circuit, a third sub-quantum circuit, and a fourth sub-quantum circuit, wherein: the first sub-quantum circuit is used to prepare the quantum state of the residual term of the linear equation system; the second sub-quantum circuit is used to prepare the quantum state of the coefficient matrix of the linear equation system; the third sub-quantum circuit is used to execute a quantum linear algorithm to evolve the quantum state of the residual term and the quantum state of the coefficient matrix to obtain the quantum state of the state increment; the fourth sub-quantum circuit is used to execute a quantum state tomography algorithm to convert the quantum state of the state increment into the classical data of the state increment; The convergence judgment module is used to determine whether the gradient of the objective function converges at the target sum by comparing the norm of the function value at the target sum with the preset calculation precision. If convergence is achieved, the update of the value of the state to be optimized is stopped.

10. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 8 when it is run.

11. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Computational fluid dynamics simulation method and device based on quantum algorithm, and equipment

    CN114091363A

  • Hybrid Quantum-Classical Computer for Solving Linear Systems

    US20200104740A1