A quantum circuit simulation method based on circuit cutting
By dividing quantum circuits into sub-circuits and utilizing heuristic algorithms and state vector reuse techniques, the problems of computational complexity and resource consumption in large-scale quantum circuit simulation are solved, achieving efficient simulation results.
Patent Information
- Application Number
- CN202411489280.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-10-24
AI Technical Summary
Existing quantum circuit simulation methods suffer from high computational complexity, large memory requirements, and low efficiency when dealing with large-scale quantum circuits, especially when processing quantum simulators on classical computers, where resource consumption is excessive.
A circuit-based cutting method is adopted to divide complex quantum circuits into multiple sub-circuits. The cutting points are optimized by a heuristic cutting algorithm and combined with state vector reuse technology to reduce redundant calculations and resource consumption.
It significantly reduces the computation time and resource consumption of large-scale quantum circuit simulations and improves simulation efficiency, especially with a significant acceleration effect on complex quantum circuits such as Supremacy and AQFT circuits.
Smart Images

Figure CN119578566B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of quantum computing technology, specifically relating to a quantum circuit simulation method based on circuit cutting. Background Technology
[0002] Quantum computing technology has attracted widespread attention in recent years due to its ability to significantly improve computational efficiency in specific fields, particularly demonstrating enormous potential in problems such as factorization and database searching. The core advantage of quantum computing lies in the superposition and entanglement properties of qubits, which enable quantum computers to process a large number of computational tasks in parallel, thus surpassing conventional computers in computational power. However, the number and quality of qubits in current quantum computers are limited, and the practical application of quantum computers faces many challenges, mainly including qubit noise problems, high error rates, and hardware scarcity.
[0003] Quantum circuit simulation is a crucial component of quantum computing research. By simulating quantum circuits on classical computers, researchers can verify the performance of quantum algorithms and provide vital theoretical support for the development of future large-scale quantum computers. Traditional quantum circuit simulation methods, such as full-amplitude state vector simulation and tensor network contraction, while capable of simulating small-scale quantum circuits to some extent, experience a dramatic increase in computational complexity and memory requirements when dealing with large-scale quantum circuits. For example, simulating a 50-qubit quantum circuit requires approximately 16 petabytes of storage, posing a significant challenge to existing classical computers.
[0004] To overcome these limitations, researchers have proposed various optimization strategies. Among them, circuit partitioning has gradually become an important optimization method because it can divide large-scale quantum circuits into smaller sub-circuits, thereby reducing simulation complexity. The core idea of circuit partitioning is to find suitable cutting points in the quantum circuit to divide it into several small sub-circuits that can be simulated independently. Each sub-circuit can be simulated on an independent computing unit, thus avoiding the memory and computational burden of simulating the entire large-scale quantum circuit.
[0005] In traditional quantum circuit simulation methods, circuit dicing is primarily used to transform complex quantum circuits into smaller sub-circuits to accommodate the hardware limitations of quantum computers. However, existing circuit dicing methods mainly focus on optimizing the physical execution of quantum computers, without fully considering the efficiency of quantum simulators on classical computers. Since quantum simulators need to handle large amounts of data and complex calculations, effectively optimizing circuit dicing methods to better adapt to the working principles of quantum simulators will significantly improve the efficiency of quantum circuit simulation.
[0006] In existing quantum circuit simulation research, system-level optimization and algorithm-level optimization are the main approaches to improve simulation efficiency. System-level optimization typically focuses on how to utilize the hardware resources of modern computers, such as multi-core CPUs, GPUs, and distributed computing, to improve the computational efficiency of the simulation. Algorithm-level optimization, on the other hand, focuses more on the characteristics of the quantum circuits themselves, using techniques such as quantum gate fusion and gate decomposition to reduce the computational burden.
[0007] In previous patented inventions, Yu Lei proposed a full-amplitude quantum computing simulation method (CN111832144B), which uses a parallel approach to accelerate simulation efficiency; Dou Menghan proposed a new quantum state encoding route, which reduces the number of logic gates required for computational tasks (CN117787428A). However, these patents do not address circuit segmentation and multiplexing, still treating it as a whole for computation, resulting in a rapid increase in complexity as the number of qubits increases.
[0008] Traditional quantum circuit simulations typically require processing the state vector of the entire quantum circuit, which leads to an exponential increase in the computational resources and memory requirements for simulations when dealing with large-scale quantum circuits.
[0009] Glossary
[0010] 1. Quantum computing: A novel computing method based on the principles of quantum mechanics, it uses qubits (qubits) for computation. Unlike classical computing, quantum computing leverages the properties of quantum superposition and quantum entanglement to process a large number of computational tasks in parallel, significantly improving computational efficiency for certain problems.
[0011] 2. Qubit: The basic unit of quantum computing. Unlike bits in traditional computing, a qubit can exist in a superposition of 0 and 1 simultaneously. A qubit can be represented as a linear combination of two ground states, |0> and |1>, and is used to describe quantum information.
[0012] 3. Quantum Circuit: A quantum circuit is a circuit composed of quantum gate operations used to realize quantum computing. Quantum gates in a quantum circuit operate on qubits, thereby realizing the evolution of quantum states and executing computational tasks.
[0013] 4. Circuit Cutting: This is a technique for decomposing complex quantum circuits into several sub-circuits. By cutting, the original circuit can be divided into smaller, more manageable sub-circuits, thereby reducing computational complexity and resource consumption.
[0014] 5. State Vector Reuse: This is a method to reduce computation by reusing intermediate state vectors of similar sub-circuits. It can effectively reduce the need for redundant calculations and improve the efficiency of quantum circuit simulation.
[0015] 6. Mixed-Integer Programming: This is an optimization technique used to solve optimization problems involving both integer and continuous variables. In quantum circuit simulation, mixed-integer programming models are used to optimize circuit cutting processes and determine the optimal cutting points and schemes. Summary of the Invention
[0016] This invention aims to address the problems of high computational complexity, large memory requirements, and low efficiency in existing quantum circuit simulation methods. It proposes a quantum circuit simulation method based on circuit cutting, which significantly reduces the computational burden in the simulation process and improves the overall simulation efficiency.
[0017] The quantum circuit simulation method based on circuit segmentation proposed in this invention designs a segmentation strategy to divide a complex quantum circuit into multiple smaller sub-circuits, each of which can be simulated independently; the specific steps are as follows:
[0018] Step 1. Circuit preprocessing and dependency analysis, specifically including:
[0019] (1) The target quantum circuit is preprocessed to clean up invalid quantum gates and redundant parts, and simplify the circuit structure;
[0020] (2) Analyze the dependencies between qubits. The computation of some quantum gates depends on the results of previous computations, which constitutes a unidirectional edge in the graph. Construct a qubit dependency graph based on these edges to determine potential cutting points. By analyzing the connections and interactions between qubits, the independence between the sub-circuits after cutting is identified; when cutting the circuit, the focus is on analyzing the graph structure formed by two qubit gates. Since a single quantum gate does not affect the cutting result, it is not necessary to consider the input and output qubits; the determination of the cutting position is mainly based on the relationship between the two qubit gates.
[0021] Step 2. Divide the circuit into sub-circuits by circuit cutting, including:
[0022] A heuristic cutting algorithm is employed to determine the optimal cutting point based on the circuit's complexity, qubit distribution, and dependencies. By evaluating the computational cost and resource requirements of different cutting schemes, a scheme that minimizes the overall simulation burden is selected. Specifically, the goal of the heuristic cutting algorithm is to optimize global computational cost and resource allocation to ensure that the cut sub-circuits can be simulated independently and efficiently. The specific process is as follows:
[0023] (1) First, preliminary cutting points are selected. The selection of these cutting points is based on the analysis of circuit complexity, qubit distribution and the dependencies between quantum gates. The goal is to create cuts that can simplify computational complexity. Specifically, regions with lower quantum entanglement are preferred for cutting.
[0024] (2) Divide the quantum circuit into several sub-circuits according to the selected cutting points; each sub-circuit contains a certain number of qubits and quantum gates, and these sub-circuits can be simulated independently;
[0025] (3) Evaluation and optimization of the cutting scheme; that is, to evaluate different cutting schemes, mainly considering the size of the sub-circuit, the required classical computing resources and the amount of data exchange between the sub-circuits; the goal is to find a cutting scheme that can minimize the overall computing burden.
[0026] The evaluation of the cutting scheme is transformed into an optimization problem, specifically using an integer programming model to precisely optimize each cutting point. The goal is to balance the computational costs of the evaluation and post-processing stages to ensure the efficiency of the overall simulation. During the evaluation process, not only the computational burden of a single stage is considered, but also the overhead of each stage is comprehensively considered from a global perspective to ensure the optimal performance of the entire process.
[0027] (4) Then, each sub-circuit is simulated independently to generate its own intermediate state vector and output results, providing a basis for subsequent state vector reuse and combination;
[0028] Among the sub-circuits that meet the requirements, the solution with the fastest running speed and the least resource requirements is selected as the optimal solution (if such a sub-circuit does not exist, a new sub-circuit is formed by re-segmenting using a heuristic algorithm).
[0029] Step 3. Sub-circuit state vector multiplexing
[0030] Based on the circuit segmentation algorithm, this invention proposes an optimization method based on the reuse of sub-circuit state vectors, aiming to reduce the complexity and memory consumption of the algorithm. This method reduces the need for redundant calculations by identifying and reusing the similarities between sub-circuits, and by saving the intermediate state vectors of each sub-circuit, it quickly finds and reuses similar state vectors when calculating new sub-circuits, effectively reducing computational load and resource consumption.
[0031] The specific process is as follows:
[0032] (1) Recording of State Vectors: During the simulation of each sub-circuit, intermediate state vectors are recorded and saved based on the state of each simulation step, establishing a state vector database. Each state vector contains the state information of the qubit and the operation result of the quantum gate, ensuring accurate matching during multiplexing. Furthermore, by adding different measurement bases (such as III, XII, XYX, XXI{III}, {XII}, {XYX}, {XXI}III, XII, XYX, XXI, etc. shown in the figure), the state vectors of each sub-circuit produce different calculation results under different measurement bases. These introduced measurement bases can improve the diversity and accuracy of state vectors, helping to achieve more precise matching in subsequent processes.
[0033] (2) State Vector Matching: When simulating a new sub-circuit, the system compares the current sub-circuit with previously simulated sub-circuits to find similar state vectors. It is particularly important to emphasize that using different measurement bases (such as combinations of H, Sdg+HH, Sdg+HH, Sdg+H in the figure) can generate more representative and diverse vectors in the state space, resulting in higher matching accuracy. By calculating the similarity between state vectors, reusable state vectors can be quickly located, avoiding redundant calculations.
[0034] (3) Reuse of state vectors: For successfully matched state vectors, the existing calculation results are directly reused, skipping repeated simulation steps. In particular, reusing state vectors under multiple observation bases (such as the four measurement bases in the figure) can significantly reduce the number of calculation steps, because most possible quantum state changes are covered by these base combinations, avoiding repeated calculations of the same state.
[0035] (4) State Vector Cache Management: Managing and maintaining a cache of state vectors ensures fast access when reusing them. Since the number of state vectors increases with simulation complexity, an efficient cache replacement strategy must be designed to store the most valuable state vectors within a limited memory space. This caching strategy allows state vectors generated under different measurement bases to be quickly retrieved and reused, further improving simulation efficiency.
[0036] The circuit cutting method proposed in this invention divides a large quantum circuit into several sub-circuits. Each sub-circuit has multiple variants under different initial states and measurement bases, and the number of these variants increases exponentially with the increase of circuit complexity. Finding suitable cutting points and effective post-processing strategies are key to the application of the circuit cutting method.
[0037] However, in quantum simulators, the overhead of evaluating and simulating each sub-circuit is significant due to the limitations of classical computing resources. Therefore, optimizing the circuit partitioning method to reduce redundant calculations in sub-circuit simulation and improve overall simulation efficiency is the focus of this invention. This invention proposes a circuit partitioning method based on a heuristic algorithm and a sub-circuit optimization method based on state vector reuse, achieving efficient simulation of large-scale quantum circuits.
[0038] By optimizing circuit segmentation and sub-circuit simulation, this invention can significantly reduce computation time and resource consumption while ensuring simulation accuracy. It is particularly suitable for applications with high quantum circuit complexity, such as the simulation of quantum supremacy circuits and complex quantum algorithms.
[0039] The method of this invention can effectively reduce the complexity of large-scale quantum circuit simulation and improve computational efficiency. Especially when simulating complex quantum circuits such as Supremacy and AQFT circuits, this invention shows a significant acceleration effect. This invention is applicable to various quantum computing simulation platforms, such as Qiskit and Cirq, and can significantly reduce computation time and resource consumption while maintaining high simulation accuracy. When simulating complex quantum circuits, the method of this invention preferentially uses sub-circuit state vector multiplexing technology to reduce the consumption of quantum simulator resources and ensure fast response and efficient execution of simulation results. Attached Figure Description
[0040] Figure 1 The heuristic algorithm solution process.
[0041] Figure 2 Optimize the process for state reuse of sub-circuits. Detailed Implementation
[0042] Heuristic-based cutting algorithms primarily focus on decomposing the original quantum circuit into several sub-circuits by selecting the optimal cutting points to reduce computational resource consumption. This method optimizes the cutting process using a mixed-integer programming model, considering the overall computational cost to ensure that each sub-circuit can be computed independently and efficiently, thereby maximizing simulation efficiency. During each simulation, the algorithm adjusts heuristic parameters based on circuit complexity and qubit distribution, continuously optimizing the cutting scheme to minimize computational cost. Finally, it combines the computational results of each sub-circuit in the final stage to improve overall simulation performance.
[0043] Meanwhile, the sub-circuit state vector reuse algorithm effectively reduces the need for redundant computation by identifying and reusing the similarities between sub-circuits. During the simulation of each sub-circuit, the algorithm records its intermediate state vector and reuses it by quickly finding similar state vectors when calculating new sub-circuits, thereby greatly reducing the amount of computation and memory resources required. To improve reuse efficiency, the state vector reuse strategy also introduces similarity calculation. By setting a reasonable similarity threshold, similar state vectors are quickly matched and reused, further reducing the overhead of redundant computation.
[0044] In specific experiments, the combination of heuristic cutting and state vector reuse algorithms significantly improved simulation efficiency for Supremacy and AQFT circuits. In the Supremacy circuit experiments, heuristic cutting resulted in a 96% speedup, while in the AQFT circuit, state vector reuse reduced simulation time by 92%. In the simpler Adder and BV circuits, combining the two algorithms also achieved a speedup of approximately 30%, demonstrating the versatility and adaptability of the proposed method.
[0045] This invention significantly improves the efficiency of quantum circuit simulation through the synergistic optimization of a heuristic cutting algorithm and a state vector reuse algorithm. While reducing computational resource consumption, it also ensures broad applicability across different types of quantum circuits. This optimization strategy not only saves computation time but also effectively manages memory resources, providing a more efficient solution for future quantum circuit simulations.
Claims
1. A quantum circuit simulation method based on circuit cutting, characterized in that, This includes designing a segmentation strategy to divide complex quantum circuits into multiple smaller sub-circuits, each of which can be simulated independently; the specific steps are as follows: Step 1. Circuit preprocessing and dependency analysis, including: (1) Preprocess the target quantum circuit, clean up invalid quantum gates and redundant parts, and simplify the circuit structure; (2) Analyze the dependencies between qubits; the calculation of some quantum gates depends on the results of previous calculations, which constitutes a unidirectional edge in the graph; construct a qubit dependency graph according to these edges to determine potential cutting points; identify the independence between sub-circuits after cutting by analyzing the connections and interactions between qubits; when cutting the circuit, focus on analyzing the graph structure composed of two qubit gates, and the determination of the cutting position is mainly based on the relationship between the two qubit gates. Step 2. Divide the circuit into sub-circuits by circuit cutting, including: A heuristic cutting algorithm is adopted to determine the optimal cutting point based on the complexity of the circuit, the distribution and dependency of qubits; by evaluating the computational cost and resource requirements of different cutting schemes, a scheme that can minimize the overall simulation burden is selected; specifically, the goal of the heuristic cutting algorithm is to optimize the global computational cost and resource allocation to ensure that the cut sub-circuits can be simulated independently and efficiently. Step 3. Sub-circuit state vector multiplexing; By identifying and reusing the similarities between sub-circuits, the need for redundant calculations is reduced. Furthermore, by saving the intermediate state vector of each sub-circuit, similar state vectors can be quickly found and reused when calculating new sub-circuits, thereby reducing computational load and resource consumption.
2. The quantum circuit simulation method based on circuit cutting according to claim 1, characterized in that, The specific process for step 2 is as follows: (1) First, preliminary cutting points are selected. The selection of these cutting points is based on the analysis of circuit complexity, qubit distribution and the dependencies between quantum gates. The goal is to create cuts that can simplify computational complexity. Specifically, regions with lower quantum entanglement are preferred for cutting. (2) Divide the quantum circuit into several sub-circuits according to the selected cutting points; each sub-circuit contains a certain number of qubits and quantum gates, and these sub-circuits can be simulated independently; (3) Evaluation and optimization of the cutting scheme; that is, to evaluate different cutting schemes, mainly considering the size of the sub-circuit, the required classical computing resources and the amount of data exchange between the sub-circuits; the goal is to find a cutting scheme that can minimize the overall computing burden. The evaluation of the cutting scheme is transformed into an optimization problem, specifically using an integer programming model to precisely optimize each cutting point. The goal is to balance the computational costs of the evaluation and post-processing stages to ensure the efficiency of the overall simulation. During the evaluation process, not only the computational burden of a single stage is considered, but also the overhead of each stage is comprehensively considered from a global perspective to ensure the optimal performance of the entire process. (4) Then, each sub-circuit is simulated independently to generate its own intermediate state vector and output results, providing a basis for subsequent state vector reuse and combination; Among the sub-circuits that meet the requirements, the one with the fastest running speed and the fewest resource requirements is selected as the optimal solution.
3. The quantum circuit simulation method based on circuit cutting according to claim 2, characterized in that, The specific process of step (3) is as follows: (1) Recording of state vectors: During the simulation of each sub-circuit, the intermediate state vectors are recorded and saved through the state of each simulation step to establish a state vector database; each state vector contains the state information of the qubit and the operation result of the quantum gate, ensuring accurate matching during reuse; in addition, by adding different measurement bases, the state vectors of each sub-circuit produce different calculation results under different measurement bases; these introduced measurement bases can improve the diversity and accuracy of state vectors, helping to make subsequent matching more accurate; (2) State vector matching: When simulating a new sub-circuit, the current sub-circuit is compared with the previously simulated sub-circuit to find similar state vectors; by calculating the similarity between state vectors, reusable state vectors are quickly located to avoid repeated calculations. (3) Reuse of state vectors: For successfully matched state vectors, the existing calculation results are directly reused, skipping repeated simulation steps; (4) Cache management of state vectors: Manage and maintain the cache of state vectors to ensure fast access when reusing state vectors; Since the number of state vectors increases with the complexity of the simulation, design an efficient cache replacement strategy to save the most valuable state vectors in a limited memory space; State vectors generated under different measurement bases can be quickly found and reused through the cache strategy, further improving simulation efficiency.
Citation Information
Patent Citations
A full-amplitude quantum computing simulation method
CN111832144B
Quantum state coding circuit, quantum calculation method and related device
CN117787428A
Method for solving task cutting and grouping problem in tactical action based on QAOA quantum enhancement
CN117408348A
Distributed Quantum Computing Simulation Method and Apparatus
US20230267358A1