CN112073126B - Method and device for ordering network node importance - Google Patents
Method and device for ordering network node importance Download PDFInfo
- Publication number
- CN112073126B CN112073126B CN202010821255.XA CN202010821255A CN112073126B CN 112073126 B CN112073126 B CN 112073126B CN 202010821255 A CN202010821255 A CN 202010821255A CN 112073126 B CN112073126 B CN 112073126B
- Authority
- CN
- China
- Prior art keywords
- node
- quantum
- importance
- network
- value
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000012163 sequencing technique Methods 0.000 claims abstract description 32
- 238000005516 engineering process Methods 0.000 claims abstract description 21
- 230000006870 function Effects 0.000 claims description 32
- 238000011156 evaluation Methods 0.000 claims description 30
- 239000002096 quantum dot Substances 0.000 claims description 29
- 239000011159 matrix material Substances 0.000 claims description 19
- 238000005381 potential energy Methods 0.000 claims description 18
- 238000004364 calculation method Methods 0.000 claims description 17
- 238000004590 computer program Methods 0.000 claims description 14
- 230000003993 interaction Effects 0.000 claims description 7
- 238000010276 construction Methods 0.000 claims description 5
- 230000007547 defect Effects 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 11
- 230000005283 ground state Effects 0.000 description 8
- 230000003068 static effect Effects 0.000 description 8
- 230000005540 biological transmission Effects 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 238000005259 measurement Methods 0.000 description 5
- 238000004422 calculation algorithm Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000036961 partial effect Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000011160 research Methods 0.000 description 3
- 238000004088 simulation Methods 0.000 description 3
- 208000035473 Communicable disease Diseases 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 2
- 230000021615 conjugation Effects 0.000 description 2
- 238000013210 evaluation model Methods 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 230000005610 quantum mechanics Effects 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 230000005428 wave function Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 201000010099 disease Diseases 0.000 description 1
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 208000015181 infectious disease Diseases 0.000 description 1
- 230000000670 limiting effect Effects 0.000 description 1
- 230000005541 medical transmission Effects 0.000 description 1
- 239000002184 metal Substances 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000006916 protein interaction Effects 0.000 description 1
- 230000005180 public health Effects 0.000 description 1
- 230000000284 resting effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 230000003313 weakening effect Effects 0.000 description 1
- 238000005303 weighing Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B10/00—Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
- H04B10/70—Photonic quantum communication
Landscapes
- Physics & Mathematics (AREA)
- Optics & Photonics (AREA)
- Electromagnetism (AREA)
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a sorting method and a device aiming at network node importance, wherein the method comprises the following steps: constructing quantum wires for carrying out importance ranking on the network nodes; wherein a quantum logic gate in the quantum wire comprises a variable parameter; updating variable parameters contained in the quantum wires by using a quantum virtual time evolution technology; and executing the updated quantum circuit and outputting a quantum state containing the node importance sequencing result. By utilizing the embodiment of the invention, the importance ranking of the network nodes can be realized through the quantum circuit in the field of quantum technology, and the defects of the prior art are overcome.
Description
Technical Field
The invention belongs to the technical field of quantum computing, and particularly relates to a method and a device for sequencing network node importance.
Background
In real life, many things exist in the form of systems, such as ecosystems, power systems, transportation systems, public health systems, etc., and these systems can be generally abstracted into networks for processing, for example: the food chain in the ecosystem can be abstracted to a network of predation relations among organisms, and the traffic system can be abstracted to a network of traffic communication relations among city nodes, and the like.
In recent years, complex networks have been increasingly focused, and particularly, many complex networks in real life exhibit different characteristics from previous network theories, such as non-scale characteristics, hierarchical characteristics, small-world effects and the like. By studying the network, the characteristics and functions of the corresponding system can be understood deeply. The continuous deepening of the network structure characteristics enables the research on the survivability and the reliability of the complex network to be made as follows: among the various social relationship networks, which are the most active, most influential people; in a communication network and a traffic network, which nodes bear the largest flow; the problem of … … and the like, which people are the most dangerous in the spread of diseases such as aids, relates to how to depict the positions of nodes in the network, namely the importance of the nodes of the network. Therefore, how to effectively identify and sequence important nodes in a complex network has a very practical value, and is a problem to be solved urgently.
Disclosure of Invention
The invention aims to provide a method and a device for sequencing network node importance, which are used for solving the defects in the prior art, can be applied to the field of quantum technology, realize sequencing of network node importance and make up for the defects in the prior art.
One embodiment of the present application provides a method for ranking importance of network nodes, including:
constructing quantum wires for carrying out importance ranking on the network nodes; wherein a quantum logic gate in the quantum wire comprises a variable parameter;
updating variable parameters contained in the quantum wires by using a quantum virtual time evolution technology;
and executing the updated quantum wires and outputting the quantum state containing the sequencing result of the network node importance.
Optionally, the constructing a quantum wire for ranking importance of network nodes includes:
determining a local importance value for evaluating the importance of the network node;
obtaining quantum bits with the quantity at least equal to the number of the nodes; wherein one of the nodes corresponds to one of the qubits;
and adding a preset quantum logic gate on the quantum bit according to the local importance value to obtain a quantum line for network node importance sorting.
Optionally, the determining a local importance value for evaluating the importance of the network node includes:
and calculating a second local irreplaceable value after the node is influenced by the connected nodes, wherein the calculation formula is as follows:
wherein, the Wij、WjiThe weight of the side i → j, the side j → i, the Dj、DiIs a first strength of node j, node i, the Uj、UiIs the first local irreplaceable value of the node j and the node i, the alpha represents the degree of importance of the node on the connected nodes, and alpha is more than or equal to 0 and less than or equal to 1, theIs the union of an ingress node and an egress node, saidIs a set of ingress nodes of node i, saidFor the outbound node set of node i, the Δ UjiTo embody intermediate parameters of node interaction, the methodThe node i is a second local irreplaceable value after being influenced by the connected nodes;
and calculating the second strength of the node after being influenced by the connected nodes, wherein the calculation formula is as follows:
wherein, theThe second strength is the second strength of the node i after being influenced by the connected nodes;
calculating a local importance value of the network node based on the second local irreplaceable value and the second strength.
Optionally, adding a preset quantum logic gate to the qubit according to the local importance value includes:
for each network node, according to the magnitude sequence of the local importance values, setting the quantum bit corresponding to the node as a control bit and the quantum bit corresponding to the node connected with the node as a target bit from the node corresponding to the maximum value in the local importance values;
adding an X gate operation to the control bit; wherein the X gate operation is a first quantum logic gate operation performed by the control bit;
adding a controlled RY gate operation controlled by the control bit to the target bit to delete an edge connecting nodes corresponding to the control bit and the target bit;
adding an RX gate operation to the control bit until all edges connected with the network node are deleted; wherein the RX gate operation is a last quantum logic gate operation performed for the control bit.
Optionally, the updating, by using the quantum virtual time evolution technique, the variable parameter included in the quantum line includes:
constructing an evaluation function model corresponding to the node network, and calculating a corresponding Hamilton quantity H according to the evaluation function model;
iteratively updating the variable parameters contained in the quantum logic gate in the quantum circuit for performing the importance ranking of the network nodes in the following updating mode until the difference value between the updated parameters and the parameters updated last time reaches a preset difference value range:
or,
wherein, theThe quantum state including the sorting result of the network node importance is output, wherein the quantum state is delta (k) ═ delta tau QkQ is 0.9 to 0.95, theAnd is a random value, theExpress getOf the symbol ofDifferential equations corresponding by imaginary time evolutionDetermining;
the coefficient matrix A and the heterogeneous term C for updating the parameters are respectively calculated by corresponding preset quantum circuits.
Optionally, the updating, by using the quantum virtual time evolution technique, the variable parameter included in the quantum line includes:
constructing an evaluation function model corresponding to the node network, and calculating a corresponding Hamilton quantity H according to the evaluation function model;
judging whether the current throwing times are smaller than the preset throwing times or not;
if the current throwing-up times are smaller than the preset throwing-up times, judging whether the current iteration times are smaller than the preset iteration times; meanwhile, adding 1 to the current throwing times;
if the number of iterations is less than the preset number of iterations, calculating a coefficient matrix A for updating the parameters according to a first preset quantum line, and calculating a heterogeneous term C for updating the parameters according to a second preset quantum line; if not, returning to the step of judging whether the current throwing times are smaller than the preset throwing times; meanwhile, adding 1 to the current iteration times;
updating variable parameters contained in a quantum logic gate in the quantum circuit for performing the network node importance ranking according to a preset updating rule; wherein the preset update rule is:
or,
wherein, theIs a variable parameter, where τ is time, Δ τ is a time interval, δ τ is a parameter update coefficient, and δ (k) is δ τ QkQ is 0.9 to 0.95, theAnd is a random value, theExpress getOf the symbol ofDifferential equations corresponding by imaginary time evolutionDetermining;
executing the quantum wire containing the current updated variable parameter, determining the end state of the quantum wire outputCorresponding expectation
And comparing the current expectation with the expectation obtained by the previous updating, recording a parameter value corresponding to the minimum expectation in the two expectations, and returning to the step of judging whether the current iteration number is less than the preset iteration number.
Optionally, the constructing an evaluation function model of the importance of the network node includes:
acquiring the weight W of edges connected among network nodes, and calculating a preset index value for evaluating the importance of the network nodes; wherein the preset index comprises: strength of nodes and local irreplaceability;
according to the preset index value, constructing an elastic potential energy model H corresponding to the network; wherein,
wherein, theAn out-node set representing node j, said WjiThe weight value of the side j → i connecting the node j and the node i, the Si and the SjTo quantify the importance value of the importance of node i and node j, T is the rest length of the elastic potential energy between node i and node j, and T is determined according to the strength and/or the local irreplaceability.
Optionally, the executing the updated quantum line outputs a quantum state including a result of the ranking of the importance of the network node, including:
and under the condition that the current throwing times are not less than the preset throwing times, executing a quantum circuit containing the parameter value corresponding to the minimum expectation, and outputting a quantum state containing the sequencing result of the network node importance.
Another embodiment of the present application provides a device for ranking importance of network nodes, including:
the construction module is used for constructing quantum wires for carrying out importance ranking on the network nodes; wherein a quantum logic gate in the quantum wire comprises a variable parameter;
the updating module is used for updating the variable parameters contained in the quantum circuit by using a quantum virtual time evolution technology;
and the output module is used for executing the updated quantum circuit and outputting the quantum state containing the sequencing result of the network node importance.
Optionally, the construction module includes:
a determining unit for determining a local importance value for evaluating the importance of a network node;
an obtaining unit, configured to obtain quantum bits with a quantity at least equal to the number of nodes; wherein one of the nodes corresponds to one of the qubits;
and the adding unit is used for adding a preset quantum logic gate on the quantum bit according to the local importance value to obtain a quantum line for network node importance sorting.
Optionally, the determining unit is specifically configured to:
and calculating a second local irreplaceable value after the node is influenced by the connected nodes, wherein the calculation formula is as follows:
wherein, the Wij、WjiThe weight of the side i → j, the side j → i, the Dj、DiIs a first strength of node j, node i, the Uj、UiIs the first local irreplaceable value of the node j and the node i, the alpha represents the degree of importance of the node on the connected nodes, and alpha is more than or equal to 0 and less than or equal to 1, theIs the union of an ingress node and an egress node, saidIs a set of ingress nodes of node i, saidFor the outbound node set of node i, the Δ UjiTo embody intermediate parameters of node interaction, the methodThe node i is a second local irreplaceable value after being influenced by the connected nodes;
and calculating the second strength of the node after being influenced by the connected nodes, wherein the calculation formula is as follows:
wherein, theThe second strength is the second strength of the node i after being influenced by the connected nodes;
calculating a local importance value of the network node based on the second local irreplaceable value and the second strength.
Optionally, the adding unit is specifically configured to:
for each network node, according to the magnitude sequence of the local importance values, setting the quantum bit corresponding to the node as a control bit and the quantum bit corresponding to the node connected with the node as a target bit from the node corresponding to the maximum value in the local importance values;
adding an X gate operation to the control bit; wherein the X gate operation is a first quantum logic gate operation performed by the control bit;
adding a controlled RY gate operation controlled by the control bit to the target bit to delete an edge connecting nodes corresponding to the control bit and the target bit;
adding an RX gate operation to the control bit until all edges connected with the network node are deleted; wherein the RX gate operation is a last quantum logic gate operation performed for the control bit.
Optionally, the update module is specifically configured to:
constructing an evaluation function model corresponding to the node network, and calculating a corresponding Hamilton quantity H according to the evaluation function model;
iteratively updating the variable parameters contained in the quantum logic gate in the quantum circuit for performing the importance ranking of the network nodes in the following updating mode until the difference value between the updated parameters and the parameters updated last time reaches a preset difference value range:
or,
wherein, theIs a variable parameter, where τ is time, Δ τ is a time interval, δ τ is a parameter update coefficient, and δ (k) is δ τ QkQ is 0.9 to 0.95, theAnd is a random value, theExpress getOf the symbol ofDifferential equations corresponding by imaginary time evolutionDetermining;
the coefficient matrix A and the heterogeneous term C for updating the parameters are respectively calculated by corresponding preset quantum circuits.
Optionally, the update module is specifically configured to:
constructing an evaluation function model corresponding to the node network, and calculating a corresponding Hamilton quantity H according to the evaluation function model;
judging whether the current throwing times are smaller than the preset throwing times or not;
if the current throwing-up times are smaller than the preset throwing-up times, judging whether the current iteration times are smaller than the preset iteration times; meanwhile, adding 1 to the current throwing times;
if the number of iterations is less than the preset number of iterations, calculating a coefficient matrix A for updating the parameters according to a first preset quantum line, and calculating a heterogeneous term C for updating the parameters according to a second preset quantum line; if not, returning to the step of judging whether the current throwing times are smaller than the preset throwing times; meanwhile, adding 1 to the current iteration times;
updating variable parameters contained in a quantum logic gate in the quantum circuit for performing the network node importance ranking according to a preset updating rule; wherein the preset update rule is:
or,
wherein, theIs a variable parameter, where τ is time, Δ τ is a time interval, δ τ is a parameter update coefficient, and δ (k) is δ τ QkQ is 0.9 to 0.95, theAnd is a random value, theExpress getOf the symbol ofDifferential equations corresponding by imaginary time evolutionDetermining;
executing the quantum wire containing the current updated variable parameter, determining the end state of the quantum wire outputCorresponding expectation
And comparing the current expectation with the expectation obtained by the previous updating, recording a parameter value corresponding to the minimum expectation in the two expectations, and returning to the step of judging whether the current iteration number is less than the preset iteration number.
Optionally, the update module is specifically configured to:
calculating a preset index value for evaluating the importance of the network node; wherein the preset index comprises: the weight W of the edges connected among the nodes, the strength of the nodes and the partial irreplaceability;
according to the preset index value, constructing an elastic potential energy model H corresponding to the network; wherein,
wherein, theAn out-node set representing node j, said WjiThe weight value of the edge j → i connecting the node j and the node i, SiThe SjTo quantify the importance value of the importance of node i and node j, T is the rest length of the elastic potential energy between node i and node j, and T is determined according to the strength and/or the local irreplaceability.
Optionally, the output module is specifically configured to:
and under the condition that the current throwing times are not less than the preset throwing times, executing a quantum circuit containing the parameter value corresponding to the minimum expectation, and outputting a quantum state containing the sequencing result of the network node importance.
A further embodiment of the application provides a storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the method of any of the above when executed.
Yet another embodiment of the present application provides an electronic device comprising a memory having a computer program stored therein and a processor configured to execute the computer program to perform the method of any of the above.
Compared with the prior art, the sorting method for the importance of the network nodes, provided by the invention, comprises the steps of firstly constructing quantum circuits for sorting the importance of the network nodes; wherein the quantum logic gate in the quantum wire comprises a variable parameter; updating variable parameters contained in the quantum circuit by using a quantum virtual time evolution technology; and executing the updated quantum circuit, and outputting a quantum state containing a node importance sequencing result, thereby realizing network node importance sequencing through the quantum circuit in the field of quantum technology and making up the defects of the prior art.
Drawings
Fig. 1 is a block diagram of a hardware structure of a computer terminal of a sorting method for network node importance according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a sorting method for network node importance according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a node network according to an embodiment of the present invention;
fig. 4 is a schematic diagram of another node network according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a quantum circuit for performing importance ranking of network nodes according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating a first predetermined quantum circuit according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating a second predetermined quantum wire according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a sorting apparatus for network node importance according to an embodiment of the present invention.
Detailed Description
The embodiments described below with reference to the drawings are illustrative only and should not be construed as limiting the invention.
In real life, most complex systems (such as social systems, biological systems, information systems, economic and financial network systems, electric power and traffic systems, infectious disease transmission systems, etc.) can be abstracted into the structure of the network, and the problems existing on the systems can be quantitatively described and solved by using the theory of the network. Sometimes we are concerned with important objects in the research system. For example, in the spread of infectious diseases, users want to find out which widely-contacted individuals want to isolate the individuals, and the widely-contacted individuals can be regarded as important network nodes.
The method has the advantages that the importance comprehensive evaluation is carried out on the complex network nodes, the problem of network influence maximization is explored, the theoretical significance is achieved, and the method has great application value in many fields, such as epidemic situation control, advertisement putting, communication network guarantee, prediction of popular research results, protein interaction and the like.
Based on this, the invention firstly introduces a method for constructing a network evaluation model, which can be applied to electronic equipment, such as computer terminals, specifically ordinary computers, quantum computers and the like.
This will be described in detail below by way of example as it would run on a computer terminal. Fig. 1 is a block diagram of a hardware structure of a computer terminal according to a method for ranking importance of network nodes according to an embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally, a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the computer terminal. For example, the computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to the ranking method for network node importance in the embodiment of the present application, and the processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 104, so as to implement the above-mentioned method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to a computer terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
It should be noted that a true quantum computer is a hybrid structure, which includes two major components: one part is a classic computer which is responsible for executing classic calculation and control; the other part is quantum equipment which is responsible for running a quantum program to further realize quantum computation. The quantum program is a string of instruction sequences which can run on a quantum computer and are written by a quantum language such as a Qrun language, so that the support of the operation of the quantum logic gate is realized, and the quantum computation is finally realized. In particular, a quantum program is a sequence of instructions that operate quantum logic gates in a time sequence.
In practical applications, due to the limited development of quantum device hardware, quantum computation simulation is usually required to verify quantum algorithms, quantum applications, and the like. The quantum computing simulation is a process of realizing the simulation operation of a quantum program corresponding to a specific problem by means of a virtual architecture (namely a quantum virtual machine) built by resources of a common computer. In general, it is necessary to build quantum programs for a particular problem. The quantum program referred in the embodiment of the invention is a program written in a classical language for representing quantum bits and evolution thereof, wherein the quantum bits, quantum logic gates and the like related to quantum computation are all represented by corresponding classical codes.
A quantum circuit, which is an embodiment of a quantum program and also a weighing sub-logic circuit, is the most common general quantum computation model, and represents a circuit that operates on a quantum bit under an abstract concept, and the circuit includes the quantum bit, a circuit (timeline), and various quantum logic gates, and finally, a result is often read through a quantum measurement operation.
Unlike conventional circuits that are connected by metal lines to pass either voltage or current signals, in quantum circuits, the lines can be viewed as being connected by time, i.e., the state of a qubit evolves naturally over time, in the process being operated on as indicated by the hamiltonian until a logic gate is encountered.
The quantum program refers to the total quantum circuit, wherein the total number of the quantum bits in the total quantum circuit is the same as the total number of the quantum bits of the quantum program. It can be understood that: a quantum program may consist of quantum wires, measurement operations for quantum bits in the quantum wires, registers to hold measurement results, and control flow nodes (jump instructions), and a quantum wire may contain tens to hundreds or even thousands of quantum logic gate operations. The execution process of the quantum program is a process executed for all the quantum logic gates according to a certain time sequence. It should be noted that timing is the time sequence in which the single quantum logic gate is executed.
It should be noted that in the classical calculation, the most basic unit is a bit, and the most basic control mode is a logic gate, and the purpose of the control circuit can be achieved through the combination of the logic gates. Similarly, the way qubits are handled is quantum logic gates. The quantum state can be evolved by using quantum logic gates, which are the basis for forming quantum circuits, including single-bit quantum logic gates, such as Hadamard gates (H gates, Hadamard gates), pauli-X gates (X gates), pauli-Y gates (Y gates), pauli-Z gates (Z gates), RX gates, RY gates, RZ gates, and the like; multi-bit quantum logic gates such as CNOT gates, CR gates, isswap gates, Toffoli gates, etc. Quantum logic gates are typically represented using unitary matrices, which are not only matrix-form but also an operation and transformation. The function of a general quantum logic gate on a quantum state is calculated by multiplying a unitary matrix by a matrix corresponding to a quantum state right vector.
Referring to fig. 1, fig. 1 is a schematic flowchart of a method for ranking importance of network nodes according to an embodiment of the present invention, and the method may include the following steps:
s201, constructing quantum lines for ranking the importance of the network nodes; wherein a quantum logic gate in the quantum wire comprises a variable parameter;
specifically, constructing a quantum wire for ranking the importance of network nodes may include:
a1, determining a local importance value for evaluating the importance of the network node;
specifically, the local importance value refers to a value of an index that affects the importance of a network node and is preset by a user as needed, and the reasonability and the calculation mode of the index of the local importance value are described below.
1. The node degree in the weighted directed network is also called the strength of the node, and is defined as the sum of the weights of the edges connected with the node, and the strength of the directed network is divided into the strength and the input strength according to the direction of the edges, namely:
wherein, Wij、WjiThe weights of side i → j and side j → i,is an ingress node set and an egress node set of the node i,Dithe incoming strength, the outgoing strength, and the total strength (first strength) of the node i.
2. For a weighted directed network graph G, in a local network centered on node i, there isIf the path j → i → k is the shortest path for the node j to reach the node k (i.e. the node j is not directly connected to the node k), the path is considered to be locally irreplaceable, and the total number of locally irreplaceable paths passing through the node i can be defined as the locally irreplaceable traffic Ri:
Wherein, is the set of outbound nodes for node j,set of ingress nodes, g, for node kjkFor calculating the intermediate parameter of the local irreplaceable path, if the node j is not directly connected with the node k, the intersection of the node set of the node j and the node set of the node kWhen a set includes node i, g jk1 indicates that there is a locally non-replaceable path through node i, otherwise it indicates no.
Taking the network diagram of fig. 3 as an example, the edges between nodes 0 and A, B, C, D, E, F, G, H are undirected, which can be understood as bi-directional connections between nodes. For node B and node E, available RB6, are respectively: ABC, CBA, ABE, EBA, ABD, DBA; rEBEH, HEB, CEG, GEC, DEF, FED, respectively, 6. If only by RiTo judge the importance of node i, then because RB=REThey were found to be equally important. However, as can be seen from the analysis of fig. 3, if the B point is deleted, the a point is disconnected from the rest of the nodes, and on the contrary, the deletion of the E point does not affect the connectivity between the other nodes in the graph, mainly because R is the node RiThe method is only a local index, and the information expressed by the local index is limited, so that the importance of the node cannot be effectively represented by the index alone.
3. For a weighted directed network graph G, in a local network centered on node i, there isIf all the paths from all the ingress nodes j to all the egress nodes k are totalThen a local uniqueness UR of node i can be definedi:
Continuing with the example of figure 3, with the example,the importance of point B is higher than that of point E, and this result is reasonable. However, URAIf only the local uniqueness index of the node is considered, the importance of the point a is greater than that of the point B, which is obviously unreasonable. At this time, RA=2,RBIf the local irreplaceable flow of the node is 6It is reasonable that the importance of point B is higher than that of point a. Thus, from the above analysis, neither of these two indicators can be used alone to evaluate node importance. The two nodes can be partially irreplaceable to different degrees, if only the former node is considered, the local uniqueness of the node cannot be embodied, and if only the latter node is considered, the local irreplaceable traffic of the node cannot be embodied.
4. In order to balance the local irreplaceable traffic RiAnd local uniqueness URiThese two indices may be used in combination. For a weighted directed graph G, a first locally irreplaceable value U of node i may be definedi:
Ui=Ri*URi
Continuing with fig. 3 as an example, the rationality of the index is verified, and UA ═ 2, UB ═ 3,that is, the importance of node A, B, E is B > A > E in the order of B > E as determined by the criterion of the first locally irreplaceable value, and this result is reasonable as seen in FIG. 3.
5. As can be seen from the above, the node importance is determined to some extent by each index (weight W, first intensity D, local irreplaceable flow rate R, local uniqueness UR, first local irreplaceable value U). However, the importance among the nodes is interactive, and the interactive effect can be reflected on each index, that is, when the index value of the node j is larger than that of the connected node i, the node j has an enhancing effect on the node i, and the node i has a weakening effect on the node j. Since the network is weighted in a directed manner, the degree of interaction between the nodes is related to these weights. The influence of the outgoing weight and the incoming weight on the node can be the same, the influence coefficient of the node j on the node i is the ratio of the sum of the outgoing weight and the incoming weight to the total weight of the node j, the influence coefficient of the node i on the node j is the ratio of the sum of the outgoing weight and the incoming weight to the total weight of the node i, and then a second local irreplaceable value of the node i after being influenced by the connected node j is defined
Wherein, UjAlpha represents the importance degree of the node on the connected nodes, alpha is more than or equal to 0 and less than or equal to 1, and delta U is the first local irreplaceable value of the node jjiIntermediate parameters for embodying node interactions (intermediate calculations involve, and are not meaningful, Δ D)jiIndicating the same reason),represented as the union of the ingress and egress nodes.
Similarly, a mutual influence formula of the strength is constructed, and the second strength of the node i after being influenced by the connected nodes is calculated
Wherein D isjIs the first strength of node j.
Finally, a local importance value of the network node is calculated based on the second local irreplaceable value and the second strength.
In particular, in one implementation, a local importance value of a network node may be calculated for a second local irreplaceable value and a second strengthμ1、μ2Is an influence factor of the local importance value, 0 is less than or equal to mu1≤1,0≤μ2≤1,μ1+μ 21. In fact, what the specific value obtained by the summation is not important, and what is important is the relative size of the local importance value of the node, so the determination of the local importance value is not limited to the summation operation, and the invention does not limit the operation.
In another implementation, the second locally non-substitutable value and the second intensity may be preprocessed first. Data preprocessing is usually an important preferred step in data analysis, and the preprocessed data values change, but the importance ranking of each network node is not affected, because the ranking is a relative comparison.
The second locally irreplaceable value may be treated as:
wherein, theA third locally irreplaceable value representing the processed node i, and p represents the number of classification categories of the node: for example, if nodes are classified into two classes according to importance, p is 2, the two classes are classified into unimportant and important, and importance may also be quantified, for example, importance of an unimportant node is set to 0 and importance of an important node is set to 1; or, if the nodes are classified into four classes, eight classes, and the like according to importance, p is 4, 8 … …;the maximum value and the minimum value in each second local irreplaceable value.
The second intensity may be treated as:
wherein,representing the processed third strength of node i,the maximum value and the minimum value of the second intensities.
Finally, for the third local irreplaceable value and the third intensity, a local importance value of the network node is calculatedμ1、μ2Is an influence factor of the local importance value, 0 is less than or equal to mu1≤1,0≤μ2≤1,μ1+μ2=1。
b1, obtaining quantum bits with quantity at least equal to the number of the nodes; wherein one of the nodes corresponds to one of the qubits;
specifically, the qubits whose number of user inputs is not less than the total number of network nodes can be obtained. In order to reduce the resource occupation of the quantum bits, the optimal number is equal to the total number of the network nodes, one quantum bit is correspondingly represented as one node, and the importance ordering problem of the network nodes is associated through the quantum bits of the quantum lines, so that the application significance of solving the practical problem is reflected.
c1, adding a preset quantum logic gate on the quantum bit according to the local importance value to obtain a quantum circuit for network node importance sequencing.
Specifically, the preset importance index value, such as the local importance value, may be understood as an estimated value of the evaluation importance, which represents the importance information of the node in the local network, and does not accurately represent the importance status of the node in the global network. In order to accurately realize the importance ordering of the nodes in the global network in the quantum field, the quantum logic gate operation is added on the quantum bit, so that different quantum bits are associated to generate interaction, and the association between the nodes can be correspondingly embodied on the application level.
Preferably, in order to obtain a quantum line for outputting a ground state, for each network node, in order of magnitude of the local importance values, a qubit corresponding to the node may be set as a control bit, and a qubit corresponding to a node connected to the node may be set as a target bit, starting from the node corresponding to the maximum value among the local importance values;
adding an X gate operation to the control bits; wherein the X gate operation is a first quantum logic gate operation performed by the control bit;
adding controlled RY gate operation controlled by the control bit to the target bit to delete the edge connected with the node corresponding to the control bit and the target bit;
adding an RX gate operation to the control bit until all edges connected with the network node are deleted; wherein the RX gate operation is the last quantum logic gate operation performed by the control bit.
Finally, a quantum wire can be constructed that yields a ground state for outputting a result comprising the ranking of the importance of the network nodes.
In practical application, a controlled RX gate controlled by a control bit can be added to the target bit; the added control bit can also be a RY gate, and the RX gate and the RY gate can be equally replaced with each other.
It can be understood by those skilled in the art that the quantum logic gates and their execution timing used for constructing the quantum circuit are not limited to the above X gate, RX gate, RY gate and their execution timing, and other kinds of quantum logic gates and their corresponding execution timing for achieving equivalent functions are also reasonably feasible.
Exemplarily, referring to fig. 4, fig. 4 is a schematic diagram of a network x composed of three nodes according to an embodiment of the present invention, where the network x includes a node 1, a node 2, and a node 3, where the node 1 is connected to the node 2, and the node 2 is connected to the node 3.
First, the adjacency matrix of network x is determined as:
wherein, the 1 st row, the 2 nd row and the 3 rd row correspond to the node 1, the node 2 and the node 3, and the 1 st column, the 2 nd column and the 3 rd column correspond to the node 1, the node 2 and the node 3. The weight of an edge W ═ M, i.e.: w12=W21=M12=M21=1,W23=W32=M23=M 321, the rest is 0.
Let p be 2, mu1=0.5,μ2When the value is 0.5, the calculation is continued to obtain:
Let the local importance value of node i be NiThen the local importance N is:
Then, 3 qubits q1, q2, q3 are obtained, corresponding to node 1, node 2, node 3. Taking node 2 with the largest local importance value as a control node, the correspondence indicates that a qubit q2 is taken as a control bit on a quantum line, an X gate is added to q2, and controlled RY gates controlled by q1 are added to qubits q1 and q3 corresponding to the connected nodes (node 1 and node 3) in sequence.
Wherein, setting 1 controlled RY gate represents deleting 1 edges connected between nodes corresponding to the quantum bits operated by the controlled RY gate, that is: and deleting the connecting edge of the node 2 corresponding to the controlled RY gate and the node 1, and the connecting edge of the node 2 corresponding to the controlled RY gate and the node 3.
If all the edges in the network x are not deleted, sequentially selecting the node 1 or the node 3 with the second largest and the third largest local importance values as control nodes, and executing the operation similar to the operation of the node 2.
For the second largest node, assume to be node 1, add X gate to control bit q1 corresponding to node 1 (X gate is always the first quantum logic gate executed by the corresponding quantum bit), add controlled RY gate controlled by q1 to the connected nodes of node 1, if any edge is not deleted, continue to execute the above-mentioned same operation to the third largest node 3 until all edges in network X are deleted, and finally add RX gate to all control bits.
The resulting quantum circuit can be seen from fig. 5, and it can be seen that all edges in the network x are deleted when the node 2 is used as a control node. Wherein the initial quantum state of q1, q2, q3 can be |0>The state can be other states, RX and RY are quantum logic gates containing variable parameters, RY (theta)1) Parameter in (2) is theta1Range of values [ -pi, pi [ - ]]Is a variable parameter, and RY (theta)1) One end of each of the connected vertical lines is connected to the time line corresponding to q2, and the intersection is solid, indicating RY (theta)1) The gate is actually controlled by q 2: namely in executing RY (theta)1) In front of the door, whenq2 has a quantum state of |1>RY (theta) is executed only when in state1) Door, theta2、θ3The meaning is the same. Therefore, the quantum circuit can also be called as a variable quantum circuit, the output state of the quantum circuit corresponding to a group of parameter values comprises a primary sorting result, the variable parameters contained in the quantum logic gate can be continuously updated to find the optimal parameter values, and the output state of the quantum circuit corresponding to the optimal parameter values comprises the optimal sorting result.
S202, updating variable parameters contained in the quantum circuit by using a quantum virtual time evolution technology;
in particular, virtual time evolution is a non-physical and powerful mathematical concept. It has been used in many physical fields, including quantum mechanics, statistical mechanics and universities, commonly known as "Wick rotation" (Wick rotation), to tie euclidean and minkowski spaces, quantum, statistical mechanics and static problems to kinetic problems, replacing real time with imaginary time. In quantum mechanics, the propagation of the wave function in virtual time evolution can be as follows: limited temperature properties, finding ground-state wave functions and energies (e.g., reformulation groups in density matrices), and simulating real-time evolution. For a system given a Hamiltonian H, over time t, the system follows a propagation operator (promoter) e-iHtAnd (5) evolving. The corresponding imaginary time (τ ═ it) propagation operator is e-HτIs a non-unitary operator.
In the quantum field, a quantum variational virtual time evolution algorithm of linear algebra is proposed at present, and a quantum algorithm is utilized to effectively solve the task of the linear algebra; a variable-component quantum algorithm with a nonlinear problem is also provided, and the nonlinear problem including a nonlinear partial differential equation can be effectively solved through variable-component quantum calculation.
The quantum variation virtual time evolution shows a huge application prospect, and the method is applied to the problem of network node importance ordering. Firstly, the application provides an elastic model inspired by physics, namely the evaluation function model, which considers the importance of the node and the indexes of irreplaceability of the node in a local network, and the like, so as to obtain a better effect. Second, the Hamiltonian of the system is constructed from the elastic model. And thirdly, solving the ground state of the system by utilizing quantum variation virtual time evolution, wherein the corresponding ground state is a primary sequencing result, namely the sequencing result of the importance of the network nodes.
Specifically, the updating the variable parameters included in the quantum wires by using the quantum virtual time evolution technology may include the following implementation steps:
a2, constructing an evaluation function model corresponding to the node network, and calculating a corresponding Hamilton quantity H according to the evaluation function model;
b2, iteratively updating the variable parameters contained in the quantum logic gate in the quantum circuit for performing the network node importance ranking according to the following updating mode until the difference between the updated parameter and the previously updated parameter reaches a preset difference range, where the preset difference may be a smaller value: when the parameter difference is close to 0, the parameter is considered to tend to be stable and basically keep unchanged:
or,
wherein, theThe parameter is a variable parameter, τ is a time, Δ τ is a time interval, δ τ is a parameter update coefficient, preferably, the value is about 2.6, and δ (k) δ τ Q iskQ is 0.9 to 0.95, theAnd is a random value, theExpress getOf the symbol ofDifferential equations corresponding by imaginary time evolutionDetermining;
the coefficient matrix A and the heterogeneous term C for updating the parameters are respectively calculated by corresponding preset quantum circuits.
Illustratively, one implementation is as follows:
s1, constructing an evaluation function model corresponding to the node network, and calculating a corresponding Hamilton quantity H according to the evaluation function model;
specifically, constructing an evaluation function model of the importance of the network node may include:
a3, obtaining the weight W of the edges connected between the network nodes, and calculating the preset index value for evaluating the importance of the network nodes; wherein the preset index comprises: strength of nodes and local irreplaceability;
specifically, the weight W of the edge connected between the nodes is a value describing the actual influence of each node in the network, and is attribute information of the node network. In different network systems, the weight of the edge connected between nodes can be set according to the actual situation, for example, taking a traffic network as an example, the amount of the round-trip traffic between the a-site and the B-site can be described by the weight between the a-node and the B-node. In the present application, for convenience of explanation, the weights W of the connected edges are generally set to 1.
b3, constructing an elastic potential energy model H corresponding to the network according to the value of the preset index; wherein,
wherein, theAn out-node set representing node j, said WjiThe weight value of the edge j → i connecting the node j and the node i, SiThe SjTo quantify the importance value of the importance of node i and node j, T is the rest length of the elastic potential energy between node i and node j, and T is determined according to the strength and/or the local irreplaceability.
Specifically, the value of the preset index may be understood as an estimated value of the importance of the evaluation node, which represents the importance information of the node in the local network and does not accurately represent the importance position of the node in the global network. In order to more accurately measure the importance ranking classification of the nodes in the global network, an elastic potential energy model H corresponding to the network needs to be constructed, which specifically comprises the following steps:
a: constructing a first local elastic potential energy H of the network nodes according to the weight W of the edges connected among the nodes and the static length T of the elastic potential energy among the nodesji(ii) a Wherein the first local elastic potential energy HjiThe calculation formula of (2) is as follows:
specifically, for the problem of network node importance evaluation, in the existing evaluation model, the static length t (rest length) of the elastic potential energy between nodes is set to 1, but the effect of the method is poor. In the present application, the rest length T may be determined according to the intensity or the local irreplaceability, or may be determined by both the intensity and the local irreplaceability.
B: according to a first local elastic potential energy H of the network nodejiConstructing an elastic potential energy model H corresponding to the network; the calculation formula of the elastic potential energy model H corresponding to the network is as follows:
wherein, theAn out-node set representing node j, said WjiThe weight value of the edge j → i connecting the node j and the node i, SiThe SjTo quantify the importance value of the importance of node i, node j, the T is determined according to the strength value and/or the local irreplaceability value.
In an alternative embodiment, the resting length T is calculated by:
wherein λ is1Representing the influence degree of the partial irreplaceability of the connected nodes i and j on the importance of the nodes,a first local irreplaceability value, λ, representing a node i, j connected to it2Indicating the influence degree of the strength of the connected nodes i and j on the importance of the nodes,representing a first strength value of the connected nodes i, j, and satisfying: lambda is more than or equal to 01≤1,0≤λ2≤1,λ1+λ2=1。
Wherein, when lambda1When the value of (a) is 0, it means that the static length T is determined by the intensity, that is:
wherein, when lambda2When the value of (a) is 0, it means that the static length T is determined by local irreplaceability, that is:
in another alternative embodiment, the static length T is calculated by:
wherein,a second local irreplaceability value representing a node i, j connected to it,and a second intensity value representing the nodes i and j connected with each other.
Wherein, when lambda1When the value of (a) is 0, it means that the static length T is determined by the intensity, that is:
wherein, when lambda2When the value of (a) is 0, it means that the static length T is determined by local irreplaceability, that is:
specifically, the corresponding hamilton H is calculated according to the evaluation function model, that is, the specific value of the evaluation function model is calculated.
For example, taking the network shown in fig. 4 as an example, there are 4 edges: side 1 → 2, side 2 → 1, side 2 → 3, side 3 → 2. The evaluation function model is set as:
wherein, WjiAnd the value of T can be determined from the above, Si-SjTake values asThe following:
wherein,diagonal 0 and 1 can be understood as the level state |0 represented by the node significance value>(Low energy level) and |1>The value of (high energy level) (the node in the variable quantum circuit corresponds to the qubit, and the importance value of the node corresponds to the energy level state of the qubit), that is, the value includes two states of 0 and 1, and is similar to an Esino model and the like. Thus, a specific value of H can be obtained.
S2, judging whether the current throwing frequency is less than the preset throwing frequency; wherein, the preset throwing times are generally set to be 2 or 3 times;
s3, if the current throwing times are less than the preset throwing times, judging whether the current iteration times are less than the preset iteration times; meanwhile, adding 1 to the current throwing times;
the preset iteration times can be set to be about 100 times so as to update the parameters to be stable; the purpose of setting the throwing times and the iteration times is to avoid the expected value of subsequent calculation from falling into the local optimal solution and obtain better updating effect.
S4, if the iteration number is less than the preset iteration number, calculating a coefficient matrix A for updating the parameters according to the first preset quantum circuit, and calculating a heterogeneous term C for updating the parameters according to the second preset quantum circuit; if not, returning to the step of judging whether the current throwing times are smaller than the preset throwing times; meanwhile, adding 1 to the current iteration times;
those skilled in the art will appreciate that Schrodinger's equation (Wick rotated) based on Wick rotation in the field of virtual time evolutionequation)(wherein, E is desiredτ=<ψ(τ)|H|ψ(τ)>) Variation principle of McLachlan's variational principle(where. delta. represents variation), differential equationThe mathematics of the coefficient matrix a and the non-homogeneous term C can be expressed as follows:
wherein R represents a real part, βlIs a real coefficient, hlFor observables (observables),the end state at time τ.
In particular, a can be effectively measured by quantum wiresijAnd Ci. Unitary matrix U assuming quantum logic gatesi(θi) The derivative of (d) can be expressed as:
wherein,
each derivative typically has only one or two terms. For example, when Ui(θi) Is a single-bit revolving doorIts derivative is:
wherein σZIs pauli-Z matrix (a unitary operator). Coefficient AijAnd CiCan be written as:
all of these items may be in the form ofAnd (4) corresponding quantum wires evolve and are finally obtained through measurement. For coefficient matrix a:
wherein f isk,i、fl,jIs a scalar parameter, superscript denotes conjugation,rewritable as aeiθAnd is and
wherein, a is a real number,indicating an initial state (which may be a 0 state or other state), superscriptIndicating transposed conjugation, the rest being the same.
When i is equal to j, calculate AijThe first preset quantum circuit is a unit quantum circuit, namely the output state of the unit quantum circuit is consistent with the input state;
when i < j, then:
computingMay be as shown in fig. 6, resulting in a coefficient matrix a. Wherein the input state isAnd unitary operator sigmak,iConnected vertical lines represent the quiltCorresponding to qubit control, the solid connection points indicate real control, i.e. whenThe quantum state of the corresponding qubit is at |1 immediately before the unitary operator is executed>In the state, the unitary operator operation is executed, otherwise, the unitary operator operation is not executed, sigmal,jThe same is shown; x denotes an X gate, H denotes an H gate, and the right icon of the H gate represents a measurement operation.
Similarly, for non-homogeneous term C:
wherein,plural, each of which can be rewritten to the form aeiθIs shown in (a). ComputingMay be as shown in fig. 7, resulting in the non-homogeneous term C. Wherein the real coefficient betalObservable (observables) hl(and can be expressed as a tensor product form of the pauli matrix) can be decomposed by the hamiltonian.
s5, updating the variable parameters contained in the quantum logic gate in the quantum circuit for performing the network node importance ranking according to a preset updating rule; wherein the preset update rule is:
or,
wherein, calculatingIs of the formulaUpdating variable parameters contained in the quantum logic gate, for example, means updating a parameter θ in the RX gate and the RY gate, in order to calculate a ground state corresponding to the hamilton H by using an imaginary time evolution method, that is: and calculating A, C, updating theta to be stable, and substituting the finally stable theta into the quantum circuit with the network node importance ranking, wherein the output state of the quantum circuit is the ground state, namely the quantum state containing the optimal ranking result of the node importance.
s6, executing the quantum wire containing the current updated variable parameter, determining the end state of the quantum wire outputCorresponding expectation
In the current updating process, the last state output by the quantum line is also the quantum state of the sequencing result containing the node importance, but is not the optimal solution (optimal sequencing result), at this time, the expectation can be used for comparing with the expectation of the previous updating process, a smaller expectation is reserved, and the smaller the expectation is, the more accurate the variable parameter of the corresponding quantum logic gate is represented.
And S7, comparing the current expectation with the expectation obtained by the previous update, recording a parameter value corresponding to the minimum expectation in the two expectations, and returning to the step of judging whether the current iteration number is less than the preset iteration number.
Specifically, the variation principle of the Maclark is applied to the virtual time evolution:
S203, executing the updated quantum circuit and outputting the quantum state containing the sequencing result of the network node importance.
Specifically, continuing with the above implementation manner, the iterative update may be ended when it is determined that the current number of toss is not less than the preset number of toss, at this time, the recorded expected value is the updated minimum expected value, and the parameter of the corresponding quantum logic gate is the optimal parameter value. And outputting a quantum state of a sequencing result containing the importance of the network node by executing the quantum line containing the optimal parameter value corresponding to the minimum expectation, wherein the sequencing result is an optimal solution and is more accurate.
For example, the ground state output after a quantum wire is run is: a1|000>+a2|001>+a3|010>+ a4011+ a5100+ a6101+ a7110+ a8111, wherein a1, a2 … a8 is amplitude, | a12+|a2|2+|a3|2+|a4|2+|a5|2+|a6|2+|a7|2+|a8|21. Assuming that the probability is maximum | a32Corresponding to quantum state |010>And the qubit bit is 010, and the node 1, the node 2 and the node 3 correspond from left to right, so that the importance classification ordering result is as follows: node 2 belongs to a class of nodes having a higher importance (importance of 1), nodes 1 and 3 belong to another class of nodes having a lower importance (importance of 0), and the importance is ranked as node 2, node 1 (or node 3), and node 3 (or node 1).
It can be seen that by constructing quantum wires for network node importance ranking; wherein the quantum logic gate in the quantum wire comprises a variable parameter; updating variable parameters contained in the quantum circuit by using a quantum virtual time evolution technology; and executing the updated quantum circuit, and outputting a quantum state containing a node importance sequencing result, thereby realizing network node importance sequencing through the quantum circuit in the field of quantum technology and making up the defects of the prior art.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a sorting apparatus for network node importance according to an embodiment of the present invention, which corresponds to the flow shown in fig. 2, and the apparatus includes:
a constructing module 801, configured to construct quantum wires for performing importance ranking of network nodes; wherein a quantum logic gate in the quantum wire comprises a variable parameter;
an updating module 802, configured to update variable parameters included in the quantum wires by using a quantum virtual time evolution technique;
an output module 803, configured to execute the updated quantum wire and output a quantum state including a result of the ranking of the importance of the network node.
Specifically, the construction module includes:
a determining unit for determining a local importance value for evaluating the importance of a network node;
an obtaining unit, configured to obtain quantum bits with a quantity at least equal to the number of nodes; wherein one of the nodes corresponds to one of the qubits;
and the adding unit is used for adding a preset quantum logic gate on the quantum bit according to the local importance value to obtain a quantum line for network node importance sorting.
Specifically, the determining unit is specifically configured to:
and calculating a second local irreplaceable value after the node is influenced by the connected nodes, wherein the calculation formula is as follows:
wherein, the Wij、WjiThe weight of the side i → j, the side j → i, the Dj、DiIs a first strength of node j, node i, the Uj、UiIs the first local irreplaceable value of the node j and the node i, the alpha represents the degree of importance of the node on the connected nodes, and alpha is more than or equal to 0 and less than or equal to 1, theIs the union of an ingress node and an egress node, saidIs a set of ingress nodes of node i, saidFor the outbound node set of node i, the Δ UjiTo embody intermediate parameters of node interaction, the methodThe node i is a second local irreplaceable value after being influenced by the connected nodes;
and calculating the second strength of the node after being influenced by the connected nodes, wherein the calculation formula is as follows:
wherein, theThe second strength is the second strength of the node i after being influenced by the connected nodes;
calculating a local importance value of the network node based on the second local irreplaceable value and the second strength.
Specifically, the adding unit is specifically configured to:
for each network node, according to the magnitude sequence of the local importance values, setting the quantum bit corresponding to the node as a control bit and the quantum bit corresponding to the node connected with the node as a target bit from the node corresponding to the maximum value in the local importance values;
adding an X gate operation to the control bit; wherein the X gate operation is a first quantum logic gate operation performed by the control bit;
adding a controlled RY gate operation controlled by the control bit to the target bit to delete an edge connecting nodes corresponding to the control bit and the target bit;
adding an RX gate operation to the control bit until all edges connected with the network node are deleted; wherein the RX gate operation is a last quantum logic gate operation performed for the control bit.
Specifically, the update module is specifically configured to:
constructing an evaluation function model corresponding to the node network, and calculating a corresponding Hamilton quantity H according to the evaluation function model;
iteratively updating the variable parameters contained in the quantum logic gate in the quantum circuit for performing the importance ranking of the network nodes in the following updating mode until the difference value between the updated parameters and the parameters updated last time reaches a preset difference value range:
or,
wherein, theIs a variable parameter, where τ is time, Δ τ is a time interval, δ τ is a parameter update coefficient, and δ (k) is δ τ QkQ is 0.9 to 0.95, theAnd is a random value, theExpress getOf the symbol ofDifferential equations corresponding by imaginary time evolutionDetermining;
the coefficient matrix A and the heterogeneous term C for updating the parameters are respectively calculated by corresponding preset quantum circuits.
Specifically, the update module is specifically configured to:
constructing an evaluation function model corresponding to the node network, and calculating a corresponding Hamilton quantity H according to the evaluation function model;
judging whether the current throwing times are smaller than the preset throwing times or not;
if the current throwing-up times are smaller than the preset throwing-up times, judging whether the current iteration times are smaller than the preset iteration times; meanwhile, adding 1 to the current throwing times;
if the number of iterations is less than the preset number of iterations, calculating a coefficient matrix A for updating the parameters according to a first preset quantum line, and calculating a heterogeneous term C for updating the parameters according to a second preset quantum line; if not, returning to the step of judging whether the current throwing times are smaller than the preset throwing times; meanwhile, adding 1 to the current iteration times;
updating variable parameters contained in a quantum logic gate in the quantum circuit for performing the network node importance ranking according to a preset updating rule; wherein the preset update rule is:
or,
wherein, theIs a variable parameter, where τ is time, Δ τ is a time interval, δ τ is a parameter update coefficient, and δ (k) is δ τ QkQ is 0.9 to 0.95, theAnd is a random value, theExpress getOf the symbol ofDifferential equations corresponding by imaginary time evolutionDetermining;
executing the quantum wire containing the current updated variable parameter, determining the end state of the quantum wire outputCorresponding expectation
And comparing the current expectation with the expectation obtained by the previous updating, recording a parameter value corresponding to the minimum expectation in the two expectations, and returning to the step of judging whether the current iteration number is less than the preset iteration number.
Specifically, the update module is specifically configured to:
acquiring the weight W of edges connected among the network nodes, and calculating the value of a preset index for evaluating the importance of the network nodes; wherein the preset index comprises: strength of nodes and local irreplaceability;
according to the value of the preset index, constructing an elastic potential energy model H corresponding to the network; wherein,
wherein, theAn out-node set representing node j, said WjiThe weight value of the edge j → i connecting the node j and the node i, SiThe SjTo quantify the importance value of the importance of node i and node j, T is the rest length of the elastic potential energy between node i and node j, and T is determined according to the strength and/or the local irreplaceability.
Specifically, the output module is specifically configured to:
and under the condition that the current throwing times are not less than the preset throwing times, executing a quantum circuit containing the parameter value corresponding to the minimum expectation, and outputting a quantum state containing the sequencing result of the network node importance.
It can be seen that by constructing quantum wires for network node importance ranking; wherein the quantum logic gate in the quantum wire comprises a variable parameter; updating variable parameters contained in the quantum circuit by using a quantum virtual time evolution technology; and executing the updated quantum circuit, and outputting a quantum state containing a node importance sequencing result, thereby realizing network node importance sequencing through the quantum circuit in the field of quantum technology and making up the defects of the prior art.
An embodiment of the present invention further provides a storage medium, where a computer program is stored in the storage medium, where the computer program is configured to, when executed, perform the steps in any one of the above method embodiments.
Specifically, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s201, constructing quantum lines for ranking the importance of the network nodes; wherein a quantum logic gate in the quantum wire comprises a variable parameter;
s202, updating variable parameters contained in the quantum circuit by using a quantum virtual time evolution technology;
s203, executing the updated quantum circuit and outputting the quantum state containing the sequencing result of the network node importance.
It can be seen that by constructing quantum wires for network node importance ranking; wherein the quantum logic gate in the quantum wire comprises a variable parameter; updating variable parameters contained in the quantum circuit by using a quantum virtual time evolution technology; and executing the updated quantum circuit, and outputting a quantum state containing a node importance sequencing result, thereby realizing network node importance sequencing through the quantum circuit in the field of quantum technology and making up the defects of the prior art.
An embodiment of the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the computer program to perform the steps in any one of the method embodiments described above.
Specifically, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Specifically, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s201, constructing quantum lines for ranking the importance of the network nodes; wherein a quantum logic gate in the quantum wire comprises a variable parameter;
s202, updating variable parameters contained in the quantum circuit by using a quantum virtual time evolution technology;
s203, executing the updated quantum circuit and outputting the quantum state containing the sequencing result of the network node importance.
It can be seen that by constructing quantum wires for network node importance ranking; wherein the quantum logic gate in the quantum wire comprises a variable parameter; updating variable parameters contained in the quantum circuit by using a quantum virtual time evolution technology; and executing the updated quantum circuit, and outputting a quantum state containing a node importance sequencing result, thereby realizing network node importance sequencing through the quantum circuit in the field of quantum technology and making up the defects of the prior art.
The construction, features and functions of the present invention are described in detail in the embodiments illustrated in the drawings, which are only preferred embodiments of the present invention, but the present invention is not limited by the drawings, and all equivalent embodiments modified or changed according to the idea of the present invention should fall within the protection scope of the present invention without departing from the spirit of the present invention covered by the description and the drawings.
Claims (11)
1. A method for ranking network node importance, the method comprising:
constructing quantum wires for carrying out importance ranking on the network nodes; wherein a quantum logic gate in the quantum wire comprises a variable parameter;
updating variable parameters contained in the quantum wires by using a quantum virtual time evolution technology;
and executing the updated quantum circuit and outputting a quantum state containing the network node importance sequencing result.
2. The method of claim 1, wherein constructing a quantum wire for network node significance ranking comprises:
determining a local importance value for evaluating the importance of the network node;
obtaining quantum bits with the quantity at least equal to the number of the nodes; wherein one of the nodes corresponds to one of the qubits;
and adding a preset quantum logic gate on the quantum bit according to the local importance value to obtain a quantum line for network node importance sorting.
3. The method of claim 2, wherein determining the local importance value for evaluating the importance of the network node comprises:
and calculating a second local irreplaceable value after the node is influenced by the connected nodes, wherein the calculation formula is as follows:
wherein, the Wij、WjiThe weight of the side i → j, the side j → i, the Dj、DiIs a first strength of node j, node i, the Uj、UiIs the first local irreplaceable value of the node j and the node i, the alpha represents the degree of importance of the node on the connected nodes, and alpha is more than or equal to 0 and less than or equal to 1, theIs the union of an ingress node and an egress node, saidIs a set of ingress nodes of node i, saidFor the outbound node set of node i, the Δ UjiTo embody intermediate parameters of node interaction, the methodThe node i is a second local irreplaceable value after being influenced by the connected nodes;
and calculating the second strength of the node after being influenced by the connected nodes, wherein the calculation formula is as follows:
wherein, theThe second strength is the second strength of the node i after being influenced by the connected nodes;
calculating a local importance value of the network node based on the second local irreplaceable value and the second strength.
4. The method of claim 2, wherein adding a predetermined quantum logic gate to the qubit according to the local importance value comprises:
for each network node, according to the magnitude sequence of the local importance values, setting the quantum bit corresponding to the node as a control bit and the quantum bit corresponding to the node connected with the node as a target bit from the node corresponding to the maximum value in the local importance values;
adding an X gate operation to the control bit; wherein the X gate operation is a first quantum logic gate operation performed by the control bit;
adding a controlled RY gate operation controlled by the control bit to the target bit to delete an edge connecting nodes corresponding to the control bit and the target bit;
adding an RX gate operation to the control bit until all edges connected with the network node are deleted; wherein the RX gate operation is a last quantum logic gate operation performed for the control bit.
5. The method of claim 1, wherein the updating the variable parameters contained in the quantum wires using quantum virtual time evolution techniques comprises:
constructing an evaluation function model corresponding to the node network, and calculating a corresponding Hamilton quantity H according to the evaluation function model;
iteratively updating the variable parameters contained in the quantum logic gate in the quantum circuit for performing the importance ranking of the network nodes in the following updating mode until the difference value between the updated parameters and the parameters updated last time reaches a preset difference value range:
or,
wherein, theIs a variable parameter, where τ is time, Δ τ is time interval, and δ τ is time interval
Parameter update coefficient, δ (k) δ τ QkQ is 0.9 to 0.95, theAnd is a random value, theExpress getOf the symbol ofDifferential equations corresponding by imaginary time evolutionDetermining;
the coefficient matrix A and the heterogeneous term C for updating the parameters are respectively calculated by corresponding preset quantum circuits.
6. The method of claim 1, wherein the updating the variable parameters contained in the quantum wires using quantum virtual time evolution techniques comprises:
constructing an evaluation function model corresponding to the node network, and calculating a corresponding Hamilton quantity H according to the evaluation function model;
judging whether the current throwing times are smaller than the preset throwing times or not;
if the current throwing-up times are smaller than the preset throwing-up times, judging whether the current iteration times are smaller than the preset iteration times; meanwhile, adding 1 to the current throwing times;
if the number of iterations is less than the preset number of iterations, calculating a coefficient matrix A for updating the parameters according to a first preset quantum line, and calculating a heterogeneous term C for updating the parameters according to a second preset quantum line; if not, returning to the step of judging whether the current throwing times are smaller than the preset throwing times; meanwhile, adding 1 to the current iteration times;
updating variable parameters contained in a quantum logic gate in the quantum circuit for performing the network node importance ranking according to a preset updating rule; wherein the preset update rule is:
or,
wherein, theIs a variable parameter, where τ is time, Δ τ is a time interval, δ τ is a parameter update coefficient, and δ (k) is δ τ QkQ is 0.9 to 0.95, theAnd is a random value, theExpress getOf the symbol ofDifferential equations corresponding by imaginary time evolutionDetermining;
executing the quantum wire containing the current updated variable parameter, determining the end state of the quantum wire outputIs correspondingly provided withIs expected to
And comparing the current expectation with the expectation obtained by the previous updating, recording a parameter value corresponding to the minimum expectation in the two expectations, and returning to the step of judging whether the current iteration number is less than the preset iteration number.
7. The method of claim 5, wherein constructing the corresponding merit function model for the node network comprises:
acquiring the weight W of edges connected among the network nodes, and calculating the value of a preset index for evaluating the importance of the network nodes; wherein the preset index comprises: strength of nodes and local irreplaceability;
according to the value of the preset index, constructing an elastic potential energy model H corresponding to the network; wherein,
wherein, theAn out-node set representing node j, said WjiThe weight value of the edge j → i connecting the node j and the node i, SiThe SjTo quantify the importance value of the importance of node i and node j, T is the rest length of the elastic potential energy between node i and node j, and T is determined according to the strength and/or the local irreplaceability.
8. The method of claim 6, wherein the executing the updated quantum wire to output the quantum state comprising the ordered result of the network node significance comprises:
and under the condition that the current throwing times are not less than the preset throwing times, executing a quantum circuit containing the parameter value corresponding to the minimum expectation, and outputting a quantum state containing the sequencing result of the network node importance.
9. An apparatus for ranking network node importance, the apparatus comprising:
the construction module is used for constructing quantum wires for carrying out importance ranking on the network nodes; wherein a quantum logic gate in the quantum wire comprises a variable parameter;
the updating module is used for updating the variable parameters contained in the quantum circuit by using a quantum virtual time evolution technology;
and the output module is used for executing the updated quantum circuit and outputting the quantum state containing the sequencing result of the network node importance.
10. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 8 when executed.
11. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010821255.XA CN112073126B (en) | 2020-08-14 | 2020-08-14 | Method and device for ordering network node importance |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010821255.XA CN112073126B (en) | 2020-08-14 | 2020-08-14 | Method and device for ordering network node importance |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112073126A CN112073126A (en) | 2020-12-11 |
CN112073126B true CN112073126B (en) | 2021-07-13 |
Family
ID=73661749
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010821255.XA Active CN112073126B (en) | 2020-08-14 | 2020-08-14 | Method and device for ordering network node importance |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112073126B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114638369A (en) * | 2020-12-15 | 2022-06-17 | 华为技术有限公司 | Quantum computing method and system |
CN112965888B (en) * | 2021-03-03 | 2023-01-24 | 山东英信计算机技术有限公司 | Method, system, device and medium for predicting task quantity based on deep learning |
CN116108593A (en) * | 2021-11-11 | 2023-05-12 | 合肥本源量子计算科技有限责任公司 | Method and device for judging importance of combat network node based on quantum technology |
CN114418108B (en) * | 2022-01-17 | 2022-10-18 | 北京百度网讯科技有限公司 | Unitary operator compiling method, computing device, apparatus and storage medium |
CN114358295B (en) * | 2022-03-22 | 2022-06-21 | 合肥本源量子计算科技有限责任公司 | Machine learning framework-based classification method and related device |
CN114662694A (en) * | 2022-03-31 | 2022-06-24 | 北京百度网讯科技有限公司 | Method, device and equipment for determining characteristic information of quantum system and storage medium |
CN115048935B (en) * | 2022-04-12 | 2024-05-14 | 北京理工大学 | Semantic matching method based on density matrix |
CN117277434A (en) * | 2023-09-15 | 2023-12-22 | 深圳市新枝科技有限公司 | Optimized control method for generator set |
Family Cites Families (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9152746B2 (en) * | 2013-03-26 | 2015-10-06 | Microsoft Technology Licensing, Llc | Quantum annealing simulator |
CN103440398B (en) * | 2013-07-10 | 2016-09-28 | 武汉大学 | A kind of grid branch importance appraisal procedure based on pattern recognition |
CN105630800B (en) * | 2014-10-29 | 2021-01-15 | 杭州师范大学 | Method and system for ordering node importance |
CN106341328B (en) * | 2016-08-24 | 2019-06-25 | 东南大学 | A kind of method for routing of network quantum communication network |
AU2018220752A1 (en) * | 2017-02-17 | 2019-08-29 | Kyndi, Inc. | Method and apparatus of machine learning using a network with software agents at the network nodes and then ranking network nodes |
CN107977340A (en) * | 2017-12-27 | 2018-05-01 | 邵美 | A kind of importance ranking method of block chain trade network node |
CN108154240B (en) * | 2017-12-29 | 2020-07-07 | 合肥本源量子计算科技有限责任公司 | Low-complexity quantum line simulation system |
CN108540329B (en) * | 2018-04-24 | 2020-12-25 | 中国人民解放军国防科技大学 | Network security inference method based on two-layer Bayesian network model |
CN109165741A (en) * | 2018-08-02 | 2019-01-08 | 合肥本源量子计算科技有限责任公司 | Processing method, device, storage medium and the electronic device of quantum wire |
CN109409524B (en) * | 2018-09-26 | 2019-11-08 | 合肥本源量子计算科技有限责任公司 | A kind of quantum program operating method and device, storage medium and electronic device |
WO2020095051A2 (en) * | 2018-11-07 | 2020-05-14 | Gtn Ltd | A quantum circuit based system configured to model physical or chemical systems |
CN109800883B (en) * | 2019-01-25 | 2020-12-04 | 合肥本源量子计算科技有限责任公司 | Quantum machine learning framework construction method and device and quantum computer |
CN110826719B (en) * | 2019-10-14 | 2022-08-16 | 合肥本源量子计算科技有限责任公司 | Quantum program processing method and device, storage medium and electronic device |
CN110929873B (en) * | 2019-12-11 | 2023-07-04 | 合肥本源量子计算科技有限责任公司 | Quantum program processing method and device, storage medium and electronic device |
CN111401562B (en) * | 2020-03-11 | 2023-12-15 | 本源量子计算科技(合肥)股份有限公司 | Method and device for operating quantum circuit in terminal interface |
-
2020
- 2020-08-14 CN CN202010821255.XA patent/CN112073126B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN112073126A (en) | 2020-12-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112073126B (en) | Method and device for ordering network node importance | |
CN111130839B (en) | Flow demand matrix prediction method and system | |
You et al. | Graphrnn: Generating realistic graphs with deep auto-regressive models | |
Cremene et al. | Comparative analysis of multi-objective evolutionary algorithms for QoS-aware web service composition | |
Breve et al. | Particle competition and cooperation in networks for semi-supervised learning | |
CN112016691B (en) | Quantum circuit construction method and device | |
Shukla | Neuro-genetic prediction of software development effort | |
Bai et al. | Evolutionary reinforcement learning: A survey | |
CN112068798B (en) | Method and device for realizing importance ordering of network nodes | |
CN114764549B (en) | Quantum circuit simulation calculation method and device based on matrix product state | |
Dennunzio et al. | Complexity of the dynamics of reaction systems | |
CN114492814A (en) | Method, device and medium for simulating energy of target system based on quantum computation | |
CN114492815B (en) | Method, device and medium for calculating target system energy based on quantum chemistry | |
Stach et al. | Parallel learning of large fuzzy cognitive maps | |
CN114528996A (en) | Method, device and medium for determining initial parameters of target system test state | |
CN114519429B (en) | Method, device and medium for obtaining observability quantity of target system | |
Dale et al. | The role of structure and complexity on reservoir computing quality | |
Tortorella et al. | Spectral bounds for graph echo state network stability | |
CN114358317A (en) | Data classification method based on machine learning framework and related equipment | |
CN114372539B (en) | Machine learning framework-based classification method and related equipment | |
Sudbrack et al. | Master equation for the degree distribution of a Duplication and Divergence network | |
CN114881238A (en) | Method and apparatus for constructing quantum discriminator, medium, and electronic apparatus | |
CN112000673A (en) | Method and device for inquiring transaction elements by using quantum line | |
Ashby et al. | Geometric learning of the conformational dynamics of molecules using dynamic graph neural networks | |
Koohestani et al. | Addressing the envelope reduction of sparse matrices using a genetic programming system |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |