A target system energy calculation method and device and a storage medium
By determining the target density matrix and iteratively calculating the Fock matrix, the problem of density matrix selection affecting the accuracy of quantum chemical calculations is solved, high-precision calculation of the target system energy is achieved, and the application of quantum chemical simulation is promoted.
Patent Information
- Application Number
- CN202311198193.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-15
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2043-09-15
AI Technical Summary
In the existing technology, the selection of density matrix affects the accuracy of quantum chemical calculations, resulting in the failure of the target system energy calculation process to converge. There is an urgent need to solve the problem of determining a suitable density matrix.
By determining the target density matrix, calculating the energy of the target system, and using the Fock matrix iteration operation until the density matrix difference during the iteration process meets the preset accuracy, the current density matrix is used as the target density matrix to calculate the energy of the target system to be simulated.
It improves the accuracy of energy calculation of the target system, is suitable for quantum computing simulation of complex systems, and promotes the development of quantum chemical simulation applications.
Smart Images

Figure CN119647614B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of quantum computing technology, and in particular to a method, device and storage medium for calculating the energy of a target system. Background Art
[0002] A quantum computer is a physical device that follows the laws of quantum mechanics to perform high-speed mathematical and logical operations, and to store and process quantum information. When a device processes and calculates quantum information and runs quantum algorithms, it is considered a quantum computer. Quantum computers are a key technology under research because they can handle mathematical problems more efficiently than conventional computers. For example, they can reduce the time required to crack RSA keys from hundreds of years to just hours.
[0003] Quantum computing simulation is a simulation that uses numerical calculations and computer science to simulate calculations that follow the laws of quantum mechanics. As a simulation program, it uses the basic laws of quantum bits in quantum mechanics and the high-speed computing power of computers to depict the spatiotemporal evolution of quantum states.
[0004] With the continuous improvement of quantum chemistry theory, computational chemistry has become an important tool for chemists to explain experimental phenomena, predict experimental results, and guide experimental design. It has been widely used in the synthesis of drugs, preparation of catalysts, and other aspects.
[0005] In the prior art, obtaining the Hamiltonian operator of the target system is a crucial step before running the VQE algorithm using quantum chemical calculation software. For example, when quantum chemical calculation software uses the HF method to calculate the Hamiltonian of the target system, an initial density matrix, or initial guess of the density matrix, is required. It should be noted that the choice of density matrix directly affects the calculation process and accuracy, and an inappropriate density matrix often results in the calculation process of the target system failing to converge. Therefore, how to select and determine the appropriate density matrix and then calculate the energy of the target system has become a pressing issue. Summary of the Invention
[0006] The purpose of the present invention is to provide a method, device and storage medium for calculating the energy of a target system to address the deficiencies in the prior art. It determines a target density matrix and calculates the target system energy therefrom, thereby improving the calculation accuracy of the target system energy. The method is suitable for quantum computing simulation of complex systems and further promotes the development of quantum chemical simulation applications.
[0007] One embodiment of the present application provides a method for calculating the energy of a target system, the method comprising:
[0008] Determine the Fock matrix based on the electron integral and the initial density matrix in the target system to be simulated;
[0009] According to the Fock matrix, an iterative operation is performed on the initial density matrix until the difference between the density matrices obtained twice in the iteration process meets the preset accuracy, and the current density matrix obtained in the last iteration is used as the target density matrix;
[0010] Based on the obtained target density matrix, the energy of the target system to be simulated is calculated.
[0011] Optionally, determining the Fock matrix according to the electron integral and the initial density matrix in the target system to be simulated includes:
[0012] The Fock matrix is determined by the following formula:
[0013]
[0014] in, is the Fock matrix, σ is the spin channel, H pq Determined by the derivative of the electron integral with respect to the initial density matrix, J pq is the Coulomb matrix, satisfying J pq =∑ μv P μv (μν|pq), (μν|pq) is the electron integral tensor, P μv is the initial density matrix, a and b are hybridization coefficients, is a switching matrix that satisfies It is determined by the derivative of the exchange-correlation energy of the target system with respect to the initial density matrix.
[0015] Optionally, before determining the Fock matrix based on the electron integral and the initial density matrix in the target system to be simulated, the method further includes:
[0016] Obtain the first overlapping matrix S of the target system to be simulated, and calculate the second overlapping matrix corresponding to the first overlapping matrix S
[0017] Optionally, performing an iterative operation on the initial density matrix according to the Fock matrix until a difference between two density matrices obtained previously and subsequently meets a preset accuracy during the iteration process, and using the current density matrix obtained the next time as the target density matrix, includes:
[0018] The current density matrix is determined by the following formula:
[0019]
[0020] Among them, P pq is the current density matrix, r is the cyclic subscript, n is the number of electron orbitals, cpr is the p-th row and r-th column component of the c matrix, c qr is the qth row and rth column component of the c matrix, c pr or c qr Determined according to the second overlapping matrix, satisfying c r is the reduced eigenvector matrix.
[0021] Optionally, calculating the energy of the target system to be simulated based on the obtained target density matrix includes:
[0022] The energy of the target system to be simulated is calculated by the following formula:
[0023] E=E XC +E K +E nuc +E H
[0024] Wherein, E is the energy of the target system to be simulated, E XC is the exchange-correlation energy of the target system to be simulated, E K is the kinetic energy of the target system to be simulated, E nuc is the repulsive energy of the target system to be simulated, E H is the Hartree Fock energy of the target system to be simulated; and E XC =∑ p W p ρ p Z p , W is the integral grid weight vector, ρ is the electron density of the target system to be simulated, Z p is the exchange-correlation energy term obtained from the universal function, is the kinetic energy term of the single electron integral A, is the potential energy term of the single electron integral A, and satisfies
[0025] Optionally, after calculating the energy of the target system to be simulated based on the obtained target density matrix, the method further includes:
[0026] According to the currently obtained energy of the target system to be simulated, determining whether the difference between the currently obtained energy and the previously obtained energy meets the accuracy;
[0027] If so, the energy of the target system to be simulated currently obtained is used as the energy of the target system to be simulated; otherwise, the target density matrix is updated, the energy corresponding to the updated target density matrix is calculated, and the step of determining whether the difference between the current energy and the previously obtained energy meets the accuracy is continued.
[0028] Another embodiment of the present application provides a device for calculating target system energy, the device comprising:
[0029] A determination module, for determining a Fock matrix according to the electron integral and the initial density matrix in the target system to be simulated;
[0030] An iterative module is configured to perform an iterative operation on the initial density matrix according to the Fock matrix until the difference between the density matrices obtained twice in the iterative process meets the preset accuracy, and then use the current density matrix obtained in the last iteration as the target density matrix;
[0031] A calculation module is used to calculate the energy of the target system to be simulated based on the obtained target density matrix.
[0032] An embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, wherein the computer program is configured to execute any one of the above methods when running.
[0033] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any one of the methods described above.
[0034] Yet another embodiment of the present application provides a quantum computer operating system, which implements a method for calculating the energy of a target system according to any of the methods described above.
[0035] Compared with the prior art, the present invention first determines the Fock matrix based on the electron integral and the initial density matrix in the target system to be simulated, and then performs an iterative operation on the initial density matrix based on the Fock matrix. When the difference between the density matrices obtained twice in the iterative process meets the preset accuracy, the current density matrix obtained in the latter time is used as the target density matrix. Finally, based on the obtained target density matrix, the energy of the target system to be simulated is calculated. By determining the target density matrix, the target system energy is calculated, which improves the calculation accuracy of the target system energy. The invention is suitable for quantum computing simulation of complex systems and further promotes the development of quantum chemical simulation applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1This is a system network block diagram corresponding to a method for calculating target system energy provided by an embodiment of the present invention;
[0037] Figure 2 1 is a flow chart of a method for calculating target system energy provided by an embodiment of the present invention;
[0038] Figure 3 It is a structural schematic diagram of a target system energy calculation device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0039] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limiting the present invention.
[0040] The embodiment of the present invention first provides a method for calculating the energy of a target system. The method can be applied to electronic devices, such as computer terminals, specifically ordinary computers, quantum computers, etc.
[0041] The following describes it in detail by taking running on a computer terminal as an example. Figure 1 This is a system network block diagram corresponding to a method for calculating target system energy provided by an embodiment of the present invention. The system corresponding to the method for calculating target system energy may include a network 110, a server 120, a wireless device 130, a client 140, a storage unit 150, a classical processing system 160, a quantum processing system 170, and may also include additional memory, classical processors, quantum processors, and other devices not shown.
[0042] The network 110 is a medium for providing a communication link between various devices and computers connected together within the system corresponding to the target system energy calculation method, including but not limited to the Internet, corporate intranet, local area network, mobile communication network and their combination. The connection method can be wired, wireless communication link or optical fiber cable.
[0043] Server 120 and client 140 are conventional data processing systems that may contain data and applications or software tools that perform conventional computing processes. Client 140 may be a personal computer or a network computer, so the data may also be provided by server 120. Wireless device 130 may be a smartphone, tablet, laptop, smart wearable device, etc. Storage unit 150 may include database 151, which may be configured to store data such as qubit parameters, quantum logic gate parameters, quantum circuits, and quantum programs.
[0044] The classical processing system 160 (quantum processing system 170) may include a classical processor 161 (quantum processor 171) for processing classical data (quantum data) and a memory 163 (memory 172) for storing the classical data (quantum data). The classical data (quantum data) may be a boot file, an operating system image, and an application 162 (application 173). The application 162 (application 173) may be used to implement a quantum algorithm compiled according to a method for calculating target system energy provided in an embodiment of the present invention.
[0045] Any data or information stored or generated in classical processing system 160 (quantum processing system 170) can also be configured to be stored or generated in another classical (quantum) processing system in a similar manner, and similarly, any application program executed therein can also be configured to be executed in another classical (quantum) processing system in a similar manner.
[0046] It should be noted that a true quantum computer is a hybrid structure, which includes at least Figure 1 The system consists of two parts: the classical processing system 160, which is responsible for performing classical calculations and control; and the quantum processing system 170, which is responsible for running quantum programs and thus realizing quantum computing.
[0047] The classical processing system 160 and quantum processing system 170 can be integrated into a single device or distributed across two different devices. For example, a first device including the classical processing system 160 runs a classical computer operating system, provides quantum application development tools and services, and also provides the storage and network services required by quantum applications. Users develop quantum applications using the quantum application development tools and services on the device, and send quantum programs to a second device including the quantum processing system 170 via the network services on the device. The second device runs a quantum computer operating system, which parses the code of the quantum program and compiles it into instructions that can be recognized and executed by the quantum computer measurement and control system. The quantum processor 170 then implements the quantum algorithm corresponding to the quantum program based on these instructions.
[0048] In a classic silicon chip-based processing system 160, the units of the classic processor 161 are CMOS transistors. These computing units are not constrained by time or coherence, meaning they are available at all times. Furthermore, the number of these computing units is plentiful within a silicon chip, with a typical classic processor currently containing tens of thousands of them. This abundance of computing units and the fixed selectable computational logic of CMOS transistors, such as AND logic, allow computational efficiency to be achieved through the combination of a large number of CMOS transistors with limited logical functions.
[0049] Unlike the logic units in the classical processing system 160, the basic computing unit of the quantum processor 171 in the quantum processing system 170 is the qubit. The input of the qubit is limited by coherence and coherence time, that is, the qubit is limited by the length of use and is not available at any time. Making full use of the qubit within its available usage time is a key problem in quantum computing. In addition, the number of qubits in a quantum computer is one of the representative indicators of quantum computer performance. Each qubit realizes computing functions through logic functions configured on demand. Given the limited number of qubits, the logical functions in the field of quantum computing are diverse, such as: Hadamard gate (H gate), Pauli-X gate (X gate), Pauli-Y gate (Y gate), Pauli-Z gate (Z gate), X gate, RY gate, RZ gate, CNOT gate, CR gate, iSWAP gate, Toffoli gate, etc. During quantum computing, it is necessary to use limited qubits in combination with a variety of logic functions to achieve the computing effect.
[0050] Based on these differences, the design of the logical function acting on quantum bits (including the design of whether the quantum bits are used or not and the design of the efficiency of the use of each quantum bit) is the key to improving the computing performance of quantum computers, and requires special design. The above-mentioned design for quantum bits is a technical problem that ordinary computing devices do not need to consider or face. Based on this, in order to implement a method for calculating the energy of a target system in quantum computing, the present invention provides a method, device and storage medium for calculating the energy of a target system to address the deficiencies in the prior art. It determines the target density matrix and calculates the energy of the target system, thereby reducing the number of calculation iterations of the target system energy and improving the iteration efficiency, further promoting the development of quantum chemical simulation applications.
[0051] Theoretical explanations of the energy and properties of molecules and materials at the atomic level have long been considered one of the most straightforward applications of quantum computing, attracting widespread attention as a new computing paradigm. Compared to classical computing, quantum computing's computing power increases exponentially with the number of qubits. With continued development, breakthroughs have been made in many fields, including pharmaceuticals, photovoltaics, aviation, electronics, and energy generation. One of the most promising applications of quantum computers is the simulation of quantum systems, of which molecules are common in nature. Computing the energy of molecular systems is one of the main goals of quantum chemistry.
[0052] Under the Born-Oppenheimer approximation, which separates the slower degree of freedom of nuclear motion from the faster degree of freedom of electron motion, the basic goal of electronic structure theory can be expressed as solving the eigenstates of the following multi-electron Hamiltonian:
[0053]
[0054] The right side of the equation represents the kinetic energy of the electron, the external potential energy of the electron in the electrostatic potential field of the nucleus, the electrostatic repulsion potential energy between electrons, and the electrostatic repulsion potential energy between nuclei, respectively. N e Represents the number of electrons, N n Indicates the number of atoms, r i represents the coordinates of the i-th electron, R I represents the coordinates of the Ith atom, Z I represents the atomic number of the Ith atom, is the kinetic energy operator, satisfying For this electronic Hamiltonian, the nuclear coordinates R I is a parameter, and the last term in the above formula is a constant.
[0055] With the energy expression, according to the Hohenberg-Kohn theory, we only need to vary the electron density and find the electron density with zero variation to complete the solution of the system's ground state. According to the variational principle, we can obtain the core of the entire density functional theory (DFT) - the Kohn-Sham equation. In physics and quantum chemistry, specifically for the Kohn-Sham equation in density functional theory, it is a non-interacting Schrödinger equation. The virtual system of non-interacting particles (usually electrons) produces the same density as any given interacting particle system. It can be expressed specifically as:
[0056]
[0057] Among them, v ext (r) represents the external potential field, ν H (r) represents the Hartree potential field, represents the exchange-correlation potential field, represents the single electron orbital energy, represents the single electron orbital wave function.
[0058] To solve the Kohn-Sham equation, the KS-SCF (Kohn-Sham Self Consistent Field) method can be used. That is, the energy expression is set to zero under the orthogonal normalization constraint condition for the orbital (collectively known as molecular orbital, Molecular Orbital, MO), and the desired solution can be obtained. According to the linear variation principle, it means to find the coefficient matrix C σ Since the energy is expressed as a density matrix, we must first use the chain rule:
[0059]
[0060] The derivative of the single electron term with respect to the density matrix can be used to calculate H pq
[0061]
[0062] in, χ μ (r), χ v (r) are all basis functions.
[0063] It should be noted that in quantum chemistry, basis functions are functions with certain properties used to describe the wave function of the target system, and are the basis of quantum chemistry ab initio calculations. Simply put, the wave function of a target system can always be expanded using a set of orthogonal and complete functions, which can be called basis functions. It is the basis of the infinite-dimensional Hilbert space, the wave function is a vector in the Hilbert space, and the corresponding operator can also be expressed as a matrix under this set of bases. In the embodiment of the present application, the molecular orbital of the target system to be simulated can be expressed in the form of basis functions by the following formula:
[0064]
[0065] in, is the wave function of the i-th atom, σ is the spin channel, i is the atomic number, M is the number of basis functions in the basis set, μ is the basis function number, c is the coefficient matrix, and the basis function χ μ (r) satisfies {χ μ (r),μ=1,2,…,M}.
[0066] See also Figure 2 , Figure 2 It is a flow chart of a method for calculating target system energy provided by an embodiment of the present invention.
[0067] This embodiment provides an embodiment of a method for calculating the energy of a target system. The method for calculating the energy of a target system includes:
[0068] S201: Determine a Fock matrix based on the electron integral in the target system to be simulated and the initial density matrix.
[0069] Specifically, the target system to be simulated is first determined, which can include determining the target system's electron count, orbital information, and coordinate information. The electron count refers to the number of electrons in the target system. Electrons are fundamental particles, and generally refer to the number of electrons outside the nucleus of the target system. Orbital information mathematically describes the probability of finding an electron in a specific space outside the nucleus of the target system, indicating the electron's possible location in three-dimensional space.
[0070] It should be noted that before determining the Fock matrix based on the electron integral and the initial density matrix in the target system to be simulated, the method may further include: obtaining a first overlap matrix S of the target system to be simulated, and calculating a second overlap matrix corresponding to the first overlap matrix S
[0071] For example, for the target hydrogen molecule system to be simulated, it contains four single-electron spin molecular orbitals and two electrons. According to the number of hydrogen molecule electrons and orbital information, the coordinates of the two hydrogen atoms can be (0,0,0) and (0,0,0.74), respectively. The STO-3G basis set is selected, the charge is set to 0, and the spin multiplicity is set to 1. The first overlap matrix S and the single-electron integral A can be calculated:
[0072]
[0073]
[0074] It should be noted that the double electron integral G in the electron integral information is a four-dimensional tensor. For ease of presentation, it can be represented as a block matrix in the following form:
[0075]
[0076]
[0077] G 12 =G 21
[0078]
[0079]
[0080] On this basis, the initial density matrix is constructed to obtain the initial density matrix P0:
[0081]
[0082] Then, the Fock matrix F is constructed according to the electron integral in the target system to be simulated and the initial density matrix. Its specific form can be as follows:
[0083]
[0084] in, is the Fock matrix, σ is the spin channel, H pq Determined by the derivative of the electron integral with respect to the initial density matrix, J pq is the Coulomb matrix, satisfying J pq =∑ μv P μv(μν|pq), (μν|pq) is the electron integral tensor, P μν is the initial density matrix, a and b are hybridization coefficients, is a switching matrix that satisfies It is determined by the derivative of the exchange-correlation energy of the target system with respect to the initial density matrix.
[0085] Through linear algebra methods, we can get and F r ,Right now:
[0086]
[0087]
[0088]
[0089] S202: performing an iterative operation on the initial density matrix according to the Fock matrix until the difference between the density matrices obtained twice in the iterative process meets the preset accuracy, and taking the current density matrix obtained in the last iteration as the target density matrix.
[0090] Specifically, the current density matrix is determined by the following formula:
[0091]
[0092] Among them, P pq is the current density matrix, r is the cyclic subscript, n is the number of electron orbitals, c pr is the p-th row and r-th column component of the c matrix, c qr is the qth row and rth column component of the c matrix, c pr or c qr Determined according to the second overlapping matrix, satisfying c r is the reduced eigenvector matrix. For example, if the c matrix and the eigenvector matrix c r They are:
[0093]
[0094]
[0095] According to the matrix c, an updated density matrix can be obtained according to the formula:
[0096]
[0097] The updated density matrix is then as follows:
[0098]
[0099] Then calculate whether the difference between the density matrices obtained twice before and after meets the preset accuracy (for example, the accuracy is 10 -5 ), namely P pq′ With P pq Is the difference less than 10? -5 If so, the current density matrix P pq′ as the target density matrix.
[0100] S203: Calculating the energy of the target system to be simulated based on the obtained target density matrix.
[0101] Specifically, calculating the energy of the target system to be simulated based on the obtained target density matrix may include:
[0102] The energy of the target system to be simulated is calculated by the following formula:
[0103] E=E XC +E K +E nuc +E H
[0104] Wherein, E is the energy of the target system to be simulated, E XC is the exchange-correlation energy of the target system to be simulated, E K is the kinetic energy of the target system to be simulated, E nuc is the repulsive energy of the target system to be simulated, E H is the Hartree Fock energy of the target system to be simulated; and E XC =∑ p W p ρ p Z p , W is the integral grid weight vector, ρ is the electron density of the target system to be simulated, Z p is the exchange-correlation energy term obtained from the universal function, is the kinetic energy term of the single electron integral A, is the potential energy term of the single electron integral A, and satisfies
[0105] It should be noted that the derivative of the Hartree Fock energy with respect to the density matrix will give the Coulomb matrix J:
[0106]
[0107] The exchange matrix K can be calculated by the derivative of the kinetic energy of the target system to be simulated σ :
[0108]
[0109] The derivative of the exchange-correlation energy of the target system to be simulated can be denoted as V xc,σ matrix:
[0110]
[0111] In summary, the derivative of the energy of the target system to be simulated with respect to the density matrix can be used to calculate the Fock matrix F σ
[0112]
[0113] Finally, consider the Lagrangian Taking the derivative of the expansion coefficient, we get:
[0114]
[0115] Through the first overlap matrix S of the basis set, that is:
[0116] S μν =∫χ μ (r)χ ν (r)dr
[0117] Using the Fock matrix F σ , the first overlap matrix S and the Lagrange multiplier The symmetry of The following equation can be derived:
[0118] F σ C σ =SC σ E σ
[0119] The above equation is the core equation of KSSCF that needs to be solved. The energy of the target system to be simulated can be divided into four parts: exchange correlation energy E XC , Hartree Fock Energy E H , kinetic energy E K and repulsive energy E nuc , where E XC The expression is:
[0120]
[0121] Where W represents the integral grid weight vector, ρ represents the electron density of the system, and Z p It represents the exchange correlation energy obtained according to different functional types, usually it is ρ and Functions of equal variables.
[0122] Where W is calculated as follows:
[0123]
[0124]
[0125]
[0126] The expression for kinetic energy is:
[0127]
[0128] in, is the kinetic energy term of the single electron integral A.
[0129] Repulsive energy E nuc The expression:
[0130]
[0131] in, is the potential energy term of the single electron integral A, and
[0132] Hartree Fock Energy E H From the Coulomb matrix J we get:
[0133]
[0134] The final energy expression of the target system to be simulated is:
[0135] E=E XC +E K +E nuc +E H
[0136] In an optional embodiment, since the functional expression of the exchange-correlation energy is very complex, the full-space integration of a certain integrand F(r) can be used in the calculation of this application, that is:
[0137] I=∫F(r)dr
[0138] For a finite molecular system, such a full-space integral is obviously not efficient if it is integrated using a uniform real-space grid. This application proposes to assign a weight value to each atom's contribution to each point r in space, and the integral can be converted into the sum of the integrals centered on each atom, that is:
[0139]
[0140] Here, for each point in space, the sum of the weights of each atom is 1, that is:
[0141]
[0142] In each atom-centered integral, the integrand is the product of the original function and the weight function, i.e.:
[0143] F I (r)=ω I (r)F(r)
[0144] In a multi-atomic molecular system, it divides each point r in space to the nearest atom, i.e. only one atom has a weight of 1 and all other atoms have a weight of 0. The region belonging to each atom obtained by this method is a polyhedron.
[0145] In an alternative embodiment, after calculating the energy of the target system to be simulated based on the obtained target density matrix, the method can further comprise:
[0146] According to the current energy of the target system to be simulated, it is judged whether the difference between the current energy and the previously obtained energy meets the accuracy;
[0147] If yes, the current energy of the target system to be simulated is taken as the energy of the target system to be simulated, otherwise, the target density matrix is updated, the energy corresponding to the updated target density matrix is calculated, and the step of judging whether the difference between the current energy and the previously obtained energy meets the accuracy is continued.
[0148] Specifically, according to the current energy of the target system to be simulated, it is judged whether the difference between the current energy and the previously obtained energy meets the accuracy, wherein the accuracy can be set by the user according to the calculation requirement. If yes, the ground state energy of the target system is directly obtained; otherwise, the density matrix is updated according to the above formula for determining the current density matrix, and the energy corresponding to the updated density matrix is calculated, so as to finally obtain the ground state energy of the target system to be solved.
[0149] The above is a complete iteration process, and a new iteration can be started through the updated density matrix until the accuracy condition is met and the iteration is ended. In the entire solving process, the acquisition of the target density matrix plays a crucial role.
[0150] It can be seen that the present invention first determines the Fock matrix based on the electron integral and the initial density matrix in the target system to be simulated, and then performs an iterative operation on the initial density matrix based on the Fock matrix. When the difference between the density matrices obtained twice in the iterative process meets the preset accuracy, the current density matrix obtained in the latter time is used as the target density matrix. Finally, based on the obtained target density matrix, the energy of the target system to be simulated is calculated. By determining the target density matrix, the target system energy is calculated, which improves the calculation accuracy of the target system energy. It is suitable for quantum computing simulation of complex systems and further promotes the development of quantum chemical simulation applications.
[0151] See also Figure 3 , Figure 3 is a schematic diagram of a target system energy calculation device provided by an embodiment of the present invention, and Figure 2 Corresponding to the process shown, the device includes:
[0152] A determination module 301 is used to determine a Fock matrix based on the electron integral and the initial density matrix in the target system to be simulated;
[0153] An iterative module 302 is configured to perform an iterative operation on the initial density matrix according to the Fock matrix until the difference between the density matrices obtained twice meets a preset accuracy during the iteration process, and then use the current density matrix obtained in the last iteration as the target density matrix;
[0154] The calculation module 303 is used to calculate the energy of the target system to be simulated based on the obtained target density matrix.
[0155] Compared with the prior art, the present invention first determines the Fock matrix based on the electron integral and the initial density matrix in the target system to be simulated, and then performs an iterative operation on the initial density matrix based on the Fock matrix. When the difference between the density matrices obtained twice in the iterative process meets the preset accuracy, the current density matrix obtained in the latter time is used as the target density matrix. Finally, based on the obtained target density matrix, the energy of the target system to be simulated is calculated. By determining the target density matrix, the target system energy is calculated, which improves the calculation accuracy of the target system energy. The invention is suitable for quantum computing simulation of complex systems and further promotes the development of quantum chemical simulation applications.
[0156] An embodiment of the present invention further provides a storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when running.
[0157] Specifically, in this embodiment, the above-mentioned storage medium may be configured to store a computer program for performing the following steps:
[0158] S201: determining a Fock matrix according to the electron integral in the target system to be simulated and the initial density matrix;
[0159] S202: performing an iterative operation on the initial density matrix according to the Fock matrix until the difference between the density matrices obtained twice in the iteration process meets the preset accuracy, and taking the current density matrix obtained in the last iteration as the target density matrix;
[0160] S203: Calculating the energy of the target system to be simulated based on the obtained target density matrix.
[0161] Specifically, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0162] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0163] Specifically, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0164] Specifically, in this embodiment, the processor may be configured to execute the following steps through a computer program:
[0165] S201: determining a Fock matrix according to the electron integral in the target system to be simulated and the initial density matrix;
[0166] S202: performing an iterative operation on the initial density matrix according to the Fock matrix until the difference between the density matrices obtained twice in the iteration process meets the preset accuracy, and taking the current density matrix obtained in the last iteration as the target density matrix;
[0167] S203: Calculating the energy of the target system to be simulated based on the obtained target density matrix.
[0168] An embodiment of the present invention further provides a quantum computer operating system, which implements a method for calculating the energy of a target system according to any of the above method embodiments provided in an embodiment of the present invention.
[0169] An embodiment of the present application further provides a quantum computer operating system, which implements the calculation of target system energy according to any of the above methods.
[0170] An embodiment of the present application further provides a quantum computer, which includes the quantum computer operating system.
[0171] The above describes in detail the structure, features and effects of the present invention based on the embodiments shown in the drawings. The above is only a preferred embodiment of the present invention, but the scope of implementation of the present invention is not limited to what is shown in the drawings. Any changes made in accordance with the concept of the present invention, or modifications to equivalent embodiments with equivalent changes, which do not exceed the spirit covered by the description and drawings, should be within the scope of protection of the present invention.
Claims
1. A method for calculating the energy of a target system, characterized in that: The method comprises: Determine the Fock matrix based on the electron integral and the initial density matrix in the target system to be simulated; According to the Fock matrix, the initial density matrix is iterated until the difference between the density matrices obtained twice before and after the iteration meets the preset accuracy, and the current density matrix obtained the last time is used as the target density matrix, where the target density matrix is ; Based on the target density matrix obtained , calculating the energy of the target system to be simulated, including: The energy of the target system to be simulated is calculated by the following formula: in, is the energy of the target system to be simulated, is the exchange-correlation energy of the target system to be simulated, is the kinetic energy of the target system to be simulated, is the repulsive energy of the target system to be simulated, is the Hartree Fock energy of the target system to be simulated; and , is the integration grid weight vector, is the electron density of the target system to be simulated, is the exchange-correlation energy term obtained from the universal function, , For single electron integration The kinetic energy term, , For single electron integration The potential energy term, and satisfies , .
2. The method according to claim 1, characterized in that The determining of the Fock matrix according to the electron integral and the initial density matrix in the target system to be simulated includes: The Fock matrix is determined by the following formula: in, is the Fock matrix, is the spin channel, Determined from the derivative of the electron integral with respect to the initial density matrix, is the Coulomb matrix, satisfying , is the electron integral tensor, is the initial density matrix, are hybridization coefficients, is a switching matrix that satisfies , It is determined by the derivative of the exchange-correlation energy of the target system with respect to the initial density matrix.
3. The method according to claim 2, characterized in that Before determining the Fock matrix according to the electron integral and the initial density matrix in the target system to be simulated, the method further includes: Get the first overlap matrix of the target system to be simulated , and calculate the first overlap matrix The corresponding second overlap matrix .
4. The method according to claim 3, characterized in that The iterative operation of the initial density matrix is performed according to the Fock matrix until the difference between the density matrices obtained twice in the iteration process meets the preset accuracy, and the current density matrix obtained in the last iteration is used as the target density matrix, including: The current density matrix is determined by the following formula: in, is the current density matrix, is a loop subscript, is the number of electron orbitals, for The matrix Rank column components, for The matrix Rank column components, or Determined according to the second overlapping matrix, satisfying , is the reduced eigenvector matrix.
5. The method according to claim 1 or 4, characterized in that After calculating the energy of the target system to be simulated based on the obtained target density matrix, the method further includes: According to the currently obtained energy of the target system to be simulated, determining whether the difference between the currently obtained energy and the previously obtained energy meets the accuracy; If so, the energy of the target system to be simulated currently obtained is used as the energy of the target system to be simulated; otherwise, the target density matrix is updated, the energy corresponding to the updated target density matrix is calculated, and the step of determining whether the difference between the current energy and the previously obtained energy meets the accuracy is continued.
6. A device for calculating target system energy, characterized in that: The device comprises: A determination module, for determining a Fock matrix according to the electron integral and the initial density matrix in the target system to be simulated; The iteration module is used to perform an iterative operation on the initial density matrix according to the Fock matrix until the difference between the density matrices obtained twice before and after the iteration meets the preset accuracy, and the current density matrix obtained the last time is used as the target density matrix, wherein the target density matrix is ; A calculation module is used to obtain the target density matrix based on , calculating the energy of the target system to be simulated, including: The energy of the target system to be simulated is calculated by the following formula: in, is the energy of the target system to be simulated, is the exchange-correlation energy of the target system to be simulated, is the kinetic energy of the target system to be simulated, is the repulsive energy of the target system to be simulated, is the Hartree Fock energy of the target system to be simulated; and , is the integration grid weight vector, is the electron density of the target system to be simulated, is the exchange-correlation energy term obtained from the universal function, , For single electron integration The kinetic energy term, , For single electron integration The potential energy term, and satisfies , .
7. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 5 when executed.
8. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 5.
9. A quantum computer operating system, characterized in that: The quantum computer operating system implements a method for calculating the energy of a target system according to the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for calculating energy of target system based on quantum chemistry and medium
CN114492815A
Method and device for determining initial parameters of test state of target system and medium
CN114528996A