A method and apparatus for predicting molecular crystal structures

By obtaining the dipole energy between molecules through quantum computing, and constructing Hamiltonians and quantum circuits, the computational bottleneck in molecular crystal structure prediction is solved, and the computational speed and accuracy are improved.

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

Patent Information

Application Number
CN202210887998.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-22
Publication Date
2026-11-17
Estimated Expiration
2042-07-22

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently calculate low energy differences in molecular crystal structures, resulting in low efficiency in crystal structure prediction, especially in finding the molecular crystal structure with the lowest energy among a large number of possible states.

Method used

By obtaining the dipole energy between molecules, converting it into an objective function, constructing a Hamiltonian and a quantum circuit, running and measuring the final quantum state to determine the molecular crystal structure, and using quantum computing to improve computational speed.

Benefits of technology

It improves the computational speed and accuracy of molecular crystal structure prediction, solves the bottleneck problem of high-precision calculation, and realizes efficient crystal structure prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117474107B_ABST
    Figure CN117474107B_ABST
Patent Text Reader

Abstract

This invention discloses a method and apparatus for predicting molecular crystal structures. The method includes: firstly, obtaining the dipole energies between all molecules in the molecular crystal to be predicted, and converting all dipole energies into an objective function expressed using a combinatorial optimization method; determining the Hamiltonian of the molecular crystal structure to be predicted based on the objective function; constructing a target quantum circuit based on the Hamiltonian of the molecular crystal structure to be predicted; running and measuring the target quantum circuit to obtain the final quantum state that minimizes the sum of the dipole energies of the molecular crystal to be predicted; and determining the structure of the molecular crystal to be predicted based on the final quantum state. This invention proposes a quantum simulation implementation method that can solve the problem of predicting molecular crystal structures, thereby utilizing the correlation properties of quantum mechanics to improve computational speed and fill a gap in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of quantum computing technology, specifically a method and apparatus for predicting molecular crystal structures. Background Technology

[0002] Crystal structure prediction (CSP) refers to the calculation of the possible three-dimensional structure of a crystal based on a given two-dimensional structure. This can help reduce drug development risks and improve efficiency to some extent. In molecular crystals, the orientation of molecules also affects the properties of the unit cell. The type of molecular crystal structure is related to the number of all possible dipole cooperative sequences, which increases exponentially with the number of molecules in the unit cell. Accurately calculating the small energy differences between different low-energy crystal structures requires high-precision quantum mechanical calculations. However, the time complexity of high-precision quantum mechanical calculations increases exponentially with the number of electrons n in the system. When the number of independent molecules within an asymmetric unit increases, and the number of space group operations increases, high-precision energy calculations for the large number of crystal structures generated during CSP become a bottleneck in CSP. Therefore, finding a method to predict the molecular crystal structure that minimizes the sum of crystal dipole energies from a large number of possible states is a problem that urgently needs to be solved. Summary of the Invention

[0003] The purpose of this invention is to provide a method and apparatus for predicting molecular crystal structures to address the shortcomings of existing technologies. It proposes a quantum simulation implementation method that can solve the problem of predicting molecular crystal structures, thereby utilizing the correlation properties of quantum mechanics to improve computational speed and fill the gaps in related technologies.

[0004] One embodiment of this application provides a method for predicting molecular crystal structures, the method comprising:

[0005] Obtain the dipole energies between all molecules in the molecular crystal to be predicted, and convert all dipole energies into an objective function represented by a combinatorial optimization method;

[0006] Based on the objective function, determine the Hamiltonian of the molecular crystal structure to be predicted;

[0007] Construct the target quantum circuit based on the Hamiltonian of the molecular crystal structure to be predicted.

[0008] Run and measure the target quantum circuit to obtain the final quantum state with the minimum sum of the dipole energies of the molecular crystal to be predicted;

[0009] The structure of the molecular crystal to be predicted is determined based on the final quantum state.

[0010] Optionally, obtaining the dipole energies between all molecules in the molecular crystal to be predicted includes:

[0011] Determine the total number of molecules and the total number of molecular orientations in the molecular crystal to be predicted;

[0012] Based on the total number of molecules and the total number of molecular orientations in the molecular crystal to be predicted, the dipole energies between all molecules in the molecular crystal to be predicted are determined.

[0013] Optionally, the step of converting all dipole energies into an objective function expressed using a combinatorial optimization method includes:

[0014] All dipole energies are preprocessed and then transformed into an objective function expressed using a combinatorial optimization method.

[0015] Optionally, the step of converting all preprocessed dipole energies into an objective function represented by a combinatorial optimization method includes:

[0016] The objective function is expressed using the following combined optimization method.

[0017]

[0018] Among them, the Describe the objective function, the Let i and j represent molecule numbers, e represent the set of all interacting molecules, a and b represent the orientation of the corresponding molecules, and E represent the set of all interacting molecules. i,j,a,b Let v represent the dipole energy when molecule i is at position a and molecule j is at position b, v represents the orientation number of the molecular crystal to be predicted, and k represents the total number of orientations of the molecular crystal to be predicted.

[0019] Optionally, determining the Hamiltonian of the molecular crystal to be predicted based on the objective function includes:

[0020] The variables of the objective function are replaced with Pauli operators to determine the Hamiltonian of the molecular crystal to be predicted.

[0021] Optionally, replacing the variables of the objective function with Pauli operators to determine the Hamiltonian of the molecular crystal to be predicted includes:

