Quantum circuit simulation method based on circuit cutting
Through the quantum circuit simulation method based on circuit cutting, large-scale quantum circuits are divided into independent simulated sub-circuits, and heuristic cutting algorithm and state vector multiplexing technology are used to solve the problems of high computational complexity, large memory requirements and low efficiency in the existing technology, and efficient quantum circuit simulation is achieved.
Patent Information
- Application Number
- CN202411489280.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-10-24
Smart Images

Figure CN119578566A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of quantum computing, and in particular relates to a quantum circuit simulation method based on circuit cutting. Background Art
[0002] Quantum computing technology has received widespread attention in recent years because it can significantly improve computing efficiency in specific fields, especially in problems such as factorization and database search, showing great potential. The core advantage of quantum computing lies in the superposition and entanglement properties of quantum bits (qubits), which enable quantum computers to process a large number of computing tasks in parallel, thereby surpassing traditional computers in computing 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 the noise problem of quantum bits, high error rate and scarcity of hardware.
[0003] Quantum circuit simulation is an important part of quantum computing research. By simulating quantum circuits on classical computers, researchers can verify the performance of quantum algorithms and provide important theoretical support for the development of large-scale quantum computers in the future. Traditional quantum circuit simulation methods, such as full-amplitude state vector simulation and tensor network contraction, can simulate small-scale quantum circuits to a certain extent, but when faced with large-scale quantum circuits, the computational complexity and memory requirements will increase dramatically. For example, simulating a 50-qubit quantum circuit requires about 16PB of storage space, which is a huge challenge for existing classical computers.
[0004] In order to overcome these limitations, researchers have proposed a variety of optimization strategies, among which the circuit cutting method has gradually become an important optimization method because it can divide large-scale quantum circuits into smaller sub-circuits, thereby reducing the simulation complexity. The core idea of the circuit cutting method is to find suitable cutting points in the quantum circuit and divide the circuit 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 computing burden of the overall simulation of the large-scale quantum circuit.
[0005] In traditional quantum circuit simulation methods, circuit cutting is mainly used to convert complex quantum circuits into smaller-scale sub-circuits to adapt to the hardware limitations of quantum computers. However, existing circuit cutting methods mainly focus on how to optimize the physical execution of quantum computers, without fully considering the efficiency of quantum simulators on classical computers. Since quantum simulators need to process large amounts of data and complex calculations, if the circuit cutting method can be effectively optimized to better adapt to the working principles of quantum simulators, the efficiency of quantum circuit simulation will be significantly improved.
[0006] In existing quantum circuit simulation research, system-level optimization and algorithm-level optimization are the main ways to improve simulation efficiency. System-level optimization usually focuses on how to use the hardware resources of modern computers, such as multi-core CPUs, GPUs, distributed computing, etc., to improve the computational efficiency of simulations. Algorithm-level optimization, on the other hand, focuses more on the characteristics of the quantum circuit itself, using technologies such as quantum gate fusion and gate decomposition to reduce the computational burden.
[0007] In the previous patent inventions, Yu Lei proposed a full-amplitude quantum computing simulation method (CN111832144B), which uses parallel methods to accelerate simulation efficiency; Dou Menghan proposed a new quantum state encoding route, which reduces the number of logic gates required for computing tasks (CN117787428A). However, these patents do not involve the division and reuse of circuits, and still calculate them as a whole, and the complexity increases rapidly when the number of quantum bits increases.
[0008] Traditional quantum circuit simulation usually requires processing the state vector of the entire quantum circuit, which leads to an exponential growth in the computing resources and memory requirements required for simulation when facing large-scale quantum circuits.
[0009] Glossary
[0010] 1. Quantum computing: It is a new computing method based on the principles of quantum mechanics, which uses quantum bits (Qubit) to perform calculations. Unlike classical computing, quantum computing uses the characteristics of quantum superposition and quantum entanglement to process a large number of computing tasks in parallel, significantly improving the computing efficiency of certain problems.
[0011] 2. Qubit: It is the basic unit of quantum computing. It is different from the bit in traditional computing and can be in a superposition state of 0 and 1 at the same time. A qubit can be represented as a linear combination of two basis states |0> and |1>, which is used to describe quantum information.
[0012] 3. Quantum Circuit: A circuit composed of quantum gate operations, used to implement quantum computing processes. The quantum gates in the quantum circuit operate on quantum bits, thereby realizing the evolution of quantum states and the execution of computing tasks.
[0013] 4. Circuit Cutting: It is a technique to decompose a complex quantum circuit into several sub-circuits. Through cutting, the original circuit can be divided into smaller and more manageable sub-circuits, thereby reducing computational complexity and resource consumption.
[0014] 5. State Vector Reuse: This is a method to reduce the amount of computation by reusing the intermediate state vectors of similar subcircuits. It can effectively reduce the need for repeated calculations and improve the efficiency of quantum circuit simulation.
[0015] 6. Mixed-Integer Programming: It is an optimization technique used to solve optimization problems involving integers and continuous variables. In quantum circuit simulation, the mixed-integer programming model is used to optimize the circuit cutting process and determine the best cutting point and solution. Summary of the invention
[0016] The present invention aims to solve the problems of high computational complexity, large memory requirements and low efficiency in existing quantum circuit simulation methods, and proposes a quantum circuit simulation method based on circuit cutting, thereby greatly reducing the computational burden in the simulation process and improving the overall simulation efficiency.
[0017] The quantum circuit simulation method based on circuit cutting proposed in the present invention designs a cutting strategy to divide a complex quantum circuit into multiple smaller sub-circuits, each of which can be simulated independently; the specific steps are:
[0018] Step 1. Circuit preprocessing and dependency analysis, including:
[0019] (1) Preprocessing the target quantum circuit, cleaning up invalid quantum gates and redundant parts, and simplifying the circuit structure;
[0020] (2) Analyze the dependencies between qubits. The calculations of some quantum gates depend on the results of previous calculations, which constitute 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 subcircuits after cutting is identified; when cutting circuits, the focus is on analyzing the graph structure formed by dual-qubit gates. Since single-qubit gates do not affect the cutting results, there is no need to consider the input and output qubits. The determination of the cutting position is mainly based on the relationship between dual-qubit gates.
[0021] Step 2. Divide the sub-circuit by circuit cutting, including:
[0022] A heuristic cutting algorithm is used to determine the best cutting point based on the complexity of the circuit, the distribution of qubits and dependencies. By evaluating the computational overhead 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 the global computational cost and resource allocation to ensure that the sub-circuit after cutting can be simulated independently and efficiently. The specific process is as follows:
[0023] (1) First, select preliminary cutting points. These cutting points are selected based on the analysis of circuit complexity, quantum bit distribution, and dependencies between quantum gates. The goal is to create cutting points that can simplify computational complexity. Specifically, regions with low quantum entanglement are given priority for cutting.
[0024] (2) Divide the quantum circuit into several subcircuits according to the selected cutting points; each subcircuit contains a certain number of qubits and quantum gates, and these subcircuits can be simulated independently;
[0025] (3) Evaluation and optimization of cutting schemes; that is, evaluating different cutting schemes, mainly considering the size of the subcircuit, the required classical computing resources, and the amount of data exchange between the subcircuits; the goal is to find a cutting scheme that minimizes the overall computational burden;
[0026] The evaluation of the cutting scheme is transformed into an optimization problem, and each cutting point is precisely optimized through an integer programming model. The goal is to balance the computational costs of the evaluation stage and the post-processing stage 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 subcircuit is simulated independently to generate its own intermediate state vector and output results, which provide a basis for subsequent state vector reuse and combination;
[0028] Among the sub-circuits that meet the requirements, the one with the fastest running speed and the least resource requirements is selected as the optimal solution (if such a sub-circuit does not exist, the heuristic algorithm is re-divided to form a new sub-circuit).
[0029] Step 3. Sub-circuit state vector reuse
[0030] Based on the circuit cutting algorithm, this paper proposes an optimization method based on subcircuit state vector reuse, aiming to reduce the complexity of the algorithm and memory usage. This method reduces the need for repeated calculations by identifying and reusing the similarities between subcircuits, and by saving the intermediate state vectors of each subcircuit, quickly searches for similar state vectors for reuse when calculating new subcircuits, effectively reducing the amount of calculation and resource consumption.
[0031] The specific process is as follows:
[0032] (1) Recording of state vectors: During the simulation of each subcircuit, 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 quantum bit and the operation results of the quantum gate, ensuring accurate matching during reuse. In addition, by adding different measurement bases (such as III, XII, XYX, XXI {III}, {XII}, {XYX}, {XXI} III, XII, XYX, XXI, etc.), the state vector of each subcircuit produces different calculation results under different measurement bases. The introduction of these measurement bases can improve the diversity and accuracy of the state vectors, helping to make subsequent matching more accurate.
[0033] (2) Matching of state vectors: When simulating a new subcircuit, the system compares the current subcircuit with the previously simulated subcircuit to find similar state vectors. It is particularly important to emphasize that using different measurement bases (such as H, Sdg+HH, Sdg+HH, Sdg+H, etc. in the figure) can generate more representative and diverse vectors in the state space, making the matching more accurate. By calculating the similarity between state vectors, reusable state vectors can be quickly located to avoid repeated 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, reuse of 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 through these basis combinations, avoiding repeated calculations of the same state.
[0035] (4) State vector cache management: Manage and maintain the state vector cache to ensure fast access when reusing state vectors. As the number of state vectors increases with the complexity of the simulation, an efficient cache replacement strategy must be designed to save the most valuable state vectors in limited memory space. State vectors generated under different measurement bases can be quickly searched and reused through this cache strategy, further improving simulation efficiency.
[0036] The circuit cutting method proposed in this invention cuts a large quantum circuit into several subcircuits. Each subcircuit has multiple variants under different initial states and measurement bases. The number of these variants grows exponentially with the increase of circuit complexity. How to find the right cutting point and effective post-processing strategy is the key to the application of the circuit cutting method.
[0037] However, in quantum simulators, due to the limitation of classical computing resources, the cost of evaluating and simulating each subcircuit is relatively high. Therefore, how to optimize the circuit cutting method to reduce the repeated calculation of subcircuit simulation and improve the overall simulation efficiency has become the focus of the present invention. The present invention proposes a circuit cutting method based on a heuristic algorithm and a subcircuit optimization method based on state vector reuse, which realizes efficient simulation of large-scale quantum circuits.
[0038] By optimizing circuit cutting and sub-circuit simulation, the present invention can significantly reduce computing time and resource consumption while ensuring simulation accuracy, and is particularly suitable for application scenarios with high quantum circuit complexity, such as the simulation of quantum superiority circuits and complex quantum algorithms.
[0039] The method of the present invention can effectively reduce the complexity of large-scale quantum circuit simulation and improve computing efficiency. In particular, when simulating complex quantum circuits such as Supremacy circuits and AQFT circuits, the present invention has a significant acceleration effect. The present invention is applicable to various quantum computing simulation platforms, such as Qiskit, Cirq, etc., and can significantly reduce computing time and resource usage while maintaining high simulation accuracy. When it is necessary to simulate complex quantum circuits, the method of the present invention preferentially uses subcircuit state vector multiplexing technology to reduce the usage of quantum simulator resources and ensure rapid response and efficient execution of simulation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 Heuristic algorithm solution process.
[0041] Figure 2 Optimize flow for sub-circuit state reuse. DETAILED DESCRIPTION
[0042] The heuristic-based cutting algorithm focuses on decomposing the original quantum circuit into several sub-circuits by selecting the best cutting points to reduce computing resource consumption. This method optimizes the cutting process through a mixed integer programming model and integrates the global computing cost to ensure that each sub-circuit can be calculated independently and efficiently, thereby maximizing simulation efficiency. In each simulation, the algorithm adjusts the heuristic parameters according to the circuit complexity and quantum bit distribution, continuously optimizes the cutting scheme, ensures that the computing cost is minimized, and combines the calculation results of each sub-circuit in the final stage to improve the overall simulation performance.
[0043] At the same time, the subcircuit state vector reuse algorithm effectively reduces the need for repeated calculations by identifying and reusing the similarities between subcircuits. During the simulation of each subcircuit, the algorithm records the intermediate state vectors and reuses them by quickly finding similar state vectors when calculating new subcircuits, greatly reducing the amount of calculation and memory resources occupied. In order to improve the reuse efficiency, the state vector reuse strategy also introduces similarity calculation. By setting a reasonable similarity threshold, similar state vectors can be quickly matched and reused, further reducing the overhead of redundant calculations.
[0044] In specific experiments, for Supremacy circuits and AQFT circuits, the combination of the heuristic cutting algorithm and the state vector reuse algorithm significantly improved the simulation efficiency. In the Supremacy circuit experiment, heuristic cutting brought a 96% acceleration, and in the AQFT circuit, the simulation time was reduced by 92% through state vector reuse. In the simpler Adder circuit and BV circuit, the combination of the two algorithms also achieved an acceleration effect of about 30%, proving the versatility and adaptability of the method.
[0045] The present invention greatly improves the efficiency of quantum circuit simulation through the coordinated optimization of the heuristic cutting algorithm and the state vector reuse algorithm. While reducing the computing resource usage, it also ensures wide applicability in different types of quantum circuits. This optimization strategy not only saves computing time, but also effectively manages memory resources, providing a more efficient solution for future quantum circuit simulation.
Claims
1. A quantum circuit simulation method based on circuit cutting, characterized in that: This involves designing a cutting strategy to split a complex quantum circuit into multiple smaller subcircuits, each of which can be simulated independently. The specific steps are: 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 based on these edges to determine potential cutting points; by analyzing the connections and interactions between qubits, identify the independence between subcircuits after cutting; when cutting circuits, focus on analyzing the graph structure composed of dual-qubit gates, and the determination of the cutting position is mainly based on the relationship between dual-qubit gates; Step 2. Divide the sub-circuit by circuit cutting, including: A heuristic cutting algorithm is used to determine the best cutting point based on the complexity of the circuit, the distribution of qubits and their dependencies. By evaluating the computational overhead 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 the global computational cost and resource allocation to ensure that the subcircuits after cutting can be simulated independently and efficiently. Step 3. Sub-circuit state vector reuse; By identifying and reusing the similarities between subcircuits, the need for repeated calculations is reduced. By saving the intermediate state vectors of each subcircuit, similar state vectors can be quickly found and reused when calculating new subcircuits, thereby reducing the amount of calculation and resource consumption.
2. The quantum circuit simulation method based on circuit cutting according to claim 1, characterized in that: The specific process of step 2 is as follows: (1) First, select preliminary cutting points. These cutting points are selected based on the analysis of circuit complexity, quantum bit distribution, and dependencies between quantum gates. The goal is to create cutting points that can simplify computational complexity. Specifically, regions with low quantum entanglement are given priority for cutting. (2) Divide the quantum circuit into several subcircuits according to the selected cutting points; each subcircuit contains a certain number of qubits and quantum gates, and these subcircuits can be simulated independently; (3) Evaluation and optimization of cutting schemes; that is, evaluating different cutting schemes, mainly considering the size of the subcircuit, the required classical computing resources, and the amount of data exchange between the subcircuits; the goal is to find a cutting scheme that minimizes the overall computational burden; The evaluation of the cutting scheme is transformed into an optimization problem, and each cutting point is precisely optimized through an integer programming model. The goal is to balance the computational costs of the evaluation stage and the post-processing stage 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 subcircuit is simulated independently to generate its own intermediate state vector and output results, which provide a basis for subsequent state vector reuse and combination; Among the sub-circuits that meet the requirements, select the one with the fastest running speed and the least resource requirements as the optimal solution.
3. The quantum circuit simulation method based on circuit cutting according to claim 2 is characterized in that: The specific process of step (3) is as follows: (1) Recording of state vectors: During the simulation of each subcircuit, 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 quantum bit and the operation results of the quantum gate, ensuring accurate matching during reuse; in addition, by adding different measurement bases, the state vector of each subcircuit produces different calculation results under different measurement bases; the introduction of these measurement bases can improve the diversity and accuracy of the state vectors, helping to make subsequent matching more accurate; (2) Matching of state vectors: When simulating a new subcircuit, similar state vectors are found by comparing the current subcircuit with the previously simulated subcircuit. The similarity between state vectors is calculated to quickly locate reusable state vectors and 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. As the number of state vectors increases with the complexity of the simulation, an efficient cache replacement strategy is designed to save the most valuable state vectors in limited memory space. State vectors generated under different measurement bases can be quickly searched 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 circuit division method based on quantum bit line cutting
CN118171747A
Distributed Quantum Computing Simulation Method and Apparatus
US20230267358A1