Task processing method and device based on quantum computing, equipment and storage medium

By dividing the large-scale maximum cut problem into community subgraphs using community detection and the distributed VQE algorithm, constructing parameterized quantum circuits and combining them with neighborhood search, the large-scale maximum cut problem under resource and noise constraints in existing technologies is solved, achieving efficient and globally optimal solution results.

CN121480754APending Publication Date: 2026-02-06SHENZHEN SPINQ TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511429452.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-26
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently handle large-scale maximum cut problems. Classical algorithms consume significant computational resources and time, while quantum algorithms are limited by the size of qubits and hardware noise, making it difficult to solve large-scale graph problems.

Method used

The weighted undirected graph is divided into community subgraphs by a community detection algorithm, which are then mapped to the Ising model to construct parameterized quantum circuits. Combined with distributed VQE and neighborhood search algorithms, the parameters of the quantum circuits are optimized to approximate the optimal solution.

Benefits of technology

It significantly reduces the consumption of quantum computing resources, improves the efficiency of solving large-scale problems and the global optimality of solutions, and solves the technical problem of handling large-scale maximum cut problems that are difficult to handle in existing technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121480754A_ABST
    Figure CN121480754A_ABST
Patent Text Reader

Abstract

The invention discloses a task processing method and device based on quantum computing, equipment and a storage medium. The method comprises the steps of determining a maximum cut problem corresponding to a target task and a weighted undirected graph of the maximum cut problem; performing community detection division on the weighted undirected graph to obtain a plurality of community sub-graphs; mapping the community sub-graph into a sub Hamiltonian and constructing a parameterized quantum circuit; updating parameters of the parameterized quantum circuit by adopting a gradient descent algorithm to minimize a global Hamiltonian expected value, and outputting a binary string of a quantum state corresponding to the global Hamiltonian expected value as an initial solution; generating a plurality of candidate solutions for the initial solution based on a neighborhood search algorithm, calculating cut values of the initial solution and the candidate solutions, and selecting a better feasible solution based on the optimal cut value; and applying a preset disturbance operator in the parameterized quantum circuit to construct a disturbance quantum circuit, updating parameters of the disturbance quantum circuit by adopting a gradient descent algorithm, and outputting a binary string of a quantum state corresponding to the global Hamiltonian expected value as a final solution of the target task by minimizing the global Hamiltonian expected value after disturbance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of quantum computing technology, and in particular to quantum computing-based task processing methods, apparatus, devices, and storage media. Background Technology

[0002] The MaxCut problem is a classic nondeterministic polynomial (NP) combinatorial optimization problem in graph theory. Its objective is to partition a given weighted undirected graph into two disjoint subsets such that the sum of the edge weights across the subsets is maximized. This maximum cut problem has important and wide-ranging applications in circuit design, statistical physics, social network analysis, and autonomous driving.

[0003] For the maximum cut problem, existing techniques mainly include classical exact algorithms, approximate algorithms, and heuristic algorithms, as well as quantum algorithms developed in recent years. Exact algorithms ensure finding the optimal solution by traversing all possible partitions, but their time complexity increases exponentially with the number of vertices, making them only suitable for very small-scale problems. Approximate algorithms can obtain near-optimal solutions in polynomial time; the most representative example is the Goemans-Williamson algorithm, which achieves an approximation ratio of approximately 87.8% through semidefinite programming, but its computational cost is high on large-scale graphs. Heuristic algorithms such as simulated annealing, genetic algorithms, and local search are more flexible in solving large-scale instances, but they are prone to getting trapped in local optima, and the quality of the solution depends on empirical parameter tuning.

[0004] Therefore, when faced with large-scale maximum cut problems, the aforementioned algorithms require a significant amount of computational resources and time to find the optimal solution, and may not even find one. Thus, a feasible solution that can efficiently handle large-scale maximum cut problems is urgently needed. Summary of the Invention

[0005] In view of the above problems, this application provides a quantum computing-based task processing method, apparatus, device and storage medium, with the aim of efficiently processing large-scale maximum cut problems.

[0006] In a first aspect, embodiments of this application provide a task processing method based on quantum computing, including:

[0007] Determine the maximum cut problem corresponding to the target task, and represent the maximum cut problem as a weighted undirected graph;

[0008] The weighted undirected graph is divided based on a community detection algorithm to obtain multiple community subgraphs;

[0009] Each community subgraph is mapped to a sub-Hamiltonian corresponding to the Ising model, and a parameterized quantum circuit is constructed based on each sub-Hamiltonian;

[0010] For each parameterized quantum circuit corresponding to a community subgraph, the parameters of each parameterized quantum circuit are iteratively updated using the distributed variational quantum eigensolver (VQE) algorithm to minimize the global Hamiltonian expectation value. The binary string of the quantum state corresponding to the global Hamiltonian expectation value is output as the initial solution.

[0011] Multiple candidate solutions are generated based on the neighborhood search algorithm for the initial solution. The cut values ​​of the candidate solutions and the initial solution are calculated based on the objective function constructed based on the maximum cut problem. The solution with the optimal cut value is selected as the better feasible solution.

[0012] Using the quantum state corresponding to the better feasible solution as the ground state, a preset perturbation operator is applied to the parameterized quantum circuit corresponding to each community subgraph to construct a perturbed quantum circuit. The gradient descent algorithm is used to iteratively update the parameters of each perturbed quantum circuit to minimize the expected value of the perturbed global Hamiltonian until the preset convergence condition is met. The binary string of the quantum state corresponding to the expected value of the global Hamiltonian is then output as the final solution of the target task.

[0013] In one embodiment, the weighted undirected graph is partitioned based on a community detection algorithm to obtain multiple community subgraphs, including:

[0014] The Louvain modularity optimization algorithm is used to maximize the modularity index for community identification in the weighted undirected graph.

[0015] The formula for calculating modularity is as follows:

[0016]

[0017] In the formula, Q represents the modularity value; m is the sum of edge weights in the weighted undirected graph; i represents the node number in the weighted undirected graph; j represents the node number in the weighted undirected graph; w ij k represents the edge weight between node i and node j. i Let k be the degree of node i, which is the sum of the weights of all edges connected to node i; j c represents the degree of node j, which is the sum of the weights of all edges connected to node j; i c represents the community number where node i is located; j Indicates the community number where node j is located; δ(c i ,c j ) is the Kronecker function, that is, if δ(c) i,c j ) = 1 indicates that node i and node j belong to the same community; if δ(c i ,c j If ) = 0, it means that node i and node j do not belong to the same community; ∑ ij This indicates that all node pairs (i,j) in the weighted undirected graph have been traversed.

[0018] In one embodiment, mapping each community subgraph to the sub-Hamiltonian corresponding to the Ising model includes:

[0019] Construct the objective function of the maximum cut problem, map the objective function of the maximum cut problem to the Hamiltonian of the Ising model, and decompose the Hamiltonian of the Ising model into multiple sub-Hamiltonians according to the number of community subgraphs;

[0020] The objective function of the maximum cut problem is expressed as:

[0021]

[0022] In the formula, Maxcut() represents the objective function of the maximum cut problem; G represents a weighted undirected graph, G = (V, E), which contains the set of nodes V and the set of edges E; x i This represents the partition label of the i-th node, used to indicate which of the two different sets the node is assigned to, where x i =-1 indicates that the node is in the first set, x i =+1 indicates that the node is in the second set; x j The partition label of the j-th node indicates which of the two different sets the node is assigned to, where x j =-1 indicates that the node is in the first set, x j =+1 indicates that the node is in the second set; w ij Represents the edge weight between node i and node j; e ij This represents the edge connecting node i and node j; This indicates whether the edge (i,j) is cut, used to determine whether nodes i and j are in the same set. A value of 0 indicates that node i and node j are in the same set; if A value of 1 indicates that node i and node j are in different sets;

[0023] The Hamiltonian of the Ising model is expressed as:

[0024]

[0025] In the formula, H CLet E represent the Hamiltonian corresponding to the maximum cut problem; (i,j)∈E represents traversing each edge in the graph; For a size of 2 n ×2 n The identity matrix; n represents the number of nodes in the weighted undirected graph. Z i The operation of the Pauli Z matrix on the i-th qubit; Z j The operation of the Pauli Z matrix on the j-th qubit;

[0026] The Hamiltonian of the Ising model is decomposed into multiple sub-Hamiltonians according to the number of community subgraphs, as follows:

[0027]

[0028] H C H represents the Hamiltonian of the maximum cut problem in the Ising model; m H represents the global Hamiltonian. C The m-th component; c m The preset weight coefficient is the one corresponding to the m-th component; This means it only applies to η communities S. η The sub-Hamiltonian, whose number of active qubits is equal to the number of nodes in the community |S η |; N represents the total number of communities; This represents the tensor product operator. Specifically, it multiplies an n-bit Hamiltonian H. C Decomposed into N sub-Hamiltonians The number of bits of the sub-Hamiltonian is equal to the number of community S1, S2, ..., S η ,…S N The number of nodes, i.e., |S1|,|S2|,…,|S η |,…,|S N | where S1, S2, ..., S η ,…S N The number of nodes is less than n.

[0029] In one embodiment, the construction of parameterized quantum circuits based on each of the sub-Hamiltons involves constructing N parameterized quantum circuits based on N sub-Hamiltons, where the number of bits in each parameterized quantum circuit is the same as the number of bits in each sub-Hamilton. The construction of parameterized quantum circuits based on each of the sub-Hamiltons includes multiple single-bit rotation gates and two-bit entanglement gates with parameters to be optimized.

[0030] In one embodiment, the step of iteratively updating the parameters of each parameterized quantum circuit corresponding to each community subgraph using a gradient descent algorithm to minimize the expected value of the global Hamiltonian, and outputting the binary string of the quantum state corresponding to the expected value of the global Hamiltonian as the initial solution, includes:

[0031] For each community subgraph, the expected value of its global Hamiltonian is calculated using parameterized quantum circuits for the sub-Hamiltonian corresponding to each community subgraph.

[0032] The gradient of the expected value with respect to each parameter is calculated based on the parameter offset rule;

[0033] The obtained gradient vector is input into the classical gradient optimizer to iteratively update the parameters, and finally the binary string of the quantum state corresponding to the expected value of the global Hamiltonian is output as the initial solution.

[0034] In one embodiment, the neighborhood search algorithm generates multiple candidate solutions for the initial solution, including:

[0035] A flip operation is performed on each bit of the initial solution to generate multiple candidate solutions.

[0036] In one embodiment, the step of applying a preset perturbation operator to construct a perturbed quantum circuit in each parameterized quantum circuit corresponding to the community subgraph includes:

[0037] A single-bit rotation operator is applied at the position where the bit is 1 in the better feasible solution, and paired rotation operators are applied at the positions where the bit is 0 and the bit is 1 in the better feasible solution to form a perturbation quantum circuit.

[0038] Secondly, embodiments of this application also provide a quantum computing-based task processing device, comprising:

[0039] A determining unit is used to determine the maximum cut problem corresponding to the target task and to represent the maximum cut problem as a weighted undirected graph.

[0040] A partitioning unit is used to partition the weighted undirected graph based on a community detection algorithm to obtain multiple community subgraphs;

[0041] A parameterized quantum circuit construction unit is used to map each of the community subgraphs to the sub-Hamiltons corresponding to the Ising model, and to construct a parameterized quantum circuit based on each of the sub-Hamiltons;

[0042] The parameter update unit is used to iteratively update the parameters of each parameterized quantum circuit for each community subgraph using the gradient descent algorithm to minimize the expected value of the global Hamiltonian and output the binary string of the quantum state corresponding to the expected value of the global Hamiltonian as the initial solution.

[0043] The neighborhood search unit is used to generate multiple candidate solutions for the initial solution based on the neighborhood search algorithm, calculate the cut value of the candidate solutions based on the objective function constructed based on the maximum cut problem, and select the candidate solution with the optimal cut value as the better feasible solution.

[0044] The perturbation optimization unit is used to construct perturbation quantum circuits by applying a preset perturbation operator to the parameterized quantum circuits corresponding to each community subgraph, using the quantum state corresponding to the better feasible solution as the ground state, and iteratively updating the parameters of each perturbation quantum circuit using the gradient descent algorithm to minimize the expected value of the perturbation global Hamiltonian until the preset convergence condition is met, and outputting the binary string of the quantum state corresponding to the expected value of the global Hamiltonian as the final solution of the target task.

[0045] Thirdly, embodiments of this application also provide a quantum computing device, including:

[0046] Processor, memory, communication interface;

[0047] The memory is either a short-term storage memory or a persistent storage memory;

[0048] The processor is configured to communicate with the memory and execute instructions in the memory to perform any of the above-described quantum computing-based task processing methods.

[0049] Fourthly, embodiments of this application also provide a storage medium storing a quantum computing program thereon, wherein when the quantum computing program is executed by a processor, it executes any of the above-described quantum computing-based task processing methods.

[0050] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:

[0051] This application's embodiments divide the original weighted undirected graph into multiple community subgraphs using a community detection algorithm. This makes the size of each community subgraph controllable, facilitating the construction and solution of corresponding parameterized quantum circuits on current quantum devices using a distributed VQE algorithm, significantly reducing the resource consumption of a single quantum computation. Secondly, after generating the initial solution, a neighborhood search algorithm is used to generate multiple candidate solutions, and a more feasible solution with the largest cut value is selected by combining the maximum cut objective function, effectively avoiding the problem of getting trapped in local optima. Finally, a perturbation quantum circuit is constructed by applying a preset perturbation operator to the parameterized quantum circuit, and optimized using a gradient descent algorithm, thereby approximating the optimal solution. In summary, this not only improves the computational efficiency of solving large-scale problems but also enhances the global optimality of the output solution, solving the technical challenge of existing quantum algorithms being limited by the size of qubits and hardware noise, making it difficult to solve large-scale problems. Attached Figure Description

[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0053] Figure 1 This application provides a schematic flowchart of a quantum computing-based task processing method.

[0054] Figure 2 A schematic diagram of a quantum computing-based task processing device provided in this application embodiment;

[0055] Figure 3 This is a schematic diagram of a quantum computing device structure provided in an embodiment of this application. Detailed Implementation

[0056] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0057] The Max Cut problem is a classic NP-hard combinatorial optimization problem in graph theory. Its goal is to partition a given weighted undirected graph into two disjoint subsets such that the sum of the edge weights across the subsets is maximized. This maximum cut problem has important and wide-ranging applications in circuit design, statistical physics, social network analysis, and autonomous driving.

[0058] For the maximum cut problem, existing techniques mainly include classical exact algorithms, approximate algorithms, and heuristic algorithms, as well as quantum algorithms developed in recent years. Exact algorithms ensure finding the optimal solution by traversing all possible partitions, but their time complexity increases exponentially with the number of vertices, making them only suitable for very small-scale problems. Approximate algorithms can obtain near-optimal solutions in polynomial time; the most representative example is the Goemans-Williamson algorithm, which achieves an approximation ratio of approximately 87.8% through semidefinite programming, but its computational cost is high on large-scale graphs. Heuristic algorithms such as simulated annealing, genetic algorithms, and local search are more flexible in solving large-scale instances, but they are prone to getting trapped in local optima, and the quality of the solution depends on empirical parameter tuning.

[0059] To overcome the limitations of classical algorithms, researchers have proposed quantum algorithms such as Quantum Approximate Optimization Algorithm (QAOA), quantum annealing, and VQE. VQE is suitable for current noisy intermediate-scale quantum (NISQ) quantum devices, solving problems by constructing parameterized quantum circuits and combining them with classical optimizers. However, under current quantum computing conditions (such as NISQ devices), it is still difficult to effectively handle large-scale graphs due to limitations in qubit size, noise, and decoherence. Some studies have also proposed the Distributed Variational Quantum Eigensolver (DVQE) algorithm, which divides large-scale graphs into subgraphs and solves them in parallel with limited quantum resources, attempting to handle large-scale problems with smaller quantum resources. However, it still suffers from insufficient optimization accuracy. Therefore, existing quantum or quantum-classical hybrid algorithms still have many shortcomings in solving large-scale MaxCut problems. Therefore, there is an urgent need for a MaxCut solution method that can improve the global optimality of the solution and the efficiency of solving large-scale problems.

[0060] Based on this, various embodiments of this application introduce a community detection algorithm to perform structural optimization partitioning of the target directed acyclic graph, fully exploiting the local dense connection characteristics of the graph, dividing the complex global graph into several loosely coupled community subgraphs, and constructing corresponding parameterized quantum circuits for each community subgraph, combined with DVQE for parallel optimization. Simultaneously, based on the initial quantum solution, classical neighborhood search and quantum perturbation are introduced to effectively escape local optima and further improve the minimization of the global Hamiltonian expectation. The embodiments of this application integrate graph structure analysis, quantum circuit design, and quantum-classical co-optimization, enabling efficient and accurate solution of large-scale MaxCut problems under current quantum hardware resource constraints. The various embodiments of this application are further described in detail below with reference to the accompanying drawings.

[0061] This application provides a quantum computing-based task processing method, such as... Figure 1 As shown, the method includes steps S101-S106.

[0062] S101: Determine the maximum cut problem corresponding to the target task, and represent the maximum cut problem as a weighted undirected graph.

[0063] For example, in the current field of communication, many combinatorial optimization problems can be reduced to the maximum cut problem. The objective task can usually be understood as dividing the communication nodes in the current scenario into two subsets to achieve objectives such as resource allocation, conflict minimization, and signal separation. The optimization objective of such objective tasks is usually to maximize a certain cost function, and this cost function can be mapped to the sum of the weights of the edges across the set in the graph, thus establishing a mapping relationship between the objective task and the weighted undirected graph structure. After the above transformation and identification of the objective task, the objective task can be abstractly represented as a weighted undirected graph G = (V, E, W), where V represents the set of nodes, E represents the set of edges, and W represents the weight of each edge (referred to as "edge weight"). The edge weight can be defined based on the feature values, distance metrics, or other relevant attributes in the objective task. Each node represents a variable, object, or entity in the task, and the edges represent the interrelationships or interactions between variables. For example, a node can be a node or physical device with communication capabilities in a communication network; an edge can be established between two communication nodes if they interact frequently, or if there is interference between them; interaction frequency, signal interference intensity, similarity score, etc., can all be used as edge weights. By transforming the complex target task into a graph theory problem, namely the maximum cut problem, graph structure modeling can be used to remove unstructured information from the target task, accurately reconstruct the dependencies, conflicts, or synergistic effects of each node in the target task, thereby improving the scalability and solution performance of the target task processing.

[0064] S102: Based on the community detection algorithm, the weighted undirected graph is divided into multiple community subgraphs.

[0065] In this embodiment, the original weighted undirected graph is decomposed into substructures using the community partitioning method in graph theory to obtain several subgraph structures with dense internal connections and sparse external connections, i.e., community subgraphs or sub-communities. Specifically, the weighted undirected graph generated in step S101 is assumed to be represented as G = (V, E, W), where V represents the set of nodes, E represents the set of edges, and W represents the weight of each edge (referred to as "edge weight"). The goal of community detection is to partition the vertex set V in graph G into multiple non-overlapping subsets V1, V2, ..., V... k This results in tight connections between nodes within each subset, while fewer connections exist between subsets.

[0066] In this embodiment, the partitioning process can be implemented using community detection algorithms, including but not limited to the Louvain algorithm based on modularity optimization, the Spectral Clustering algorithm based on spectral clustering, and the Infomap algorithm based on random walks. Preset parameters can be set during the execution of the community detection algorithm, such as the number of communities η, the minimum community size, and the modularity convergence threshold. Specific parameters can be set according to the scale and complexity of the target task, and are not limited in this embodiment.

[0067] After the community is divided, each is composed of a subset of nodes. Its corresponding edge set Subgraph G i =(V i E i W i This is the community subgraph. Thus, by performing community partitioning on the original weighted undirected graph, it is beneficial to decouple the large-scale complex graph structure into several subproblems that can be processed in parallel. Since the internal structure of the community subgraph is relatively compact, it is suitable for mapping onto medium-sized qubit resources to perform quantum circuit operations, thereby significantly reducing quantum resource requirements and circuit complexity, improving solution accuracy, providing a good computational structural foundation for subsequent distributed quantum solution algorithms, and improving overall computational efficiency.

[0068] S103: Map each community subgraph to the corresponding sub-Hamiltonian of the Ising model, and construct parameterized quantum circuits based on each sub-Hamiltonian.

[0069] Building upon the community partitioning operation in step S102, the structural information of each community subgraph is further transformed into a physical model form that can be solved by quantum algorithms. Based on this, an adjustable quantum circuit is constructed to combine with a variable quantum eigenvalue solver to solve the Maxcut problem. Specifically, the original maximum cut problem can be equivalently expressed as an energy minimization problem under the Ising Model, where each vertex of the graph is considered a spin variable (usually represented by ±1 or 0 / 1 for the corresponding qubit), and the edge weights represent the coupling strength between spins. An approximate solution to the maximum cut can be indirectly obtained by minimizing the Hamiltonian (i.e., the total energy function) of the physical system. Therefore, to enable the quantum computing model to express this optimization objective, the structure of each community subgraph needs to be mapped to the Hamiltonian form of the corresponding Ising Model. That is, the vertices and edges of the graph are transformed into qubits and their interaction terms, respectively. This transforms the original maximum cut problem into a quantum mechanically measurable physical quantity, allowing the quantum computer to evaluate the quality of the "solution" corresponding to the current quantum state by measuring the expected value of this Hamiltonian in a certain quantum state.

[0070] After constructing the sub-Hamiltonian, a set of parameterized quantum circuits can be constructed, i.e., a class of quantum circuit structures with tunable parameters, to generate different quantum superposition states to search the solution space of the problem. Parameterized quantum circuits can provide learnable functional expressions for quantum computing, thereby allowing iterative optimization of the quantum circuit parameters to gradually approximate the minimum eigenvalue state of the Hamiltonian. Each community subgraph can independently design its corresponding parameterized quantum circuit to achieve parallel solution in subsequent quantum computations, thereby improving overall computational efficiency and scalability.

[0071] S104: For each parameterized quantum circuit corresponding to a community subgraph, the gradient descent algorithm is used to iteratively update the parameters of each parameterized quantum circuit in order to minimize the expected value of the global Hamiltonian. The binary string of the quantum state corresponding to the expected value of the global Hamiltonian is output as the initial solution.

[0072] Since the large-scale maximum cut problem involved in this application cannot typically be computed directly on a single quantum device, this embodiment employs a distributed VQE algorithm. The Hamiltonian representing the overall maximum cut problem (corresponding to the entire weighted undirected graph) is divided into several sub-Hamiltonians, each corresponding to a community subgraph obtained through community detection. For each sub-Hamiltonian, its corresponding parameterized quantum circuit is constructed, and their respective optimization tasks are executed in parallel or distributed within the distributed VQE algorithm framework. This collaboratively approximates the minimum energy eigenstate of the overall Ising model under quantum resource constraints, yielding the quantum state with the minimum expectation value of the global Hamiltonian, thereby achieving an efficient solution to the complex optimization problem.

[0073] Specifically, in each iteration, a set of specific parameter values ​​is first set for each parameterized quantum circuit, and it is then deployed and executed in the corresponding quantum processor or quantum computing simulator. By measuring the output quantum state multiple times, the expected value of the global Hamiltonian under the current parameter settings is statistically estimated. Although the subgraphs of each community are computationally independent, the goal of each iteration is still to evaluate the expected value of the global Hamiltonian corresponding to the entire original weighted undirected graph, thereby judging the overall quality of the current solution.

[0074] Based on the expected value of the global Hamiltonian obtained from the current round of measurement, a new set of parameter values ​​that are expected to further reduce the expected value are calculated for the next iteration. These new parameters are then assigned to their respective parameterized quantum circuits, thus initiating the next round of quantum computing and measurement. This is the basic idea of ​​the gradient descent algorithm. In this embodiment, the gradient descent algorithm includes, but is not limited to, gradient-based parameter optimization methods such as stochastic gradient descent (SGD) and adaptive moment estimation (Adam). Through iterative updates of the gradient descent algorithm, the parameter values ​​are continuously adjusted until a preset convergence condition is met, such as the change in the global expected value being less than a preset threshold or reaching the maximum number of iterations. When the iterative update terminates, the quantum state prepared by the quantum circuit under the final parameters is projected and measured. The measurement results of each qubit (usually represented by 0 or 1) are arranged in a predetermined order to obtain a binary string. This binary string is the initial solution obtained from quantum computing, and each bit corresponds to the partitioning of a vertex in the original weighted undirected graph. Therefore, the distributed VQE algorithm can divide and distribute the overall maximum cut problem solution task to multiple parameterized quantum circuits for parallel execution. While maintaining the solution quality, it significantly reduces the resource requirements of a single quantum circuit for the number of qubits and the circuit depth, thereby effectively improving the feasibility and scalability of the embodiments of this application on quantum devices.

[0075] S105: Generate multiple candidate solutions for the initial solution based on the neighborhood search algorithm, calculate the cut value of the candidate solutions and the cut value of the initial solution based on the objective function constructed based on the maximum cut problem, and select the solution with the optimal cut value as the better feasible solution.

[0076] Based on an existing initial solution, this embodiment utilizes a neighborhood search algorithm to find better-quality feasible solutions in the vicinity of the initial solution, thereby improving the approximation capability of the global optimum. It should be noted that the neighborhood search algorithm is a local search method. Its principle is to construct a solution set, or neighborhood, within a certain range around the current initial solution, and evaluate all possible variants within the neighborhood to find alternative solutions that further optimize the objective function value. In this application, the initial solution is generated by a parameterized quantum circuit using a distributed VQE algorithm, represented as a binary string, indicating the partitioning state of each vertex in the graph. In this embodiment, the neighborhood can be generated by flipping one or more bits in the binary string, i.e., changing 0 to 1 or 1 to 0, thereby forming a new set of candidate solutions, each corresponding to a new partitioning scheme.

[0077] After obtaining multiple candidate solutions, the objective function corresponding to the maximum cut problem (i.e., the sum of the weights of edges spanning the partitioned subsets in the graph) is used to calculate the cut value for each candidate solution. Simultaneously, the cut value of the initial solution itself is evaluated. Then, the magnitudes of all cut values ​​are compared to select the solution with the largest cut value as the better feasible solution for the next stage of optimization. Since the goal of the maximum cut problem is to maximize the sum of the weights of the edges spanning the subsets, a higher cut value means the partitioning result is closer to the global optimum. Therefore, combining the initial solution with a neighborhood search algorithm can effectively compensate for the insufficient solution space coverage caused by the precision and bit size of current quantum hardware. Secondly, neighborhood search has low overhead and can generate multiple feasible solutions in a short time. The cut value is then used to filter among the initial solution and multiple candidate solutions, allowing the finally selected better feasible solution to escape the limitations of the original solution space and have a stronger global representation in graph structure partitioning.

[0078] S106: Using the quantum state corresponding to the better feasible solution as the ground state, a preset perturbation operator is applied to the parameterized quantum circuit corresponding to each community subgraph to construct a perturbed quantum circuit. The gradient descent algorithm is used to iteratively update the parameters of each perturbed quantum circuit to minimize the expected value of the perturbed global Hamiltonian until the preset convergence condition is met. The binary string of the quantum state corresponding to the expected value of the global Hamiltonian is output as the final solution of the target task.

[0079] To further break through the limits of neighborhood search and ultimately approach the global optimum, this embodiment of the application introduces a controllable quantum mechanical perturbation near the ground state corresponding to the better feasible solution, in order to explore the quantum solution space near the quantum state corresponding to the better feasible solution and escape the local optimum. Using the quantum state corresponding to the better feasible solution obtained in step S105 as the initial input state of the parameterized quantum circuit, a preset perturbation operator is applied to the structure of the parameterized quantum circuit corresponding to each community subgraph to construct a new perturbation quantum circuit. Here, the preset perturbation operator can be understood as a set of quantum gate operations controlled by adjustable parameters. Its function is to break the equilibrium state of the energy surface where the current quantum state is located, create a new superposition state, and excite the wave function state of the neighboring energy region, thereby activating the advantages of quantum superposition and interference to explore potential better solutions.

[0080] Subsequently, the constructed perturbed quantum circuit is optimized using a gradient descent algorithm. Similar to the distributed variable quantum eigenvalue solving loop in step S104, the adjustable parameters in the perturbed circuit are updated iteratively and collaboratively, causing the expected value of the global Hamiltonian constructed after perturbation to continuously decrease and approach the theoretical lower bound. This optimization iterative process continues until the preset convergence condition is met, and finally, the binary string corresponding to the measurement result of the perturbed optimized quantum state is output as the final optimized solution, which is also the output result of the objective task.

[0081] This application's embodiments divide the original weighted undirected graph into multiple community subgraphs using a community detection algorithm. This makes the size of each community subgraph controllable, facilitating the construction and solution of corresponding parameterized quantum circuits based on the distributed VQE algorithm on quantum devices, significantly reducing the resource consumption of a single quantum computation. Secondly, after generating the initial solution, a neighborhood search algorithm is used to generate multiple candidate solutions, and the optimal feasible solution with the largest cut value is selected by combining the maximum cut objective function, effectively avoiding the problem of getting trapped in local optima. Finally, a perturbation quantum circuit is constructed by applying a preset perturbation operator to the parameterized quantum circuit, and the gradient descent algorithm is executed again for optimization, thereby approximating the optimal solution. In summary, this not only improves the computational efficiency of solving large-scale problems but also enhances the global optimality of the output solution, solving the technical challenge of existing quantum algorithms being limited by the size of qubits and hardware noise, making it difficult to solve large-scale problems.

[0082] In some specific examples, step S102 partitions the weighted undirected graph based on a community detection algorithm, resulting in multiple community subgraphs. One implementation of the community detection algorithm, the Louvain modularity optimization algorithm, can be used to maximize the modularity metric for community identification in the weighted undirected graph. By maximizing the modularity metric function, communities are identified in the input weighted undirected graph. Modularity measures the degree of connection between nodes within the same community and the expected connection in a random graph.

[0083] The formula for calculating modularity is as follows:

[0084]

[0085] In the formula, Q represents the modularity value, used to measure the quality of community partitioning. The modularity value ranges from [-0.5, 1]. A larger value indicates that the internal connections of the community are more compact and the external connections are more sparse, indicating that the community partitioning is more reasonable; m is the sum of edge weights in the weighted undirected graph; i represents the node number in the weighted undirected graph; j represents the node number in the weighted undirected graph; w ij k represents the edge weight between node i and node j. i Let k be the degree of node i, which is the sum of the weights of all edges connected to node i; j c represents the degree of node j, which is the sum of the weights of all edges connected to node j; i c represents the community number where node i is located; j Indicates the community number where node j is located; δ(c i ,c j Let ) be the Kronecker function, that is, if c i =c j If the two nodes are in the same community, then δ(c) i ,c jIf c = 1, it means that node i and node j belong to the same community; if c i ≠c j If the two nodes are not in the same community, then δ(c) i If (cj) = 0, it means that node i and node j do not belong to the same community; ∑ ij This represents traversing all node pairs (i,j) in a weighted undirected graph.

[0086] By calculating the Q-value and optimizing it iteratively to maximize the Q-value, a reasonable partition of the weighted undirected graph is achieved. To avoid community structures that are too small or too large in the partitioning results, this embodiment can further add partitioning constraints: for each partitioned community subgraph, the number of nodes it contains must satisfy the constraint that is greater than 2 and less than or equal to B. Where B is the maximum number of qubits on current quantum devices.

[0087] Furthermore, after completing the community division, to ensure the consistency and distinguishability of node indices when constructing sub-Hamiltonians and quantum circuits, this embodiment of the application can also re-encode the node numbers in each community subgraph. Specifically, an ordered community set Ω can be obtained based on the output of the community detection algorithm:

[0088] Ω={(S1,|S1|),(S2,|S2|),…,(S η ,|S η |),…,(S N ,|S N |)};

[0089] Where Ω represents the ordered set of communities after community division; S1, S2, S η S N Let S1 represent the set of nodes corresponding to the 1st, 2nd, ηth, and Nth communities in an ordered set of community IDs. For example, if the 1st community includes nodes 2, 5, and 8, then S1 = {V2, V5, V8}. Here, η is a general symbol used to index community IDs, representing a specific community in the set, where the value of η satisfies 1 ≤ η ≤ N. |S1|, |S2|, ..., |S... η |、|S N | Represents the corresponding communities S1, S2, ..., S η S N The number of nodes, |S η | can refer to the number of node elements in the node set corresponding to each community, |S ηThe value of | should satisfy the constraint that it is greater than 2 and less than or equal to B. For example, |S1| can be equal to 3. N represents the total number of community subgraphs in the community partitioning result, that is, the number of communities that are partitioned into the entire weighted undirected graph after community detection.

[0090] Based on this, all nodes in the first community S1 are renumbered from 1 to |S1|. Then, all nodes in the second community S2 are renumbered from |S1|+1 to |S2|, and so on, until the Nth community S. N All nodes within |S N-1 |+1 to|S N | Start renumbering, so that the nodes in the entire weighted undirected graph have unique and continuous numbers across different communities, ensuring the consistency of indexes and the accuracy of information mapping in the subsequent quantum state representation and quantum circuit construction process.

[0091] based on Figure 2 In some specific examples, step S103 maps each community subgraph to the corresponding sub-Hamiltonian of the Ising model, specifically including:

[0092] S1031: Construct the objective function for the maximum cut problem.

[0093] The objective function of the maximum cut problem is used to quantify the total weight of the edges that are "cut" in the partitioning scheme. Essentially, it optimizes the variable x. i The value of maximizes the sum of edge weights connecting different sets. This objective function is specifically expressed as:

[0094]

[0095] In the formula, Maxcut(G) represents the objective function for the maximum cut problem in a weighted undirected graph G; G represents a weighted undirected graph, G = (V, E), and G contains the set of nodes V and the set of edges E; x i The partition label for the i-th node is defined by a value of {-1, +1}, indicating which of the two different sets the node is assigned to. i =-1 indicates that the node belongs to the first set, x i =+1 indicates that the node belongs to the second set; similarly, x j The partition label for the j-th node, whose value is also limited to {-1, +1}, is used to indicate which of the two different sets the node is assigned to; e ij Represents the edge connecting node i and node j; e ij ∈E represents the edge e connecting node i and node j. ij Belongs to edge set E, This indicates that for all edges e ij Summation of ∈E; wij This represents the edge weight between node i and node j; Indicates the judgment of edge e ij Whether a node has been cut is used to determine if node i and node j are in the same set. A value of 0 indicates that node i and node j are in the same set; if The value of 1 indicates that node i and node j are in different sets.

[0096] S1032: Map the objective function of the maximum cut problem to the Hamiltonian of the Ising model.

[0097] To adapt the maximum cut problem to the solution process of the distributed VQE algorithm, the objective function of the maximum cut problem needs to be mapped to the Hamiltonian of the Ising model. The Hamiltonian of the Ising model (i.e., the global Hamiltonian) is expressed as:

[0098]

[0099] In the formula, H C Σ( represents the Hamiltonian of the maximum cut problem in the Ising model; (i,j)∈E is the set of edges in the graph; Σ( i,j)∈E () indicates traversing every edge in the graph; For a size of 2 n ×2 n The identity matrix; n represents the number of nodes in the weighted undirected graph. Z i For the tensor product operation of the Pauli Z matrix on the i-th qubit; Z j For the tensor product operation of the Pauli Z matrix on the j-th qubit.

[0100] By constructing the Hamiltonian H C The objective of solving the maximum cut problem is transformed into minimizing the expected value of the Hamiltonian, i.e.:

[0101]

[0102] In the formula, E represents the expected energy value, i.e., the system energy corresponding to the current quantum state; min(E) represents finding the minimum energy value under all possible quantum states; ψ represents a quantum state; H C This represents the Hamiltonian for the maximum cut problem in the Ising model.

[0103] S1033: The global Hamiltonian is partitioned into multiple community subgraphs based on graph partitioning, thus forming multiple sub-Hamiltonians. Its mathematical expression is:

[0104]

[0105] In the formula, H C∑ represents the Hamiltonian of the maximum cut problem in the Ising model; m This represents the relationship between m sub-Hamiltonians and their corresponding preset weight coefficients c. m Summing the products of , where the subscript m denotes the m-th sub-Hamiltonian; c m H represents the preset weighting coefficient corresponding to the m-th sub-Hamiltonian; m H represents the global Hamiltonian. C The m-th sub-Hamiltonian; This represents a sub-Hamiltonian that acts only on the first community S1, and the number of qubits acting on it is equal to the number of nodes in that community |S1|. This represents a sub-Hamiltonian that acts only on the second community S2, and the number of qubits it acts on is equal to the number of nodes in that community |S2|. This means it only applies to the ηth community S. η The sub-Hamiltonian, whose number of active qubits is equal to the number of nodes in the community |S η |; This means it only applies to the Nth community S. N The sub-Hamiltonian, whose number of active qubits is equal to the number of nodes in the community |S N |; N represents the total number of communities; This represents the tensor product operator.

[0106] Specifically, the n-bit Hamiltonian H C Decomposed into N sub-Hamiltonians The number of bits of the sub-Hamiltonian is equal to the number of community S1, S2, ..., S η ,…,S N The number of nodes, i.e., |S1|,|S2|,…,|S η |,…,|S N | where S1, S2, ..., S η ,…,S N The number of nodes is less than n. By transforming the global Hamiltonian into a sub-Hamiltonian, the global optimization problem can be converted into a set of subproblems that can be processed in parallel. Each subproblem involves only the node connection relationship within a community, thereby reducing quantum resources and computational complexity.

[0107] Furthermore, in step S103, constructing a parameterized quantum circuit based on each sub-Hamiltonian specifically includes the following step S1034:

[0108] S1034: Based on N sub-Hamiltonians Initialize N parameterized quantum circuits, each with the number of qubits |S1|, |S2|, ..., |S... η |,…,|S NEach parameterized quantum circuit consists of a series of quantum gates containing parameters to be optimized. In one embodiment, constructing a parameterized quantum circuit based on each sub-Hamilton involves constructing N parameterized quantum circuits based on N sub-Hamiltons, where the number of bits in each parameterized quantum circuit is the same as the number of bits in each sub-Hamilton. Constructing a parameterized quantum circuit based on each sub-Hamilton includes multiple single-bit rotation gates and two-bit entangled gates with parameters to be optimized; that is, it consists of single-bit gates containing parameters to be optimized. and two-bit gates containing parameters to be optimized Construct, its equivalent unitary matrix is:

[0109]

[0110] In the formula, It is the ηth community subgraph S η The corresponding global equivalent unitary transformation matrix of the parameterized quantum circuit; Represents the community subgraph S η The corresponding unitary transform operation of the quantum circuit; Indicates the Sth η The set of all parameters to be optimized in a parameterized quantum circuit, including the initial parameters of a single-qubit rotating gate. And |S η - 1 two-bit entanglement gate parameter This represents a single-bit rotation RX gate acting on the first qubit of the community, with parameters... For parameter set The first parameter; This represents a two-qubit entangled RZX gate acting on two adjacent qubits (the i-th and i+1-th qubits), with parameters... For parameter set The (i+1)th parameter. The matrix expression for the RZX gate is as follows:

[0111]

[0112] In the formula, e represents the base of the exponential function, which is the base of the natural logarithm (ln); i represents the imaginary unit, which makes the exponential transformation fall in the complex space and is used to describe the evolution of quantum states; θ represents the angular parameter that controls the degree of rotation of the quantum gate. This indicates that the rotation angle is halved, which is used for exponential generation of the gate matrix; This represents the tensor product of the Pauli operators Z and X, with Z acting on the first bit and X acting on the second bit. It characterizes the operation of this quantum gate as a joint action distributed across the two qubits, used to construct entanglement or exert interactive effects. This represents an adjustable 4×4 complex unitary matrix used to transform the tensor operator of two qubits into a gate with angle control capability. This gate will achieve coupling rotation between qubits according to the value of θ.

[0113] The 4×4 matrix above contains a complex rotation structure built based on the θ parameter. The first two rows / columns correspond to bit states |00> and |01>, and the last two correspond to |10> and |11>. The real part is a cosine function, and the imaginary part is a positive and negative sine function, indicating that the gate is a unitary transformation with a rotation angle, which is directly controlled by the parameter θ. The parameter θ is an adjustable rotation parameter of the RZX gate, which takes a real value and is used to control the rotation angle of the quantum gate. This parameter can be derived from the set of parameters to be optimized. One of the elements in, namely

[0114] based on Figure 1 In some specific examples, step S104 iteratively updates the parameters of each parameterized quantum circuit corresponding to each community subgraph using a gradient descent algorithm to minimize the expected value of the global Hamiltonian. The binary string of the quantum state corresponding to the expected value of the global Hamiltonian is then output as the initial solution. Specifically, this includes the following processes A1.1 to A3.4:

[0115] A1: Calculate the expected value of the global Hamiltonian for each sub-Hamiltonian corresponding to each community subgraph using parameterized quantum circuits;

[0116] A1.1: For each community subgraph in the graph structure, construct N trial wave functions respectively.

[0117] Specifically, each community subgraph S η Initialized to all zero state Then, a quantum circuit with a fixed structure and adjustable parameters is applied to it. Each parameterized quantum circuit consists of multiple parameters to be optimized, including a rotating gate RX acting on a single qubit, whose parameters are denoted as... And the two-bit gate RZX, which operates between two adjacent bits, has parameters denoted as... The entire parameterized quantum circuit first applies an RX rotation gate to the first qubit, followed by RZX gates, acting on the all-zero state. And construct parameterized quantum states

[0118] A1.2: Measuring the Hamiltonian H in the p-th iteration C Expected value E p (H C ).

[0119] N trial wave functions and N sub-Hamiltonians The global Hamiltonian H is calculated. C Expected value, i.e., by using each community subgraph S η The constructed parameterized quantum state Its corresponding sub-Hamiltonian Perform expected value calculations to obtain the energy contribution on each community subgraph, then multiply the expected value results corresponding to all community subgraphs, and finally calculate the expected value for all sub-Hamiltons. Multiply by the corresponding weighting coefficient c m By performing a weighted summation, the total expected value E of the global Hamiltonian is finally obtained. p (H C The corresponding mathematical expression is as follows:

[0120]

[0121] In the formula, This indicates that the parameters are optimized in the p-th round. Below, the global Hamiltonian H C Expected value; It is the set of all parameters in the current p-th round. in, This represents the first adjustable parameter in the first community S1 in the p-th round. Similarly, This represents the second adjustable parameter in the first community S1 of the p-th round. This represents the |S1|-th adjustable parameter in the first community S1 of round p; Let S2 represent the second community S2 and the ηth community S2 in the p-th round, respectively. η The Nth community S N All adjustable parameters in ∑ m Summing all sub-Hamiltonian terms; c m The preset weight coefficients are the values ​​corresponding to the m-th sub-Hamiltonian. For each community subgraph S η The expected value of the sub-Hamiltonian is multiplied by N; N represents the total number of community subgraphs in the community partitioning result, that is, the number of communities that are partitioned into after the entire weighted undirected graph is subjected to community detection. This indicates that in the p-th iteration, the η-th community subgraph S η The parameterized quantum state constructed above, with parameters representing the current round. This represents the set of parameters used for the ηth community graph in the p-th round, and is the entire parameter vector. A subset; the result here refers to the representation of a quantum state. For the sub-Hamiltonian The expected value is the energy contribution of the subgraph in the current quantum state.

[0122] A2: Calculate the gradient of the expected value with respect to each parameter based on the parameter-shift rule;

[0123] A2.1: Using the Parameter-Shift rule, the gradient is calculated by the energy difference of shifting forward and backward by π / 2. For each parameter... Its gradient (partial derivative) is calculated using the following formula:

[0124]

[0125] In the formula, Represents the expected energy value with respect to the parameter The gradient (partial derivative) is used to guide parameter optimization; Let l represent the l-th adjustable parameter in the parameterized quantum circuit corresponding to the η-th community subgraph in the p-th iteration, where l satisfies 0 ≤ l ≤ |S η |;E() represents the expected energy value calculated under given parameter values ​​(corresponding to the global Hamiltonian H). C (Expected value).

[0126] By calculating the gradient for each parameter, the overall gradient vector can be constructed as follows:

[0127]

[0128] Understandable. These parameters can be used This abbreviated form represents the array of partial derivatives of all parameters in the entire S1 community. Similarly, It can also be expressed as It can also be expressed as

[0129] A3: The resulting gradient vector The classical gradient optimizer is input to iteratively update the parameters, and finally outputs the binary string of the quantum state corresponding to the expected value of the global Hamiltonian as the initial solution.

[0130] A3.1: Gradient vector The parameters are passed into a classic gradient optimizer (such as the Adam optimizer) and updated to obtain the parameters for the next round.

[0131] A3.2: Parameters Decompose and distribute the components into N parameterized quantum circuits. Repeat steps A1.1 to A3.2 until one of the preset convergence conditions is met, such as the global energy change |E|.p+1 -E p |<∈,(E p+1 This can be understood as the expected energy value in the (p+1)th round; E p This can be understood as the expected energy value in the p-th round; ∈ is a preset threshold), or the current number of iterations has reached the maximum number of iterations T. max .in, This represents the first adjustable parameter in the first community S1 in the (p+1)th round. Similarly, This represents the second adjustable parameter in the first community S1 in round p+1. This represents the |S1|-th adjustable parameter in the first community S1 in the (p+1)-th round; Let S1 and S2 represent the second community S2 and the ηth community S1 in the (p+1)th round, respectively. η The Nth community S N All adjustable parameters.

[0132] A3.3: Expected value E of Hamiltonian obtained from output optimization p+1 and the corresponding quantum state |ψ f0 >. Among them, the quantum state |ψ f0 > For N trial wave functions The basis vector with the highest probability The tensor product, i.e. |k r > For quantum state A set of orthogonal bases,

[0133] A3.4: Reading the quantum state |ψ f0 The binary string ψ in > f0 As the initial solution to the maximum cut problem.

[0134] based on Figure 2 In some specific examples, step S105 generates multiple candidate solutions based on the neighborhood search algorithm for the initial solution, calculates the cut values ​​of the candidate solutions and the initial solution based on the objective function constructed based on the maximum cut problem, and selects the solution with the optimal cut value as the more feasible solution. Specifically, this includes:

[0135] S1051: Calculating the quantum state ψ f0 Substitute the initial solution obtained analytically into the cut value corresponding to the maximum cut objective function. This cut value is the sum of the cut weights of the vertex partitioning scheme represented by the initial solution in the original weighted undirected graph, denoted as τ0.

[0136] S1052: Perform a flip operation on each bit of the initial solution to generate multiple candidate solutions;

[0137] Specifically, that is, for the current solution ψf0 Perform a flip operation on the j-th bit (i.e., change the corresponding bit value from 0 to 1 or from 1 to 0) to generate a neighborhood solution. Where j∈{1,2,…,n}. Assuming the binary string has a length of n, then n neighborhood candidate solutions will be generated.

[0138] S1053: Calculate the solution for each neighborhood. The corresponding cut value, denoted as τ. j .

[0139] Each τ j All are The represented binary solution corresponds to the cut weight of the partition formed in the original graph. Cut value τ j The calculation method is the same as τ0, that is, based on the division of the vertex set represented by each bit in the binary string, the total weight of all cut edges is calculated.

[0140] S1054: Take max{τ0,τ1,…,τ} j ,…τ n} represents a better cut value for the classic neighborhood search algorithm, corresponding to the neighborhood solution. As a better feasible solution ψ f1 .

[0141] From the cut value τ0 of the original initial solution and the cut values ​​τ1 to τ of all neighborhood solutions n Select the largest among them, that is, calculate max{τ0,τ1,…,τ j ,…τ n If the neighborhood cut value corresponding to the maximum value is greater than the initial solution τ0, then the corresponding neighborhood solution... Replace with a new, better feasible solution ψ f1 Otherwise, if τ0 is already the maximum, then retain the original solution ψ. f0 As a better feasible solution ψ f1 By employing a local neighborhood search algorithm, the output solution is guaranteed to have the optimal cut value within the current search space, thereby improving the practicality of the quantum computing output solution and the accuracy of problem solving.

[0142] In one embodiment, based on Figure 2 In some specific examples, step S105 uses the quantum state corresponding to the better feasible solution as the ground state, applies a preset perturbation operator to the parameterized quantum circuit corresponding to each community subgraph to construct a perturbed quantum circuit, and uses the gradient descent algorithm to iteratively update the parameters of each perturbed quantum circuit to minimize the expected value of the perturbed global Hamiltonian until the preset convergence condition is met. The binary string of the quantum state corresponding to the expected value of the global Hamiltonian is output as the final solution of the target task. Specifically, this includes the following processes B1.1-B4:

[0143] B1: Using the quantum state corresponding to the better feasible solution as the ground state, including:

[0144] B1.1: The better feasible solution ψ f1 Reduced to quantum state |ψ f1 > and further decomposed into tensor product form, i.e., |ψ f1 >= This represents the quantum ground state corresponding to the ηth subgraph;

[0145] B2: Apply a preset perturbation operator to the parameterized quantum circuit corresponding to each community subgraph to construct a perturbed quantum circuit, as follows:

[0146] B2.1: Prepare the target quantum state in N parameterized quantum circuits respectively.

[0147] B2.1.1: Read Record the set of indices of all bits in a quantum state that are 1. (where λ is the number of bits that are 1, i.e., λ = |α|, Indicates the Sth η a quantum state The first bit with a value of 1 in the middle. Indicates the Sth η a quantum state The second bit with a value of 1. Indicates the Sth η a quantum state The ω-th bit with a value of 1 in the middle. Indicates the Sth η a quantum state (the λth bit with a value of 1);

[0148] B2.1.2: In each parameterized quantum circuit, for each satisfying All bits in a quantum state that are 1 (i.e., The qubit is denoted as the first qubit. The bit is subjected to a quantum gate that rotates about the Y-axis. The initial angle is RY ω The matrix representation of (γ) is:

[0149]

[0150] Where γ is an adjustable rotation angle parameter, representing the rotation angle around the Y-axis; It is a matrix index, representing the unitary transformation corresponding to the rotation of a qubit around the Y-axis by γ radians; The matrix elements of this rotation gate in the standard basis determine how the quantum state is rotated.

[0151] B2.2: Based on N parameterized quantum circuits, further quantum circuits are constructed to simulate quantum perturbations:

[0152] B2.2.1: Read Record the set of indices of all bits in a quantum state that have a value of 0. in, Indicates the Sth η a quantum state The first bit with a value of 0; Indicates the Sth η a quantum state The second bit with a value of 0; Indicates the Sth η a quantum state The μ-th bit with a value of 0; Indicates the Sth η a quantum state |S η |-λ bits with a value of 0);

[0153] B2.2.2: A single-bit rotation operator is applied to the position where the bit is 1 in the better feasible solution, and paired rotation operators are applied to the positions where the bit is 0 and the bit is 1 in the better feasible solution to form a perturbed quantum circuit. Specifically, in each parameterized quantum circuit, any combination of bit pairs in the above sets α and β...

[0154] Apply a There are a total of doors. This represents the bit index of the ηth community subgraph with a value of 1; This represents the bit index of the value 0 in the ηth community subgraph; the above formula constitutes all one-to-one bit position combinations (one bit of value 1 and one bit of value 0).

[0155] Represented as the Sth η In the parameterized quantum circuit at the , Bit and the An RXX gate is applied to each bit, and the matrix representation of the RXX gate is as follows:

[0156]

[0157] Where γ is an adjustable rotation angle parameter, representing the rotation angle around the Y-axis; is the matrix index, representing the unitary gate applied to two qubits; -i is used to introduce a phase rotation to make the gate unitary. The matrix elements of this rotation gate in the standard basis determine how the quantum state is rotated; This represents the amount of rotation or entanglement between two qubits; The control system retains the amplitude of the current quantum state (i.e., the "unchanged" component).

[0158] B3: The gradient descent algorithm is used to iteratively update the parameters of each perturbed quantum circuit to minimize the expected value of the global Hamiltonian after perturbation, until the preset convergence condition is met. The binary string of the quantum state corresponding to the expected value of the global Hamiltonian is output as the final solution of the objective task, specifically including:

[0159] B3.1: Construct N trial wave functions Apply the N parameterized quantum circuits of B2.2 to the initial state respectively. Above, N trial wave functions are obtained.

[0160] B3.2: Measuring the Hamiltonian H in the p-th iteration C Expected value E p (H C N trial wave functions and N sub-Hamiltonians H η The global Hamiltonian H is calculated. C Expected value, i.e.:

[0161]

[0162] in, This represents the global Hamiltonian H under the parameters of the p-th round. C Expected value; It is the set of all parameters in the current p-th round. These represent the community subgraphs S1 to S2 respectively. N The corresponding parameters; This indicates that in the p-th iteration, the η-th community subgraph S η The parameterized quantum state constructed above, with parameters representing the current round. This means that each community subgraph is computed independently, and then all results are multiplied together; the result here refers to the representation of the quantum state. For the sub-Hamiltonian The expected value is the energy contribution of the subgraph in the current quantum state.

[0163] B3.3: Using the Parameter-Shift rule, the gradient is calculated by the energy difference of shifting forward and backward by π / 2, for each parameter. Its gradient (partial derivative) is calculated using the following formula:

[0164]

[0165] In the formula, This parameter The corresponding gradient (partial derivative) is used to guide parameter optimization; E represents the d-th adjustable parameter in the parameterized quantum circuit corresponding to the η-th community subgraph in the p-th iteration, where d satisfies 0 ≤ d ≤ |α| + |α| + |β|; E() represents the expected energy value calculated under given parameter values ​​(corresponding to the global Hamiltonian H). C (Expected value).

[0166] By calculating the gradient for each parameter, the overall gradient vector can be constructed as follows:

[0167]

[0168] B3.4: The resulting gradient vector The classical gradient optimizer is input to iteratively update the parameters, and finally outputs the binary string of the quantum state corresponding to the expected value of the global Hamiltonian as the initial solution.

[0169] B3.5: Gradient vector The parameters are passed into a classic gradient optimizer to obtain the parameters for the next round.

[0170] B3.6: Parameters Decompose and distribute the data into N parameterized quantum circuits. Repeat steps 3.1 to B3.6 until one of the preset convergence conditions is met, such as the global energy change |E|. p+1 -E p |<∈(E p+1 This can be understood as the expected energy value in the (p+1)th round; E p This can be understood as the expected energy value in the p-th round; ∈ is a preset threshold), or the current number of iterations has reached the maximum number of iterations T. max .

[0171] B3.7: Expected value E of the Hamiltonian obtained from output optimization p+1 and the corresponding quantum state |ψ f0 >. Where the quantum state |ψ f0 > For N trial wave functions The basis vector with the highest probability The tensor product, i.e. in |k r > For quantum state A set of orthogonal bases,

[0172] B3.8: Reading the quantum state |ψ f0 The binary string ψ in > f0 The solution is updated to a better feasible solution to the maximum cut problem.

[0173] B3.9: Repeat steps B1.1 to B3.8 until the number of times the calculated cut value corresponding to the output binary string remains unchanged reaches the preset number. Then, take the final output binary string as the final solution to the maximum cut problem, which is also the target task.

[0174] In a specific application scenario, the application scenario can be a large-scale communication network (such as a 5G cellular base station connection network or a data center interconnection network). In order to reduce link collisions and signal interference, it is necessary to divide network nodes into two non-interfering sets to maximize the number or weight of links across sets. This can also be abstracted as the maximum cut problem of a weighted undirected graph. The application steps are as follows:

[0175] S201: Model the communication network as a weighted undirected graph;

[0176] Here, nodes represent base stations, servers, or other communication nodes with communication capabilities, and edge weights represent the signal interference strength between node i and node j. The goal is to partition communication nodes using a maximum cut problem to maximize the total interference strength across communities, thereby reducing interference within the same set.

[0177] S202: The weighted undirected graph is divided using a community detection algorithm. Strongly coupled nodes (such as base stations that are physically close and have strong interference) are divided into the same community subgraph to reduce the size of the subgraph.

[0178] S203: Map the maximum cut problem corresponding to each community subgraph to the sub-Hamiltonian of the Ising model, and construct parameterized quantum circuits for each subgraph as inputs to the distributed VQE algorithm.

[0179] S204: A distributed VQE algorithm is run in parallel on multiple quantum processing units. For each community subgraph, the expected value of its corresponding sub-Hamilton in the current quantum state is measured, and the expected values ​​of all sub-Hamiltons are weighted and summed to estimate the expected value of the global Hamiltonian. The quantum circuit parameters of each community subgraph are iteratively updated through a classical optimizer to minimize the expected value of the global Hamiltonian, and the corresponding quantum state binary string is output as the initial solution. In the communication network scenario of this embodiment, this initial solution corresponds to the preliminary grouping scheme of a base station cluster. Here, a quantum processing unit can be a physically independent quantum computing device or a computing module in a quantum computing platform that supports multi-task parallelism (supporting multi-task queuing or parallel scheduling), with each subtask running in different threads or simulated channels.

[0180] S205: Based on the neighborhood search algorithm, perform bit flipping on the initial solution to generate multiple candidate solutions. Calculate the cut value corresponding to each candidate solution, and select the candidate solution with the largest cut value as the better feasible solution. Here, bit flipping is equivalent to performing a small-scale network node swap based on the original initial solution result, further reducing interference within the same group.

[0181] S206: Using the better feasible solution as the ground state, apply a preset perturbation operator to the quantum circuit to construct a perturbed quantum circuit, and execute the gradient descent algorithm to iteratively update the adjustable parameters of the perturbed quantum circuit to minimize the expected value of the global Hamiltonian after perturbation until the preset convergence condition is met. Output the binary string of the quantum state corresponding to the expected value of the global Hamiltonian as the final solution of the task of minimizing interference between network nodes in the same group under the current communication network scenario. That is, the final binary string is the grouping scheme used to determine "which partition each base station belongs to". This grouping scheme can maximize the interference weight across partitions, which is equivalent to minimizing interference within the same group, thereby significantly improving the communication quality and spectrum utilization of the entire communication network. The output partitioning scheme can directly guide base station grouping or channel allocation.

[0182] In this embodiment, the specific process of comparison in steps S201 to S206 is the same as or similar to the corresponding method in the above embodiment. For parts not described in detail, please refer to the foregoing method embodiment, and they will not be repeated here.

[0183] To implement the quantum computing-based task processing method of this application embodiment, this application embodiment also provides a quantum computing-based task processing device, such as... Figure 2 As shown, the device includes:

[0184] The determining unit 201 is used to determine the maximum cut problem corresponding to the target task and represent the maximum cut problem as a weighted undirected graph.

[0185] The partitioning unit 202 is used to partition the weighted undirected graph based on a community detection algorithm to obtain multiple community subgraphs;

[0186] The parameterized quantum circuit construction unit 203 is used to map each of the community subgraphs to the sub-Hamiltons corresponding to the Ising model, and to construct parameterized quantum circuits based on each of the sub-Hamiltons;

[0187] The parameter update unit 204 is used to iteratively update the parameters of each parameterized quantum circuit for each community subgraph using the gradient descent algorithm to minimize the expected value of the global Hamiltonian and output the binary string of the quantum state corresponding to the expected value of the global Hamiltonian as the initial solution.

[0188] The neighborhood search unit 205 is used to generate multiple candidate solutions for the initial solution based on the neighborhood search algorithm, calculate the cut value of the candidate solutions based on the objective function constructed based on the maximum cut problem, and select the candidate solution with the optimal cut value as a better feasible solution.

[0189] The perturbation optimization unit 206 is used to construct perturbation quantum circuits by applying a preset perturbation operator to the parameterized quantum circuits corresponding to each community subgraph, using the quantum state corresponding to the better feasible solution as the ground state, and iteratively updating the parameters of each perturbation quantum circuit using the gradient descent algorithm to minimize the expected value of the perturbation global Hamiltonian until the preset convergence condition is met, and outputting the binary string of the quantum state corresponding to the expected value of the global Hamiltonian as the final solution of the target task.

[0190] In one embodiment, the weighted undirected graph is partitioned based on a community detection algorithm to obtain multiple community subgraphs, including:

[0191] The Louvain modularity optimization algorithm is used to maximize the modularity index for community identification in the weighted undirected graph.

[0192] The formula for calculating modularity is as follows:

[0193]

[0194] In the formula, Q represents the modularity value; m is the sum of edge weights in the weighted undirected graph; i represents the node number in the weighted undirected graph; j represents the node number in the weighted undirected graph; w ij k represents the edge weight between node i and node j. i Let k be the degree of node i, which is the sum of the weights of all edges connected to node i; j c represents the degree of node j, which is the sum of the weights of all edges connected to node j; i c represents the community number where node i is located; jIndicates the community number where node j is located; δ(c i ,c j ) is the Kronecker function, that is, if δ(c) i ,c j ) = 1 indicates that node i and node j belong to the same community; if δ(c i ,c j If ) = 0, it means that node i and node j do not belong to the same community; ∑ ij This indicates that all node pairs (i,j) in the weighted undirected graph have been traversed.

[0195] In one embodiment, mapping each community subgraph to the sub-Hamiltonian corresponding to the Ising model includes:

[0196] Construct the objective function of the maximum cut problem, map the objective function of the maximum cut problem to the Hamiltonian of the Ising model, and decompose the Hamiltonian of the Ising model into multiple sub-Hamiltonians according to the number of community subgraphs;

[0197] The objective function of the maximum cut problem is expressed as:

[0198]

[0199] In the formula, Maxcut() represents the objective function of the maximum cut problem; G represents a weighted undirected graph, G = (V, E), which contains the set of nodes V and the set of edges E; x i This represents the partition label of the i-th node, used to indicate which of the two different sets the node is assigned to, where x i =-1 indicates that the node is in the first set, x i =+1 indicates that the node is in the second set; x j The partition label of the j-th node indicates which of the two different sets the node is assigned to, where x j =-1 indicates that the node is in the first set, x j =+1 indicates that the node is in the second set; w ij Represents the edge weight between node i and node j; e ij This represents the edge connecting node i and node j; This indicates whether the edge (i,j) is cut, used to determine whether nodes i and j are in the same set. A value of 0 indicates that node i and node j are in the same set; if A value of 1 indicates that node i and node j are in different sets;

[0200] The Hamiltonian of the Ising model is expressed as:

[0201]

[0202] In the formula, H C Let E represent the Hamiltonian corresponding to the maximum cut problem; (i,j)∈E represents traversing each edge in the graph; For a size of 2 n ×2 n The identity matrix; n represents the number of nodes in the weighted undirected graph. Z i The operation of the Pauli Z matrix on the i-th qubit; Z j The operation of the Pauli Z matrix on the j-th qubit;

[0203] The Hamiltonian of the Ising model is decomposed into multiple sub-Hamiltonians according to the number of community subgraphs, as follows:

[0204]

[0205] H C H represents the Hamiltonian of the maximum cut problem in the Ising model; m H represents the global Hamiltonian. C The m-th component; c m The preset weight coefficient is the one corresponding to the m-th component; This means it only applies to η communities S. η The sub-Hamiltonian, whose number of active qubits is equal to the number of nodes in the community |S η |; N represents the total number of communities; This represents the tensor product operator. Specifically, it multiplies an n-bit Hamiltonian H. C Decomposed into N sub-Hamiltonians The number of bits of the sub-Hamiltonian is equal to the number of community S1, S2, ..., S η ,…S N The number of nodes, i.e., |S1|,|S2|,…,|S η |,…,|S N | where S1, S2, ..., S η ,…S N The number of nodes is less than n.

[0206] In one embodiment, the construction of parameterized quantum circuits based on each of the sub-Hamiltons involves constructing N parameterized quantum circuits based on N sub-Hamiltons, where the number of bits in each parameterized quantum circuit is the same as the number of bits in each sub-Hamilton. The construction of parameterized quantum circuits based on each of the sub-Hamiltons includes multiple single-bit rotation gates and two-bit entanglement gates with parameters to be optimized.

[0207] In one embodiment, the step of iteratively updating the parameters of each parameterized quantum circuit corresponding to each community subgraph using a gradient descent algorithm to minimize the expected value of the global Hamiltonian, and outputting the binary string of the quantum state corresponding to the expected value of the global Hamiltonian as the initial solution, includes:

[0208] For each community subgraph, the expected value of its global Hamiltonian is calculated using parameterized quantum circuits for the sub-Hamiltonian corresponding to each community subgraph.

[0209] The gradient of the expected value with respect to each parameter is calculated based on the parameter offset rule;

[0210] The obtained gradient vector is input into the classical gradient optimizer to iteratively update the parameters, and finally the binary string of the quantum state corresponding to the expected value of the global Hamiltonian is output as the initial solution.

[0211] In one embodiment, the neighborhood search algorithm generates multiple candidate solutions for the initial solution, including:

[0212] A flip operation is performed on each bit of the initial solution to generate multiple candidate solutions.

[0213] In one embodiment, the step of applying a preset perturbation operator to construct a perturbed quantum circuit in each parameterized quantum circuit corresponding to the community subgraph includes:

[0214] A single-bit rotation operator is applied at the position where the bit is 1 in the better feasible solution, and paired rotation operators are applied at the positions where the bit is 0 and the bit is 1 in the better feasible solution to form a perturbation quantum circuit.

[0215] It should be noted that the above embodiments of the quantum computing-based task processing device are only illustrative examples of the division of program modules. In practical applications, the processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. Furthermore, the quantum computing-based task processing device and the quantum computing-based task processing method embodiments provided above belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0216] Based on the hardware implementation of the above program modules, and in order to implement the quantum computing-based task processing method provided in this application embodiment, this application embodiment also provides a quantum computing device, such as... Figure 3 As shown, the quantum computing device 300 includes:

[0217] Communication interface 303 enables information exchange with other devices, such as network devices;

[0218] The processor 301 is connected to the communication interface 303 to enable information interaction with other devices. When running a computer program, it executes the quantum computing-based task processing method provided by one or more of the above-mentioned technical solutions. The computer program is stored in the memory 302.

[0219] Processor 301 may include a classical processor and a quantum processing unit (QPU). The classical processor is responsible for receiving and parsing external task requests, preprocessing the target problem and transforming it into a corresponding quantum optimization problem model, and simultaneously scheduling quantum tasks, issuing quantum gate operation instructions, and allocating computing resources. Furthermore, the classical processor performs post-processing operations on quantum measurement results, including statistically analyzing the measurement results, calculating the expectation and gradient of the Hamiltonian, and iteratively updating parameters using classical optimization algorithms. The QPU, under the scheduling of the classical processor, executes parameterized quantum circuits, completes quantum gate operations and quantum state evolution, obtains computational results through quantum measurements, and then feeds the results back to the classical processor. The classical processor and QPU work together to implement the quantum computing-based task processing method provided by one or more of the above technical solutions. Processor 301 can also be implemented using a separate QPU, which independently implements the quantum computing-based task processing method provided by one or more of the above technical solutions.

[0220] Of course, in practical applications, the various components in the quantum computing device 300 are coupled together via a bus system 304. It can be understood that the bus system 304 is used to achieve communication between these components. In addition to a data bus, the bus system 304 also includes a power bus, a control bus, a status signal bus, and a quantum control bus. The quantum control bus is used to send quantum gate operation commands to the QPU and read back measurement results. However, for clarity, in... Figure 3 The general designated all buses as Bus System 304.

[0221] The memory 302 in this embodiment is used to store various types of data to support the operation of the quantum computing device 300. Examples of such data include any computer program used to operate on the quantum computing device 300.

[0222] It is understood that memory 302 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memory 302 described in the embodiments of this application is intended to include, but is not limited to, these and any other suitable types of memory.

[0223] When the processor 301 executes the program, it implements the corresponding processes in the various methods of the embodiments of this application. For the sake of brevity, these will not be described in detail here.

[0224] This application also provides a computer-readable storage medium storing a quantum computing program. When the quantum computing program is executed by a processor, it performs any of the above-described quantum computing-based task processing methods. The computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM.

[0225] This application also provides a quantum computing program product, which stores a quantum computing program / instruction. When the quantum computing program / instruction is executed by a processor, it is used to implement the quantum computing-based task processing method described in the first aspect or any specific implementation of the first aspect of this application.

[0226] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0227] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0228] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0229] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0230] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a quantum computing device to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A method for processing a task based on quantum computing, characterized by, The method comprises the following steps: determine the maximum cut problem corresponding to the target task, and represent the maximum cut problem as a weighted undirected graph; based on the community detection algorithm, divide the weighted undirected graph to obtain a plurality of community subgraphs; map each community subgraph to the corresponding sub-Hamiltonian of the Ising model, and construct a parameterized quantum circuit based on each sub-Hamiltonian; for each parameterized quantum circuit corresponding to the community subgraph, use the gradient descent algorithm to iteratively update the parameters of each parameterized quantum circuit to minimize the global Hamiltonian expectation value, and output the binary string of the quantum state corresponding to the global Hamiltonian expectation value as the initial solution; based on the neighborhood search algorithm, generate a plurality of candidate solutions from the initial solution, calculate the cut value of the candidate solution and the cut value of the initial solution based on the objective function constructed based on the maximum cut problem, and select the solution with the optimal cut value as the better feasible solution; with the quantum state corresponding to the better feasible solution as the ground state, construct a perturbed quantum circuit by applying a predetermined perturbation operator in each parameterized quantum circuit corresponding to the community subgraph, and iteratively update the parameters of each perturbed quantum circuit using the gradient descent algorithm to minimize the global Hamiltonian expectation value after perturbation until the predetermined convergence condition is met, and output the binary string of the quantum state corresponding to the global Hamiltonian expectation value as the final solution of the target task.

2. The method of claim 1, wherein, The method comprises the following steps: use the Louvain modularity optimization algorithm to maximize the modularity index to identify the community of the weighted undirected graph; wherein the calculation formula of the modularity is: wherein Q represents a value of modularity; m is a sum of edge weights of the weighted undirected graph; i represents a node number in the weighted undirected graph; j represents another node number in the weighted undirected graph; w ij represents an edge weight between node i and node j; k i is a degree of node i, i.e. a sum of weights of all edges connected to node i; k j represents a degree of node j, i.e. a sum of weights of all edges connected to node j; c i represents a community number in which node i is located; c j represents a community number in which node j is located; δ(c i ,c j ) is a Kronecker function, i.e. if δ(c i ,c j ) = 1, it means that node i and node j belong to the same community; if δ(c i ,c j ) = 0, it means that node i and node j do not belong to the same community; ∑ ij represents traversing all node pairs (i, j) in the weighted undirected graph.

3. The method of claim 1, wherein, The method comprises the following steps: construct the maximum cut problem objective function, map the maximum cut problem objective function to the Hamiltonian of the Ising model, and decompose the Hamiltonian of the Ising model into a plurality of sub-Hamiltonians according to the number of community subgraphs; wherein the maximum cut problem objective function is represented as: where Maxcut() represents a max-cut problem objective function; G represents a weighted undirected graph, G = (V, E), G contains a node set V and an edge set E; x i represents a partition label of the i-th node, used to indicate which one of two different sets the node is assigned to, where x i = -1 represents that the node is in the first set, x i = +1 represents that the node is in the second set; x j represents a partition label of the j-th node, used to indicate which one of two different sets the node is assigned to, where x j = -1 represents that the node is in the first set, x j = +1 represents that the node is in the second set; w ij represents an edge weight between the node i and the node j; e ij represents an edge connecting the node i and the node j; represents a judgment on whether the edge (i, j) is cut, used to judge whether the node i and the node j are in the same set, if the value of the edge (i, j) is 0, it represents that the node i and the node j are in the same set; if the value of the edge (i, j) is 1, it represents that the node i and the node j are in different sets; the Hamiltonian of the Ising model is represented as: where H C represents a Hamiltonian corresponding to the maximum cut problem; (i,j) E represents traversing each edge in the graph; is a 2 n x 2 n identity matrix; n represents the number of nodes of the weighted undirected graph; Z i is a Pauli Z matrix operation on the i-th quantum bit; Z j is a Pauli Z matrix operation on the j-th quantum bit; the Hamiltonian of the Ising model is decomposed into a plurality of sub-Hamiltonians according to the number of community subgraphs, and the Hamiltonian of the Ising model is represented as: H C represents the Hamiltonian of the Ising model corresponding to the maximum cut problem; H m represents the m-th component of the global Hamiltonian H C ; c m is the preset weight coefficient corresponding to the m-th component; represents the sub-Hamiltonian only acting on the η-th community S η , and the number of quantum bits acting on it is equal to the number of nodes |S η | of the community; N represents the total number of communities; represents the tensor product operator; specifically, the Hamiltonian H C of n bits is decomposed into N sub-Hamiltonians The number of bits of the sub-Hamiltonian is equal to the number of nodes of the community S1, S2, …, S η ,…S N , that is, |S1|, |S2|, …, |S η |, …, |S N |, wherein the number of nodes of S1, S2, …, S η ,…S N is less than n.