[0022] The variables of the objective function Using Pauli arithmetic operators The substitution is performed, and the Hamiltonian H of the molecular crystal to be predicted is expressed by the following formula. C :

[0023]

[0024] Wherein, I represents the identity matrix, and H... C The value represents the Hamiltonian of the molecular crystal to be predicted, where n represents the total number of molecules in the molecular crystal to be predicted, and Z represents the Pauli Z operator.

[0025] Optionally, determining the structure of the molecular crystal to be predicted based on the final quantum state includes:

[0026] Based on the final quantum state, determine the expected value corresponding to the Hamiltonian;

[0027] The structure of the molecular crystal to be predicted is determined based on the expected value.

[0028] Another embodiment of this application provides a device for predicting molecular crystal structures, the device comprising:

[0029] The module is used to obtain the dipole energies between all molecules in the molecular crystal to be predicted, and to convert all dipole energies into an objective function represented by a combinatorial optimization method.

[0030] The first determining module is used to determine the Hamiltonian of the molecular crystal structure to be predicted based on the objective function.

[0031] A construction module is used to construct a target quantum circuit based on the Hamiltonian of the molecular crystal structure to be predicted.

[0032] The operation module is used to run and measure the target quantum circuit to obtain the final quantum state with the minimum sum of the dipole energies of the molecular crystal to be predicted;

[0033] The second determining module is used to determine the structure of the molecular crystal to be predicted based on the final quantum state.

[0034] Optionally, the obtaining module includes:

[0035] The first determining unit is used to determine the total number of molecules and the total number of molecular orientations of the molecular crystal to be predicted.

[0036] The second determining unit is used to determine the dipole energy between all molecules in the molecular crystal to be predicted based on the total number of molecules and the total number of molecular orientations of the molecular crystal to be predicted.

[0037] Optionally, the obtaining module includes:

[0038] The transformation unit is used to preprocess all the dipole energies and transform the preprocessed dipole energies into an objective function expressed using a combinatorial optimization method.

[0039] Optionally, the first determining module includes:

[0040] The third determining unit is used to replace the variables of the objective function with Pauli operators to determine the Hamiltonian of the molecular crystal to be predicted.

[0041] Optionally, the second determining module includes:

[0042] The fourth determining unit is used to determine the expected value corresponding to the Hamiltonian based on the final quantum state;

[0043] The fifth determining unit is used to determine the structure of the molecular crystal to be predicted based on the expected value.

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

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

[0046] Compared with existing technologies, this invention first obtains the dipole energies between all molecules in the molecular crystal to be predicted, and converts all dipole energies into an objective function expressed using a combinatorial optimization method. Based on the objective function, the Hamiltonian of the molecular crystal structure to be predicted is determined. Based on the Hamiltonian of the molecular crystal structure to be predicted, a target quantum circuit is constructed. The target quantum circuit is run and measured to obtain the final quantum state that minimizes the sum of the dipole energies of the molecular crystal to be predicted. Based on the final quantum state, the structure of the molecular crystal to be predicted is determined. This invention proposes a quantum simulation implementation method that can solve the problem of predicting molecular crystal structure, thereby utilizing the correlation properties of quantum mechanics to improve computational speed and fill the gap in related technologies. Attached Figure Description

[0047] Figure 1 This is a hardware structure block diagram of a computer terminal for a method for predicting molecular crystal structures provided in an embodiment of the present invention;

[0048] Figure 2 This is a schematic flowchart of a method for predicting molecular crystal structures provided in an embodiment of the present invention;

[0049] Figure 3 This is a schematic diagram of the structure of a molecular crystal structure prediction device provided in an embodiment of the present invention. Detailed Implementation

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

[0051] This invention first provides a method for predicting molecular crystal structures, which can be applied to electronic devices, such as computer terminals, specifically ordinary computers, quantum computers, etc.

[0052] The following detailed explanation uses a computer terminal as an example. Figure 1 This is a hardware block diagram of a computer terminal for a method of predicting molecular crystal structures provided in an embodiment of the present invention. Figure 1 As shown, a computer terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. Optionally, the computer terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the computer terminal described above. For example, the computer terminal may also include components that are more complex than those described above. Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0053] The memory 104 can be used to store software programs and modules for application software, such as the program instructions / modules corresponding to the molecular crystal structure prediction method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the above-described method. The 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 instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to a computer terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0054] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the computer terminal. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0055] It's important to note that a true quantum computer has a hybrid structure, comprising two main parts: a classical computer responsible for performing classical computations and control, and a quantum device responsible for running quantum programs to achieve quantum computation. A quantum program is a sequence of instructions written in a quantum language such as QRunes that can run on a quantum computer, supporting operations on quantum logic gates and ultimately enabling quantum computing. Specifically, a quantum program is a sequence of instructions that operates on quantum logic gates according to a specific timing order.

[0056] In practical applications, due to limitations in the development of quantum device hardware, quantum computing simulations are often required to verify quantum algorithms, quantum applications, and so on. Quantum computing simulation is the process of simulating the execution of a quantum program corresponding to a specific problem using a virtual architecture (i.e., a quantum virtual machine) built with the resources of a regular computer. Typically, it is necessary to construct a quantum program corresponding to a specific problem. The quantum program referred to in this embodiment of the invention is a program written in a classical language that represents qubits and their evolution, wherein qubits, quantum logic gates, etc., related to quantum computing all have corresponding classical code representations.

