CN115238852A - Quantum subgraph neural network and method for realizing quantum subgraph neural network - Google Patents

Quantum subgraph neural network and method for realizing quantum subgraph neural network Download PDF

Info

Publication number
CN115238852A
CN115238852A CN202210525181.4A CN202210525181A CN115238852A CN 115238852 A CN115238852 A CN 115238852A CN 202210525181 A CN202210525181 A CN 202210525181A CN 115238852 A CN115238852 A CN 115238852A
Authority
CN
China
Prior art keywords
quantum
edge
node
neural network
characteristic data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210525181.4A
Other languages
Chinese (zh)
Inventor
王诗瑜
赵翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Turing Intelligent Computing Quantum Technology Co Ltd
Original Assignee
Shanghai Turing Intelligent Computing Quantum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Turing Intelligent Computing Quantum Technology Co Ltd filed Critical Shanghai Turing Intelligent Computing Quantum Technology Co Ltd
Priority to CN202210525181.4A priority Critical patent/CN115238852A/en
Publication of CN115238852A publication Critical patent/CN115238852A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N10/00Quantum computing, i.e. information processing based on quantum-mechanical phenomena
    • G06N10/60Quantum algorithms, e.g. based on quantum optimisation, quantum Fourier or Hadamard transforms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Mathematics (AREA)
  • Condensed Matter Physics & Semiconductors (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to a quantitative subgraph neural network and a method for realizing the quantitative subgraph neural network. The node characteristic data of one node is transmitted into the rotation parameter of the preceding stage pauli revolving door of the first line, and the node characteristic data of the other node is transmitted into the rotation parameter of the preceding stage pauli revolving door of the second line. The edge characteristic data of the edge between the two nodes is transmitted to the rotation parameters of the controlled door of each of the first and second lines. In addition, weight parameters are input into rotation parameters of respective rear-stage Pauli revolving doors of the first line and the second line, and edge characteristic data of one edge and node characteristic data of two adjacent nodes at two ends of the edge are aggregated by using a preset linear function with weight.

Description

Quantity subgraph neural network and method for realizing quantity subgraph neural network
Technical Field
The invention mainly relates to the field of quantum computing, in particular to a quantum subgraph neural network and a method for realizing the quantum subgraph neural network.
Background
In the field of deep learning, graphical Neural Networks (GNNs) have gained popularity rapidly over the past few years. As a convenient and versatile framework for modeling large-scale complex structural data of various real-world objects, the graph neural network has been successfully applied to solve a wide variety of series of problems, including, for example, recommendation systems in social media and electronic commerce, detection of false information, i.e., false news, in social media, event classification in various fields of natural science, such as particle physics, and the like.
The Graph Neural Network (GNN) has strong feature extraction capability and integration capability when processing image data, which mainly benefits from a parameter sharing mechanism of a convolution kernel (kernel/filter) and a weighted average mechanism. The convolution is actually a weighted summation process, the parameters of the convolution kernel are the weights corresponding to different pixel points, and different pictures share the same convolution kernel. This enables the CNN to implicitly learn the pixel arrangement rule in the image by iteratively updating the convolution kernel parameters, and then learn different shape features and spatial features.
The classic graph neural network algorithm is a research hotspot in the field of artificial intelligence, and is applied to various application scenes such as biomedical research and development, material research, neuroscience and the like, but the operation of the classic graph neural network model consumes a large amount of computing resources. The computational resources for the operation of the traditional algorithm are mainly provided by chips manufactured based on integrated circuits, and the computational power is difficult to continuously improve along with the restriction of the electron tunneling effect on the process approaching the nanometer limit. A significant negative factor is that silicon-based integrated circuits generate a significant source of heat that is difficult to dissipate in a timely manner during the execution of a large number of operations. Quantum computing is a supplementary source for electronic chip computing, and can partially replace traditional chips in some links.
It is worth noting that the operation of classical graph neural network algorithms on quantum devices cannot be handled in the way they are on electronic chips. For the prediction problem of chemical molecular properties, a part of excellent performances are obtained on the basis of a classical graph neural network model, but in a message transmission stage between nodes in a classical graph neural network algorithm, the operation has high parallelism and consumes a large amount of computing resources, so that the current computer computing power is very high. Quantum computing and mixed quantum and classical computing are very considerable directions in high computing power situations.
In recent years, the industry is more interested in the expansion of the deep learning method on the graph and has practical value. Under the successful promotion of multiple factors, researchers define and design Graph Neural network structures (GNN) for processing Graph structure data by using ideas of convolutional Networks, cyclic Networks and depth automatic encoders, so that a new research hotspot, namely the Graph Neural Networks, comes, and at present, the effectiveness of the GNN is widely proved. With the advent of quantum computers, neural networks optimized using quantum wires have been used in a variety of fields. However, at present, no quantum classical hybrid version of the neural network structure of the graph exists, and a unique scheme is necessary to be designed to build a corresponding network.
Disclosure of Invention
The application relates to a quantum graph neural network, comprising:
and the variational quantum circuit is used for aggregating the node characteristic data and the edge characteristic data of the graph neural network so as to realize the information propagation operation between adjacent nodes connected with edges in the middle.
The above-mentioned quantum graph neural network, wherein:
the variational quantum wire comprises a pair of wires, a first group of turnstiles is arranged on any single wire, and a first type of parameter for characterizing node characteristic data is represented by the rotation angle of the first group of turnstiles.
The above quantum graph neural network, wherein:
and the controlled door arranged on one line of the pair of lines is controlled by the other line of the pair of lines, and the second type of parameter representing the edge characteristic data is represented by the rotation angle of the controlled door.
The above quantum graph neural network, wherein:
and a second group of revolving doors are also arranged on any single line, and the weights of the linear functions of the node characteristic data of the adjacent nodes at the two ends of each edge and the edge characteristic data of the edge are aggregated and expressed in a mode of the rotation angle of the second group of revolving doors.
The above quantum graph neural network, wherein:
the first set of turnstiles comprises three parameterized pauli X, Y, Z turnstiles, whereby the node signature data is dimensioned to fit the number of three turnstiles (1, 3).
The above quantum graph neural network, wherein:
the controlled gates arranged on any single line comprise parameterized Paly X revolving gates, whereby the dimensions of the edge feature data are set to fit the number of one revolving gate (1, 1).
The above-mentioned quantum graph neural network, wherein:
the second set of turnstiles comprises three parameterized pauli X, Y, Z turnstiles, whereby the dimensions of the weights are arranged to be adapted to the number of three turnstiles (1, 3).
The above-mentioned quantum graph neural network, wherein:
linear function c for said information propagation operations implementing adjacent nodes and edges between them k To show that:
c k =σ(W*(x uk +x vk )*m k +b);
the kth side l k Is m k And l k The characteristic data of the adjacent nodes at two ends are x respectively uk And x vk W and b are the weight and bias, respectively, in a linear function, and σ represents the activation function.
The application relates to another quantum graph neural network, which comprises:
a variational quantum line for aggregating node feature data and edge feature data of a graph neural network, having a pair of lines and the pair of lines being entangled by controlled gates, the controlled gates of any one line being controlled by the other line;
and through the entanglement coupling effect, the edge characteristic data of one edge and the node characteristic data of the adjacent nodes at two ends of the edge are fused with each other and aggregated into a combined characteristic.
The above-mentioned quantum graph neural network, wherein:
the pair of lines includes first and second lines;
in the first line: the angle parameter of the front-stage Pauli revolving door comprises node characteristic data of a node, the angle parameter of the controlled door comprises edge characteristic data, and the angle parameter of the rear-stage Pauli revolving door comprises the weight of a linear function of a graph neural network;
in the second circuit: the angle parameter of the front-stage Pauli revolving door comprises node characteristic data of another node, the angle parameter of the controlled door comprises edge characteristic data, and the angle parameter of the rear-stage Pauli revolving door comprises weight of a linear function of a graph neural network.
The application relates to a method for realizing a quantum graph neural network, wherein:
the node characteristic data of one node is transmitted into the rotation parameter of the preceding stage pauli revolving door of the first line, and the node characteristic data of the other node is transmitted into the rotation parameter of the preceding stage pauli revolving door of the second line;
transmitting edge characteristic data of an edge between the two nodes to rotation parameters of respective controlled doors of the first and second lines;
defining that the controlled door arranged on either one of the first and second lines is controlled by the other;
and introducing weights into rotation parameters of the subsequent-stage Pauli revolving doors of the first line and the second line respectively, and aggregating edge characteristic data of one edge and node characteristic data of adjacent nodes at two ends of the edge by using a preset linear function with the weights.
With the advent of quantum computing, the present application proposes a space-domain based Quantum Graph Neural Network (QGNN).
The application has the following advantages:
the data expression capability based on the quantum bit is better, for example, the node characteristics are expressed in the form of a directed graph or an undirected graph, and the node properties can be more accurately predicted by the operation of mixing quantum data in the expression process. Given some known nodes, the properties of their whole or aggregated groups can be predicted.
The quantum graph neural network algorithm can process data characteristics on quantum computing equipment and quantum chips in a highly parallel mode, and the non-blocking parallel processing capacity is much stronger than that of traditional blocking serial processing and exponentially increases.
Compared with the classical algorithm, the quantum-classical mixed algorithm/full quantum algorithm of the quantum graph neural network algorithm has wider application scenes, and the node number and the edge connection relation have very large flexible configuration freedom.
The model based on the parameterized quantum circuit can be converged to a stable state more quickly in the training process, and particularly, the parameters of the quantum circuit are objects which are easy to update and train, such as the rotation angle of a revolving door.
Compared with the traditional prediction method, the method greatly reduces the quantity of parameters needing to be trained; the number of used storage media, namely quantum bits, is greatly reduced; a model based on parameterized quantum wires that can iterate faster to an optimal state during the training process. Meanwhile, the prediction method algorithm can highly and parallelly process data characteristics on quantum computing equipment and quantum chip equivalent sub hardware, and has higher computational power than a classical algorithm.
It is an object of embodiments of the present application to provide a model of a mixture of quantum wires and classical neural networks for modeling graph structure data. Compared with the traditional classical graph neural network model, the method can reduce the quantity of parameters to be trained, and solves the bottleneck of the traditional graph neural network by using the high parallel characteristic of quantum computation.
The method for training the quantum circuit to model the sequence and time-dependent data is developed by using the quantum computing method, and the model learning capacity and the operation efficiency are effectively improved by using the quantum computing method.
Drawings
To make the above objects, features and advantages more comprehensible, embodiments accompanied with figures are described in detail below, and features and advantages of the present application will become apparent upon reading the following detailed description and upon reference to the following figures.
FIG. 1 is a structural diagram of the neural network transformation of the current spatial domain-based graph.
Fig. 2 is a schematic diagram of a general structure of a conventional scheme of a variational quantum wire.
Fig. 3 is a diagram of a particular variational quantum wire design as newly devised in the present application.
Fig. 4 is a diagram of mapping of feature data and edge feature data of a node to a quantum wire.
Fig. 5 is an optimization of weight parameters using an optimizer in a neural network.
Detailed Description
The present invention will be described more fully hereinafter with reference to the accompanying examples, which are intended to illustrate and not to limit the invention, but those skilled in the art, on the basis of which they may obtain without inventive faculty, without departing from the scope of the invention.
Referring to fig. 1, the transformation concept of a space-based graph neural network is illustrated, which is still derived from a traditional neural network but differs: the space-based graph neural network QGNN focuses on defining the graph neural network based on the spatial relationships between the nodes. For example, taking aggregation 101 and aggregation 102 as an example, for a general graph, a central node representation and all neighboring node representations are aggregated based on spatial graph convolution to obtain a new representation of the node.
Referring to fig. 1, a spatial domain based Neural network (Graph Neural Networks) is introduced from two aspects of spectral domain Graph convolution and spatial domain Graph convolution. The spectrum domain graph convolution is based on the graph theory and convolution theorem to convert the data from the space domain to the spectrum domain for processing. The spatial domain graph convolution does not depend on the graph convolution theory, and the convolution operation is directly defined on the space, so that the spatial domain graph convolution has strong flexibility. The spectral domain is not suitable for directed graphs because the basis used for the spectral domain fourier transform is the eigenvectors of the laplacian matrix, which is only meaningful in undirected graphs. The graph convolution structure of the spectral domain is fixed so that adding a delete node or adding a delete link will make the previously trained model ineffective. In the convolution of the spectrum domain graph, once the graph structure is transformed, the adjacency matrix, the node degree matrix and the Laplace matrix are changed, the characteristic vector of the Laplace matrix is also changed, and finally, various parameters of the original trained neural network are invalid.
Referring to fig. 1, the spatial graph convolution aggregates the representation of the center node (e.g., N1) and all neighboring node representations (e.g., all neighboring nodes of N1) to obtain a new representation of the node (e.g., NX), as at aggregate 101'.
Referring to fig. 1, the spatial graph convolution aggregates a representation of a center node (e.g., N2) and a representation of all neighboring nodes (e.g., all neighboring nodes of N2) to obtain a new representation of the node (e.g., NY), as at aggregate 102'.
Referring to fig. 1, a description of the classical spatial domain-based GNN principle and the variational quantum circuit will be given to lay the foundation for the following discussion of the quantized QGNNs. The time complexity of the original version of the spectral domain convolution is high due to the need to perform eigen decomposition on the laplacian matrix, and although the improved version of the spectral domain convolution does not need to perform matrix decomposition, the number of parameters available for learning becomes small and the accompanying complexity of the model is reduced, and the expression capability is insufficient. The spatial domain-based graph neural network can exert characteristics of strong flexibility on the basis of quantization.
Referring to fig. 1, the space-based graph neural network is not limited to the illustrated numbers and adjacency relations, and the aggregation process and the new node generation process of the graph neural network are only exemplarily given based on the node space relations in the graph, and the whole process can be split into two main parts, namely leading node information propagation and node domain information aggregation.
Referring to fig. 1, regarding the dominating node information dissemination: traversing each edge, aggregating node information at two ends of each edge and characteristics of the edge, performing a linear function, performing an activation function, and finally obtaining a group of characteristics by combining each group of edges and points. Taking aggregation 101-102, etc., as an example, a set of combination features may be obtained.
By a k Denotes the kth edge, l k =(u k ,v k ,m k ) Wherein u is k Indicating the head node number of the kth edge and v k Then the number of the terminal node of the kth edge is indicated, and m k Representing the edge characteristics of the kth edge.
c k =σ(W*(x uk +x vk )*m k +b)。
C combination of features k Is an edge l k Characteristic m of k And characteristic x of nodes at both ends thereof uk And x vk The combination of features of (1).
σ for the combined feature is the activation function.
W of the combined features is a weight in the linear function.
X of combination feature uk Representing the head node characteristics of the kth edge.
X of combination feature vk Representing the terminal node characteristics of the kth edge.
B of the combined signature represents the bias in the linear function.
Referring to fig. 1, information propagation of each dominating node is taken as an example in the aggregation 102: traversing each edge, aggregating node information at two ends of each edge and the characteristics of the edge, then performing a linear function, and finally obtaining a group of characteristics by combining each group of edges and points through an activation function sigma. Such as a limited 4-node 3-edge feature.
By using 1 Denotes the 1 st edge, l 1 =(u 1 ,v 1 ,m 1 ),u 1 Number of head node representing No. 1 edge and v 1 Then the number of the end node of the 1 st edge, m, is indicated 1 Representing the edge characteristics of edge 1.
c 1 =σ(W*(x u1 +x v1 )*m 1 +b1)。
c 1 Is an edge l 1 Feature m of 1 And the characteristics x of its two end nodes (e.g. N2 and its adjacent nodes) u1 And x v1 A combination of (a) and (b).
x u1 Representing the head node characteristic of edge 1 (e.g., one adjacent node to N2).
x v1 Representing the end node characteristics of edge 1 (e.g., N2 itself).
B1 of the combined feature represents the bias in the linear function.
By using 2 Denotes edge 2, l 2 =(u 2 ,v 2 ,m 2 ),u 2 Number of head node representing 2 nd edge and v 2 Then the number of the end node of the 2 nd edge, m, is indicated 2 To representEdge feature of edge 2.
c 2 =σ(W*(x u2 +x v2 )*m 2 +b2)。
By using 3 Denotes edge 3, l 3 =(u 3 ,v 3 ,m 3 ),u 3 Indicating the head node number of edge 3 and v 3 Then the sequence number of the end node of edge 3, m, is indicated 3 Representing the edge characteristics of the 3 rd edge.
c 3 =σ(W*(x u3 +x v3 )*m 3 +b3)。
The above is an exemplary explanation in which a feature is obtained by a combination of a single edge and points at both ends thereof.
Referring to fig. 1, regarding node domain information aggregation: after traversing each edge and getting the combined features of any set of edges and points, there is now one for c k Set c of (a). In order to obtain the update characteristic of a node, the node needs to be aggregated with the characteristics of all fields (adjacent edges and adjacent nodes), and a function formula (node field information aggregation x) i ) Expressed as follows:
Figure BDA0003644150040000071
as previously known, l k Denotes the kth edge, l k =(u k ,v k ,m k ) Wherein u is k Number of head node indicating kth edge and v k Number of terminal node representing k-th edge, m k Representing the edge characteristics of the kth edge.
As previously known, c k Is an edge l k Feature m of k And characteristic x of nodes at two ends thereof uk And x vk The combination of features of (1).
In addition, e represents the set of adjacent edges of each node, e i Representing the set of adjacent edges of the ith node.
Referring to fig. 1, the transition from original polymerization 101 to new polymerization 101': firstly, neighbor node information is transmitted, each edge is traversed and two ends of each edge are aggregatedThen through a linear function and then through an activation function, finally a set of characteristics (such as a set c) can be obtained by combining each set of edges and points 1 ,c 2 ,c 3 )。
Referring to fig. 1, the transition from original polymerization 101 to new polymerization 101': then, the node field information is aggregated, and after traversing each edge and obtaining the combination characteristics of any group of edges and points, the information is related to c k Set c of (a). To obtain the updated characteristics of the node N1, such as to obtain NX, the node N1 and the characteristics of all the fields (neighboring edges and neighboring nodes) need to be aggregated.
Referring to fig. 1, the same is true for the transition from the original aggregate 102 to the new aggregate 102'. So far, it can be understood that: the space-based graph neural network is defined based on the spatial relation of nodes, and for a common graph, the spatial graph convolution aggregates the representation of a central node (N1/N2) and the representation of all adjacent nodes to obtain a new representation (NX/NY) of the nodes.
Referring to fig. 2, as related to quantum herein, the relevant matters regarding quantum devices and quantum data are as follows.
The term "quantum device" used herein includes known quantum computing devices, quantum chips, and the like, and quantum hardware may be used instead of the term "quantum device". Typical "quantum devices" include, but are not limited to: quantum computers, quantum information processing systems or quantum cryptography systems, quantum simulators, all kinds of devices, apparatuses and machines that process quantum data.
By "quantum data" herein is meant information or data carried, held or stored by a quantum system, the smallest nontrivial system being a qubit, i.e., a system that defines a quantum information unit. It should be understood that the term "qubit" includes all quantum systems that can be appropriately approximated as two-level systems in the respective context. Such quantum systems typically include, for example, typical atomic, electronic, photonic, ionic, or superconducting qubits, and the like.
Referring to fig. 2, assuming that there are n qubit inputs, n quantum circuits are correspondingly used. Many qubits can be represented by q1-qn, n being a positive integer. For example, the number n of selected quantum bits is equal to 4 in the figure. A universal set of gates (univorsal set) is usually formed by single-quantum-bit gates and controlled gates. If n is equal to 3, it is represented by q0-q 3.
Referring to fig. 2, with respect to a variational quantum wire, a variational quantum wire (VQC) is a quantum wire and it has adjustable parameters, which can be iteratively optimized by an optimization algorithm. Fig. 2 shows a conventional quantum wire structure.
Referring to fig. 2, the u (x) module is in the encoding stage, which is responsible for encoding classical input data into quantum state x and does not essentially need to be conditioned. Such as encoding for the number of quantum bits |0> for four or other bits.
Referring to FIG. 2, the V (θ) module is in the variation phase, with a parameter θ that can be adjusted by the optimization algorithm. And finally, measuring all or part of the qubits to obtain classical information output.
Referring to fig. 2, M1-M4 of each quantum wire configuration is the part that measures the state of a qubit.
Referring to fig. 2, studies have demonstrated that such a circuit has the advantage of combating quantum noise and is therefore suitable for noisy short-term medium-scale quantum computers. In practice VQC has been successfully applied in function approximation, classification to generate neural networks, etc. In addition, evidence shows that VQC is more expressive than classical neural networks, which refers to using limited parameters to fit a function or distribution. The use of VQC in GNN will allow for faster learning speed of the model, and the following description will be explained step by step with this as a core.
Referring to fig. 3, it is claimed in this application to replace the neighbor or intervening node information propagation operation of the classical graph neural network with a quantum wire that will function to aggregate one edge and its two end node features. In other words, the quantum circuit can achieve the task of aggregation based on the spatial domain Neural network (Graph Neural Networks), and the information propagation and node domain information aggregation of the neighbor nodes in fig. 1 are switched from the conventional scheme to the quantum circuit in fig. 3.
Referring to fig. 3, returning first to the aggregation process of fig. 1, the foregoing takes a limited 3-node 2 edge as an example and a limited 4-node 3 edge as another example. If the nodes and edges are thousands or even more, then a traditional classical computer is nearly as hard to handle such large data sizes. It is likely that quantum systems will only take hundreds of seconds to complete a computation and that the same computation will take about ten thousand years with today's most powerful supercomputers.
Referring to FIG. 3, the first quantum wire mainly includes a single-bit spin gate R x1 )R y2 )R z3 ) And also comprises a controlled door R x2 ) (controlled by the second quantum wire) corresponds to the qubit q0. Qubit q0 performs a quantum operation on a first quantum wire, and the controlled gate on the first quantum wire is controlled by a second quantum wire, R on the first quantum wire in the illustrated alternative embodiment x2 ) Controlled by a second quantum wire. Usually, M1 arranged on the first quantum wire is a part for measuring the state of a quantum bit.
Referring to FIG. 3, the second quantum wire mainly includes a single-bit spin gate R x4 )R y5 )R z6 ) And also comprises a controlled door R x1 ) (controlled by the first quantum wire) corresponds to the qubit q1. Qubit q1 performs a quantum operation on a second quantum wire, and the controlled gate on the second quantum wire is controlled by the R on the first, i.e., second, quantum wire in the illustrated alternative embodiment x1 ) Controlled by the first quantum wire. Usually, M2 arranged on the second quantum wire is a part for measuring the state of the qubit.
Referring to fig. 3, in a Quantum computation or Quantum wire computation model, a Quantum gate (Quantum gate) is the most basic logic gate unit, and the Quantum logic gate is represented by a unitary matrix. Similar to common logic gates, which typically operate on one or two bits, common quantum gates, which also operate on one or two quantum bits, etc. For example, the quantum gates may be represented by unitary matrices of the 2 × 2 or 4 × 4 type.
Referring to fig. 3, the first quantum wire further includes a single-bit spin gate R x1 )R y2 )R z3 ) And they are disposed at the rear side of the controlled door. For distinction by indication, the first line is a single-bit revolving gate R x1 )R y2 )R z3 ) Can be named as a front-stage single-bit revolving door, and simultaneously used as a comparison, a first line single-bit revolving door R x1 )R y2 )R z3 ) Can be named as a rear stage single-bit revolving door. M1 at the back side of the back stage swing gate measures the state of the qubit. This is the case for the placement of the preceding and succeeding single-bit turnstiles in the first quantum wire.
Referring to fig. 3, the second quantum wire further includes a single-bit rotation gate R x4 )R y5 )R z6 ) And they are disposed at the rear side of the controlled door. For distinction by indication, the second line is a single-bit revolving gate R x4 )R y5 )R z6 ) Can be named as a preceding-stage single-bit revolving door, and simultaneously used as a comparison, a second line single-bit revolving door R x4 )R y5 )R z6 ) Can be named as a rear-stage single-bit revolving door. M2 at the back of the back stage of the rotating gate measures the state of the qubit. This is the case of the arrangement of the preceding and following single-bit spin gates in the second quantum wire.
Referring to fig. 3, the front stage swing gate includes swing gates that respectively rotate along X, Y, and Z axes. The parameter theta of unitary transformation at least comprises the rotation angle theta of each of three gates in the single-bit revolving gate 1 、θ 2 、θ 3 Or theta 4 、θ 5 、θ 6 . Unitary transformations are characterized by parameterized rotations that can be combined into arbitrary single bit rotation operations.
Referring to FIG. 3, the gate R, of which the first line rotates along the X, Y, Z axes, respectively x1 ),R y2 ),R z3 ) Of a part of a variational quantum line but with an angle parameter theta 1 ~θ 3 May not be actively optimized.
Referring to FIG. 3, the controlled gate R of the first line x2 ) Angle parameter a of 2 May vary but may not be actively optimized.
Referring to FIG. 3, the gate R, of which the first line rotates along the X, Y, Z axes, respectively x1 ),R y2 ),R z3 ) Also part of a variational quantum wire but with an angle parameter beta 1 ~β 3 Active de-optimization is required.
Referring to fig. 3, the rear stage swing door includes swing doors that are respectively rotated along X, Y, and Z axes. The parameter beta of unitary transformation at least comprises the respective rotation angles beta of three gates in a single-bit revolving gate 1 、β 2 、β 3 Or beta 4 、β 5 、β 6
Referring to FIG. 3, the second line is a gate R rotating along the X, Y, Z axes, respectively x4 ),R y5 ),R z6 ) Of a part of a variational quantum line but with an angle parameter theta 4 ~θ 6 May not be actively optimized.
Referring to FIG. 3, the controlled gate R of the second line x1 ) Angle parameter alpha of 1 Will vary but may not be actively optimized.
Referring to FIG. 3, the second line is a gate R rotating along X, Y, Z axes, respectively x4 ),R y5 ),R z6 ) Also part of a variational quantum wire but with an angle parameter beta 4 ~β 6 Active de-optimization is required.
Referring to FIG. 3, the first to process the quantum data q0-q1 is usually Hadamard gate H (Hadamard), which is usually used for substrate transformation from a linear space perspective.
Referring to fig. 3, in an optional but not necessary implementation, each qubit, e.g., qn, is treated as a Target bit (i.e., target qubit) after being rotated by a preceding one-bit rotating gate, and a controlled operation is performed by a controlled not gate, and a Control bit (i.e., control qubit) of the controlled operation is selected from other qubits, e.g., a controlled gate of a 1 st qubit is controlled by a 2 nd qubit, and a controlled gate of a 2 nd qubit is controlled by a 1 st qubit. I.e. entanglement is created between any pair of qubits by controlled gates, where the controlled gate of one qubit is controlled by the other qubit. Different quantum wires are coupled into a ring through a plurality of controlled gates, the information of other quantum wires is merged into each quantum wire, and the effect of global entanglement is achieved among a plurality of quantum wires.
Referring to fig. 3, quantum data q0-q1 (e.g., some matrices in fig. 1 encoded into quantum data) are sent to predetermined quantum wires for quantum evolution, and the evolution results of quantum data q0-q1 are measured (e.g., M1-M2 measurement layers) to obtain classical data (e.g., as measured in fig. 2). The predetermined quantum wire may employ the quantum wire of fig. 3. It is within the scope of the prior art how to process quantum data using well-designed quantum wires. Quantum wires of fig. 3: the input is coded quantum state data, the output is an evolved quantum state subjected to a series of unitary operations, a parameterized Pauli revolving gate is used as a learnable parameter of a neural network, and quantum state entanglement is realized through a controlled gate (representing that two nodes have a connection relation).
Referring to fig. 3, the quantum wires are then required to use quantum measurement layers (e.g., M1-M2), the coherent superposition of quantum states of two-particle systems is called entanglement, and the process of converting a quantum state from a superposition state to a fundamental state is called collapse of the quantum state, as is the effect of the measurement layers M1-M2. For the measuring layer, the quantum information may be in a superimposed state of two basic states and until it is measured to collapse to a certain basic state.
Referring to fig. 3, the measurement layer here: and returning the state of the quantum state representing the characteristic values of the nodes at two ends of each group of edges after evolution through unitary transformation, and obtaining the state through a measurement function, wherein the state is also a matrix with the size of (4, 4). After the data sets of all edges are calculated, the obtained (4, 4) matrices are multiplied to represent the whole graph feature fusion. In the example, three (4, 4) matrices are dot multiplied to finally obtain a (4, 4) size matrix.
Referring to fig. 3, in an alternative embodiment, the quantum wires in the figure are variational quantum wires, i.e. optimizable parametric quantum wire sections, and wherein β i Is an optimizable parameter (e.g. parameter beta) 1 ~β 3 And beta 4 ~β 6 )。
Referring to FIG. 3, in an alternative embodiment, θ i The input of the data is processed node feature data (the data dimension of a node feature after the classical data processing is (1, 3), such as a parameter theta 1 ~θ 3 And theta 4 ~θ 6 )。
Referring to FIG. 3, in an alternative embodiment, α i The characteristic data of the processed edge (the data dimension of the characteristic of the edge after the classical data processing is (1, 1) is transmitted in (1), such as the parameter alpha 1 And alpha 2 )。
Referring to FIG. 3, in an alternative embodiment, β i The weight parameters that need to be optimized are passed in.
Referring to FIG. 3, in an alternative embodiment, after each iteration, the node feature and the edge feature, θ, are i ,α i Will change but they do not belong to the parameters that can be optimized and do not participate in the back propagation.
Referring to fig. 3, in an alternative embodiment, the present application embodiments relate generally to the field of quantum computing, and more particularly to training of quantum computing artificial intelligence hybrid models. The advantages of the present application are as follows.
The quantum graph neural network algorithm can process data characteristics on quantum computing equipment and quantum chips in a highly parallel mode, and the non-blocking parallel processing capacity is much stronger than that of the traditional blocking serial processing and is exponentially increased.
Compared with the classical algorithm, the quantum-classical mixed algorithm/full quantum algorithm of the quantum graph neural network algorithm has wider application scenes, and the node number and the edge connection relation have very large flexible configuration freedom.
The model based on the parameterization quantum circuit can be converged to a stable state more quickly in the training process, and particularly, the parameters of the quantum circuit are objects which are easy to update and train, such as the rotation angle of the revolving door.
Compared with the traditional prediction method, the method greatly reduces the quantity of parameters needing to be trained; the number of used storage media, namely quantum bits, is greatly reduced; a model based on parameterized quantum wires that can iterate faster to an optimal state during the training process. Meanwhile, the prediction method algorithm can process data characteristics on quantum computing equipment and quantum chips and other quantum hardware in a high degree and parallel mode, and has higher calculation power than a classical algorithm.
Referring to fig. 3, the classical gate diagram neural network algorithm is a research hotspot in the field of artificial intelligence, and is often applied to various application scenarios, such as biomedicine, materials, neuroscience, and the like, however, the operation of these models consumes a large amount of computing resources. In the past, the computational resources for algorithm operation were mainly provided by the chips of the integrated circuits, and as the electron tunneling effect restricts the process to approach the nanometer limit, the computational power is difficult to be continuously improved. The quantum computing chip is a complement to the computing mode of the electronic chip, however, the operation of the classical graph neural network algorithm on the quantum chip cannot be processed according to the mode of the classical graph neural network algorithm on the electronic chip.
Referring to fig. 3, the quantum graph neural network provided by the application replaces the matrix multiplication which most occupies the computing resources with a variational quantum circuit, and can be handed to a quantum computer for processing, so that the overall operation speed of the algorithm is greatly increased. With the advent of large-scale quantum computers, quantum graph neural networks will be able to process graph structure data faster than classical graph neural networks, noting that classical computers have difficulty coping with excessive operations.
Referring to fig. 3, the process of constructing a quantum wire is mainly a two-part quantum wire.
First is a parameterized quantum wire: the input is encoded data (now quantum states) and the output is evolved quantum states undergoing a series of unitary operations. Parameterized pauli turnstiles are included as learnable parameters for neural networks. Quantum state entanglement (representing that two nodes have a connected relationship) is achieved by controlled gates.
The second is a quantum measurement layer: the state of the quantum state of the characteristic value of the node at two ends of each group of edges after evolution after unitary transformation is returned, and the state is obtained by a measuring function and is also a matrix with the size of (4, 4). After the calculation of the data sets for all edges is completed, the resulting (4, 4) matrices are multiplied, representing the whole graph feature fusion, in the exemplary case three (4, 4) matrix point multiplications, resulting in a (4, 4) size matrix.
In an alternative example, a classical matrix obtained by quantum wire and quantum data conversion is passed through a softmax function in a classical computer, and the output is a prediction probability for each type of property of the measurement result. For example, in the example given in the present application, two values of the probability that the property of the measurement result is 0 and the probability that the property of the measurement result is 1 are expected to be obtained.
Referring to fig. 3, an illustration of the quantum-based graph neural network model optimization section: knowing the results of the model prediction and the target label, one can choose to use the MSE loss function, and an Adam optimizer, the optimization of the model involving the parameters in a parameterized quantum chain (such as the unitary transform parameter R (β) 1 ~β 3 ) And R (. Beta.) 4 ~β 6 ) ) are optimized.
Referring to fig. 4, the population node information propagation operation of the graph neural network is implemented using quantum wires that will function to aggregate one edge and its two end node features. The quantum graph neural network includes a variational quantum wire for aggregating node characteristic data and edge characteristic data of the graph neural network, the quantum wire including first and second wires, thereby realizing an information propagation operation between adjacent nodes with edges connected in between.
Referring to FIG. 4, the first circuit is arranged with a first set of turnstiles, such as R x1 ),R y2 ),R z3 ) First class parameters for characterizing node characteristic data (e.g., node characteristic data class parameters of neighbor point N0 of node N2) and a first set of turnstilesBy rotating the angle (e.g. angle parameter θ) 1 ~θ 3 ) To indicate. This is optional but not necessary.
Referring to FIG. 4, the second circuit is arranged with a first set of turnstiles such as R x4 ),R y5 ),R z6 ) The first type of parameter used to characterize the node characteristic data (e.g., the node characteristic data type parameter of the node itself, node N2) is based on the rotation angle of the first set of turnstiles (e.g., the angle parameter θ 4 ~θ 6 ) To indicate. This is optional but not necessary.
Referring to fig. 4, the first circuit is provided with a controlled door such as R x2 ) The controlled gate arranged on the first line is controlled by the remaining second line, and the second type of parameter characterizing the edge characteristic data (for example, N0 points to the edge l of N2) 02 Edge feature data class parameters) to control the door R x2 ) Angle of rotation alpha of 2 The manner of (c) is shown. This is optional but not necessary.
Referring to fig. 4, the second line is provided with a controlled door such as R x1 ) The controlled gate arranged on the second line is controlled by the remaining first line, and the second type of parameter characterizing the edge characteristic data (for example, N2 points to the edge l of N0 20 Edge feature data class parameters) to control the door R x1 ) Angle of rotation alpha of 1 The manner of (c) is shown. This is optional but not necessary.
Referring to FIG. 4, the first circuit is arranged with a second set of turnstiles, such as R x1 ),R y2 ),R z3 ) Aggregating the linear functions of the feature data of two adjacent nodes at two ends of the edge (such as feature data of N0/N2) and the edge feature data of the edge (such as the edge between N0/N2) itself, such as c k By weight of (e.g. W) with rotation angle of (e.g. beta) 1 ~β 3 And (4) showing. This is optional but not necessary.
Referring to FIG. 4, the second circuit is arranged with a second set of turnstiles such as R x4 ),R y5 ),R z6 ) Feature number of two adjacent nodes at two ends of aggregation edgeA linear function such as c based on (e.g., N0/N2 feature data) and edge feature data of the edge itself (e.g., the edge between N0/N2) k By weight of (e.g. W) with rotation angle of (e.g. beta) 4 ~β 6 And (4) showing. This is optional but not necessary.
Referring to FIG. 4, the order of processing qubit q0 on the first line is, in order, a first set of rotating and controlled gates and a second set of rotating gates, R x1 ),R y2 ),R z3 )、R x2 )、R x1 ),R y2 ),R z3 )。
Referring to FIG. 4, the order in which qubit q1 is processed on the second line is a first set of rotating and controlled gates and a second set of rotating gates, R x4 ),R y5 ),R z6 )、R x1 )、R x4 ),R y5 ),R z6 )。
Referring to fig. 5, attention needs to be paid to the optimizable part of the parametric quantum wire for the variational quantum wire. Beta is a beta i Are some parameters that need to be optimized. The first set of revolving and controlled doors does not have such optimization requirements. Therefore, the method is characterized in that: when the difference of the predicted result and the label of the quantum graph neural network is measured by using the loss function, the difference is subjected to back propagation calculation, and an optimizer is used for optimizing the parameters of the second group of revolving gates (for example, optimizing beta) i =β 1 ~β 3 And optimizing beta i =β 4 ~β 6 )。
Referring to FIG. 5, for the first set of turnstiles, θ i The processed node feature data (e.g., the data dimension of the node feature after the classical data processing is (1, 3)) is transmitted into the data processing system.
See fig. 5, for an intermediate controlled door, α i The input of (1) is processed edge feature data (e.g., the dimension of the edge feature data of an edge after the classical data processing is (1, 1)).
Referring to FIG. 5, for the second set of turnstiles, β i The weight parameters that need to be optimized are passed in.
Referring to fig. 5, the optimization process is referred to by process Opti. It is noted here that after each iteration, the node features and the edge features, i.e., θ i ,α i They do change, but they do not belong to optimizable parameters and do not participate in back propagation, as opposed to the weight parameters changing after each iteration (e.g., the process of the β → β' iteration of weights).
Referring to fig. 5, the quantum graph neural network includes: a variational quantum line for aggregating node feature data and edge feature data of a graph neural network, having a pair of lines and the pair of lines being entangled by controlled gates, the controlled gate of any one line being controlled by the other line; and through the entanglement coupling effect, the edge characteristic data of one edge and the node characteristic data of the adjacent nodes at two ends of the edge are fused with each other and aggregated into a combined characteristic.
Referring to fig. 5, in the first line of the quantum graph neural network: the angle parameter of the front-stage pauli revolving door comprises node characteristic data of a node, the angle parameter of the controlled door comprises edge characteristic data, and the angle parameter of the rear-stage pauli revolving door comprises the weight of a linear function of a graph neural network.
Referring to fig. 5, in the second line of the quantum graph neural network: the angle parameter of the front-stage Pauli revolving door comprises node characteristic data of another node, the angle parameter of the controlled door comprises edge characteristic data, and the angle parameter of the rear-stage Pauli revolving door comprises weight of a linear function of a graph neural network.
Referring to fig. 5, a method of implementing a quantitative subgraph neural network, comprising: transmitting the node characteristic data of one node into the rotation parameters of the preceding-stage pauli revolving door of the first line, and transmitting the node characteristic data of the other node into the rotation parameters of the preceding-stage pauli revolving door of the second line; transmitting edge characteristic data of an edge between the two nodes to rotation parameters of respective controlled doors of the first and second lines; at the same time, the controlled door disposed on either one of the first line and the second line is defined to be controlled by the other. Weights are introduced into rotation parameters of the respective rear-stage Pauli revolving doors of the first line and the second line, and edge characteristic data of one edge and node characteristic data of adjacent nodes at two ends of the edge are aggregated by using a preset linear function with the weights.
Referring to fig. 5, when the difference between the predicted result of the quantum graph neural network and the label is measured by using the loss function, the difference is subjected to back propagation calculation and an optimizer is used for optimizing the parameter beta of the second group of revolving gates i During which the rotation parameter theta of the first group of Pauli revolving doors and controlled doors i ,α i Etc. are not optimized and do not participate in back propagation.
While the above specification teaches the preferred embodiments with a certain degree of particularity, there is shown in the drawings and will herein be described in detail a presently preferred embodiment with the understanding that the present disclosure is to be considered as an exemplification of the principles of the invention and is not intended to limit the invention to the specific embodiment illustrated. Various alterations and modifications will no doubt become apparent to those skilled in the art after having read the above description. Therefore, the appended claims should be construed to cover all such variations and modifications as fall within the true spirit and scope of the invention. Any and all equivalent ranges and contents within the scope of the claims should be considered to be within the intent and scope of the present invention.

Claims (11)

1. A quantum graph neural network, comprising:
and the variational quantum circuit is used for aggregating the node characteristic data and the edge characteristic data of the graph neural network so as to realize the information propagation operation between adjacent nodes connected with edges in the middle.
2. The quantum graph neural network of claim 1, wherein:
the variational quantum wire comprises a pair of wires, a first group of turnstiles is arranged on any single wire, and a first type of parameter for characterizing node characteristic data is represented by the rotation angle of the first group of turnstiles.
3. The quantum graph neural network of claim 2, wherein:
and the controlled door arranged on one line of the pair of lines is controlled by the other line of the pair of lines, and the second type of parameter representing the edge characteristic data is represented by the rotation angle of the controlled door.
4. The quantum graph neural network of claim 3, wherein:
and a second group of revolving doors are also arranged on any single line, and the weights of the linear functions of the node characteristic data of the adjacent nodes at the two ends of each edge and the edge characteristic data of the edge are aggregated and expressed in a mode of the rotating angle of the second group of revolving doors.
5. The quantum graph neural network of claim 2, wherein:
the first set of turnstiles comprises three parameterized pauli X, Y, Z turnstiles, whereby the node signature data is dimensioned to fit the number of three turnstiles (1, 3).
6. The quantum graph neural network of claim 3, wherein:
the controlled gates arranged on any single line comprise parameterized Pauli X revolving gates, whereby the dimensions of the edge feature data are set to be adapted to the number of one revolving gate (1, 1).
7. The quantum graph neural network of claim 4, wherein:
the second set of turnstiles comprises three parameterized pauli X, Y, Z turnstiles, whereby the dimensions of the weights are arranged to be adapted to the number of three turnstiles (1, 3).
8. The quantum graph neural network of claim 1, wherein:
linear function c for said information propagation operations implementing adjacent nodes and edges between them k To show that:
c k =σ(W*(x uk +x vk )*m k +b);
the kth side l k Is characterized by m k And l k The characteristic data of the adjacent nodes at two ends are x respectively uk And x vk W and b are the weight and bias, respectively, in a linear function, and σ represents the activation function.
9. A quantum graph neural network, comprising:
a variational quantum line for aggregating node feature data and edge feature data of a graph neural network, having a pair of lines and the pair of lines being entangled by controlled gates, the controlled gate of any one line being controlled by the other line;
and through the entanglement coupling effect, the edge characteristic data of one edge and the node characteristic data of the adjacent nodes at two ends of the edge are fused with each other and aggregated into a combined characteristic.
10. The quantum graph neural network of claim 9, wherein:
the pair of lines includes first and second lines;
in the first line: the angle parameter of the front-stage pauli revolving door comprises node characteristic data of a node, the angle parameter of the controlled door comprises edge characteristic data, and the angle parameter of the rear-stage pauli revolving door comprises the weight of a linear function of a graph neural network;
in the second circuit: the angle parameter of the front-stage Pauli revolving door comprises node characteristic data of another node, the angle parameter of the controlled door comprises edge characteristic data, and the angle parameter of the rear-stage Pauli revolving door comprises weight of a linear function of a graph neural network.
11. A method for realizing a quantitative subgraph neural network is characterized by comprising the following steps:
the node characteristic data of one node is transmitted into the rotation parameter of the preceding stage pauli revolving door of the first line, and the node characteristic data of the other node is transmitted into the rotation parameter of the preceding stage pauli revolving door of the second line;
transmitting edge characteristic data of an edge between the two nodes to rotation parameters of respective controlled doors of the first and second lines;
defining that the controlled door arranged on either one of the first and second lines is controlled by the other;
and (3) weights are input into rotation parameters of respective rear-stage Pauli revolving doors of the first line and the second line, and edge characteristic data of one edge and node characteristic data of adjacent nodes at two ends of the edge are aggregated by using a preset linear function with the weights.
CN202210525181.4A 2022-05-15 2022-05-15 Quantum subgraph neural network and method for realizing quantum subgraph neural network Pending CN115238852A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210525181.4A CN115238852A (en) 2022-05-15 2022-05-15 Quantum subgraph neural network and method for realizing quantum subgraph neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210525181.4A CN115238852A (en) 2022-05-15 2022-05-15 Quantum subgraph neural network and method for realizing quantum subgraph neural network

Publications (1)

Publication Number Publication Date
CN115238852A true CN115238852A (en) 2022-10-25

Family

ID=83667683

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210525181.4A Pending CN115238852A (en) 2022-05-15 2022-05-15 Quantum subgraph neural network and method for realizing quantum subgraph neural network

Country Status (1)

Country Link
CN (1) CN115238852A (en)

Similar Documents

Publication Publication Date Title
Gyongyosi et al. A survey on quantum computing technology
You et al. Graphrnn: Generating realistic graphs with deep auto-regressive models
Gupta et al. Quantum neural networks
CN113159239B (en) Method for processing graph data by quantum graph convolutional neural network
Hirata An efficient conversion of quantum circuits to a linear nearest neighbor architecture
WO2023082436A1 (en) Quantum computing task processing method and system, and computer device
Deibuk et al. Design of a ternary reversible/quantum adder using genetic algorithm
Hu et al. On the design of quantum graph convolutional neural network in the nisq-era and beyond
Ai et al. Decompositional quantum graph neural network
Yetiş et al. An improved and cost reduced quantum circuit generator approach for image encoding applications
Tchapet Njafa et al. Quantum associative memory with improved distributed queries
Ponce et al. Graph decomposition techniques for solving combinatorial optimization problems with variational quantum algorithms
CN114550849A (en) Method for solving chemical molecular property prediction based on quantum graph neural network
Tang et al. A Memory-efficient Simulation Method of Grover's Search Algorithm.
Schrodi et al. Construction of hierarchical neural architecture search spaces based on context-free grammars
CN115238852A (en) Quantum subgraph neural network and method for realizing quantum subgraph neural network
Devitt et al. Programming a topological quantum computer
Shah et al. Ancilla Driven Quantum Computation with arbitrary entangling strength
CN115862751A (en) Quantum chemistry property calculation method for updating polymerization attention mechanism based on edge features
Ma The stability of the generalized Hopfield networks in randomly asynchronous mode
Takeuchi et al. Ancilla-driven instantaneous quantum polynomial time circuit for quantum supremacy
CN114511097A (en) Mutual learning method and system based on quantum circuit
CN114519430A (en) Soft quantum neural network system and mode identification method
JP7341804B2 (en) Information processing device and information processing method
CN115983391A (en) Graph attention machine mechanism realization device based on quantum circuit

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination