Quantum computing method, device, equipment and medium for network optimization

The construction of undirected graphs and quantum systems through quantum computing methods solves the timeliness and complexity problems of the maximum weighted independent set problem in network optimization, realizes fast and accurate network unit determination, and meets the timeliness requirements of large-scale networks.

CN118921683BActive Publication Date: 2024-12-27GUOKAIKE QUANTUM TECH (ANHUI) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411407343.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2024-12-27
Estimated Expiration
2044-10-10

AI Technical Summary

Technical Problem

When facing an increasing network, existing network optimization methods are difficult to meet the timeliness requirements. The complexity of classical algorithms increases exponentially, making it difficult to effectively solve the problem of maximum weighted independent sets.

Method used

Using quantum computing methods, undirected graphs and quantum systems corresponding to the network are constructed. By constructing quantum lines with Hamiltonian and tunable parameters with interference constraints, adjusting parameters reduces the expected value of Hamiltonian and measuring quantum states to determine The optimal solution to the largest weighted independent set.

Benefits of technology

It realizes the rapid and accurate determination of network units, meets the timeliness of applications, and significantly improves processing speed, especially when the network scale is large, it can provide efficient solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118921683B_ABST
    Figure CN118921683B_ABST
Patent Text Reader

Abstract

The present invention relates to a quantum computing method, device, equipment and medium for network optimization, the method comprising: constructing an undirected graph corresponding to a network; constructing a quantum system corresponding to the undirected graph, the quantum system comprising quantum bits corresponding to each vertex in the undirected graph; constructing a Hamiltonian of a maximum weighted independent set with interference constraints, the interference constraints comprising minimizing interference between network units in the network; constructing a quantum circuit with adjustable parameters; adjusting the parameter value in the quantum circuit until the expected value of the Hamiltonian converges; measuring the quantum state of the quantum system when the expected value of the Hamiltonian converges, and determining the quantum state with the highest probability in the measurement result as the optimal solution corresponding to the maximum weighted independent set. The embodiment of the present invention has a fast processing speed, meets the timeliness of the application, and has high flexibility, versatility and expansibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of quantum computing, and in particular to a quantum computing method, device, equipment and storage medium for network optimization. Background Art

[0002] Networks play an important role in all walks of life in today's society. For example, in the field of mobile communications, mobile communication networks composed of base stations provide indispensable communication services for people's lives and work; for example, wireless sensor networks (WSNs) used in fields such as environmental monitoring, medical testing and industrial automation also play an important role in data transmission and communication. In the present invention, base stations constituting mobile communication networks, wireless modules constituting WSNs, etc. are collectively referred to as network units. For a network, the number of network units is closely related to the cost of networking, the complexity of management and the stability of operation; the importance of each network unit in a network is not exactly the same in the overall network; for some networks, for the sake of safe operation, the signal coverage of each network unit will have an overlapping area with the signal coverage of other network units, so in specific applications, only some network units need to be turned on to meet the needs; in addition, there may be interference between network units, which will affect the performance of the overall network. Therefore, for such a network, one purpose of network optimization is to determine the network unit with the least interference, the maximum number of network units that can be turned on at the same time and the greatest importance.

[0003] At present, the common optimization method is to use the graph theory method in mathematics to model a given network, represent the network unit as a vertex in an undirected graph, and represent its importance, coverage, capacity and other attributes by the assigned weights. The interference between network units is reflected as the connection between vertices. Therefore, the optimization problem of determining the network unit with the least interference, the maximum number of simultaneous openings and the greatest importance from a given network can be modeled as the maximum weighted independent set (MWIS) problem, the purpose of which is to find a set of non-adjacent vertices with the maximum sum of vertex weights in the set. The commonly used solution method is to find the optimal solution of the maximum weighted independent set through exhaustive method. However, as the scale of the network increases, the complexity of the interference relationship makes the difficulty of the exhaustive algorithm increase exponentially, so that the limited classical computing power can hardly meet the requirements such as timeliness in practical applications. Summary of the invention

[0004] In response to the technical problems existing in the prior art, the present invention proposes a quantum computing method, device, equipment and storage medium for network optimization, which can quickly determine the network unit that satisfies the optimal solution of the maximum weighted independent set from a given network and meet the timeliness of the application.

[0005] In order to solve the above technical problems, according to one aspect of the present invention, the present invention provides a quantum computing method for network optimization, the method comprising the following steps:

[0006] Constructing an undirected graph corresponding to a network, wherein the network includes a plurality of network units, the undirected graph includes vertices corresponding to the respective network units in the network, each vertex includes a weight of the corresponding network unit, and lines between vertices are used to characterize interference between the network units;

[0007] Constructing a quantum system corresponding to the undirected graph, wherein the quantum system includes a quantum bit corresponding to each vertex in the undirected graph;

[0008] Constructing a Hamiltonian of a maximum weighted independent set with interference constraints, wherein the interference constraints include minimizing interference between network units in the network, wherein the maximum weighted independent set includes elements corresponding to each qubit in the quantum system;

[0009] Constructing a quantum circuit with adjustable parameters based on the quantum system;

[0010] Adjust the parameter values ​​in the quantum circuit so that the expectation value of the Hamiltonian decreases until convergence;

[0011] Measure the quantum state of the quantum system when the expected value of the Hamiltonian converges, and determine the quantum state with the highest probability in the measurement results as the optimal solution of the maximum weighted independent set;

[0012] Based on the correspondence between the quantum bits and the undirected graph and the correspondence between the undirected graph and the network, a network unit corresponding to the quantum bits in the optimal solution of the maximum weighted independent set is determined.

[0013] Optionally, the Hamiltonian includes a target Hamiltonian and a constrained Hamiltonian, and the weighted sum of elements in the maximum weighted independent set is maximum when the expected value of the target Hamiltonian is minimum, and the expected value of the constrained Hamiltonian is minimum when and only when there is no interference between any two elements in the maximum weighted independent set.

[0014] Optionally, the target Hamiltonian is expressed as: ; Where Ho represents the target Hamiltonian; σ j Z is the Pauli Z operator acting on the j-th quantum bit, w j is the vertex weight corresponding to the j-th quantum bit.

[0015] The constrained Hamiltonian is expressed as: ; Among them, H C represents the constrained Hamiltonian; σ k Z and σl Z are the Pauli Z operators acting on the kth and lth quantum bits respectively; w k and w l are the vertex weights corresponding to the kth qubit and the lth qubit, respectively, k,l is the interference value between the vertex corresponding to the kth qubit and the vertex corresponding to the lth qubit. When there is interference between the two vertices, k,l =1; when there is no interference between the two vertices k,l =0.

[0016] Optionally, the constrained Hamiltonian expression also includes a coefficient that can be adjusted by a user and is used to express the importance of the constrained Hamiltonian relative to the target Hamiltonian.

[0017] Optionally, the quantum circuit with adjustable parameters includes multiple layers of quantum circuit units connected end to end, and the adjustable parameter value in each layer of quantum circuit can be adjusted independently during the adjustment process.

[0018] Optionally, when the number of layers of the quantum circuit unit is greater than or equal to a first threshold, the quantum state with the highest probability of appearing in the measurement result is determined as the optimal solution corresponding to the maximum weighted independent set; when the number of layers of the quantum circuit unit is greater than or equal to a second threshold, the only quantum state existing in the measurement result is determined as the optimal solution corresponding to the maximum weighted independent set, wherein the first threshold is less than the second threshold.

[0019] Optionally, the magnitudes of the first threshold and the second threshold are associated with the number of network elements in the network.

[0020] According to another aspect of the present invention, the present invention also provides a quantum computing device for network optimization, comprising an undirected graph construction module, a quantum system construction module, a Hamiltonian construction module, a quantum circuit module, a quantum circuit module, a parameter adjustment module and an optimal solution acquisition module, wherein the undirected graph construction module is configured to construct an undirected graph corresponding to a network, the network comprises a plurality of network units, the undirected graph comprises vertices corresponding to each network unit in the network, each vertex comprises a weight of its corresponding network unit, and the connection between vertices is used to characterize the interference between the network units; the quantum system construction module is configured to construct a quantum system corresponding to the undirected graph, the quantum system comprises quantum bits corresponding to each vertex in the undirected graph; the Hamiltonian construction module is configured to construct a maximum weighted maximum solution with interference constraints. The invention relates to a Hamiltonian of an independent set, wherein the interference constraint condition includes minimizing the interference between network units in the network, wherein the maximum weighted independent set includes elements corresponding to each quantum bit in the quantum system; the quantum circuit module is configured to construct a quantum circuit with adjustable parameters based on the quantum system; the parameter adjustment module is configured to adjust the parameter value in the quantum circuit so that the expected value of the Hamiltonian is reduced until the expected value of the Hamiltonian converges; the optimal solution acquisition module is configured to measure the quantum state of the quantum system when the expected value of the Hamiltonian converges, and determine the quantum state with the highest probability in the measurement result as the optimal solution of the maximum weighted independent set; based on the correspondence between the quantum bit and the undirected graph and the correspondence between the undirected graph and the network, determine the network unit corresponding to the quantum bit in the optimal solution of the maximum weighted independent set.

[0021] According to another aspect of the present invention, the present invention also provides an electronic device, including a processor and a memory, wherein the memory stores computer instructions, and when the processor runs the computer instructions, the aforementioned quantum computing method for network optimization is executed.

[0022] According to another aspect of the present invention, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the aforementioned quantum computing method for network optimization is executed.

[0023] The embodiment of the present invention uses a quantum computing method to solve the problem of solving the maximum weighted independent set problem for a given network. Compared with the classical solution method, it can not only obtain the optimal solution, but also has a fast processing speed. Especially when the network scale is getting larger and larger, the processing speed is significantly improved, which meets the timeliness of the application, and has high flexibility, versatility and expansibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Hereinafter, preferred embodiments of the present invention will be described in further detail with reference to the accompanying drawings.

[0025] Figure 1 It is a flow chart of a quantum computing method for network optimization according to an embodiment of the present invention.

[0026] Figure 2 Schematic diagram of a quantum gate for realizing a separate operator in a Hamiltonian expression according to an embodiment of the present invention.

[0027] Figure 3 Schematic diagram of a quantum gate for implementing two operators of product relations in a Hamiltonian expression according to an embodiment of the present invention.

[0028] Figure 4 It is a schematic diagram of an undirected graph based on a mobile network according to an embodiment of the present invention.

[0029] Figure 5 is based on Figure 4 Schematic diagram of the QAOA quantum circuit constructed by the undirected graph shown.

[0030] Figure 6 It is a flow chart of a method for adjusting parameters of a QAOA quantum circuit according to an embodiment of the present invention.

[0031] Figure 7 yes Figure 6 Specific flow chart of step S26 in .

[0032] Figure 8 is based on Figure 5 Schematic diagram of measurement results when the number of layers of the QAOA quantum circuit is P=8.

[0033] Fig. 9 is based on Figure 5 Schematic diagram of measurement results when the number of layers of the QAOA quantum circuit is P=31.

