Graph classification design method of quantum graph neural network based on granular balls

By introducing particle samples and quantum circuit design into the quantum graph neural network, the computing resource and cost challenges of processing non-Euclidean space graph data in the quantum field are solved, and efficient graph data processing and calculation time reduction are achieved.

CN119337212AActive Publication Date: 2025-01-21YIQI TECH (CHENGDU) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411492297.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-01-21
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

In the quantum field, it is difficult for the prior art to effectively take advantage of quantum computing when processing graph structure data in non-Euclidean space, and classical machine learning algorithms have huge challenges in computing resources and cost in such data processing.

Method used

The particle-based quantum graph neural network design method is adopted, combining the advantages of classical particles and quantum computing, by generating particle samples, encoding node and edge data sets, designing variational quantum circuits, quantum graph convolution circuits and quantum graph pools. circuits and optimize the graph neural network calculation process.

Benefits of technology

It has realized efficient processing of non-Euclidean space graph data on quantum computers, reduced calculation time, optimized quantum circuit calculations, and designed more robust quantum graph convolution and graph pooling circuits, combining the advantages of classical and quantum computing. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119337212A_ABST
    Figure CN119337212A_ABST
Patent Text Reader

Abstract

The invention relates to a design method for graph classification of a particle-ball-based quantum graph neural network, and belongs to the field of quantum machine learning. The method comprises the following steps: S1, a classic pellet generation method: generating a pellet sample from a data sample; s2, acquiring a node data set and an edge data set, and coding and preparing the node data set and the edge data set; s3, designing variable component sub-wire enhanced node features; s4, designing a quantum graph convolution line to realize information transmission and parameter sharing between nodes; s5, designing a quantum graph pooling line, extracting multiple pieces of quantum bit information to one quantum bit, and realizing feature dimension reduction; s6, inputting a training set to train parameters of the whole model; and S7, inputting a to-be-measured data set into the model, and executing Follis Z measurement on the specified quantum bits to obtain an expected value to finish final graph classification. According to the invention, the number of data sample points is reduced, and the defect that a huge amount of data cannot be prepared by a quantum experiment is overcome; and a quantum graph convolution line and a quantum graph pooling line are optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of quantum machine learning and relates to a design method for graph classification of a quantum graph neural network based on a particle sphere. Background Art

[0002] Graph-structured data are ubiquitous entities in countless research fields. They are widely used in fields and applications such as social network analysis, recommendation systems, knowledge graphs, and text analysis. With the development of the times, the popularity of large-scale graphs has become a trend. However, processing large-scale graph-structured data requires a lot of computing resources and costs. In the field of machine learning, classical computers face huge challenges in terms of computing power and algorithms. Breakthroughs in quantum mechanics and quantum computing have brought about the rapid development of quantum computers. Quantum computers use the superposition, parallelism, and quantum entanglement of quantum states to show advantages far beyond classical computers in computing specific problems. Most quantum neural networks are designed for regular structured data in Euclidean space. For data in non-Euclidean space, classical machine learning algorithms directly use graph neural networks to construct the learning process of graph data. However, in the quantum field, there are few related studies. Summary of the invention

[0003] In view of this, the purpose of the present invention is to provide a design method for graph classification based on quantum graph neural networks based on granular balls. Granular ball computing is an efficient, robust and scalable granular computing learning method. Let a granular ball replace the sample points in its data set and let the granular ball represent the overall characteristics of the data set. This method has become crucial in the era of big data and can overcome the defect that quantum experiments cannot prepare huge amounts of data. A new quantum graph convolutional neural network model that can be implemented on quantum parameterized circuits is a technology that combines quantum computing and classical graph neural network architectures. It can better utilize the advantages of quantum computing to process data in non-Euclidean space.

[0004] In order to achieve the above object, the present invention provides the following technical solutions:

[0005] A design method for graph classification based on a quantum graph neural network of granular spheres, the method comprising the following steps:

