A method and device for predicting molecular properties

The complexity and accuracy of the prediction of molecular properties of drugs in the prior art are solved by converting molecular nodes and edges into high-dimensional characteristic vectors through quantum circuits, and faster and more accurate molecular properties prediction are achieved.

CN117877611BActive Publication Date: 2025-08-08ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211220100.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-30
Publication Date
2025-08-08
Estimated Expiration
2042-09-30

AI Technical Summary

Technical Problem

The prior art has problems in the prediction of drug molecular properties, high complexity of feature extraction and data processing, numerous parameters during training, and low prediction accuracy, making it difficult to effectively utilize the computing power and accuracy of quantum computing.

Method used

Quantum circuit is used to convert the molecular node eigenvectors and edge eigenvectors into high-dimensional eigenvectors, and input them into the trained molecular property prediction model through feature fusion. The parallel computing and entanglement characteristics of quantum computing are used to improve feature extraction efficiency and data processing accuracy.

Benefits of technology

It improves the calculation speed and accuracy of molecular properties prediction, reduces the complexity of the model, and enhances the accuracy and stability of the prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117877611B_ABST
    Figure CN117877611B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for predicting molecular properties. The method comprises: first obtaining a molecule to be predicted and determining graph data of the molecule to be predicted, constructing a target quantum circuit for feature vector optimization, using the target quantum circuit to convert the node feature vector and the edge feature vector of the molecule to be predicted into a high-dimensional feature vector, performing feature fusion on the high-dimensional feature vector to obtain a fused feature vector of the molecule to be predicted, inputting the fused feature vector of the molecule to be predicted into a trained molecular property prediction model to obtain a prediction result of the molecular property to be predicted. The method realizes the prediction of molecular properties through quantum circuits and utilizes the correlation characteristics of quantum to improve the calculation speed and calculation accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of quantum computing technology, and in particular to a method and device for predicting molecular properties. Background Art

[0002] Traditional methods for predicting the properties of drug molecules primarily rely on extracting molecular fingerprints or artificially designed features, which are then combined with machine learning algorithms. To capture the features required for the task at hand, these molecular representations inherently carry the biases of domain experts. To overcome this bias and adopt a more general approach, different types of machine learning algorithms have been introduced to the field of molecular property prediction. Due to the acceleration of computing power, the increasing availability of large datasets, and their significant success in related fields such as natural language processing and pattern recognition, deep learning algorithms have great potential. These different types of network models can automatically learn task-specific representations, thereby eliminating the complex feature extraction process. To use deep learning algorithms and avoid domain-specific feature engineering, it is necessary to find appropriate representations for molecules, which is where graph neural network methods have emerged.

[0003] The difficulties of using classical graph neural network models to predict drug molecular properties lie in the high complexity of feature extraction and data processing, the numerous parameters involved in training, and low prediction accuracy. Quantum computing, on the other hand, offers enormous potential in computational power. Compared to classical computers, it can process more information, enabling more efficient and accurate calculations. Currently, the question of how to use quantum technology to predict molecular properties is a pressing issue. Summary of the Invention

[0004] The purpose of the present invention is to provide a method and device for predicting molecular properties to address the deficiencies in the prior art. It uses quantum circuits to predict molecular properties and utilizes quantum correlation characteristics to improve calculation speed and accuracy.

[0005] One embodiment of the present application provides a method for predicting molecular properties, the method comprising:

[0006] Obtaining a molecule to be predicted and determining graph data of the molecule to be predicted, wherein the graph data includes node feature vectors and edge feature vectors of the molecule to be predicted;

[0007] Construct a target quantum circuit for eigenvector optimization;

[0008] Using the target quantum circuit, converting the node feature vector and the edge feature vector of the molecule to be predicted into a high-dimensional feature vector, and performing feature fusion on the high-dimensional feature vector to obtain a fused feature vector of the molecule to be predicted;

[0009] The fusion feature vector of the molecule to be predicted is input into the trained molecular property prediction model to obtain the prediction result of the molecular property to be predicted.

[0010] Optionally, obtaining the molecule to be predicted and determining the graph data of the molecule to be predicted includes:

[0011] A molecule to be predicted is obtained, atoms of the molecule to be predicted are converted into nodes of graph data, and chemical bonds of the molecule to be predicted are converted into edges of graph data, so as to obtain graph data of the molecule to be predicted.

[0012] Optionally, constructing a target quantum circuit for eigenvector optimization includes:

[0013] Obtain a set of quantum bits and set the initial state of the quantum bits to |0>;

