A quantum simulation method and device for obtaining intermolecular pairing mode

CN117454995BActive Publication Date: 2026-10-20ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210850157.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-19
Publication Date
2026-10-20
Estimated Expiration
2042-07-19

AI Technical Summary

Technical Problem

但是由于药物分子配对过程中的候选化学空间十分庞大,现有的经典计算机难以有效解决

Benefits of technology

[0021]与现有技术相比,本发明首先制备包含待模拟分子间配对方式对应的初始量子态,并确定待模拟分子间配对方式对应的哈密顿量,根据初始量子态以及待模拟分子间配对方式对应的哈密顿量,构造目标量子线路,运行并测量目标量子线路,获得包含待模拟分子间配对方式的最终量子态,最后根据最终量子态,确定待模拟分子间的最优配对方式,它通过提出了一种可以解决分子配对问题的量子模拟实现方式,以利用量子的相关特性,提高计算速度,并填补了相关技术的空白。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117454995B_ABST
    Figure CN117454995B_ABST
Patent Text Reader

Abstract

The application discloses a kind of quantum simulation method and device of intermolecular pairing mode, method includes: first, preparation includes the initial quantum state corresponding to the intermolecular pairing mode to be simulated, and determine the Hamiltonian corresponding to the intermolecular pairing mode to be simulated, according to initial quantum state and the Hamiltonian corresponding to the intermolecular pairing mode to be simulated, construct target quantum circuit, run and measure target quantum circuit, obtain the final quantum state including the intermolecular pairing mode to be simulated, finally, according to final quantum state, determine the optimal pairing mode between the intermolecular, it is by proposing a kind of quantum simulation implementation mode that can solve molecular pairing problem, to utilize the relevant characteristics of quantum, improve computing speed, and fill the gap of relevant technology.
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, and in particular to a quantum simulation method and apparatus for obtaining intermolecular pairing patterns. Background Technology

[0002] Molecular docking is a crucial method in computer-aided drug design. By studying intermolecular interactions, it can predict the optimal pairing of molecules. Its basic principle is to search for all possible molecular pairings and then select the optimal solution by scoring each pairing, classifying it as a combinatorial optimization problem. However, due to the vast candidate chemical space involved in drug molecule pairing, existing classical computers struggle to solve it effectively.

[0003] Quantum computers have attracted significant attention from academia and industry in recent years due to their immense potential in simulating molecular or atomic systems and solving complex combinatorial optimization problems—problems that classical computers struggle with. Several large pharmaceutical companies internationally have begun exploring applications of quantum computers in related fields, and researchers are using quantum algorithms such as Gaussian boson sampling and quantum annealing to solve these problems. However, research based on more general-purpose quantum computers is still in its very early exploratory stages. Therefore, proposing a quantum simulation method to solve molecular pairing problems is a pressing issue that needs to be addressed. Summary of the Invention

[0004] The purpose of this invention is to provide a quantum simulation method and apparatus for obtaining intermolecular pairing patterns, thereby overcoming the shortcomings of existing technologies. It proposes a quantum simulation implementation method that can solve the molecular pairing problem, utilizing the correlation properties of quantum mechanics to improve computational speed and fill the gaps in related technologies.

[0005] One embodiment of this application provides a quantum simulation method for obtaining intermolecular pairing patterns, the method comprising:

[0006] Prepare an initial quantum state containing the intermolecular pairing mode to be simulated, and determine the Hamiltonian corresponding to the intermolecular pairing mode to be simulated; Construct the target quantum circuit based on the initial quantum state and the Hamiltonian corresponding to the intermolecular pairing mode to be simulated; Run and measure the target quantum circuit to obtain the final quantum state containing the intermolecular pairing mode to be simulated; Based on the final quantum state, the optimal pairing method between the molecules to be simulated is determined.

[0007] Optionally, the preparation includes the initial quantum state corresponding to the intermolecular pairing mode to be simulated, comprising: Obtained by One receptor and The molecule to be simulated consists of ligands, and all pairing modes of the molecule to be simulated are determined; Based on all pairing patterns of the molecule to be simulated, obtain 1 qubit and set the initial state of all said qubits to 0. , wherein ; By using preset quantum logic gates and preset interaction relationships, an initial quantum state corresponding to the pairing mode between molecules to be simulated is generated.