[0034] Fig.10 It is a schematic diagram of an undirected graph based on a mobile network according to another embodiment of the present invention.

[0035] Fig.11 is based on Fig.10 Schematic diagram of the QAOA quantum circuit constructed by the undirected graph shown.

[0036] Fig.12 is based on Fig.11 Schematic diagram of measurement results when the number of layers of the QAOA quantum circuit is P=900.

[0037] Fig.13 It is a principle block diagram of a quantum computing device for network optimization according to an embodiment of the present invention.

[0038] Fig.14It is a principle block diagram of a quantum computing system for network optimization according to an embodiment of the present invention.

[0039] Fig.15 It is a principle block diagram of a quantum computing system for network optimization according to another embodiment of the present invention.

[0040] Fig.16 It is a structural principle block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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 creative work are within the scope of protection of the present invention.

[0042] In the following detailed description, reference may be made to the various specification drawings that are part of the present application and are used to illustrate specific embodiments of the present application. In the accompanying drawings, similar reference numerals describe substantially similar components in different figures. The various specific embodiments of the present application are described below in sufficient detail so that a person of ordinary skill in the art with relevant knowledge and skills in the art can implement the technical solutions of the present application. It should be understood that other embodiments may also be used or structural, logical or electrical changes may be made to the embodiments of the present application.

[0043] The current quantum computer is in the noisy intermediate-scale quantum era (NISQ). Due to the limited quantum capacity and low quantum bit fidelity, the engineering implementation of quantum algorithms including black box functions (Oracles) represented by Shor's algorithm and HHL algorithm is very difficult. On the other hand, the variational quantum algorithm (VQA) parameterizes the quantum circuit and introduces a classical optimizer to adjust the parameters to find the optimal solution or approximate optimal solution to the problem. Using VQA can relax the requirements for fidelity and significantly simplify the quantum circuit for real machine implementation. Further, VQA includes the variational quantum eigensolver (VQE), the quantum approximate optimization algorithm (QAOA) and the quantum neural network (QNN). VQE is mainly used in quantum chemistry and biology to solve the ground state and low excited state of quantum systems. QAOA is mainly used to solve combinatorial optimization problems, and can provide approximate solutions that are better than classical algorithms in problems such as maximum cut. QNN is inspired by classical neural networks and takes advantage of the characteristics of quantum algorithms. It can be used to process complex data and solve more general tasks.

[0044] In order to meet the computational requirements of the maximum weighted independent set that cannot be met by classical computing power when the network scale increases, the present invention provides a quantum computing method for network optimization, which is used to determine multiple network units with the maximum weighted sum and the minimum interference from the given network.

[0045] See also Figure 1 , Figure 1 1 is a flow chart of a quantum computing method for network optimization according to an embodiment of the present invention. The method comprises the following steps:

[0046] Step S11, constructing an undirected graph corresponding to the network based on given network data.

[0047] Step S12: construct a quantum system corresponding to the undirected graph, wherein the quantum system includes a plurality of quantum bits, and the plurality of quantum bits correspond one-to-one to the vertices of the undirected graph respectively.

[0048] Step S13, constructing a Hamiltonian of a maximum weighted independent set with interference constraints, wherein the maximum weighted independent set includes elements corresponding to each quantum bit in the quantum system, the weights of the elements correspond to the weights of the vertices of the undirected graph, and the interference constraints include minimizing the interference between network units in the network.

[0049] Step S14: constructing a quantum circuit with adjustable parameters based on the quantum system.

[0050] Step S15, adjusting the parameter values ​​in the quantum circuit so that the expected value of the Hamiltonian decreases until convergence.

[0051] Step S16, measuring the quantum state of the quantum system when the expected value of the Hamiltonian converges, and determining the quantum state with the highest probability in the measurement result as the optimal solution corresponding to the maximum weighted independent set.

[0052] Step S17, based on the correspondence between quantum bits and undirected graphs and the correspondence between undirected graphs and networks, determine the network units corresponding to the quantum bits in the optimal solution of the maximum weighted independent set.

[0053] The given network data includes the number of network units n in the network, the weight w assigned to each network unit based on its importance, coverage, capacity and other attributes, and the two network units with interference. In the following description, v represents the set of network units in the network, and the subscript j represents the sequence number of the network unit, then v j represents the jth network unit in the network unit set v, j = 1, 2, ..., n, the jth network unit v j The weight is represented by w j .

[0054] In step S11, each network unit in the network is taken as a vertex, and two vertices with interference are connected by lines, so as to construct an undirected graph corresponding to the network. The weight of the vertex is the weight of the corresponding network unit. For the sake of simplicity, the vertex set in the undirected graph is also represented as v, and the jth vertex is represented as v j , the weight of the vertex is represented by w j . The interference situation corresponding to the network unit in the undirected graph is represented by the adjacency matrix ɛ, and each element in the matrix represents the interference between two vertices. In one embodiment, when there is interference between two vertices, the element value is 1, and when there is no interference between the two vertices, the element value is 0. Therefore, an undirected graph of a network can be represented as (V, ɛ), corresponding to the interference optimization problem of the network of the present invention, which is modeled as a problem of solving the maximum weighted independent set. For a known network, its corresponding undirected graph (V, ɛ) is known, that is, its adjacency matrix ɛ and vertex v j and its weight w j All of them are known quantities. The maximum weighted independent set obtained from the undirected graph must satisfy the conditions shown in the following formula 1-1.

[0055] 1-1.

[0056] ,

[0057] If the kth vertex is selected, v k =1, otherwise, v k =0,