[0014] Using a first type of quantum logic gate, construct a first sub-quantum circuit for mapping the graph data of the molecule to be predicted to the quantum bit superposition state;

[0015] Using the second type of quantum logic gate, a second sub-quantum circuit is constructed for optimizing the graph data of the molecule to be predicted;

[0016] Constructing a measurement subcircuit for extracting a feature vector of the optimized graph data of the molecule to be predicted;

[0017] A target quantum circuit for eigenvector optimization is obtained by utilizing the first sub-quantum circuit, the second sub-quantum circuit and the measurement sub-circuit.

[0018] Optionally, the obtaining of a target quantum circuit for eigenvector optimization by using the first sub-quantum circuit, the second sub-quantum circuit, and the measurement sub-circuit includes:

[0019] Combining the first sub-quantum circuit, the second sub-quantum circuit and the measurement sub-circuit in sequence to obtain a target quantum circuit, or

[0020] The first sub-quantum circuit, a preset number of the second sub-quantum circuits, and the measurement sub-circuit are sequentially combined to obtain a target quantum circuit, wherein the preset number is an integer greater than or equal to 2.

[0021] Optionally, the first type of quantum logic gate includes: a Hadamard quantum logic gate and a quantum rotation logic gate;

[0022] The second type of quantum logic gates include: CNOT quantum logic gates and quantum rotation logic gates.

[0023] Optionally, the step of converting the node feature vector and the edge feature vector of the molecule to be predicted into a high-dimensional feature vector by using the target quantum circuit includes:

[0024] Running and measuring the target quantum circuit to obtain a final quantum state of the target quantum circuit;

[0025] The final quantum state is converted into a high-dimensional feature vector.

[0026] Yet another embodiment of the present application provides a device for predicting molecular properties, the device comprising:

[0027] An acquisition module, configured to obtain a molecule to be predicted and determine graph data of the molecule to be predicted, wherein the graph data includes node feature vectors and edge feature vectors of the molecule to be predicted;

[0028] A building block for constructing a target quantum circuit for eigenvector optimization;

[0029] a conversion module, configured to convert the node feature vector and the edge feature vector of the molecule to be predicted into a high-dimensional feature vector by using the target quantum circuit, and perform feature fusion on the high-dimensional feature vector to obtain a fused feature vector of the molecule to be predicted;

[0030] The obtaining module is used to input the fusion feature vector of the molecule to be predicted into the trained molecular property prediction model to obtain the prediction result of the molecular property to be predicted.

[0031] Optionally, the obtaining module includes:

[0032] The obtaining unit is used to obtain the molecule to be predicted, convert the atoms of the molecule to be predicted into nodes of graph data, and convert the chemical bonds of the molecule to be predicted into edges of graph data to obtain the graph data of the molecule to be predicted.

[0033] Optionally, the building blocks include:

[0034] an acquisition unit, configured to acquire a group of quantum bits and set the initial state of the quantum bits to |0>;

[0035] A first construction unit is configured to construct, by using a first type of quantum logic gate, a first sub-quantum circuit for mapping the graph data of the molecule to be predicted to the quantum bit superposition state;

[0036] A second construction unit is configured to construct a second sub-quantum circuit for optimizing graph data of a molecule to be predicted using a second type of quantum logic gate;

[0037] A third construction unit is used to construct a measurement subcircuit for extracting a feature vector of the optimized graph data of the molecule to be predicted;

[0038] A combining unit is configured to obtain a target quantum circuit for eigenvector optimization by utilizing the first sub-quantum circuit, the second sub-quantum circuit, and the measurement sub-circuit.

[0039] Optionally, the combination unit includes:

[0040] a first combining sub-unit, configured to sequentially combine the first sub-quantum circuit, the second sub-quantum circuit, and the measurement sub-circuit to obtain a target quantum circuit, or

[0041] The second combining subunit is configured to sequentially combine the first sub-quantum circuit, a preset number of the second sub-quantum circuits, and the measurement sub-circuit to obtain a target quantum circuit, wherein the preset number is an integer greater than or equal to 2.

[0042] Optionally, the conversion module includes:

[0043] an operating unit, configured to operate and measure the target quantum circuit to obtain a final quantum state of the target quantum circuit;

[0044] A conversion unit is used to convert the final quantum state into a high-dimensional feature vector.

[0045] Yet another embodiment of the present application provides a storage medium storing a computer program, wherein the computer program is configured to implement any of the above methods when executed.

[0046] Yet another 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 implement any of the above methods.