[0008] Optionally, the preset quantum logic gates include: U-gates, SWAP gates, and Pauli-X gates; the preset interaction relations are formed in the following ways: Will Each qubit is divided into qubit numbers. One quantum bit module; The first qubit in each qubit module to the last qubit in the same qubit module are sequentially used as the current qubit. The U gate and the SWAP gate are applied sequentially on the current qubit and the next qubit of the current qubit. The Pauli-X gate is applied on the next qubit of each qubit module.

[0009] Optionally, determining the Hamiltonian corresponding to the intermolecular pairing mode to be simulated includes: Obtain the pre-selected scoring function; Using the scoring function, obtain the pairing score corresponding to each pairing method; Based on the pairing fraction, the Hamiltonian corresponding to the pairing mode of the molecules to be simulated is determined.

[0010] Optionally, determining the Hamiltonian corresponding to the pairing mode of the molecules to be simulated based on the pairing fraction includes: The Hamiltonian corresponding to the intermolecular pairing mode to be simulated is determined by the following formula. :

[0011] Among them, the The Hamiltonian represents the intermolecular pairing mode to be simulated. Represents a receptor, the Represents the ligand, the Represents the pairing score, the Receptor With ligands The combination of, the This indicates a penalty.

[0012] Optionally, constructing the target quantum circuit based on the initial quantum state and the Hamiltonian corresponding to the intermolecular pairing mode to be simulated includes: Based on the initial quantum state, a first sub-quantum circuit corresponding to the Hamiltonian is constructed, and a second sub-quantum circuit for measuring the first sub-quantum circuit is constructed. The first sub-quantum circuit and the second sub-quantum circuit are sequentially combined to form the first quantum circuit, and a predetermined number of the first quantum circuits are combined to form the target quantum circuit.

[0013] Optionally, determining the optimal pairing method between the molecules to be simulated based on the final quantum state includes: Based on the final quantum state, determine the expected value corresponding to the Hamiltonian; Based on the expected value, the optimal pairing method between the molecules to be simulated is determined.

[0014] Another embodiment of this application provides a quantum simulation device for obtaining intermolecular pairing patterns, the device comprising: The preparation module is used to prepare an initial quantum state containing the intermolecular pairing mode to be simulated, and to determine the Hamiltonian corresponding to the intermolecular pairing mode to be simulated. A construction module is used to construct the target quantum circuit based on the initial quantum state and the Hamiltonian corresponding to the intermolecular pairing method to be simulated; The running module is used to run and measure the target quantum circuit to obtain the final quantum state containing the intermolecular pairing mode to be simulated; The determination module is used to determine the optimal pairing method between the molecules to be simulated based on the final quantum state.

[0015] Optionally, the preparation module includes: The first obtaining unit is used to obtain from One receptor and The molecule to be simulated consists of ligands, and all pairing modes of the molecule to be simulated are determined; The second obtaining unit is used to obtain, based on all pairing methods of the molecule to be simulated, 1 qubit and set the initial state of all said qubits to 0. , wherein ; The generation unit is used to generate an initial quantum state containing the pairing mode between molecules to be simulated, using preset quantum logic gates and preset interaction relationships.

[0016] Optionally, the preparation module includes: The third acquisition unit is used to obtain the pre-selected scoring function; The fourth obtaining unit is used to obtain the pairing score corresponding to each pairing method using the scoring function; The first determining unit is used to determine the Hamiltonian corresponding to the pairing mode between molecules to be simulated based on the pairing fraction.

[0017] Optionally, the construction module includes: A construction unit is used to construct a first sub-quantum circuit corresponding to the Hamiltonian based on the initial quantum state, and a second sub-quantum circuit for measuring the first sub-quantum circuit; The combination unit is used to sequentially combine the first sub-quantum circuit and the second sub-quantum circuit into a first quantum circuit, and to combine a preset number of the first quantum circuits into a target quantum circuit.

[0018] Optionally, the determining module includes: The second determining unit is used to determine the expected value corresponding to the Hamiltonian based on the final quantum state; The third determining unit is used to determine the optimal pairing method between the molecules to be simulated based on the expected value.

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

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

[0021] Compared with existing technologies, this invention first prepares an initial quantum state containing the pairing mode of the molecules to be simulated, and determines the Hamiltonian corresponding to the pairing mode. Based on the initial quantum state and the Hamiltonian corresponding to the pairing mode, a target quantum circuit is constructed, the target quantum circuit is run and measured to obtain a final quantum state containing the pairing mode of the molecules to be simulated. Finally, based on the final quantum state, the optimal pairing mode between the molecules to be simulated is determined. It proposes a quantum simulation implementation method that can solve the molecular pairing problem, utilizes the correlation properties of quantum mechanics, improves the computation speed, and fills the gap in related technologies. Attached Figure Description

