A fluid state updating method based on variational data assimilation and related apparatus

By linearizing the objective function and solving quantum circuits in the data assimilation process, the problem of low efficiency in high-dimensional data assimilation is solved and efficient data assimilation is achieved.

CN117313876BActive Publication Date: 2025-10-14ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310993617.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-08
Publication Date
2025-10-14
Estimated Expiration
2043-08-08

AI Technical Summary

Technical Problem

Classical computers consume huge computing resources and have low assimilation efficiency when performing three-dimensional variational data assimilation, making it difficult to effectively process high-dimensional data.

Method used

By linearizing the objective function of the state to be solved, it is converted into a positive quadratic form, and quantum computing is used to construct a quantum circuit for solving the linear equations. The quantum circuit is run to obtain analysis increments to update the state to be solved of the simulation model.

Benefits of technology

It significantly reduces the complexity of data assimilation schemes, improves the assimilation accuracy of high-dimensional data, and improves data assimilation efficiency through the exponential acceleration effect of quantum computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117313876B_ABST
    Figure CN117313876B_ABST
Patent Text Reader

Abstract

The application discloses a fluid state updating method based on variational data assimilation and related devices, applied to the technical field of data assimilation, the method comprises the following steps: linearizing the nonlinear operator in the objective function of the state to be solved, converting the objective function into a positive definite quadratic form; the objective function of the positive definite quadratic form is differentiated with respect to the analysis increment, and a linear equation set of the analysis increment is obtained when the gradient of the objective function is zero, the analysis increment is the difference between the state to be solved and the background field, and the background field is the prior estimation data of the state to be solved; a quantum circuit for solving the linear equation set is constructed, the analysis increment is obtained by running the quantum circuit, and the state to be solved of the simulation model is updated based on the analysis increment. Therefore, when the background field estimation is accurate, the complexity of data assimilation is greatly reduced, the precision of data assimilation is improved, and the data assimilation efficiency of high-dimensional data is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of data assimilation, and particularly relates to a fluid state updating method based on variational data assimilation and a related device. BACKGROUND

[0002] Data assimilation refers to the fusion of existing knowledge of a system and observation data of the system, and the fusion method is a data assimilation method. The application field of data assimilation is very wide, such as weather forecasting, oil exploitation, traffic control, image processing, epidemic prediction, etc. Computational fluid dynamics is a product of the combination of modern fluid dynamics, numerical mathematics and computer science. It starts from the calculation method, uses the computing power of an electronic computer, and applies various discrete mathematical methods to solve various problems of fluid mechanics.

[0003] For example, the actual weather forecasting process includes two core processes, namely, a model calculation process and a data assimilation process. Dee et al. of the European Centre for Medium-Range Weather Forecasts evaluated the reanalysis data set ERA-Interim and believed that 75% of the improvement in weather forecasting effect in the past 30 years was derived from the development of data assimilation technology, which shows the importance of data assimilation technology for weather forecasting.

[0004] In the field of computational fluid dynamics, the data to be assimilated is usually high-dimensional data, so that a classical computer consumes a huge amount of computing resources when performing three-dimensional variational data assimilation, and the assimilation efficiency is low. A quantum computer is a physical device that performs high-speed mathematical and logical operations, stores and processes quantum information in accordance with the laws of quantum mechanics. It has a higher efficiency in processing mathematical problems than a classical computer, so using quantum computing to accelerate the data assimilation process has important research and application value. SUMMARY

[0005] The purpose of the present application is to provide a fluid state updating method based on variational data assimilation and a related device, so as to improve the data assimilation efficiency of high-dimensional data through the exponential acceleration effect of quantum computing.

[0006] One embodiment of the present application provides a fluid state updating method based on variational data assimilation, which comprises:

[0007] linearizing a nonlinear operator in an objective function of a state to be solved, converting the objective function into a positive definite quadratic form; the state to be solved is the state of a simulation model of a real fluid system at an initial time; the objective function represents the distance between the state to be solved and the real state of the real fluid system at the initial time;

[0008] Deriving the objective function of the positive definite quadratic form with respect to an analysis increment, obtaining a linear equation system of the analysis increment when a gradient of the objective function is zero, the analysis increment being a difference between the state to be solved and a background field, the background field being a priori estimation data of the state to be solved;

[0009] Constructing a quantum circuit for solving the linear equation system, running the quantum circuit to obtain the analysis increment, and updating the state to be solved of the simulation model based on the analysis increment.

[0010] Optionally, the quantum circuit comprises a first sub-quantum circuit, a second sub-quantum circuit and a third sub-quantum circuit, wherein:

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

[0012] The second sub-quantum circuit is configured to calculate a product of an inverse matrix of a coefficient matrix of the linear equation system and the residual term, to obtain a quantum state of the analysis increment;

[0013] The third sub-quantum circuit is configured to execute a quantum state tomography algorithm to convert the quantum state of the analysis increment into classical data of the analysis increment.

[0014] Optionally, the residual term comprises a residual vector and a residual matrix, and the first sub-quantum circuit comprises an encoding gate U e and a residual term construction gate U D , and the first sub-quantum circuit comprises a first quantum register and a second quantum register, wherein:

[0015] The encoding gate U e acts on quantum bits in the first quantum register, for normalizing the residual vector and encoding the residual vector into a quantum state;

[0016] The residual term construction gate U D acts on quantum bits in the first quantum register and the second quantum register, for calculating a product of the residual vector and the residual matrix, to obtain a quantum state of the residual term of the linear equation system.

[0017] Optionally, the second sub-quantum circuit comprises a first SWAP gate, a second SWAP gate and a controlled quantum gate The second sub-quantum circuit comprises the first quantum register, the second quantum register, a third quantum register and a fourth quantum register, wherein:

[0018] The first SWAP gate is configured to exchange a control quantum state of a quantum bit in the second quantum register with a |0> state of a first type of quantum bit in the third quantum register;

[0019] the second SWAP gate is configured to exchange the quantum state of the quantum bit in the second quantum register except the control quantum state with the |0> state of the second type of quantum bit in the third quantum register;

[0020] the controlled quantum gate for calculating the product of the inverse matrix of the coefficient matrix of the linear equation system and the residual term with the first type of quantum bit as a control bit, acting on the quantum bits in the first quantum register, the second quantum register and the fourth quantum register, to obtain the quantum state of the analysis increment.

[0021] Optionally, the first quantum register includes t quantum bits;

[0022] The second quantum register and the third quantum register include r+1 quantum bits;

[0023] The fourth quantum register includes s quantum bits, which satisfy:

[0024]

[0025] wherein, t=log m, r=t+3, q=t+2, m is the dimension of the analysis increment; p=log j, b=κ 2 log(k / ∈′), κ is the condition number of the coefficient matrix of the linear equation system, and ∈' is the construction accuracy of the coefficient matrix of the linear equation system.

[0026] Optionally, the model field is simulation data of the simulation model at any discrete time, the observation field is observation data obtained by observing the real fluid system at the discrete time, the model operator is an evolution operator of the state of the simulation model from the initial time to the discrete time, and the observation operator is a mapping from the model field to the observation field when the real fluid system is observed at the discrete time; the linearization processing of the nonlinear operator in the objective function of the state to be solved converts the objective function into a positive definite quadratic form, which comprises:

[0027] Based on the model field, the observation field, the background field and the three-dimensional variational data assimilation technology, a three-dimensional variational data assimilation objective function of the state to be solved is constructed;

[0028] The model operator and the observation operator in the objective function are respectively Taylor expanded at the background field, and the first-order truncation is retained, so that the objective function is converted into a positive definite quadratic form.

[0029] Optionally, the three-dimensional variational data assimilation objective function of the to-be-solved state is constructed based on the mode field, the observation field, the background field and the three-dimensional variational data assimilation technology, and the three-dimensional variational data assimilation objective function of the to-be-solved state comprises the following steps:

[0030] The mode integral is performed based on the to-be-solved state and the mode operator, and a mode field of the simulation model at the discrete time is obtained.

[0031] The real fluid system is observed based on the mode field and the observation operator, and an observation field of the real fluid system at the discrete time is obtained.

[0032] The to-be-solved state is prior estimated, and a background field of the simulation model at the initial time is obtained.

[0033] The posterior probability of the to-be-solved state and the mode field when the observation field is known is calculated based on the mode field, the observation field and the background field.

[0034] The posterior probability is taken as a negative logarithm, and the three-dimensional variational data assimilation objective function of the to-be-solved state is calculated.

[0035] Optionally, the to-be-solved state is prior estimated, and the background field of the simulation model at the initial time is obtained, and the method comprises the following steps:

[0036] The system state of the simulation model at any time before the initial time is obtained.

[0037] The mode integral is performed based on the system state and the mode operator, and the background field of the simulation model at the initial time is obtained.

[0038] Optionally, the to-be-solved state of the simulation model is updated based on the analysis increment, and the method comprises the following steps:

[0039] If the analysis increment does not exceed a preset range, the sum of the background field and the analysis increment is calculated as an initial state of the simulation model.

[0040] If the analysis increment exceeds the preset range, the sum of the background field and the analysis increment is calculated as a new background field of the simulation model at the initial time, and the step of linearizing the nonlinear operator in the to-be-solved state objective function is returned to be executed until the analysis increment does not exceed the preset range.

[0041] Another embodiment of the present application provides a fluid state updating device based on variational data assimilation, and the device comprises:

[0042] linearization module, configured to linearize a nonlinear operator in a target function of a state to be solved, and convert the target function into a positive definite quadratic form, the state to be solved being a state of a simulation model of a real fluid system at an initial time, the target function representing a distance between the state to be solved and a real state of the real fluid system at the initial time;

[0043] data assimilation module, configured to derive a linear equation set of an analysis increment when a gradient of the target function of the positive definite quadratic form is zero, the analysis increment being a difference between the state to be solved and a background field, the background field being a prior estimation data of the state to be solved;

[0044] quantum computing module, configured to construct a quantum circuit for solving the linear equation set, run the quantum circuit to obtain the analysis increment, and update the state to be solved of the simulation model based on the analysis increment.

[0045] Yet another embodiment of the present application provides a storage medium having a computer program stored therein, wherein the computer program is configured to execute the method described in any of the above embodiments when running.

[0046] Yet another embodiment of the present application provides an electronic device comprising a memory and a processor, the memory having a computer program stored therein, and the processor being configured to execute the computer program to execute the method described in any of the above embodiments.

[0047] Compared with the prior art, the fluid state updating method based on variational data assimilation and the related device provided by the present application linearize a nonlinear operator in a target function of a state to be solved, and convert the target function into a positive definite quadratic form, the state to be solved being a state of a simulation model of a real fluid system at an initial time, the target function representing a distance between the state to be solved and a real state of the real fluid system at the initial time; the data assimilation module is configured to derive a linear equation set of an analysis increment when a gradient of the target function of the positive definite quadratic form is zero, the analysis increment being a difference between the state to be solved and a background field, the background field being a prior estimation data of the state to be solved; the quantum computing module is configured to construct a quantum circuit for solving the linear equation set, run the quantum circuit to obtain the analysis increment, and update the state to be solved of the simulation model based on the analysis increment.

[0048] Using a three-dimensional variational data assimilation technique, the optimization of the initial state of the simulation model of the real fluid system can be converted into the solution of the analysis increment, so as to establish a linear equation group of the analysis increment and construct a quantum circuit for solving the linear equation group, and then the analysis increment can be calculated by means of quantum calculation, and the initial state is updated. When the background field estimation is accurate, the complexity of the data assimilation scheme is greatly reduced, the assimilation accuracy is improved, and based on the almost exponential acceleration effect of quantum calculation, the data assimilation efficiency of high-dimensional data is effectively improved. BRIEF DESCRIPTION OF DRAWINGS

[0049] Figure 1 A network block diagram of a fluid state updating system based on variational data assimilation provided by an embodiment of the present application;

[0050] Figure 2 A flowchart of a fluid state updating method based on variational data assimilation provided by an embodiment of the present application;

[0051] Figure 3 A schematic diagram of a quantum circuit for solving a linear equation group provided by an embodiment of the present application;

[0052] Figure 4 A structural schematic diagram of a fluid state updating device based on variational data assimilation provided by an embodiment of the present application;

[0053] Figure 5 A structural schematic diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0054] The embodiments described below with reference to the drawings are exemplary and are only used to explain the present application, and cannot be explained as a limitation of the present application.

[0055] Figure 1 A network block diagram of a fluid state updating system based on variational data assimilation provided by an embodiment of the present application. The fluid state updating system can include a network 110, a server 120, a wireless device 130, a client 140, a storage 150, a classical computing unit 160, a quantum computing unit 170, and can also include additional storage, classical processors, quantum processors and other devices not shown.

[0056] The network 110 is a medium for providing communication links between various devices and computers connected together in the fluid state updating system, including but not limited to the Internet, an intranet, a local area network, a mobile communication network and combinations thereof, and the connection mode can adopt wired, wireless communication links or optical fiber cables, etc.

[0057] The server 120, the wireless device 130 and the client 140 are conventional data processing systems that can contain data and have application programs or software tools that perform conventional computing processes. The client 140 can be a personal computer or a network computer, and thus the data can also be provided by the server 120. The wireless device 130 can be a smartphone, a tablet, a notebook computer, a smart wearable device, etc. The storage unit 150 can include a database 151, which can be configured to store data of qubit parameters, quantum logic gate parameters, quantum circuits, quantum programs, etc.

[0058] The classical computing unit 160 (quantum computing unit 170) can 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), which can be boot files, operating system images, and application programs 163 (application programs 173), which can be used to implement quantum algorithms compiled based on the fluid state update method based on variational data assimilation provided by embodiments of the application.

[0059] 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 program executed by it can also be configured to be executed in another classical (quantum) processing system in a similar manner.

[0060] It should be noted that a real quantum computer is a hybrid structure, which includes at least two parts: a classical computing unit 160 responsible for performing classical computation and control; and a quantum computing unit 170 responsible for running quantum programs to implement quantum computation. Figure 1

[0061] The classical computing unit 160 and the quantum computing unit 170 described above can be integrated in one device or distributed in two different devices. For example, a first device including the classical computing unit 160 runs a classical computer operating system, on which quantum application development tools and services are provided, and storage and network services required by quantum applications are also provided. A user develops a quantum program through the quantum application development tools and services thereon, and sends the quantum program to a second device including the quantum computing unit 170 through the network services thereon. The second device runs a quantum computer operating system, which parses and compiles the code of the quantum program into instructions that can be recognized and executed by the quantum processor 170, and the quantum processor 170 implements the quantum algorithm corresponding to the quantum program according to the instructions.

[0062] ​The computing unit of the classical processor 161 in the classical computing unit 160 is a CMOS tube based on a silicon chip, and such a computing unit is not limited by time and coherence, that is, such a computing unit is not limited by the use time and is available at any time. In addition, in the silicon chip, the number of such computing units is also sufficient, and at present, the number of computing units in a classical processor 161 is thousands or even tens of thousands. The number of computing units is sufficient and the computing logic of the CMOS tube is fixed, for example: AND logic. When operating by means of the CMOS tube, the operation effect is achieved by combining a large number of CMOS tubes with limited logic functions.

[0063] The basic computing unit of the quantum processor 171 in the quantum computing unit 170 is a quantum bit, and the input of the quantum bit is limited by coherence and coherence time, that is, the quantum bit is limited by the use time and is not available at any time. It is a key problem of quantum computing to fully use the quantum bit within the available use time of the quantum bit. In addition, the number of quantum bits in a quantum computer is one of the representative indicators of the performance of the quantum computer, and each quantum bit realizes the computing function by means of the logic function configured on demand. Since the number of quantum bits is limited, and the logic functions in the field of quantum computing are diversified, for example: Hadamard gate (H gate), Pauli-X gate (X gate), Pauli-Y gate (Y gate), Pauli-Z gate (Z gate), X gate, RY gate, RZ gate, CNOT gate, CR gate, iSWAP gate, Toffoli gate, etc. When quantum computing, the operation effect is achieved by combining a limited number of quantum bits with a variety of logic functions.

[0064] Based on these differences, the design of the classical logic function acting on the CMOS tube and the design of the quantum logic function acting on the quantum bit are significantly and essentially different; the design of the classical logic function acting on the CMOS tube does not need to consider the individuality of the CMOS tube, such as the individual identification, position, and available time of each CMOS tube in the silicon chip. Therefore, the classical algorithm composed of the classical logic function only expresses the operation relationship of the algorithm and does not express the dependence of the algorithm on the individuality of the CMOS tube.

[0065] And the quantum logic function acting on the quantum bit needs to consider the individuality of the quantum bit, such as the individual identification, position, and relationship with the surrounding quantum bits of the quantum bit in the quantum chip, as well as the available time of each quantum bit. Therefore, the quantum algorithm composed of the quantum logic function not only expresses the operation relationship of the algorithm, but also expresses the dependence of the algorithm on the individuality of the quantum bit.

[0066] The quantum chip only includes quantum bits and channels for regulating the quantum bits, quantum logic gates are realized through analog signals, and analog signals of different combinations are applied to the quantum bits through the channels for regulating the quantum bits, so that quantum circuits with different functions are realized, and data processing is completed, therefore, the design of quantum logic function acting on the quantum bits (including the design of whether to use the quantum bits and the design of the use efficiency of each quantum bit) is the key to improving the operation performance of the quantum computer, and needs to be specially designed, which is the uniqueness of the quantum algorithm based on the quantum logic function implementation, and is essentially and significantly different from the classical algorithm based on the classical logic function implementation. The above design for the quantum bits is a technical problem that ordinary computing devices do not need to consider and face.

[0067] The application provides a fluid state updating method based on variational data assimilation and a related device, aiming to improve the data assimilation efficiency of high-dimensional data through the exponential acceleration effect of quantum computing. In general, data assimilation refers to the fusion of existing knowledge of a system and observation data of the system. For example, in weather forecasting, in order to effectively complete forecasting, the initial value of the atmospheric state variable on the discrete grid must be obtained. At this time, the purpose of data assimilation is to obtain the initial field of the model prediction by using all available knowledge. For the convenience of reading and understanding, the professional terms and mathematical symbols in the field of data assimilation are explained first.

[0068] Real field: refers to the real data of a system to be studied, for example, in weather forecasting, it refers to the real atmospheric state. Due to the influence of 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. In the embodiment, x t represents the real field.

[0069] Observation field: refers to the observation data obtained by observing the real field by using satellites, radars and other tools. The observation field can be considered as a set of low-dimensional data, and with the improvement of observation technology, the observation data will approach the corresponding real data. In the embodiment, y represents the observation field if not specially stated.

[0070] Model field: refers to the simulation data in the simulation of the system to be studied, for example, in weather forecasting, it refers to the prediction data. The model field is a set of high-dimensional data with finite dimensions. In the embodiment, x m represents the model field.

[0071] Analysis field: refers to the data result after data assimilation, and the dimension is consistent with that of the model field, which can be considered as the correction of the model field. In the embodiment, x a represents the analysis field.

[0072] Background field: is a concept introduced by data assimilation method, which can be considered as the priori estimation of analysis field, and its dimension is consistent with analysis field. In this embodiment, if no special instructions, use x b to represent background field, after introducing background field, the actual data assimilation range will be changed from analysis space x a to variable space (x a -x b ).

[0073] Model operator: refers to the evolution operator of the state of the system to be studied between two adjacent time steps when the numerical simulation of the system is carried out, and the model operator is a nonlinear operator. In this embodiment, if no special instructions, use to represent the model operator. If the system to be studied has Markov property, then holds, where subscript n represents the discrete time.

[0074] Observation operator: the observation operator refers to the mapping from the model field to the observation field, and is a nonlinear operator, which is usually composed of two parts, one part is the space-time interpolation operator of grid points to observation points in model calculation, and the other part is the conversion operator of model variables to observation variables. In this embodiment, the specific form of the observation operator is not studied and processed, and if no special instructions, use to represent the observation operator.

[0075] Model error and model error covariance matrix: the error between the numerical model and the evolution of the real system can be defined as , and the model error covariance matrix can be further defined as The upper horizontal line represents the expectation, and the same below.

[0076] Observation error and observation error covariance matrix: the error between the observation value and the true value can be defined as , and the observation error covariance matrix can be further defined as

[0077] Background error and background error covariance matrix: the error between the background field data and the corresponding true value can be defined as b = x b -x t , and the background error covariance matrix can be further defined as

[0078] See Figure 2 , Figure 2 , a fluid state updating method based on variational data assimilation provided by the embodiment of the present application, the method comprises:

[0079] Step 201: linearizing a nonlinear operator in a target function of a state to be solved, and converting the target function into a positive definite quadratic form; the state to be solved is a state of a simulation model of a real fluid system at an initial time; the target function represents a distance between the state to be solved and a real state of the real fluid system at the initial time.

[0080] Specifically, the state to be solved is a state of a simulation model of a real fluid system at an initial time, that is, a target result of this data assimilation: an analysis field. Then the state to be solved can be mode-integrated from the initial time to any discrete time, to obtain a mode field The time period from the initial time to the discrete time is called an assimilation window [1, K]. In the field of data assimilation, when the assimilation window K > 1, the variational data assimilation is called four-dimensional variational data assimilation, and correspondingly, when K = 1, the variational data assimilation is called three-dimensional variational data assimilation. Within the assimilation window [1, K], the mode field can be mapped to an observation field, that is, the real fluid system can be observed at the discrete time to obtain a corresponding observation field y k ; an artificial prior estimation data of the state to be solved, that is, a background field x b , can also be introduced.

[0081] Further, a nonlinear equation can be established based on the mode field , the observation field y k , and the background field x b , that is, a target function of three-dimensional variational data assimilation is obtained through the variational method. The target function J can represent a distance between the state to be solved and the real state of the real fluid system at the initial time, so as to convert the data assimilation problem into an extreme value problem of the target function J. When the target function J takes a minimum value, the distance between the state to be solved and the real state of the real fluid system at the initial time is the smallest, and the data assimilation effect is the best.

[0082] As an implementation manner of an embodiment of the present application, the mode field is simulation data of the simulation model at any discrete time, the observation field is observation data obtained by observing the real fluid system at the discrete time, the mode operator is an evolution operator of a state of the simulation model from the initial time to the discrete time, and the observation operator is a mapping from the mode field to the observation field when the real fluid system is observed at the discrete time. The linearization of the nonlinear operator in the target function of the state to be solved and the conversion of the target function into a positive definite quadratic form can include the following steps.

[0083] Step 301: constructing a target function of three-dimensional variational data assimilation of the state to be solved based on the mode field, the observation field, the background field, and a three-dimensional variational data assimilation technique.

[0084] Optionally, the constructing the objective function of the three-dimensional variational data assimilation of the to-be-solved state based on the mode field, the observation field, the background field and the three-dimensional variational data assimilation technology can include:

[0085] Step 401: performing mode integration based on the to-be-solved state and the mode operator to obtain a mode field of the simulation model at the discrete time.

[0086] Those skilled in the art can understand that the scheme provided by the embodiment of the present application is to accelerate the three-dimensional variational data assimilation in the manner of quantum calculation, that is, in the embodiment, K = 1, that is, only one mode field at a discrete time is obtained by mode integration in the assimilation window [1, K] However, in order to more clearly and generally describe the principle of the data assimilation process and the establishment process of the objective function, some formulas in the following may involve multiple mode fields and their corresponding observation fields when K > 1, and those skilled in the art can clearly understand the difference between the technical scheme provided by the embodiment of the present application.

[0087] Specifically, in the assimilation window [1, K], the to-be-solved state of the simulation model of the real fluid system at the initial time, that is, the analysis field x a , is assumed. Mode integration can be continuously performed in the assimilation window [1, K] to obtain mode fields at each discrete time, which are x Thus, the system state trajectory composed of the analysis field and each mode field can be obtained.

[0088] Step 402: observing the real fluid system based on the mode field and the observation operator to obtain an observation field of the real fluid system at the discrete time.

[0089] Specifically, the above mode field x K can be mapped to the observation field y k , that is, in the assimilation window [1, K], the real fluid system is observed at each discrete time by the observation operator H K to obtain the corresponding observation field, so that the observation trajectory y = [y b , …, y b ] can be obtained.

[0090] Step 403: performing prior estimation on the to-be-solved state to obtain a background field of the simulation model at the initial time.

[0091] Specifically, the to-be-solved state of the simulation model of the real fluid system at the initial time can be prior estimated to obtain the background field xb Background field x b The accuracy of the estimation will affect the precision and computation of the subsequent data assimilation, so in this step, the background field x b as similar as possible to the analysis field x a to be solved.

[0092] As a specific embodiment of the present application, the above-mentioned prior estimation of the state to be solved can include:

[0093] Obtaining the system state of the simulation model at any time before the initial time;

[0094] Performing mode integration based on the system state and the mode operator to obtain the background field of the simulation model at the initial time.

[0095] For example, in the specific scenario of weather forecasting, every 6 hours can be set as an assimilation window for data assimilation. In the current data assimilation process (e.g., the assimilation window from 6 o'clock to 12 o'clock today), in order to obtain the background field at the initial time of 6 o'clock, the analysis field at 0 o'clock today obtained by the previous data assimilation can be obtained as the system state at any time before the initial time. Since the analysis field at 0 o'clock is obtained by the previous data assimilation (i.e., the assimilation window from 0 o'clock to 6 o'clock today), it not only contains the model evolution knowledge of the known weather forecasting model, but also uses the real atmospheric state data from 0 o'clock to 6 o'clock to optimize it, so that the recent atmospheric state can be simulated more accurately. Then, the analysis field at 0 o'clock today is used to perform mode integration using the mode operator from 0 o'clock to 6 o'clock today, and the background field at the initial time of 6 o'clock can be obtained. The background field should be close to the result of the current data assimilation, so as to reduce the computation of the data assimilation process and improve the precision of the data assimilation.

[0096] Step 404: Based on the mode field, the observation field and the background field, the posterior probability of the state to be solved and the mode field when the observation field is known is calculated.

[0097] Specifically, in the Bayesian description of data assimilation, under the premise that the observation has occurred (i.e., there is an observation trajectory y), the above-mentioned system state trajectory x, i.e., the state to be solved x a and the posterior probability of the mode field can be:

[0098]

[0099] The essence of data assimilation is to solve the state x a Optimization is performed so that the probability of the system state trajectory x is maximum when the background field x b and the observation trajectory y is determined.

[0100] It can be considered that the simulation model of the real fluid system in the embodiment of the application has a first-order Markov property, so that the prior probability p(x) can be written as:

[0101]

[0102] In addition, the observation fields at different target times can be independent, and the observation only depends on the pattern field at the corresponding discrete time, so that the likelihood probability p(y|) can be written as:

[0103]

[0104] Further, based on the observation independent assumption, i.e. the observation behaviors at different discrete times are independent, the prior probability p(y) can be written as:

[0105] p(y)=p(y K )…p(y1)

[0106] Since the background field x b is the prior estimation of the to-be-solved state x a , there is no influence of the observation, so the background field x b is only related to the to-be-solved state x a .

[0107] The above prior probability p(x), prior probability p(y) and likelihood probability p(y|x) are brought into the calculation formula of the posterior probability of the to-be-solved state and the pattern field, so that the posterior probability p(x|x b ,y) is:

[0108]

[0109] Step 405: taking the negative logarithm of the posterior probability, the target function of the three-dimensional variational data assimilation of the to-be-solved state is calculated.

[0110] Specifically, taking the negative logarithm of the above posterior probability p(x|x b ,y), the target function of the variational method (three-dimensional data variational method or four-dimensional data variational method) can be obtained as follows:

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

[0112] Among them, c represents the constant term, J m Then the model field error ∈ m Under the conditions of strong constrained variational data assimilation, the assimilation window is generally not too large. At this time, it can be considered that the model calculation error is very small. m =0.

[0113] J b Related to the background field error. In data assimilation, it is generally assumed that the error is Gaussian and unbiased. In this case, J b It can be written as:

[0114]

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

[0116] J o It is related to the observation field error. Based on the Gaussian unbiased assumption, J o It can be written as:

[0117]

[0118] Among them, R k is the covariance matrix of the observation error at each discrete moment.

[0119] Based on the above formula, it can be calculated that for three-dimensional variational data assimilation, its objective function is:

[0120]

[0121] Since the objective function is a nonlinear equation representing the distance between the state to be solved 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. At this time, the distance between the state to be solved 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.

[0122] Step 302: Taylor expansion is performed on the pattern operator and the observation operator in the objective function at the background field respectively, and the first-order truncation is retained to convert the objective function into a positive definite quadratic form.

[0123] Since the error covariance matrix in the objective function of the above three-dimensional variational data assimilation is positive definite, the objective function must have a minimum value. Finding the minimum value is equivalent to solving First, the objective function needs to be derived. The nonlinear operators in the objective function include the observation operator and pattern operators Both of the two operators are nonlinear, if they can be linearized, the objective function J can be converted into a positive definite quadratic form which is easy to solve.

[0124] Specifically, if the background field x b has higher accuracy, that is, when the following formula is satisfied:

[0125] O(‖δx‖)=O(||x b -x a ||)<<O(‖x a ‖)

[0126] At this time, the pattern operator can be Taylor expanded at the background field x b , and the first-order truncation is retained, and there is:

[0127]

[0128] Where M is the tangent linear operator of the pattern operator , and M b is the Jacobian matrix of the function corresponding to the pattern operator at x b .

[0129] Similarly, the observation operator can be Taylor expanded at the background field x b , and the first-order truncation is retained, and there is:

[0130]

[0131] Where H b is the Jacobian matrix of the function corresponding to the observation operator at x b .

[0132] The pattern operator and the observation operator after Taylor expansion are brought into the above three-dimensional variational data assimilation objective function, and the above objective function can be converted into a positive definite quadratic form:

[0133]

[0134] Where F=H b M b ,

[0135] Those skilled in the art can understand that the above way of Taylor expanding and retaining the first-order truncation of the nonlinear operator is only one mature and commonly used linearization way, in the technical solutions provided by the embodiments of the present application, other linearization schemes can also be used to linearize the objective function of the state to be solved, to convert the objective function into a positive definite quadratic form, which will not be repeated here.

[0136] Step 202: Differentiate the objective function of the positive quadratic form with respect to the analysis increment to obtain a linear equation system of the analysis increment when the gradient of the objective function is zero, wherein the analysis increment is the difference between the state to be solved and the background field, and the background field is the prior estimation data of the state to be solved.

[0137] Specifically, the analytical increment δx in the objective function of the positive quadratic form can be differentiated to obtain the gradient of the objective function:

[0138]

[0139] Where, the analysis increment δx = x a -x b , is the difference between the state to be solved and the background field, the background field x b is the state x to be solved a Prior estimates of .

[0140] When the gradient of the objective function When is zero, the objective function J(x) reaches its minimum value. At this time, the distance between the state to be solved 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 the best. Written in the form of a standard system of linear equations, we have:

[0141] (B -1 +F T R -1 F)δx=-F T R -1 d

[0142] Among them, given the pattern field x m The dimension of the model field is m, and the dimension of the observation field y is n. From the definitions of the model field and the observation field, it is clear that m>n. Naturally, the size of the background error covariance matrix B is m×m, the size of the observation error covariance matrix R is n×n, the size of the matrix F is n×m, the dimension of the analysis increment δx is m, and the dimension of the residual vector d is n.

[0143] The principle of the above three-dimensional variational data assimilation method can be understood as follows: first, by introducing a reasonable error model, the original problem of solving x0 = arg max p(x|y) is transformed into solving x0 = arg min J(x0), where J is the objective function in this embodiment, and its form is much simpler than p(x|y). Then, by introducing the background field x b =x a -δx, the solution space is changed from x a The analytical space (Same as pattern space) converted to the incremental space where δx is located Obviously, the increment space size will not be higher than the analysis space, and the more accurate the background field is, that is, the closer the background field obtained by prior estimation is to the analysis field (x b →x a ), the smaller the increment space will be, and the smaller the corresponding calculation amount will be.

[0144] Based on the above steps, if the estimated background field x b is relatively accurate, then the optimization problem of the simulation model of the real fluid system at the initial moment of the to-be-solved state can be converted into the solution of a linear equation group , and quantum calculation can be used to accelerate the solution of the linear equation group to obtain the analysis field x a , that is, the above to-be-solved state.

[0145] Step 203: Constructing a quantum circuit for solving the linear equation group, running the quantum circuit to obtain the analysis increment, and updating the to-be-solved state of the simulation model based on the analysis increment.

[0146] Specifically, when solving a large-scale linear equation group by quantum calculation, the coefficient matrix and the residual term of the linear equation group need to be encoded into a quantum state, and then entangled evolution is performed on the quantum state by using a quantum linear algorithm, so that the quantum state of the solution of the linear equation group is obtained. Finally, the solution of the quantum state is converted into a classical form by using a quantum state tomography algorithm, and a classical solution is obtained.

[0147] Therefore, based on the above solving idea and the specific form of the linear equation group obtained by calculation, a quantum circuit for solving the linear equation group can be constructed. As an embodiment of the present application, the above quantum circuit can include a first sub-quantum circuit, a second sub-quantum circuit and a third sub-quantum circuit, wherein:

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

[0149] As a specific embodiment of the present application, the above residual term can include a residual vector and a residual matrix, and the above first sub-quantum circuit can include an encoding gate U e and a residual term construction gate U D , and the above first sub-quantum circuit can include a first quantum register and a second quantum register, wherein:

[0150] The encoding gate U e acts on the quantum bits in the first quantum register, and is used to normalize the residual vector and encode it into a quantum state;

[0151] The residual term construction gate U DActing on the qubits in the first quantum register and the second quantum register, for calculating the product of the residual vector and the residual matrix, to obtain the quantum state of the residual term of the linear equation set.

[0152] Specifically, the dimension of the residual vector d in the above residual term is n, which can be first padded with 0 and converted into a vector e=[d1, d2, …, d n ,0 n+1 ,0 n+2 ,…,0 m ] T , and then an encoding gate U e can be constructed by amplitude encoding to realize the following process:

[0153] U e |0>=|e>

[0154] Wherein, is a normalization coefficient.

[0155] The encoding gate U e acts on the qubits in the first quantum register, normalizes the residual vector d, and encodes it into a quantum state, and the encoding complexity can reach (log n).

[0156] The above residual term can also include a residual matrix F T R -1 , since its dimension is m×n, it is difficult to directly convert it into a quantum logic gate operation. First, the residual matrix F T R -1 is converted into an m×m matrix C by padding 0 operation, as follows:

[0157] C=[F T R -1 0] m×m

[0158] Then, the matrix C is Hermite, and has:

[0159]

[0160] Further, by the technology of constructing any Hamiltonian by quantum walk, the equivalent quantum gate U D of the matrix D can be constructed, that is, the residual term construction gate U D is a 16m 2 ×16m 2 size unitary matrix, which satisfies:

[0161]