[0047] Compared with the existing technology, the present invention first obtains the molecule to be predicted and determines the graph data of the molecule to be predicted, constructs a target quantum circuit for feature vector optimization, uses the target quantum circuit to convert the node feature vector and edge feature vector of the molecule to be predicted into a high-dimensional feature vector, and performs feature fusion on the high-dimensional feature vector to obtain a fused feature vector of the molecule to be predicted. The fused feature vector of the molecule to be predicted is input into a trained molecular property prediction model to obtain a prediction result of the molecular property to be predicted. It realizes the prediction of molecular properties through quantum circuits and utilizes the correlation characteristics of quantum to improve the calculation speed and calculation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 This is a hardware structure block diagram of a computer terminal for a method for predicting molecular properties provided by an embodiment of the present invention;

[0049] Figure 21 is a flow chart of a method for predicting molecular properties provided by an embodiment of the present invention;

[0050] Figure 3 This is a schematic diagram of a target quantum circuit provided by an embodiment of the present invention;

[0051] Figure 4 Schematic diagram of the structure of a device for predicting molecular properties provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0052] 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.

[0053] The embodiment of the present invention first provides a method for predicting molecular properties. The method can be applied to electronic devices, such as computer terminals, specifically ordinary computers, quantum computers, etc.

[0054] The following describes it in detail by taking running on a computer terminal as an example. Figure 1 The hardware structure block diagram of a computer terminal for a method of predicting molecular properties provided by an embodiment of the present invention. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data. Optionally, the computer terminal may also include a transmission device 106 for communication functions and an input and output device 108. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. For example, the computer terminal may also include Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0055] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / modules corresponding to the method for predicting molecular properties in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the above-mentioned method. The memory 104 may include a high-speed random access memory and may also include a 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 a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the computer terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.

[0056] The transmission device 106 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by a communications provider of a computer terminal. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0057] It's important to note that a true quantum computer has a hybrid architecture, consisting of two main components: a classical computer, responsible for performing classical computations and control, and a quantum device, responsible for running quantum programs and thus achieving quantum computations. A quantum program is a sequence of instructions written in a quantum language, such as QRunes, that can be executed on a quantum computer. This supports quantum logic gate operations and ultimately enables quantum computations. Specifically, a quantum program is a sequence of instructions that operate quantum logic gates in a specific time sequence.

[0058] In practical applications, due to the limitations of the development of quantum device hardware, quantum computing simulations are usually required to verify quantum algorithms, quantum applications, and the like. Quantum computing simulation is the process of simulating the operation of quantum programs corresponding to specific problems using a virtual architecture (i.e., a quantum virtual machine) built with the resources of an ordinary computer. Generally, it is necessary to construct a quantum program corresponding to a specific problem. The quantum program referred to in the embodiments of the present invention is a program written in a classical language to characterize quantum bits and their evolution, in which quantum bits, quantum logic gates, and the like related to quantum computing are represented by corresponding classical codes.

[0059] Quantum circuits, as a manifestation of quantum programs, also known as quantum logic circuits, are the most commonly used general quantum computing model. They represent circuits that operate on quantum bits in an abstract concept. They are composed of quantum bits, circuits (timelines), and various quantum logic gates. Finally, the results often need to be read out through quantum measurement operations.

[0060] Unlike traditional circuits, which are connected by metal wires to transmit voltage or current signals, in quantum circuits, the circuits can be seen as connected by time. In other words, the state of the quantum bit naturally evolves over time, following the instructions of the Hamiltonian operator until it encounters a logic gate and is operated.

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

[0062] 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, quantum logic gates are used to manipulate qubits. Quantum logic gates enable quantum states to evolve. They form the basis of quantum circuits. Quantum logic gates include single-bit quantum logic gates such as the Hadamard gate (H gate), Pauli-X gate (X gate), Pauli-Y gate (Y gate), Pauli-Z gate (Z gate), RX gate, RY gate, and RZ gate; and multi-bit quantum logic gates such as the CNOT gate, CR gate, iSWAP gate, and Toffoli gate. Quantum logic gates are generally represented using unitary matrices. Unitary matrices are not only a matrix form but also a type of operation and transformation. The effect of a quantum logic gate on a quantum state is typically calculated by multiplying the unitary matrix on the left by the matrix corresponding to the quantum state's right vector.