[0022] Figure 1 This is a hardware structure block diagram of a computer terminal for a quantum simulation method of obtaining intermolecular pairing patterns provided in an embodiment of the present invention; Figure 2This is a schematic flowchart of a quantum simulation method for obtaining intermolecular pairing patterns provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of a quantum circuit corresponding to a U-gate provided in an embodiment of the present invention; Figure 4 A schematic diagram of a quantum circuit generated according to a preset interaction relationship is provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a quantum simulation device for obtaining intermolecular pairing modes provided in an embodiment of the present invention. Detailed Implementation

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

[0024] The present invention first provides a method for obtaining a quantum simulation method for intermolecular pairing, which can be applied to electronic devices, such as computer terminals, specifically ordinary computers, quantum computers, etc.

[0025] The following detailed explanation uses a computer terminal as an example. Figure 1 This is a hardware structure block diagram of a computer terminal for a quantum simulation method of obtaining intermolecular pairing patterns, provided as 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.

[0026] The memory 104 can be used to store software programs and modules for application software, such as the program instructions / modules corresponding to the quantum simulation method for obtaining intermolecular pairing patterns 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.

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

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

[0029] In practical applications, due to limitations in the development of quantum device hardware, quantum computing simulations are typically 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 conventional 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, where qubits, quantum logic gates, etc., related to quantum computing all have corresponding classical code representations.

[0030] Quantum circuits, also known as quantum logic circuits, are a manifestation of quantum programming and are the most commonly 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.

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

[0032] A quantum program corresponds to a total quantum circuit. The quantum program described in this invention refers to this total quantum circuit, wherein the total number of qubits in the total 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 quantum circuit can contain dozens, hundreds, or even thousands of quantum logic gate operations. The execution process of a quantum program is the process of executing all the quantum logic gates in a certain timing order. It should be noted that the timing order refers to the chronological order in which individual quantum logic gates are executed.

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

[0034] 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 qubit(s). and However, it can exist in a superposition of 0 and 1 states, which can be represented as Where a and b represent state, The state amplitude (probability amplitude) is a complex number, which is not a characteristic of classical bits. After measurement, the state of a quantum bit collapses to a definite state (eigenstate, here ). state, (state), in which, collapsed to The probability is Collapsed to The probability is , , This is the Dirac symbol.

[0035] 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 in quantum algorithms (or quantum programs) is represented in binary. 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, has a quantum state of 2q1q ... 3 The superposition of 8 computational bases, where 8 computational bases refer to: , , , , , , , Each computational basis corresponds to a quantum bit, such as The state 000 corresponds to q2q1q0 from the high bit to the low bit. In short, a quantum state is a superposition of basis vectors. When the probability amplitude of other basis vectors is 0, it is in one of the specific basis vectors.

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

[0037] Such matrices are usually called measurement operators; non-zero operators will have at least one non-zero eigenvalue. and the corresponding eigenstates :

[0038] If the operator The eigenvalues ​​of an operator correspond to the energy level distribution of a system, and such an operator can also be called a Hamiltonian.

[0039] According to the time-dependent Schrödinger equation, from a state It begins to evolve into another state It was accomplished using the unitary operator:

[0040] 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:

[0041] When the system starts at time 0 and the Hamiltonian does not change over time, the unitary operator is... .

[0042] 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:

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

[0044] In some cases, we need to start from the initial Hamiltonian. ground state To begin, search for a specific Hamiltonian. The lowest energy level eigenstate (ground state) However, by directly using this Hamiltonian for evolution, we can only obtain...

[0045] in, ,but Includes a part The components, that is, their inner product However, this method is ineffective because if The corresponding Hamiltonian is (Initial Hamiltonian), then It is impossible to evolve to this point in one step. Therefore, it is possible to first... Mixed in a portion And as the proportion gradually increases over time, the composition of the two parts changes over time:

[0046] in, Starting from 0, Approaching 0, while Approaching This way, as long as the total time Big enough There are enough of them. middle The components will always decrease slowly, thus making This process is similar to slowly "annealing" from one state to another, hence the algorithm is called quantum annealing. Around this type of algorithm, an important class of quantum computers—quantum annealing machines—has emerged that utilize physical fields to simulate the annealing process. Quantum annealing machines can easily fabricate quantum chips with a massive number of qubits. However, quantum annealing machines only perform well in a specific type of problem, and their application scenarios are difficult to broaden. Therefore, the more general-purpose quantum computer—the logic gate quantum computer—was developed. However, in a quantum circuit composed of quantum logic gates, directly fabricating a single... The corresponding quantum logic gates are quite difficult to determine, thus often requiring a special decomposition method for simplification—Trotter decomposition:

[0047] The above is the form of a first-order Trotter decomposition. If A and B commute, the approximate equality sign in the above equation becomes an equality sign, i.e. To achieve even higher precision, there are second-order, third-order, and other Trotter decomposition forms. Therefore, the original:

[0048] thereby:

[0049]

[0050] In the evolution of quantum annealing, the evolutionary path, i.e. The settings are important; whether they are set up correctly will directly affect the final result. The same effect can be achieved by adjusting the hyperparameters using the quantum approximation optimization algorithm.

[0051] See Figure 2 , Figure 2 A flowchart illustrating a quantum simulation method for obtaining intermolecular pairing patterns, provided in an embodiment of the present invention, may include the following steps: S201: Prepare an initial quantum state containing the intermolecular pairing mode to be simulated, and determine the Hamiltonian corresponding to the intermolecular pairing mode to be simulated.

[0052] Specifically, preparing the initial quantum state containing the intermolecular pairing mode to be simulated can include: Step 1: Obtain from One receptor and The molecule to be simulated consists of ligands, and all pairing modes of the molecule to be simulated are determined.

[0053] First, the molecular pairing problem can be transformed into a coloring problem. The essence of the molecular pairing problem is to find... Each receptor (e.g., nodes A1, A2, B1) and The optimal pairing of ligands (e.g., c1, d1 nodes) is crucial. Since each receptor can pair with at most one ligand, this problem can be viewed as finding the optimal pairing for each receptor within a given ligand pairing range. Choose a color from a color library and color it; an additional color represents that the receptor does not pair with a ligand.

[0054] For example, when At this point, a molecule to be simulated is obtained, consisting of three receptors and two ligands, with the three receptors being A1, A2, and B1. The ligands are c1 and d1. For example, A1-None + A2-c1 + B1-d1 means that A1 does not pair with any node, A2 pairs with c1, and B1 pairs with d1. Therefore, there are a total of 3×3=9 possible pairings of the molecule to be simulated (three receptor nodes, each receptor node can be painted with 2+1 colors).

[0055] Step 2: Based on all pairing patterns of the molecules to be simulated, obtain 1 qubit and set the initial state of all said qubits to 0. , wherein .

[0056] Specifically, based on all pairing arrangements of the molecule to be simulated, obtain The initial state of all qubits is initialized to 1. ,in Each qubit contains one additional auxiliary qubit.

[0057] For example, following the example above, 10 qubits can be used to represent all pairings of the molecule to be simulated, which consists of 3 receptors and 2 ligands. The qubits are arranged in the order of pairing (A1, A2, B1). Therefore, 001-001-001 can represent that the receptor and ligand are not paired, and 001-100-010 represents the pairing of A1-None + A2-c1 + B1-d1. Using this encoding method means that the Hamming weight of the qubit segment corresponding to each receptor is 1.

[0058] Step 3: Using preset quantum logic gates and preset interaction relationships, generate initial quantum states that contain the pairing modes between molecules to be simulated.

[0059] Specifically, the preset quantum logic gates include: U gate, SWAP gate, and Pauli-X gate.

[0060] It should be noted that the U-gate can be, for example... Figure 3 The angled ones shown The door, which is equivalent to Figure 3 The quantum circuit on the right, from left to right in time sequence, includes a controlled CNOT gate, a Pauli-X gate, and a controlled... The system consists of a unitary matrix, a Pauli-X gate, and a controlled CNOT gate, where the qubit containing the solid dot is the control bit of the current quantum logic gate, and indicates that the corresponding gate operation is executed when the quantum state of the control bit is 1.

[0061] Specifically, the preset interaction relationship can be formed in the following ways: 1. Each qubit is divided into qubit numbers. A quantum bit module.

[0062] For example, for the 10 qubits required to represent the pairing of the molecule to be simulated, which consists of 3 acceptors and 2 ligands, the 9 qubits can be divided into 3 qubit modules according to the qubit number. That is, the qubits numbered 0, 1, and 2 are divided into one qubit module, the qubits numbered 3, 4, and 5 are divided into one qubit module, and the qubits numbered 6, 7, and 8 are divided into another qubit module.

[0063] 2. Take the first qubit in each qubit module to the last qubit in the same qubit module as the current qubit in sequence, and apply the U gate and the SWAP gate to the current qubit and the next qubit in sequence, and apply the Pauli-X gate to the next qubit in each qubit module in sequence.

[0064] For example, the qubits numbered 0, 1, and 2 are designated as the first qubit module, and the qubit numbered 3 is designated as the auxiliary bit of the first qubit module. First, the 0th qubit in the first qubit module is designated as the current qubit, and a U-gate and a SWAP gate are sequentially applied to the current 0th qubit and its next 1st qubit. Then, the 1st qubit is designated as the current qubit, and a U-gate and a SWAP gate are sequentially applied to the current 1st qubit and its next 2nd qubit. Next, a U-gate and a SWAP gate are sequentially applied to the 2nd and 3rd qubits. Finally, a Pauli-X gate is applied to the 3rd qubit. Following the same method and principle, qubit modules numbered 3, 4, and 5 (with the 6th qubit as an auxiliary bit) and qubit modules numbered 6, 7, and 8 (with the 9th qubit as an auxiliary bit) are sequentially applied, resulting in the following... Figure 4 The illustration shown is a schematic diagram of a quantum circuit generated according to a preset interaction relationship, provided by an embodiment of the present invention.

[0065] In an optional implementation, the 0th qubit in the qubit module containing qubits numbered 0, 1, and 2 can be used as the current qubit, and a U-gate and a SWAP gate can be applied sequentially to the current 0th qubit and its next 1st qubit. Then, the 1st qubit can be used as the current qubit, and a U-gate and a SWAP gate can be applied sequentially to the current 1st qubit and its next 2nd qubit. Following the same method and principle, qubit modules numbered 3, 4, and 5, and qubit modules numbered 6, 7, and 8 can be applied sequentially. Finally, a Pauli-X gate can be applied to the 9th qubit.

[0066] In an optional embodiment, the above method is used to prepare an initial quantum state corresponding to the intermolecular pairing mode to be simulated. It can be represented as: .

[0067] Alternatively, one can first make the 0th qubit interact with the auxiliary qubit, then make the 1st qubit interact with the auxiliary qubit, and so on until the last qubit interacts with the auxiliary qubit. After processing the last qubit, one can also apply an X gate to the auxiliary qubit to prepare the initial quantum state corresponding to the pairing mode between the molecules to be simulated.

[0068] Determining the Hamiltonian corresponding to the intermolecular pairing mode to be simulated may include: a. Obtain the pre-selected scoring function.

[0069] b. Using the scoring function, obtain the pairing score corresponding to each pairing method.

[0070] c. Determine the Hamiltonian corresponding to the pairing mode of the molecules to be simulated based on the pairing fraction.

[0071] Specifically, a known scoring function is read in, and the corresponding pairing score can be calculated for each pairing method. Since the classical algorithm assigns negative scores to cases with multiple ligands during the initial state construction process, the final pairing score is obtained. Based on the pairing fraction, the Hamiltonian corresponding to the pairing mode between molecules to be simulated can be determined.

[0072] In a specific molecular pairing problem, the Hamiltonian is fixed. The significance of the Hamiltonian is that substituting any possible solution into the Hamiltonian yields a definite value, which is the pairing fraction.

[0073] Determining the Hamiltonian corresponding to the intermolecular pairing mode to be simulated based on the pairing fraction includes: determining the Hamiltonian corresponding to the intermolecular pairing mode to be simulated using the following formula. :

[0074] Among them, the The Hamiltonian represents the intermolecular pairing mode to be simulated. Represents a receptor, the Represents the ligand, the Represents the pairing score, the Receptor With ligands The combination of, the This indicates a penalty term. A penalty term describes the penalty imposed by additional restrictions or constraints that cannot be fully covered by the coloring problem; this term can be derived from the known conditions of the problem.

[0075] It should be noted that, Replacement relationship can be used This indicates that the Z-matrix is ​​used to represent the corresponding qubits. Substituting into the above... After the expression, It can be written in the form of the Z matrix:

[0076] in, It is the corresponding constant obtained after reducing and expanding the original expression. In quantum circuits, the first term can be represented by a single-bit rotation gate, and the second term can be represented by two CNOT gates and one rotation gate acting on the corresponding bit.

[0077] S202: Construct the target quantum circuit based on the initial quantum state and the Hamiltonian corresponding to the intermolecular pairing mode to be simulated.

[0078] Specifically, constructing the target quantum circuit based on the initial quantum state and the Hamiltonian corresponding to the intermolecular pairing method to be simulated may include: Based on the initial quantum state, a first sub-quantum circuit corresponding to the Hamiltonian is constructed, and a second sub-quantum circuit for measuring the first sub-quantum circuit is constructed.

[0079] Specifically, the first sub-quantum circuit corresponding to the Hamiltonian can be constructed by mathematically deducing the Hamiltonian into combinations of unitary matrices or quantum logic gates, and then using these unitary matrices and quantum logic gates to construct the first sub-quantum circuit.

[0080] The role of the first sub-quantum circuit is to select the desired approximate optimal solution from the guessed solutions contained in the initial state. The initial quantum state we constructed covers all feasible solutions, but the first sub-quantum circuit cannot be directly measured. Therefore, a second sub-quantum circuit is needed to measure the first sub-quantum circuit.

[0081] For example, the second sub-quantum circuit can be a phase-separating circuit, which changes the phase of each state by the magnitude of the change and the pairing fraction corresponding to that state. The phase of a quantum state is related to its magnitude, hence the name "phase-separating circuit." However, the phase of a quantum state cannot be directly measured, so a mixer circuit is needed again. After passing through the phase-separating layer, the quantum states corresponding to each feasible solution have a phase difference. After being filtered by the mixer circuit, the probability of quantum states with larger pairing fractions increases. Thus, when measuring the final state, there is a higher probability of measuring an approximate optimal solution or even the optimal solution with a higher pairing fraction.

[0082] The first sub-quantum circuit and the second sub-quantum circuit are sequentially combined to form the first quantum circuit, and a predetermined number of the first quantum circuits are combined to form the target quantum circuit.

[0083] For example, let's denote a first quantum circuit as a layer module of the target quantum circuit. Therefore, a preset number of first 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 (including the number of SWAP gates). This will also increase the error rate of the operation, and even the influence of noise will offset the optimization effect brought by the increase of the number of layers.

[0084] S203: Run and measure the target quantum circuit to obtain the final quantum state containing the intermolecular pairing mode to be simulated.

[0085] Specifically, the target quantum circuit is run and measured to obtain the final quantum state. .

[0086] S204: Determine the optimal pairing method between the molecules to be simulated based on the final quantum state.

[0087] Specifically, determining the optimal pairing method between the molecules to be simulated based on the final quantum state may include: Based on the final quantum state, determine the expected value corresponding to the Hamiltonian.

[0088] Specifically, based on the final quantum state, determine the expected value of the Hamiltonian, which is the energy value of the system:

[0089] Here, p represents the preset number of first quantum circuits, and the scoring function can be used as an optimization criterion. Depending on the actual problem, the scoring function needs to be as high or as low as possible during optimization. For example, parameters can be obtained by measuring the target quantum circuit. Corresponding energy value The energy value and parameters are passed to the classical 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 value gradually converges to its maximum or minimum. Thus, we can find the value that maximizes or minimizes the objective function. Value, of which, , .

[0090] Based on the expected value, the optimal pairing method between the molecules to be simulated is determined.

[0091] For example, by selecting p=2, randomly choosing a set of parameters, and running the target quantum circuit multiple times, the desired energy of the quantum state can be obtained. In experiments, the expected energy is determined by fixing parameters. and The average value is obtained by running the same target quantum circuit multiple times and measuring the final quantum state. This value can be directly calculated using pyQpandas full-amplitude simulation.

[0092] Repeat the above steps, retaining the parameter with the highest expected energy. Based on the obtained parameters, linear interpolate to obtain the target quantum circuit parameters for p=3. Run the target quantum circuit multiple times to obtain the expected energy of the quantum state, and then optimize the circuit parameters using a classical optimizer. and Until p is large enough, when p reaches the maximum value, during the process of optimizing the circuit parameters, the state with the highest energy is recorded during the measurement of the desired state, which corresponds to the optimal pairing mode between the molecules to be simulated.

[0093] As can be seen, this invention first prepares an initial quantum state containing the pairing mode of the molecules to be simulated, and determines the Hamiltonian corresponding to the pairing mode. Based on the initial quantum state and the Hamiltonian corresponding to the pairing mode, a target quantum circuit is constructed, the target quantum circuit is run and measured to obtain a final quantum state containing the pairing mode of the molecules to be simulated. Finally, based on the final quantum state, the optimal pairing mode between the molecules to be simulated is determined. It proposes a quantum simulation implementation method that can solve the molecular pairing problem, utilizes the correlation properties of quantum mechanics, improves the computation speed, and fills the gap in related technologies.