[0057] Quantum circuits, also known as quantum logic circuits, are a common manifestation of quantum programming and are the most widely used general-purpose quantum computing model. They represent circuits that operate on qubits under an abstract concept. They consist of qubits, circuits (timelines), and various quantum logic gates. Finally, the results are often read out through quantum measurement operations.

[0058] Unlike traditional circuits that use metal wires to transmit voltage or current signals, in quantum circuits, the circuits can be seen as being connected by time. That is, the state of a quantum bit evolves naturally over time, following the instructions of the Hamiltonian operator until it encounters a logic gate and is operated on.

[0059] A quantum program corresponds to a single quantum circuit. The quantum program described in this invention refers to this single quantum circuit, where the total number of qubits in the single quantum circuit is the same as the total number of qubits in the quantum program. This can be understood as follows: a quantum program can consist of a quantum circuit, measurement operations on the qubits within the quantum circuit, registers for storing measurement results, and control flow nodes (jump instructions). A single quantum circuit can contain dozens, hundreds, or even thousands of quantum logic gate operations. The execution of a quantum program is the process of executing all the quantum logic gates in a specific timing order. It should be noted that the timing order refers to the chronological sequence in which individual quantum logic gates are executed.

[0060] It's important to note that in classical computing, the most basic unit is the bit, and the most fundamental control mode is the logic gate. Circuit control can be achieved through combinations of logic gates. Similarly, the way to process qubits is through quantum logic gates. Quantum logic gates enable the evolution of quantum states and are the foundation of quantum circuits. Quantum logic gates include single-qubit gates, such as Hadamard gates (H-gates), Pauli-X gates (X-gates), Pauli-Y gates (Y-gates), Pauli-Z gates (Z-gates), RX gates, RY gates, RZ gates, etc.; and multi-qubit quantum logic gates, such as CNOT gates, CR gates, iSWAP gates, Tofoli gates, etc. Quantum logic gates are generally represented using unitary matrices, which are not only matrix forms but also operations and transformations. The effect of a quantum logic gate on a quantum state is generally calculated by left-multiplying the unitary matrix by the matrix corresponding to the right vector of the quantum state.

[0061] As those skilled in the art will understand, in classical computers, the basic unit of information is the bit, which has two states: 0 and 1. The most common physical implementation uses high and low voltage levels to represent these states. In quantum computing, the basic unit of information is the qubit, which also has two states: 0 and 1, denoted as |0> and |1>. However, it can exist in a superposition of these two states, which can be represented as... Here, a and b are complex numbers representing the amplitudes (probability amplitudes) of the |0> and |1> states, respectively, which is not present in classical bits. After measurement, the state of a quantum bit collapses to a definite state (eigenstate, here |0> and |1>), 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 notation.

[0062] A quantum state, referring to the state of a qubit, is generally described using a set of orthogonal and complete basis vectors. The computational basis typically used is represented in binary in quantum algorithms (or quantum programs). For example, a set of qubits q0, q1, and q2, representing the 0th, 1st, and 2nd qubits respectively, ordered from most significant bit to least significant bit as q2q1q0, represents a quantum state that is a superposition of 23 computational basis vectors. The eight computational basis vectors are: |000>, |001>, |010>, |011>, |100>, |101>, |110>, and |111>. Each computational basis vector corresponds to a specific qubit bit. For example, in the |000> state, 000 corresponds to q2q1q0 from most significant bit to least significant bit. In short, a quantum state is a superposition of basis vectors; when the probability amplitude of other basis vectors is 0, the state is in a specific basis vector.

[0063] In quantum mechanics, all measurable mechanical quantities can be described by a Hermitian matrix. A Hermitian matrix is ​​defined as the matrix itself, where its transpose and conjugate are equal.

[0064]

[0065] Such matrices are usually called measurement operators. Non-zero operators will have at least one non-zero eigenvalue λ and a corresponding eigenstate |ψ>.

[0066] H|ψ>=λ|ψ>

[0067] If the eigenvalues ​​of the operator H correspond to the energy level distribution of a certain system, then such an operator can also be called a Hamiltonian.

[0068] According to the time-dependent Schrödinger equation, the evolution from one state |ψ(t=0)> to another state |ψ(t=T)> is accomplished using unitary operators:

[0069] U(0,T)|ψ(t=0)>=|ψ(t=T)>

[0070] The relationship between the Hamiltonian and the unitary operator is that if a quantum state evolves naturally in a system, and the energy describing the system is the Hamiltonian, then the unitary operator can be written from the Hamiltonian:

[0071]

[0072] When the system starts from time 0 and the Hamiltonian does not change with time, the unitary operator is U = exp(-iHt).

[0073] In quantum computing within a closed system, all quantum operations, except for measurement, can be described by a unitary matrix. A unitary matrix is ​​defined as the inverse of its transpose and conjugate. That is:

[0074]

[0075] Generally speaking, unitary operators are also referred to as quantum logic gates in quantum computing.

[0076] In some cases, we need to start from the initial Hamiltonian H. B ground state |ψ B Starting from this point, we search for the lowest energy level eigenstate (ground state) |ψ of a certain target Hamiltonian H. P However, by directly using this Hamiltonian for evolution, we can only obtain...

[0077] exp(-itH)|ψ B >=|ψ′ P>

[0078] where |ψ′ P >≠|ψ P >, but |ψ′ P > contains a part of the |ψ P > component, that is, their inner product <ψ′ P |ψ P >≠0, but such an effect is very poor, because if the Hamiltonian corresponding to |ψ B > is H B (initial Hamiltonian), then |ψ B > cannot evolve to |ψ P > in one step. Therefore, a part of H can be mixed into H B and the proportion can be gradually increased over time. As the components of the two parts change over time, we obtain:

[0079]

[0080] where t changes starting from 0, t0 approaches 0, and t i approaches T. In this way, as long as the total time T is sufficiently large and the number of t values is sufficiently large, the component of |ψ P > in |ψ′ B > will always decrease slowly, further making <ψ′ P |ψ P >→1. Such a process is similar to slowly "annealing" from one state to another, so such an algorithm is called a quantum annealing algorithm. Around this type of algorithm, an important class of quantum computers that use physical fields to simulate the annealing process has emerged, namely quantum annealing machines. Quantum annealing machines can easily manufacture quantum chips with a huge number of qubits, but quantum annealing machines only have relatively good performance in a specific class of problems, and their application scenarios are difficult to expand, which led to the later more general-purpose quantum computers — gate-model quantum computers. However, in quantum circuits composed of quantum logic gates, directly preparing a corresponding quantum logic gate is relatively difficult, so a special decomposition is often required for simplification — Trotter decomposition:

[0081] exp(-i(A+B))|ψ>≈exp(-iA)exp(-iB)|ψ>

[0082] What is given above is the form of the first-order Trotter decomposition. If A and B commute, the approximate equal sign in the above formula becomes an equal sign, that is, exp(-i(A+B))|ψ>=exp(-iA)exp(-iB)|ψ>. If higher accuracy is desired, there are also other more Trotter decomposition forms such as second-order and third-order. Thus, the original:

[0083]

[0084] thereby:

[0085]

[0086] In the evolution of quantum annealing, the evolution path, i.e. t0…t i …t T The settings are important; whether they are set correctly will directly affect the final |ψ′. P The same effect can be achieved by adjusting the hyperparameters using a quantum approximation optimization algorithm.

[0087] See Figure 2 , Figure 2 A flowchart illustrating a method for predicting molecular crystal structures provided in this embodiment of the invention may include the following steps:

[0088] S201: Obtain the dipole energies between all molecules in the molecular crystal to be predicted, and convert all dipole energies into an objective function expressed using a combinatorial optimization method.

[0089] Specifically, for molecular crystals, a crystal containing only molecules is called a molecular crystal. The interior of a molecular crystal consists of a large number of molecules arranged periodically in a lattice, and the unit cell is the smallest unit characteristic of the crystal, determining its physical properties and the possible true three-dimensional structure. In molecular crystal structures, in addition to the most basic crystal constants and configurations, molecular orientation also affects the structure. The forces between molecules are called intermolecular forces, among which dipole interactions determine the orientation of each molecule in the crystal. In molecular crystals, the orientation of molecules also affects the properties of the unit cell. The possible true three-dimensional structure of the crystal can be predicted through calculations based on a given molecular dipole energy.

[0090] Obtaining the dipole energies between all molecules in the molecular crystal to be predicted can include:

[0091] 1. Determine the total number of molecules and the total number of molecular orientations in the molecular crystal to be predicted.

[0092] Specifically, the difficulty in calculating the energy of molecular crystals lies in the need to calculate the energy under a large number of different crystal structures, where the unit cell contains n molecules {x1, x2, ..., x...}. n Each molecule has k possible orientations {v1, v2, ..., v}. k}

[0093] 2. Determine the dipole energies between all molecules in the molecular crystal to be predicted based on the total number of molecules and the total number of molecular orientations.

[0094] Specifically, for very large molecules, due to their dipole interactions, they can be imagined as rod-shaped magnets fixed in certain positions. If there are many other similar magnets (molecules) around them, there will be attraction or repulsion between them, i.e., dipole forces, which in turn bring about intermolecular dipole energy. Here, dipole energy refers to the energy between any two molecules, which is influenced by many factors, including the properties of the molecules themselves, their position in the crystal, and the orientation of the two molecules. Since this consideration focuses on molecular crystal problems after the molecules and crystal forms have been determined, this application is most concerned with the influence of molecular orientation.

[0095] Suppose a molecular crystal unit cell contains n molecules, and each molecule has k different orientation possibilities. Then, there exists a total of n dipole energies between each pair of molecules. There are energies, and each energy is related to the orientation of the two corresponding molecules. Each energy has a k... 2 There are several possibilities. The properties are most stable when the total energy is at its lowest. Therefore, the question is to find a certain orientation in which every molecule among these n molecules is, and then calculate all the possible orientations at this point. The minimum value of the sum of the energies of the dipoles.

[0096] Based on the total number of molecules n and the total number of molecular orientations k of the molecular crystal to be predicted, the dipole energy between any two molecules in the molecular crystal can be obtained by reading, measuring or numerical calculation.

[0097] For example, consider a unit cell with 8 molecules. Each molecule can rotate freely in the x, y, and z axes. If each direction is discretized into 6 orientations, then a molecule has a total of 216 orientations. Even without considering molecular arrangement, unit cell arrangement, and relative rotation, there are 216 possible orientations. 8 The situation of dipole energy.

[0098] To transform all dipole energies into an objective function expressed using a combinatorial optimization method, we can include:

[0099] All dipole energies are preprocessed and then transformed into an objective function expressed using a combinatorial optimization method.

[0100] Specifically, given n molecules and k orientations for each type of molecule, the sum of all dipole energies can be calculated. If molecule i is in orientation a (x... i,a =1), molecule j is in the b orientation (x j,b =1), then the dipole energy between the two molecules is E. i,j,a,b =x i,a x j,b Ei ,j,a,bIf molecule i is not in orientation c, then x i,c =0, so the sum of the dipole energies between molecules i and j can be expressed as Then the sum of all dipole energies is... The objective function requires the variables... make Under the condition of satisfying the constraints The minimum value is given.

[0101] Among them, for variables The encoding can directly transform the corresponding vector into the corresponding quantum state. For example, the vector (1, 0, 0, 0, 1, 0, 0, 0, 1) is the quantum state |100010001>. Similarly, after obtaining the quantum state through measurement, it can also be directly transformed into the corresponding vector.

[0102] Specifically, the objective function is represented by the following combinatorial optimization method.

[0103]

[0104] Among them, the Describe the objective function, the Let i and j represent molecule numbers, e represent the set of all interacting molecules, a and b represent the orientation of the corresponding molecules, and E represent the set of all interacting molecules. i,j,a,b Let v represent the dipole energy when molecule i is at position a and molecule j is at position b, v represents the orientation number of the molecular crystal to be predicted, and k represents the total number of orientations of the molecular crystal to be predicted.

[0105] It should be noted that all dipole energy data can be converted into a multidimensional array format in Python for easier subsequent reading and processing. Notice that any dipole energy is affected by four parameters: the indices of the two corresponding molecules (denoted as i and j, representing the i-th and j-th molecules), the orientation of each molecule (denoted as a and b, representing molecule i at position a and molecule j at position b). Therefore, all dipole energy data can be stored in a four-dimensional array (tensor), i.e., E0. i,j,a,b .

[0106] For example, since the desired orientation is the molecular orientation when the sum of dipole energies is minimized, the specific magnitude of the dipole energy values ​​is not crucial, as long as the magnitude relationship is correct. In subsequent processing, due to quantum gate properties, the absolute value of the input value should not be too large or too small; therefore, it can be scaled while maintaining the magnitude relationship. Through empirical testing and partial calculations, it was found that by reading all dipole energies, the minimum value E of all dipole energies can be determined first. minGiven the dipole energy range ΔE, preprocess all dipole energies as follows: Subtract E from all dipole energies. min Then multiply the whole by 10 / ΔE, add 0.1, and finally take the logarithm as the new dipole energy index, thus controlling the numerical range between -3 and 3. Then, for n molecules, each with k orientations, the total... The dipole energy indices are arranged sequentially as a 4th-order tensor matrix E. i,j,a,b , represents the dipole energy when molecule i is at position a and molecule j is at position b.

[0107] S202: Determine the Hamiltonian of the molecular crystal structure to be predicted based on the objective function.

[0108] Specifically, determining the Hamiltonian of the molecular crystal to be predicted based on the objective function may include:

[0109] The variables of the objective function are replaced with Pauli operators to determine the Hamiltonian of the molecular crystal to be predicted.

[0110] Specifically, the variables of the objective function Using Pauli arithmetic operators The substitution is performed, and the Hamiltonian H of the molecular crystal to be predicted is expressed by the following formula. c :

[0111]

[0112] Wherein, I represents the identity matrix, and H... C The value represents the Hamiltonian of the molecular crystal to be predicted, where n represents the total number of molecules in the molecular crystal to be predicted, and Z represents the Pauli Z operator.

[0113] S203: Construct the target quantum circuit based on the Hamiltonian of the molecular crystal structure to be predicted.

[0114] Specifically, through the above steps, the prediction of molecular crystal structure is transformed into a mathematical problem, which is then transformed into a quantum algorithm problem. This can be further divided into two steps: variable encoding (encoding molecular orientation into mathematical variables and quantum states) and problem encoding (transforming the molecular crystal structure to be predicted into a mathematical function and a target quantum circuit). Constructing the target quantum circuit based on the Hamiltonian of the molecular crystal structure to be predicted can include:

[0115] Step 1: Obtain N qubits and set the initial state of all qubits to |0>, where N = n × k.

[0116] Specifically, for n molecules, each with k orientations, encoding them using n variables, each with k possible values, is most suitable. In quantum computing, this is equivalent to N-qubits. However, currently, both classical and quantum computing research primarily focuses on binary 0 / 1 bits / qubits. If using binary encoding, there are generally two choices: one-hot encoding and binary encoding. One-hot encoding represents each molecule using an N-dimensional vector, where only one value is 1 and the others are 0. The position of the 1 indicates the molecule's orientation. This method is very natural but requires a relatively large number of qubits. Binary encoding uses log₂N (rounded up) qubits, for example, the first position is 0001, the second is 0010, the third is 0011, and so on. This method has fewer bits, but the known quantum circuits are very complex. Mathematically, one-hot encoding can be expressed as x i,a =1 represents the numerator x i In the α orientation, x j,b =0 represents the numerator x j Not in the b orientation, because a molecule can only be oriented at one position, therefore That is, only one is 1, and the rest are 0. Similarly, in quantum computing, |00100...00> represents the molecule in the third position. For n molecules, each represented by k qubits, they can be directly concatenated.

[0117] Step 2: Construct the first quantum circuit to obtain the initial quantum state corresponding to the crystal structure of the molecule to be predicted.

[0118] Specifically, without prior knowledge of the final result, the initial quantum state should contain all feasible solutions with as little deviation as possible. That is, for each molecular crystal structure, it should be assumed that all orientations have an equal probability of occurrence. Therefore, the corresponding initial quantum state could be: Since the |W> state is a highly entangled quantum state, an additional first quantum circuit needs to be built to realize this quantum state starting from the |0> state. Currently, the construction of the first quantum circuit can be achieved through the following two schemes.

[0119] In the first implementation, N+1 qubits are required, meaning one additional bit, numbered q0, is needed as an auxiliary bit. From q1 to q... N Construct the |W> state. First, all qubits are in the initial state. Above. Connect the auxiliary bit q0 and the qubit qj through a two-bit quantum gate U. 0,j (θ j φj Constructing entanglement, that is:

[0120]

[0121] First, applying this to qubits q0 and q1, we get:

[0122] U 0,1 (θ j φ j )|00...00>=c1|00...00>+s1|00...00>

[0123] Subsequently, the second term is applied to qubits q0 and q2. Note that for q0 and q2, the second term behaves as |01>, therefore it has no effect. The final result is:

[0124] U 0,2 (θ2,φ2)U 0,1 (θ1,φ1)|00...00>=c1c2|00...00>+c1s2|1010...00>+s1|1100...00>

[0125] By continuing this process, we eventually arrive at:

[0126]

[0127] After discarding the auxiliary bit q0, the state to be obtained is Therefore, the first term must be 0, and the sum of each term in the second term must be equal, which is equal to the coefficient of the last term. Thus, we can obtain:

[0128] c1c2...c N-1 c N =0

[0129]

[0130] Solving And φ j =0, thus the construction of the |W> state can be achieved in the first scheme.

[0131] Optionally, in the second implementation scheme, a recursive approach is used to construct the |W> state. This involves dividing the N qubits into n qubit modules according to their qubit numbers, and generating the first quantum circuit within each qubit module using a pre-defined recursive operation. The pre-defined recursive operation is implemented using the following formula:

[0132]

[0133] in,

[0134] Specifically, define the operation Then it can be discovered recursively, simply by first checking |W n The first qubit is used as a Pauli X gate, and then it is used as a control bit to perform a Q-gate. n-1 This allows the quantum state to be transformed. And by setting c0 = sinφ, we only need to perform the revolving door operation RY(2φ) to restore it to the 0 state. Similarly, Q n-1 The implementation can be done by Q n-2 This process continues until n=2, at which point it becomes a Bell state. At this point, you can perform Pauli-X gate, CNOT gate, and H gate on it.

[0135] Step 3: Construct the first sub-quantum circuit corresponding to the Hamiltonian of the molecular crystal structure to be predicted, and the second sub-quantum circuit for extracting the result of the first sub-quantum circuit.

[0136] Specifically, the first sub-quantum circuit corresponding to the Hamiltonian of the molecular crystal structure to be predicted can be constructed by mathematically decomposing the Hamiltonian into combinations of unitary matrices or quantum logic gates, and then using the unitary matrices and quantum logic gates to construct the first sub-quantum circuit.

[0137] The role of the first sub-quantum circuit is to select an approximate optimal solution from the guessed solutions contained in the initial state. The initial quantum state constructed above covers all feasible solutions, but the first sub-quantum circuit cannot directly obtain them. Therefore, a second sub-quantum circuit is needed to extract the results of the first sub-quantum circuit.

[0138] For example, the second sub-quantum circuit could be a phase-separating circuit, which changes the phase of each state. However, the phase of a quantum state cannot be directly measured, so a mixer circuit is needed again. After the phase-separating layer, the quantum states corresponding to each feasible solution have a phase difference, requiring further filtering by a mixer circuit.

[0139] Step 4: Sequentially combine the first sub-quantum circuit and the second sub-quantum circuit into the second quantum circuit, and combine the first quantum circuit and a predetermined number of second quantum circuits into the target quantum circuit containing parameters.

[0140] For example, let's consider a second quantum circuit as a module of the target quantum circuit. Therefore, a preset number of second quantum circuits are combined to form the target quantum circuit. Obviously, the number of layers represents the depth of the circuit. The number of layers is given by humans. The deeper the layer, the closer to the final solution. However, for the target quantum circuit, at a certain scale, the number of optimization layers required increases with the scale, which means that the number of operation gates increases. This will also increase the error rate of operation, and even the influence of noise will offset the optimization effect brought by the increase of the number of layers.

[0141] S204: Run and measure the target quantum circuit to obtain the final quantum state with the minimum sum of the dipole energies of the molecular crystal to be predicted.

[0142] Specifically, the target quantum circuit is run and measured to obtain the final quantum state |ψ> that minimizes the sum of the dipole energies of the molecular crystal to be predicted.

[0143] S205: Determine the structure of the molecular crystal to be predicted based on the final quantum state.

[0144] Specifically, determining the structure of the molecular crystal to be predicted based on the final quantum state may include:

[0145] Based on the final quantum state, determine the expected value corresponding to the Hamiltonian, which is the energy of the system.

[0146] E(γ1,...γ) p ,β1,...β p )=<ψ|H c |ψ>

[0147] Here, p represents the preset number of second quantum circuits. The expected value can be used as an optimization criterion, and the optimization process may require the expected value to be as high or as low as possible, depending on the specific problem. For example, parameters can be obtained by measuring the target quantum circuit. Corresponding energy value The energy value and parameters are passed to the classic optimizer, which will then optimize the optimization based on the reduction... To select better parameters based on the optimization objective. The updated parameters are then fed into the quantum computer. After several iterations, the energy... By continuously optimizing, the algorithm gradually converges to its maximum or minimum value. Therefore, it is possible to find the (β, γ) value that maximizes or minimizes the objective function, where β = [β1, β2, ..., β]. p ]、γ=[γ1,γ2......γ p ].

[0148] The structure of the molecular crystal to be predicted is determined based on the expected value.

[0149] For example, by selecting p=2, randomly choosing a set of parameters, and running the target quantum circuit multiple times, the desired energy <ψ|H> of the quantum state is obtained. c |ψ>. Experimentally, the desired energy is the average value obtained by running the same target quantum circuit multiple times with fixed parameters γ and β and measuring the final quantum state. In simulation, it can be directly calculated using pyQpanda full-amplitude simulation.

[0150] Repeat the above steps, retaining the parameter with the highest expected energy. Based on the obtained parameters, use linear interpolation to obtain the target quantum circuit parameter p=3. Run the target quantum circuit multiple times to obtain the expected energy of the quantum state, and use a classical optimizer to optimize the circuit parameters γ and β until p is large enough. When p reaches the maximum value, during the optimization of the circuit parameters, record the state with the lowest energy during the expected process. The corresponding state is the most stable structure of the molecular crystal to be predicted.

[0151] As can be seen, this invention first obtains the dipole energies between all molecules in the molecular crystal to be predicted, and then converts all dipole energies into an objective function expressed using a combinatorial optimization method. Based on the objective function, the Hamiltonian of the molecular crystal structure to be predicted is determined. Based on the Hamiltonian of the molecular crystal structure to be predicted, a target quantum circuit is constructed. The target quantum circuit is run and measured to obtain the final quantum state that minimizes the sum of the dipole energies of the molecular crystal to be predicted. Based on the final quantum state, the structure of the molecular crystal to be predicted is determined. This invention proposes a quantum simulation implementation method that can solve the problem of predicting molecular crystal structure, thereby utilizing the correlation properties of quantum mechanics to improve computational speed and fill the gap in related technologies.

[0152] See Figure 3 , Figure 3 This is a schematic diagram of the structure of a molecular crystal structure prediction device provided in an embodiment of the present invention. Figure 2 The process shown can include:

[0153] The module 301 is used to obtain the dipole energies between all molecules in the molecular crystal to be predicted, and to convert all dipole energies into an objective function represented by a combinatorial optimization method.

[0154] The first determining module 302 is used to determine the Hamiltonian of the molecular crystal structure to be predicted based on the objective function.

[0155] Construction module 303 is used to construct the target quantum circuit based on the Hamiltonian of the molecular crystal structure to be predicted;

[0156] The running module 304 is used to run and measure the target quantum circuit to obtain the final quantum state with the minimum sum of the dipole energies of the molecular crystal to be predicted;

[0157] The second determining module 305 is used to determine the structure of the molecular crystal to be predicted based on the final quantum state.

[0158] Specifically, the obtaining module includes:

[0159] The first determining unit is used to determine the total number of molecules and the total number of molecular orientations of the molecular crystal to be predicted.

[0160] The second determining unit is used to determine the dipole energy between all molecules in the molecular crystal to be predicted based on the total number of molecules and the total number of molecular orientations of the molecular crystal to be predicted.

[0161] Specifically, the obtaining module includes:

[0162] The transformation unit is used to preprocess all the dipole energies and transform the preprocessed dipole energies into an objective function expressed using a combinatorial optimization method.

[0163] Specifically, the first determining module includes:

[0164] The third determining unit is used to replace the variables of the objective function with Pauli operators to determine the Hamiltonian of the molecular crystal to be predicted.

[0165] Specifically, the second determining module includes:

[0166] The fourth determining unit is used to determine the expected value corresponding to the Hamiltonian based on the final quantum state;

[0167] The fifth determining unit is used to determine the structure of the molecular crystal to be predicted based on the expected value.

[0168] Compared with existing technologies, this invention first obtains the dipole energies between all molecules in the molecular crystal to be predicted, and converts all dipole energies into an objective function expressed using a combinatorial optimization method. Based on the objective function, the Hamiltonian of the molecular crystal structure to be predicted is determined. Based on the Hamiltonian of the molecular crystal structure to be predicted, a target quantum circuit is constructed. The target quantum circuit is run and measured to obtain the final quantum state that minimizes the sum of the dipole energies of the molecular crystal to be predicted. Based on the final quantum state, the structure of the molecular crystal to be predicted is determined. This invention proposes a quantum simulation implementation method that can solve the problem of predicting molecular crystal structure, thereby utilizing the correlation properties of quantum mechanics to improve computational speed and fill the gap in related technologies.

[0169] This invention also provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the method embodiments described above when running.

[0170] Specifically, in this embodiment, the storage medium can be configured to store a computer program for performing the following steps:

[0171] S201: Obtain the dipole energies between all molecules in the molecular crystal to be predicted, and convert all dipole energies into an objective function represented by a combinatorial optimization method;