[0162] Where, {|φ> ⊥represents a basis vector orthogonal to |f>, t = log m, r = t + 3, |f> represents an arbitrary quantum state. The residual term constructs a gate U D acting on the quantum bits in the first quantum register and the second quantum register, calculating the product of the residual vector d and the residual matrix F T R -1 of the linear equation system, and the preparation complexity is O (log m).

[0163] In summary, the first sub-quantum circuit can realize the preparation of the quantum state of the residual term of the linear equation system.

[0164] The second sub-quantum circuit is used to calculate the product of the inverse matrix of the coefficient matrix of the linear equation system and the residual term, to obtain the quantum state of the analysis increment.

[0165] As a specific embodiment of the embodiment of the application, the second sub-quantum circuit can include a first SWAP gate, a second SWAP gate and a controlled quantum gate The second sub-quantum circuit can include the first quantum register, the second quantum register, the third quantum register and the fourth quantum register, wherein:

[0166] The first SWAP gate is used to exchange the control quantum state of the quantum bit in the second quantum register with the |0> state of the first type of quantum bit in the third quantum register;

[0167] The second SWAP gate is used to exchange the quantum state of the quantum bit in the second quantum register except the control quantum state with the |0> state of the second type of quantum bit in the third quantum register;

[0168] The controlled quantum gate is used to act on the quantum bits in the first quantum register, the second quantum register and the fourth quantum register with the first type of quantum bit as the control bit, to calculate the product of the inverse matrix of the coefficient matrix of the linear equation system and the residual term, to obtain the quantum state of the analysis increment.

[0169] Specifically, the coefficient matrix A of the linear equation system is A = B -1 + F T R -1 F, since the error covariance matrix B, beta is a real symmetric matrix, the coefficient matrix A is a Hermite matrix. Referring to the commonly used quantum linear algorithm for solving linear equation systems, such as CKS algorithm, the equivalent unitary matrix of the inverse matrix A -1 of the coefficient matrix A can be constructed, that is, the controlled quantum gate The dimension size is related to the condition number K of the coefficient matrix A and the construction precision e', and satisfies:

[0170]

[0171] wherein q = t + 2, p = logj, b = k 2 log(K / e'). Then when , the quantum state of the analysis increment δx can be obtained as The quantum state of the solution of the linear equation system is

[0172] Controlled quantum gate The controlled quantum gate can take the first type of quantum bit in the third quantum register as a control bit, and act on the quantum bits in the first quantum register, the second quantum register and the fourth quantum register, so as to calculate the inverse matrix A -1 of the coefficient matrix of the linear equation system, and obtain the quantum state of the analysis increment δx by multiplying the quantum state of the residual term Ce, to realize The complexity of the gate is O[poly(log m)].

[0173] It should be noted that after the first sub-quantum circuit completes the quantum state encoding of the residual term, the quantum state of the residual term is stored on the quantum bits of the first quantum register, and the quantum bits of the second quantum register store the control quantum state and the quantum state other than the control quantum state. In the above linear solving process, the controlled quantum gate The first type of quantum bit in the third quantum register is taken as a control bit, and the quantum state of the first type of quantum bit should be the control quantum state on the quantum bits of the second quantum register; and the quantum bits in the second quantum register also need to store the calculation result of the linear solving process, which needs to be converted to the |0> state before calculation.

[0174] Therefore, the quantum state in the second quantum register and the |0> state in the third quantum register can be exchanged by two SWAP gates, so as to combine the above quantum state preparation process of the residual term and the linear solving process. The first SWAP gate can exchange the control quantum state of the quantum bits in the second quantum register and the |0> state of the first type of quantum bit in the third quantum register; the second SWAP gate can exchange the quantum state other than the control quantum state of the quantum bits in the second quantum register and the |0> state of the second type of quantum bit in the third quantum register, and the above SWAP operation can be represented by the following formula:

[0175]

[0176] Obviously, when the number of quantum bits of the SWAP operation is l, the complexity of this operation is O(l).​

[0177] In summary, the second sub-quantum circuit can implement the multiplication of the inverse matrix of the coefficient matrix of the linear equation system and the residual term to obtain the quantum state of the analysis increment.

[0178] The third sub-quantum circuit is configured to perform a quantum state tomography algorithm to convert the quantum state of the analysis increment into classical data of the analysis increment.

[0179] The purpose of the tomography process is to perform a quantum state tomography algorithm to convert the quantum state data into classical data. For example, L ∞ Tomography algorithm can be selected, and the complexity of the algorithm can be represented as Where T is the time required to perform one observation circuit, n q The number of bits observed, ∈ refers to the tomography accuracy.

[0180] As an embodiment of the present application, the first quantum register includes t quantum bits.

[0181] The second quantum register and the third quantum register include r+1 quantum bits.

[0182] The fourth quantum register includes s quantum bits, which satisfy:

[0183]

[0184] Where t=logm, r=t+3, q=t+2, m is the dimension of the analysis increment; p=logj, b=κ 2 log(κ / ∈′), κ is the condition number of the coefficient matrix of the linear equation system, and ∈' is the construction accuracy of the coefficient matrix of the linear equation system.

[0185] It can be seen that when p+q>r+1, the number of quantum bits n q =2r+2+s+t=r+1+p+q+t=3logm+logj+6. When p+q≤r+1, n q =2r+2+t=3logm+8. Generally, when discussing quantum computing of large-dimensional data, it can be considered that m>>j, and the order of magnitude of the total number of quantum bits of the quantum circuit is n q ~O(log m).

[0186] The quantum circuit for solving the linear equation system in the embodiment of the present application can be as Figure 3As shown in the figure, the quantum registers in the quantum circuit, from top to bottom, are: a third quantum register including r+1 qubits; a fourth quantum register including s qubits; a second quantum register including r+1 qubits; and a first quantum register including t qubits. The initial state of all qubits is |0> state.

[0187] In the quantum circuit, the first sub-quantum circuit includes quantum logic gate U e and quantum logic gate U D The second sub-quantum circuit includes two SWAP gates and quantum logic gate The third sub-quantum circuit includes quantum logic gate that performs L ∞ algorithm. The initial quantum state of the quantum circuit is The process of running the quantum circuit to obtain the analysis increment can include the following steps:

[0188] First, apply the encoding gate U e to the t qubits of the first quantum register to complete the following encoding process:

[0189]

[0190] Second, apply the residual term construction gate U D to the t qubits of the first quantum register and the r+1 qubits of the second quantum register to implement the following process:

[0191]

[0192] where the calculated quantum state of the residual term |Ce> is stored in the t qubits of the first quantum register, represents all basis vectors orthogonal to |·> represents a quantum state irrelevant to the quantum linear algorithm and does not have to be solved.

[0193] Third, perform SWAP operation on the quantum states on the r+1 qubits of the second quantum register and the r+1 qubits of the third quantum register, respectively, that is,

[0194]

[0195] Fourth, take the first r qubits of the third quantum register as control bits, and apply the controlled quantum gate to the qubits of the fourth, second, and first quantum registers, that is,

[0196]

[0197] At this time, if the quantum state of the quantum bit in the third, fourth, and second quantum registers is observed as then the quantum state of the quantum bit in the first quantum register is which is the quantum state of the solution of the linear equation group.

[0198] It should be noted that the above quantum state and | · > quantum state also have an impact on observation, ultimately affecting the probability of success of the quantum linear algorithm. However, in the quantum linear algorithm, such as the CKS algorithm, the amplitude amplification method can be used to improve the success rate of the algorithm, and for linear solution algorithms, amplitude amplification does not affect the complexity of the algorithm.

[0199] Step 5, execute L ∞ quantum state chromatography algorithm, the solution of the quantum state is converted into a classical solution δx.

[0200] According to the complexity definition of the above quantum state chromatography algorithm, the complexity of the above quantum computation is determined by the complexity of the L ∞ chromatography process, which is where T is determined by the complexity of the most complex , which is O[poly(log m)].

[0201] According to the above analysis, compared with the classical computing complexity , the complexity of the quantum computation in the present application is Since poly(log m) << m, therefore:

[0202]

[0203] It can be seen that when , there is At this time, the quantum computing scheme proposed in the embodiment of the present application has an acceleration advantage compared with classical computing, and the larger the dimension m of the assimilated data, the more obvious the acceleration effect of the quantum computing scheme of the embodiment of the present application. In the limit case (∈→1), the quantum computing scheme proposed in the present application has an approximate exponential speedup effect.

[0204] Therefore, for the three-dimensional variational data assimilation process, under the premise of accurate background field estimation, by linearizing the gradient of the objective function of the three-dimensional variational data assimilation, and then combining quantum state encoding, quantum linear algorithm, and quantum state tomography technology, the embodiment of the present application proposes a technical scheme of quantum three-dimensional variational data assimilation. Compared with the complexity of classical three-dimensional variational data assimilation, the quantum scheme proposed in the embodiment of the present application has an approximate exponential speedup effect in the dimension parameter of data, which can effectively improve the data assimilation efficiency of high-dimensional data.

[0205] As an embodiment of the present application, the above updating the state to be solved of the simulation model based on the analysis increment can include:

[0206] If the analysis increment does not exceed the preset range, the sum of the background field and the analysis increment is calculated as the initial state of the simulation model.

[0207] If the analysis increment exceeds the preset range, the sum of the background field and the analysis increment is calculated as the new background field of the simulation model at the initial time, and the step of linearizing the nonlinear operator in the objective function of the state to be solved is returned to be executed, and the objective function is converted into a positive definite quadratic form until the analysis increment does not exceed the preset range.

[0208] Specifically, after obtaining the quantum state of the analysis increment by quantum computing and converting the quantum state of the analysis increment into the form of classical data δx using the quantum state tomography algorithm, since the analysis increment δx is the difference between the state to be solved and the background field x b , and the background field x b is known, the initial state of the simulation model of the real fluid system can be updated based on the analysis increment δx.

[0209] In the scheme provided by the embodiment of the present application, the numerical range of the analysis increment can be set in advance. If the analysis increment obtained by running the above quantum circuit does not exceed the preset range, it indicates that the background field estimation is accurate and close to the initial state to be solved. At this time, the sum of the background field and the analysis increment can be calculated as the initial state of the simulation model. The preset range can be determined based on data assimilation accuracy requirements and computational complexity, and is not limited here.

[0210] If the analysis increment obtained exceeds the preset range, it indicates that the background field estimation is not accurate enough and there is a large gap between the initial state to be solved and the initial state, and the state to be solved needs to be re-estimated to obtain a new background field, and then the three-dimensional variational quantum data assimilation is performed again. In an embodiment, the sum of the background field estimated not accurately enough and the analysis increment can be calculated as the new background field of the simulation model at the initial time, and the steps of linearizing the nonlinear operator in the objective function of the state to be solved, converting the objective function into a positive definite quadratic form, and deriving the objective function of the positive definite quadratic form to establish a linear equation group of the analysis increment when the gradient is zero are performed again, and then a quantum circuit for solving the linear equation group is constructed, and the analysis increment is obtained by running the quantum circuit. The above steps can be performed in a loop until the analysis increment calculated does not exceed the preset range.

[0211] In the embodiment, when the background field estimation is accurate, the complexity of the data assimilation scheme can be greatly reduced by means of quantum calculation, and the assimilation accuracy is improved. Based on the almost exponential acceleration effect of quantum calculation, the data assimilation efficiency of high-dimensional data is effectively improved. When the background field estimation is not accurate enough, the estimated background field can be corrected based on the analysis increment, so that the background field gradually approaches the analysis field to be solved, thereby improving the effect of data assimilation and saving computing resources.

[0212] Referring to Figure 4 , Figure 4 A fluid state updating device based on variational data assimilation is provided in the embodiment of the application, and the device can include:

[0213] The linearization module 401 is configured to linearize a nonlinear operator in an objective function of a state to be solved, and convert the objective function into a positive definite quadratic form. The state to be solved is a state of a simulation model of a real fluid system at an initial time. The objective function represents a distance between the state to be solved and a real state of the real fluid system at the initial time.

[0214] The data assimilation module 402 is configured to derive a linear equation group of an analysis increment when a gradient of the objective function of the positive definite quadratic form is zero, and the analysis increment is a difference between the state to be solved and a background field. The background field is prior estimation data of the state to be solved.

[0215] The quantum calculation module 403 is configured to construct a quantum circuit for solving the linear equation group, run the quantum circuit to obtain the analysis increment, and update the state to be solved of the simulation model based on the analysis increment.

[0216] The specific functions and effects of the fluid state updating apparatus based on variational data assimilation can be explained in detail with reference to other embodiments of the present specification, and will not be repeated here. Each module in the fluid state updating apparatus based on variational data assimilation can be implemented by software, hardware, or a combination thereof. The modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each module.

[0217] Please refer to Figure 5 The present specification also provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor implements the fluid state updating method based on variational data assimilation in any of the embodiments when executing the computer program. Please refer to Figure 5 The computer device can be a classical computer. The computer device can also be a quantum computer.

[0218] The present specification also provides a computer readable storage medium storing a computer program, wherein the computer program is executed by a computer to make the computer execute the fluid state updating method based on variational data assimilation in any of the embodiments.

[0219] The present specification also provides a computer program product including instructions, wherein the instructions are executed by a computer to make the computer execute the fluid state updating method based on variational data assimilation in any of the embodiments.

[0220] It can be understood that the specific examples in the present specification are only to help those skilled in the art better understand the embodiments of the present specification, and do not limit the scope of the present application.

[0221] It can be understood that in various embodiments of the present specification, the size of the serial number of each process does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present specification.

[0222] It can be understood that the various embodiments described in the present specification can be implemented alone or in combination, and the embodiments of the present specification do not limit this.

[0223] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this specification belongs. The terminology used in the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. As used in this specification, the terms "may" and "can" include any one of, or a combination of, the corresponding inexcitables. As used in this specification and the appended claims, the singular forms "a," "an" and "the" include plural referents unless the context clearly dictates otherwise.

[0224] It can be understood that the processor in the embodiments of the present specification can be an integrated circuit chip with processing capability of signals. In the implementation process, each step of the method embodiments described above can be completed by integrated logic circuits or instructions in the form of software in the processor. The processor described above can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. Each method, step and logic block diagram disclosed in the embodiments of the present specification can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor or the like. The steps of the method disclosed in combination with the embodiments of the present specification can be directly embodied as a hardware coding processor to execute, or a combination of hardware and software modules in the coding processor. The software module can be located in a storage medium in the art such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, register, etc. The storage medium is located in the storage, and the processor reads the information in the storage and combines the hardware to complete the steps of the above method.

[0225] It can be understood that the memory in the embodiments of the present specification can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can 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. The volatile memory can be random access memory (RAM). It should be noted that the memory of the system and method described herein is intended to include but not limited to these and any other suitable type of memory.

[0226] Those skilled in the art can clearly understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized 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 realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present specification.

[0227] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.

[0228] In several embodiments provided in the present specification, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiments are merely schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0229] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment.

[0230] In addition, each functional unit in each embodiment of the present specification can be integrated into a processing unit, or each unit can exist physically independently, or two or more units can be integrated into one unit.

[0231] If the functions are realized in the form of software function 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 the present specification or the parts of the technical solutions that essentially contribute to the prior art or the parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present specification. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0232] The above is only a specific embodiment of the present specification, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present specification, which should be covered within the protection scope of the present specification. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A fluid state updating method based on variational data assimilation, characterized in that: The method comprises: Linearizing a nonlinear operator in an objective function of a state to be solved, and converting the objective function into a positive definite quadratic form; the state to be solved is a state of a simulation model of a real fluid system at an initial moment; and the objective function represents a distance between the state to be solved and a real state of the real fluid system at the initial moment; Derivative the objective function of the positive quadratic form with respect to the analysis increment to obtain a linear equation system of the analysis increment when the gradient of the objective function is zero, wherein the analysis increment is the difference between the state to be solved and the background field, and the background field is the prior estimation data of the state to be solved; Constructing a quantum circuit for solving the linear equations, running the quantum circuit to obtain the analysis increment, and updating the state to be solved of the simulation model based on the analysis increment, wherein the quantum circuit includes a first sub-quantum circuit, the first sub-quantum circuit is used to prepare the quantum state of the residual term of the linear equations, the residual term includes a residual vector and a residual matrix, and the first sub-quantum circuit includes an encoding gate U e and residual term to construct gate U D The first quantum sub-circuit includes a first quantum register and a second quantum register, wherein: the encoding gate U e Acting on the quantum bits in the first quantum register, it is used to normalize the residual vector and encode it into a quantum state; the residual term constructs a gate U D Acting on the quantum bits in the first quantum register and the second quantum register, for calculating the product of the residual vector and the residual matrix, to obtain the quantum state of the residual term of the linear equation system.

2. The method according to claim 1, wherein The quantum circuit further includes a second sub-quantum circuit, wherein: The second sub-quantum circuit is used to calculate the product of the inverse matrix of the coefficient matrix of the linear equation group and the residual term to obtain the quantum state of the analysis increment.

3. The method according to claim 2, wherein The quantum circuit further includes a third quantum circuit, which is used to execute a quantum state tomography algorithm to convert the quantum state of the analysis increment into classical data of the analysis increment.

4. The method according to claim 2, wherein The second sub-quantum circuit includes a first SWAP gate, a second SWAP gate and a controlled quantum gate The second sub-quantum circuit includes the first quantum register, the second quantum register, a third quantum register, and a fourth quantum register, wherein: The first SWAP gate is used to exchange the control quantum state of the quantum bit in the second quantum register with the |0> state of the first type of quantum bit in the third quantum register; The second SWAP gate is used to exchange the quantum state of the quantum bits in the second quantum register except the control quantum state with the |0> state of the second type of quantum bits in the third quantum register; The controlled quantum gate The method is used to use the first type of quantum bit as a control bit, act on the quantum bits in the first quantum register, the second quantum register, and the fourth quantum register, calculate the product of the inverse matrix of the coefficient matrix of the linear equation group and the residual term, and obtain the quantum state of the analysis increment.

5. The method according to claim 4, wherein: The number of quantum bits included in the first quantum register is t; The number of quantum bits included in the second quantum register and the third quantum register is r+1; The number s of quantum bits included in the fourth quantum register satisfies: Wherein, t=logm, r=t+3, q=t+2, m is the dimension of the analysis increment; p=logj, b=k 2 log(k / ∈′), κ is the condition number of the coefficient matrix of the linear equation system, and ∈′ is the construction accuracy of the coefficient matrix of the linear equation system.

6. The method according to claim 1, wherein The pattern 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 the discrete moment; the pattern operator is the evolution operator of the state of the simulation model from the initial moment to the discrete moment; the observation operator is the mapping from the pattern field to the observation field when observing the real fluid system at the discrete moment; The linearizing of the nonlinear operator in the objective function of the state to be solved, and converting the objective function into a positive definite quadratic form, includes: Based on the model field, the observation field, the background field and the three-dimensional variational data assimilation technology, constructing an objective function of the three-dimensional variational data assimilation of the state to be solved; The pattern operator and the observation operator in the objective function are Taylor expanded at the background field respectively, and the first-order truncation is retained, so as to transform the objective function into a positive definite quadratic form.

7. The method according to claim 6, wherein The objective function of the three-dimensional variational data assimilation of the state to be solved is constructed based on the model field, the observation field, the background field and the three-dimensional variational data assimilation technology, including: Performing mode integration based on the state to be solved and the mode operator to obtain a mode field of the simulation model at the discrete moment; Observing the real fluid system based on the model field and the observation operator to obtain an observation field of the real fluid system at the discrete moment; Performing a priori estimation on the state to be solved to obtain the background field of the simulation model at the initial moment; Based on the model field, the observation field, and the background field, calculating the posterior probability of the state to be solved and the model field when the observation field is known; The negative logarithm of the posterior probability is taken to calculate the objective function of the three-dimensional variational data assimilation of the state to be solved.

8. The method according to claim 7, wherein The performing a priori estimation on the state to be solved to obtain the background field of the simulation model at the initial moment includes: Obtaining a system state of the simulation model at any time before the initial time; A mode integration is performed based on the system state and the mode operator to obtain the background field of the simulation model at the initial moment.

9. The method according to any one of claims 1 to 8, wherein The updating of the to-be-solved state of the simulation model based on the analysis increment includes: If the analysis increment does not exceed a preset range, calculating the sum of the background field and the analysis increment as the initial state of the simulation model; If the analysis increment exceeds a preset range, the sum of the background field and the analysis increment is calculated as the new background field of the simulation model at the initial moment, and the process returns to the step of linearizing the nonlinear operator in the objective function of the state to be solved and converting the objective function into a positive definite quadratic form until the analysis increment does not exceed the preset range.

10. A fluid state updating device based on variational data assimilation, characterized in that: The device comprises: a linearization module, configured to linearize a nonlinear operator in an objective function of a state to be solved, thereby converting the objective function into a positive definite quadratic form; the state to be solved being the state of a simulation model of a real fluid system at an initial moment; and the objective function representing the distance between the state to be solved and the real state of the real fluid system at the initial moment; a data assimilation module, configured to derive the objective function of the positive quadratic form with respect to an analysis increment to obtain a linear equation system for the analysis increment when the gradient of the objective function is zero, wherein the analysis increment is the difference between the state to be solved and a background field, and the background field is a priori estimated data of the state to be solved; A quantum computing module is used to construct a quantum circuit for solving the linear equations, run the quantum circuit to obtain the analysis increment, and update the state to be solved of the simulation model based on the analysis increment, wherein the quantum circuit includes a first sub-quantum circuit, the first sub-quantum circuit is used to prepare the quantum state of the residual term of the linear equations, the residual term includes a residual vector and a residual matrix, and the first sub-quantum circuit includes an encoding gate U e and residual term to construct gate U D The first quantum sub-circuit includes a first quantum register and a second quantum register, wherein: the encoding gate U e Acting on the quantum bits in the first quantum register, it is used to normalize the residual vector and encode it into a quantum state; the residual term constructs a gate U D Acting on the quantum bits in the first quantum register and the second quantum register, for calculating the product of the residual vector and the residual matrix, to obtain the quantum state of the residual term of the linear equation system.

11. 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 9 when executed.

12. 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 9.