[0094] See Figure 5 , Figure 5 This is a schematic diagram of the structure of a quantum simulation device for obtaining intermolecular pairing modes provided in an embodiment of the present invention. Figure 2 The process shown can include: The preparation module 501 is used to prepare an initial quantum state containing the intermolecular pairing mode to be simulated, and to determine the Hamiltonian corresponding to the intermolecular pairing mode to be simulated. Construction module 502 is used to construct the target quantum circuit based on the initial quantum state and the Hamiltonian corresponding to the intermolecular pairing mode to be simulated; The running module 503 is used to run and measure the target quantum circuit to obtain the final quantum state containing the intermolecular pairing mode to be simulated; The determination module 504 is used to determine the optimal pairing method between the molecules to be simulated based on the final quantum state.

[0095] Specifically, the preparation module includes: The first obtaining unit is used to obtain from One receptor and The molecule to be simulated consists of ligands, and all pairing modes of the molecule to be simulated are determined; The second obtaining unit is used to obtain, based on all pairing methods of the molecule to be simulated, 1 qubit and set the initial state of all said qubits to 0. , wherein ; The generation unit is used to generate an initial quantum state containing the pairing mode between molecules to be simulated, using preset quantum logic gates and preset interaction relationships.

[0096] Specifically, the preparation module includes: The third acquisition unit is used to obtain the pre-selected scoring function; The fourth obtaining unit is used to obtain the pairing score corresponding to each pairing method using the scoring function; The first determining unit is used to determine the Hamiltonian corresponding to the pairing mode between molecules to be simulated based on the pairing fraction.

[0097] Specifically, the construction module includes: A construction unit is used to construct a first sub-quantum circuit corresponding to the Hamiltonian based on the initial quantum state, and a second sub-quantum circuit for measuring the first sub-quantum circuit; The combination unit is used to sequentially combine the first sub-quantum circuit and the second sub-quantum circuit into a first quantum circuit, and to combine a preset number of the first quantum circuits into a target quantum circuit.

[0098] Specifically, the determining module includes: The second determining unit is used to determine the expected value corresponding to the Hamiltonian based on the final quantum state; The third determining unit is used to determine the optimal pairing method between the molecules to be simulated based on the expected value.

[0099] Compared with existing technologies, this invention first prepares an initial quantum state containing the pairing mode of the molecules to be simulated, and determines the Hamiltonian corresponding to the pairing mode. Based on the initial quantum state and the Hamiltonian corresponding to the pairing mode, a target quantum circuit is constructed, the target quantum circuit is run and measured to obtain a final quantum state containing the pairing mode of the molecules to be simulated. Finally, based on the final quantum state, the optimal pairing mode between the molecules to be simulated is determined. It proposes a quantum simulation implementation method that can solve the molecular pairing problem, utilizes the correlation properties of quantum mechanics, improves the computation speed, and fills the gap in related technologies.

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

[0101] Specifically, in this embodiment, the storage medium can be configured to store a computer program for performing the following steps: S201: Prepare an initial quantum state containing the intermolecular pairing mode to be simulated, and determine the Hamiltonian corresponding to the intermolecular pairing mode to be simulated; S202: Construct the target quantum circuit based on the initial quantum state and the Hamiltonian corresponding to the intermolecular pairing method to be simulated; S203: Run and measure the target quantum circuit to obtain the final quantum state containing the intermolecular pairing mode to be simulated; S204: Determine the optimal pairing method between the molecules to be simulated based on the final quantum state.

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

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

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

[0105] Specifically, in this embodiment, the processor can be configured to perform the following steps via a computer program: S201: Prepare an initial quantum state containing the intermolecular pairing mode to be simulated, and determine the Hamiltonian corresponding to the intermolecular pairing mode to be simulated; S202: Construct the target quantum circuit based on the initial quantum state and the Hamiltonian corresponding to the intermolecular pairing method to be simulated; S203: Run and measure the target quantum circuit to obtain the final quantum state containing the intermolecular pairing mode to be simulated; S204: Determine the optimal pairing method between the molecules to be simulated based on the final quantum state.

