Edge search method based on quantum walk
By mapping the to-search map into a total map, defining the Hamiltonian search and evolution equations of quantum walk-by-side search, the problem of low efficiency of target edge search in the existing technology is solved, and the rapid search and accuracy of edges in static and dynamic graphs is achieved.
Patent Information
- Application Number
- CN202510480326.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-08-29
AI Technical Summary
The existing quantum stroll space search method mainly studies the search of target nodes, with less research on target edges, and the search efficiency in dynamic graphs is low, making it difficult to effectively process edge information and dynamic changes.
By mapping the image to be searched into a total graph, defining the Hamiltonian and evolution equations while quantum walks, and using continuous time quantum walk evolution for side search, it is suitable for static and dynamic graphs, improving search efficiency and accuracy.
It realizes fast search of edges in static and dynamic graphs, and compared with traditional search algorithms, it realizes square-level acceleration, improving search efficiency and accuracy.
Smart Images

Figure CN120561341A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of quantum computing technology, and in particular to an edge search method based on quantum walk. Background Art
[0002] A quantum computer is a device that follows the laws of quantum mechanics to perform high-speed mathematical and logical operations, store, and process quantum information. Quantum computing, a computing technology based on the principles of quantum mechanics, leverages the superposition and entanglement of quantum bits (qubits) to rapidly process large amounts of data and solve problems that are difficult to address with classical computing. Quantum computing boasts rapid speed, robust information processing capabilities, and a wide range of applications. Compared to classical computing, quantum computing is more suitable for processing large and complex data and can more efficiently solve critical problems.
[0003] Search is a fundamental and widespread problem in computing. In classical computer science, search problems typically involve finding a target element within a dataset or database that satisfies specific criteria. Traditional search algorithms perform well and are highly efficient when working with ordered or structured datasets. However, when faced with unordered datasets, traditional search algorithms are typically limited to simple traversal searches, requiring a complete traversal of the entire dataset to find the target. This significantly reduces search efficiency, resulting in a time complexity of O(N), where N is the number of elements in the dataset.
[0004] The emergence of quantum search algorithms has provided new solutions to the above problems. The quantum search algorithm for disordered databases proposed by Lov Grover in 1996 exhibits quadratic acceleration compared to traditional search algorithms. Furthermore, the quantum walk search algorithm based on the quantum walk model also demonstrates the potential for quadratic acceleration. As a quantum version of the classical random walk, the quantum walk has been proven to be a universal quantum computing model. It not only provides a basic tool for designing efficient quantum algorithms, but also plays a key role in quantum information processing schemes. The quantum walk search algorithm utilizes the properties of quantum superposition and quantum interference to amplify the probability amplitude near the target state during the search process, thereby enabling the target to be found within a time complexity of O(√N). Compared to the O(N) complexity of traditional search algorithms, this achieves quadratic acceleration.
[0005] However, current quantum walk space search methods mainly focus on searching for target nodes, with less research on searching for target edges. In many practical applications, edge information is often as important as node information, or even more critical. For example, edges in a network not only connect nodes but also carry rich interaction and relationship information, which is crucial for understanding and analyzing the entire network structure. In addition, current quantum walk space search methods are mainly used to search static graphs. Because the states of nodes, edge connections, and edge properties in dynamic graphs may change over time, the current static graph search methods are less efficient when applied to dynamic graphs. Summary of the Invention
[0006] In order to solve some or all of the technical problems existing in the above-mentioned prior art, the present invention provides an edge search method based on quantum walk.
[0007] The technical solutions of the present invention are as follows:
[0008] A quantum walk-based edge search method is provided, comprising:
[0009] Obtain a graph to be searched, determine the type of the graph to be searched, map the graph to be searched into a general graph, and determine an adjacency matrix of the general graph, where the number of nodes in the general graph is the sum of the number of nodes and the number of edges in the graph to be searched, and the types of the graph to be searched include static graphs and dynamic graphs;
[0010] Determine a target edge to be searched, and establish a target edge marking matrix according to the marking state of the target edge to be searched to mark the target edge to be searched;
[0011] defining a quantum walk edge search Hamiltonian according to the adjacency matrix of the overall graph and the target edge labeling matrix;
[0012] constructing an evolution equation according to the quantum walk edge search Hamiltonian, and performing continuous-time quantum walk evolution based on the evolution equation;
[0013] According to the evolution result, the search target edge is measured to obtain the probability that the target edge to be searched is successfully searched.
[0014] In some optional implementations, if the graph to be searched is a static graph, the graph to be searched is mapped into a general graph in the following manner:
[0015] Determine the number of nodes and edges of the graph to be searched, take the sum of the number of nodes and the number of edges of the graph to be searched as the number of nodes of the total graph, regard a node in the graph to be searched as a node in the total graph, regard an edge in the graph to be searched as a node in the total graph, and determine all nodes of the total graph;
[0016] When two nodes in the graph to be searched are connected, an edge is set between the corresponding two nodes in the overall graph; when two edges in the graph to be searched are adjacent, an edge is set between the corresponding two nodes in the overall graph; when a node in the graph to be searched is connected to an edge, an edge is set between the corresponding two nodes in the overall graph, and all edges of the overall graph are determined.
[0017] In some optional implementations, if the graph to be searched is a dynamic graph, the graph to be searched is mapped to a general graph in the following manner:
[0018] According to the preset rules of adding and reducing edges, the dynamic change simulation of the graph to be searched is performed according to the dynamic change time sequence of the dynamic graph to obtain a series of static graphs corresponding to the dynamic graph;
[0019] Map each static image in the series of static images into a total image to obtain the total image of the series.
[0020] In some optional implementations, the adjacency matrix of the overall graph is determined using the following formula:
[0021]
[0022] Among them, A T(G) Represents the adjacency matrix of the total graph, A G Represents the adjacency matrix of the original graph corresponding to the total graph, R G Represents the correlation matrix of the original image corresponding to the total image, Represents R G The transposed matrix, A L(G) Indicates the line graph L corresponding to the original graph corresponding to the overall graph G The adjacency matrix of
[0023] The correlation matrix R of the original image corresponding to the total image G Defined as:
[0024]
[0025] Among them, (R G ) ij Represents the correlation matrix R G The element in row i and column j in i Indicates the i-th edge in the corresponding original graph, v j Indicates the jth node in the corresponding original graph.
[0026] In some optional implementations, if there is one target edge to be searched, the target edge label matrix is expressed as:
[0027] M=|w> <w|;
[0028] If there are multiple target edges to be searched, the target edge marking matrix is represented as:
[0029] M = ∑ i |w i ><w i |;
[0030] where M represents the target edge marking matrix, |w> represents the marked state of the target edge to be searched, <w| represents the conjugate transpose of |w>, |w i > represents the marked state of the i-th edge in the target edge to be searched, <w i | represents the conjugate transpose of |w i .
[0031] In some optional embodiments, if the graph to be searched is a static graph, the quantum walk edge search Hamiltonian is represented as:
[0032] H = -γA T (G) - M;
[0033] where H represents the quantum walk edge search Hamiltonian, and γ represents the hopping rate between the nodes of the overall graph.
[0034] In some optional embodiments, if the graph to be searched is a static graph, the evolution equation is represented as:
[0035] |ψ t > = e -iHt |ψ0>;
[0036] where |ψ t > represents the quantum state after the quantum walk evolution, |ψ0> represents the initial quantum state, e represents the base of the natural logarithm, i represents the imaginary unit, and t represents the evolution time.
[0037] In some optional embodiments, if the graph to be searched is a dynamic graph, the quantum walk edge search Hamiltonian is represented as:
[0038]
[0039] where H represents the quantum walk edge search Hamiltonian, k represents the number of times the dynamic graph changes, H l represents the component of the quantum walk edge search Hamiltonian, represents the adjacency matrix of the overall graph corresponding to the l-th time period of the dynamic graph, γ l represents the hopping rate between the graph nodes of the overall graph corresponding to the l-th time period of the dynamic graph;
[0040] where Π l (t) is defined as:
[0041]
[0042] Among them, τ represents the dynamic change time interval of the dynamic graph, and t represents the time parameter.
[0043] In some optional implementations, if the graph to be searched is a dynamic graph, the evolution equation is expressed as:
[0044]
[0045] Among them, |ψ t > represents the quantum state after quantum walk evolution, |ψ0> represents the initial quantum state, e represents the base of natural logarithm, i represents the imaginary unit, Δt l Represents a sequence of dynamic time periods {Δt0, Δt1,…, Δt k} in the l+1th time period.
[0046] In some optional implementations, the probability of successfully finding the target edge to be searched is calculated using the following formula:
[0047] When the target edge to be searched is one: p succ =| <w|ψ t >| 2 ;
[0048] When there are multiple target edges to be searched: p succ =∑ i | <w i |ψ t >| 2 ;
[0049] Among them, p succ Indicates the probability of successfully finding the target edge to be searched.
[0050] The main advantages of the technical solution of the present invention are as follows:
[0051] The quantum walk-based edge search method of the present invention transforms the complex edge search problem into a more easily handled node search problem by adopting a mapping method of the overall graph, thereby enabling the direct application of the quantum walk algorithm for search, thereby improving the efficiency and accuracy of the search. At the same time, the method also takes into account the case where the graph to be searched is a dynamic graph, and can be used to process both static graphs and dynamic graphs to adapt to dynamic changes in the graph structure, thereby enabling fast search of edges in both static and dynamic graphs. Moreover, compared with traditional search algorithms, the method can achieve quadratic acceleration in search efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The drawings described herein are used to provide a further understanding of the embodiments of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0053] Figure 1 A schematic diagram of a flow chart of an edge search method based on quantum walks provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0054] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with specific embodiments of the present invention and corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0055] The technical solutions provided by the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0056] refer to Figure 1 An embodiment of the present invention provides an edge search method based on quantum walks. The method implements edge search on a static graph and edge search on a dynamic graph by utilizing a continuous-time quantum walk model. The method includes the following steps 1 to 5:
[0057] Step 1: obtain the graph to be searched, determine the type of the graph to be searched, map the graph to be searched into a general graph, and determine the adjacency matrix of the general graph;
[0058] In an embodiment of the present invention, the number of nodes in the total graph is the sum of the number of nodes and the number of edges in the graph to be searched.
[0059] In the embodiment of the present invention, the types of graphs to be searched include static graphs and dynamic graphs.
[0060] In the embodiment of the present invention, the graph to be searched is determined according to actual needs.
[0061] Step 2: determine the target edge to be searched, and establish a target edge marking matrix according to the marking state of the target edge to be searched to mark the target edge to be searched;
[0062] In the embodiment of the present invention, the target edges to be searched are determined according to actual needs, and the number of target edges to be searched can be one or more than two.
[0063] Step 3: Define the quantum walk edge search Hamiltonian based on the adjacency matrix of the total graph and the target edge label matrix;
[0064] In an embodiment of the present invention, based on the adjacency matrix of the total graph corresponding to the graph to be searched determined above and the target edge labeling matrix established above, the definition of the quantum walk edge search Hamiltonian is performed to determine the corresponding quantum walk edge search Hamiltonian.
[0065] Step 4: Based on the quantum walk edge search Hamiltonian, the evolution equation is constructed, and the continuous-time quantum walk evolution is performed based on the evolution equation;
[0066] In an embodiment of the present invention, according to the quantum walk edge search Hamiltonian defined above, a corresponding evolution equation is constructed, and continuous-time quantum walk evolution is performed based on the constructed evolution equation, thereby performing edge search.
[0067] Step 5: According to the evolution result, the search target edge is measured to obtain the probability that the search target edge is successfully searched.
[0068] In an embodiment of the present invention, the search target edge is measured based on the evolution results of the continuous-time quantum walk evolution to determine the probability of the target edge being successfully searched, thereby determining the effectiveness and performance of the edge search method.
[0069] The quantum walk-based edge search method provided in an embodiment of the present invention converts a complex edge search problem into a more easily handled node search problem by adopting a mapping method of the overall graph, thereby enabling the direct application of the quantum walk algorithm for search, thereby improving the efficiency and accuracy of the search. At the same time, the method also takes into account the case where the graph to be searched is a dynamic graph, and can be used to process static graphs, and can also adapt to dynamic changes in the graph structure to process dynamic graphs, thereby enabling fast search of edges in static and dynamic graphs. Moreover, compared with traditional search algorithms, the method can achieve quadratic acceleration in search efficiency.
[0070] Furthermore, in an embodiment of the present invention, if the graph to be searched is a static graph, the graph to be searched is mapped into a general graph in the following manner:
[0071] Determine the number of nodes and edges in the graph to be searched, take the sum of the number of nodes and edges in the graph to be searched as the number of nodes in the total graph, regard a node in the graph to be searched as a node in the total graph, regard an edge in the graph to be searched as a node in the total graph, and determine all the nodes in the total graph;
[0072] When two nodes in the graph to be searched are connected, an edge is set between the corresponding two nodes in the overall graph. When two edges in the graph to be searched are adjacent, an edge is set between the corresponding two nodes in the overall graph. When a node in the graph to be searched is connected to an edge, an edge is set between the corresponding two nodes in the overall graph. All edges in the overall graph are determined.
[0073] In the embodiment of the present invention, through the above-mentioned method, all nodes and all edges of the overall graph mapped by the graph to be searched can be determined, thereby determining the overall graph mapped by the graph to be searched.
[0074] Furthermore, since the graph to be searched may also be a dynamic graph, in an embodiment of the present invention, if the graph to be searched is a dynamic graph, the graph to be searched is mapped to the overall graph in the following manner:
[0075] According to the preset rules of adding and reducing edges, the dynamic change of the search graph is simulated according to the dynamic change time series of the dynamic graph to obtain a series of static graphs corresponding to the dynamic graph;
[0076] Map each static image in the series of static images into a total image to obtain the total image of the series.
[0077] Specifically, according to actual needs, the dynamic graph framework is pre-defined, the corresponding rules for adding and removing edges are set, and the dynamic graph dynamic change time series {t0, t1,…, t k}, where k represents the number of times the dynamic graph changes; then, according to the preset rules of adding and reducing edges, the dynamic change simulation of the search graph is performed according to the dynamic change time series of the dynamic graph to obtain the series of static graphs {G0, G1, G2, ..., G k}, the series of static graphs includes the initial graph of the dynamic graph and the graph of the dynamic graph after each change; then, each static graph in the series of static graphs is mapped to the total graph, and the series total graph T(G) = {T(G0), T(G1), T(G2), ..., T(G k )}.
[0078] In the embodiment of the present invention, the static images in the series of static images are mapped into the overall image in the same manner as the above-mentioned mapping of the image to be searched into the overall image when the image to be searched is a static image.
[0079] Furthermore, in an embodiment of the present invention, the adjacency matrix of the overall graph is determined using the following formula:
[0080]
[0081] Among them, A T(G) Represents the adjacency matrix of the total graph, A G Represents the adjacency matrix of the original graph corresponding to the total graph, R G Represents the correlation matrix of the original image corresponding to the total image, Represents R G The transposed matrix, A L(G) Indicates the line graph L corresponding to the original graph corresponding to the overall graph G The adjacency matrix of .
[0082] The correlation matrix R of the original image corresponding to the total image GDefined as:
[0083]
[0084] Where, (R G ) ij represents the element in the i-th row and j-th column of the incidence matrix R G , e i represents the i-th edge in the corresponding original graph, and v j represents the j-th node in the corresponding original graph.
[0085] It should be noted that the original graph corresponding to the overall graph refers to the graph to be searched for mapping to the overall graph.
[0086] In an embodiment of the present invention, when the graph to be searched is a static graph, an adjacency matrix A of the overall graph can be obtained T(G) . When the graph to be searched is a dynamic graph, a set of adjacency matrices of the overall graph can be obtained Correspondingly, the overall graph of the dynamic graph can be represented as a binary array
[0087] Furthermore, in an embodiment of the present invention, since the number of target edges to be searched can be one or more than two, if the target edge to be searched is one, the target edge marking matrix is represented as:
[0088] M = |w><w|;
[0089] If the number of target edges to be searched is more than two, the target edge marking matrix is represented as:
[0090] M = ∑ i |w i ><w i |;
[0091] Where, M represents the target edge marking matrix, |w> represents the marked state of the target edge to be searched, <w| represents the conjugate transpose of |w>, and |w i > represents the marked state of the i-th edge among the target edges to be searched, and <w i | represents the conjugate transpose of |w i .
[0092] In an embodiment of the present invention, when the number of target edges to be searched is more than two, by superimposing the marked states of each target edge, it is possible to simultaneously search for multiple edges in a single quantum walk process.
[0093] Furthermore, in an embodiment of the present invention, if the graph to be searched is a static graph, the quantum walk edge search Hamiltonian is represented as:
[0094] H = -γA T(G) - M;
[0095] Where H represents the quantum walk edge search Hamiltonian, and γ represents the jump rate between nodes in the total graph.
[0096] In an embodiment of the present invention, if the graph to be searched is a dynamic graph, the quantum walk edge search Hamiltonian is expressed as:
[0097]
[0098] Among them, H represents the quantum walk edge search Hamiltonian, k represents the number of times the dynamic graph changes, and H l represents the component of the quantum walk edge search Hamiltonian, represents the adjacency matrix of the total graph of the lth time period corresponding to the dynamic graph, γ l Indicates the jump rate between graph nodes corresponding to the total graph of the dynamic graph in time period l.
[0099] Π l (t) is defined as:
[0100]
[0101] Among them, τ represents the dynamic change time interval of the dynamic graph, and t represents the time parameter.
[0102] It should be noted that, in the embodiment of the present invention, the dynamic changes of the dynamic graph are set to change at equal intervals, that is, the time intervals of the dynamic changes of the dynamic graph are the same, and the time intervals are all τ.
[0103] In the embodiment of the present invention, the jump rate γ and the jump rate γ l is a positive real number, which is pre-selected based on the actual situation. By selecting an appropriate skip rate parameter, the success rate of searching for the target edge can be further improved. The appropriate skip rate parameter can be determined by numerical simulation to further improve the success rate of searching for the target edge.
[0104] In the embodiment of the present invention, it is found based on a large number of numerical simulations that the jump rate is related to the structure and connectivity of the graph to be searched. Therefore, in the embodiment of the present invention, the jump rate is selected as m / D ave , m is a constant coefficient, D ave is the average degree of each node in the total graph, in order to maximize the search success rate of the target edge.
[0105] Furthermore, in an embodiment of the present invention, if the graph to be searched is a static graph, the following evolution equation is constructed based on the quantum walk edge search Hamiltonian defined above:
[0106] |ψ t >=e -iHt |ψ0>;
[0107] Among them, |ψt > represents the quantum state after quantum walk evolution, |ψ0> represents the initial quantum state, e represents the base of natural logarithm, i represents the imaginary unit, and t represents the evolution time.
[0108] In an embodiment of the present invention, if the graph to be searched is a dynamic graph, the following evolution equation is constructed based on the quantum walk edge search Hamiltonian defined above:
[0109]
[0110] Among them, |ψ t > represents the quantum state after quantum walk evolution, |ψ0> represents the initial quantum state, e represents the base of natural logarithm, i represents the imaginary unit, Δt l Represents a sequence of dynamic time periods {Δt0, Δt1,…, Δt k} in the l+1th time period.
[0111] In the embodiment of the present invention, in the above two evolution equations, the corresponding time evolution operators are e -iHt and
[0112] In the embodiment of the present invention, in the above two evolution equations, the initial quantum state is selected as the uniform superposition state of the total graph space, specifically the uniform superposition state of all nodes of the total graph, which is specifically expressed as:
[0113]
[0114] Among them, N T(G) represents the number of nodes in the total graph, and |j> represents the label state of the j-th node in the total graph.
[0115] In the embodiment of the present invention, the evolution time is pre-selected based on actual conditions. By selecting an appropriate evolution time parameter, the success rate of searching for the target edge can be further improved. Specifically, the appropriate evolution time parameter can be determined by numerical simulation to further improve the success rate of searching for the target edge.
[0116] In the embodiment of the present invention, the evolution time is selected as n is a constant coefficient, N and E represent the number of nodes and edges in the graph to be searched, respectively, to maximize the search success rate of the target edge.
[0117] Furthermore, in an embodiment of the present invention, the probability of successfully searching for a target edge to be searched is calculated using the following formula:
[0118] When the target edge to be searched is one: p succ =| <w|ψ t >| 2 ;
[0119] When there are multiple target edges to be searched: p succ =∑ i | <w i |ψ t >| 2 ;
[0120] Among them, p succ Indicates the probability that the target edge to be searched is successfully searched.
[0121] The following describes the principle and effect of the edge search method based on quantum walk provided by the embodiment of the present invention with reference to specific examples:
[0122] Example 1
[0123] In this embodiment 1, the graph to be searched is -Rényi random graph (ER graph). ER graph was created by mathematician Paul The random static graph model proposed by Alfréd Rényi in 1959 can simulate the random connection characteristics of a large number of real networks: starting from a set of N nodes, each pair of nodes is connected with the same probability p.
[0124] Based on the above settings, in this embodiment 1, the specific search process is as follows:
[0125] Step 1: Map the search graph G to the total graph T(G) and obtain the adjacency matrix A of the total graph T(G) ;
[0126] Specifically, the search graph G is mapped to the total graph T(G) using the above-defined method; then, its adjacency matrix A is generated according to the generation rule of the ER graph. G ; Construct its line graph L(G) and generate the adjacency matrix A L(G) ; Construct the correlation matrix R of the graph to be searched G G , thus obtaining the adjacency matrix A of the total graph T(G) :
[0127]
[0128] Step 2: Establish a target edge marking matrix M to mark the target edges to be searched;
[0129] Specifically, suppose that a single target edge of the ER graph is searched, then M = |w> <w|。
[0130] Step 3: Define the quantum walk edge search Hamiltonian as H = -γA T(G) -M;
[0131] Among them, through a large number of simulations, the jump rate is taken as γ=1 / Dave , D ave is the average degree of each node in the overall graph.
[0132] Step 4: Construct the evolution equation |ψ t >=e -iHt |ψ0>, performs continuous-time quantum walk evolution;
[0133] Among them, through a large number of simulations, the evolution time is taken N and E are the number of nodes and edges in the ER graph to be searched, respectively.
[0134] Step 5: Measure the target edge and calculate the probability p of the target edge being successfully searched. succ =| <w|ψ t >| 2 .
[0135] In this embodiment 1, in order to comprehensively evaluate the performance of the edge search method provided by the embodiment of the present invention in the ER graph model, a series of simulation experiments were designed. Specifically, the numerical simulation covers ER graphs with nodes from 10 to 1000, that is, N = 10, 11, ..., 1000. Under the setting of each number of nodes, the edge connection probability range from 0.2 to 1 was further explored, with a step size of 0.1, that is, p = 0.2, 0.3, ..., 1. Under each specific set of N and p parameters, an edge was randomly selected as the target edge to be searched. With this setting, the impact of graph structures of different graph scales and densities on the performance of the search method can be examined, and it is also ensured that the simulation experiment can cover various possible edge connection situations in the graph.
[0136] In order to optimize the jump rate and evolution time in the edge search method, a large number of search simulations are performed for each specific set of N and p parameters and each randomly selected edge to be searched. Specifically, consider the jump rate γ = m / D ave Different values of m range from 0.5 to 1.5, with a step size of 0.1; evolution time The value of n ranges from 0.5 to 1.5, with a step size of 0.1. Through a large number of numerical simulations, the estimated values of the optimal jump rate parameter and the optimal evolution time are obtained: γ opt =1 / D ave , In the average Under the limited conditions of the optimal parameters, the average hit probability P of a large number of simulations is obtained. succ =0.9020.
[0137] According to the above simulation results, it can be seen that the edge search method based on quantum walk provided by the embodiment of the present invention can effectively improve the edge search performance. The target edge is found with high probability within the time complexity of .
[0138] Example 2
[0139] In this second embodiment, the graph to be searched is an RTN graph. An RTN graph is a stochastic dynamic graph in which the network structure and node / edge attributes change randomly over time. An RTN graph typically consists of a static topology and random events or processes. These events or processes can be the addition, deletion, or mutation of edges, or transitions between them. It is assumed that the RTN graph changes at equal intervals, and the total number of edges remains constant during each change. That is, the transfer of edges in the network is simulated by "dropping edges" and "adding edges."
[0140] Based on the above settings, in Example 2, the specific search process is as follows:
[0141] Step 1: According to the preset rules of adding and removing edges, the dynamic change simulation of the RTN graph to be searched is performed, the RTN graph is mapped into the overall graph, and the adjacency matrix of the overall graph is obtained;
[0142] Specifically, use the binary array T(G)=(A T(G) ,t) represents the overall diagram, where is the total graph adjacency matrix set, t={t0,t1,…,t k}, is the time series of dynamic changes of the RTN graph, and k is the number of times the RTN graph changes.
[0143] Step 2: Establish a target edge marking matrix M to mark the target edges to be searched;
[0144] Specifically, suppose that a single target edge of the RTN graph is searched, then M = |w> <w|。
[0145] Step 3: Define the quantum walk edge search Hamiltonian as
[0146] Among them, through a large number of simulations, the jump rate is taken as γ l =1 / D l , D l is the average degree of each node in the total graph in time period l. RTN graph for the entire time period t = Δt0 + Δt1 + ... + Δt k The evolution operator of is expressed as:
[0147]
[0148] Step 4: Construct the evolution equation Perform continuous-time quantum walk evolution;
[0149] Among them, for the RTN graph edge search with k=3, through a large number of simulations, the evolution time is taken N and E are the number of nodes and edges in the RTN graph to be searched, respectively.
[0150] Step 5: Measure the target edge and calculate the probability p of the target edge being successfully searched. succ =| <w|ψ t >| 2 .
[0151] In this Example 2, a series of simulation experiments were designed to comprehensively evaluate the performance of the edge search method provided by the embodiment of the present invention in the RTN graph model. Specifically, the RTN graph is a random dynamic graph. First, an ER graph is randomly generated, and edges are randomly added and dropped. The numerical simulation covers RTN graphs ranging from 10 to 1000 nodes, and the graph changes at equal intervals of 1, 2, 3, 4, and 5 times, that is, N = 10, 11, ..., 1000, k = 1, 2, 3, 4, 5. Under each setting of the number of nodes and the number of graph changes, the effect of the edge search method is further explored when the probability of reconnection of edges in the graph during graph changes is 0.1 and 0.2, respectively, that is, p = 0.1 and 0.2. Under the parameters of the timestamp T (the time when the RTN graph changes), the number of nodes N, and the edge reconnection probability p of each specific network group, an edge is randomly selected as the target edge to be searched. This setup allows us to examine the impact of different graph sizes, the number of dynamic graph changes, and the probability of edge reconnection on the performance of the search method, and also ensures that the simulation experiment can cover all possible edge search situations in the graph.
[0152] In order to optimize the jump rate and evolution time in the edge search method, a large number of search simulations are performed for each specific set of N, T and p parameters and each randomly selected edge to be searched. Specifically, taking the edge search of the RTN graph with k=3 as an example, considering the jump rate γ=m / D ave Different values of m range from 0.5 to 1.5, with a step size of 0.1; evolution time The value of n ranges from 0.5 to 1.5, with a step size of 0.1. Through a large number of numerical simulations, the estimated values of the optimal jump rate parameter and the optimal evolution time are obtained: γ opt =1 / D ave , Under the optimal parameters, the average hit probability P of a large number of simulations is obtained. succ =0.8322.
[0153] Among them, when the success probability of a single execution of the algorithm is not high enough, a higher success probability can be achieved by repeatedly executing the algorithm. In this case, the total search time is:
[0154] According to the above simulation results, it can be seen that the edge search method based on quantum walk provided by the embodiment of the present invention can realize edge search on dynamic graphs and can The target edge is found with high probability within the time complexity of .
[0155] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In addition, "front", "back", "left", "right", "upper" and "lower" in this document are all referenced to the placement states shown in the accompanying drawings.
[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A quantum walk-based edge search method, characterized in that: include: Obtain a graph to be searched, determine the type of the graph to be searched, map the graph to be searched into a general graph, and determine an adjacency matrix of the general graph, where the number of nodes in the general graph is the sum of the number of nodes and the number of edges in the graph to be searched, and the types of the graph to be searched include static graphs and dynamic graphs; Determine a target edge to be searched, and establish a target edge marking matrix according to the marking state of the target edge to be searched to mark the target edge to be searched; defining a quantum walk edge search Hamiltonian according to the adjacency matrix of the overall graph and the target edge labeling matrix; constructing an evolution equation according to the quantum walk edge search Hamiltonian, and performing continuous-time quantum walk evolution based on the evolution equation; According to the evolution result, the search target edge is measured to obtain the probability that the target edge to be searched is successfully searched.
2. The edge search method based on quantum walk according to claim 1, characterized in that If the image to be searched is a static image, the image to be searched is mapped to a general image in the following manner: Determine the number of nodes and edges of the graph to be searched, take the sum of the number of nodes and the number of edges of the graph to be searched as the number of nodes of the total graph, regard a node in the graph to be searched as a node in the total graph, regard an edge in the graph to be searched as a node in the total graph, and determine all nodes of the total graph; When two nodes in the graph to be searched are connected, an edge is set between the corresponding two nodes in the overall graph; when two edges in the graph to be searched are adjacent, an edge is set between the corresponding two nodes in the overall graph; when a node in the graph to be searched is connected to an edge, an edge is set between the corresponding two nodes in the overall graph, and all edges of the overall graph are determined.
3. The edge search method based on quantum walk according to claim 2, characterized in that If the graph to be searched is a dynamic graph, the graph to be searched is mapped to a general graph in the following manner: According to the preset rules of adding and reducing edges, the dynamic change simulation of the graph to be searched is performed according to the dynamic change time sequence of the dynamic graph to obtain a series of static graphs corresponding to the dynamic graph; Map each static image in the series of static images into a total image to obtain the total image of the series.
4. The edge search method based on quantum walk according to claim 3, characterized in that The adjacency matrix of the total graph is determined using the following formula: Among them, A T(G) Represents the adjacency matrix of the total graph, A G Represents the adjacency matrix of the original graph corresponding to the total graph, R G Represents the correlation matrix of the original image corresponding to the total image, Represents R G The transposed matrix, A L(G) Indicates the line graph L corresponding to the original graph corresponding to the overall graph G The adjacency matrix of The correlation matrix R of the original image corresponding to the total image G Defined as: Among them, (R G ) ij Represents the correlation matrix R G The element in row i and column j in i Indicates the i-th edge in the corresponding original graph, v j Indicates the jth node in the corresponding original graph.
5. The edge search method based on quantum walk according to claim 4, characterized in that If the target edge to be searched is one, the target edge label matrix is expressed as: M=|w> <w|; If there are multiple target edges to be searched, the target edge label matrix is expressed as: M=∑ i |w i ><w i |; Among them, M represents the target edge marking matrix, |w> represents the marked state of the target edge to be searched, <w| represents the conjugate transpose of |w>, and |w i > represents the marked state of the i-th edge in the target edge to be searched, <w i | represents |w i >’s conjugate transpose.
6. The edge search method based on quantum walk according to claim 5, characterized in that If the graph to be searched is a static graph, the quantum walk edge search Hamiltonian is expressed as: H=-γA T(G) -M; Where H represents the quantum walk edge search Hamiltonian, and γ represents the jump rate between nodes in the total graph.
7. The edge search method based on quantum walk according to claim 6, characterized in that If the graph to be searched is a static graph, the evolution equation is expressed as: |ψ t >=e -iHt |ψ0>; Among them, |ψ t > represents the quantum state after quantum walk evolution, |ψ0> represents the initial quantum state, e represents the base of natural logarithm, i represents the imaginary unit, and t represents the evolution time.
8. The edge search method based on quantum walk according to claim 5, characterized in that If the graph to be searched is a dynamic graph, the quantum walk edge search Hamiltonian is expressed as: Among them, H represents the quantum walk edge search Hamiltonian, k represents the number of times the dynamic graph changes, and H l represents the component of the quantum walk edge search Hamiltonian, represents the adjacency matrix of the total graph of the lth time period corresponding to the dynamic graph, γ l Indicates the jump rate between graph nodes corresponding to the total graph of the dynamic graph in time period l; Among them, Π l (t) is defined as: Among them, τ represents the dynamic change time interval of the dynamic graph, and t represents the time parameter.
9. The edge search method based on quantum walk according to claim 8, characterized in that If the graph to be searched is a dynamic graph, the evolution equation is expressed as: Among them, |ψ t > represents the quantum state after quantum walk evolution, |ψ0> represents the initial quantum state, e represents the base of natural logarithm, i represents the imaginary unit, Δt l Represents a sequence of dynamic time periods {Δt0, Δt1,…, Δt k } in the l+1th time period.
10. The edge search method based on quantum walk according to claim 7 or 9, characterized in that: The probability of successfully finding the target edge to be searched is calculated using the following formula: When the target edge to be searched is one: p succ =| <w|ψ t >| 2 ; When there are multiple target edges to be searched: p succ =∑ i | <w i |ψ t >| 2 ; Among them, p succ Indicates the probability of successfully finding the target edge to be searched.