Method and device for accelerating quantum waveform compilation by realizing reusable waveform library based on convolution
The reusable waveform library is generated through convolution operations and quantum circuit compilation is used to use greedy algorithms to solve the problem of high time cost of quantum circuit pulse generation and realize efficient quantum circuit compilation and scalability.
Patent Information
- Application Number
- CN202311401126.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-26
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2043-10-26
AI Technical Summary
In existing quantum computing technologies, the computational complexity of the pulse generation of quantum circuits leads to high time costs, especially in the compilation process of large-scale quantum circuits, where repeated calculations lead to inefficiency.
By converting the quantum algorithm circuit into a circuit matrix and performing convolution operations to generate the convolution results of the sub-circuit, a multiplexable waveform library is built, and the pulse generation of the target quantum circuit is accelerated, and a greedy algorithm is used for matching compilation.
It significantly reduces the computational overhead and time cost of pulse generation, supports hundreds of bits of synthesis, and implements efficient scalability and reuse modes, reducing compile synthesis time.
Smart Images

Figure CN117332868B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of quantum computing technology, and specifically relates to a method and device for accelerating quantum waveform compilation by realizing a reusable waveform library based on convolution. Background Art
[0002] Quantum computing has been demonstrated to have the ability to achieve polynomial or even exponential speedups in certain areas, such as chemical simulation, database search, and combinatorial optimization. Quantum circuits are a widely used programming model for describing the computation of quantum gates. When these applications are deployed to superconducting quantum hardware, specific pulses are required to implement the operation of quantum gates and control the evolution of qubits. Specifically, the conversion from quantum circuits to pulses refers to the synthesis process of generating discrete pulses for each quantum gate, with specific shapes and timing dependencies. However, due to the huge computational complexity of calculating the pulse parameters, the time cost of the synthesis process is high, especially for large-scale quantum circuits.
[0003] Reference 1 (Qiskit pulse: programming quantum computers through the cloud with pulses) developed a method to describe quantum programs as time-scheduled pulse sequences. This method takes 2,190.67 seconds to generate a pulse sequence for a 300-bit quantum multiplier circuit, which includes 191,903 single-bit gates and 121,095 two-bit gates. This time-consuming synthesis is essentially caused by the quantum gate-by-quantum pulse generation. Repeatedly calculating pulses for the same circuit pattern leads to a large number of repeated calculations. Taking a 300-bit quantum multiplier circuit as an example, we observed that 65% of the calculation time of this method is spent on the same circuit pattern.
[0004] Reference 2 (Accqoc: Accelerating quantum optimal control based pulse generation) developed a compilation technology for quantum computing that aims to accelerate the compilation process of quantum programs, especially the process of converting gate groups into pulse signals. This method uses a minimum spanning tree algorithm for group matching and dynamic updates. However, this method leads to a lower reuse rate because dynamic circuit matching updates require a lot of synthesis time. Summary of the invention
[0005] In view of the above, the purpose of the present invention is to provide a method and device for accelerating quantum waveform compilation by realizing a reusable waveform library based on convolution, reducing the synthetic calculation overhead and time of circuit pulse generation based on waveform library matching, and improving the efficiency of compiling pulse waveforms for circuits.
[0006] To achieve the above-mentioned purpose of the invention, an embodiment provides a method for accelerating quantum waveform compilation by realizing a reusable waveform library based on convolution, comprising the following steps:
[0007] Convert the quantum algorithm circuit into a circuit matrix, perform convolution operation on the circuit matrix to obtain the convolution result of each subcircuit, and build a waveform library based on the convolution result of the subcircuit and its pre-calculated waveform;
[0008] The waveform library is used to accelerate the matching compilation of the target quantum circuit to generate a pulse waveform sequence corresponding to the target quantum circuit.
[0009] Preferably, converting the quantum circuit into a circuit matrix comprises:
[0010] The circuit parameters are converted into a matrix representation. Each element in the circuit matrix represents a quantum gate in a circuit, recording the gate position and gate type. The element index records the gate position and the element value records the gate type.
[0011] Preferably, the gate types include single-bit gate RX, single-bit gate RY and dual-bit gate CZ. When constructing the circuit matrix, the element values corresponding to each type of gate include:
[0012] For the single-bit gate RX and the single-bit gate RY, the corresponding element value is in complex form, indicating the gate type and the gate rotation angle. Specifically, the real part value is used to record the gate rotation angle of the single-bit gate RX, and the imaginary part value is used to record the gate rotation angle of the single-bit gate RY;
[0013] For the two-bit gate CZ, the corresponding element value is the bit position of the operation;
[0014] For no gate operation or only one identity gate, the corresponding element value is 0.
[0015] Preferably, performing a convolution operation on the circuit matrix to obtain a convolution result of each subcircuit includes:
[0016] Convolution kernels of multiple convolution sizes are set, and the value of each convolution kernel is determined by genetic algorithm optimization. The circuit matrix is convolved based on the determined convolution kernel value and the corresponding convolution size. Each convolution size corresponds to a type of sub-circuit and a convolution result.
[0017] Preferably, the value of each convolution kernel is determined by genetic algorithm optimization, including:
[0018] Assign a random value as the initial value to each convolution kernel value, and use the initial value as an individual and apply the genetic algorithm to perform individual optimization. During the optimization process, the distance between the convolution results corresponding to the individuals is optimized as much as possible. After the optimization is completed, the value of the convolution kernel determined by optimization is obtained, wherein the convolution result corresponding to the individual is the convolution result obtained by performing a convolution operation on the circuit matrix using the value of the convolution kernel corresponding to the individual.
[0019] Preferably, the waveform library is constructed based on the convolution result of the sub-circuit and its pre-calculated waveform, comprising:
[0020] The waveform library is constructed using the convolution result of the subcircuit as the index and the pre-computed waveform of the subcircuit as the value.
[0021] Preferably, the use of the waveform library to accelerate the matching compilation of the target quantum circuit includes:
[0022] The target quantum circuit is converted into a target circuit matrix, and a convolution operation is performed on the target circuit matrix to obtain the convolution result of each sub-target circuit. The convolution result of the sub-target circuit is matched with the convolution result in the waveform library, and the pre-calculated waveform corresponding to the matched convolution result in the waveform library is used as the pulse waveform of the sub-target circuit.
[0023] Preferably, when the target quantum circuit is accelerated and matched, a matching mode of a greedy algorithm is used, and the convolution kernels are sorted in descending order according to the convolution size, starting from the convolution kernel with the largest convolution size, and the convolution kernels are selected in descending order to perform convolution operations on the target circuit matrix.
[0024] To achieve the above-mentioned purpose of the invention, the embodiment also provides a device for accelerating quantum waveform compilation based on convolution to realize a reusable waveform library, including a waveform library generation module and an accelerated matching compilation module;
[0025] The waveform library generation module is used to convert the quantum algorithm circuit into a circuit matrix, perform a convolution operation on the circuit matrix to obtain a convolution result of each subcircuit, and construct a waveform library based on the convolution result of the subcircuit and its pre-calculated waveform;
[0026] The accelerated matching compilation module is used to perform accelerated matching compilation on the target quantum circuit using the waveform library to generate a pulse waveform sequence corresponding to the target quantum circuit.
[0027] Compared with the prior art, the present invention has the following beneficial effects:
[0028] The present invention accelerates the pulse generation of quantum circuits by constructing a pulse library, which provides significant pulse generation acceleration and reduces computational overhead compared to the current most advanced methods. Furthermore, the present invention exhibits high scalability and can support the synthesis of hundreds of bits.
[0029] The present invention takes into account that there are many repeated sub-circuit structures in quantum algorithm circuits, and proposes a pulse library that covers reusable patterns derived from various circuit benchmarks, and uses convolution operations to identify sub-circuits reused by multiple circuit benchmarks;
[0030] The present invention adopts a matching mode of a greedy algorithm in the process of accelerating matching compilation, and allocates blocks that share the same subcircuit in a waveform library to achieve end-to-end acceleration and reduce computational overhead. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0032] Figure 1 A flowchart of a method for accelerating quantum waveform compilation by implementing a reusable waveform library based on convolution provided in an embodiment;
[0033] Figure 2 The accelerated matching compilation process diagram provided by the embodiment;
[0034] Figure 3 A comparison chart of the accelerated matching compilation provided by the embodiment and the existing time series-based compilation;
[0035] Figure 4 It is a schematic diagram of the structure of a device for accelerating quantum waveform compilation by implementing a reusable waveform library based on convolution provided in an embodiment. DETAILED DESCRIPTION
[0036] To make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation methods described herein are only used to explain the present invention and do not limit the scope of protection of the present invention.
[0037] The inventive concept of the present invention is: in order to shorten the compilation and synthesis time of quantum circuits and reduce the compilation and synthesis computational overhead, the present invention proposes a waveform library containing reusable subcircuits to reduce the total synthesis time of pulse generation, and the waveform library is based on pre-calculated pulses from reusable subcircuits of various circuit benchmarks. For the target quantum circuit, a matching mode of a greedy algorithm is developed to directly obtain the pulses of the matching subcircuit from the waveform library without calculating the pulses gate by gate, so as to achieve the technical effect of reducing the compilation and synthesis time and reducing the compilation and synthesis computational overhead.
[0038] Based on the above invention concept, Figure 1As shown, the embodiment provides a method for accelerating quantum waveform compilation by implementing a reusable waveform library based on convolution, comprising the following steps:
[0039] S110, converting the quantum algorithm circuit into a circuit matrix, performing a convolution operation on the circuit matrix to obtain a convolution result of each subcircuit, and constructing a waveform library based on the convolution result of the subcircuit and its pre-calculated waveform.
[0040] In the embodiment, to establish a waveform library, the circuit is first parameterized into a circuit matrix, where each element in the circuit matrix represents a quantum gate of a circuit, and records the gate position and gate type, wherein the element index records the gate position, and the element value records the gate type. Then, a convolution operator is applied to the circuit matrix to extract the features of the subcircuit block into a single value. By setting a carefully designed convolution kernel, blocks with the same value represent the same circuit features and are identified as reusable subcircuits.
[0041] Specifically, for a quantum circuit with N bits and M layers, the size of the circuit matrix is N×M. For example, each element en,m in the nth row and mth column of the circuit matrix corresponds to a gate that operates on the qn-bit time axis on the mth layer. After the circuit transformation in the embodiment, only three types of basic gates are considered: single-bit gate RX, single-bit gate RY, and double-bit gate CZ. Specifically, when constructing the circuit matrix, the element values corresponding to each type of gate include:
[0042] For the single-bit gate RX and the single-bit gate RY, the corresponding element value is in complex form, indicating the gate type and the gate rotation angle. Since the current superconducting quantum hardware does not implement z-axis rotation, complex values are used to record the gate rotation angle on the x-axis (RX gate) or y-axis (RY gate), using real or imaginary values. Specifically, the real value is used to record the gate rotation angle of the single-bit gate RX, and the imaginary value is used to record the gate rotation angle of the single-bit gate RY. For example, the value of the RY gate, the rotation angle is π / 4, is π / 4i.
[0043] For a two-bit gate CZ, the corresponding element value is the bit position of the operation. For example, there is a two-bit gate CZ in the kth layer, and the bits operated are located on the nth and nth time axes, and their values are expressed as β×(n-n') and β×(n-n')i. β×(n-n') is the value of the control bit, and β×(n-n')i is the value of the target bit. β is a constant determined by the voltage bias of the CZ gate.
[0044] For no gate operation or only one identity gate (wait cycle for single-bit gate), the corresponding element value is 0.
[0045] In summary, gate positions are encoded as indices of elements in the matrix, and gate parameters are encoded as values. A block in the circuit corresponds to a submatrix, and this encoding scheme ensures that the entire circuit can be fully converted into a quantitative manner.
[0046] In an embodiment, when performing a convolution operation on a circuit matrix, convolution kernels of multiple convolution sizes are set, and the value of each convolution kernel is determined by optimizing through a genetic algorithm. The circuit matrix is convolved based on the determined convolution kernel value and the corresponding convolution size, and each convolution size corresponds to a type of sub-circuit and a convolution result.
[0047] Convolution-based quantization uses a convolution kernel to perform a convolution operation on the circuit matrix, which acts like a sliding window in the circuit and performs a dot product within the window. For a convolution kernel K of size r×s r,s , the sliding window includes r bits in s layers. The convolution result is denoted as conv_rst. The convolution kernel is designed to ensure that sub-matrices containing the same elements always produce the same convolution result. The same conv_rst indicates that the same sub-circuit appears in the circuit, corresponding to the same sub-matrix.
[0048] The convolution operation is applied to each sub-matrix in the circuit, and the input circuit can be reconstructed as a collection of multiple convolution results. The size of the convolution kernel determines the size of each sub-matrix. In order to accurately extract the patterns corresponding to more potential sub-circuits, convolution kernels of different sizes were tried. Considering that larger convolution kernel sizes may bring higher acceleration but require more computing time, convolution kernels with sizes of 3×3, 4×2, 2×4, 3×2, 2×3, 2×2, and 1×2 were empirically selected. Specifically, when performing the convolution operation, the convolution kernels are used in the order of the convolution kernel size, where smaller convolution kernels allow for finer matching.
[0049] The value of the convolution kernel is assigned to distinguish different subcircuit modes, which have different convolution results. This ensures that the same mode always shares the same value, while different modes produce different results. In order to achieve this, a genetic algorithm is used to optimize the value of the convolution kernel. Specifically, a random value is assigned to the value of each convolution kernel as an initial value, and the initial value is used as an individual and the genetic algorithm is applied to perform individual optimization. During the optimization process, the distance between the individual corresponding convolution results is as large as possible as the optimization goal. After the optimization is completed, the value of the convolution kernel determined by optimization is obtained, where the individual corresponding convolution result is: the convolution result obtained by performing a convolution operation on the circuit matrix using the value of the individual corresponding convolution kernel.
[0050] Specifically, the values of the convolution kernels are initially assigned random values ranging from 1 to 10, and the values of the convolution kernels are optimized using a genetic algorithm (GA) using a dataset of 15 benchmarks ranging from 6 to 10 bits. A set of random values are first generated for each convolution kernel as candidate values, and then the GA algorithm is applied to perform a random search, iteratively adjusting the values and evaluating the candidate convolution kernels. In each iteration, we update the values of the convolution kernels by random selection and modification, using the crossover and mutation steps in the GA algorithm. The search stops once the maximum number of iterations is exceeded, or there are no further updates within 3 iterations. According to the test, such constraints are sufficient to distinguish patterns in the circuits of the dataset.
[0051] In the embodiment, after the circuit matrix is convolved to obtain the convolution result of each subcircuit, a waveform library is constructed based on the convolution result of the subcircuit and its pre-calculated waveform. Specifically, when constructing the waveform library, the convolution result of the subcircuit is used as an index and the pre-calculated waveform of the subcircuit is used as a value to construct the waveform library.
[0052] Specifically, 2-5-bit circuits of 15 quantum algorithms were selected, totaling 60 quantum circuits, and these quantum circuits were transformed using the Python-based framework Qiskit to conform to hardware constraints, such as basic gate decomposition and quantum processor topology. The number of subcircuit patterns marked in the pulse library directly affects the efficiency of circuit matching. In other words, a trade-off needs to be made between the library storage overhead and the number of extracted patterns. To solve this problem, a threshold is set to determine the number of subcircuit patterns in the pulse library, which is formulated as the frequency of subcircuit patterns that appear in the benchmark circuit. Subcircuit patterns below the threshold are filtered out, while subcircuit patterns with high repetition frequencies are included to construct the pulse library. When constructing the pulse library, large-scale circuits and small-scale circuits share many of the same subcircuit patterns. This is because quantum circuits are currently usually orchestrated from highly specialized quantum algorithms, which often contain structural subcircuits. For example, the circuits of the QFT algorithm contain CZ gates that are iteratively applied from each bit to other bits, resulting in repeated patterns when they are converted into basic gates.
[0053] S120, using the waveform library to perform accelerated matching compilation on the target quantum circuit to generate a pulse waveform sequence corresponding to the target quantum circuit.
[0054] In the embodiment, Figure 2 As shown, when the waveform library is used to accelerate the matching compilation of the target quantum circuit, the target quantum circuit is converted into a target circuit matrix, and a convolution operation is performed on the target circuit matrix to obtain the convolution result of each sub-target circuit, and the convolution result of the sub-target circuit is matched with the convolution result in the waveform library, and the pre-calculated waveform corresponding to the matched convolution result in the waveform library is used as the pulse waveform of the sub-target circuit.
[0055] Using different convolution kernels to identify reusable subcircuit patterns may result in multiple subcircuit patterns matching the same subcircuit. In order to avoid redundant computation, a greedy algorithm for matching patterns is proposed, which prioritizes the reuse opportunities of convolution kernels and always compares the convolution results conv_rsts from larger convolution kernels before performing smaller convolution kernels. Specifically, P is defined as the output pulse waveform sequence of the target quantum circuit. The convolution kernels are sorted in descending order according to the convolution size, starting with the convolution kernel with the largest convolution size, and the convolution kernels are selected in descending order to perform convolution operations on the target circuit matrix. For each convolution kernel, a convolution operation is used on the circuit to obtain a set of convolution results, and then the matching convolution conv_rsts is searched in the pulse library. After successfully finding the matching submatrix for the current subcircuit pattern, the submatrix is collected and the search involving gates is terminated.
[0056] The embodiment also compares the accelerated matching compilation of the present invention with the existing time series-based compilation. The comparison results are as follows: Figure 3 As shown, Figure 3 (a) in the figure is a waveform sequence generated according to a time series. It can be seen that a waveform needs to be generated for each gate, which requires a lot of waveform synthesis time and calculation overhead. Figure 3 (b) and (c) in the figure are waveform sequences generated by accelerating matching compilation according to the present invention, which can generate waveforms for a subcircuit containing multiple gates once, which greatly reduces waveform synthesis time and calculation overhead.
[0057] Based on the same inventive concept, Figure 4 As shown, the embodiment further provides a device 400 for accelerating quantum waveform compilation based on a reusable waveform library using convolution, including a waveform library generation module 410 and an accelerated matching compilation module 420, wherein the waveform library generation module is used to convert the circuit corresponding to the quantum algorithm into a circuit matrix, perform a convolution operation on the circuit matrix to obtain the convolution result of each subcircuit, and construct the waveform library 410 based on the convolution result of the subcircuit and its pre-calculated waveform; the accelerated matching compilation module 420 is used to perform accelerated matching compilation on the target quantum circuit using the waveform library to generate a pulse waveform sequence corresponding to the target quantum circuit.
[0058] The specific process executed by the waveform library generation module 410 and the accelerated matching compilation module 420 is detailed in the above S110 and S120, which will not be repeated here.
[0059] The method and device for accelerating quantum waveform compilation by realizing a reusable waveform library based on convolution provided in the above embodiment include a waveform library generation stage and a circuit matching waveform sequence generation stage. For the waveform library generation stage, its purpose is to extract the sub-circuit structure commonly used in the algorithm circuit and generate the corresponding waveform. For the circuit matching waveform sequence generation stage, its purpose is to identify whether the sub-circuit structure in the new input circuit matches the sub-circuit structure in the waveform library. If the match is successful, waveform reuse is achieved, thereby realizing compilation optimization at the waveform generation level. Through experiments, compared with the two existing technologies in the background technology, the pulse generation time is accelerated by 158.46 times and 16.03 times, and the end-to-end synthesis time is accelerated by 10.91 times and 1.21 times respectively. The pulse library of the present invention shows a reuse rate of up to 82.3% on 15 circuit benchmarks.
[0060] The specific implementation methods described above provide a detailed description of the technical solutions and beneficial effects of the present invention. It should be understood that the above is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, supplements and equivalent substitutions made within the scope of the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for accelerating quantum waveform compilation by realizing a reusable waveform library based on convolution, characterized in that: The following steps are involved: Converting a quantum circuit into a circuit matrix includes: converting circuit parameters into a matrix representation, wherein each element in the circuit matrix represents a quantum gate in a circuit, and records a gate position and a gate type, wherein an element index records a gate position, and an element value records a gate type; Performing a convolution operation on the circuit matrix to obtain a convolution result of each subcircuit, including: setting convolution kernels of multiple convolution sizes, optimizing and determining the value of each convolution kernel through a genetic algorithm, performing a convolution operation on the circuit matrix based on the determined convolution kernel value and the corresponding convolution size, each convolution size corresponding to a type of subcircuit and a convolution result; A waveform library is constructed based on the convolution result of the subcircuit and its pre-calculated waveform, including: using the convolution result of the subcircuit as an index and the pre-calculated waveform of the subcircuit as a value to construct the waveform library; using the waveform library to accelerate matching and compile the target quantum circuit to generate a pulse waveform sequence corresponding to the target quantum circuit, including: converting the target quantum circuit into a target circuit matrix, performing a convolution operation on the target circuit matrix to obtain the convolution result of each sub-target circuit, matching the convolution result of the sub-target circuit with the convolution result in the waveform library, and using the pre-calculated waveform corresponding to the matched convolution result in the waveform library as the pulse waveform of the sub-target circuit.
2. The method for accelerating quantum waveform compilation by realizing a reusable waveform library based on convolution according to claim 1, characterized in that: The gate types include single-bit gate RX, single-bit gate RY and dual-bit gate CZ. When constructing a circuit matrix, the element values corresponding to each type of gate include: For the single-bit gate RX and the single-bit gate RY, the corresponding element value is in complex form, indicating the gate type and the gate rotation angle. Specifically, the real part value is used to record the gate rotation angle of the single-bit gate RX, and the imaginary part value is used to record the gate rotation angle of the single-bit gate RY; For the two-bit gate CZ, the corresponding element value is the bit position of the operation; For no gate operation or only one identity gate, the corresponding element value is 0.
3. The method for accelerating quantum waveform compilation by realizing a reusable waveform library based on convolution according to claim 1, characterized in that: The value of each convolution kernel is determined by genetic algorithm optimization, including: Assign a random value as the initial value to each convolution kernel value, and use the initial value as an individual and apply the genetic algorithm to perform individual optimization. During the optimization process, the distance between the convolution results corresponding to the individuals is optimized as much as possible. After the optimization is completed, the value of the convolution kernel determined by optimization is obtained, wherein the convolution result corresponding to the individual is the convolution result obtained by performing a convolution operation on the circuit matrix using the value of the convolution kernel corresponding to the individual.
4. The method for accelerating quantum waveform compilation by realizing a reusable waveform library based on convolution according to claim 1, characterized in that: When accelerating the matching compilation of the target quantum circuit, the matching mode of the greedy algorithm is adopted. The convolution kernels are sorted in descending order according to the convolution size. Starting from the convolution kernel with the largest convolution size, the convolution kernels are selected in descending order to perform convolution operations on the target circuit matrix.
5. A device for accelerating quantum waveform compilation based on convolution to realize a reusable waveform library, characterized in that: Including waveform library generation module and accelerated matching compilation module; The waveform library generation module is used to convert the quantum circuit into a circuit matrix, including: converting the circuit parameters into a matrix representation, each element in the circuit matrix represents a quantum gate in a circuit, recording the gate position and gate type, wherein the element index records the gate position, and the element value records the gate type; The waveform library generation module is also used to perform a convolution operation on the circuit matrix to obtain a convolution result of each subcircuit, including: setting convolution kernels of multiple convolution sizes, optimizing and determining the value of each convolution kernel through a genetic algorithm, and performing a convolution operation on the circuit matrix based on the determined convolution kernel value and the corresponding convolution size, wherein each convolution size corresponds to a type of subcircuit and a convolution result; The waveform library generation module is also used to construct a waveform library based on the convolution result of the subcircuit and its pre-calculated waveform, including: using the convolution result of the subcircuit as an index and the pre-calculated waveform of the subcircuit as a value to construct the waveform library; The accelerated matching compilation module is used to perform accelerated matching compilation on the target quantum circuit using the waveform library to generate a pulse waveform sequence corresponding to the target quantum circuit, including: converting the target quantum circuit into a target circuit matrix, performing a convolution operation on the target circuit matrix to obtain a convolution result of each sub-target circuit, matching the convolution result of the sub-target circuit with the convolution result in the waveform library, and using the pre-calculated waveform corresponding to the matched convolution result in the waveform library as the pulse waveform of the sub-target circuit.
