Fluid homeostasis property determination method and related devices
By constructing quantum circuits and target unitary operators through quantum computing methods, and using the quantum Kaczmarz algorithm to quickly determine the steady-state characteristics of the fluid, the research difficulties brought about by the large-scale and multidimensional nature of fluid flow data are solved, and the efficient solution of the steady-state characteristics of the fluid is achieved.
Patent Information
- Application Number
- CN202411771786.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2044-12-04
AI Technical Summary
The huge scale, multidimensionality and dynamic nature of fluid flow data make fluid steady-state research more difficult, and existing technologies cannot quickly determine fluid steady-state characteristics.
Quantum computing methods are used to construct quantum circuits and use target unitary operators to solve the fluid dynamics equations. The quantum Kaczmarz algorithm is used to quickly determine the steady-state characteristics of the fluid, and the quantum superposition and entanglement characteristics are used to exponentially accelerate the solution of linear equations.
It achieves rapid determination of the steady-state characteristics of the fluid, significantly improves the solution efficiency, and the time complexity is exponentially improved compared to the classical method.
Smart Images

Figure CN119720841B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of fluid dynamics technology, and in particular to a method for determining steady-state characteristics of a fluid and related devices. Background Art
[0002] Fluid steady state refers to the state in which the physical quantities in the flow field, such as velocity, pressure, temperature, etc., are spatially distributed and remain fixed during the flow process. Fluid steady state is widely used in various fields. For example, in urban water supply systems, the water flow in pipes is usually assumed to be steady state to facilitate the design and optimization of equipment such as pumping stations and valves. In wind tunnel experiments, in order to accurately measure the aerodynamic characteristics of objects such as airplanes and cars, it is usually necessary to ensure that the airflow is in a steady state. In physiology, the blood circulation in the human body can be approximated as steady-state flow to facilitate the study of the impact of blood flow on the cardiovascular system. Therefore, the study of fluid steady state is of vital importance.
[0003] Fluid flow data presents the following characteristics: First, the data scale is huge. Fluid flow usually involves a large amount of spatiotemporal data, which includes not only basic physical quantities such as velocity, pressure, and temperature, but may also include multiple attributes such as concentration and density. Second, the multidimensionality of the data. Fluid data is usually multidimensional, including spatial and temporal dimensions. In some cases, other dimensions may also be involved, such as the concentration distribution of different components. Third, the multidimensionality of the data. Fluid flow is dynamic, and even under steady-state conditions, complex vortices, turbulence and other phenomena may exist in local areas. The above data characteristics increase the difficulty of studying fluid steady-state and pose a challenge to how to quickly determine fluid steady-state. Summary of the Invention
[0004] The embodiments of the present application provide a fluid steady-state characteristic determination and related device, which is conducive to quickly determining the fluid steady-state characteristics.
[0005] A first aspect of an embodiment of the present application provides a method for determining steady-state characteristics of a fluid, comprising:
[0006] Obtaining the physical properties and state parameters of the fluid in the target system, wherein the physical properties are used to describe the inherent properties of the fluid, and the state parameters are used to describe the state of the fluid at different times;
[0007] Constructing a fluid dynamics equation based on the physical properties and the state parameters, and discretizing the fluid dynamics equation into a linear equation system, wherein the linear equation system is expressed as a product of a coefficient matrix and a vector corresponding to an unknown quantity being equal to a constant vector;
[0008] A quantum circuit is constructed according to a target unitary operator to solve the linear equations to obtain the steady-state characteristics of the fluid. The target unitary operator acts on two registers. When the quantum state of one of the registers represents any row of the coefficient matrix, the target unitary operator performs a NOT gate operation on the other register. When the quantum state of one of the registers represents the orthogonal complement space of any row of the coefficient matrix, the target unitary operator does not perform any operation on the other register.
[0009] Optionally, constructing a quantum circuit according to the target unitary operator to solve the linear equations to obtain the steady-state characteristics of the fluid includes:
[0010] Randomly selecting a row from the coefficient matrix, and preparing a superposition state of a first quantum state and a second quantum state at a current iteration step, wherein the first quantum state includes a quantum state representing a vector corresponding to the unknown number, and the second quantum state includes a quantum state representing a vector corresponding to a sequence number of the randomly selected row;
[0011] Performing a unitary operation including a target unitary operator on the superposition state of the first quantum state and the second quantum state in the current iteration step to obtain the first quantum state in the next iteration step;
[0012] Measuring and obtaining a vector corresponding to an unknown number represented by the first quantum state in the next iteration step, and calculating a residual vector based on the vector corresponding to the unknown number;
[0013] When the residual vector converges, the steady-state characteristics of the fluid are determined according to the vector corresponding to the unknown number.
[0014] Optionally, the method further includes:
[0015] When the residual vector does not converge, the next iteration step is used as the current iteration step, and the step of randomly selecting a row from the coefficient matrix and preparing a superposition state of the first quantum state and the second quantum state under the current iteration step is performed.
[0016] Optionally, preparing a superposition state of a first quantum state and a second quantum state in a current iteration step includes:
[0017] Determine the amplitude of the quantum state of the vector corresponding to the unknown number, and determine a constant corresponding to a randomly selected row of serial numbers, where the product of the vector corresponding to the randomly selected row of serial numbers and the vector corresponding to the unknown number is equal to the constant;
[0018] determining the amplitude of one of the registers in the third quantum state according to the amplitude of the quantum state of the vector corresponding to the unknown number and the constant, wherein the quantum state represented by one of the registers in the third quantum state is a superposition state of 0 and 1, and the quantum state represented by another register in the third quantum state is a 0 state;
[0019] A unitary operation for preparing a first quantum state and a second quantum state in a current iteration step is obtained, and when the quantum state represented by another register in the third quantum state is 0, the unitary operation of the first quantum state and the second quantum in the current iteration step is performed on the third quantum state to obtain a superposition state of the first quantum state and the second quantum state in the current iteration step.
[0020] Optionally, the third quantum state is:
[0021]
[0022] in, is the amplitude when the quantum state represented by one of the registers in the third quantum state is 0, is the amplitude when the quantum state represented by one of the registers in the third quantum state is 1, k is the sequence number of the current iteration step, and t is the sequence number of a randomly selected row.
[0023] Optionally, the first quantum state and the second quantum state in the current iteration step are respectively |X k >、 in:
[0024]
[0025] |x k > represents the quantum state of the vector corresponding to the unknown number, is the amplitude of the quantum state of the vector corresponding to the unknown number.
[0026] Optionally, determining the amplitude of one of the registers in the third quantum state according to the amplitude of the quantum state of the vector corresponding to the unknown number and the constant includes:
[0027] According to v k and b k Sure and according to Sure in:
[0028]
[0029] b k A constant corresponding to a randomly selected row number.
[0030] Optionally, the superposition state of the first quantum state and the second quantum state in the current iteration step is:
[0031]
[0032] The performing a unitary operation including a target unitary operator on the superposition state of the first quantum state and the second quantum state in the current iteration step to obtain the first quantum state in the next iteration step includes:
[0033] Yes|Y k >Execute Unitary operation, get |X k+1 >, where:
[0034]
[0035] Optionally, the physical properties include density and energy density, the state parameters include pressure and enthalpy, the steady-state characteristics of the fluid include velocity, and the fluid dynamics equation is the Navier-Stokes equation.
[0036] A second aspect of an embodiment of the present application provides a device for determining steady-state characteristics of a fluid, comprising:
[0037] A data acquisition unit, configured to acquire physical properties and state parameters of the fluid in the target system, wherein the physical properties are used to describe the inherent properties of the fluid, and the state parameters are used to describe the state of the fluid at different times;
[0038] a model building unit, configured to build a fluid dynamics equation based on the physical properties and the state parameters, and discretize the fluid dynamics equation into a system of linear equations, wherein the system of linear equations is represented by a product of a coefficient matrix and a vector corresponding to an unknown quantity being equal to a constant vector;
[0039] A steady-state characteristic determination unit is used to construct a quantum circuit based on a target unitary operator to solve the linear equations and obtain the steady-state characteristics of the fluid, wherein the target unitary operator acts on two registers. When the quantum state of one of the registers represents any row of the coefficient matrix, the target unitary operator performs a NOT gate operation on the other register. When the quantum state of one of the registers represents the orthogonal complement space of any row of the coefficient matrix, the target unitary operator does not perform any operation on the other register.
[0040] A third aspect of the embodiments of the present application provides an electronic device, including: a processor and a memory;
[0041] The processor is connected to the memory, wherein the memory is used to store the computer program, and the processor is used to call the computer program to execute the method in the first aspect of the embodiment of the present application.
[0042] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the method in the first aspect of the embodiment of the present application is executed.
[0043] The method for determining the steady-state characteristics of a fluid provided in the present application constructs a quantum circuit based on a target unitary operator to solve a system of linear equations to obtain the steady-state characteristics of the fluid, wherein the target unitary operator acts on two registers. When the quantum state of one register represents any row of the coefficient matrix, the target unitary operator performs a NOT gate operation on the other register. When the quantum state of one register represents the orthogonal complement space of any row of the coefficient matrix, the target unitary operator does not perform any operation on the other register. The row iteration algorithm of the quantum Kaczmarz algorithm can be implemented through the target unitary operator. The time complexity of the row iteration algorithm of the quantum Kaczmarz algorithm is Compared with the complexity of classic iterative methods This allows for exponentially faster solutions to linear equations and rapid determination of the steady-state characteristics of the fluid. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 An example system block diagram of a method for determining steady-state characteristics of a fluid provided by an embodiment of the present application is shown;
[0046] Figure 2 A schematic flow chart of a method for determining steady-state characteristics of a fluid provided in one embodiment of the present application is shown;
[0047] Figure 3 A schematic diagram of a unit near the i-th grid point provided by an embodiment of the present application is shown;
[0048] Figure 4 A schematic structural diagram of a device for determining steady-state characteristics of a fluid provided in one embodiment of the present application is shown;
[0049] Figure 5 A schematic structural diagram of a computer device provided in one embodiment of the present application is shown. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0051] Classical computers use transistors to encode information in binary data, such as bits, where each bit can represent a value of 1 or 0. These 1s and 0s act as switches that drive the functions of a classical computer. If there are n bits of data, there are 2n possible classical states, and each state is represented one at a time.
[0052] Quantum computers use quantum processors that operate on data represented by quantum bits, also known as qubits. A qubit can represent the classical binary state "0", "1", or a superposition of "0" and "1". Because it can represent a superposition of "0" and "1", a qubit can represent both the "0" and "1" states simultaneously. For example, if there are n bits of data, then 2 n Quantum states can be represented simultaneously. Further, qubits in superposition can be correlated with each other, known as entanglement, where the state of one qubit (whether it is 1, 0, or both) can depend on the state of another qubit, and more information can be encoded within the two entangled qubits. Based on the principles of superposition and entanglement, qubits can enable quantum computers to perform functions that would be relatively complex and time-consuming for classical computers.
[0053] Please refer to Figure 1 , which shows an example system block diagram of a method for determining steady-state characteristics of a fluid provided by an embodiment of the present application. System 100 may be a hybrid computing system comprising a combination of one or more quantum computers, quantum systems and / or classical computers. Figure 1 In the example shown, the system 100 may include a quantum system 110 and a classical computer 120. In one embodiment, the quantum system 110 and the classical computer 120 may be configured to communicate via one or more of a wired connection and / or a wireless connection (e.g., a wireless network). The quantum system 110 may include a quantum chipset consisting of one or more quantum chips, which includes various hardware components for processing data encoded in quantum bits. The quantum chipset may be a quantum computing core surrounded by infrastructure to protect the quantum chip from electromagnetic noise sources, mechanical vibration sources, heat sources, and other noise sources that may degrade the performance of the quantum chip. The classical computer 120 may be electronically integrated with the quantum system 110 via any suitable wired and / or wireless electronic connection.
[0054] exist Figure 1 In the example shown, the quantum system 110 can be any suitable set of components capable of performing quantum operations on a physical system. Quantum operations, such as quantum gate operations, manipulate the quantum states of quantum bits to evolve and / or entangle. Figure 1 In the example embodiment shown, the quantum system 110 may include a measurement and control integrated machine 111, an interface 112, and a quantum chip 113. In some embodiments, all or part of each of the measurement and control integrated machine 111, the interface 112, and the quantum chip 113 may be located in a cryogenic environment to facilitate the performance of quantum operations. The quantum chip 113 may be any hardware capable of processing information using quantum states. The hardware may include a plurality of qubits and a device for coupling or entangled the qubits so as to process information using quantum states. Qubits may include, but are not limited to, charge qubits, flux qubits, phase qubits, spin qubits, and ion qubits. The quantum chip may include a set of quantum logic gates configured to perform quantum logic operations on qubits stored in a quantum register. The quantum gates may include one or more single-qubit gates, two-qubit gates, and / or other multi-qubit gates.
[0055] The measurement and control integrated machine 111 can be any combination of digital computing devices capable of performing quantum computing (e.g., executing quantum circuits) in combination with the interface 112. The digital computing device may include a digital processor and memory for storing and executing quantum instructions using the interface 112. The digital computing device may also include a communication protocol device for receiving instructions and sending the results of the quantum computing performed to a classical computer. In addition, the digital computing device may also include a communication interface with an interface 112. In one embodiment, the measurement and control integrated machine 111 can be configured to receive classical instructions (e.g., from a classical computer 120) and convert the classical instructions into measurement and control instructions for the interface 112. The measurement and control instructions provided to the interface 112 by the measurement and control integrated machine 111 can be, for example, digital signals indicating which quantum gates in the quantum gate need to act on the quantum bit to perform a specific function. The interface 112 can be configured to convert these digital signals into analog signals (e.g., analog pulses of microwave pulses), which can be used to apply quantum gates on the quantum bit to manipulate the interaction between the quantum bits.
[0056] The interface 112 may be a classical-quantum interface, comprising a device combination capable of receiving instructions from the measurement and control integrated machine 111 and converting the instructions into a device for implementing quantum operations. In one embodiment, the interface 112 may convert instructions from the measurement and control integrated machine 111 into a drive signal that can drive or manipulate a quantum bit, and / or act on a quantum gate on the quantum bit. In addition, the interface 112 may be configured to convert a signal received from the quantum chip 113 into a digital signal that can be processed and transmitted by the measurement and control integrated machine 111. The devices included in the interface 112 may include, but are not limited to, a digital-to-analog converter, an analog-to-digital converter, a waveform generator, an attenuator, an amplifier, an optical fiber, a laser, and a filter. The interface 112 may further include a circuit component configured to measure multiple quantum bits after the quantum gate is applied, wherein the measurement can produce a result represented by a classical bit. Each measurement performed by the interface 112 can be read out to a device connected to the quantum system 110, such as a classical computer 120. The multiple measurement results provided by the interface 112 can represent probabilistic results.
[0057] Classical computer 120 can include hardware components such as a processor and storage devices (e.g., including memory devices and classical registers) for processing data encoded in classical bits. In one embodiment, classical computer 120 can be configured to provide various control signals, instructions, and data encoded in classical bits to quantum system 110. Furthermore, the quantum state measured by quantum system 110 can be read by classical computer 120, and classical computer 120 can store the measured quantum state as classical bits in classical registers. In one embodiment, classical computer 120 can be any suitable combination of computer-executable hardware and / or computer-executable software capable of executing preparation module 121 to perform quantum computations using data stored in data storage module 122 as part of the build and computation. Data storage module 122 can be a repository for data to be analyzed using quantum computing algorithms and the results of the analysis. Preparation module 121 can be a program or module capable of preparing classical data from data storage module 122 as part of a quantum circuit implementation. Preparation module 121 can be instantiated as part of a larger algorithm, such as a function call of an application programming interface (API), or by parsing hybrid classical-quantum computation into aspects of quantum and classical computation. For example, preparation module 121 can generate instructions for creating a quantum circuit using quantum gates. In an embodiment, such instructions can be stored by the integrated measurement and control machine 111 and can be instantiated to execute components of interface 112, so that quantum operations of quantum gates can be performed on quantum chip 113.
[0058] The classical computer 120 may be a laptop computer, a desktop computer, a vehicle-integrated computer, a smart mobile device, a tablet device, and / or any other suitable classical computing device. Additionally or alternatively, the classical computer 120 may also operate as part of a cloud computing service model, such as Software as a Service (SaaS), Platform as a Service (PaaS), or Infrastructure as a Service (IaaS). The classical computer 120 may also be located in a cloud computing deployment model, such as a private cloud, a community cloud, a public cloud, or a hybrid cloud.
[0059] Please refer to Figure 2 , which shows a flow chart of a method for determining steady-state characteristics of a fluid provided by one embodiment of the present application. The method can be applied to a computer device, which refers to an electronic device with data calculation and processing capabilities. The method may include the following steps:
[0060] Step 201: Obtain the physical properties and state parameters of the fluid in the target system. The physical properties are used to describe the inherent properties of the fluid, and the state parameters are used to describe the state of the fluid at different times.
[0061] Fluids are substances that can flow and adapt to the shape of a container, primarily liquids and gases. Therefore, target systems can include air, rivers, chemical solutions, and more.
[0062] Intrinsic physical quantities are those that are independent of external conditions and are related solely to the properties of the object itself. Examples of common intrinsic physical quantities include mass, charge, magnetic moment, spin, density, refractive index, dielectric constant, heat capacity, and specific heat capacity.
[0063] Exemplarily, common state parameters include: pressure, temperature, velocity, flow rate, entropy, enthalpy, concentration, etc.
[0064] Step 202: construct a fluid dynamics equation based on the physical properties and the state parameters, and discretize the fluid dynamics equation into a linear equation system, wherein the linear equation system is represented by a coefficient matrix and a vector corresponding to an unknown quantity, which is equal to a constant vector.
[0065] The fluid dynamics equations are the fundamental equations that describe fluid motion, primarily including the continuity equation, the momentum equation (i.e., the Navier-Stokes equations), and the energy equation. Together, these equations describe the motion and state changes of fluids under varying conditions. The fluid dynamics equations can be discretized into a system of linear equations using numerical methods such as the finite difference method, the finite volume method, or the finite element method. The coefficient matrix A is typically an n×n matrix, the constant vector is an n×1 column vector, and the system of linear equations can be expressed as Ax=b.
[0066] Step 203: Construct a quantum circuit based on a target unitary operator to solve the linear equations and obtain the steady-state characteristics of the fluid, wherein the target unitary operator acts on two registers. When the quantum state of one of the registers represents any row of the coefficient matrix, the target unitary operator performs a NOT gate operation on the other register. When the quantum state of one of the registers represents the orthogonal complement space of any row of the coefficient matrix, the target unitary operator does not perform any operation on the other register.
[0067] The row iteration formula of the classic randomized Kaczmarz algorithm is:
[0068]
[0069] Among them, randomly select i k ∈[1,n], and the probability and Proportional, a i is the i-th row of A, b i is the i-th component of b, when Less than the preset precision, x k is the solution of the equation system Ax=b.
[0070] Without loss of generality, let us assume that for all t there is ‖a t ‖=1. So we have:
[0071]
[0072] Expressing the above formula using quantum computing, we have:
[0073]
[0074] Assume that the quantum state a can be prepared efficiently in a quantum computer t , for example via QRAM. Therefore, for any t∈{1,…,n}, there exists an efficiently implemented unitary operator V t Meet V t |0>=|a t >.
[0075] For any row index t, define a target unitary operator
[0076]
[0077] Where X is the Pauli matrix X. U can be rewritten as t for
[0078]
[0079] From this decomposition, we can find that U t By Vt According to the QRAM assumption, V t and U t Both can be efficiently implemented on quantum computers.
[0080] Therefore, the basic idea of Kaczmarz iterative quantization is as follows:
[0081] Assume |x k >The quantum information contained in In. Let α 2 +β 2 =1, so we have
[0082]
[0083] Next, U t Acting on the first term of the above formula:
[0084]
[0085] Choose the parameters β and γ appropriately, for example, β = ‖x k ‖δ, When , we can find a certain δ to ensure β 2 +γ 2 =1, then the first term of the above formula is Therefore, the row iteration algorithm of the quantum Kaczmarz algorithm can be implemented through the target unitary operator.
[0086] Assumptions | X k The complexity of > is τ k , because preparation |a t >The time is Then prepare |X k+1 The complexity of > is therefore, because have Therefore, the time complexity of the row iteration algorithm of the quantum Kaczmarz algorithm is Complexity of classic iterative methods
[0087] It can be seen that the fluid steady-state characteristic determination method provided in the application solves the linear equation set by constructing a quantum circuit according to a target unitary operator to obtain the steady-state characteristics of the fluid, wherein the target unitary operator acts on two registers, when the quantum state of one of the registers represents an arbitrary row of the coefficient matrix, the target unitary operator performs a NOT operation on the other register, and when the quantum state of one of the registers represents the orthogonal complement space of an arbitrary row of the coefficient matrix, the target unitary operator does not perform any operation on the other register; the row iteration algorithm of the quantum Kaczmarz algorithm can be implemented through the target unitary operator, and the time complexity of the row iteration algorithm of the quantum Kaczmarz algorithm is compared with the complexity of the classical iteration method Therefore, exponential acceleration can be achieved to solve the linear equation set, and the steady-state characteristics of the fluid can be quickly determined.
[0088] In an embodiment provided in the application, the solving of the linear equation set by constructing a quantum circuit according to a target unitary operator to obtain the steady-state characteristics of the fluid comprises:
[0089] randomly selecting a row from the coefficient matrix, and preparing a superposition state of a first quantum state and a second quantum state at a current iteration step, the first quantum state comprising a quantum state representing a vector corresponding to the unknown, and the second quantum state comprising a quantum state representing a vector corresponding to a row number of the randomly selected row;
[0090] performing a unitary operation including the target unitary operator on the superposition state of the first quantum state and the second quantum state at the current iteration step to obtain a first quantum state at a next iteration step;
[0091] measuring the vector corresponding to the unknown represented by the first quantum state at the next iteration step, and calculating a residual vector according to the vector corresponding to the unknown;
[0092] when the residual vector converges, determining the steady-state characteristics of the fluid according to the vector corresponding to the unknown.
[0093] For example, an index set {1,…,n} can be set, where n is the maximum value of the number of rows, then a row can be randomly selected from the index set {1,…,n}, t is the row number of the randomly selected row, and k is the sequence number of the current iteration step.
[0094] For example, the first quantum state and the second quantum state at the current iteration step are |X k >, wherein:
[0095]
[0096] |x ka quantum state representing a vector corresponding to the unknown number, an amplitude of a quantum state representing a vector corresponding to the unknown number.
[0097] The algorithm is an iterative algorithm, therefore, the first quantum state at the current iteration step can be obtained from the last iteration step, and the second quantum state can be obtained by applying a unitary operator V t to the first quantum state at the last iteration step. t |0> = |a t At the first iteration, a unit vector x0is randomly selected, so that its quantum state can be prepared in time k = 0 and v k = 1, r0= b - Ax0.
[0098] Exemplarily, in the preparation of the superposition state of the first quantum state and the second quantum state at the current iteration step, a third quantum state can be prepared first, the third quantum state being:
[0099]
[0100] wherein, is an amplitude of a quantum state represented by one of the registers in the third quantum state when the quantum state is 0, is an amplitude of a quantum state represented by one of the registers in the third quantum state when the quantum state is 1, k is a serial number of the current iteration step, and t is a randomly selected row serial number.
[0101] Then, a controlled operator of |X k > and is applied to the second register of the third quantum state, so that the superposition state of the first quantum state and the second quantum state at the current iteration step can be prepared.
[0102] Specifically, the preparation of the superposition state of the first quantum state and the second quantum state at the current iteration step comprises:
[0103] determining an amplitude of a quantum state representing a vector corresponding to the unknown number, and determining a constant corresponding to a randomly selected row serial number, wherein a product of a vector corresponding to the randomly selected row serial number and the vector corresponding to the unknown number is equal to the constant;
[0104] determining an amplitude of one of the registers in a third quantum state according to the amplitude of the quantum state representing the vector corresponding to the unknown number and the constant, wherein a quantum state represented by the one of the registers in the third quantum state is a superposition state of 0 and 1, and a quantum state represented by another register in the third quantum state is a 0 state;
[0105] A unitary operation for preparing a first quantum state and a second quantum state in a current iteration step is obtained, and when the quantum state represented by another register in the third quantum state is 0, the unitary operation of the first quantum state and the second quantum in the current iteration step is performed on the third quantum state to obtain a superposition state of the first quantum state and the second quantum state in the current iteration step.
[0106] More specifically, determining the amplitude of one of the registers in the third quantum state according to the amplitude of the quantum state of the vector corresponding to the unknown number and the constant includes:
[0107] According to v k and b k Sure and according to Sure in:
[0108]
[0109] b k A constant corresponding to a randomly selected row number.
[0110] Exemplarily, the superposition state of the first quantum state and the second quantum state in the current iteration step is:
[0111]
[0112] Then performing a unitary operation including a target unitary operator on the superposition state of the first quantum state and the second quantum state in the current iteration step to obtain the first quantum state in the next iteration step includes:
[0113] Yes|Y k >Execute Unitary operation, get |X k+1 >, where:
[0114]
[0115] Yes|Y k >Execute Unitary operation, get |X k+1 The specific process is as follows:
[0116]
[0117] in, Right now
[0118]
[0119] Get the next iteration step |X k+1 >Afterwards, measurement, such as quantum tomography, can be performed to obtain x k+1Then according to the residual formula, the residual can be calculated, if the residual converges, it means that x k+1 is the required solution; if the residual does not converge, it means that x k+1 is not the required solution, and iteration is needed.
[0120] Therefore, the method further comprises:
[0121] When the residual vector does not converge, taking the next iteration step as the current iteration step, and performing the steps of randomly selecting a row from the coefficient matrix, and preparing the superposition state of the first quantum state and the second quantum state in the current iteration step.
[0122] Exemplarily, taking the next iteration step as the current iteration step, i.e. letting k=k+1, and then preparing the second quantum state by randomly selecting a row from the coefficient matrix again, since the first quantum state has been obtained through the last iteration step, and since the row is determined after randomly selecting a row, the coefficients of the row can be prepared through the unitary operator V t , so that the calculation of the next iteration step can be performed.
[0123] In an application scenario of the present application, the physical properties include density and energy density, the state parameters include pressure and enthalpy, the steady-state characteristics of the fluid include velocity, and the fluid dynamics equation is the Navier-Stokes equation.
[0124] Exemplarily, for any space Ω and boundary conditions The Navier-Stokes equation can be written in the following form:
[0125]
[0126] wherein
[0127]
[0128] The four components ρ, ρu, ρv, ρE in U represent four conserved quantities, i.e. mass, momentum in two directions, and energy, ρ represents density, uv represents velocity in two directions, and E represents energy density. F represents the convection vector flux, p represents pressure, and H represents enthalpy.
[0129] Starting from a non-steady-state initial condition, the flow of the flow field is simulated, and at each time, the residual is calculated, and the smaller the residual, the closer the flow field is to the steady-state solution. With the evolution of time, when the residual drops to a certain threshold, it can be considered that the flow field at this time is the steady-state solution. Since a period of evolution needs to be simulated, the time needs to be discretized. The implicit Euler method is used to discretize the time, and compared with the explicit Euler method, the implicit Euler method has better convergence speed and convergence.
[0130] Please refer to Figure 3 , Figure 3 FIG. 1 shows a schematic diagram of a unit near the i-th grid point provided by an embodiment of the present application. is the flux on the boundary, is the corresponding area (or length in two dimensions). i is the volume of the unit (or area in two dimensions)
[0131] At time step n and space grid point i, the implicit Euler method discretizes the Navier-Stokes equations into
[0132]
[0133] in Represents the flux of each boundary of the grid cell numbered i. In general, It is determined by the physical quantities of the i grid cell and its neighboring grid cells, and can be written as follows:
[0134]
[0135] Here j represents the segment number of the boundary of unit i, such as Figure 3 The boundary of unit i can be divided into 8 segments, then j∈{0,1,…,7}. i Represents the set of cells near cell i.
[0136] The residual is recorded as have
[0137]
[0138] When ‖R n+1 When ‖→0, U no longer changes in the subsequent evolution, and a steady-state solution is obtained.
[0139] Next, we will introduce the calculation process from moment n to moment n+1. n It is a known quantity and needs to be calculated n+1 , due to F n +1 Contains U n+1 The nonlinear term needs to be linearized and is defined as follows:
[0140] ΔU n+1 =U n+1 -U n ,
[0141] R n+1 In R n Doing a first-order expansion, we can get
[0142]
[0143] Substitute it into the above formula and write it in matrix form, and have
[0144]
[0145] wherein is a 4N-dimensional matrix, it is noted that each grid contains 4 physical quantities, i.e., U i ,R i The dimension of U i,k ,R i,k is 4, and U i ,R i represents the kth physical quantity in U n ,R n , k = 0, 1, 2, 3, so that The element expression of U
[0146]
[0147] Write the above formula into a more intuitive linear equation set form:
[0148] Ax = b,
[0149] wherein
[0150]
[0151] x = ΔU n ,
[0152] b = -R n .
[0153] By the method provided in the above embodiment, the high-dimensional sparse linear equation set is solved, and ΔU n is obtained, and then U n+1 is obtained, so that the evolution from the n time to the n+1 time is realized. Next, the next evolution is performed until the evolution stop condition is met, and then the steady-state fluid velocity is obtained.
[0154] Figure 4 Fig. 1 shows a structural schematic diagram of a fluid steady-state characteristic determination device provided in an embodiment of the present application. The device comprises:
[0155] A data acquisition unit 401 is configured to acquire physical properties and state parameters of a fluid in a target system, wherein the physical properties are used to describe inherent properties of the fluid, and the state parameters are used to describe states of the fluid at different times;
[0156] A model construction unit 402 is configured to construct a fluid dynamics equation according to the physical properties and the state parameters, and discretize the fluid dynamics equation into a linear equation set, wherein the linear equation set is expressed as a product of a coefficient matrix and an unknown corresponding vector equal to a constant vector;
[0157] The steady-state characteristic determination unit 403 is configured to construct a quantum circuit based on a target unitary operator to solve the linear equations and obtain the steady-state characteristics of the fluid. The target unitary operator acts on two registers. When the quantum state of one register represents any row of the coefficient matrix, the target unitary operator performs a NOT gate operation on the other register. When the quantum state of one register represents the orthogonal complement space of any row of the coefficient matrix, the target unitary operator does not perform any operation on the other register.
[0158] Figure 5 A structural schematic diagram of a computer device provided in one embodiment of the present application is shown, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the functions of a computer system of the method for determining the steady-state characteristics of a fluid in any of the above-mentioned embodiments.
[0159] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a computer, the computer performs the functions of the computer system of the method for determining steady-state characteristics of a fluid in any of the above embodiments.
[0160] The embodiments of the present application further provide a computer program product comprising instructions, which, when executed by a computer, enables the computer to perform the functions of the computer system of the method for determining steady-state characteristics of a fluid in any of the above embodiments.
[0161] It should be understood that the specific examples in this application are only intended to help those skilled in the art better understand the embodiments of this application, rather than to limit the scope of the present invention.
[0162] It can be understood that in the various implementation methods of this application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the implementation method of this application.
[0163] It can be understood that the various embodiments described in this application can be implemented individually or in combination, and the embodiments of this application are not limited to this.
[0164] Unless otherwise indicated, all technical and scientific terms used in the embodiments of the present application have the same meaning as those commonly understood by those skilled in the art in the technical field of the present application. The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit the scope of this application. The term "and / or" used in this application includes any and all combinations of one or more related listed items. The singular forms "a", "above", and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates otherwise.
[0165] It can be understood that the processor of the embodiments of the present application 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 in hardware or instructions in software form 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 application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware coding processor for execution, or a combination of hardware and software modules in the coding processor for execution. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register, and other mature storage media in the art. 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.
[0166] It can be understood that the memory in the embodiments of the present application 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 a read only memory (ROM), a programmable read only memory (PROM), an erasable programmable read only memory (EPROM), an electrically erasable programmable read only memory (EEPROM) or a flash memory. The volatile memory can be a 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.
[0167] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are executed 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 the present application.
[0168] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0169] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the above-described device embodiments are merely schematic, and the division of units is merely a logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.
[0170] The units described as separated components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments.
[0171] In addition, each functional unit in the embodiments of the present application can be integrated in a processing unit, or each unit can exist physically as a separate unit, or two or more units can be integrated in one unit.
[0172] If the functions are implemented 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 such understanding, the technical solutions of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, and includes several 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 in the embodiments of the present application. The foregoing storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and various media that can store program codes.
[0173] The above is merely specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for determining steady-state characteristics of a fluid, characterized in that: include: Obtaining the physical properties and state parameters of the fluid in the target system, wherein the physical properties are used to describe the inherent properties of the fluid, and the state parameters are used to describe the state of the fluid at different times; Constructing a fluid dynamics equation based on the physical properties and the state parameters, and discretizing the fluid dynamics equation into a linear equation system, wherein the linear equation system is expressed as a product of a coefficient matrix and vectors corresponding to unknowns equal to a constant vector; Randomly selecting a column from the coefficient matrix, and preparing a first superposition state of a first quantum state and a second quantum state at a current iteration step, wherein the first quantum state includes a quantum state of a vector corresponding to an unknown number in the linear equation system, and the second quantum state includes a quantum state of a residual vector corresponding to a randomly selected column number; Performing a unitary operation including a swap gate, a first target unitary operator, and a single-bit rotation operator on the first superposition state to obtain a first quantum state at a next iteration step, and performing a unitary operation including a second target unitary operator and a swap gate on the second quantum state to obtain a second quantum state at a next iteration step; the first target unitary operator is used to encode the product of any column of the coefficient matrix and the residual vector corresponding to the any column, the second target unitary operator acts on two registers, when the quantum state of one of the registers represents any column of the coefficient matrix, the second target unitary operator performs a NOT gate operation on the other register, and when the quantum state of one of the registers represents the orthogonal complement space of any column of the coefficient matrix, the second target unitary operator does not perform any operation on the other register; The second quantum state at the next iteration step is measured to obtain a residual vector corresponding to a randomly selected column of serial numbers; When the residual vector converges, measuring the first quantum state at the current iteration step to obtain a vector corresponding to the unknown number; The steady-state characteristics of the fluid are determined according to the vector corresponding to the unknown number.
2. The method according to claim 1, characterized in that The method further comprises: When the residual vector does not converge, the next iteration step is used as the current iteration step, and the step of randomly selecting a column from the coefficient matrix and preparing a first superposition state of the first quantum state and the second quantum state under the current iteration step is executed.
3. The method according to claim 2, characterized in that The performing a unitary operation including a swap gate, a first target unitary operator, and a single-bit rotation operator on the first superposition state to obtain a first quantum state in a next iteration step includes: performing a unitary operation including a swap gate and a first target unitary operator on the first superposition state to obtain a second superposition state of a third quantum state and a fourth quantum state, wherein the third quantum state also includes a quantum state representing a vector corresponding to an unknown number in the system of linear equations, and the fourth quantum state includes a quantum state representing a product of a randomly selected column of serial numbers and a residual vector corresponding to the randomly selected column of serial numbers; A unitary operation including a single-bit rotation operator is performed on the second superposition state to obtain the first quantum state in the next iterative step.
4. The method according to claim 3, characterized in that The first quantum state and the second quantum state in the current iteration step are respectively ,in: is the quantum state of the vector corresponding to the unknown number in the linear equation system, is the quantum state of the residual vector corresponding to a randomly selected sequence number, is the sequence number of the current iteration step.
5. The method according to claim 4, characterized in that The first superposition state is ,in: is the unit operator, , t is a randomly selected sequence number, is a randomly selected column vector.
6. The method according to claim 5, characterized in that The performing a unitary operation including a swap gate and a first target unitary operator on the first superposition state to obtain a second superposition state of a third quantum state and a fourth quantum state includes: right implement and Operation, get the quantum state ,in: ; right implement Operation, get the second superposition state of the third quantum state and the fourth quantum state ,in: , is the first target unitary operator, where:
7. The method according to claim 6, characterized in that The performing a unitary operation including a single-bit rotation operator on the second superposition state comprises: right implement operate, is a single-bit rotation operator, where:
8. The method according to claim 1, characterized in that The physical properties include density and energy density, the state parameters include pressure and enthalpy, the steady-state characteristics of the fluid include velocity, and the fluid dynamics equation is the Navier-Stokes equation.
9. A device for determining steady-state characteristics of a fluid, characterized in that: include: A data acquisition unit, configured to acquire physical properties and state parameters of the fluid in the target system, wherein the physical properties are used to describe the inherent properties of the fluid, and the state parameters are used to describe the state of the fluid at different times; a model building unit, configured to build a fluid dynamics equation based on the physical properties and the state parameters, and discretize the fluid dynamics equation into a system of linear equations, wherein the system of linear equations is represented by a product of a coefficient matrix and vectors corresponding to unknowns being equal to a constant vector; A steady-state characteristic determination unit is used to randomly select a column from the coefficient matrix and prepare a first superposition state of a first quantum state and a second quantum state under a current iteration step, wherein the first quantum state includes a quantum state of a vector corresponding to an unknown number in the linear equation system, and the second quantum state includes a quantum state of a residual vector corresponding to a randomly selected column number; a unitary operation including an exchange gate, a first target unitary operator, and a single-bit rotation operator is performed on the first superposition state to obtain a first quantum state under a next iteration step, and a unitary operation including a second target unitary operator and an exchange gate is performed on the second quantum state to obtain a second quantum state under a next iteration step; the first target unitary operator is used to encode any column of the coefficient matrix and any column The product of the corresponding residual vectors, the second target unitary operator acts on two registers, when the quantum state of one of the registers represents any column of the coefficient matrix, the second target unitary operator performs a NOT gate operation on the other register, and when the quantum state of one of the registers represents the orthogonal complement space of any column of the coefficient matrix, the second target unitary operator does not perform any operation on the other register; the second quantum state under the next iteration step is measured to obtain the residual vector corresponding to a randomly selected column number; when the residual vector converges, the first quantum state under the current iteration step is measured to obtain the vector corresponding to the unknown number; the steady-state characteristics of the fluid are determined according to the vector corresponding to the unknown number.
10. An electronic device, characterized in that: include: processor and memory; The processor is connected to a memory, wherein the memory is used to store a computer program, and the processor is used to call the computer program to execute the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the method according to any one of claims 1 to 8 is executed.
Citation Information
Patent Citations
Quantum state preparation method for flow information of fluid physical system and related device
CN116992969A
Verified quantum phase estimation
US20220067567A1