[0063] Those skilled in the art will understand that in classical computers, the basic unit of information is a bit, which has two states, 0 and 1. The most common physical implementation method is to represent these two states by the level of the voltage. In quantum computing, the basic unit of information is the quantum bit, which also has two states, 0 and 1, denoted as |0> and |1>. However, it can be in a superposition of the 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, which are not present in classical bits. After measurement, the state of the qubit collapses to a certain state (eigenstate, here |0> and |1> states), 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 symbol.

[0064] The quantum state, which refers to the state of a quantum bit, is generally described by a set of orthogonal and complete basis vectors. The commonly used computational basis is represented in binary in quantum algorithms (or quantum programs). For example, a set of quantum bits is q0, q1, q2, representing the 0th, 1st, and 2nd quantum bits, and the order from high to low is q2q1q0. The quantum state of this set of quantum bits is 2 3 The eight computational bases are: |000>, |001>, |010>, |011>, |100>, |101>, |110>, and |111>. Each computational basis corresponds to a qubit. For example, in the |000> state, 000 corresponds to q2q1q0 from the highest bit to the lowest bit. In short, a quantum state is a superposition of basis vectors. When the probability amplitude of the other bases is 0, it is in one of the basis vectors.

[0065] In quantum mechanics, all measurable mechanical quantities can be described by a Hermitian matrix. The definition of a Hermitian matrix is that the transpose conjugate of the matrix is the matrix itself, that is, Such a matrix is usually called a measurement operator. A non-zero operator will have at least one non-zero eigenvalue λ and a corresponding eigenstate |ψ>, satisfying H|ψ>=λ|ψ>. If the eigenvalue of the operator H corresponds to the energy level distribution of a system, then such an operator can also be called a Hamiltonian.

[0066] According to the time-dependent Schrödinger equation, the evolution from one state |ψ(t=0)> to another state |ψ(t=T)> is completed using the unitary operator, that is, U(0,T)|ψ(t=0)>=|ψ(t=T)>. The relationship between the Hamiltonian and the unitary operator is that if a quantum state evolves naturally in a certain system, the energy describing the system is the Hamiltonian, then the unitary operator can be written from the Hamiltonian:

[0067] When the system starts at time 0 and the Hamiltonian does not change with time, the unitary operator is U = exp(-iHt). In quantum computing in closed systems, all quantum operations except measurement can be described by a unitary matrix. The definition of a unitary matrix is that the transpose conjugate of the matrix is the inverse of the matrix, that is, Generally speaking, unitary operators are also called quantum logic gates in quantum computing.

[0068] In the quantum-classical hybrid graph neural network (QGNN), quantum circuits replace the graph node embedding layer in classical graph neural networks, mapping node features in molecular graph data into a high-dimensional Hilbert space. The data-parallel computing capabilities of quantum circuits and the properties of quantum entanglement improve the efficiency of feature extraction and data processing. The use of a quantum-classical hybrid algorithm can reduce the number of training parameters and lower model complexity.

[0069] For example, the features of each node in the molecular graph data can be first encoded into the quantum circuit, and then the node features can be extracted using the quantum circuit. The obtained graph data with new node features can be input into the convolutional layer and pooling layer of the classical graph neural network to extract the graph representation, and the prediction results can be output based on this representation. The regression loss function is then used to calculate the loss value of the output result, and the model parameters are optimized based on this value, which also includes the iterative optimization of the parameters in the quantum circuit. The molecular prediction accuracy and stability can be improved through continuous iterative optimization of the quantum-hybrid classical neural network model.

[0070] See also Figure 2 , Figure 2 A schematic flow chart of a method for predicting molecular properties provided in an embodiment of the present invention may include the following steps:

[0071] S201: Obtain a molecule to be predicted, and determine graph data of the molecule to be predicted, wherein the graph data includes node feature vectors and edge feature vectors of the molecule to be predicted.

[0072] Specifically, the molecule to be predicted can be considered as the molecular structure modeling for which the user wants to obtain molecular property results, such as the atomic type, chemical element bonds, number of atoms, atomic coordinates, charge and spin multiplicity that constitute the chemical molecule.

[0073] According to the obtained molecule to be predicted, the atoms of the molecule to be predicted are converted into nodes of graph data, and the chemical bonds of the molecule to be predicted are converted into edges of graph data to obtain the graph data of the molecule to be predicted. Among them, the node feature vector is a vector that characterizes the attributes of the node (i.e., the entity object), and the attribute is a feature that describes the node of the graph neural network. A graph neural network is a neural network that acts directly on a graph, and graph data is a data structure composed of nodes and edges, wherein a node refers to an entity object and an edge refers to the relationship between nodes. Each node in the graph neural network updates the state of the node by exchanging information with each other based on the information propagation mechanism. In some embodiments, the graph neural network model can obtain the prediction result of the node based on the current state of each node.