[0006] S1: Generate granular samples from data samples;

[0007] S2: Obtain the node dataset and edge dataset and complete their encoding and preparation;

[0008] S3: Design variational quantum circuits to enhance node characteristics;

[0009] S4: Design quantum graph convolution circuits to achieve information transmission and parameter sharing between nodes;

[0010] S5: Design quantum graph pooling circuit to achieve feature dimensionality reduction;

[0011] S6: Input the training set to train the model parameters;

[0012] S7: Input the data set to be tested into the model to perform Pauli Z measurement on the specified quantum bit and classify the graph.

[0013] Further, the S1 is specifically:

[0014] S11, consider the graph with N nodes as a sphere, take the node with the largest degree in the graph as the first center node, and the next center node is the node farthest from the previous center node, and find The rest of the nodes are assigned to the parent sphere according to the central node they are closest to. The degree of a node refers to the number of adjacency relationships of the node, that is, the number of edges a node has, which reflects the degree of connection and importance of the node in the network structure.

[0015] S12, for the generated In each parent sphere, the two nodes with the largest degree are regarded as the central nodes, and the other nodes are assigned to the child spheres that are closest to the central nodes, that is, each parent sphere is split into two child spheres;

[0016] S13, judging the quality of the sphere to determine whether the sphere stops splitting; using average connectivity to calculate the quality of the sphere; if the average connectivity of the two daughter spheres is lower than the average connectivity of the parent sphere, the splitting stops at this point and the algorithm converges; definition of average connectivity: calculated by the ratio of the number of edges to the number of nodes in the graph; the smaller the ratio, the denser the nodes in the sphere and the higher the quality of the sphere;

[0017] S14, the central node information in the generated sphere directly represents the information of the sphere to which it belongs, and is represented as a new node; and the edge between the spheres is the edge of the new node, that is, a new node data set and edge data set are obtained.

[0018] Further, the S3 is specifically:

[0019] S31, the ground state encoding method is used for the edge data set; each quantum bit represents an edge, that is, whether two nodes are connected; if the two nodes are connected, the corresponding quantum bit is set to |1>, otherwise it is |0>;

[0020] S32 uses angle coding for node data sets; angle coding is used to map data onto the Bloch sphere, and each bit uses an RY gate to control rotation from high to low bits. x increases from 0 to 1 in sequence; the feature information is encoded using multiple quantum bits, and the number of quantum bits q depends on the number of nodes n and the feature dimension m of the nodes, that is, q = n×m.

[0021] Further, the S3 is specifically:

[0022] S31, considers the expressibility of circuits and the interactions between complex nodes embedded in graph data; uses variational quantum circuits (VQC) to enhance node features and simulate the operating principles of traditional classical graph neural networks with fully connected layers; multi-layer VQC variational quantum circuits can reduce the number of subsequent quantum graph convolutional layers and reduce circuit complexity for the entire quantum circuit;

[0023] S32, initialize the quantum circuit of VQC Generate the adjustable parameters of VQC Use the input and VQC parameters to update the quantum circuit Run the quantum circuit (VQC) to obtain quantum output; VQC requires continuous application of variational layers, and a single-layer transformation L is depicted as: L:ψ(x)>→ψ(y)>=U(ω)ψ(x)>, where U(ω) represents a VQC with N layers, defined as:

[0024]

[0025] Further, the S4 is specifically:

[0026] S41, design quantum graph convolution circuit; local connection and parameter sharing properties are achieved by implementing the unitary operation U of two quantum bits; the circuit includes CNOT gate, RY rotation gate and RZ rotation gate; first use RZ(θ)RY(θ)RZ(θ) to rotate each quantum bit, and then use CNOT gate to entangle to achieve nonlinearity, where θ is an adjustable parameter, which is updated during training to adapt to various operations of the circuit;

[0027] S42, add 4 sets of RZ(θ)RY(θ)RZ(θ) revolving gates in the line to improve the adversarial robustness of the model and make the model more expressive, where θ is a shared parameter.

[0028] Further, the S5 is specifically:

[0029] S51, design quantum graph pooling circuit, add three adjustable parameters for each quantum bit to improve the adversarial robustness of the model; the circuit includes CNOT gate, RY rotation gate and RZ rotation gate; for adjacent quantum bits, entangle them through CNOT gate, and then use RZ(θ)RY(θ)RZ(θ) to rotate each quantum bit, where θ is an adjustable parameter;

[0030] S52, finally measuring the first few quantum bits in turn, and judging whether to apply the RZ revolving gate to the next quantum bit based on the measurement result of each quantum bit, where the parameters in the revolving gate remain fixed; and concentrating the information on multiple quantum bits onto one quantum bit.

[0031] Further, the S6 is specifically:

[0032] The training set is passed into the quantum graph neural network model for parameter training;

[0033] Further, the S7 is specifically:

[0034] S71, input the test data set into the trained quantum graph neural network for quantum calculation and finally perform Pauli matrix Z measurement; for example, if a quantum state |ψ>=α|0>+β|1> is measured by Z, the probability that the quantum state collapses to the state |0> is |α| 2 , the probability of collapsing to the state |1> is |β| 2 , the measured values ​​obtained in the two states are 1 and -1 respectively;

[0035] S72, in order to obtain more accurate information about the quantum state, a certain number of measurements are performed, and the frequency of the results obtained from multiple measurements is used to approximate the probability of the value, and finally the expected value of the Z measurement is obtained: <z> |ψ> = <ψ|Z|ψ> = |α| 2 -|β| 2 For binary classification tasks of graphs, Z ≥ 0 means that the sample is classified as the positive class, and Z < 0 means that the sample is classified as the negative class; for multi-classification tasks of graphs, N-class tasks perform Z measurements on log2N related quantum bits.

[0036] The beneficial effects of the present invention are:

[0037] First, the present invention combines the respective advantages of classical computers and quantum computers, and uses classical particles to make up for the defect that quantum experiments cannot prepare a large number of quantum bits.

[0038] Second, the present invention uses quantum properties to optimize the graph neural network calculation process, greatly reducing the calculation time.

[0039] Third, the present invention optimizes quantum circuit calculations using VQC variational quantum circuits.

[0040] Fourth, the present invention designs quantum graph convolution circuits and quantum graph pooling circuits with better robustness.

[0041] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:

[0043] Figure 1 The overall flow chart of the method of the embodiment of the present invention is as follows;

[0044] Figure 2 The flowchart of the particle ball generation algorithm used in the present invention;

[0045] Figure 3 This is a quantum angle coding circuit diagram used in the present invention;

[0046] Figure 4 The VQC variational quantum circuit designed for the present invention;

[0047] Figure 5 The quantum graph convolution circuit designed for the present invention;

[0048] Figure 6 The quantum graph pooling circuit designed for the present invention;

[0049] Figure 7 This is the circuit diagram of the entire quantum graph neural network of the present invention. DETAILED DESCRIPTION

[0050] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.

[0051] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.

[0052] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "front", "back" and the like indicate the orientation or position relationship, they are based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0053] See also Figure 1 to Figure 7 , which is a design method for graph classification based on quantum graph neural network based on granular sphere.

[0054] like Figure 1 As shown, this embodiment provides a graph classification design method based on a quantum graph neural network of a particle sphere, comprising the following steps:

[0055] S1: The classical sphere generation method generates spheres from data samples;

[0056] Specifically, the generation process includes:

[0057] S11. Represent a graph with N nodes and M edges as G = (V, E), where V represents the set of nodes and E represents the set of edges. The symmetric adjacency matrix of graph G is denoted as A. Given an undirected graph G, the goal of the granular ball graph coarsening is to find a smaller granular ball graph, denoted as the granular ball graph GBG, to approximate graph G. The number of nodes in a GBG is n < N, the number of edges is denoted as m < M, and the adjacency matrix of GBG is denoted as A GB ;

[0058] S12. Input graph G, initialize the GBG list as an empty list. If the graph is connected, perform granulation to obtain the GB graph and add it to the GBG list. Otherwise, split graph G into all its connected subgraphs, perform granulation to obtain the GB graph, and add it to the GBG list. Finally, merge all the granulated GB graphs in the GBG list into a new GB graph;

[0059] S13. Given a graph dataset D = {G1, G2,...., G|D|}, where |D| is the number of graphs in the dataset, N i is the number of nodes in the i-th graph. For the i-th original graph G i , the number of granular balls generated from the dataset is n. Use V GBi = {GB1, GB2,...., GB n} to represent the nodes in the i-th coarsened graph GBG i . The number of nodes in each coarsened graph GBG is n i . The mathematical basic model of the GBGC method can be expressed as:

[0060] S14. For each GBG coarsened graph as Figure 2 shown, it needs to be divided into granular balls. The first node is the point with the largest degree, and the next node is the point farthest from the previous point set. Inside each ball, regard the two nodes with the largest degree as the central nodes, and for the remaining points, assign them to the ball that is closer to the central point. If the assigned ball does not satisfy the quality function (its quality is measured by the average connectivity AC k ), then continue to split until it is satisfied. Use the central points in each obtained granular ball to represent each new sample node, and form a new node dataset and edge dataset.

[0061] S2: Encode and prepare the node dataset and edge dataset;

[0062] Specifically, the preparation process includes:

[0063] S21. Assume a set of classical data to be encoded, X = {x (1) , x (2) ,..., x (n)}, where​​ Where n means that this set of samples has n data, and m means that the characteristic dimension of each data is m-dimensional. If this set of data is to be encoded using the angle encoding method, all data must be standardized first and scaled to the range of [0, 1]. If the rotation angle is too large, the model cannot accurately express the data, resulting in the quantum circuit being unable to correctly operate and evolve the data.

[0064] S22, for edge data sets, ground state encoding is used. Each qubit represents an edge, that is, whether two nodes are connected. If two nodes are connected, the corresponding qubit is set to |1>, otherwise |0>; for node data sets, angle encoding is used, such as Figure 3 As shown. Use angle encoding to map data onto the Bloch sphere, from high to low bits of data, each bit uses an RY gate to control rotation x increases from 0 to 1. Multiple quantum bits are used to encode characteristic information, and the number of quantum bits q depends on the number of nodes n and the characteristic dimension m of the nodes, that is, q = n×m.

[0065] S3: Design VQC variational quantum circuit to enhance node characteristics;

[0066] Specifically, the variational quantum circuit is designed as follows:

[0067] S31, after angle encoding, uses VQC to enhance node features, simulating the operating principle of traditional classical neural networks with fully connected layers. Considering the expressibility of circuits and the complex interactions between nodes embedded in graph structured data. VQC requires the continuous application of variational layers, and a single layer transformation L is depicted as: L:|ψ(x)>→|ψ(y)>=U(ω)|ψ(x)> where U(ω) represents a VQC with N layers, defined as: Using RX, RY, and CNOT gate operations to construct a VQC variational quantum circuit, Figure 4 As shown, it has an angle encoder RX and RY in parallel with 2 hidden VQC layers, and the parameters θ in RY are used as adjustable parameters in the training function.

[0068] S32, initialize the quantum circuit of VQC to generate adjustable parameters of VQC, use the input and VQC parameters to update the quantum circuit to run the quantum circuit (VQC) to obtain quantum output. Multi-layer VQC variational quantum circuits can reduce the number of subsequent quantum graph convolution layers and reduce the circuit complexity for the entire quantum circuit;

[0069] S4, design quantum graph convolution circuit to realize information transmission and parameter sharing between nodes;

[0070] S41, two sets of qubits are used to describe the nodes and topology of the graph dataset respectively. Specifically, a set of qubits in the excited state |1> or the ground state |0> is used to represent the local connectivity information, that is, if two nodes are connected, the corresponding qubit is set to |1> and affects the two nodes through a controlled unitary gate U.

[0071] S42, the minimum implementation of two qubit gates, stipulates that the minimum number of gates for any unitary matrix U∈SU is 18, including 3 CNOT gates, 3 rotation gates and 4 arbitrary single-qubit gates. For any single-qubit gate, we can find angles α, β, γ that satisfy the formula: SU1=R z (α)R y (β)R z (γ). That is, a unitary gate U is composed of 3 CNOT gates and 15 rotation gates to form a double-qubit gate circuit to implement convolution operations such as Figure 5 shown.

[0072] S5: Design quantum graph pooling circuit to achieve feature dimensionality reduction;

[0073] Specifically, the design process includes:

[0074] First, the qubits containing characteristic information are entangled through the CNOT gate; secondly, the RY rotation gate with adjustable parameters for the qubit action is evolved; finally, each qubit is measured in turn, and the measurement result of each qubit is used to determine whether to apply the RZ rotation gate to the next qubit, where the parameters in the rotation gate remain unchanged. Finally, the information on the previous qubit is concentrated on one qubit. Figure 6 As shown in the figure, the feature information of two qubits is extracted into one qubit to achieve node feature dimensionality reduction. Through training, the model can determine the pooling parameters to be used, and the parameters of each layer are the same. This pooling circuit can not only act between different node features, but also between different feature dimensions of the same node, that is, reduce the number of node features and the dimension of node features at the same time.

[0075] S6: Input the training set to train the model parameters;

[0076] S7: Perform Pauli Z measurement on the specified quantum bit and classify the graph;

[0077] After multiple layers of convolution and pooling transformation, the test data set is input into the trained quantum graph neural network and finally the quantum Z measurement is performed on the specified quantum bit to obtain the expected value. For binary classification tasks of graphs, Z ≥ 0 means that the sample is classified as a positive class, and Z < 0 means that the sample is classified as a negative class. For multi-classification tasks, N classification tasks can be achieved by performing quantum Z measurement on log2 N quantum bits.

[0078] Example 1: Social network user interest classification

[0079] Background: Social networking platforms have a large amount of user data, including posts, comments, likes, and other information published by users, as well as the relationship network between users. By classifying user interests, personalized recommendations and advertising can be better performed.

[0080] Ball generation:

[0081] Input: social network user relationship graph and user characteristic data (such as age, gender, occupation, etc.).

[0082] Output: A dataset of spheres, each of which represents a group of users with similar interests.

[0083] Steps: Divide the spheres according to user feature similarity and relationship network density.

[0084] Coding and preparation:

[0085] Edge dataset: Use base state encoding to indicate whether there is an attention relationship between users.

[0086] Node dataset: Use angle encoding to represent user feature data.

[0087] VQC variational quantum circuit:

[0088] A multi-layer VQC variational quantum circuit is used to enhance user feature representation and simulate the complexity and diversity of user interests.

[0089] Quantum graph convolution circuit:

[0090] The relationship network between users is analyzed through quantum graph convolution circuits to extract the correlation information of user interests.

[0091] Quantum graph pooling circuit:

[0092] Use quantum graph pooling circuits to reduce feature dimensions and extract core features of user interests.

[0093] Model training:

[0094] The model parameters are trained using labeled user interest datasets.

[0095] Image classification:

[0096] Perform quantum computing on the characteristic data of new users, and determine the user's interest category based on the measurement results, such as "technology", "entertainment", "sports", etc.

[0097] Example 2: Prediction of drug molecular properties

[0098] Background: Drug molecules have complex structures and their properties are difficult to predict using classical computational methods. By classifying drug molecules, we can predict their biological activity, toxicity and other properties, providing an important reference for drug design and screening.

[0099] Ball generation:

[0100] Input: drug molecular structure diagram and molecular characteristic data (such as atom type, bond type, etc.).

[0101] Output: A sphere dataset, where each sphere represents a class of drug molecules with similar properties.

[0102] Steps: Divide the particles into spheres according to molecular structure and characteristic data.

[0103] Coding and preparation:

[0104] Edge dataset: Uses ground state encoding to indicate whether there is a chemical bond between atoms.

[0105] Node dataset: uses angle encoding to represent atom types and bond types.

[0106] VQC variational quantum circuit:

[0107] Multi-layer VQC variational quantum circuits are used to enhance molecular feature representation and simulate the complexity and diversity of molecular structures.

[0108] Quantum graph convolution circuit:

[0109] Analyze molecular structures through quantum graph convolution circuits and extract correlation information of molecular properties.

[0110] Quantum graph pooling circuit:

[0111] Use quantum graph pooling circuits to reduce feature dimensions and extract core features of molecular properties.

[0112] Model training:

[0113] The model parameters are trained using annotated drug molecular property datasets.

[0114] Image classification:

[0115] Perform quantum calculations on the characteristic data of new drug molecules, and determine the molecular property category based on the measurement results, such as "anti-cancer drug", "antibacterial drug", etc.

[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.< / z>

Claims

1. A design method for graph classification based on quantum graph neural network based on particle spheres, characterized by: The method comprises the following steps: S1: Generate granular samples from data samples; S2: Obtain the node dataset and edge dataset and complete their encoding and preparation; S3: Design variational quantum circuits to enhance node characteristics; S4: Design quantum graph convolution circuits to achieve information transmission and parameter sharing between nodes; S5: Design quantum graph pooling circuit to achieve feature dimensionality reduction; S6: Input the training set to train the model parameters; S7: Input the data set to be tested into the model to perform Pauli Z measurement on the specified quantum bit and classify the graph.

2. The method for designing graph classification based on particle-sphere quantum graph neural network according to claim 1 is characterized in that: The S1 is specifically: S11, consider the graph with N nodes as a sphere, take the node with the largest degree in the graph as the first center node, and the next center node is the node farthest from the previous center node, and find The rest of the nodes are assigned to the parent sphere according to the central node they are closest to. The degree of a node refers to the number of adjacency relationships of the node, that is, the number of edges a node has, which reflects the degree of connection and importance of the node in the network structure. S12, for the generated In each parent sphere, the two nodes with the largest degree are regarded as the central nodes, and the other nodes are assigned to the child spheres that are closest to the central nodes, that is, each parent sphere is split into two child spheres; S13, judging the quality of the sphere to determine whether the sphere stops splitting; using average connectivity to calculate the quality of the sphere; if the average connectivity of the two daughter spheres is lower than the average connectivity of the parent sphere, the splitting stops at this point and the algorithm converges; definition of average connectivity: calculated by the ratio of the number of edges to the number of nodes in the graph; the smaller the ratio, the denser the nodes in the sphere and the higher the quality of the sphere; S14, the central node information in the generated sphere directly represents the information of the sphere to which it belongs, and is represented as a new node; and the edge between the spheres is the edge of the new node, that is, a new node data set and edge data set are obtained.

3. The method for designing graph classification based on particle-sphere quantum graph neural network according to claim 2 is characterized in that: The S3 is specifically: S31, the ground state encoding method is used for the edge data set; each quantum bit represents an edge, that is, whether two nodes are connected; if the two nodes are connected, the corresponding quantum bit is set to |1>, otherwise it is |0>; S32 uses angle coding for node data sets; angle coding is used to map data onto the Bloch sphere, and each bit uses an RY gate to control rotation from high to low bits. x increases from 0 to 1 in sequence; the feature information is encoded using multiple quantum bits, and the number of quantum bits q depends on the number of nodes n and the feature dimension m of the nodes, that is, q = n×m.

4. The method for designing graph classification based on particle-sphere quantum graph neural network according to claim 3 is characterized in that: The S3 is specifically: S31, considers the expressibility of circuits and the complex interactions between nodes embedded in graph data; The variational quantum circuit (VQC) is used to enhance node features and simulate the operation principle of traditional classical graph neural networks with fully connected layers. Multi-layer VQC variational quantum circuits can reduce the number of subsequent quantum graph convolution layers and reduce the circuit complexity of the entire quantum circuit. S32, initialize the quantum circuit of VQC Generate the adjustable parameters of VQC Use the input and VQC parameters to update the quantum circuit Run the quantum circuit (VQC) to obtain quantum output; VQC requires the continuous application of variational layers, and the single-layer transformation L is depicted as: L: |ψ(x)>→|ψ(y)>=U(ω)|ψ(x)>, where U(ω) represents a VQC with N layers, defined as:

5. The method for designing graph classification based on particle-sphere quantum graph neural network according to claim 4 is characterized in that: The S4 is specifically: S41, design quantum graph convolution circuit; local connection and parameter sharing properties are achieved by implementing the unitary operation U of two quantum bits; the circuit includes CNOT gate, RY rotation gate and RZ rotation gate; first use RZ(θ)RY(θ)RZ(θ) to rotate each quantum bit, and then use CNOT gate to entangle to achieve nonlinearity, where θ is an adjustable parameter, which is updated during training to adapt to various operations of the circuit; S42, add 4 sets of RZ(θ)RY(θ)RZ(θ) revolving gates in the line to improve the adversarial robustness of the model and make the model more expressive, where θ is a shared parameter.

6. The method for designing graph classification based on particle-sphere quantum graph neural network according to claim 5 is characterized in that: The S5 is specifically: S51, design quantum graph pooling circuit, add three adjustable parameters for each quantum bit to improve the adversarial robustness of the model; the circuit includes CNOT gate, RY rotation gate and RZ rotation gate; for adjacent quantum bits, entangle them through CNOT gate, and then use RZ(θ)RY(θ)RZ(θ) to rotate each quantum bit, where θ is an adjustable parameter; S52, finally measuring the first few quantum bits in turn, and judging whether to apply the RZ revolving gate to the next quantum bit based on the measurement result of each quantum bit, where the parameters in the revolving gate remain fixed; and concentrating the information on multiple quantum bits onto one quantum bit.

7. The method for designing graph classification based on particle-sphere quantum graph neural network according to claim 6 is characterized in that: The S6 is specifically: The training set is passed into the quantum graph neural network model for parameter training.

8. The method for designing graph classification based on particle-sphere quantum graph neural network according to claim 7 is characterized in that: The S7 is specifically: S71, input the test data set into the trained quantum graph neural network for quantum calculation and finally perform Pauli matrix Z measurement; for example, if a quantum state |ψ>=α|0>+β|1> is measured by Z, the probability that the quantum state collapses to the state |0> is |α| 2 , the probability of collapsing to the state |1> is |β| 2 , the measured values ​​obtained in the two states are 1 and -1 respectively; S72, in order to obtain more accurate information about the quantum state, a certain number of measurements are performed, and the frequency of the results obtained from multiple measurements is used to approximate the probability of the value, and finally the expected value of the z measurement is obtained: <z> |ψ> = <ψ|Z|ψ> = |α| 2 -|β| 2 For binary classification tasks of graphs, Z ≥ 0 means that the sample is classified as the positive class, and Z < 0 means that the sample is classified as the negative class; for multi-classification tasks of graphs, N-class tasks perform Z measurements on log2N related quantum bits.< / z>

Citation Information

Patent Citations

  • Methods, storage mediums, and systems for configuring classification regions within a classification matrix of an analysis system and for classifying particles of an assay

    CN102124458A

  • Quantum graph neural network and method for realizing quantum graph neural network

    CN115238852A

  • Quantum particle ball generation method

    CN117556911A

  • Quantum convolutional neural networks

    US20210383189A1

  • Systems and methods for modeling quantum entanglement and performing quantum communication

    WO2020167289A1