CN115700572B - Quantum solving method and device for grid equation and physical equation iteration - Google Patents

Quantum solving method and device for grid equation and physical equation iteration Download PDF

Info

Publication number
CN115700572B
CN115700572B CN202110839154.XA CN202110839154A CN115700572B CN 115700572 B CN115700572 B CN 115700572B CN 202110839154 A CN202110839154 A CN 202110839154A CN 115700572 B CN115700572 B CN 115700572B
Authority
CN
China
Prior art keywords
equation
grid
quantum
flow field
solving
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110839154.XA
Other languages
Chinese (zh)
Other versions
CN115700572A (en
Inventor
窦猛汉
李叶
朱阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Benyuan Quantum Computing Technology Hefei Co ltd
Original Assignee
Benyuan Quantum Computing Technology Hefei Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Benyuan Quantum Computing Technology Hefei Co ltd filed Critical Benyuan Quantum Computing Technology Hefei Co ltd
Priority to CN202110839154.XA priority Critical patent/CN115700572B/en
Publication of CN115700572A publication Critical patent/CN115700572A/en
Application granted granted Critical
Publication of CN115700572B publication Critical patent/CN115700572B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Superconductor Devices And Manufacturing Methods Thereof (AREA)

Abstract

The invention discloses a quantum solving method and a device for grid equation and physical equation iteration, wherein the method comprises the following steps: obtaining uniform grid information in a grid equation preset range calculation domain, initializing flow field information of a physical equation, constructing a quantum circuit for solving quantum state evolution of the grid equation by utilizing the flow field information according to current flow field information of the physical equation, solving the grid equation under the current iteration number to obtain new flow field information of the physical equation, and returning to execute the step of constructing the quantum circuit for solving quantum state evolution of the grid equation by utilizing the flow field information under the condition that the current iteration number is smaller than the maximum iteration number until the current iteration number is equal to the maximum iteration number, determining a solution of the grid equation according to the last quantum state of the quantum circuit after the current evolution, realizing the calculation of the grid equation and the physical equation by utilizing a quantum algorithm, reducing the calculation complexity and difficulty, and filling relevant blank in the quantum calculation field.

Description

Quantum solving method and device for grid equation and physical equation iteration
Technical Field
The invention belongs to the technical field of quantum computation, and particularly relates to a quantum solving method and device for grid equation and physical equation iteration.
Background
Grid generation technology is an important component of computational fluid dynamics (Computational Fluid Dynamics) and plays a vital role in CFD research and application, and the manner and quality of grid construction directly affects the time of computation and the accuracy of results.
The traditional method adopts an iteration method to solve the grid equation, and the method does not need to meet the condition of stability, but has large iteration calculation amount, and the calculation accuracy is related to the iteration times. In view of the urgent demands of grid generation equations and physical equation solving on computational performance, and although the traditional method achieves certain effects in the research of computational fluid dynamics physical models, the solving process comprises various approximations, even the calculation solutions and simulation results are far away in part of cases, and the unknown elements are numerous, the properties of the solutions are complex, and the calculation is difficult. Therefore, the existing method for solving the grid equation and the physical equation iteration is high in complexity, long in time for solving the accurate solution and high in calculation difficulty, and the breakthrough of realizing efficient solution of the grid equation and the physical equation iteration is urgent in addition to the traditional method.
Quantum calculation is a novel calculation mode, and the principle is that a calculation frame is constructed by using quantum mechanics theory. When solving some problems, quantum computation has an exponential acceleration effect compared with the optimal classical algorithm. Based on the method, an effective quantum algorithm for solving the grid equation and the physical equation iteration is provided, and the effective quantum algorithm is used for solving the grid equation and the physical equation iteration, so that the method is a problem to be solved urgently.
Disclosure of Invention
The invention aims to provide a quantum solving method and device for grid equation and physical equation iteration, which solve the defects in the prior art, can realize the calculation of the grid equation and the physical equation by using a quantum algorithm, reduce the complexity and difficulty of calculation and fill the blank of the related technology in the field of quantum calculation.
One embodiment of the present application provides a quantum solving method for grid equation and physical equation iteration, including:
obtaining uniform grid information in a grid equation preset range calculation domain, and initializing flow field information of a physical equation;
According to the current flow field information of the physical equation, constructing a quantum circuit for solving quantum state evolution of the grid equation by utilizing the flow field information, and solving the grid equation under the current iteration number to obtain new flow field information of the physical equation;
returning to the step of constructing the quantum circuit for solving the quantum state evolution of the grid equation by using the flow field information under the condition that the current iteration number is smaller than the maximum iteration number, until the current iteration number is equal to the maximum iteration number;
and determining the solution of the grid equation according to the final quantum state of the quantum circuit after the current evolution.
The quantum solving method for iteration of the grid equation and the physical equation as described above, preferably, the obtaining uniform grid information in a calculation domain of a preset range of the grid equation and initializing flow field information of the physical equation includes:
dispersing the physical calculation domain of the preset range to obtain initial grid information;
Initializing flow field information of a physical equation, and determining initial grid center flow field information corresponding to the initial grid information.
The quantum solving method for iteration of the grid equation and the physical equation as described above, preferably, constructs a quantum circuit for solving quantum state evolution of the grid equation by using flow field information according to current flow field information of the physical equation, solves the grid equation under the current iteration number, and obtains new flow field information of the physical equation, including:
According to the current grid center flow field information, constructing a quantum circuit for solving quantum state evolution of a grid equation by utilizing the flow field information, and solving the grid equation under the current iteration number to obtain new grid information required by the next physical equation calculation;
and solving a physical equation based on the new grid information to obtain new grid center flow field information for the next iteration.
The quantum solving method for iteration of the grid equation and the physical equation as described above, preferably, the constructing a quantum line for solving quantum state evolution of the grid equation by using flow field information, solving the grid equation under the current iteration number, includes:
According to an implicit solving method, discretizing a grid equation, and converting the grid equation under the current iteration times into a linear equation set;
and constructing and operating a quantum circuit for solving the linear equation set by using a variable component sub-linear solver to obtain a solution of the linear equation set.
A quantum solving method for iteration of a lattice equation and a physical equation as described above, wherein preferably, the constructing and operating a quantum circuit for solving the linear equation set using a variable component quantum linear solver, to obtain a solution of the linear equation set, includes:
obtaining a linear equation set converted by the grid equation Wherein the matrix A is an hermitian matrix;
According to the hermitian matrix A and Using a quantum circuit corresponding to a variable component linear solver to output a quantum state |x > containing the linear equation set solution, wherein the quantum state |x > is the vector/>, of the linear equation set
Yet another embodiment of the present application provides a quantum solving apparatus for iterative mesh equations and physical equations, including:
The acquisition module is used for acquiring uniform grid information in a grid equation preset range calculation domain and initializing flow field information of a physical equation;
The construction module is used for constructing a quantum circuit for solving the quantum state evolution of the grid equation by utilizing the flow field information according to the current flow field information of the physical equation, solving the grid equation under the current iteration number, and obtaining new flow field information of the physical equation;
The iteration module is used for returning to the step of constructing the quantum circuit for solving the quantum state evolution of the grid equation by using the flow field information under the condition that the current iteration number is smaller than the maximum iteration number until the current iteration number is equal to the maximum iteration number;
and the determining module is used for determining the solution of the grid equation according to the final quantum state of the quantum circuit after the current evolution.
A quantum solving apparatus for iterative mesh equations and physical equations as described above, wherein preferably, the obtaining module includes:
the discrete unit is used for dispersing the physical calculation domain of the preset range to obtain initial grid information;
and the determining unit is used for initializing the flow field information of the physical equation and determining initial grid center flow field information corresponding to the initial grid information.
A quantum solving apparatus for grid equation and physical equation iteration as described above, wherein preferably, the building block includes:
The construction unit is used for constructing a quantum circuit for solving the quantum state evolution of the grid equation by utilizing the flow field information according to the current grid center flow field information, solving the grid equation under the current iteration number, and obtaining new grid information required by the next physical equation calculation;
and the solving unit is used for solving a physical equation based on the new grid information to obtain new grid center flow field information for the next iteration.
A quantum solving apparatus for grid equation and physical equation iteration as described above, wherein preferably, the building unit includes:
The transformation unit is used for discretizing the grid equation according to an implicit solving method and transforming the grid equation under the current iteration number into a linear equation set;
and the operation unit is used for constructing and operating a quantum circuit for solving the linear equation set by using the variable component quantum linear solver to obtain a solution of the linear equation set.
A quantum solving apparatus for grid equation and physical equation iteration as described above, wherein preferably, the operation unit includes:
a linear unit for obtaining a linear equation set converted by the grid equation Wherein the matrix A is an hermitian matrix;
an output unit for outputting the Hermite matrix A and the Hermite matrix B Using a quantum circuit corresponding to a variable component linear solver to output a quantum state |x > containing the linear equation set solution, wherein the quantum state |x > is the vector/>, of the linear equation set
A further embodiment of the application provides a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the method of any of the preceding claims when run.
Yet another embodiment of the application provides an electronic device comprising a memory having a computer program stored therein and a processor configured to run the computer program to perform the method described in any of the above.
Compared with the prior art, the method comprises the steps of firstly obtaining uniform grid information in a grid equation preset range calculation domain, initializing flow field information of a physical equation, constructing a quantum circuit for solving quantum state evolution of the grid equation by utilizing the flow field information according to the current flow field information of the physical equation, solving the grid equation under the current iteration number to obtain new flow field information of the physical equation, and returning to execute the step of constructing the quantum circuit for solving the quantum state evolution of the grid equation by utilizing the flow field information under the condition that the current iteration number is smaller than the maximum iteration number until the current iteration number is equal to the maximum iteration number, determining a solution of the grid equation according to the last quantum state of the quantum circuit after the current evolution, utilizing the relevant characteristics of quanta, and being capable of realizing an effective quantum algorithm for solving the grid equation and the iteration of the physical equation by utilizing the quantum algorithm, reducing the complexity and difficulty of calculation and filling the relevant technical blank of the quantum calculation field.
Drawings
FIG. 1 is a block diagram of a hardware architecture of a computer terminal of a quantum solving method for grid equation and physical equation iteration provided by an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a quantum solving method for grid equation and physical equation iteration provided by the embodiment of the invention;
FIG. 3 is a schematic diagram of a uniform grid in a calculation domain of a preset range according to an embodiment of the present invention;
Fig. 4 is a schematic structural diagram of a quantum solving apparatus for iterative mesh equations and physical equations according to an embodiment of the present invention.
Detailed Description
The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the invention.
The embodiment of the invention firstly provides a quantum solving method for iteration of a grid equation and a physical equation, which can be applied to electronic equipment such as a computer terminal, in particular to a common computer, a quantum computer and the like.
The following describes the operation of the computer terminal in detail by taking it as an example. Fig. 1 is a hardware block diagram of a computer terminal of a quantum solving method for iterative mesh equations and physical equations according to an embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, and optionally, a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the computer terminal described above. For example, the computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to a quantum solution method for implementing a grid equation and a physical equation iteration in the embodiment of the present application, and the processor 102 executes the software programs and modules stored in the memory 104 to perform various functional applications and data processing, i.e., implement the above-described method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the computer terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module for communicating with the internet wirelessly.
It should be noted that a real quantum computer is a hybrid structure, which includes two major parts: part of the computers are classical computers and are responsible for performing classical computation and control; the other part is quantum equipment, which is responsible for running quantum programs so as to realize quantum computation. The quantum program is a series of instruction sequences written in a quantum language such as QRunes language and capable of running on a quantum computer, so that the support of quantum logic gate operation is realized, and finally, quantum computing is realized. Specifically, the quantum program is a series of instruction sequences for operating the quantum logic gate according to a certain time sequence.
In practical applications, quantum computing simulations are often required to verify quantum algorithms, quantum applications, etc., due to the development of quantum device hardware. Quantum computing simulation is a process of realizing simulated operation of a quantum program corresponding to a specific problem by means of a virtual architecture (namely a quantum virtual machine) built by resources of a common computer. In general, it is necessary to construct a quantum program corresponding to a specific problem. The quantum program, namely the program for representing the quantum bit and the evolution thereof written in the classical language, wherein the quantum bit, the quantum logic gate and the like related to quantum computation are all represented by corresponding classical codes.
Quantum circuits, which are one embodiment of quantum programs, also weigh sub-logic circuits, are the most commonly used general quantum computing models, representing circuits that operate on qubits under an abstract concept, the composition of which includes qubits, circuits (timelines), and various quantum logic gates, and finally the results often need to be read out by quantum measurement operations.
Unlike conventional circuits, which are connected by metal lines to carry voltage or current signals, in a quantum circuit, the circuit can be seen as being connected by time, i.e., the state of the qubit naturally evolves over time, as indicated by the hamiltonian operator, during which it is operated until a logic gate is encountered.
One quantum program is corresponding to one total quantum circuit, and the quantum program refers to the total quantum circuit, wherein the total number of quantum bits in the total quantum circuit is the same as the total number of quantum bits of the quantum program. It can be understood that: one quantum program may consist of a quantum circuit, a measurement operation for the quantum bits in the quantum circuit, a register to hold the measurement results, and a control flow node (jump instruction), and one quantum circuit may contain several tens to hundreds or even thousands of quantum logic gate operations. The execution process of the quantum program is a process of executing all quantum logic gates according to a certain time sequence. Note that the timing is the time sequence in which a single quantum logic gate is executed.
It should be noted that in classical computation, the most basic unit is a bit, and the most basic control mode is a logic gate, and the purpose of the control circuit can be achieved by a combination of logic gates. Similarly, the way in which the qubits are handled is a quantum logic gate. Quantum logic gates are used, which are the basis for forming quantum circuits, and include single-bit quantum logic gates, such as Hadamard gates (H gates, hadamard gates), brix gates (X gates), brix-Y gates (Y gates), brix-Z gates (Z gates), RX gates, RY gates, RZ gates, and the like; multi-bit quantum logic gates such as CNOT gates, CR gates, iSWAP gates, toffoli gates, and the like. Quantum logic gates are typically represented using unitary matrices, which are not only in matrix form, but also an operation and transformation. The effect of a general quantum logic gate on a quantum state is calculated by multiplying the unitary matrix by the matrix corresponding to the right vector of the quantum state.
It will be appreciated by those skilled in the art that in classical computers, the basic unit of information is a bit, one bit having two states, 0 and 1, the most common physical implementation being to represent both states by the level of high and low. In quantum computing, the basic unit of information is a qubit, and one qubit also has two states of 0 and 1, denoted as |0> and |1>, but it can be in a superposition of the two states of 0 and 1, which can be expressed asWhere a, b are complex numbers representing the amplitude (probability amplitude) of the 0> state and 1> state, which is not possessed by classical bits. After measurement, the state of the qubit collapses to a certain state (eigenstate, here |0> state, |1> state), where the probability of collapsing to |0> is |a| 2, the probability of collapsing to |1> is |b| 2,|a|2+|b|2 =1, | > is the dirac sign.
Quantum states, i.e., states of a qubit, whose eigenstates are represented in binary in a quantum algorithm (or weighing subroutine). For example, a group of qubits q0, q1, q2, representing the 0 th, 1 st, and 2 nd qubits, ordered from high to low as q2q1q0, has a quantum state of 2 3 eigenstates superimposed, and 8 eigenstates (defined states) refer to: each eigenstate corresponds to a qubit, i 000>, i001 >, i010 >, i011 >, i100 >, i101 >, i110 >, i111 >, e.g., 000> states, 000 corresponds to q2q1q0 from high to low. In short, a quantum state is an overlapped state composed of each eigenstate, and when the probability amplitude of the other states is 0, it is in one of the determined eigenstates.
Referring to fig. 2, fig. 2 is a schematic flow chart of a quantum solving method for iterative mesh equations and physical equations according to an embodiment of the present invention, which may include the following steps:
S201: and obtaining uniform grid information in a grid equation preset range calculation domain, and initializing flow field information of a physical equation.
Computational fluid dynamics, CFD for short, is a product of combination of modern hydrodynamic numerical mathematics and computer science, and is an edge science with strong vitality. It uses computer as tool, and uses various discretized mathematical methods to make numerical experiment, computer simulation and analysis research on various problems of fluid mechanics so as to solve various practical problems.
In computational fluid dynamics, a physical equation may refer to a hydrodynamic control equation, whose flow is governed by three basic physical principles, namely conservation of mass, conservation of momentum, conservation of energy, no matter how complex the flow is. These three basic physical principles correspond to three control equations, namely the hydrodynamic control equation (continuity equation, navier-Stokes equation, energy equation), respectively, which are mathematical descriptions of the corresponding physical principles. These equations in turn take different forms corresponding to the different flow models. It is worth mentioning that these different forms of control equations are not essentially different for the fluid mechanics itself, but for CFD the form of the equations will directly determine the result of the solution, and the fluid mechanics control equations are mostly mathematical equations sets of coupled nonlinear partial differential equations.
The grid equation is a high-dimensional self-adaptive grid control equation in pointer pair computational fluid dynamics, and the self-adaptive grid is a grid capable of automatically flowing to a large gradient region aggregation in a flow field, and the position of the grid point in a physical space is determined by using the solved flow field characteristics (the grid can be regarded as a grid which changes with time, and in the time-advancing solution of flow field control, the grid adjustment is synchronous with the process of calculating flow field variables according to time steps). During the solution process, large gradients in the flow field develop over time, and grid points in the physical plane cater for it by moving (i.e., the actual grid points in the physical plane are constantly moving during the flow field solution process). It is an important component of computational fluid mechanics, and the manner and quality of construction of the mesh directly affects the time and accuracy of the computation.
Referring to fig. 3, fig. 3 is a schematic diagram of a uniform grid in a preset range calculation domain, which is provided by an embodiment of the present invention, and includes: and dispersing a physical calculation domain in a preset range to obtain initial grid information, initializing flow field information of a physical equation, and determining initial grid center flow field information corresponding to the initial grid information.
Specifically, in the uniform grid in the preset range calculation domain as shown in fig. 3, the coordinates of the x 1 point are (the coordinates of the a 1,b1),x2 point areThe coordinates of the x 3 point are/>The coordinate of the point x 4 is (a 2,b1), and the flow field information corresponding to the flow field information u 0,x1、x2、x3、x4 point of the initialized physical equation is u 1、u2、u3、u4, then the grid center flow field corresponding to the initial grid formed by the point x 1、x2 is/>The grid center flow field calculation method corresponding to the rest initial grids is the same as that described above, and is not calculated here.
S202: according to the current flow field information of the physical equation, a quantum circuit for solving the quantum state evolution of the grid equation by utilizing the flow field information is constructed, and the grid equation under the current iteration number is solved, so that new flow field information of the physical equation is obtained.
Specifically, the calculation of the grid equation and the physical equation are completely independent, in the process of solving the physical equation, any numerical method can be used for calculating to obtain a discrete numerical result, for example, after the current flow field information (u n) is obtained at a certain moment, a quantum circuit for solving the quantum state evolution of the grid equation by using the flow field information is constructed, and the method for solving the grid equation under the current iteration times comprises the following steps:
According to the current grid center flow field information, constructing a quantum circuit for solving quantum state evolution of a grid equation by utilizing the flow field information, and solving the grid equation under the current iteration number to obtain new grid information required by the next physical equation calculation;
and solving a physical equation based on the new grid information to obtain new grid center flow field information for the next iteration.
Specifically, according to the current grid center flow field information (u n), then according to the flow field information, solving a grid equation (ωx ξ)ξ =0) under the current iteration number, wherein ω is a control function of grid density, which can be defined according to calculation requirements, and ζ represents a calculation coordinate system where the grid equation is located, solving to obtain a grid (x n) at the moment, as new grid information required by calculation of a next physical equation, and solving new flow field information (u n+1) of the physical equation at the next moment based on the new grid information (x n), as new grid center flow field information for the next iteration.
Constructing a quantum circuit for solving quantum state evolution of a grid equation by utilizing flow field information, and solving the grid equation under the current iteration number, wherein the method comprises the following steps:
according to an implicit solving method, discretizing a grid equation, and converting the grid equation under the current iteration number into a linear equation set;
and constructing and operating a quantum circuit for solving the linear equation set by using a variable component sub-linear solver to obtain a solution of the linear equation set.
Specifically, an implicit solving method is adopted, and a grid equation (ωx ξ)ξ =0 is discretized, and the discrete form is:
Wherein, superscripts v and v+1 represent a known quantity and an unknown quantity in the iterative process, respectively, and x j satisfies a boundary condition: x 0=a,xj+1 = b.
The method for obtaining the solution of the linear equation set by constructing and operating a quantum circuit for solving the linear equation set by using a variable component quantum linear solver comprises the following steps:
obtaining a linear equation set converted by the grid equation Wherein the matrix A is an hermitian matrix;
the grid equation can be converted into a linear equation set according to discrete form And solving. Wherein, hermitian matrix is:
And
According to the hermitian matrix A andUsing a quantum circuit corresponding to a variable component linear solver to output a quantum state |x > containing the linear equation set solution, wherein the quantum state |x > is the vector/>, of the linear equation set
Specifically, a solution |x > =a -1 |b > of the linear equation set a|x > = |b >, definesThe method comprises the following steps:
Wherein, Matrix a is a Hermitian matrix, which can be constructed if a is not a Hermitian matrix. /(I)Is Hamiltonian variable/>Is satisfied with:
Wherein, The transposed conjugate matrix representing matrix A was solved using a variable component sub-linear solver to find the solution/>, for the following optimization problem
In particular, it is required to satisfyWherein/>The quantum state |x > containing the linear equation set solution is output by using a quantum circuit corresponding to the variable component linear solver as a heuristic wave function, and the method comprises the following steps:
acquiring probe wave functions Initial parameters/>Wherein/>
Operating a quantum circuit corresponding to the variable component sub-linear solver, and measuring an energy expectation gradient of |phi (theta)Wherein/>
Updating parametersRepeatedly operating quantum circuits corresponding to the variable component sub-linear solver, and measuring the gradient/> -of the energy expectation value of |phi (theta)Until the measured energy expectation value/>Converging to 0.
In particular, to continuously reduce energy, parameters are updated using classical computersWherein/>The relation is satisfied: /(I)Beta is the time step. By finding/>To estimateAnd/>
Wherein,When/>Approaching and accurately solving at this timeApproach 1, but for/>The value of (2) cannot be determined, since < b|A -1A-1 |b > cannot be measured directly, but can be measured/>Whether the proportional relationship is satisfied or not, finally by measuring/>Whether or not the solution to the converted system of linear equations approaches 1 can be determined as to whether or not the solution meets the requirements.
S203: and under the condition that the current iteration number is smaller than the maximum iteration number, returning to the step of constructing the quantum circuit for solving the quantum state evolution of the grid equation by using the flow field information until the current iteration number is equal to the maximum iteration number.
Specifically, for a physical calculation domain in a given range, the physical calculation domain is first discretized to obtain grid coordinatesWherein/>Representing the position of grid nodes at the initial moment, and calculating to obtain the grid central flow field/>Iterative solution of the mesh equation (ωx ξ)ξ =0, resulting in the mesh/>, calculated by the next step of physical equationCalculating flow field data/>, on the new grid points, by utilizing quantum circuits corresponding to the solving grid equationsAt grid/>Solving the physical partial differential equation to obtain/>And repeatedly solving a grid equation under the current iteration times according to the current flow field information of the physical equation, obtaining the new flow field information of the physical equation, and obtaining the grid position step of the next step of calculating the physical equation until the current iteration times are equal to the maximum iteration times.
S204: and determining the solution of the grid equation according to the final quantum state of the quantum circuit after the current evolution.
Specifically, steps S201 to S203 are repeated, and the solution of the mesh equation is determined according to the final quantum state of the quantum circuit after the current evolution, that is, by obtainingTo estimate/>
Wherein,When/>Approaching 0, at this timeApproaching 1, the solution of the converted system of linear equations, i.e. the solution of the grid equation, can be determined.
Compared with the prior art, the method comprises the steps of firstly obtaining uniform grid information in a grid equation preset range calculation domain, initializing flow field information of a physical equation, constructing a quantum circuit for solving quantum state evolution of the grid equation by utilizing the flow field information according to the current flow field information of the physical equation, solving the grid equation under the current iteration number to obtain new flow field information of the physical equation, and returning to execute the step of constructing the quantum circuit for solving the quantum state evolution of the grid equation by utilizing the flow field information under the condition that the current iteration number is smaller than the maximum iteration number until the current iteration number is equal to the maximum iteration number, determining a solution of the grid equation according to the last quantum state of the quantum circuit after the current evolution, utilizing the relevant characteristics of quanta, and being capable of realizing an effective quantum algorithm for solving the grid equation and the iteration of the physical equation by utilizing the quantum algorithm, reducing the complexity and difficulty of calculation and filling the relevant technical blank of the quantum calculation field.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a quantum solving apparatus for iterative mesh equations and physical equations according to an embodiment of the present invention, which corresponds to the flow shown in fig. 2, and may include:
The obtaining module 401 is configured to obtain uniform grid information in a calculation domain of a preset range of a grid equation, and initialize flow field information of a physical equation;
A construction module 402, configured to construct a quantum circuit for solving the quantum state evolution of the grid equation by using the flow field information according to the current flow field information of the physical equation, and solve the grid equation under the current iteration number to obtain new flow field information of the physical equation;
The iteration module 403 is configured to return to executing the step of constructing the quantum circuit for solving the quantum state evolution of the grid equation by using the flow field information, if the current iteration number is less than the maximum iteration number, until the current iteration number is equal to the maximum iteration number;
A determining module 404, configured to determine a solution of the lattice equation according to a final quantum state of the quantum circuit after current evolution.
Specifically, the acquisition module includes:
the discrete unit is used for dispersing the physical calculation domain of the preset range to obtain initial grid information;
and the determining unit is used for initializing the flow field information of the physical equation and determining initial grid center flow field information corresponding to the initial grid information.
Specifically, the construction module includes:
The construction unit is used for constructing a quantum circuit for solving the quantum state evolution of the grid equation by utilizing the flow field information according to the current grid center flow field information, solving the grid equation under the current iteration number, and obtaining new grid information required by the next physical equation calculation;
and the solving unit is used for solving a physical equation based on the new grid information to obtain new grid center flow field information for the next iteration.
Specifically, the construction unit includes:
The transformation unit is used for discretizing the grid equation according to an implicit solving method and transforming the grid equation under the current iteration number into a linear equation set;
and the operation unit is used for constructing and operating a quantum circuit for solving the linear equation set by using the variable component quantum linear solver to obtain a solution of the linear equation set.
Specifically, the operation unit includes:
a linear unit for obtaining a linear equation set converted by the grid equation Wherein the matrix A is an hermitian matrix;
an output unit for outputting the Hermite matrix A and the Hermite matrix B Using a quantum circuit corresponding to a variable component linear solver to output a quantum state |x > containing the linear equation set solution, wherein the quantum state |x > is the vector/>, of the linear equation set
Compared with the prior art, the method comprises the steps of firstly obtaining uniform grid information in a grid equation preset range calculation domain, initializing flow field information of a physical equation, constructing a quantum circuit for solving quantum state evolution of the grid equation by utilizing the flow field information according to the current flow field information of the physical equation, solving the grid equation under the current iteration number to obtain new flow field information of the physical equation, and returning to execute the step of constructing the quantum circuit for solving the quantum state evolution of the grid equation by utilizing the flow field information under the condition that the current iteration number is smaller than the maximum iteration number until the current iteration number is equal to the maximum iteration number, determining a solution of the grid equation according to the last quantum state of the quantum circuit after the current evolution, utilizing the relevant characteristics of quanta, and being capable of realizing an effective quantum algorithm for solving the grid equation and the iteration of the physical equation by utilizing the quantum algorithm, reducing the complexity and difficulty of calculation and filling the relevant technical blank of the quantum calculation field.
The embodiment of the invention also provides a storage medium in which a computer program is stored, wherein the computer program is arranged to perform the steps of the method embodiment of any of the above when run.
Specifically, in the present embodiment, the above-described storage medium may be configured to store a computer program for executing the steps of:
S201: obtaining uniform grid information in a grid equation preset range calculation domain, and initializing flow field information of a physical equation;
S202: according to the current flow field information of the physical equation, constructing a quantum circuit for solving quantum state evolution of the grid equation by utilizing the flow field information, and solving the grid equation under the current iteration number to obtain new flow field information of the physical equation;
S203: returning to the step of constructing the quantum circuit for solving the quantum state evolution of the grid equation by using the flow field information under the condition that the current iteration number is smaller than the maximum iteration number, until the current iteration number is equal to the maximum iteration number;
S204: and determining the solution of the grid equation according to the final quantum state of the quantum circuit after the current evolution.
Specifically, in the present embodiment, the storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Compared with the prior art, the method comprises the steps of firstly obtaining uniform grid information in a grid equation preset range calculation domain, initializing flow field information of a physical equation, constructing a quantum circuit for solving quantum state evolution of the grid equation by utilizing the flow field information according to the current flow field information of the physical equation, solving the grid equation under the current iteration number to obtain new flow field information of the physical equation, and returning to execute the step of constructing the quantum circuit for solving the quantum state evolution of the grid equation by utilizing the flow field information under the condition that the current iteration number is smaller than the maximum iteration number until the current iteration number is equal to the maximum iteration number, determining a solution of the grid equation according to the last quantum state of the quantum circuit after the current evolution, utilizing the relevant characteristics of quanta, and being capable of realizing an effective quantum algorithm for solving the grid equation and the iteration of the physical equation by utilizing the quantum algorithm, reducing the complexity and difficulty of calculation and filling the relevant technical blank of the quantum calculation field.
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of the method embodiment of any of the above.
Specifically, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Specifically, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
S201: obtaining uniform grid information in a grid equation preset range calculation domain, and initializing flow field information of a physical equation;
S202: according to the current flow field information of the physical equation, constructing a quantum circuit for solving quantum state evolution of the grid equation by utilizing the flow field information, and solving the grid equation under the current iteration number to obtain new flow field information of the physical equation;
S203: returning to the step of constructing the quantum circuit for solving the quantum state evolution of the grid equation by using the flow field information under the condition that the current iteration number is smaller than the maximum iteration number, until the current iteration number is equal to the maximum iteration number;
S204: and determining the solution of the grid equation according to the final quantum state of the quantum circuit after the current evolution.
Compared with the prior art, the method comprises the steps of firstly obtaining uniform grid information in a grid equation preset range calculation domain, initializing flow field information of a physical equation, constructing a quantum circuit for solving quantum state evolution of the grid equation by utilizing the flow field information according to the current flow field information of the physical equation, solving the grid equation under the current iteration number to obtain new flow field information of the physical equation, and returning to execute the step of constructing the quantum circuit for solving the quantum state evolution of the grid equation by utilizing the flow field information under the condition that the current iteration number is smaller than the maximum iteration number until the current iteration number is equal to the maximum iteration number, determining a solution of the grid equation according to the last quantum state of the quantum circuit after the current evolution, utilizing the relevant characteristics of quanta, and being capable of realizing an effective quantum algorithm for solving the grid equation and the iteration of the physical equation by utilizing the quantum algorithm, reducing the complexity and difficulty of calculation and filling the relevant technical blank of the quantum calculation field.
While the foregoing is directed to embodiments of the present invention, other and further embodiments of the invention may be devised without departing from the basic scope thereof, and the scope thereof is determined by the claims that follow.