[0106] 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 quantum simulation method for obtaining intermolecular pairing patterns, characterized in that, The method includes: Prepare an initial quantum state containing the intermolecular pairing mode to be simulated, and determine the Hamiltonian corresponding to the intermolecular pairing mode to be simulated; wherein, preparing the initial quantum state containing the intermolecular pairing mode to be simulated includes: obtaining the initial quantum state containing the intermolecular pairing mode to be simulated by... One receptor and The molecule to be simulated consists of ligands, and all pairing modes of the molecule to be simulated are determined; based on all pairing modes of the molecule to be simulated, the following is obtained: 1 qubit and set the initial state of all said qubits to 0. , wherein Using preset quantum logic gates and preset interaction relationships, an initial quantum state corresponding to the intermolecular pairing mode to be simulated is generated; wherein, the preset quantum logic gates include: U gates, SWAP gates, and Pauli-X gates; the preset interaction relationships are formed in the following way: Each qubit is divided into qubit numbers. Each qubit module is used as a current qubit, from the first qubit to the last qubit in the same qubit module. The U gate and the SWAP gate are applied sequentially on the current qubit and the next qubit of the current qubit, and the Pauli-X gate is applied on the next qubit of each qubit module. Construct the target quantum circuit based on the initial quantum state and the Hamiltonian corresponding to the intermolecular pairing mode to be simulated; Run and measure the target quantum circuit to obtain the final quantum state containing the intermolecular pairing mode to be simulated; Based on the final quantum state, the optimal pairing method between the molecules to be simulated is determined.

2. The method according to claim 1, characterized in that, Determining the Hamiltonian corresponding to the intermolecular pairing mode to be simulated includes: Obtain the pre-selected scoring function; Using the scoring function, obtain the pairing score corresponding to each pairing method; Based on the pairing fraction, the Hamiltonian corresponding to the pairing mode of the molecules to be simulated is determined.

3. The method according to claim 2, characterized in that, The step of determining the Hamiltonian corresponding to the intermolecular pairing mode to be simulated based on the pairing fraction includes: The Hamiltonian corresponding to the intermolecular pairing mode to be simulated is determined by the following formula. : Among them, the The Hamiltonian represents the intermolecular pairing mode to be simulated. Represents a receptor, the Represents the ligand, the Represents the pairing score, the Receptor With ligands The combination of, the This indicates a penalty.

4. The method according to any one of claims 1 to 3, characterized in that, The construction of the target quantum circuit based on the initial quantum state and the Hamiltonian corresponding to the intermolecular pairing mode to be simulated includes: Based on the initial quantum state, a first sub-quantum circuit corresponding to the Hamiltonian is constructed, and a second sub-quantum circuit for measuring the first sub-quantum circuit is constructed. The first sub-quantum circuit and the second sub-quantum circuit are sequentially combined to form the first quantum circuit, and a predetermined number of the first quantum circuits are combined to form the target quantum circuit.

5. The method according to claim 4, characterized in that, Determining the optimal pairing method between the molecules to be simulated based on the final quantum state includes: Based on the final quantum state, determine the expected value corresponding to the Hamiltonian; Based on the expected value, the optimal pairing method between the molecules to be simulated is determined.

6. A quantum simulation device for obtaining intermolecular pairing patterns, characterized in that, The device includes: A preparation module is used to prepare an initial quantum state containing the intermolecular pairing mode to be simulated, and to determine the Hamiltonian corresponding to the intermolecular pairing mode to be simulated; wherein, the preparation of the initial quantum state containing the intermolecular pairing mode to be simulated includes: obtaining a quantum state containing the intermolecular pairing mode to be simulated by means of ... One receptor and The molecule to be simulated consists of ligands, and all pairing modes of the molecule to be simulated are determined; based on all pairing modes of the molecule to be simulated, the following is obtained: 1 qubit and set the initial state of all said qubits to 0. , wherein Using preset quantum logic gates and preset interaction relationships, an initial quantum state corresponding to the intermolecular pairing mode to be simulated is generated; wherein, the preset quantum logic gates include: U gates, SWAP gates, and Pauli-X gates; the preset interaction relationships are formed in the following way: Each qubit is divided into qubit numbers. Each qubit module is used as a current qubit, from the first qubit to the last qubit in the same qubit module. The U gate and the SWAP gate are applied sequentially on the current qubit and the next qubit of the current qubit, and the Pauli-X gate is applied on the next qubit of each qubit module. A construction module is used to construct the target quantum circuit based on the initial quantum state and the Hamiltonian corresponding to the intermolecular pairing method to be simulated; The running module is used to run and measure the target quantum circuit to obtain the final quantum state containing the intermolecular pairing mode to be simulated; The determination module is used to determine the optimal pairing method between the molecules to be simulated based on the final quantum state.

7. 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 5 when it is run.

8. 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 as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method for compiling gene therapy drug based on quantum teleportation and application

    CN113764036A

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

    CN114492814A