Design method for graph classification based on granular quantum graph neural network

Through the granular-sphere-based quantum graph neural network, the difficult problem of processing large-scale non-Euclidean space graph structure data was solved. By combining the advantages of classical and quantum computing, efficient graph classification was achieved, and the computing process and model robustness were optimized.

CN119337212BActive Publication Date: 2025-10-21YIQI TECH (CHENGDU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies find it difficult to efficiently process large-scale non-Euclidean space graph structure data, classical computer computing power and algorithms face challenges, and there is little research on quantum computing in this field.

Method used

A quantum graph neural network based on particle spheres is adopted to achieve graph classification through particle sphere generation, node and edge dataset encoding, variational quantum circuit enhancement features, quantum graph convolution and pooling circuit design, combining the advantages of classical computers and quantum computing.

Benefits of technology

The calculation process of graph neural networks has been optimized, the calculation time has been reduced, the robustness and computational efficiency of the model have been improved, and the defect of preparing massive amounts of data in quantum experiments has been overcome.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119337212B_ABST
    Figure CN119337212B_ABST
Patent Text Reader

Abstract

The application relates to a design method of a granule-based quantum graph neural network for graph classification, and belongs to the field of quantum machine learning. The method comprises the following steps: S1: a classical granule generation method is used to generate granule samples from data samples; S2: a node data set and an edge data set are acquired, and encoding and preparation are completed; S3: a variational quantum wire is designed to enhance node features; S4: a quantum graph convolution circuit is designed to realize information transmission and parameter sharing between nodes; S5: a quantum graph pooling circuit is designed to extract multiple quantum bit information onto one quantum bit, so that feature dimension reduction is realized; S6: training set is input to train parameters of the whole model; and S7: a to-be-tested data set is input to the model, a Pauli Z measurement is performed on a specified quantum bit to obtain an expected value, and finally, graph classification is completed. The application reduces the number of data sample points, overcomes the defect that a large amount of data cannot be prepared in a quantum experiment, and optimizes the quantum graph convolution circuit and the quantum graph pooling circuit.
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 based on a quantum graph neural network of granular spheres. Background Art

[0002] Graph-structured data is a ubiquitous entity in countless research fields, widely used in fields and applications such as social network analysis, recommender systems, knowledge graphs, and text analytics. As time goes by, the prevalence of large-scale graphs has become a trend. However, processing large-scale graph-structured data requires enormous computing resources and costs. In the field of machine learning, both the computing power and algorithmic requirements of classical computers face enormous challenges. Breakthroughs in quantum mechanics and quantum computing have led to the rapid development of quantum computers. Quantum computers exploit the superposition, parallelism, and entanglement of quantum states to demonstrate advantages far exceeding those of classical computers in solving specific computational problems. Most quantum neural networks are designed for regularly structured data in Euclidean space. For data in non-Euclidean space, classical machine learning algorithms directly use graph neural networks to construct learning processes for graph data. However, research in the quantum field is relatively limited. 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 a granular quantum graph neural network. Granular sphere computing is an efficient, robust, and scalable granular computing learning method. Replacing a sample point in its data set with a granular sphere and allowing the granular sphere to represent the overall characteristics of the data set has become crucial in the era of big data. It can overcome the defect that quantum experiments cannot produce massive 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 balls, 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 transfer 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 bits and classify the graph.

[0013] Furthermore, the S1 is specifically:

[0014] S11, consider the graph with N nodes as a sphere, take the node with the largest degree 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 that is closest to the central node. The degree of a node refers to the number of adjacencies of the node, that is, the number of edges that the node has, reflecting 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 degrees are regarded as the central nodes, and the other nodes are assigned to the child sphere that is closest to the central node, that is, each parent sphere is split into two child spheres;

[0016] S13: Determine the quality of the sphere to determine whether to stop splitting. Use 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. The definition of average connectivity is: 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 expressed as a new node; and the edges between the spheres are the edges of the new node, that is, a new node data set and edge data set are obtained.

[0018] Furthermore, the S3 is specifically:

[0019] S31, a 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 encoding for node data sets; angle encoding is used to map data onto the Bloch sphere, and each bit is rotated using an RY gate 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] Furthermore, the S3 is specifically:

[0022] S31 considers the expressibility of circuits and the complex interactions between nodes embedded in graph data; uses a variational quantum circuit (VQC) classifier 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 convolution layers, reducing the circuit complexity of the entire quantum circuit;

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

[0024]

[0025] Furthermore, the S4 is specifically:

[0026] S41, design a quantum graph convolution circuit; achieve local connectivity and parameter sharing properties by implementing a unitary operation U on two qubits; the circuit includes CNOT gates, RY rotation gates, and RZ rotation gates; first rotate each qubit using RZ(θ)RY(θ)RZ(θ), then use CNOT gates to entangle to achieve nonlinearity, where θ is an adjustable parameter that is updated during training to adapt to various operations of the circuit;

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

[0028] Furthermore, the S5 is specifically:

[0029] S51, designed a quantum graph pooling circuit, adding three adjustable parameters to each qubit to improve the model's adversarial robustness; the circuit includes a CNOT gate, an RY rotation gate, and an RZ rotation gate; adjacent qubits are entangled using a CNOT gate, and then each qubit is rotated using RZ(θ)RY(θ)RZ(θ), where θ is an adjustable parameter;

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

[0031] Furthermore, the S6 is specifically as follows:

[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 data set to be tested into the trained quantum graph neural network for quantum calculation and finally perform Pauli matrix Z measurement; if Z measurement is performed on a quantum state |ψ〉=α|0〉+β|1〉, 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 positive, and Z<0 means that the sample is classified as negative. 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, objects, and features of the present invention will be described in part in the following description and, in part, will be apparent to those skilled in the art upon examination of the following description or may be learned from practice of the present invention. The objects and other advantages of the present invention may 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 with reference to the accompanying drawings, in which:

[0043] Figure 1 This is an overall flow chart of a method according to an embodiment of the present invention;

[0044] Figure 2 This is a flow chart of the particle ball generation algorithm used in the present invention;

[0045] Figure 3 This is a diagram of the quantum angle coding circuit 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 means of 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 are only schematic illustrations of the basic concept of the present invention, and the following embodiments and features in the embodiments can be combined with each other without conflict.

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

[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 there are terms such as "upper", "lower", "left", "right", "front", "back", etc. indicating 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, and do not indicate or imply 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 Figures 1 to 7 , which is a design method for graph classification based on quantum graph neural network with granular spheres.

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

[0055] S1: The classic 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 node set and E represents the edge set. The symmetric adjacency matrix of graph G is denoted as A. Given an undirected graph G, the goal of granulated sphere graph coarsening is to find a smaller granulated sphere graph, denoted as granulated sphere 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 graphs, and add them 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 ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ Where n represents the number of data points in this sample set, and m represents the characteristic dimension of each data point. To encode this data set using angle encoding, all data points must first be normalized and scaled to the range [0, 1]. Rotating the data too far will prevent the model from accurately representing the data, and thus prevent the quantum circuit from correctly operating on and evolving the data.

[0064] S22, for edge datasets, base 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 datasets, 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 is incremented from 0 to 1. Multiple quantum bits are used to encode feature information, 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.

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

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

[0067] S31, after angular 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. A single layer transformation L is described as: L:|ψ(x)>→|ψ(y)>=U(ω)|ψ(x)> where U(ω) represents a VQC with N layers, defined as: Use RX, RY, and CNOT gate operations to construct VQC variational quantum circuits. Figure 4 As shown, it has an angle encoder RX and RY side by side with 2 hidden VQC layers, and the parameters θ in RY are used as adjustable parameters in the training function.

[0068] S32, initialize the VQC quantum circuit to generate VQC adjustable parameters, use the input and VQC parameters to update the quantum circuit, and 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, reducing the circuit complexity of the entire quantum circuit;

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

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

[0071] S42, 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, the angles α, β, and γ can be found to 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 two-qubit gate circuit to implement the convolution operation. 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; then the RY rotation gate with adjustable qubit parameters is evolved; finally, each qubit is measured in sequence, and the measurement results of each qubit are 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 qubits is concentrated on one qubit. Figure 6 As shown, node feature dimensionality reduction is achieved by extracting the feature information of two qubits onto a single qubit. Through training, the model determines the pooling parameters used, and the parameters are the same at each layer. This pooling circuit can be applied not only between different node features, but also between different feature dimensions within the same node, reducing both the number of node features and their dimensionality.

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

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

[0077] After multiple layers of convolution and pooling, the dataset is fed into a trained quantum graph neural network. Finally, a quantum Z measurement is performed on the specified qubits to obtain the expected value. For binary graph classification tasks, Z ≥ 0 indicates that the sample is classified as positive, while Z < 0 indicates that the sample is classified as negative. For multi-classification tasks, performing quantum Z measurements on log2 N qubits can achieve N classifications.

[0078] Example 1: Social Network User Interest Classification

[0079] Background: Social networking platforms hold vast amounts of user data, including posts, comments, likes, and other information, as well as the network of relationships between users. By categorizing user interests, we can better implement personalized recommendations and advertising.

[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, where each sphere 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: Uses base state encoding to indicate whether there is an attention relationship between users.

[0086] Node dataset: uses 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 associated 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 are complex in structure, and their properties are difficult to predict using classical computational methods. Classification of drug molecules can be used to predict their bioactivity, toxicity, and other properties, providing important insights 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 a labeled drug molecular property dataset.

[0114] Image classification:

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

[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. 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 solutions of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solutions, which should all 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 networks based on granular 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 transfer 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; The S1 is specifically: S11, consider the graph with N nodes as a sphere, take the node with the largest degree 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 that is closest to the central node. The degree of a node refers to the number of adjacencies of the node, that is, the number of edges that the node has, reflecting 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 degrees are regarded as the central nodes, and the other nodes are assigned to the child sphere that is closest to the central node, that is, each parent sphere is split into two child spheres; S13: Determine the quality of the sphere to determine whether to stop splitting. Use 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. The definition of average connectivity is: 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 expressed as a new node; and the edges between the spheres are the edges of the new node, that is, a new node dataset and edge dataset are obtained; The S2 is specifically: S21, a 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>; S22 uses angle encoding for node data sets; angle encoding is used to map data onto the Bloch sphere, and each bit is rotated using an RY gate from high to low bits. x increases from 0 to 1 in sequence; multiple quantum bits are used to encode feature information, 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; The S3 is specifically: S31 considers the expressibility of circuits and the complex interactions between nodes embedded in graph data; uses a variational quantum circuit (VQC) classifier 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 convolution layers, reducing the circuit complexity of the entire quantum circuit; S32, initialize the quantum circuit of VQC, generate the adjustable parameters of VQC, update the quantum circuit using the input and VQC parameters, and run the quantum circuit (VQC) to obtain quantum output; VQC requires the continuous application of variational layers. The single-layer transformation L is described as: L:|ψ(x)>→|ψ(y)>=U(ω)|ψ(x)>, where U(ω) represents a VQC with N layers, defined as: The S4 is specifically: S41, design a quantum graph convolution circuit; achieve local connectivity and parameter sharing properties by implementing a unitary operation U on two qubits; the circuit includes CNOT gates, RY rotation gates, and RZ rotation gates; first rotate each qubit using RZ(θ)RY(θ)RZ(θ), then use CNOT gates to entangle to achieve nonlinearity, where θ is an adjustable parameter that is updated during training to adapt to various operations of the circuit; S42, add four sets of RZ(θ)RY(θ)RZ(θ) revolving gates to the line to improve the adversarial robustness of the model and make the model more expressive, where θ is a shared parameter; The S5 is specifically: S51, designed a quantum graph pooling circuit, adding three adjustable parameters to each qubit to improve the model's adversarial robustness; the circuit includes a CNOT gate, an RY rotation gate, and an RZ rotation gate; adjacent qubits are entangled using a CNOT gate, and then each qubit is rotated using RZ(θ)RY(θ)RZ(θ), where θ is an adjustable parameter; S52, finally measuring the first few qubits in sequence, and judging whether to apply the RZ revolving gate to the next qubit based on the measurement results of each qubit, where the parameters in the revolving gate remain fixed; concentrating the information on multiple qubits onto one qubit.

2. The design method for graph classification based on a granular sphere quantum graph neural network according to claim 1 is characterized by: The S6 is specifically: The training set is passed into the quantum graph neural network model for parameter training.

3. The design method for graph classification based on a granular sphere quantum graph neural network according to claim 2 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; perform Z measurement on a quantum state |ψ〉=α|0〉+β|1〉, the probability of the quantum state collapsing 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 positive, and Z<0 means that the sample is classified as negative. 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