4. The method of claim 1, wherein, The method comprises the following steps:

5. The method of claim 1, wherein, construct N parameterized quantum circuits according to N sub-Hamiltonians, and the number of bits of each parameterized quantum circuit is the number of bits of each sub-Hamiltonian; the method comprises a plurality of single-bit rotation gates and two-bit entanglement gates with to-be-optimized parameters. The method comprises the following steps: respectively calculate the global Hamiltonian expectation value of each community subgraph using the parameterized quantum circuit corresponding to the sub-Hamiltonian of each community subgraph; calculate the gradient of each parameter based on the parameter offset rule; The obtained gradient vector is input into a classical gradient optimizer to iteratively update the parameters, and finally output a binary string of a quantum state corresponding to the global Hamiltonian expectation value as an initial solution.

6. The method of claim 1, wherein, The initial solution is generated into a plurality of candidate solutions based on a neighborhood search algorithm, including: A flip operation is performed on each bit of the initial solution to generate a plurality of candidate solutions.

7. The method of claim 1, wherein, The preset perturbation operator is applied in the parameterized quantum circuit corresponding to each community subgraph to construct a perturbation quantum circuit, including: A single-bit rotation operator is applied at the position of the bit corresponding to the better feasible solution being 1, and a pair rotation operator is applied at the position of the bit corresponding to the better feasible solution being 0 and the bit being 1, to form a perturbation quantum circuit.

8. A quantum computing based task processing apparatus, characterized by, Including: A determination unit is configured to determine a maximum cut problem corresponding to a target task, and represent the maximum cut problem as a weighted undirected graph; A division unit is configured to divide the weighted undirected graph based on a community detection algorithm to obtain a plurality of community subgraphs; A parameterized quantum circuit construction unit is configured to map each community subgraph to a sub-Hamiltonian corresponding to an Ising model, and construct a parameterized quantum circuit based on each sub-Hamiltonian; A parameter updating unit is configured to iteratively update the parameters of each parameterized quantum circuit using a gradient descent algorithm for the parameterized quantum circuit corresponding to each community subgraph, to minimize the global Hamiltonian expectation value, and output a binary string of a quantum state corresponding to the global Hamiltonian expectation value as an initial solution; A neighborhood search unit is configured to generate a plurality of candidate solutions based on a neighborhood search algorithm for the initial solution, calculate the cut value of the candidate solutions based on an objective function constructed based on the maximum cut problem, and select a candidate solution with an optimal cut value as a better feasible solution; A perturbation optimization unit is configured to take the quantum state corresponding to the better feasible solution as a ground state, apply a preset perturbation operator in the parameterized quantum circuit corresponding to each community subgraph to construct a perturbation quantum circuit, and iteratively update the parameters of each perturbation quantum circuit using the gradient descent algorithm, to minimize the global Hamiltonian expectation value after perturbation, until a preset convergence condition is met, and output a binary string of a quantum state corresponding to the global Hamiltonian expectation value as a final solution of the target task.

9. A quantum computing device, comprising: Including: A processor, a memory and a communication interface; The memory is a transitory storage memory or a persistent storage memory; The processor is configured to communicate with the memory and execute instruction operations in the memory to perform the method of any one of claims 1 to 7.

10. A storage medium having stored thereon a quantum computing program, the program comprising: The quantum computing program is executed by the processor to perform the method of any one of claims 1 to 7. The quantum computing program is executed by the processor to perform the method of any one of claims 1 to 7.

Citation Information

Cited By

  • Superconducting quantum computing system and method of integrated gradient computing optimization module

    CN122047537A