[0172] S202: Determine the Hamiltonian of the molecular crystal structure to be predicted based on the objective function;

[0173] S203: Construct the target quantum circuit based on the Hamiltonian of the molecular crystal structure to be predicted;

[0174] S204: Run and measure the target quantum circuit to obtain the final quantum state with the minimum sum of the dipole energies of the molecular crystal to be predicted;

[0175] S205: Determine the structure of the molecular crystal to be predicted based on the final quantum state.

[0176] Specifically, in this embodiment, the storage medium may include, but is not limited to, USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks, and other media capable of storing computer programs.

[0177] This invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the method embodiments described above.

[0178] Specifically, the aforementioned electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the aforementioned processor, and the input / output device is connected to the aforementioned processor.

[0179] Specifically, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0180] S201: Obtain the dipole energies between all molecules in the molecular crystal to be predicted, and convert all dipole energies into an objective function represented by a combinatorial optimization method;

[0181] S202: Determine the Hamiltonian of the molecular crystal structure to be predicted based on the objective function;

[0182] S203: Construct the target quantum circuit based on the Hamiltonian of the molecular crystal structure to be predicted;

[0183] S204: Run and measure the target quantum circuit to obtain the final quantum state with the minimum sum of the dipole energies of the molecular crystal to be predicted;

[0184] S205: Determine the structure of the molecular crystal to be predicted based on the final quantum state.

[0185] The above description, based on the embodiments shown in the figures, details the structure, features, and effects of the present invention. The above description is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the figures. Any changes made in accordance with the concept of the present invention, or equivalent embodiments modified to have equivalent changes, that do not exceed the spirit covered by the specification and figures, should be within the protection scope of the present invention.

Claims

1. A method for predicting molecular crystal structures, characterized in that, The method includes: The total number of molecules and the total number of molecular orientations in the molecular crystal to be predicted are determined. Based on the total number of molecules and the total number of molecular orientations in the molecular crystal to be predicted, the dipole energies between all molecules in the molecular crystal to be predicted are determined. All dipole energies are preprocessed and then transformed into an objective function expressed using a combinatorial optimization method. The objective function is expressed using the following combinatorial optimization method. : Among them, the Describe the objective function, the Represents variables, the and stated The number representing the molecule, the Represents the set of all interacting molecules, the and stated Indicates the orientation of the corresponding molecule, the Indicates molecule In ,molecular In The dipole energy at that time, the The orientation number of the molecular crystal to be predicted is indicated by the following: The total number of orientations of the molecular crystal to be predicted; Based on the objective function, determine the Hamiltonian of the molecular crystal structure to be predicted; Construct the target quantum circuit based on the Hamiltonian of the molecular crystal structure to be predicted. Run and measure the target quantum circuit to obtain the final quantum state with the minimum sum of the dipole energies of the molecular crystal to be predicted; The structure of the molecular crystal to be predicted is determined based on the final quantum state.

2. The method according to claim 1, characterized in that, The step of determining the Hamiltonian of the molecular crystal to be predicted based on the objective function includes: The variables of the objective function are replaced with Pauli operators to determine the Hamiltonian of the molecular crystal to be predicted.

3. The method according to claim 2, characterized in that, The step of replacing the variables of the objective function with Pauli operators to determine the Hamiltonian of the molecular crystal to be predicted includes: The variables of the objective function Using Pauli arithmetic operators The substitution is performed, and the Hamiltonian of the molecular crystal to be predicted is expressed by the following formula. : Among them, the Represents the identity matrix, the The Hamiltonian of the molecular crystal to be predicted is represented by the following. This represents the total number of molecules in the molecular crystal to be predicted. Pauli Operators.

4. The method according to any one of claims 1 to 3, characterized in that, Determining the structure of the molecular crystal to be predicted based on the final quantum state includes: Based on the final quantum state, determine the expected value corresponding to the Hamiltonian; The structure of the molecular crystal to be predicted is determined based on the expected value.

5. A device for predicting molecular crystal structures, characterized in that, The device includes: The module is used to determine the total number of molecules and the total number of molecular orientations of the molecular crystal to be predicted; based on the total number of molecules and the total number of molecular orientations of the molecular crystal to be predicted, it determines the dipole energy between all molecules in the molecular crystal to be predicted, preprocesses all the dipole energies, and transforms all the preprocessed dipole energies into an objective function expressed using a combinatorial optimization method; wherein, the objective function is expressed using the following combinatorial optimization method. : Among them, the Describe the objective function, the Represents variables, the and stated The number representing the molecule, the Represents the set of all interacting molecules, the and stated Indicates the orientation of the corresponding molecule, the Indicates molecule In ,molecular In The dipole energy at that time, the The orientation number of the molecular crystal to be predicted is indicated by the following: The total number of orientations of the molecular crystal to be predicted; The first determining module is used to determine the Hamiltonian of the molecular crystal structure to be predicted based on the objective function. A construction module is used to construct a target quantum circuit based on the Hamiltonian of the molecular crystal structure to be predicted. The operation module is used to run and measure the target quantum circuit to obtain the final quantum state with the minimum sum of the dipole energies of the molecular crystal to be predicted; The second determining module is used to determine the structure of the molecular crystal to be predicted based on the final quantum state.

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

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

Citation Information

Patent Citations

  • Method and device for simulating energy of target system based on quantum calculation and medium

    CN114492814A

  • Cost function deformation in quantum approximate optimization

    US20190164079A1