A particle flow classification method based on quantum complete graph self-attention network

Through the particle flow classification method based on the quantum complete graph self-attention network, representative particles are screened and QGAT model of self-attention mechanism is constructed, which solves the inefficiency and accuracy reduction caused by quantum to classical transformation, and achieves efficient particle flow classification.

CN120430429BActive Publication Date: 2025-08-26NANJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510927723.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-08-26
Estimated Expiration
2045-07-07

AI Technical Summary

Technical Problem

Existing quantum self-attention models cannot avoid the quantum-to-classic conversion, resulting in inefficient data processing and reduced accuracy in particle flow classification.

Method used

The self-attention network based on the quantum complete graph is designed. By screening out the four representative particles with the largest lateral momentum in the particle flow, a QGAT model of the self-attention mechanism is constructed to calculate the self-attention coefficient and weighted sum of the particle characteristics to avoid the conversion from quantum to classical.

Benefits of technology

It improves the accuracy of particle flow classification and the expression effect of the model, realizes the self-attention mechanism throughout the process of quantum machine learning, and improves data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120430429B_ABST
    Figure CN120430429B_ABST
Patent Text Reader

Abstract

The present invention relates to the fields of quantum machine learning and high-energy physics, and specifically relates to a particle flow classification method based on a quantum complete graph self-attention network. The method comprises the following steps: obtaining particle features in a data set, and then, based on the particle transverse momentum features, selecting four representative particles with the largest transverse momentum from each particle flow to replace the entire particle flow features, thereby forming a complete graph; using a QGAT model constructed using a self-attention mechanism to calculate self-attention coefficients for the particle features in the complete graph and to perform weighted summation to complete the update of the particle features; and using the quantum state of the updated particle features as input to a quantum classifier for result prediction after dimensionality reduction through a quantum convolutional network. This method greatly improves the particle classification accuracy and model expression capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of quantum machine learning and high-energy physics, and specifically to a particle flow classification method based on a quantum complete graph self-attention network. Background Art

[0002] The concept of particle flow classification first emerged in the field of high-energy physics, especially in particle detectors such as the Large Hadron Collider (LHC). In the 21st century, particle flow classification has developed rapidly, driven by machine learning techniques.

[0003] Particle flow networks (PFNs) treat each particle in a jet event as an independent input, avoiding the information loss associated with pixelating the data in traditional methods. However, as the amount of data from high-energy physics experiments continues to grow exponentially, traditional data processing methods are no longer able to meet analytical needs. The introduction of quantum computing offers new possibilities for addressing this challenge. A number of quantum machine learning models have also emerged. For example, the quantum convolutional neural network (QCNN) employs quasi-local unitarity in its convolutional layers. The pooling layer measures a subset of qubits and applies rotations, repeating the convolution and pooling cycles until the system is reduced in size. A fully connected layer is then applied, and the output qubits are finally measured. The quantum generative adversarial network (QGAN) experimentally demonstrates quantum generative adversarial learning for the first time in superconducting quantum circuits. After adversarial training, the quantum state generator can replicate the statistical properties of quantum data with high fidelity, making it impossible for the discriminator to distinguish between real and generated data. Quantum graph neural networks (QGNNs) enable both quantum and classical probabilistic reasoning on data with graph geometry. The design of a quantum graph convolutional neural network (QuGCN) uses Givens rotations to implement message passing with neighboring nodes, which has the same function as the adjacency matrix, cleverly encoding the adjacency matrix into quantum circuits. The quantum self-attention network (QSANN) uses Gaussian projection quantum self-attention as a reasonable quantum version of self-attention.

[0004] Existing quantum self-attention models cannot avoid the quantum-to-classical conversion, which greatly reduces data processing efficiency and the accuracy of particle flow classification. Therefore, how to improve particle classification accuracy and improve model expression effect has become an urgent problem to be solved. Summary of the Invention

[0005] The purpose of the present invention is to provide a particle flow classification method based on a quantum complete graph self-attention network. First, based on the particle transverse momentum characteristics, the four representative particles with the largest transverse momentum are screened out from each particle flow, and a quantum network is designed to implement a self-attention mechanism to extract the characteristics of the particles.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] A particle flow classification method based on a quantum complete graph self-attention network, the method comprising:

[0008] S100, obtaining the particle features in the data set, and then based on the particle transverse momentum features, selecting four representative particles with the largest transverse momentum from each particle flow to replace the entire particle flow features, thereby forming a complete graph;

[0009] S200, using the QGAT model built by the self-attention mechanism to calculate the self-attention coefficient of the particle flow features in the complete graph and perform weighted summation to complete the update of the particle features;

[0010] S300, the quantum state of the updated particle feature is represented by the index register and the value register under the self-attention register all-zero projection measurement, and then the quantum state is represented by the quantum convolution network and used as the input of the quantum classifier to predict the result.

[0011] Preferably, the QGAT model in S200 includes: an index register, a self-attention register, and a value register;

[0012] The index register uses a Hadamard gate to construct a superposition state to perform corresponding controlled operations on different particle characteristics;

[0013] The self-attention register is used to calculate the self-attention coefficient between particles. The construction of the self-attention coefficient is realized through the design of quantum circuits. By using the superposition of the quantum state of the index register, the entire construction of the self-attention coefficient of a particle can be completed under different control conditions of the control bits. Finally, the all-zero projection measurement can ensure that only the required self-attention coefficient is retained.

[0014] The value register is used for weighted summation operation. The self-attention coefficient between particles is reflected by the amplitude of the index register. The control conditions of the index register are repeated, and the weighted summation operation is performed on the values ​​of different particles to realize the update of particle characteristics.

[0015] Preferably, the index register includes:

[0016] for particles, the index register requires qubits to represent the index of the particle characteristics, and its initial quantum state is , after applying the Hadamard gate to each bit, we get The uniform superposition state of a bit is expressed as:

[0017] ;

[0018] in, represents the uniform superposition state of the index register, represents a Hadamard gate acting on n bits.

[0019] Preferably, the self-attention register comprises:

[0020] S201、For particle flow The particles are recorded as a set ; Each particle is a dimensional feature vector, represents the number of particle features;

[0021] The superposition state prepared by the index register is used to distinguish the characteristics of different particles. A controlled structure is adopted to realize the quantum state representation of particle characteristics. The number of quantum bits required for particle characteristic encoding is related to the encoding method. The quantum bits are used to represent the particle characteristics, and the superposition states of different particle characteristics and index registers are associated:

[0022] ;

[0023] in, A quantum state representation that characterizes the particle, Indicates the The quantum state representation of particle characteristics, represents the overall unitary operation, Indicates the control condition of the index register;

[0024] When the binary representation of the quantum state of the index register is equal to the decimal number When the controlled operation gate is equal, it will be embedded in the first The characteristics of a particle; The quantum state after all particle characteristics are embedded in the quantum bit is expressed as:

[0025] ;

[0026] in, The unitary matrix embedding operation representing the particle characteristics acts on On qubits;

[0027] According to the self-attention mechanism, particle features need to be transformed to obtain the corresponding query, key, and value. Classical self-attention networks use linear transformations to obtain the corresponding query, key, and value. The linear transformation matrix is ​​randomly initialized and trainable. Quantum self-attention networks use unitary matrices to obtain the corresponding query, key, and value. The unitary matrix not only contains the particle feature representation but also requires trainable parameters. Therefore, trainable parameters are added to the unitary matrix of the particle feature embedding to represent the particle query, key, and value.

[0028] S202. Calculate the self-attention coefficient between particle features. The self-attention coefficient between particle features can be regarded as the inner product formula between the particle query and the bond. The present invention designs a quantum circuit to realize the calculation of the self-attention coefficient between particles. By constructing a quantum state in the form of the self-attention coefficient, the measurement of particle features and the calculation of the self-attention coefficient through the classical self-attention mechanism are avoided.

[0029] Taking the calculation of the self-attention coefficient of the k-th particle as a reference, On quantum bits, first pass the unitary matrix For the first Particle queries are embedded, and The difference is that no controlled structure is required, and the particle features are directly embedded: ;

[0030] Next, construct the self-attention coefficient between the kth particle and other particles, and under different control conditions of the index bit, parameterized unitary gates on qubits Embed the bonds of the particles one by one to get the bonds of all particles:

[0031] ;

[0032] Based on the fact that the inner product of quantum states is regarded as the self-attention coefficient between quantum states in quantum computing, The amplitude in front represents the self-attention coefficient between particle features, and further Expands to:

[0033] ;

[0034] This gives the particle k and all other particles The quantum state in the form of self-attention coefficient is:

[0035] ;

[0036] in, Indicates the The quantum state after the particle is embedded is The first quantum bit The amplitude of the state, Represents particle k and particle The self-attention coefficient of particle k can be regarded as the query and particle Calculate the similarity of the keys.

[0037] Preferably, the value register includes:

[0038] The number of quantum bits required to embed the particle value is also related to the encoding method. qubits to realize particle value embedding;

[0039] Then use Embed the value of the particle and keep it consistent with the embedding of the particle key. When the index register control conditions are the same, embed the value of the corresponding particle:

[0040] ;

[0041] in, Indicates the The quantum state representation of the particle value, so only conduct Measure, get only Amplitude of the state , the same as the self-attention mechanism, the latest feature representation is represented by the weighted sum of the self-attention coefficient and the value. According to the design, the self-attention coefficient is reflected in the amplitude of the index register, and the self-attention register and the value register share the same index register. After measurement, the quantum bit where the self-attention register is located Always , so the quantum state on the index register and the value register can represent the weighted sum of the self-attention coefficient and the particle value;

[0042] The density matrix is ​​used to represent the process. Represents the density matrix before measurement:

[0043] ;

[0044] Action projection operator After that, the probability of testing 0 is:

[0045] ;

[0046] After measurement, the system collapses to: ;

[0047] Joint density matrix of index registers and value registers for: ;

[0048] in, Express The qubits are subjected to the deviation trace operation, and the result is equivalent to the quantum state of the index register and the value register under the all-zero projection measurement of the self-attention register;

[0049] In this way, the present invention realizes the calculation of self-attention coefficients between particle features and the weighted summation operation of particle features;

[0050] For the density matrix It is a Hermitian matrix. Since all the information of the Hermitian matrix is ​​contained in the main diagonal and the triangular part on one side, and the other side is uniquely determined by the conjugate symmetry, the upper triangle or lower triangle plus the main diagonal elements can be selected as the output of the network. This paper selects the upper triangular part, which can speed up the training process for subsequent tasks, reduce redundant features, and improve model efficiency. The density matrix is ​​further selected. The upper triangular part plus the main diagonal elements of are used as the output of the QGAT model.

[0051] This invention differs from classical methods by constructing an entangled quantum network to calculate the self-attention coefficient between particles. This self-attention coefficient is then transferred through the amplitude of the quantum state to the corresponding particle features, and the weighted summation is performed to complete the particle feature update. This entire process avoids the quantum-to-classical conversion. To our knowledge, this is the full implementation of the self-attention mechanism in quantum machine learning. This process can be viewed as taking place on a complete graph, where each particle feature acts as a node in the graph. The self-attention mechanism enables message passing and aggregation between neighboring nodes, thereby updating the features of the current node. The high-dimensional particle features are then processed through a quantum convolutional network for dimensionality reduction, extracting low-dimensional feature representations. Finally, all particle features are encoded into a quantum classifier for result prediction.

[0052] Compared with the prior art, the present invention has the following beneficial effects:

[0053] This paper proposes a particle flow classification model QGAT. The model uses quantum circuits to calculate the self-attention coefficient between particle features and realizes the weighted summation of particle features at the quantum state level. This is the full process implementation of the self-attention mechanism in quantum machine learning. The model has achieved very good classification results on the TopQCD dataset. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0055] Figure 1 This is a system structure diagram of the quantum complete graph self-attention network of the present invention;

[0056] Figure 2 It is a particle query and value embedding quantum circuit diagram of an embodiment of the present invention;

[0057] Figure 3 This is a quantum circuit diagram of a particle bond embedded in an embodiment of the present invention;

[0058] Figure 4 It is a quantum complete graph self-attention network graph of an embodiment of the present invention;

[0059] Figure 5 This is a diagram of the process of particle characteristics passing through the quantum convolution layer in an embodiment of the present invention;

[0060] Figure 6 This is a diagram of the process of particle characteristics passing through the quantum pooling layer in an embodiment of the present invention;

[0061] Figure 7 is a fully connected structure diagram of a quantum classifier according to an embodiment of the present invention;