[0058] Furthermore, if vertex k is connected to vertex l by an edge, ɛ k,l =1, otherwise, ɛ k,l =0.

[0059] in, Represents any vertex v j .ɛ k,lRepresents the value of the adjacency matrix element. According to the above conditions that should be met, when there is interference between two vertices, the value of the adjacency matrix element is 1. When it is substituted into the inequality, the inequality does not hold, so the two vertices are not elements in the maximum weighted independent set; when there is no interference between the two vertices, the value of the adjacency matrix element is 0. When it is substituted into the inequality, the inequality holds. Then the two vertices can be used as candidate elements of the maximum weighted independent set, and then the weighted sum of the candidate elements is calculated. The candidate elements with the largest weighted sum are combined to form the optimal solution of the maximum weighted independent set, thereby determining the corresponding network unit in the network. In the classical algorithm, it is necessary to perform the above calculation and judgment on each vertex in the undirected graph according to this method. With the increase in the number of network units in the network and the increase in interference relations, the complexity of the classical algorithm for obtaining the optimal solution of the maximum weighted independent set increases exponentially, which is time-consuming and difficult to meet actual application needs. Therefore, the present invention obtains the optimal solution of the maximum weighted independent set based on quantum computing.

[0060] In step S12, the quantum system can be implemented by any quantum computing device, such as an ion trap computer, an optical quantum computer, a superconducting quantum computer, a neutral atom quantum computer, or a real quantum computing device, or by a simulator in a classical computer. The number of quantum bits in the quantum system is the same as the number of vertices in the undirected graph, and they correspond one to one, that is, each vertex is encoded as a quantum bit.

[0061] In step S13, in one embodiment, the Hamiltonian of the maximum weighted independent set with interference constraints includes two parts, the Hamiltonian includes a target Hamiltonian and a constrained Hamiltonian, and when the expected value of the target Hamiltonian is minimized, the weighted sum of the elements in the maximum weighted independent set is maximized, and the expected value of the constrained Hamiltonian is minimized if and only if there is no connection between any two selected vertices in the undirected graph.

[0062] In a further embodiment, each vertex is encoded as a quantum bit, and the quantum operators acting on it are the identity operator I and the Pauli Z operator σ j Z , when the vertex v j When selected, sets the target Hamiltonian to , the other cases (i.e. the cases that are not selected) take the value of 0. Based on the condition that the weighted sum of the elements in the maximum weighted independent set is the largest, the target Hamiltonian obtained after derivation is expressed by the following expression 2-1.

[0063] 2-1.

[0064] Where Ho represents the target Hamiltonian; σ j Zis the Pauli Z operator acting on the j-th quantum bit, w j is the vertex weight corresponding to the jth quantum bit. When the weighted sum of all vertices is the largest, the target Hamiltonian H O The value of is the smallest.

[0065] Based on the interference condition, that is, , when there is a line between the two selected vertices, set the value of the constraint Hamiltonian to , and the value in other cases is 0. After derivation, the constrained Hamiltonian is expressed by expression 2-2.

[0066] 2-2.

[0067] Among them, H C represents the constrained Hamiltonian; σ k Z and σ l Z are the Pauli Z operators acting on the kth and lth quantum bits respectively; w k and w l are the vertex weights corresponding to the kth qubit and the lth qubit, respectively, k,l is the interference value between the vertex corresponding to the kth qubit and the vertex corresponding to the lth qubit. When there is interference between the two vertices, k,l =1; when there is no interference between the two vertices k,l = 0. The constraint Hamiltonian H C The value of is the smallest.

[0068] Therefore, the Hamiltonian of the maximum weighted independent set with interference constraints can be shown as follows in Equation 2-3.

[0069] 2-3.

[0070] Since the importance of the weighted sum to interference is different for different networks, in order to facilitate users to flexibly set the importance of the weighted sum relative to the interference, in another embodiment, a weight coefficient ρ is set for the constrained Hamiltonian to express the importance of the interference relative to the weighted sum, so that expression 2-3 can be further expressed as the following formula 2-4.

[0071] 2-4.

[0072] In step S14, the QAOA quantum circuit is used to calculate the individual σ in the target Hamiltonian expression. j Z term, by j Execute RZ(γi w j ) gate to achieve, see Figure 2 For two separate σ in the constrained Hamiltonian k Z Term and σ l Z Item, respectively for the corresponding quantum bit q k and q l Execute RZ(-γ i ρ(w l +w k ) / 2) gate, for the σ acting on two qubits simultaneously k Z σ l Z term, by k and q l Perform two CNOTs (ql,qk) The door has an RZ(γ i ρ(w l +w k ) / 2) gate to achieve, see Figure 3 . γ in quantum gates i is an adjustable parameter, where the subscript i represents the number of layers of the quantum circuit unit. The adjustable parameter γ of each layer i Independent of each other.

[0073] The process of constructing a QAOA quantum circuit is as follows.

[0074] First, an initialization operation is performed on all quantum bits in the quantum system, so that the initial quantum state of each quantum bit is |0> state. After the initialization operation, the quantum state of the quantum system is .

[0075] Then, on this basis, the Hadamard gate is executed on all quantum bits separately to make the quantum state of the quantum system a uniform mixed state. .

[0076] In order to calculate the target Hamiltonian, RZ(γ i w j )Door.

[0077] In order to realize the single term σ in the constrained Hamiltonian k Z , σ l Z and the product term σ k Z σ l Z , according to the connection relationship between two vertices in the undirected graph, determine the corresponding quantum bit q k and ql , perform RZ(-γ on these two qubits respectively i ρ(w l +w k ) / 2) gate, and then execute two CNOT (ql,qk) The door has an RZ(γ i ρ(w l +w k ) / 2)door.

[0078] Finally, the quantum circuit’s expressive power is enhanced by mixing the quantum states, and then RX(2β i )Door.

[0079] The QAOA quantum circuit is constructed in the above manner. In order to improve the circuit expression ability and obtain the optimal solution, the aforementioned QAOA quantum circuit can be used as a quantum circuit unit, and multiple quantum circuit units with the same structure but independent parameters are set. These quantum circuit units are connected end to end to form a complete quantum circuit. Each quantum circuit unit is called a layer, and the number of quantum circuit units is the number of layers, which can be flexibly set according to needs.

[0080] See also Figure 4 , Figure 4 It is a schematic diagram of an undirected graph based on a mobile network according to an embodiment of the present invention, wherein the mobile network includes five base stations, the lines between vertices represent interference between corresponding two base stations, and the numbers in the vertices in the figure represent the weights of the corresponding base stations. Figure 5 is based on Figure 4 The schematic diagram of the QAOA quantum circuit constructed by the undirected graph is shown in the figure. The serial numbers of the quantum bits in the quantum circuit diagram correspond one to one with the serial numbers of the vertices in the undirected graph. In order to simplify the diagram, only the first layer of quantum circuit units in the dotted box are shown in the figure.

[0081] In step S15, during the parameter adjustment process, the quantum computing device and the classical optimizer are used to adjust the parameters. Figure 6 , Figure 6 This is a flow chart of a method for adjusting parameters of a QAOA quantum circuit according to an embodiment of the present invention. Specifically, it includes the following steps:

[0082] Step 21, set the parameter values ​​in the quantum circuit through the classical optimizer, and send the parameter values ​​to the quantum computing device. i and β i The specific value when i takes different values, and calculate each γ i w j The value of each -γ i ρ(w l +w k) / 2, each γ i ρ(w l +w k ) / 2, and each 2β i The value of .

[0083] After receiving the parameter value, the quantum computing device performs the following steps.

[0084] Step S22, initializing the quantum state of all quantum bits to zero state.

[0085] Step S23, executing the Hadamard gate on all quantum bits respectively.

[0086] Step S24, setting the quantum circuit layer number i=1.

[0087] Step S25, traverse j from 1 to n, and perform j Execute RZ(γ i w j ) door; then follow Figure 7 The process shown executes step S26.

[0088] In step S26, for the sequence number pair (l, k), traverse l from 1 to n and k from 1 to n, when k>l, and ɛ k,l =1, perform the following steps:

[0089] Step S261, for quantum bit q l and q k Execute RZ(-γ i ρ(w l +w k ) / 2)door.

[0090] Step S262, for quantum bit q l and q k Execute CNOT (ql,qk) gate; where the quantum bit q l is the control bit, and the quantum bit q k For the target position.

[0091] Step S263, for quantum bit q l and q k Execute RZ(γ i ρ(w l +w k ) / 2)door.

[0092] Step S264, for quantum bit q l and q k Execute CNOT again (ql,qk) Door.

[0093] Step S27, traverse j from 1 to n, for quantum bit q j Execute RX(2β i )Door.

[0094] Step S28, set the number of quantum circuit layers i = i + 1.

[0095] Step S29, determine whether i is equal to P, where P is the total number of layers set. If i is not equal to P, return to step S25, if i is equal to P, execute step S210.

[0096] Step S210, measure all quantum bits, and send the quantum states obtained after measurement to the classical optimizer.

[0097] Step S211, the classical optimizer calculates the expected value E_c of the Hamiltonian based on the quantum state.

[0098] Step S212, the classical optimizer calculates the descent gradient of the current Hamiltonian expected value E_c.

[0099] Step S213, determine whether the descent gradient is 0, that is, whether the currently calculated Hamiltonian expected value E_c is decreasing. If it is decreasing, it means that the current Hamiltonian expected value E_c has not converged, then return to step S21 and continue to adjust the parameter γ i and β i The specific value when i takes different values. If the descending gradient is zero, it means that the currently calculated Hamiltonian expected value E_c no longer decreases, and it is considered that the Hamiltonian expected value E_c has converged, and the parameter adjustment is completed, and step S16 is executed.

[0100] In step S16, after measuring the quantum system and obtaining the measurement results, the optimal solution is determined from the measurement results. The optimal solution is determined by judging the number of quantum states in the measurement results. If there are multiple quantum states in the measurement results, the quantum state with the highest probability of occurrence is determined as the optimal solution. If there is only one quantum state in the measurement results, it is used as the optimal solution. When the number of layers of quantum circuit units in the quantum circuit is greater than or equal to the first threshold and less than the second threshold, multiple quantum states will be obtained in the measurement results with different probabilities of occurrence. At this time, the quantum state with the highest probability of occurrence is the optimal solution. When the number of layers of quantum circuit units is greater than or equal to the second threshold, there is only one quantum state in the measurement results, and the only existing quantum state is the optimal solution. Figure 4 The undirected graph shown, Figure 5 The QAOA quantum circuit shown in the figure is taken as an example, in which only the first layer of quantum circuit units is shown. When the total number of layers P = 8, the measurement results are as follows Figure 8 As shown, from Figure 8As can be seen from the figure, there are multiple quantum states with different probabilities in the measurement results at this time, and the one with the largest probability is the optimal solution; the measurement results when P=31 are as follows Fig. 9 As shown, there is only one quantum state, namely the binary value 10100 of the quantum state corresponding to the optimal solution.