[0074] S202: Construct a target quantum circuit for eigenvector optimization.

[0075] Specifically, constructing a target quantum circuit for eigenvector optimization may include:

[0076] 1. Obtain a set of quantum bits and set the initial state of the quantum bits to |0>;

[0077] 2. Using a first type of quantum logic gate, construct a first sub-quantum circuit for mapping the graph data of the molecule to be predicted to the quantum bit superposition state;

[0078] 3. Using the second type of quantum logic gate, construct a second sub-quantum circuit for optimizing the graph data of the molecules to be predicted;

[0079] 4. Constructing a measurement subcircuit for extracting the feature vector of the optimized graph data of the molecule to be predicted;

[0080] 5. Using the first sub-quantum circuit, the second sub-quantum circuit, and the measurement sub-circuit, obtain a target quantum circuit for eigenvector optimization.

[0081] It should be noted that the first type of quantum logic gates include: Hadamard quantum logic gates (H gates) and quantum rotation logic gates; the second type of quantum logic gates include: CNOT quantum logic gates and quantum rotation logic gates.

[0082] Wherein, obtaining a target quantum circuit for eigenvector optimization using the first sub-quantum circuit, the second sub-quantum circuit, and the measurement sub-circuit may include:

[0083] The first sub-quantum circuit, the second sub-quantum circuit, and the measurement sub-circuit are sequentially combined to obtain a target quantum circuit, or the first sub-quantum circuit, a preset number of the second sub-quantum circuits, and the measurement sub-circuit are sequentially combined to obtain a target quantum circuit, wherein the preset number is an integer greater than or equal to 2.

[0084] For example, see Figure 3 , Figure 3 A schematic diagram of a target quantum circuit provided by an embodiment of the present invention, wherein 9 quantum bits are obtained and the initial states of all quantum bits are set to |0>, which are quantum bits q[0]-q[8], respectively. In the first sub-quantum circuit ( Figure 3 The solid line part) mainly uses the H gate and RY gate. First, the H gate is used to act on the initial state of the quantum bit. , transforming it into a superposition state Then the classic graph node data x i =[a0, a0, ..., a7, a8] as quantum gate parameters, in the form of RY(a j ), where j = 0, 1, ..., 7, 8, are quantized and mapped to the quantum bits of the superposition state. In the second quantum circuit of a layer ( Figure 3 Two quantum gate operations are used in the circuit (shown in the dashed box): the CNOT gate and the RY gate. The CNOT gate's primary function is to achieve quantum entanglement, enabling information exchange and transmission between qubits. After achieving multiple cross-qubit entanglements, a parameterized RY(θ) gate is introduced into the circuit. By iteratively optimizing the rotation angle parameter θ, the target quantum circuit is optimized to learn more effective node feature encoding. This layer can be stacked multiple times to increase depth and find a more optimal circuit model, depending on the circuit structure and task requirements. The measurement output layer is the final layer of the target quantum circuit, responsible for decohering the qubits and converting quantum data into classical data.

[0085] S203: Using the target quantum circuit, converting the node feature vector and the edge feature vector of the molecule to be predicted into a high-dimensional feature vector, and performing feature fusion on the high-dimensional feature vector to obtain a fused feature vector of the molecule to be predicted.

[0086] Specifically, using the target quantum circuit to convert the node feature vector and the edge feature vector of the molecule to be predicted into a high-dimensional feature vector may include:

[0087] The target quantum circuit is run and measured to obtain a final quantum state of the target quantum circuit; and the final quantum state is converted into a high-dimensional feature vector.

[0088] For example, using the target quantum circuit, first, input each node of the graph data of the molecule to be predicted The node feature coding vector is obtained by feature coding the target quantum circuit (quantum variation circuit VQC) Where n is the number of single node features, for example, n = 9, and then the obtained feature vectors are fused to generate the node encoding feature matrix Taking the water molecule H2O as an example, the molecule contains 3 atomic nodes and 2 edges (chemical bonds). The smiles2graph library can be used to convert the molecular data into an edge feature vector E and a node feature vector The graph data. The feature vectors of each atomic node in the graph data After VQC feature encoding, the new node feature encoding vector is output Then, they are spliced into new node features. Figure 3 In the example shown, in the encoding process, since the single node feature number n=9 in this model, the quantum circuit is composed of 9 quantum bits, and the Pauli Z measurement expectation value of each quantum bit is used as the output, so the feature code x′ of each node is output i is a 9-dimensional vector.

[0089] S204: Inputting the fusion feature vector of the molecule to be predicted into the trained molecular property prediction model to obtain a prediction result of the molecular property to be predicted.

[0090] Specifically, after obtaining the fused feature vector of the molecule to be predicted, the fused feature vector can be input into a pre-trained molecular property prediction model to obtain a prediction result for the molecular property to be predicted. The molecular property prediction model can be trained using a machine learning model such as a neural network, and this embodiment does not specifically limit this.

[0091] For example, the prediction of molecular properties may include: extracting features of the molecules to be predicted, constructing feature vectors and adjacency matrices, converting molecular images into digital vectors with atomic information, chemical bond information, and molecular structure information, constructing an image convolution layer, inputting the obtained feature vectors and image adjacency matrix to obtain the convolved feature vectors; constructing a pooling layer, pooling the feature vectors of the molecules, and extracting the molecular feature vectors. For example, the feature vector x′ after encoding each node can be i Spliced together to form the node feature matrix The adjacency matrix A represents the connections between each node and its surrounding nodes. It, along with the node feature matrix X, serves as the input to the graph convolution layer. The graph convolution layer aggregates and transfers node and edge information using the feature matrix X and the adjacency matrix A, ultimately learning node representations. The graph convolutional neural network in this model consists of L graph convolutional layers, each of which generates a representation of the central node in the current layer by aggregating the representations of adjacent nodes in the previous layer:

[0092] Z l+1 =A′X l W l ,X l+1 =σ(Z l+1 )

[0093] in, Represents the representation of N nodes in the first layer, and there is X 0 =X, A′ is the normalized and standardized adjacency matrix of A, is the weight matrix, that is, the parameters to be trained. For simplicity, we can assume that the representation dimensions of all layers are the same, that is, F1=…=F L =F. The activation function σ can usually be set according to user needs.

[0094] Finally, after obtaining the node representation through multi-layer graph convolution operations, it is necessary to perform graph pooling (graph pooling), or graph readout, on the representation of each node on the graph to obtain a graph representation node Finally, based on the graph representation g, the predicted value is output through the fully connected neural network layer

[0095] For loss calculation, you can choose different loss functions according to the task type. If it is a classification task, you can choose the cross entropy loss function H(p,q), which is calculated as follows:

[0096]

[0097] Here, the probability distribution p(x) is the expected output, i.e., the label of the dataset, and the probability distribution q(x) is the actual output, i.e., the probability value generated by the model based on the input data. The smaller the cross entropy loss, the closer the probability distribution q(x) of the actual output is to the probability distribution p(x) of the expected output.

[0098] For regression tasks, the mean square error loss function Loss can be selected, and its calculation formula is as follows:

[0099]

[0100] Among them, y i is the data label value, f θ (x i ) is the model output value. The closer the two values are, the smaller the loss value and the better the model performance. To optimize the model parameters, you can use the Adam gradient update algorithm with a learning rate of 0.001.

[0101] It can be seen that the present invention first obtains the molecule to be predicted and determines the graph data of the molecule to be predicted, constructs a target quantum circuit for feature vector optimization, uses the target quantum circuit to convert the node feature vector and edge feature vector of the molecule to be predicted into a high-dimensional feature vector, and performs feature fusion on the high-dimensional feature vector to obtain a fused feature vector of the molecule to be predicted. The fused feature vector of the molecule to be predicted is input into a trained molecular property prediction model to obtain a prediction result of the molecular property to be predicted. It realizes the prediction of molecular properties through quantum circuits and utilizes the correlation characteristics of quantum to improve the calculation speed and calculation accuracy.

[0102] See also Figure 4 , Figure 4 A schematic diagram of a device for predicting molecular properties provided by an embodiment of the present invention, and Figure 2 The process shown in the figure may include:

[0103] An acquisition module 401 is used to obtain a molecule to be predicted and determine graph data of the molecule to be predicted, wherein the graph data includes node feature vectors and edge feature vectors of the molecule to be predicted;

[0104] A construction module 402 is used to construct a target quantum circuit for eigenvector optimization;

[0105] a conversion module 403 for converting the node feature vector and the edge feature vector of the molecule to be predicted into a high-dimensional feature vector using the target quantum circuit, and performing feature fusion on the high-dimensional feature vector to obtain a fused feature vector of the molecule to be predicted;

[0106] The obtaining module 404 is used to input the fusion feature vector of the molecule to be predicted into the trained molecular property prediction model to obtain the prediction result of the molecular property to be predicted.

[0107] Specifically, the acquisition module includes:

[0108] The obtaining unit is used to obtain the molecule to be predicted, convert the atoms of the molecule to be predicted into nodes of graph data, and convert the chemical bonds of the molecule to be predicted into edges of graph data to obtain the graph data of the molecule to be predicted.

[0109] Specifically, the building blocks include:

[0110] an acquisition unit, configured to acquire a group of quantum bits and set the initial state of the quantum bits to |0>;

[0111] A first construction unit is configured to construct, by using a first type of quantum logic gate, a first sub-quantum circuit for mapping the graph data of the molecule to be predicted to the quantum bit superposition state;

[0112] A second construction unit is configured to construct a second sub-quantum circuit for optimizing graph data of a molecule to be predicted using a second type of quantum logic gate;

[0113] A third construction unit is used to construct a measurement subcircuit for extracting a feature vector of the optimized graph data of the molecule to be predicted;

[0114] A combining unit is configured to obtain a target quantum circuit for eigenvector optimization by utilizing the first sub-quantum circuit, the second sub-quantum circuit, and the measurement sub-circuit.

[0115] Specifically, the combination unit includes:

[0116] a first combining sub-unit, configured to sequentially combine the first sub-quantum circuit, the second sub-quantum circuit, and the measurement sub-circuit to obtain a target quantum circuit, or

[0117] The second combining subunit is configured to sequentially combine the first sub-quantum circuit, a preset number of the second sub-quantum circuits, and the measurement sub-circuit to obtain a target quantum circuit, wherein the preset number is an integer greater than or equal to 2.

[0118] Specifically, the conversion module includes:

[0119] an operating unit, configured to operate and measure the target quantum circuit to obtain a final quantum state of the target quantum circuit;

[0120] A conversion unit is used to convert the final quantum state into a high-dimensional feature vector.

[0121] Compared with the existing technology, the present invention first obtains the molecule to be predicted and determines the graph data of the molecule to be predicted, constructs a target quantum circuit for feature vector optimization, uses the target quantum circuit to convert the node feature vector and edge feature vector of the molecule to be predicted into a high-dimensional feature vector, and performs feature fusion on the high-dimensional feature vector to obtain a fused feature vector of the molecule to be predicted. The fused feature vector of the molecule to be predicted is input into a trained molecular property prediction model to obtain a prediction result of the molecular property to be predicted. It realizes the prediction of molecular properties through quantum circuits and utilizes the correlation characteristics of quantum to improve the calculation speed and calculation accuracy.

[0122] An embodiment of the present invention further provides a storage medium storing a computer program, wherein the computer program is configured to implement the steps of any of the above method embodiments when running.

[0123] Specifically, in this embodiment, the above-mentioned storage medium may be configured to store a computer program for implementing the following steps:

[0124] S201: obtaining a molecule to be predicted, and determining graph data of the molecule to be predicted, wherein the graph data includes node feature vectors and edge feature vectors of the molecule to be predicted;

[0125] S202: Construct a target quantum circuit for eigenvector optimization;

[0126] S203: using the target quantum circuit, converting the node feature vector and the edge feature vector of the molecule to be predicted into a high-dimensional feature vector, and performing feature fusion on the high-dimensional feature vector to obtain a fused feature vector of the molecule to be predicted;

[0127] S204: Inputting the fusion feature vector of the molecule to be predicted into the trained molecular property prediction model to obtain a prediction result of the molecular property to be predicted.

[0128] 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.

[0129] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to implement the steps in any of the above method embodiments.

[0130] 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.

[0131] Specifically, in this embodiment, the processor may be configured to implement the following steps through a computer program:

[0132] S201: obtaining a molecule to be predicted, and determining graph data of the molecule to be predicted, wherein the graph data includes node feature vectors and edge feature vectors of the molecule to be predicted;

[0133] S202: Construct a target quantum circuit for eigenvector optimization;

[0134] S203: using the target quantum circuit, converting the node feature vector and the edge feature vector of the molecule to be predicted into a high-dimensional feature vector, and performing feature fusion on the high-dimensional feature vector to obtain a fused feature vector of the molecule to be predicted;

[0135] S204: Inputting the fusion feature vector of the molecule to be predicted into the trained molecular property prediction model to obtain a prediction result of the molecular property to be predicted.

[0136] 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 predicting molecular properties, characterized in that The method comprises: Obtaining a molecule to be predicted and determining graph data of the molecule to be predicted, wherein the graph data includes node feature vectors and edge feature vectors of the molecule to be predicted; Construct a target quantum circuit for eigenvector optimization; Using the target quantum circuit, converting the node feature vector and the edge feature vector of the molecule to be predicted into a high-dimensional feature vector, and performing feature fusion on the high-dimensional feature vector to obtain a fused feature vector of the molecule to be predicted; Inputting the fusion feature vector of the molecule to be predicted into the trained molecular property prediction model to obtain a prediction result of the molecular property to be predicted; The step of constructing a target quantum circuit for eigenvector optimization includes: A group of quantum bits is obtained and the initial state of the quantum bits is set to |0>; a first sub-quantum circuit is constructed using a first type of quantum logic gate to map the graph data of the molecule to be predicted to the superposition state of the quantum bits; a second sub-quantum circuit is constructed using a second type of quantum logic gate to optimize the graph data of the molecule to be predicted; a measurement sub-circuit is constructed to extract a characteristic vector of the optimized graph data of the molecule to be predicted; and a target quantum circuit for characteristic vector optimization is obtained using the first sub-quantum circuit, the second sub-quantum circuit, and the measurement sub-circuit.

2. The method according to claim 1, characterized in that The step of obtaining the molecule to be predicted and determining the graph data of the molecule to be predicted comprises: A molecule to be predicted is obtained, atoms of the molecule to be predicted are converted into nodes of graph data, and chemical bonds of the molecule to be predicted are converted into edges of graph data, so as to obtain graph data of the molecule to be predicted.

3. The method according to claim 1, characterized in that The step of obtaining a target quantum circuit for eigenvector optimization by utilizing the first sub-quantum circuit, the second sub-quantum circuit, and the measurement sub-circuit comprises: Combining the first sub-quantum circuit, the second sub-quantum circuit and the measurement sub-circuit in sequence to obtain a target quantum circuit, or The first sub-quantum circuit, a preset number of the second sub-quantum circuits, and the measurement sub-circuit are sequentially combined to obtain a target quantum circuit, wherein the preset number is an integer greater than or equal to 2.

4. The method according to claim 1 or 3, characterized in that The first type of quantum logic gates include: Hadamard quantum logic gates and quantum rotation logic gates; The second type of quantum logic gates include: CNOT quantum logic gates and quantum rotation logic gates.

5. The method according to claim 1, wherein The step of converting the node feature vector and the edge feature vector of the molecule to be predicted into a high-dimensional feature vector by using the target quantum circuit includes: Running and measuring the target quantum circuit to obtain a final quantum state of the target quantum circuit; The final quantum state is converted into a high-dimensional feature vector.

6. A device for predicting molecular properties, characterized in that The device comprises: An acquisition module, configured to obtain a molecule to be predicted and determine graph data of the molecule to be predicted, wherein the graph data includes node feature vectors and edge feature vectors of the molecule to be predicted; A building block for constructing a target quantum circuit for eigenvector optimization; a conversion module, configured to convert the node feature vector and the edge feature vector of the molecule to be predicted into a high-dimensional feature vector by using the target quantum circuit, and perform feature fusion on the high-dimensional feature vector to obtain a fused feature vector of the molecule to be predicted; An obtaining module is used to input the fusion feature vector of the molecule to be predicted into the trained molecular property prediction model to obtain a prediction result of the molecular property to be predicted; The construction module is further configured to: obtain a group of quantum bits and set the initial state of the quantum bits to |0>; construct a first sub-quantum circuit for mapping the graph data of the molecule to be predicted to the superposition state of the quantum bits using a first type of quantum logic gate; construct a second sub-quantum circuit for optimizing the graph data of the molecule to be predicted using a second type of quantum logic gate; construct a measurement sub-circuit for extracting a characteristic vector of the optimized graph data of the molecule to be predicted; and obtain a target quantum circuit for characteristic vector optimization using the first sub-quantum circuit, the second sub-quantum circuit, and the measurement sub-circuit.

7. The device according to claim 6, characterized in that The acquisition module includes: The obtaining unit is used to obtain the molecule to be predicted, convert the atoms of the molecule to be predicted into nodes of graph data, and convert the chemical bonds of the molecule to be predicted into edges of graph data to obtain the graph data of the molecule to be predicted.

8. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to implement the method according to any one of claims 1 to 5 when executed.

9. 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 execute the computer program to implement the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method for predicting properties of chemical molecules based on quantum graph neural network

    CN114550849A

  • Binding energy prediction method based on quantum GNN

    CN114974405A