[0062] Figure 8 is the AUC of the particle flow classification model QGAT on the training set according to an embodiment of the present invention;

[0063] Figure 9 is the accuracy of the experimental results of the embodiment of the present invention. DETAILED DESCRIPTION

[0064] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0065] See also Figures 1-9 , the present invention provides a technical solution:

[0066] Example 1: A particle flow classification method based on a quantum complete graph self-attention network, the method comprising:

[0067] S100, obtaining the particle features in the data set, and then based on the particle transverse momentum features, selecting four representative particles with the largest transverse momentum from each particle flow to replace the entire particle flow features, thereby forming a complete graph;

[0068] S200, using the QGAT model built by the self-attention mechanism to calculate the self-attention coefficient of the particle flow features in the complete graph and perform weighted summation to complete the update of the particle features;

[0069] Preferably, the QGAT model in S200 includes: an index register, a self-attention register, and a value register;

[0070] Preferably, the index register utilizes a Hadamard gate to construct a superposition state to perform corresponding controlled operations on different particle features, including:

[0071] for particles, the index register requires qubits to represent the index of the particle characteristics, and its initial quantum state is , after applying the Hadamard gate to each bit, we get The uniform superposition state of a bit is expressed as:

[0072] ;

[0073] in, represents the uniform superposition state of the index register, represents a Hadamard gate acting on n bits.

[0074] Preferably, the self-attention register is used to calculate the self-attention coefficient between particles. The construction of the self-attention coefficient is realized through the design of quantum circuits. By indexing the superposition of the register quantum state, the entire construction of the self-attention coefficient of a particle can be completed under different control conditions of the control bits. Finally, the all-zero projection measurement can ensure that only the required self-attention coefficient is left, including:

[0075] S201、For particle flow The particles are recorded as a set ; Each particle is a dimensional feature vector, represents the number of particle features;

[0076] The superposition state prepared by the index register is used to distinguish the characteristics of different particles. A controlled structure is adopted to realize the quantum state representation of particle characteristics. The number of quantum bits required for particle characteristic encoding is related to the encoding method. The quantum bits are used to represent the particle characteristics, and the superposition states of different particle characteristics and index registers are associated:

[0077] ;

[0078] in, A quantum state representation that characterizes the particle, Indicates the The quantum state representation of particle characteristics, represents the overall unitary operation, Indicates the control condition of the index register;

[0079] When the binary representation of the quantum state of the index register is equal to the decimal number When the controlled operation gate is equal, it will be embedded in the first The characteristics of a particle; The quantum state after all particle characteristics are embedded in the quantum bit is expressed as:

[0080] ;

[0081] in, The unitary matrix embedding operation representing the particle characteristics acts on On qubits;

[0082] According to the self-attention mechanism, particle features need to be transformed to obtain the corresponding query, key, and value. Classical self-attention networks use linear transformations to obtain the corresponding query, key, and value. The linear transformation matrix is ​​randomly initialized and trainable. Quantum self-attention networks use unitary matrices to obtain the corresponding query, key, and value. The unitary matrix not only contains the particle feature representation but also requires trainable parameters. Therefore, trainable parameters are added to the unitary matrix of the particle feature embedding to represent the particle query, key, and value.

[0083] S202. Calculate the self-attention coefficient between particle features. The self-attention coefficient between particle features can be regarded as the inner product formula between the particle query and the bond. The present invention designs a quantum circuit to realize the calculation of the self-attention coefficient between particles. By constructing a quantum state in the form of the self-attention coefficient, the measurement of particle features and the calculation of the self-attention coefficient through the classical self-attention mechanism are avoided.

[0084] Taking the calculation of the self-attention coefficient of the k-th particle as a reference, On quantum bits, first pass the unitary matrix For the first Particle queries are embedded, and The difference is that no controlled structure is required, and the particle features are directly embedded: ;

[0085] Next, construct the self-attention coefficient between the kth particle and other particles, and under different control conditions of the index bit, parameterized unitary gates on qubits Embed the bonds of the particles one by one to get the bonds of all particles:

[0086] ;

[0087] Based on the fact that the inner product of quantum states is regarded as the self-attention coefficient between quantum states in quantum computing, The amplitude in front represents the self-attention coefficient between particle features, and further Expands to:

[0088] ;