Claims (9)

1. A quantum solving method for iteration of a grid equation and a physical equation, comprising:
obtaining uniform grid information in a grid equation preset range calculation domain, and initializing flow field information of a physical equation;
According to the current flow field information of the physical equation, a variable component sub-linear solver is utilized to construct and operate a quantum circuit for solving a linear equation set, so that a solution of the linear equation set is obtained, and new flow field information of the physical equation is obtained; the linear equation set is obtained by discretizing a grid equation under the current iteration number according to an implicit solving method and converting the grid equation;
Returning to execute the current flow field information according to the physical equation under the condition that the current iteration number is smaller than the maximum iteration number, and constructing and operating a quantum circuit for solving the linear equation set by utilizing a variable component sub-linear solver until the current iteration number is equal to the maximum iteration number;
and determining the solution of the grid equation according to the final quantum state of the quantum circuit after the current evolution.
2. The method of claim 1, wherein obtaining uniform grid information within a grid equation preset range calculation domain and initializing flow field information of a physical equation comprises:
dispersing the physical calculation domain of the preset range to obtain initial grid information;
Initializing flow field information of a physical equation, and determining initial grid center flow field information corresponding to the initial grid information.
3. The method according to claim 2, wherein the constructing and operating a quantum wire for solving a linear equation set according to the current flow field information of the physical equation using a variable component sub-linear solver to obtain a solution of the linear equation set, and obtaining new flow field information of the physical equation includes:
According to the current grid center flow field information, constructing a quantum circuit for solving quantum state evolution of a grid equation by utilizing the flow field information, and solving the grid equation under the current iteration number to obtain new grid information required by the next physical equation calculation;
and solving a physical equation based on the new grid information to obtain new grid center flow field information for the next iteration.
4. A method according to claim 3, wherein said constructing and operating a quantum wire for solving said system of linear equations using a variable component sub-linear solver to obtain a solution to said system of linear equations comprises:
obtaining a linear equation set converted by the grid equation Wherein matrix/>Is an hermitian matrix;
According to the hermitian matrix And/>Using a quantum circuit corresponding to a variable component quantum linear solver to output a quantum state/>, which contains the linear equation set solutionWherein the quantum state/>I.e. the vector/>, of the system of linear equations
5. A quantum solving apparatus for grid equation and physical equation iteration, comprising:
The acquisition module is used for acquiring uniform grid information in a grid equation preset range calculation domain and initializing flow field information of a physical equation;
the construction module is used for constructing and operating a quantum circuit for solving a linear equation set by utilizing a variable component linear solver according to the current flow field information of the physical equation set to obtain a solution of the linear equation set and obtain new flow field information of the physical equation set; the linear equation set is obtained by discretizing a grid equation under the current iteration number according to an implicit solving method and converting the grid equation;
The iteration module is used for returning to execute the current flow field information according to the physical equation under the condition that the current iteration times are smaller than the maximum iteration times, and constructing and operating a quantum circuit for solving the linear equation set by utilizing a variable component sub-linear solver until the current iteration times are equal to the maximum iteration times;
and the determining module is used for determining the solution of the grid equation according to the final quantum state of the quantum circuit after the current evolution.
6. The apparatus of claim 5, wherein the acquisition module comprises:
the discrete unit is used for dispersing the physical calculation domain of the preset range to obtain initial grid information;
and the determining unit is used for initializing the flow field information of the physical equation and determining initial grid center flow field information corresponding to the initial grid information.
7. The apparatus of claim 6, wherein the build module comprises:
The construction unit is used for constructing a quantum circuit for solving the quantum state evolution of the grid equation by utilizing the flow field information according to the current grid center flow field information, solving the grid equation under the current iteration number, and obtaining new grid information required by the next physical equation calculation;
and the solving unit is used for solving a physical equation based on the new grid information to obtain new grid center flow field information for the next iteration.
8. A storage medium having a computer program stored therein, wherein the computer program is arranged to perform the method of any of claims 1 to 4 when run.
9. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of any of the claims 1 to 4.
CN202110839154.XA 2021-07-23 2021-07-23 Quantum solving method and device for grid equation and physical equation iteration Active CN115700572B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110839154.XA CN115700572B (en) 2021-07-23 2021-07-23 Quantum solving method and device for grid equation and physical equation iteration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110839154.XA CN115700572B (en) 2021-07-23 2021-07-23 Quantum solving method and device for grid equation and physical equation iteration

Publications (2)

Publication Number Publication Date
CN115700572A CN115700572A (en) 2023-02-07
CN115700572B true CN115700572B (en) 2024-06-14

Family

ID=85120468

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110839154.XA Active CN115700572B (en) 2021-07-23 2021-07-23 Quantum solving method and device for grid equation and physical equation iteration

Country Status (1)

Country Link
CN (1) CN115700572B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104636566A (en) * 2015-03-13 2015-05-20 中国矿业大学 Dynamic mesh numerical solution method based on modified fluid motion equation

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10275717B2 (en) * 2016-06-02 2019-04-30 Google Llc Training quantum evolutions using sublogical controls
CN112632874A (en) * 2020-12-31 2021-04-09 杭州电子科技大学 Optimization method and system for numerical simulation of helicopter flow field

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104636566A (en) * 2015-03-13 2015-05-20 中国矿业大学 Dynamic mesh numerical solution method based on modified fluid motion equation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
求解二维三温辐射扩散方程组的一种代数两层迭代方法;徐小文;莫则尧;安恒斌;;计算物理;20090125(第01期);全文 *

Also Published As

Publication number Publication date
CN115700572A (en) 2023-02-07

Similar Documents

Publication Publication Date Title
AU2022235532A1 (en) Simulation method of quantum system, computing device, apparatus and storage medium
CN115809705B (en) Fluid dynamics computing system based on quantum computing and quantum computer
CN114819163B (en) Training method and device for quantum generation countermeasure network, medium and electronic device
CN114511094B (en) Quantum algorithm optimization method and device, storage medium and electronic device
CN115618663B (en) Quantum solving method and device for coupling grid equation and physical equation
CN115700572B (en) Quantum solving method and device for grid equation and physical equation iteration
CN117709415A (en) Quantum neural network model optimization method and device
CN114819167B (en) Sparse approximate inverse quantum preprocessing method and device for sparse linear system
CN116738128B (en) Method and device for solving time-containing partial differential equation by utilizing quantum circuit
CN117669757A (en) Hamiltonian volume construction method and device
CN116738126B (en) Differential equation solving method and device based on computational domain decomposition
CN118278533A (en) Method and device for constructing quantum circuit corresponding to quantum state chromatography algorithm
WO2024007919A1 (en) Lbm-based quantum flow simulation method and apparatus, medium, and device
CN116541947B (en) Grover solving method and device for SAT or MAX-SAT problem of vehicle configuration
CN117408345A (en) Quantum flow simulation method, device, medium and equipment based on LBM
CN116090273B (en) Quantum simulation method, device, terminal and storage medium for material deformation
CN116738127A (en) Solving method and device of differential equation, medium and electronic device
CN117408343A (en) Quantum flow simulation method, device, medium and equipment based on LBM
CN118227928A (en) Method and device for solving linear equation set based on quantum computation
CN114692879B (en) Quantum preprocessing method and device based on sparse linear system
CN115116552B (en) Molecular energy calculation method and device for quantum chemical simulation
CN118153695A (en) Quantum state preparation method and device
CN116976448A (en) Method and device for solving linear equation set by utilizing variable component sub-circuit
CN117408344A (en) Quantum flow simulation method, device, medium and equipment based on LBM
CN117993231A (en) Method and device for optimizing molecular geometry

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 230088 6th floor, E2 building, phase II, innovation industrial park, 2800 innovation Avenue, Hefei high tech Zone, Hefei City, Anhui Province

Applicant after: Benyuan Quantum Computing Technology (Hefei) Co.,Ltd.

Address before: 230088 6th floor, E2 building, phase II, innovation industrial park, 2800 innovation Avenue, Hefei high tech Zone, Hefei City, Anhui Province

Applicant before: ORIGIN QUANTUM COMPUTING COMPANY, LIMITED, HEFEI

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant