Quantum line optimization method and system based on quantum approximate optimization algorithm

Through the quantum circuit optimization method based on the quantum approximate optimization algorithm, the graph structure is decomposed into subgraphs and the edges are optimized in parallel. The optimizer is used to execute parameters in parallel, which solves the problem of low efficiency in quantum circuit construction and optimization in the existing technology. It achieves efficient optimization and flexible adaptability of complex graph structures, and improves computing efficiency and accuracy.

CN120706591APending Publication Date: 2025-09-26YANGTZE DELTA IND INNOVATION CENT OF QUANTUM SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510796639.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

When existing quantum approximation optimization algorithms deal with graph structure problems with a large number of quantum bits, the optimization strategy is difficult to fully utilize the potential of hardware resources, and is inefficient when dealing with multiple graph structure problems. In addition, the choice of different classical optimizers has a significant impact on the quantum computing process, resulting in inefficient quantum circuit construction and optimization.

Method used

A quantum circuit optimization method based on a quantum approximate optimization algorithm is adopted. By obtaining the graph structure, it is decomposed into subgraphs based on a preset disassembly strategy, determining the optimizable edges, and using the optimizer for parallel execution to determine the optimal parameters of the quantum circuit. It includes a two-stage optimization algorithm: the first stage optimizes the quantum circuit based on the disassembly strategy and circuit routing rules, and the second stage uses the optimizer and parallel computing to optimize the parameters.

Benefits of technology

It improves the efficiency and applicability of quantum approximate optimization algorithms in solving combinatorial optimization problems, reduces the number of quantum gates, improves computational efficiency and accuracy, enhances the flexibility and adaptability of the algorithm, and enables finding the optimal solution more quickly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120706591A_ABST
    Figure CN120706591A_ABST
Patent Text Reader

Abstract

The invention provides a quantum line optimization method and system based on a quantum approximate optimization algorithm. The quantum line optimization method comprises the steps of obtaining a graph structure; based on a preset disassembly strategy, decomposing the obtained graph structure to obtain one or more sub-graphs; based on a preset line routing rule, determining optimizable edges in each sub-graph; determining a quantum circuit according to the sub-graph and optimizable edges; and based on the optimizer, the plurality of processors execute in parallel, the optimal parameters of the quantum circuit are determined, and an optimized quantum circuit is obtained. The method is used for efficient optimization of a complex graph structure, and the efficiency and applicability of a quantum approximate optimization algorithm in solving the combinatorial optimization problem are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of quantum computing, and in particular to a quantum circuit optimization method and system based on a quantum approximate optimization algorithm. Background Art

[0002] Quantum computing, an emerging computing paradigm, is gradually demonstrating its enormous potential compared to classical computing. It utilizes the quantum bit (qubit) as the fundamental computing unit and, through properties such as quantum superposition and entanglement, enables exponential parallel processing capabilities and information growth. This capability enables quantum computing to overcome the performance bottlenecks of traditional computing frameworks when handling highly complex and large-scale data processing tasks, bringing new solutions to multiple key areas.

[0003] Solving combinatorial optimization problems is a key area of ​​research in quantum computing. The Max-Cut problem, a key NP-hard combinatorial optimization problem, seeks to partition a graph's nodes into two subsets while maximizing the number of severed edges (or edge weights). This type of problem has widespread application in fields such as finance, logistics, and communications.

[0004] However, solving combinatorial optimization problems such as Max-Cut faces enormous challenges. Traditional computer algorithms have difficulty finding the optimal solution in polynomial time, but quantum computing provides a possible solution. As an important algorithm in quantum computing, the Quantum Approximate Optimization Algorithm (QAOA) approximates the optimal solution of combinatorial optimization problems through parameterized quantum circuits. The core of the quantum approximate optimization algorithm is to utilize the characteristics of quantum superposition and phase rotation to transform complex combinatorial optimization problems into energy minimization tasks in quantum circuits, and adjust the parameters in the quantum circuits through classical optimizers to find the optimal solution.

[0005] Although quantum approximate optimization algorithms have shown great potential in solving combinatorial optimization problems, they still face many challenges in practical applications. First, when faced with graph-structured problems with a large number of quantum bits, existing optimization strategies often fail to fully utilize the potential of hardware resources, resulting in low efficiency when searching for and optimizing quantum circuits. Second, when dealing with multiple graph-structured problems, efficiently finding optimizable edges to reduce the number of CNOT gates is key to improving algorithm efficiency and enhancing circuit stability. In addition, in the context of the NISQ (Noisy Intermediate-Scale Quantum) era, the choice of different classical optimizers has a particularly significant impact on the quantum computing process. How to select a classical optimizer that matches the characteristics of the problem to improve the optimization accuracy of parameters and the speed of quantum circuit generation is also an urgent problem to be solved. Summary of the Invention

[0006] To address at least one of the above technical problems, the present disclosure provides a quantum circuit optimization method and system based on a quantum approximate optimization algorithm, which is used to efficiently optimize complex graph structures and improve the efficiency and applicability of the quantum approximate optimization algorithm in solving combinatorial optimization problems.

[0007] This disclosure is implemented using the following technical solutions:

[0008] In one aspect, the present disclosure provides a quantum circuit optimization method based on a quantum approximate optimization algorithm, comprising:

[0009] Get the graph structure;

[0010] Based on the preset disassembly strategy, decompose the acquired graph structure to obtain one or more subgraphs;

[0011] Based on the preset routing rules, determine the edges that can be optimized in each subgraph;

[0012] Determining a quantum circuit according to the subgraph and the optimizable edges;

[0013] Based on the optimizer, multiple processors execute in parallel to determine the optimal parameters of the quantum circuit and obtain an optimized quantum circuit.

[0014] The beneficial effect of the above scheme is: the present disclosure achieves efficient optimization of complex graph structures by obtaining the graph structure, disassembling and searching the path based on a preset strategy to determine the quantum circuit, and using the optimizer to optimize the parameters in parallel, thereby improving the efficiency and applicability of the quantum approximate optimization algorithm in solving combinatorial optimization problems.

[0015] Optionally, the graph structure includes: a connected graph structure without branches, a connected graph structure with branches, or a non-connected graph structure;

[0016] Each independent part in the non-connected graph structure is a subgraph.

[0017] The beneficial effect of the above scheme is that the present disclosure covers multiple graph structure types such as connected branchless graphs, connected branched graphs and non-connected graphs, so that the optimization method can be applied to a wider range of scenarios, thereby improving the versatility and flexibility of the optimization method.

[0018] Optionally, the preset disassembly strategy includes:

[0019] In response to the graph structure being a connected branchless graph structure, each loop in the graph structure is regarded as a subgraph;

[0020] In response to the graph structure being a connected branched graph structure, each branch in the graph structure is regarded as a subgraph;

[0021] In response to the graph structure being a non-connected graph structure, the free nodes in the graph structure are taken as a subgraph, the free branches in the graph structure are taken as a subgraph, and the remaining part of the graph structure is taken as a connected branchless graph structure or a connected branched graph structure.

[0022] Optionally, the preset disassembly strategy also includes:

[0023] When the remaining part is a connected branchless graph structure, each loop in the remaining part is regarded as a subgraph;

[0024] When the remaining part is a connected branched graph structure, each branch in the remaining part is regarded as a subgraph.

[0025] The beneficial effect of the above solution is that the present disclosure sets a corresponding disassembly strategy according to the type of graph structure, ensuring that each subgraph can accurately reflect some structural features of the original graph, providing a basis for subsequent optimization steps.

[0026] Optionally, the preset route finding rule includes: traversing each subgraph, wherein traversing each subgraph includes:

[0027] Adding the untraversed nodes in the subgraph and the distances between the untraversed nodes and the preset starting node to the remaining set;

[0028] A maximum value method is adopted to determine the starting node from the remaining set, and the nodes in the remaining set are traversed. The traversed nodes and the distances between the traversed nodes and the preset starting node are added to the shared set, the starting node is deleted from the remaining set, and the distances between all untraversed nodes in the remaining set and the preset starting node are updated using a reduction method, wherein the preset starting node is used as the new starting node.

[0029] The beneficial effect of the above solution is that the present disclosure not only determines the edges that can be optimized by traversing each subgraph, but also saves the number of quantum gates.

[0030] Optionally, the preset line routing rules include:

[0031] After traversing each subgraph, updates are performed based on the distance relationship between adjacent nodes in the shared set, including:

[0032] If the distance between any node v' and its adjacent nodes shows an increasing trend, then the edge between node v' and its adjacent nodes is an optimizable edge;

[0033] If the distances between any node v' and its adjacent nodes are all 0, the node v' is a free node, and the free node is deleted.

[0034] If the distance between any node v' and its adjacent nodes is decreasing and the distance is greater than 0, then start searching from the node v' in the shared set and determine the first node V0 whose distance is less than that of the node v'. v' is the branch of the node V0, and the edge between the node v' and its adjacent nodes is the optimizable edge.

[0035] The beneficial effect of the above solution is that the present disclosure refines the route routing rules, including processing increasing and decreasing distance relationships and deleting free nodes, further improving the accuracy and efficiency of routing.

[0036] Optionally, determining a quantum circuit according to the subgraph and the optimizable edges includes:

[0037] Determine one or more quantum subcircuits according to each of the subgraphs, and delete the first CNOT gate in the quantum subcircuit corresponding to the optimizable edge to obtain an optimized quantum subcircuit;

[0038] Each optimized quantum sub-circuit is integrated to obtain a quantum circuit.

[0039] Wherein, in the quantum subcircuit, according to the arrangement order of quantum gates, the first CNOT gate that appears is the first CNOT gate.

[0040] The beneficial effect of the above scheme is that the present disclosure optimizes the quantum circuit by determining the quantum subcircuit according to the subgraph and deleting the first CNOT gate in the quantum subcircuit corresponding to the optimizable edge, thereby reducing the number of quantum gates and the complexity of quantum computing.

[0041] Optionally, the optimizer-based, multiple processors executing in parallel to determine the optimal parameters of the quantum circuit includes:

[0042] Initialize the parameters and repeat the following steps until the convergence condition is met:

[0043] Convert the optimization problem into the expected value of the quantum circuit and determine the parameter-based expectation function;

[0044] Determining an approximate gradient of the optimizer according to the expectation function based on a finite difference method;

[0045] The parameters are updated according to the approximate gradient of the optimizer.

[0046] The beneficial effect of the above solution is that the present disclosure utilizes an optimizer and a parallel processor to improve the speed and convergence of parameter optimization, so that the quantum approximate optimization algorithm can find the optimal solution more quickly.

[0047] Optionally, the optimizer-based, multiple processors executing in parallel to determine the optimal parameters of the quantum circuit includes:

[0048] During each iteration, the loss function value of the current iteration is determined based on the maximum expected value among multiple processors;

[0049] After the convergence conditions are met, the parameter with the maximum number of iterations corresponding to all loss function values ​​is taken as the optimal parameter.

[0050] The beneficial effect of the above scheme is that the present disclosure determines the loss function value through each iteration, and takes the parameter corresponding to the maximum value as the optimal solution after the convergence condition is met, thereby ensuring the accuracy and reliability of the optimization result.

[0051] In a second aspect, the present disclosure provides a quantum circuit optimization system based on a quantum approximate optimization algorithm, comprising:

[0052] Acquisition module, used to obtain graph structure;

[0053] A disassembly module is used to decompose the acquired graph structure based on a preset disassembly strategy to obtain one or more subgraphs;

[0054] The edge optimization module is used to determine the edges that can be optimized in each subgraph based on the preset path finding rules;

[0055] A quantum circuit optimization module, configured to determine a quantum circuit based on the subgraph and the optimizable edges;

[0056] The parameter optimization module is used to determine the optimal parameters of the quantum circuit based on the optimizer and multiple processors executing in parallel to obtain the optimized quantum circuit.

[0057] The beneficial effect of the above scheme is that the present disclosure integrates the acquisition module, disassembly module, edge optimization module, quantum circuit optimization module and parameter optimization module, realizes the automation and integration of the optimization process based on the quantum approximate optimization algorithm, and improves the efficiency and operability of the optimization process.

[0058] Compared with the prior art, the beneficial effects of the present disclosure include at least:

[0059] The present disclosure can solve large-scale combinatorial optimization problems that are difficult for traditional computers to handle by optimizing quantum circuits and parameters. Specifically, by adopting preset disassembly strategies and circuit routing rules, adjustments can be made according to different graph structures and optimization requirements, thereby enhancing the flexibility and adaptability of the algorithm. By determining quantum circuits based on subgraphs and optimizable edges, the structure of quantum circuits can be designed more accurately, thereby more effectively utilizing quantum resources, reducing redundancy and unnecessary operations in quantum computing, and improving the efficiency and accuracy of quantum computing. Using an optimizer to determine the parameters of the quantum circuit can more quickly find the global optimal solution or approximate optimal solution, thereby improving the performance of the algorithm. By using multiple processors to execute in parallel to determine the parameters of the quantum circuit, the computing speed and efficiency of the optimization process are significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 This is a flow chart of a quantum circuit optimization method based on a quantum approximate optimization algorithm according to an embodiment of the present disclosure.

[0061] Figure 2 This is another flowchart of the quantum circuit optimization method based on the quantum approximate optimization algorithm in an embodiment of the present disclosure.

[0062] Figure 3 This is a workflow diagram of the optimizer according to an embodiment of the present disclosure.

[0063] Figure 4 It is a structural diagram of a graph structure of an embodiment of the present disclosure.

[0064] Figure 5 It is a structural schematic diagram of a subgraph of an embodiment of the present disclosure.

[0065] Figure 6 The present invention discloses a comparison chart of the efficiency of quantum circuit optimization methods using a disassembly strategy and not using a disassembly strategy.