[0089] This gives the particle k and all other particles The quantum state in the form of self-attention coefficient is:

[0090] ;

[0091] in, Indicates the The quantum state after the particle is embedded is The first quantum bit The amplitude of the state, Represents particle k and particle The self-attention coefficient of particle k can be regarded as the query and particle Calculate the similarity of the keys.

[0092] Preferably, the value register is used for weighted summation operation, the self-attention coefficient between particles is reflected by the amplitude of the index register, the control condition of the index register is repeated, and the weighted summation operation is performed on the values ​​of different particles to realize the update of particle characteristics, including:

[0093] The number of quantum bits required to embed the particle value is also related to the encoding method. qubits to realize particle value embedding;

[0094] Then use Embed the value of the particle and keep it consistent with the embedding of the particle key. When the index register control conditions are the same, embed the value of the corresponding particle:

[0095] ;

[0096] in, Indicates the The quantum state representation of the particle value, so only conduct Measure, get only Amplitude of the state , the same as the self-attention mechanism, the latest feature representation is represented by the weighted sum of the self-attention coefficient and the value. According to the design, the self-attention coefficient is reflected in the amplitude of the index register, and the self-attention register and the value register share the same index register. After measurement, the quantum bit where the self-attention register is located Always , so the quantum state on the index register and the value register can represent the weighted sum of the self-attention coefficient and the particle value;

[0097] The density matrix is ​​used to represent the process. Represents the density matrix before measurement:

[0098] ;

[0099] Action projection operator After that, the probability of testing 0 is:

[0100] ;

[0101] After measurement, the system collapses to: ;

[0102] Joint density matrix of index registers and value registers for: ;

[0103] in, Express The qubits are subjected to the deviation trace operation, and the result is equivalent to the quantum state of the index register and the value register under the all-zero projection measurement of the self-attention register;

[0104] In this way, the present invention realizes the calculation of self-attention coefficients between particle features and the weighted summation operation of particle features;

[0105] For the density matrix It is a Hermitian matrix. Since all the information of the Hermitian matrix is ​​contained in the main diagonal and the triangular part on one side, and the other side is uniquely determined by the conjugate symmetry, the upper triangle or lower triangle plus the main diagonal elements can be selected as the output of the network. This paper selects the upper triangular part, which can speed up the training process for subsequent tasks, reduce redundant features, and improve model efficiency. The density matrix is ​​further selected. The upper triangular part plus the main diagonal elements of are used as the output of the QGAT model.

[0106] S300, the quantum state of the updated particle characteristics is represented by a quantum convolutional network and then used as the input of the quantum classifier to predict the result.

[0107] Example 2: Simulation experiment:

[0108] The present invention is based on the NVIDIA GeForce RTX 4090 graphics processor, the model is implemented using the Pennylane and Pytorch frameworks, and the dataset uses the international public dataset Top Quark Tagging Reference.

[0109] The particle flow in the dataset uses the distance parameter The inverse kT algorithm is used for clustering. particles, the input features include the transverse momentum fraction , relative pseudo-fast speed and , and then preprocess: ; ; ;

[0110] The present invention selects To introduce trainable parameters to complete the query of particle features, mapping of keys and values, It is a single-qubit gate commonly used in quantum computing and is defined as:

[0111] ;

[0112] in, Controlling the rotation angle determines the offset of the quantum state on the Bloch sphere. and is the phase parameter, which affects the initial phase and final phase of the quantum state respectively. Controls the rotation around the y-axis by and Control the rotation around the z axis by adjusting the parameters Able to represent arbitrary single-qubit unitary transformations.

[0113] Figure 2 It is the embedding construction circuit of particle query and value. First, the particle features are encoded through three revolving door angles, and then the trainable parameters are introduced. To realize the query of particle features and the mapping of values;

[0114] Figure 3 It is the embedded construction circuit of the particle bond. According to the quantum circuit formula, the embedded construction circuit of the bond and the embedded construction circuit of the query are structurally in a conjugate transposed relationship. The quantum complete graph self-attention network is as follows: Figure 4 In the experiment, we sorted the particles in descending order according to their pT and used the four particles with the highest pT to replace the entire particle flow feature to form a complete graph. The dimension of the particle feature of the node is 3. According to the self-attention mechanism, self-connection needs to be considered. There should actually be 10 edges. The number of qubits in the index register is 2, the number of qubits in the self-attention register is 1, and the number of qubits in the value register is 1.

[0115] Figure 4 You can calculate the New feature representation of particle features under self-attention mechanism , which can be seen as a message passing and aggregation mechanism implemented through the self-attention mechanism. In the self-attention mechanism, each particle feature must be updated in the same way, so it needs to be repeated 4 times Figure 4 The circuit structure only needs to change the first The embedded representation of the particle feature query. Since each subcircuit only requires 4 quantum bits, all circuits can be executed in parallel to obtain new feature representations of all particles. Although the density matrix is ​​optimized by taking the upper triangular elements, it will still be a high-dimensional feature vector. Here, before the particle feature vector enters the quantum classifier, the particle feature vector can be reduced in dimension. Here, the QCNN structure is selected to achieve dimensionality reduction. The particle features are first amplitude encoded, and then through quantum convolution and quantum pooling, such as Figure 5 and Figure 6 shown.

[0116] For quantum convolution, a two-qubit unitary operation is first applied to all even-numbered qubit pairs. Then, a cyclic coupling method is used to apply the same unitary gate operation to all odd-numbered qubit pairs. In addition to the adjacent qubits, the first and last qubits are also connected through a unitary gate.

[0117] For the quantum pooling operation, a two-qubit unitary gate is used to act on each pair of qubits. After completing the unitary gate operation, for each pair of qubits, only one qubit is retained for subsequent neural network processing, and the other qubit is discarded. The features of the four modules are spliced ​​and input into the quantum classifier with a four-qubit fully connected structure. Each bit uses angle encoding to encode the same four features. The fully connected structure is as follows Figure 7 As shown, the expected value of the first quantum bit is measured, and finally the expected value is processed using sigmoid as the binary classification prediction result.

[0118] The present invention adopts the binary cross entropy in the binary classification as the loss function L for training, and uses the back propagation method to calculate the gradient: ;

[0119] in, represents the true label (0 or 1), represents the probability predicted by the model, Indicates the sample size.

[0120] The model is trained using the RAdam optimizer with a learning rate of 0.001, a batch size of 1024, and 100 epochs. An early stopping condition is set to stop training when the model is overfitting or the performance is no longer improving. This can prevent overfitting, save resources, and improve generalization ability. The entire system is as follows: Figure 1 shown.

[0121] After the QGAT model proposed in this paper was trained on the TopQCD data training set, the model's loss function converged to 0.5505, the model's AUC on the training set was 0.8766, and the accuracy was 0.8064; the accuracy on the test set was 0.8217. Figure 8 , Figure 9 shown.

[0122] The quantum complete graph self-attention network (QGAT) proposed in this paper has broad application prospects. In the field of high-energy physics, QGAT effectively captures the topological structure and physical characteristic relationships between particles through the quantum attention mechanism, significantly improving the accuracy of particle flow classification. At the same time, this technology can also be extended to multiple important fields: in recommendation systems, QGAT can be used to construct user-item interaction graphs, and through the quantum attention mechanism, it can deeply explore the complex dependencies between user preferences and item characteristics, thereby optimizing recommendation effects; in the fields of chemistry and drug design, QGAT can accurately model molecular graph structures and use the quantum attention mechanism to effectively predict molecular properties or drug interactions, providing important support for new drug research and development; in the field of materials science, QGAT can be used to analyze material structural characteristics and predict the performance of new materials.

[0123] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art will be able to modify the technical solutions described in the aforementioned embodiments or substitute equivalents for some of the technical features. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A particle flow classification method based on quantum complete graph self-attention network, characterized by: The method comprises: S100, obtaining the particle features in the data set, and then based on the particle transverse momentum features, selecting four representative particles with the largest transverse momentum from each particle flow to replace the entire particle flow features, thereby forming a complete graph; S200, using the QGAT model built by the self-attention mechanism to calculate the self-attention coefficient of the particle flow features in the complete graph and perform weighted summation to complete the update of the particle features; S300, the quantum state of the updated particle characteristics is represented by a quantum convolutional network and then used as the input of the quantum classifier to predict the result; The QGAT model in S200 includes: an index register, a self-attention register, and a value register; The index register uses a Hadamard gate to construct a superposition state to perform corresponding controlled operations on different particle characteristics; The self-attention register is used to calculate the self-attention coefficient between particles. The construction of the self-attention coefficient is realized through the design of quantum circuits. By indexing the superposition of the register quantum state, the entire construction of the self-attention coefficient of a particle is completed under different control conditions of the control bits. Finally, the all-zero projection measurement is performed to ensure that only the required self-attention coefficient is retained. The value register is used for weighted summation operation. The self-attention coefficient between particles is reflected by the amplitude of the index register. The control conditions of the index register are repeated, and the weighted summation operation is performed on the values ​​of different particles to realize the update of particle characteristics. The self-attention register comprises: S201、For particle flow The particles are recorded as a set ; Each particle is a dimensional feature vector, represents the number of particle features; The superposition state prepared by the index register is used to distinguish the characteristics of different particles. A controlled structure is adopted to realize the quantum state representation of particle characteristics. The number of quantum bits required for particle characteristic encoding is related to the encoding method. The quantum bits are used to represent the particle characteristics, and the superposition states of different particle characteristics and index registers are associated: ; in, A quantum state representation that characterizes the particle, Indicates the The quantum state representation of particle characteristics, represents the overall unitary operation, Indicates the control condition of the index register; When the binary representation of the quantum state of the index register is equal to the decimal number When the controlled operation gate is equal, it will be embedded in the first The characteristics of a particle; The quantum state after all particle characteristics are embedded in the quantum bit is expressed as: ; in, The unitary matrix embedding operation representing the particle characteristics acts on On qubits; S202, taking the calculation of the self-attention coefficient of the k-th particle as a reference, On quantum bits, first pass the unitary matrix For the first Particle queries are embedded, and The difference is that no controlled structure is required, and the particle features are directly embedded: ; Next, construct the self-attention coefficient between the kth particle and other particles, and under different control conditions of the index bit, parameterized unitary gates on qubits Embed the bonds of the particles one by one to get the bonds of all particles: ; Based on the fact that the inner product of quantum states is regarded as the self-attention coefficient between quantum states in quantum computing, The amplitude in front represents the self-attention coefficient between particle features, and further Expands to: ; This gives the particle k and all other particles The quantum state in the form of self-attention coefficient is: ; in, Indicates the The quantum state after the particle is embedded is The first quantum bit The amplitude of the state, Represents particle k and particle The self-attention coefficient is regarded as the query of particle k and the Calculate the similarity of the keys.

2. A particle flow classification method based on quantum complete graph self-attention network according to claim 1, characterized in that: The index register includes: for particles, the index register requires qubits to represent the index of the particle characteristics, and its initial quantum state is , after applying the Hadamard gate to each bit, we get The uniform superposition state of a bit is expressed as: ; in, represents the uniform superposition state of the index register, represents a Hadamard gate acting on n bits.

3. The particle flow classification method based on quantum complete graph self-attention network according to claim 1, characterized in that: The value register includes: The number of quantum bits required to embed the particle value is also related to the encoding method. qubits to realize particle value embedding; Then use Embed the value of the particle and keep it consistent with the embedding of the particle key. When the index register control conditions are the same, embed the value of the corresponding particle: ; in, Indicates the The quantum state representation of the particle value, so only conduct Measure, get only Amplitude of the state , the same as the self-attention mechanism, the latest feature representation is represented by the weighted sum of the self-attention coefficient and the value. According to the design, the self-attention coefficient is reflected in the amplitude of the index register, and the self-attention register and the value register share the same index register. After measurement, the quantum bit where the self-attention register is located Always , so the quantum state on the index register and the value register represents the weighted sum of the self-attention coefficient and the particle value; The density matrix is ​​used to represent the process. Represents the density matrix before measurement: ; Action projection operator After that, the probability of testing 0 is: ; After measurement, the system collapses to: ; Joint density matrix of index registers and value registers for: ; in, Express The qubits are subjected to the deviation trace operation, and the result is equivalent to the quantum state of the index register and the value register under the all-zero projection measurement of the self-attention register; Further select the density matrix The upper triangular part plus the main diagonal elements of are used as the output of the QGAT model.

Citation Information

Patent Citations

  • A handwritten picture classification method based on a quantum neural network

    CN109948742A

  • Particle image velocity measurement method based on depth Transform model

    CN119810476A