[0101] In step S17, the network unit corresponding to the quantum state of the optimal solution can be determined based on the correspondence between the quantum bit, the undirected graph and the network. In the present invention, the binary value of the quantum state is represented as a weighted maximum independent set element, and 0 represents not a weighted maximum independent set element. According to the binary value 10100, the corresponding Figure 4 From the undirected graph in , we can get that the current vertices v2 and v4 constitute the weighted maximum independent set.

[0102] See also Fig.10 , Fig.10 It is a schematic diagram of an undirected graph based on a mobile network according to another embodiment of the present invention, wherein the mobile network includes ten base stations, and the numbers in the vertices in the graph represent the weights of the corresponding base stations. Fig.11 is based on Fig.10 Schematic diagram of the QAOA quantum circuit constructed by the undirected graph shown. To simplify the diagram, only some quantum gates in the first layer of quantum circuit units in the dotted box are shown in the figure.

[0103] According to the above method, the quantum circuit is adjusted and measured. It is found that when the total number of quantum circuit layers P=250, the quantum state with the highest probability is the optimal solution; when the total number of quantum circuit layers P=900, there is only one quantum state representing the optimal solution. The measurement results are as follows: Fig.12 As shown, the binary value of the quantum state corresponding to the optimal solution is 0100110100, thus obtaining Fig. 9 Vertices v2, v4, v5, and v8 in form the maximum weighted independent set.

[0104] For the above two given networks, the optimal solution obtained by the method of the present invention is consistent with the correct solution obtained by the classical exhaustive algorithm, so it can be seen that the quantum algorithm provided by the present invention can provide accurate and correct solutions. In addition, according to the measurement results of the above two given networks at different times when the number of layers of quantum circuit units is different, it can be seen that the size of the first threshold and the second threshold is associated with the number of network units in the network. The larger the number of network units, the larger the threshold. The threshold can be obtained through a finite number of experiments.

[0105] See also Fig.13 , Fig.13It is a principle block diagram of a quantum computing device for network optimization according to an embodiment of the present invention, wherein the device comprises an undirected graph construction module 11, a quantum system construction module 12, a Hamiltonian construction module 13, a quantum circuit module 14, a parameter adjustment module 15 and an optimal solution acquisition module 16, wherein the undirected graph construction module 11 constructs an undirected graph according to network data, wherein each network unit in the network is taken as a vertex, and two vertices with interference are connected by lines to construct an undirected graph corresponding to the network; the weight of the vertex is the weight of the corresponding network unit.

[0106] The quantum system construction module 12 is connected to the undirected graph construction module 11 and is configured to construct a quantum system corresponding to the undirected graph, wherein the quantum bits in the quantum system correspond one-to-one to the vertices of the undirected graph.

[0107] The Hamiltonian construction module 13 is connected to the quantum system construction module 12 and is configured to construct a Hamiltonian for expressing a maximum weighted independent set with an interference constraint, wherein the elements of the maximum weighted independent set are quantum bits corresponding to the vertices of the undirected graph, the weights of the elements correspond to the weights of the vertices of the undirected graph, and the interference constraint is that the interference is minimized. In one embodiment, the Hamiltonian includes a target Hamiltonian and a constrained Hamiltonian, and when the expected value of the target Hamiltonian is minimized, the weighted sum of the elements in the maximum weighted independent set is maximized, and the expected value of the constrained Hamiltonian is minimized when and only when there is no connection between any two selected vertices in the undirected graph.

[0108] Furthermore, the target Hamiltonian is expressed as: ; Where Ho represents the target Hamiltonian; σ j Z is the Pauli Z operator acting on the j-th quantum bit, w j is the vertex weight corresponding to the j-th quantum bit.

[0109] The constrained Hamiltonian is expressed as: ; Among them, H C represents the constrained Hamiltonian; σ k Z and σ l Z are the Pauli Z operators acting on the kth and lth quantum bits respectively; w k and w l are the vertex weights corresponding to the kth qubit and the lth qubit, respectively, k,l is the interference value between the vertex corresponding to the kth qubit and the vertex corresponding to the lth qubit. When there is interference between the two vertices, k,l =1; when there is no interference between the two vertices k,l =0.

[0110] Therefore, the Hamiltonian of the maximum weighted independent set with interference constraints is shown in Equation 2-3.

[0111] In another embodiment, the expression of the constrained Hamiltonian also includes a weight coefficient that can be adjusted by the user and is used to express the importance of the constrained Hamiltonian relative to the target Hamiltonian. . Therefore, the expression of Hamiltonian is shown in Equation 2-4.

[0112] The quantum circuit module 14 is connected to the undirected graph construction module 11, the quantum system construction module 12 and the Hamiltonian construction module 13 respectively, and is configured to construct a quantum circuit with adjustable parameters based on the quantum system. The construction process and the specific quantum circuit are as described in the above method, and will not be repeated here.

[0113] The parameter adjustment module 15 is connected to the quantum circuit module 14 and is configured to adjust the parameter value in the quantum circuit in a manner that reduces the expected value of the Hamiltonian of the quantum system until the expected value of the Hamiltonian converges. The parameter adjustment process is as described in the above method and will not be repeated here.

[0114] The optimal solution acquisition module 16 is connected to the parameter adjustment module 15, and is configured to measure the quantum state of the quantum system when the expected value of the Hamiltonian converges to obtain the optimal solution corresponding to the maximum weighted independent set; based on the correspondence between the quantum bit and the undirected graph and the correspondence between the undirected graph and the network, the network unit corresponding to the quantum bit in the optimal solution of the maximum weighted independent set is determined. When the number of layers of the quantum circuit unit is greater than or equal to the first threshold, the quantum state with the highest probability of appearing in the measurement result is determined as the optimal solution corresponding to the maximum weighted independent set; when the number of layers of the quantum circuit unit is greater than or equal to the second threshold, the only quantum state existing in the measurement result is determined as the optimal solution corresponding to the maximum weighted independent set, wherein the first threshold is less than the second threshold. The size of the first threshold and the second threshold is associated with the number of network units in the network.

[0115] See also Fig.14 , Fig.141 is a block diagram of a quantum computing system for network optimization according to an embodiment of the present invention. The system includes a classical computing device 100 and a quantum computing device 200, wherein the classical computing device 100 includes a classical data processing module 110 and an optimizer 120, wherein the classical data processing module 110 is used to construct an undirected graph of the network, construct a Hamiltonian, and build a quantum circuit based on network data, and send the quantum circuit to the quantum computing device 200. The optimizer 120 communicates with the quantum computing device 200, adjusts the parameters of the quantum circuit to determine the parameters when the expected value of the Hamiltonian converges, and then the quantum computing device 200 performs quantum state measurement and sends the measurement result to the classical computing device 100. The classical data processing module 110 determines the optimal solution of the maximum weighted independent set of the network based on the quantum state measurement result returned by the quantum computing device 200. In this embodiment, the quantum computing device 200 can be a real quantum computing device such as an ion trap computer, an optical quantum computer, a superconducting quantum computer, a neutral atom quantum computer, etc.

[0116] See also Fig.15 , Fig.15 1 is a block diagram of a quantum computing system for network optimization according to another embodiment of the present invention. The system is implemented by a classical computing device 100, which includes a classical data processing module 110, an optimizer 120 and a quantum simulator 130. Fig.14 The difference between the system shown in the figure is that the quantum computing device is replaced by a quantum simulator 130 in this embodiment, but the working process and principle of the system in this embodiment are the same as those in the embodiment shown in the figure. Fig.14 The system is similar and will not be described here.

[0117] The quantum circuit constructed in the aforementioned embodiment of the present invention is a QAOA circuit, which is easy to construct and has few parameters to be trained. However, it can be known that other variational quantum circuits such as quantum neural network (QNN) circuits can also be used; the present invention proposes an accurate quantum optimization solution that can efficiently and accurately solve the MWIS problem, which is both practical and universal, and can be expanded to other similar optimization tasks, such as environmental monitoring, medical testing, industrial automation and other fields.

[0118] On the other hand, an embodiment of the present invention further provides an electronic device, see Fig.16 , Fig.16 is a block diagram of the structure principle of an electronic device according to an embodiment of the present invention. Fig.16 As shown, the electronic device includes a processor and a memory, wherein the memory stores computer instructions, and when the processor runs the computer instructions, the quantum computing method for network optimization provided by the present invention is executed. Fig.14 or Fig.15A classical computing device 100 in FIG.

[0119] Specifically, the processor 601 may include a central processing unit (CPU) or a graphics processing unit (GPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiment of the present invention. The memory 602 may include a memory for data or instructions. For example, the memory 602 may be at least one of the following: a hard disk drive (HDD), a read-only memory (ROM), a random access memory (RAM), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, a universal serial bus (USB) drive, or other physical / tangible memory storage device. For another example, the memory 602 includes a removable or non-removable (or fixed) medium. For another example, the memory 602 may be inside or outside the integrated gateway disaster recovery device. The memory 602 may be a non-volatile solid-state memory. In other words, the memory 602 generally includes a tangible (non-transitory) computer-readable storage medium (such as a memory device) encoded with executable instructions, wherein the stored executable instructions are executed by the processor 601 (such as executed by one or more processors), and the quantum computing method in the embodiment of the present invention can be implemented.

[0120] In one example, Fig.16 The electronic device shown may also include a communication interface 603 and a bus 610. The processor 601, the memory 602, and the communication interface 603 are connected and communicate with each other via the bus 610. The communication interface 603 is mainly used to implement communication between modules, devices, units, and / or devices in the electronic device.

[0121] The bus 610 includes hardware, software or both, and can couple the components of the online data traffic billing device to each other. For example, the bus may include at least one of the following: an accelerated graphics port (AGP) or other graphics bus, an enhanced industrial standard architecture (EISA) bus, a front-side bus (FSB), a hypertransport (HT) interconnect, an industrial standard architecture (ISA) bus, an infinite bandwidth interconnect, a low pin count (LPC) bus, a memory bus, a microchannel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standard association local (VLB) bus or other suitable bus. The bus 610 may include one or more buses. Although the embodiments of the present invention describe or show a specific bus, the embodiments of the present invention may consider any suitable bus or interconnection method.

[0122] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the aforementioned quantum computing method for network optimization is implemented. The computer-readable storage medium is, for example, a classical computer-readable storage medium, such as a read-only memory (ROM), a random access memory (RAM), a disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device, or a storage medium for storing quantum information and readable by a quantum computer, such as a quantum random access memory (QRAM). QRAM can be regarded as a quantum version of RAM in a classical computer. Through QRAM, a quantum superposition state containing information can be created. Compared with RAM, which needs to be read one by one, superimposed data can be read with superimposed addresses. QRAM can be implemented in physical ways such as optics, semiconductor quantum dots, superconducting circuits, and ion traps.

[0123] The flowchart and / or block diagram of the method and system of the embodiment of the present invention are described above by way of example, and various aspects of the related aspects are described. It should be understood that each box or combination thereof in the flowchart and / or block diagram can be implemented by computer program instructions, or by dedicated hardware that performs a specified function or action, or by a combination of dedicated hardware and computer instructions. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc.; when implemented in software, it is a program or code segment used to perform the required task. The program or code segment can be stored in a memory, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0124] The above embodiments are only used to illustrate the present invention, but not to limit the present invention. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the scope of the present invention. Therefore, all equivalent technical solutions should also fall within the scope of the present invention.

Claims

1. A quantum computing method for network optimization, characterized in that: The method comprises: Constructing an undirected graph corresponding to a network, the network comprising a plurality of network units, the undirected graph comprising vertices corresponding to respective network units in the network, each vertex comprising a weight of the corresponding network unit, and lines between vertices being used to characterize interference between network units; Constructing a quantum system corresponding to the undirected graph, wherein the quantum system includes a quantum bit corresponding to each vertex in the undirected graph; Constructing a Hamiltonian of a maximum weighted independent set with interference constraints, wherein the interference constraints include minimizing interference between network units in the network, wherein the maximum weighted independent set includes elements corresponding to each qubit in the quantum system; Constructing a quantum circuit with adjustable parameters based on the quantum system; Adjust the parameter values ​​in the quantum circuit so that the expectation value of the Hamiltonian decreases until convergence; Measure the quantum state of the quantum system when the expected value of the Hamiltonian converges, and determine the quantum state with the highest probability in the measurement results as the optimal solution corresponding to the maximum weighted independent set; Based on the correspondence between the quantum bits and the undirected graph and the correspondence between the undirected graph and the network, a network unit corresponding to the quantum bits in the optimal solution of the maximum weighted independent set is determined.

2. The quantum computing method for network optimization according to claim 1, characterized in that: The Hamiltonian includes a target Hamiltonian and a constrained Hamiltonian, and the weighted sum of elements in the maximum weighted independent set is maximum when the expected value of the target Hamiltonian is minimum, and the expected value of the constrained Hamiltonian is minimum when and only when there is no interference between any two elements in the maximum weighted independent set.

3. The quantum computing method for network optimization according to claim 2, characterized in that: The target Hamiltonian is expressed as: ; Where Ho represents the target Hamiltonian; σ j Z is the Pauli Z operator acting on the j-th quantum bit, w j is the vertex weight corresponding to the j-th quantum bit; The constrained Hamiltonian is expressed as: ; Among them, H C represents the constrained Hamiltonian; σ k Z and σ l Z are the Pauli Z operators acting on the kth and lth quantum bits respectively; w k and w l are the vertex weights corresponding to the kth qubit and the lth qubit, respectively, k,l is the interference value between the vertex corresponding to the kth qubit and the vertex corresponding to the lth qubit. When there is interference between the two vertices, k,l =1; when there is no interference between the two vertices k,l =0.

4. The quantum computing method for network optimization according to claim 2 or 3, characterized in that: The constrained Hamiltonian also includes a weight coefficient that can be adjusted by a user and is used to express the importance of the constrained Hamiltonian relative to the target Hamiltonian.

5. The quantum computing method for network optimization according to claim 1, characterized in that: The quantum circuit with adjustable parameters comprises multiple layers of quantum circuit units connected end to end, and the adjustable parameter value in each layer of quantum circuit can be adjusted independently during the adjustment process.

6. The quantum computing method for network optimization according to claim 5, characterized in that: When the number of layers of the quantum circuit unit is greater than or equal to a first threshold, the quantum state with the highest probability of appearing in the measurement result is determined as the optimal solution corresponding to the maximum weighted independent set; When the number of layers of the quantum circuit unit is greater than or equal to a second threshold, the only quantum state existing in the measurement result is determined as the optimal solution corresponding to the maximum weighted independent set, wherein the first threshold is less than the second threshold.

7. The quantum computing method for network optimization according to claim 6, characterized in that: The magnitudes of the first threshold and the second threshold are associated with the number of network elements in the network.

8. A quantum computing device for network optimization, characterized in that: include: An undirected graph construction module is configured to construct an undirected graph corresponding to a network, wherein the network includes a plurality of network units, the undirected graph includes vertices corresponding to respective network units in the network, each vertex includes a weight of its corresponding network unit, and lines between vertices are used to characterize interference between network units; A quantum system building module, configured to build a quantum system corresponding to the undirected graph, wherein the quantum system includes quantum bits corresponding to respective vertices in the undirected graph; A Hamiltonian construction module configured to construct a Hamiltonian of a maximum weighted independent set with an interference constraint, wherein the interference constraint includes minimizing interference between network units in the network, wherein the maximum weighted independent set includes elements corresponding to each quantum bit in the quantum system; A quantum circuit module configured to construct a quantum circuit with adjustable parameters based on the quantum system; A parameter adjustment module is configured to adjust the parameter values ​​in the quantum circuit so that the expected value of the Hamiltonian is reduced until convergence; The optimal solution acquisition module is configured to measure the quantum state of the quantum system when the expected value of the Hamiltonian converges, and determine the quantum state with the highest probability in the measurement result as the optimal solution of the maximum weighted independent set; based on the correspondence between the quantum bit and the undirected graph and the correspondence between the undirected graph and the network, determine the network unit corresponding to the quantum bit in the optimal solution of the maximum weighted independent set.

9. An electronic device comprising a processor and a memory, characterized in that: The memory stores computer instructions, and when the processor runs the computer instructions, the quantum computing method for network optimization described in any one of claims 1 to 7 is executed.

10. A computer readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the quantum computing method for network optimization according to any one of claims 1 to 7 is executed.