[0066] Figure 7 A graph showing the noise immunity and performance stability of the SPSA optimizer according to an embodiment of the present disclosure.

[0067] Figure 8 A graph showing the noise resistance and performance stability of the POWELL optimizer according to an embodiment of the present disclosure.

[0068] Figure 9 A graph showing the noise immunity and performance stability of the COBYLA optimizer according to an embodiment of the present disclosure.

[0069] Figure 10 A graph showing the SPSA optimizer in accordance with an embodiment of the present disclosure before and after combining it with a parallel computing optimization strategy.

[0070] Figure 11 Another graph of the SPSA optimizer in an embodiment of the present disclosure before and after combining with the parallel computing optimization strategy.

[0071] Figure 12 The present disclosure uses a quantum circuit diagram before the two-stage optimization strategy.

[0072] Figure 13 The present disclosure uses a quantum circuit diagram after a two-stage optimization strategy.

[0073] Figure 14 Quantum circuit diagram of the SPSA optimizer under noisy conditions according to an embodiment of the present disclosure.

[0074] Figure 15 A schematic diagram of a quantum circuit optimization system based on a quantum approximate optimization algorithm according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0075] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. Identical reference numerals in the figures represent identical or similar structures, and thus repeated descriptions thereof will be omitted.

[0076] The words expressing positions and directions described in this disclosure are all explained with reference to the accompanying drawings as examples, but can be modified as needed, and all such modifications are included within the scope of protection of this disclosure.

[0077] The main problems with the current optimization of quantum approximate optimization algorithms are: (1) When faced with graph structure problems with a large number of quantum bits, existing optimization strategies often fail to fully utilize the potential of hardware resources, resulting in low efficiency in quantum circuit construction and optimization. (2) When the quantum part of the quantum approximate optimization algorithm is constructed based on the Ansatz circuit, how to efficiently handle multiple graph structure problems and reduce the number of CNOT gates is the key to improving algorithm efficiency and enhancing circuit stability. (3) The choice of different classical optimizers has a particularly significant impact on the quantum computing process. The parallel strategies in the current quantum computing framework are often universal. If they are directly applied to complex problems without proper subdivision and adaptation, the optimization effect will be greatly reduced.

[0078] To achieve efficient optimization of complex graph structures and improve the efficiency and applicability of quantum approximate optimization algorithms in solving combinatorial optimization problems, the present disclosure provides a quantum circuit optimization method based on a quantum approximate optimization algorithm, comprising: obtaining a graph structure; decomposing the obtained graph structure based on a preset decomposition strategy to obtain one or more subgraphs; determining optimizable edges in each subgraph based on preset circuit routing rules; determining quantum circuits based on the subgraphs and optimizable edges; and determining optimal parameters of the quantum circuit using multiple processors executed in parallel by an optimizer to obtain an optimized quantum circuit.

[0079] The quantum circuit optimization method disclosed in the present invention based on the quantum approximate optimization algorithm includes a two-stage optimization algorithm, referring to Figure 2 and Figure 3 .

[0080] The quantum circuit optimization method based on the quantum approximate optimization algorithm disclosed in the present invention includes:

[0081] Step S1: Obtaining a graph structure, wherein the graph structure is a graph structure of a quantum circuit, formed by some intersecting lines and nodes (i.e., quantum gates or quantum bits).

[0082] Step S2: Based on a preset decomposition strategy, decompose the acquired graph structure to obtain one or more subgraphs.

[0083] Step S3: Based on the preset routing rules, determine the edges that can be optimized in each subgraph.

[0084] refer to Figure 4 and Figure 5 , edges are the connections between nodes (i.e. quantum gates or quantum bits).

[0085] Step S4: Determine a quantum circuit based on the subgraph and the optimizable edges.

[0086] Step S5: Based on the optimizer, multiple processors execute in parallel to determine the optimal parameters of the quantum circuit and obtain an optimized quantum circuit.

[0087] The present disclosure achieves efficient optimization of complex graph structures by acquiring graph structures, disassembling and searching paths based on preset strategies to determine quantum circuits, and utilizing an optimizer to optimize parameters in parallel. This improves the efficiency and applicability of quantum approximate optimization algorithms in solving combinatorial optimization problems.

[0088] The first stage determines the quantum circuit using a routing rule based on a disassembly strategy: When solving the maximum cut problem using a quantum approximate optimization algorithm, a routing rule based on a disassembly strategy is used as a preprocessing step. This optimization method decomposes the graph structure and combines it with routing rules to reduce the number of CNOT gates and operational errors in the quantum circuit, thereby simplifying the problem complexity and improving computational efficiency. This first stage of optimization generates a preliminarily optimized quantum circuit, providing a foundation for subsequent parameter adjustments.

[0089] The second phase uses an optimizer and parallel computing to determine the parameters of the quantum circuit to optimize the quantum circuit. Based on the initially optimized quantum circuit, the optimizer is combined with parallel computing to optimize the parameters. This two-phase optimization further determines the key parameters of the quantum approximate optimization algorithm, improving its overall performance and practicality.

[0090] refer to Figure 1 Specifically, the first stage includes steps S1 to S4; the second stage includes step S5.

[0091] Step S1: Obtain the graph structure.

[0092] Specifically, refer to Figure 4 Graph structures include: (a) connected graph structure without branches, (b) connected graph structure with branches, or (c) disconnected graph structure. In the disconnected graph structure, each independent part is a subgraph.

[0093] Step S2: Based on a preset decomposition strategy, decompose the acquired graph structure to obtain one or more subgraphs.

[0094] When using QAOA to solve graph-structured problem nodes, a pre-defined decomposition strategy is employed to decompose complex graph structures into multiple, easily manageable subgraphs. This decomposition process is based on the connectivity and structural characteristics of the graph, ensuring that each subgraph is an interconnected yet relatively independent, optimizable circuit.

[0095] Specifically, refer to Figure 5 In the process of generating quantum circuits, quantum circuits sum =Circuit1+Circuit2+…+Circuit m , where m is the number of subgraphs after decomposition. Quantum circuit design involves constructing a spanning tree that covers all nodes (i.e., quantum gates or qubits) in the graph structure without any loops, thereby preserving as many non-loop edges as possible and optimizing the quantum circuit structure.

[0096] In some embodiments of the present disclosure, specifically, step S2 includes: step S21-step S23. Optionally, step S23 includes: step S231-step S232.

[0097] Step S21: In response to the graph structure being a connected branchless graph structure, each loop in the graph structure is regarded as a subgraph.

[0098] Specifically, if the graph structure is a branchless graph structure in a connected graph, it is disassembled according to the cyclic path (i.e., loop) in the graph structure, and each independent loop is regarded as a subgraph.

[0099] Step S22: In response to the graph structure being a connected branched graph structure, each branch in the graph structure is regarded as a subgraph.

[0100] Specifically, if the graph structure is a connected graph with branches, it should be disassembled according to the branches in the graph structure, and each branch should be regarded as an independent subgraph.

[0101] Step S23: In response to the graph structure being a non-connected graph structure, the free nodes in the graph structure are treated as a subgraph, the free branches in the graph structure are treated as a subgraph, and the remaining part of the graph structure is treated as a connected non-branching graph structure or a connected branching graph structure.

[0102] Specifically, if the graph structure is a non-connected graph structure, each independent connected part is regarded as a subgraph, and isolated points are also treated as separate subgraphs, and then split and refined according to the disassembly strategy of the connected graph.

[0103] Specifically, treating the remaining portion of the graph structure as a connected branchless graph structure or a connected branched graph structure includes: step S231: when the remaining portion is a connected branchless graph structure, treating each loop in the remaining portion as a subgraph. Step S232: when the remaining portion is a connected branched graph structure, treating each branch in the remaining portion as a subgraph.

[0104] Step S3: Based on the preset routing rules, determine the edges that can be optimized in each subgraph.

[0105] Specifically, each subgraph is traversed and optimized to identify edges that can be optimized, and multi-processor devices are used for parallel processing to improve efficiency. For example, the search and optimization tasks of multiple subgraphs can be assigned to different processors for parallel processing, which accelerates the optimization process and improves overall computational efficiency.

[0106] In some embodiments of the present disclosure, inter-process shared variables are used to record visited nodes to prevent duplicate access. Furthermore, a summary table is introduced to store optimized information for each subgraph, ensuring that quantum circuits are constructed based on the optimized results.

[0107] In some embodiments of the present disclosure, step S3 includes steps S31 and S32.

[0108] Step S31: traverse each subgraph.

[0109] Construct a shared set Visited to record the nodes visited and the distances from the visited nodes to the starting node. Specifically, for example, the shared set is Visited[(vertex1, distance1)], and initialize the shared set to an empty set, where vertex1 represents the visited node and distance1 represents the distance from the visited node to the starting node.

[0110] Construct the remaining set Remain to record unvisited nodes and the distances from these unvisited nodes to the current starting node. Specifically, set up a hash table Remain{vertex2, distance2}, where vertex2 represents an unvisited node and distance2 represents the distance from the unvisited node to the first node in the shared set Visited. During initialization, the first node in the shared set Visited is set to the preset starting node, and distance2 is set to -∞.

[0111] Specifically, a hash table or a dictionary may be used to implement the shared set Visited and the remaining set Remain.

[0112] In some embodiments of the present disclosure, step S31 includes: steps S311-S312.

[0113] Step S311: adding the untraversed nodes in the subgraph and the distances between the untraversed nodes and the preset starting node to the remaining set Remain.

[0114] Step S312: Use the maximum value method to determine the starting node V from the remaining set Remain, and start traversing the nodes in the remaining set Remain: add the traversed nodes and the distances between the traversed nodes and the preset starting nodes to the shared set Visited, delete the starting node V from the remaining set Remain, and use the reduction method to update the distances between all untraversed nodes in the remaining set Remain and the preset starting node, wherein the preset starting node is used as the new starting node V, and the reduction method can be reduceV(Visited, Remain).

[0115] Specifically, use the maximum method to select the node V with the largest distance as the starting node of the current traversal (if the distances are equal, the first one is selected). The maximum method can be getMax(Remain). Next, update the shared set Visited and the remaining set Remain: For each node V, use the reduceV(Visited, Remain) method to update the distances of all nodes in the remaining set Remain to the first node in the shared set Visited. Repeat the above steps until the remaining set Remain is empty.

[0116] In some embodiments of the present disclosure, the distances from all nodes in the remaining set Remain to the newly selected starting node are updated.

[0117] Step S32: After traversing each subgraph (ie, after completing steps S311 - S312 ), update the distance relationship between adjacent nodes in the shared set Visited.

[0118] In some embodiments of the present disclosure, step S32 includes: steps S321-S323.

[0119] Step S321: If the distance between any node v' and its adjacent node is increasing, the edge between the node v' and its adjacent node is an optimizable edge.

[0120] Step S322: If the distances between any node v' and its adjacent nodes are all 0, the node v' is a free node, and the free node is deleted.

[0121] Step S323: If the distance between any node v' and its adjacent node is decreasing and the distance is greater than 0, then start searching from the node v' in the shared set and determine the first node V0 whose distance is less than that of the node v'. v' is a branch of the node V0, and the edge between the node v' and its adjacent node is an optimizable edge.

[0122] Specifically, a search less than method is used to search forward for the first node V0 in the shared set Visited whose distance is less than the node v'. The search less than method may be searchLess().

[0123] Step S4: Determine a quantum circuit based on the subgraph and the optimizable edges.

[0124] Specifically, the results of step S32 are stored in a task list, and these results are analyzed to determine which edges are optimizable, thereby reducing the number of CNOT gates and operational errors in the quantum circuit, simplifying the problem complexity, and improving computational efficiency. In some embodiments of the present disclosure, a list or dictionary (such as optV) is used to store the optimized information of each subgraph.

[0125] In some embodiments of the present disclosure, step S4 includes: step S41 - step S42.

[0126] Step S41: Map each of the subgraphs to one or more quantum subcircuits, and delete the first CNOT gate in the quantum subcircuit corresponding to the optimizable edge in the subgraph to obtain an optimized quantum subcircuit. In the mapped quantum subcircuit, the first CNOT gate that appears in the order of quantum gates is the first CNOT gate.

[0127] Specifically, each subgraph is mapped to one or more quantum subcircuits. In the resulting quantum subcircuits, the first CNOT gate that appears is found according to the order of quantum gates. For each optimizable edge in the subgraph, the first CNOT gate in its corresponding quantum subcircuit is deleted to reduce the number of CNOT gates and thus the operational error.

[0128] At the same time, we use the inter-process shared set Visited to record visited nodes, preventing duplicate visits and unnecessary computational redundancy. We use optV to centrally store the optimized information of each subgraph, including all optimized edges, to ensure that quantum circuits can be constructed based on the optimized results.

[0129] In some embodiments of the present disclosure, specifically, when adding a new circuit structure, if an optimizable edge already exists in optV, the first CNOT gate in the circuit corresponding to the edge can be directly deleted, thereby simplifying the quantum subcircuit and reducing unnecessary quantum gate operations.

[0130] Step S42: Fusing each optimized quantum sub-circuit to obtain a quantum circuit.

[0131] Specifically, the optimized quantum subcircuits are fused according to the optimization information stored in the list or dictionary. During the fusion process, if the optimizable edge already exists in the list or dictionary, the first CNOT gate in the circuit corresponding to the edge is directly deleted.

[0132] In some embodiments of the present disclosure, a preliminarily optimized quantum circuit is obtained by fusing all optimized quantum subcircuits, and serves as a basis for subsequent parameter adjustments.

[0133] Step S5: Based on the optimizer, multiple processors execute in parallel to determine the parameters of the quantum circuit and obtain an optimized quantum circuit.

[0134] In quantum circuits, the parameters of the quantum circuit are parameter vectors (such as the rotation angle of a quantum gate). The setting of these parameter vectors affects the evolution of the Hamiltonian and ultimately determines the performance of quantum approximate optimization algorithms and the quality of the solutions. However, in the initial stages, the parameter vectors are unknown and are determined through the optimization process.

[0135] The optimizer is an optimization algorithm suitable for large-scale, high-noise optimization problems, which can optimize the expected function by stochastic approximation gradient. Since each iteration only requires a finite number of evaluations of the expected function, the optimizer is suitable for noisy intermediate-scale quantum (NISQ) devices and noisy quantum simulators. The present disclosure utilizes an optimizer to perform optimization tasks in parallel on multiple processors to quickly determine the optimal parameter vector of the quantum circuit, thereby obtaining an optimized quantum circuit. Preferably, parameter vectors for different rotation angles are calculated separately on different processors to improve efficiency. When using multiple processors for parallel processing, effective communication and precise synchronization between processors are ensured to avoid erroneous results caused by inconsistent data or asynchronous processing steps.

[0136] During the iterative process of the optimizer, the parameter vector will be updated as the optimization variable to minimize or maximize the expectation function (i.e., the cost function of QAOA).

[0137] Specifically, based on the input graph structure, a QAOA circuit can be constructed and the quantum operations to be performed can be specified. For example, an initial H-gate (Hadamard gate) is used to prepare a uniform superposition state. In subsequent iterations, controlled phase rotations (usually related to the γ parameter) are performed on each edge, while single-qubit X rotations (usually related to the β parameter) are performed on all qubits. These rotation angles are determined by the parameters β and γ.

[0138] In some embodiments of the present disclosure, specifically, step S5 includes steps S51 and S52. Further, step S5 includes steps S53 and S54.

[0139] Step S51: Initialize the parameter vector, and loop through the following steps (eg, step S52: loop steps) until the convergence condition is met.

[0140] The optimizer's initial learning rate a0 and initial perturbation coefficient c0 are set, and each parameter θ is randomly assigned an initial parameter vector Θ0. The quantum gate rotation angle parameters γ and β can be set based on the parameter vector. Furthermore, during each iteration, a perturbation vector Δ is randomly generated. The perturbation vector consists of two elements, each controlled by a scalar and can be positive or negative.

[0141] Step S52: a loop step. Step S52 includes steps S521 to S523.

[0142] Step S521: convert the optimization problem into the expected value of the quantum circuit, and use the quantum circuit to calculate the expected function corresponding to the parameter vector.

[0143] (1) Based on the randomly generated disturbance vector, calculate the positive disturbance parameter vector and the negative disturbance parameter vector.

[0144] For example, if the current parameter vector is Θ, then Θ - is the parameter vector of negative perturbation, Θ + is the parameter vector of the forward perturbation. Then, according to the rules of SPSA, the operation of the parameter vector is as follows:

[0145] Θ=[θ0,θ1]

[0146] Δ=[δ0,δ1]

[0147] Θ + =Θ+Δ=[θ0+δ0,θ1+δ1]

[0148] Θ - =Θ-Δ=[θ0-δ0,θ1-δ1]

[0149] Where θ0 is the vector parameter of the quantum gate rotation angle γ, θ1 is the vector parameter of the quantum gate rotation angle β, and δ0 and δ1 are randomly generated perturbation values.

[0150] (2) Calculate the expected function values ​​corresponding to the positive perturbation parameter vector and the negative perturbation parameter vector.

[0151] F(Θ - )=<ψ(Θ - )|H|ψ(Θ - )>

[0152] F(Θ + )=<ψ(Θ + )|H|ψ(Θ + )>

[0153] In the formula, F(Θ - ) is the expected function value corresponding to the parameter vector of negative disturbance, ψ(Θ - ) is, H is the Hamiltonian function; F(Θ + ) is the expected function value corresponding to the forward perturbation parameter vector, ψ(Θ + ) is the state obtained by the negative perturbation parameterized quantum circuit acting on the quantum state, ψ(Θ + ) is the state obtained by the forward perturbation quantum circuit acting on the quantum state.

[0154] Step S522: Based on the finite difference method, determine the approximate gradient of the optimizer according to the expectation function corresponding to the parameter vector.

[0155] Specifically, to avoid the inefficiency of directly calculating the true gradient of the expectation function, a finite difference method is used to jointly approximate the gradient based on the expected function value corresponding to the parameter vector using the difference between positive and negative perturbations. Specifically, assuming that there are q processor devices available, each representing an independent work unit, in parallel computing, the same random perturbation is applied to each processor device. The expected function obtained on each processor device is evaluated and compared. The maximum expected function among the q processor devices in each iteration is selected as a reference to determine the direction of the next parameter vector update.

[0156] In some embodiments of the present disclosure, specifically, to reduce computational complexity and achieve effective estimation of the gradient of a high-dimensional parameter vector, SPSA uses the difference between the expected function under positive perturbation and the expected function under negative perturbation to jointly approximate the approximate gradient of the optimizer, including the following formula:

[0157]

[0158] Where g is the approximate gradient of the optimizer, c is the perturbation coefficient of the optimizer, preferably, is the learning rate during the current number of iterations, x is the number of processor devices, q is the number of processor devices executed in parallel, and F(Θ x+ ) is the expected function value corresponding to the parameter vector of the forward perturbation in the processor device numbered x, F(Θ x- ) is the expected function value corresponding to the parameter vector of the negative disturbance in the processor device numbered x, is the maximum F(Θ) among q processor devices x+ ), is the maximum F(Θ) among q processor devices x- ).

[0159] Step S523: Update the parameter vector according to the approximate gradient of the optimizer.

[0160] Specifically, the parameter vector is updated according to the approximate gradient of the optimizer, which includes the following formula:

[0161] Θ i+1 =Θ i +a×g

[0162] Where i is the current iteration number, Θ i is the parameter vector in the i-th iteration process, Θ i+1 is the parameter vector in the i+1th iteration process, a is the learning rate of the optimizer, and preferably, is the learning rate in the i-th iteration process.

[0163] In some embodiments of the present disclosure, specifically, as the iteration proceeds, the learning rate and the perturbation coefficient are gradually reduced to ensure that the algorithm converges, specifically including the following formula:

[0164] a i =a0 / (i+1) decay

[0165] c i =c0 / (i+1) decay

[0166] In the formula, a0 is the initial learning rate, c0 is the initial perturbation coefficient, and a i is the learning rate during the i-th iteration, c i is the perturbation coefficient in the i-th iteration process, and decay is the decay rate.

[0167] Step S53: During each iteration, the loss function value of the current iteration is calculated according to the maximum expected value of the function among the multiple processors.

[0168] (1) Parallel processing: In the process of executing the parallel processing strategy, each iteration calculates the maximum expected value of the function in multiple processors as the loss function value of the current iteration.

[0169]

[0170] Where, f i is the loss function value of the i-th iteration process, is the maximum F(Θ) among the q processor devices in the i-th iteration x- ), is the maximum F(Θ) among the q processor devices in the i-th iteration x+ ).

[0171] (2) Loss set: Add the loss function values ​​in all iterations to a set for subsequent analysis.

[0172] T={f1,f2,…,f i} i∈I

[0173] Where T is the loss set and I is the total number of iterations.

[0174] Step S54: After the convergence condition is met, the parameter vector of the number of iterations corresponding to the maximum value of all loss function values ​​is taken as the optimal parameter vector of the quantum approximate optimization algorithm.

[0175] Specifically, after the convergence condition is met, the number of iterations corresponding to the maximum value is found from the loss set, and the parameter vector corresponding to the number of iterations is taken as the optimal parameter vector of the quantum approximate optimization algorithm. In some embodiments of the present disclosure, the optimized quantum circuit is obtained by combining the quantum circuit determined in step S42 and the parameter vector selected in step S54.

[0176] This paper selected an open-source quantum computing programming framework as a verification platform. The framework consists of four core components, each with different functions, which together build a quantum computing system.

[0177] Core 1: As the foundational component of the framework, Core 1 provides all the essential tools needed to build and operate quantum circuits. Using programming languages ​​like Python, developers can easily build quantum circuits, including defining quantum registers, adding various logic gates (such as Hadamard and Pauli-X gates), and setting the initial state and measurement operations.

[0178] The second core component, the simulator component of the framework, provides a variety of simulators for simulating the operation of quantum circuits. The state vector simulator is a particularly powerful tool, accurately simulating the output of quantum circuits and allowing developers to intuitively observe the state changes of qubits. The state vector simulator enables in-depth exploration of the operational details of qubits and the complex evolution of quantum states within quantum circuits.

[0179] The third core component is generally related to quantum chemistry and quantum materials science, providing advanced algorithms and tools for quantum chemical simulations.

[0180] The fourth core component focuses on error mitigation and correction technology for quantum computing. It provides a series of tools and algorithms to detect and correct errors in quantum computing, thereby improving the accuracy and reliability of quantum computing.

[0181] This paper uses a quantum approximate optimization algorithm to solve the maximum cut problem and verifies the effectiveness of the two-stage optimization strategy through a framework, which is conducive to improving the efficiency of quantum circuit mapping. Specifically:

[0182] (1) Circuit Design: For the maximum cut problem, a corresponding circuit is designed. The circuit contains multiple parameterized quantum gates and is used to search for the optimal solution in the quantum state space. The circuit can be an Ansatz circuit, and the maximum cut problem can be a Max-Cut problem.

[0183] (2) Two-stage optimization strategy: In the first stage, the parameters in the circuit in (1) are optimized to approach the optimal solution; in the second stage, attention is paid to the mapping efficiency of the quantum circuit, and the computational complexity is reduced by improving the circuit structure or adopting a disassembly strategy.

[0184] (3) Framework Verification: Using the framework’s simulation capabilities, we conducted an experimental comparison in a computing environment with three logical processor cores. By comparing whether or not to adopt the disassembly strategy, we evaluated its impact on computing time.

[0185] Experimental results show that as the number of qubits increases, the computation time also increases. However, after adopting the disassembly strategy, the computation time is significantly reduced. Figure 6 It can be seen that without the disassembly strategy, the time required was as high as 141.21 seconds at 1500 bits. With the disassembly strategy, the time required was only 64.44 seconds at the same number of bits, a speed increase of 2.2 times, greatly improving the quantum circuit mapping efficiency of the quantum approximate optimization algorithm.

[0186] This paper evaluates the noise immunity of the SPSA optimizer in a noisy environment and compares it with the POWELL optimizer and the COBYLA optimizer. Specifically:

[0187] (1) Selection of noise model: The experiment selected Fake Bogota noise as the noise model in the simulation environment. This noise model can simulate the noise conditions that may be encountered in actual quantum computing.

[0188] (2) Optimizer Settings: The SPSA optimizer, POWELL optimizer, and COBYLA optimizer were tested in the same noise simulation environment. These optimizers were configured to handle the same optimization problem for fair comparison.

[0189] (3) Data collection and analysis: In each iteration, the change trend of the original value of each optimizer is recorded, and the difference between the number of iterations and the average number of total iterations is calculated.

[0190] The framework of the present disclosure is the Qiskit framework.

[0191] Experimental results show that the SPSA optimizer has significant advantages in noise resistance compared to other optimizers (such as the POWELL optimizer). The SPSA optimizer exhibits high stability and convergence performance in noisy environments. Figure 7 It can be seen that the curve shows high stability, indicating that the SPSA optimizer can still maintain good convergence performance under noise interference; the fluctuation of the histogram is also minimal, further proving the noise resistance of the SPSA optimizer. Figure 8It can be seen that the curve fluctuates significantly, indicating that the POWELL optimizer is easily disturbed in a noisy environment, resulting in unstable convergence performance; the large differences in the histogram also reflect the unstable performance of the POWELL optimizer. Figure 9 It can be seen that the performance of the COBYLA optimizer is between SPSA and POWELL.

[0192] This paper combines the SPSA optimizer with a parallel computing optimization strategy and applies it to quantum bit perturbations in quantum approximate optimization algorithms. Specifically:

[0193] (1) Optimizer and strategy selection: The SPSA optimizer is selected as the main optimization tool and combined with the parallel computing optimization strategy to accelerate the calculation process and improve the optimization efficiency.

[0194] (2) Experimental setup: Three processor cores were used to perturb the 10-qubit and 20-qubit systems. The number of iterations was 20, and a total of 15 experiments were performed to ensure the stability and reliability of the results.

[0195] (3) Data collection and analysis: Record the changes in the expected value in each experiment and draw a curve chart to intuitively compare the changing trends of the expected value before and after executing parallel calculations.

[0196] Experimental results show that the SPSA optimizer, when combined with a parallel computing optimization strategy, can significantly improve the optimization efficiency of quantum bit perturbations in quantum approximate optimization algorithms. Through parallel computing, the expected value is significantly improved and is closer to the ideal target value, which is conducive to the stability and rapid convergence of the quantum approximate optimization algorithm. Figure 10-11 It can be seen that after using the parallel computing optimization strategy, the expected value is increased by an average of about 50%, and the curve is closer to the ideal target value. It can be seen that parallel computing significantly improves the optimization efficiency and is more conducive to the stability of the quantum approximate optimization algorithm.

[0197] This paper presents the impact of a two-stage optimization strategy on quantum circuits demonstrated by the framework's state vector simulator, as well as an application example of the SPSA optimizer under noisy conditions. Figure 12 and Figure 13 The quantum circuits before and after using the two-stage optimization strategy are presented under different depths and numbers of quantum bits. Figure 14 An application example of the SPSA optimizer in quantum circuit diagrams under noisy conditions is presented, verifying the effectiveness of the SPSA optimizer in quantum computing, especially its excellent performance in dealing with noise-sensitive problems.

[0198] Combine Figure 12 and Figure 13, for depth p = 1 and number of quantum bits n = 1 under noisy conditions, before optimization, the number of CNOT gates in the quantum circuit is large and the quantum circuit structure is relatively complex, resulting in low quantum computing efficiency and poor stability; after optimization, through a two-stage optimization strategy, the number of CNOT gates in the quantum circuit is significantly reduced, and the overall circuit structure becomes more compact and simple, which not only improves the efficiency of quantum computing, but also helps to improve the stability of the calculation.

[0199] In summary, this disclosure utilizes a quantum approximate optimization algorithm to solve quantum circuit optimization for the maximum cut problem. By introducing a decomposition strategy, the complex graph structure is split into multiple, manageable subgraphs. Pathfinding optimization techniques are then applied to each subgraph. The optimization results from each subgraph are then aggregated to obtain a set of optimizable edges, thereby reducing the number of CNOT gates and errors, thereby improving computational speed and accuracy. This disclosure utilizes the SPSA optimizer as its core. Experimental comparisons and analysis with the POWELL and COBYLA optimizers demonstrate that the SPSA optimizer exhibits excellent noise immunity, making it more suitable for real-world noisy quantum computing devices. Furthermore, this disclosure integrates parallel computing technology, enabling algorithmic tasks to be simultaneously assigned to multiple independent processors for iterative optimization, with the optimal result evaluated and selected as a reference. This method was validated in quantum simulation environments with 10 and 20 qubits. The parallel computing optimization strategy employed in this disclosure resulted in an average improvement of the expected value by approximately 50%, bringing the target closer. Furthermore, the two-stage optimization strategy disclosed in this paper: circuit routing optimization driven by the disassembly strategy and parallel computing optimization based on the optimizer, provides a new solution for solving quantum circuit optimization and quantum computing optimization problems, greatly enhancing the feasibility and reliability of quantum approximate optimization algorithms in practical applications, and laying a solid foundation for the practical application of quantum computing technology.

[0200] In some other embodiments, the graph structure of the present disclosure is a quantum circuit structure, and the subgraph is a sub-quantum circuit. The quantum circuit optimization method based on the quantum approximate optimization algorithm may further include steps SSA and SSE.

[0201] Step SSA: Obtain the quantum circuit structure.

[0202] Step SSB: Based on a preset disassembly strategy, decompose the obtained quantum circuit structure to obtain one or more sub-quantum circuits.

[0203] Step SSC: Based on the preset circuit routing rules, determine the optimizable edges in each sub-quantum circuit.

[0204] Step SSD: Determine a quantum circuit according to the sub-quantum circuit and the optimizable edges.

[0205] Step SSE: Based on the SPSA optimizer, multiple processors execute in parallel to determine the optimal parameters of the quantum circuit and obtain the optimized quantum circuit.

[0206] In some embodiments of the present disclosure, step SSB includes: step SSB1 to step SSB3. Optionally, step SSB includes: step SSB4 to step SSB5.

[0207] Step SSB1: In response to the quantum circuit structure being a connected branchless quantum circuit structure, each loop in the quantum circuit structure is regarded as a sub-quantum circuit.

[0208] Step SSB2: In response to the quantum circuit structure being a connected branched quantum circuit structure, each branch in the quantum circuit structure is treated as a sub-quantum circuit.

[0209] Step SSB3: In response to the quantum circuit structure being a non-connected quantum circuit structure, a free node in the quantum circuit structure is taken as a sub-quantum circuit, a free branch in the quantum circuit structure is taken as a sub-quantum circuit, and the remaining part of the quantum circuit structure is taken as a connected unbranched quantum circuit structure or a connected branched quantum circuit structure.

[0210] Step SSB4: When the remaining part is a connected branchless quantum circuit structure, each loop in the remaining part is regarded as a sub-quantum circuit diagram.

[0211] Step SSB5: When the remaining part is used as a connected branched quantum circuit structure, each branch in the remaining part is used as a sub-quantum circuit.

[0212] In some embodiments of the present disclosure, step SSC includes: step SSC1 - step SSC2.

[0213] Step SSC1: traverse each sub-quantum circuit.

[0214] Specifically, step SSC1 includes: adding the untraversed nodes in the sub-quantum circuit and the distances between them and the preset starting node to the Remain set; using the getMax(Remain) method to determine the starting node V from the Remain set, and starting to traverse the nodes in the Remain set: adding the traversed nodes and the distances between them and the preset starting node to the shared set, deleting the starting node V from the Remain set, and using the reduceV(Visited, Remain) method to update the distances between all untraversed nodes in the Remain set and the preset starting node, wherein the preset starting node is used as the new starting node.

[0215] Step SSC2: After traversing each sub-quantum circuit, according to the distance relationship between adjacent nodes in the shared set.

[0216] Specifically, if the distance between any node v' and its adjacent nodes is increasing, then the edge between node v' and its adjacent nodes is an optimizable edge; if the distance between any node v' and its adjacent nodes is 0, then the node v' is a free node and the free node is deleted. If the distance between any node v' and its adjacent nodes is decreasing and the distance is greater than 0, then the visited set is searched forward from the node v' to find the first node V0 with a smaller distance than node v'. v' is then the branch of node V0, and the edge between node v' and its adjacent nodes is an optimizable edge.

[0217] In some embodiments of the present disclosure, step SSD includes: step SSD1 - step SSD2.

[0218] Step SSD1: Delete the first CNOT gate corresponding to the optimizable edge in the sub-quantum circuit to obtain an optimized sub-quantum circuit. In the sub-quantum circuit, according to the arrangement order of quantum gates, the first CNOT gate that appears is the first CNOT gate.

[0219] Step SSD2: Fuse each optimized sub-quantum circuit to obtain a quantum circuit.

[0220] In some embodiments of the present disclosure, specifically, step SSE includes: step SSE1 - step SSE2. Optional step SSE includes step SSE3 - step SSE4.

[0221] SSE1: Initialize the parameter vector and loop through the following steps until convergence conditions are met.

[0222] SSE2: Loop step. The loop step includes: converting the optimization problem into the expected value of the quantum circuit and determining the expectation function based on the parameters; determining the approximate gradient of the optimizer based on the expectation function using the finite difference method; and updating the parameters based on the approximate gradient of the optimizer.

[0223] SSE3: In each iteration, the loss function value of the current iteration is calculated based on the maximum expected value among multiple processors.

[0224] SSE4: After the convergence conditions are met, the parameter with the maximum number of iterations corresponding to all loss function values ​​is taken as the optimal parameter.

[0225] In summary, the quantum circuit optimization method disclosed in the present invention based on the quantum approximate optimization algorithm can directly optimize the quantum gate-level structure by disassembling the quantum circuit structure rather than the problem graph, thereby reducing redundant operations. For example: by deleting the first CNOT gate corresponding to the optimizable edge in the sub-quantum circuit, the number of CNOT gates can be reduced, the quantum operation error can be reduced, and the calculation speed can be improved. In addition, by pre-setting the disassembly strategy, three types of quantum circuit structures can be topologically analyzed: connected branchless circuits, connected branched circuits, and non-connected circuits to enhance the universality of the method. By dynamically identifying optimizable edges through shared sets and residual sets, the optimizable parts can be accurately located to avoid the overhead of global traversal. By combining the SPSA optimizer with multi-processor parallelism, the optimization time can be significantly shortened to be applicable to large-scale circuits, and the expected value can be improved to be closer to the theoretical optimal solution.

[0226] On the other hand, reference Figure 15 The optimization system based on the quantum approximate optimization algorithm disclosed in the present invention includes: an acquisition module, a disassembly module, an edge optimization module, a quantum circuit optimization module and a parameter optimization module.

[0227] Specifically, the acquisition module is used to obtain the graph structure; the disassembly module is used to decompose the acquired graph structure based on a preset disassembly strategy to obtain one or more subgraphs; the edge optimization module is used to determine the optimizable edges in each subgraph based on a preset circuit routing rule; the quantum circuit optimization module is used to determine the quantum circuit based on the subgraph and the optimizable edges; and the parameter optimization module is used to determine the parameter vector of the quantum circuit based on the optimizer and multiple processors executing in parallel to obtain the optimized quantum circuit.

[0228] In some embodiments of the present disclosure, the specific functions of the above functional modules are implemented with reference to the specific steps of the above-mentioned quantum circuit optimization method based on the quantum approximate optimization algorithm.

[0229] Although the embodiments of the present disclosure have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present disclosure. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the invention without departing from the principles and purpose of the present disclosure, and all such changes shall fall within the scope of protection of the claims of the present disclosure.

Claims

1. A quantum circuit optimization method based on a quantum approximate optimization algorithm, characterized in that: include: Get the graph structure; Based on the preset disassembly strategy, decompose the acquired graph structure to obtain one or more subgraphs; Based on the preset routing rules, determine the edges that can be optimized in each subgraph; Determining a quantum circuit according to the subgraph and the optimizable edges; Based on the optimizer, multiple processors execute in parallel to determine the optimal parameters of the quantum circuit and obtain an optimized quantum circuit.

2. The quantum circuit optimization method based on the quantum approximate optimization algorithm according to claim 1 is characterized in that: The graph structure includes: a connected graph structure without branches, a connected graph structure with branches, or a non-connected graph structure; Each independent part in the non-connected graph structure is a subgraph.

3. The quantum circuit optimization method based on the quantum approximate optimization algorithm according to claim 1 is characterized in that: The preset disassembly strategies include: In response to the graph structure being a connected branchless graph structure, each loop in the graph structure is regarded as a subgraph; In response to the graph structure being a connected branched graph structure, each branch in the graph structure is regarded as a subgraph; In response to the graph structure being a non-connected graph structure, the free nodes in the graph structure are taken as a subgraph, the free branches in the graph structure are taken as a subgraph, and the remaining part of the graph structure is taken as a connected branchless graph structure or a connected branched graph structure.

4. The quantum circuit optimization method based on the quantum approximate optimization algorithm according to claim 3 is characterized in that: The preset disassembly strategy also includes: When the remaining part is a connected branchless graph structure, each loop in the remaining part is regarded as a subgraph; When the remaining part is a connected branched graph structure, each branch in the remaining part is regarded as a subgraph.

5. The quantum circuit optimization method based on the quantum approximate optimization algorithm according to claim 1 is characterized in that: The preset route finding rule includes: traversing each subgraph, wherein traversing each subgraph includes: Adding the untraversed nodes in the subgraph and the distances between the untraversed nodes and the preset starting node to the remaining set; A maximum value method is adopted to determine the starting node from the remaining set, and the nodes in the remaining set are traversed. The traversed nodes and the distances between the traversed nodes and the preset starting node are added to the shared set, the starting node is deleted from the remaining set, and the distances between all untraversed nodes in the remaining set and the preset starting node are updated using a reduction method, wherein the preset starting node is used as the new starting node.

6. The quantum circuit optimization method based on the quantum approximate optimization algorithm according to claim 5, characterized in that: The preset line routing rules include: After traversing each subgraph, updates are performed based on the distance relationship between adjacent nodes in the shared set, including: If the distance between any node v' and its adjacent nodes shows an increasing trend, then the edge between node v' and its adjacent nodes is an optimizable edge; If the distances between any node v' and its adjacent nodes are all 0, the node v' is a free node, and the free node is deleted. If the distance between any node v' and its adjacent nodes is decreasing and the distance is greater than 0, then start searching from the node v' in the shared set and determine the first node V0 whose distance is less than that of the node v'. v' is the branch of the node V0, and the edge between the node v' and its adjacent nodes is the optimizable edge.

7. The quantum circuit optimization method based on the quantum approximate optimization algorithm according to claim 1, characterized in that: Determining a quantum circuit according to the subgraph and the optimizable edges includes: Determine one or more quantum subcircuits according to each of the subgraphs, and delete the first CNOT gate in the quantum subcircuit corresponding to the optimizable edge to obtain an optimized quantum subcircuit; Each optimized quantum sub-circuit is integrated to obtain a quantum circuit. Wherein, in the quantum subcircuit, according to the arrangement order of quantum gates, the first CNOT gate that appears is the first CNOT gate.

8. The quantum circuit optimization method based on the quantum approximate optimization algorithm according to claim 1 is characterized in that: The optimizer-based, multiple processors execute in parallel to determine the optimal parameters of the quantum circuit, including: Initialize the parameters and repeat the following steps until the convergence condition is met: Convert the optimization problem into the expected value of the quantum circuit and determine the parameter-based expectation function; Determining an approximate gradient of the optimizer according to the expectation function based on a finite difference method; The parameters are updated according to the approximate gradient of the optimizer.

9. The quantum circuit optimization method based on the quantum approximate optimization algorithm according to claim 8, characterized in that: The optimizer-based, multiple processors execute in parallel to determine the optimal parameters of the quantum circuit, including: During each iteration, the loss function value of the current iteration is determined based on the maximum expected value among multiple processors; After the convergence conditions are met, the parameter with the maximum number of iterations corresponding to all loss function values ​​is taken as the optimal parameter.

10. A quantum circuit optimization system based on a quantum approximate optimization algorithm, characterized in that: include: Acquisition module, used to obtain graph structure; A disassembly module is used to decompose the acquired graph structure based on a preset disassembly strategy to obtain one or more subgraphs; The edge optimization module is used to determine the edges that can be optimized in each subgraph based on the preset path finding rules; A quantum circuit optimization module, configured to determine a quantum circuit based on the subgraph and the optimizable edges; The parameter optimization module is used to determine the optimal parameters of the quantum circuit based on the optimizer and multiple processors executing in parallel to obtain the optimized quantum circuit.