AWG waveform compression transmission method for quantum computing
Patent Information
- Application Number
- CN202512045474.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2045-12-31
AI Technical Summary
[0005]本发明提供一种用于量子计算的AWG波形压缩传输方法,解决现有量子通信技术在针对两字脉冲波形进行压缩处理过程中,在保持较高量子保真度的情况下进行有效压缩的速度效率不高的问题
1、在压缩处理的前端即引入波形线段特征检测机制,将目标量子脉冲波形区分为第一类波段和第二类波段,对量子门保真度高度敏感的波段,不引入额外的数值逼近误差,避免通用有损压缩中因误差累积导致的幅度漂移、相位偏移或频谱泄露问题;
Smart Images

Figure CN121860081B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and specifically to an AWG waveform compression transmission method for quantum computing. Background Technology
[0002] Quantum computing is a novel computing paradigm that manipulates quantum information units according to the laws of quantum mechanics. In mainstream quantum computing systems such as superconducting and ion traps, precise manipulation of qubits relies on high-fidelity microwave or optical pulse sequences generated by arbitrary waveform generators (AWGs). These pulses typically have specific physical models, such as Gaussian pulses for single-qubit gate operations, DRAG pulses designed to suppress spectral leakage, and square wave pulses for coupling modulation.
[0003] To ensure sufficiently high fidelity in quantum gate operations (typically >99.9%), these pulse waveforms require extremely high sampling rates (typically ≥1 GS / s) and amplitude resolution (typically 12-16 bits) for accurate description. This directly results in an enormous amount of raw data for a single pulse. For a medium-sized quantum processor, the total amount of waveform data generated by its complete calibration and gate operation sequence can reach GB or even TB levels, posing a significant challenge to the storage depth of the AWG in the control system, the data transmission bandwidth between the host computer and the hardware, and the real-time control capabilities. Therefore, efficient compression of quantum pulse waveform data has become a key technical requirement for reducing system complexity and improving scalability.
[0004] Current technologies for quantum pulse waveform compression suffer from low efficiency because general compression algorithms do not consider the characteristic modes of quantum pulse waveforms. Existing general lossless compression algorithms cannot achieve ideal compression ratios; meanwhile, general lossy compression algorithms, in pursuit of high compression ratios, introduce distortions incompatible with quantum fidelity metrics, failing to achieve effective compression while maintaining the fundamental premise of "high precision in quantum operations." Therefore, existing quantum waveform compression and decompression technologies cannot meet the speed and efficiency requirements of real-time quantum computing. Summary of the Invention
[0005] This invention provides an AWG waveform compression and transmission method for quantum computing, which solves the problem that existing quantum communication technologies are not efficient in effectively compressing two-word pulse waveforms while maintaining high quantum fidelity.
[0006] This invention is achieved through the following technical solution: An AWG waveform compression transmission method for quantum computing, the method comprising: Step S1: Set waveform segment feature detection to extract the target quantum waveform into first-class and second-class bands, and independently set up independent compression storage for special waveforms for all first-class bands. Step S2: Set up a piecewise approximation algorithm to perform linear regression analysis on all second-type bands, and perform linear regression data compression on the second-type bands based on the linear regression analysis to generate first-order compressed bands; Step S3: Perform line segment similarity judgment on all first-order compressed bands one by one by comparing the similarity of every two first-order compressed bands, and screen out the first-order compressed bands that meet the line segment similarity judgment. Step S4: Perform run-length encoding compression on the screened first-order compressed bands to generate second-order compressed bands, and encapsulate the data formats of the remaining first-order compressed bands and all second-order compressed bands in a unified manner to complete the target quantum waveform compression. The waveform types of the first type of band include constant sequence waveforms, linear sequence waveforms, and repeating sequence waveforms, and the independent compression storage is set independently for constant sequence, linear sequence, and repeating sequence, respectively.
[0007] Furthermore, the waveform segment feature detection process of the constant sequence waveform is set as follows: A preset constant tolerance threshold is used to statistically analyze the amplitude of each sampling point within the target quantum waveform's detection band. When the maximum absolute difference between the amplitude of any sampling point within the detection band and the average value of the sampling points in the detection band is less than the constant tolerance threshold, the detection band is determined to be a constant sequence waveform.
[0008] Furthermore, the independent compressed storage format of the constant sequence waveform is set as follows: The band is compressed and stored as a data structure containing a band type identifier, a representative amplitude parameter, and a band length parameter. The representative amplitude parameter is used to characterize the amplitude characteristics of the constant sequence, and the band length parameter is used to characterize the number of sampling points corresponding to the constant sequence.
[0009] Furthermore, the waveform segment feature detection process for the linear sequence waveform is set as follows: A preset linear judgment threshold is used to construct a discrete-time index sequence t=[0,1,...,n-1] for continuous sampling points in the band to be detected. T The least squares method is used to perform linear fitting on the sampling points to solve for the first slope parameter k1 and the first intercept parameter b1 of the linear function, wherein the first slope parameter and the first intercept parameter satisfy the following minimization condition of the objective function: ; The optimal solutions for the first slope parameter k1 and the first intercept parameter b1 are obtained according to the minimized objective function, and the fitting error is calculated based on the optimal solutions for the first slope parameter k1 and the first intercept parameter b1; the fitting error is denoted as ϵ. linear , The formula for calculating the fitting error is as follows: ; When the fitting error is less than the preset linearity determination threshold, the band to be detected is determined to be a linear sequence.
[0010] Furthermore, the independent compressed storage format of the linear sequence waveform is set as follows: The linear sequence is compressed and stored in a parameterized form. The compressed storage includes at least: a type identifier indicating the type of the linear sequence, the first slope parameter, the first intercept parameter, and the number of sampling points corresponding to the linear sequence.
[0011] Furthermore, the waveform segment feature detection process for the repeating sequence waveform is set as follows: A preset repetition error threshold is used to segment the target quantum waveform into its target band. A candidate repetition pattern P with a waveform length of L is set, and the target quantum waveform is divided into multiple continuous waveform segments S of the same length L. j , where the subscript j represents the ordinal number of the waveform segment to be processed, and let j = 1, 2, ..., m, and set m = ⌊n2 / L⌋, where n2 is the total number of data points of the target quantum waveform; Construct a similarity metric function, which is used to measure the similarity between candidate pattern P and each waveform segment S to be processed. j The similarity between them; set the similarity measurement function as corr, The formula for calculating the similarity measurement function is then set as follows: , When the candidate repetition pattern P matches the total waveform segments to be processed S j When the similarity measurement function values are all less than the repetition error threshold, the candidate repetition pattern P is determined to constitute a valid repetition band, and the band to be detected is determined to be a repetition sequence waveform.
[0012] Furthermore, the independent compressed storage format of the repeating sequence waveform is set as follows: The corresponding quantum waveform data is stored in a repeating pattern compression format, wherein the repeating pattern compression format includes at least a type identifier field, a pattern data field, and a repeat count field; The type identifier field is used to identify the repetition pattern type, the pattern data field is used to represent the candidate repetition pattern, and the repetition count field is used to represent the number of times the candidate repetition pattern is repeated; by storing the candidate repetition pattern and its repetition count, the corresponding multiple segments of repetition waveform data in the target quantum waveform are replaced.
[0013] Furthermore, the piecewise approximation algorithm is further defined as follows: An error tolerance threshold is preset for all second-type bands in the target quantum waveform; taking any sampling point of each second-type band as the starting point, the line segment where the current starting point is located is gradually expanded along the time series direction; in each expansion process, based on the set of sampling points between the current starting point and the ending point, the linear regression parameters of the current line segment are calculated using the least squares method, wherein the linear regression parameters include a second slope parameter and a second intercept parameter; the calculation of the linear regression parameters is completed based on the cumulative statistics constructed by local indexes, wherein the cumulative statistics include at least the index sum, amplitude sum, index square sum, and the product sum of the index and amplitude, thereby obtaining the closed-form solution of the linear regression; After each extension endpoint, the fitting error of each sampling point within the current line segment is calculated based on the second slope parameter and the second intercept parameter. When the maximum absolute error in the fitting error exceeds the error tolerance threshold, the extension of the current line segment is terminated, and the current line segment is determined as a valid first-order compressed band. The error tolerance threshold is used to limit the maximum amplitude deviation allowed by the piecewise linear approximation.
[0014] Furthermore, the line segment similarity determination process is set as follows: Preset slope tolerance threshold ε k Translation tolerance threshold ε b Label any two first-order compressed bands for similarity comparison as the first regression line segment S. a Second regression line segment S b The first regression line segment S is determined only if the following conditions are met simultaneously. a Second regression line segment S b They have line segment similarity: , Where, k in the formula a With k b These respectively represent the first regression line segment S a Second regression line segment S b The third slope parameter, b in the formula a With b b These represent the first regression line segment S respectively. a Second regression line segment S b The third intercept parameter, L a With Lb These represent the first regression line segment S respectively. a Second regression line segment S b The length of the regression line segment.
[0015] Furthermore, the average of the sampling points is the arithmetic mean of the amplitudes of all sampling points within the band, and the constant tolerance threshold is used to limit the upper limit of amplitude fluctuation of the constant sequence within the allowable error range of quantum operations. Compared with the prior art, the present invention has the following advantages and beneficial effects: 1. A waveform segment feature detection mechanism is introduced at the front end of the compression process to classify the target quantum pulse waveform into the first type of band and the second type of band. For the band that is highly sensitive to the quantum gate fidelity, no additional numerical approximation error is introduced, thus avoiding the amplitude drift, phase shift or spectral leakage problems caused by error accumulation in general lossy compression. 2. By adopting a processing strategy of segmenting, splitting, and merging, different processing paths are used for bands of different complexities. This hierarchical processing mechanism significantly reduces the scale of data involved in complex calculations, thereby reducing the overall time complexity of the algorithm, avoiding high-complexity calculations on the full data, and improving the speed and efficiency of compression and decompression processing. 3. By introducing line segment similarity determination at the first-order compressed band level, bands with highly similar or even identical parameters can be identified. Furthermore, they can be merged and expressed through run-length encoding, so that only one parameter expansion is needed for the representative band during the decompression stage, and then the waveform reconstruction is performed based on the number of runs, thereby improving the waveform reconstruction speed during the decompression process. Attached Figure Description
[0016] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention. Example
[0018] like Figure 1 As shown, this embodiment is an AWG waveform compression transmission method for quantum computing, which includes: Step S1: Set waveform segment feature detection to extract the target quantum waveform into first-class and second-class bands, and independently set up independent compression storage for special waveforms for all first-class bands. Step S2: Set up a piecewise approximation algorithm to perform linear regression analysis on all second-type bands, and perform linear regression data compression on the second-type bands based on the linear regression analysis to generate first-order compressed bands; Step S3: Perform line segment similarity judgment on all first-order compressed bands one by one by comparing the similarity of every two first-order compressed bands, and screen out the first-order compressed bands that meet the line segment similarity judgment. Step S4: Perform run-length encoding compression on the screened first-order compressed bands to generate second-order compressed bands, and encapsulate the data formats of the remaining first-order compressed bands and all second-order compressed bands in a unified manner to complete the target quantum waveform compression. The waveform types of the first type of band include constant sequence waveforms, linear sequence waveforms, and repeating sequence waveforms, and the independent compression storage is set independently for constant sequence, linear sequence, and repeating sequence, respectively.
[0019] The waveform segment feature detection method divides the target quantum waveform into several continuous waveform segments. Based on whether each waveform segment satisfies constant change characteristics, linear change characteristics, or repetitive pattern characteristics, the corresponding waveform segments are marked as either first-class or second-class waveform segments. In specific implementations, the detection method may involve traversing and analyzing the sampling point sequence of the target quantum waveform on the time axis, detecting the amplitude difference, rate of change, and waveform repeatability of adjacent sampling points. By performing segment-level feature detection on the target quantum waveform, waveform segments with stable structural characteristics are identified as first-class waveform segments, and the remaining waveform segments are classified as second-class waveform segments. For the first-class waveform segments, instead of using a general compression method, independent compression and storage mechanisms matching constant sequences, linear sequences, and repetitive sequences are set up according to their corresponding waveform structure types, allowing for separate storage and rapid reconstruction of the first-class waveform segments in a parameterized manner.
[0020] The stable structural characteristics refer to the predictability and parameterization of the amplitude distribution, trend, or morphological pattern of a quantum waveform within a conventional time scale and the allowable error range of quantum operations. The constant sequence, linear sequence, and repetitive sequence in the conventional sequence characteristics correspond to amplitude stability, trend stability, and pattern stability, respectively, and can all be equivalently represented by a small number of parameters to the original waveform data. The constant sequence exhibits essentially consistent amplitudes at each sampling point within its band, commonly found in pulse flat-top regions and idle waiting areas, with no obvious trend or change in waveform on the time axis. The linear sequence shows approximately linear amplitude changes with time, without abrupt changes, inflection points, or high-frequency oscillations, commonly found at pulse rising edges, falling edges, and smooth transition segments. The repetitive sequence indicates that the waveform exhibits periodic or block-like repetition on the time axis; its essence is that a single pattern can be reused multiple times, commonly found in repetitive gate operations and periodic modulation, belonging to "structural-level stability," with stability spanning multiple time intervals.
[0021] For the second type of bands not identified as having stable structural features, they are further divided into several sub-bands according to a preset segmentation rule. For each sub-band, a linear regression method is used to establish a linear relationship model between time and amplitude, and the parameters of this linear model are used to replace the original high-sampling-rate waveform data, thereby achieving compression. The segmented approximation algorithm is used to divide the second type of bands into multiple sub-bands that satisfy linear variation constraints, and to perform linear regression calculations on the sampling points within each sub-band to obtain the corresponding linear model parameters. By replacing the original sampling point data with the linear model parameters and sub-band length information, linear regression data compression of the second type of bands is achieved, thereby generating the corresponding first-order compressed bands. The first-order compressed band is an intermediate compression amount obtained based on linear regression, indicating that the amount of data has been significantly reduced, but band-level structural information is still retained. Subsequent steps (such as line segment similarity determination and run-length encoding) use the first-order compressed band as the basic processing unit to continue further compression.
[0022] Similarity comparisons are performed between every two first-order compressed bands, meaning each first-order compressed band is compared with the other. In a preferred implementation, the first-order compressed bands are denoted as B1, B2, ..., Bm in chronological order; r represents the ordinal number, and similarity comparisons are performed sequentially between Br and Br+1. This method is primarily used to detect temporally consecutive similar segments, providing a foundation for subsequent run-length encoding. The first-order compressed bands obtained through linear regression compression are compared pairwise in chronological order. By comparing the slope, amplitude, and band length parameters of two adjacent or preset-range first-order compressed bands, when the parameter difference meets a preset similarity threshold, the corresponding first-order compressed band is determined to be a structurally similar band, and these structurally similar bands are selected for subsequent run-length encoding processing. After linear regression compression of the quantum pulse waveform and identification of similar bands, parametric run-length encoding is performed on recurring first-order compressed bands to further merge band redundancy. Simultaneously, the second-order compressed bands generated by run-length encoding are organized and output with the unmerged first-order compressed bands according to a unified data format. This ensures accurate waveform reconstruction while achieving overall compression of the target quantum waveform. In practice, decompression is performed by reversing the compression process, i.e., reconstructing the line segment and waveform for each compressed segment.
[0023] During waveform compression, the first type of bands with different mathematical structural characteristics are subdivided and modeled. Each type of band is then assigned a dedicated compression description method and storage format that matches its structural characteristics, thus replacing the original sampling point storage with a parameterized approach. The constant sequence waveform refers to a band whose waveform amplitude remains constant or changes less than a preset threshold within a continuous time interval. The linear sequence waveform refers to a sequence within a band whose waveform amplitude changes approximately linearly with time, such as the slowly rising or falling edges of control pulses. The repetitive sequence waveform refers to sequence segments that appear multiple times on the time axis and have the same or highly similar waveform shapes, such as periodic calibration pulses or repetitive gate operation pulses. Independent compression storage means that for the detected constant sequence waveforms, linear sequence waveforms, and repetitive sequence waveforms, a parameterized description method matching their waveform structure is used for compression storage. The constant sequence waveform is stored using amplitude parameters and interval length; the linear sequence waveform is stored using the initial amplitude and slope; and the repetitive sequence waveform is stored using a reference waveform template and the number of repetitions, replacing the point-by-point storage of the original sampling point sequence.
[0024] As one example implementation, the run-length encoding compression is further defined as follows: The first-order compressed bands obtained by linear regression are arranged in chronological order to form a line segment sequence. Each line segment in the line segment sequence contains at least the slope parameter, intercept parameter and band length parameter of the corresponding band. The first line segment in the line segment sequence is taken as the current reference line segment, and the repetition count value of the current reference line segment is initialized; the subsequent line segments in the line segment sequence are selected in sequence, and the line segment similarity is determined between the subsequent line segments and the current reference line segment. The line segment similarity determination is based at least on whether the differences between the slope parameter, intercept parameter and band length parameter of the corresponding line segments are less than preset thresholds. When the subsequent line segment and the current reference line segment meet the line segment similarity determination, the repetition count value of the current reference line segment is increased; when the subsequent line segment and the current reference line segment do not meet the line segment similarity determination, the slope parameter, intercept parameter, band length parameter and their corresponding repetition count value of the current reference line segment are written as a set of run-length encoded data into the compression result sequence, and the subsequent line segment is updated as the new current reference line segment, while its repetition count value is reset. The process continues until all segments in the line segment sequence have been traversed to obtain compressed band data containing at least a set of line segment parameters and corresponding repetition counts.
[0025] Furthermore, as a feasible implementation method, the waveform segment feature detection process of the constant sequence waveform is set as follows: A preset constant tolerance threshold is used to statistically analyze the amplitude of each sampling point within the target quantum waveform's detection band. When the maximum absolute difference between the amplitude of any sampling point within the detection band and the average value of the sampling points in the detection band is less than the constant tolerance threshold, the detection band is determined to be a constant sequence waveform.
[0026] The waveform segment feature detection process for the constant sequence waveform includes: setting a preset constant tolerance threshold; statistically analyzing the amplitude of each sampling point within the target quantum waveform's detection band; calculating the mean amplitude of the sampling points within the detection band; and determining the detection band as a constant sequence waveform when the maximum absolute difference between the amplitude of any sampling point within the detection band and the mean is less than the constant tolerance threshold. The constant tolerance threshold refers to an upper limit for amplitude tolerance set during system initialization or algorithm configuration. Its physical meaning in specific implementations corresponds to the amplitude quantization resolution of the AWG, the acceptable amplitude error range of the quantum system, and system stability indicators. By setting this threshold, minor amplitude fluctuations caused by sampling noise, analog-to-digital conversion jitter, and other factors can be avoided from being misjudged as non-constant waveforms. Within the detection band, statistically analyzing the amplitude of all sampling points and calculating the mean effectively reflects the overall amplitude level of the band. Compared to selecting a single sampling point as a reference, the mean is more robust to outliers and helps suppress the influence of local spikes or transient disturbances on the judgment result. Calculating the maximum absolute difference between the amplitude of any sampling point and the mean of the sampling points within the tested band helps reflect the amplitude fluctuation under the "most unfavorable condition" within that band. As long as the most extreme deviation is still less than the tolerance threshold, the entire band can be considered equivalent to a constant in engineering terms. In specific implementation, the detection judgment form can be set as follows: using judgment conditions: ,in The mean of the sequence. This is a constant tolerance threshold.
[0027] Furthermore, as a feasible implementation, the independent compressed storage format of the constant sequence waveform is set as follows: The band is compressed and stored as a data structure containing a band type identifier, a representative amplitude parameter, and a band length parameter. The representative amplitude parameter is used to characterize the amplitude characteristics of the constant sequence, and the band length parameter is used to characterize the number of sampling points corresponding to the constant sequence.
[0028] The constant band, originally represented by high sampling rate and multiple sampling points, is transformed into a parameterized data structure with clearly defined field meanings. This essentially transforms the constant sequence waveform from a "sampling point-level representation" to a "structural parameter-level representation." The band type identifier indicates the waveform category corresponding to the compressed band, clarifying whether it belongs to a constant sequence waveform, or a nonlinear or repetitive sequence, and enabling the decompression end to invoke the corresponding decoding and reconstruction logic based on the type identifier. The representative amplitude parameter characterizes the overall amplitude level of the constant sequence waveform, specifically including the mean amplitude of the sampling points within the detected band, the nominal amplitude selected under tolerance constraints, etc. Its function includes directly copying the amplitude parameter to the corresponding number of sampling points during decompression, avoiding redundant storage of amplitude values from multiple sampling points, etc. The band length parameter characterizes the number of sampling points corresponding to the constant sequence, clarifying the duration of the constant band on the time axis, and providing necessary boundary information for the decompression end to reconstruct the complete waveform.
[0029] Furthermore, as a feasible implementation method, the waveform segment feature detection process of the linear sequence waveform is set as follows: A preset linear judgment threshold is used to construct a discrete-time index sequence t=[0,1,...,n-1] for continuous sampling points in the band to be detected. T The least squares method is used to perform linear fitting on the sampling points to solve for the first slope parameter k1 and the first intercept parameter b1 of the linear function, wherein the first slope parameter and the first intercept parameter satisfy the following minimization condition of the objective function: ; The optimal solutions for the first slope parameter k1 and the first intercept parameter b1 are obtained according to the minimized objective function, and the fitting error is calculated based on the optimal solutions for the first slope parameter k1 and the first intercept parameter b1; the fitting error is denoted as ϵ. linear , The formula for calculating the fitting error is as follows: ; When the fitting error is less than the preset linearity determination threshold, the band to be detected is determined to be a linear sequence.
[0030] A discrete-time index sequence is constructed to explicitly use the sampling point number as the independent variable, avoiding dependence on the actual time scale. The first slope parameter and the first intercept parameter are solved using the least squares method, representing a global fitting using information from all sampling points, rather than local judgment, making the fitting result statistically optimal and possessing strong noise resistance. The minimization condition of the objective function represents finding a set of optimal parameters (k1, b1) among all possible slope and intercept parameters, such that the sum of the squared errors between the predicted values generated by the linear function at each sampling point position and the actual quantum waveform sampling values is minimized. n represents the number of sampling points participating in the linear regression fitting. The minimization objective function is used to solve for the parameters of a linear function that can globally and optimally fit the amplitude change trend of sampling points within the detection band using the least squares method, thus providing a mathematical basis for the determination of linear sequence waveforms and their parameterized compressed storage. The formula for calculating the fitting error represents the maximum absolute deviation between the actual sampling amplitude and the predicted amplitude of the linear fitting model among all sampling points within the detection band. The fitting error is defined as the maximum absolute deviation between the continuous sampling points and the corresponding linear fitting values. The fitting error represents the maximum absolute deviation between the actual amplitude of each sampling point in the band to be detected and the amplitude predicted based on the linear function model, and is used to characterize the linear approximation error of the band at the most unfavorable sampling point.
[0031] As a specific example, the optimal solutions for the first slope parameter k1 and the first intercept parameter b1 are respectively calculated by minimizing the objective function and the results are expressed as follows: .
[0032] The calculation result of the first slope parameter k1 is used to characterize the average rate of change of the amplitude of the sampling point in the target linear sequence with the sampling index. Its numerator is used to measure the covariance relationship between the amplitude and the index, and the denominator is used to measure the dispersion of the index itself. The first intercept parameter b1 is used to characterize the baseline amplitude level of the sequence after removing the linear trend, thereby realizing the optimal parameterized representation of the linear sequence.
[0033] The engineering significance of k1 represents the average rate of change of the quantum waveform within the linear sequence. In the formula (n∑ix) i -∑i∑x i The ) part is used to measure the covariance term between the magnitude and the index, that is, the degree of deviation of the actual trend from the mean; ∑ix iThe sum of the product of the index and amplitude represents the magnitude. A larger value indicates a stronger correlation between the amplitude and time. The 'n' in the formula characterizes the scale of the sample covariance term, ensuring that the two quantities are measured on the same statistical scale, thus avoiding slope shifts due to changes in the number of sampling points. Because 'n' represents the number of sampling points involved in the linear regression fitting, it is used to statistically normalize the sum of the index and amplitude terms, ensuring that the obtained slope parameter only reflects the trend of the sampling points changing with the time index, and is not affected by changes in the number of sampling points. This guarantees the comparability and stability of linear parameters across different bands. ∑i∑x i This represents the product of the index and the magnitude, which serves to remove the mean bias in regression. In the formula, n∑i 2 -(∑i) 2 Partially used to measure the dispersion (variance term) of the index itself, ensuring that slope calculation is independent of index translation; n∑i 2 This represents the sum of squared indices after normalizing the sample size; (∑i) 2 This represents the square of the index sum, eliminating the offset effect caused by the index mean.
[0034] In engineering terms, b1 represents the baseline magnitude of the linear sequence at the starting index position. ∑x i This represents the sum of the amplitudes of all sampling points within the band; k1∑i represents the total amplitude contributed by the linear variation trend. (∑x i -k1∑i) represents the constant bias remaining after removing the linear trend. The denominator n represents the average of the remaining bias, which yields the estimated magnitude when the index is zero.
[0035] Furthermore, as a feasible implementation method, the independent compressed storage format of the linear sequence waveform is set as follows: The linear sequence is compressed and stored in a parameterized form. The compressed storage includes at least: a type identifier indicating the type of the linear sequence, the first slope parameter, the first intercept parameter, and the number of sampling points corresponding to the linear sequence.
[0036] The type identifier used to indicate the type of linear sequence is used to clearly mark the waveform category to which the band belongs in the compressed data. Its functions include: indicating that the band should be decompressed according to the linear reconstruction rules; distinguishing it from constant sequence waveforms and repetitive sequence waveforms; and supporting the sequential storage and parsing of multiple compressed bands under a unified encapsulation format. The first slope parameter is the slope of the linear function obtained by least-squares linear fitting in this embodiment, characterizing the rate at which the amplitude changes with the sampling point index in the linear sequence. The first intercept parameter represents the predicted amplitude of the linear function in this embodiment when the sampling point index is zero, and is used to determine the starting amplitude benchmark of the linear sequence. The number of sampling points corresponding to the linear sequence is used to characterize the effective interval length of the linear model, so as to clarify the number of sampling points that the linear model needs to expand during decompression and reconstruction, and ensure the accuracy of the duration of the linear sequence on the time axis. By storing the linear sequence waveform in a parameterized form of a combination of "type identifier, slope parameter, intercept parameter, and length parameter", efficient compression of quantum waveforms is achieved under the premise of controlled error, and the decompression and reconstruction speed is significantly improved.
[0037] Furthermore, as a feasible implementation method, the waveform segment feature detection process of the repeating sequence waveform is set as follows: A preset repetition error threshold is used to segment the target quantum waveform into its target band. A candidate repetition pattern P with a waveform length of L is set, and the target quantum waveform is divided into multiple continuous waveform segments S of the same length L. j , where the subscript j represents the ordinal number of the waveform segment to be processed, and let j = 1, 2, ..., m, and set m = ⌊n2 / L⌋, where n2 is the total number of data points of the target quantum waveform; Construct a similarity metric function, which is used to measure the similarity between candidate pattern P and each waveform segment S to be processed. j The similarity between them; set the similarity measurement function as corr, The formula for calculating the similarity measurement function is then set as follows: , When the candidate repetition pattern P matches the total waveform segments to be processed S j When the similarity measurement function values are all less than the repetition error threshold, the candidate repetition pattern P is determined to constitute a valid repetition band, and the band to be detected is determined to be a repetition sequence waveform.
[0038] The core of this implementation lies in treating the target waveband as composed of multiple equal-length sub-wavebands. By determining whether these sub-wavebands maintain a high degree of consistency with the same candidate pattern under error-controlled conditions, it is possible to determine whether a templateable repeating structure exists. The repeating error threshold represents the maximum allowable repeating deviation, serving as a criterion for judging whether different sub-wavebands can be considered the same repeating template. This threshold avoids misclassifying wavebands that are only locally similar or accidentally similar as repeating sequences. By setting a candidate repeating pattern P with a waveform length of L, the implication is that the repeating sequence has a fixed period or fixed length structure, simplifying the repeating problem from "global search" to "fixed-length template matching," reducing computational complexity and improving the stability of repeating detection. The target quantum waveform is divided into multiple continuous waveform segments of the same waveform length L to ensure that each segment is completely consistent with the candidate pattern in dimension. Only when the similarity metric between the candidate repeating pattern and all waveform segments is less than the repeating error threshold is it determined to be a valid repeating waveband, thus avoiding misclassification as a repeating structure due to local similarity.
[0039] The waveform segment feature detection process for the repeating sequence waveform includes: setting a preset repetition error threshold; segmenting the target quantum waveform into segments of a preset length; constructing candidate repetition patterns of length L; and calculating the similarity between the candidate repetition patterns and each segmented waveform using a similarity metric function in the form of root mean square error; when the similarity metric values between the candidate repetition patterns and all segmented waveforms are less than the repetition error threshold, the target waveform segment is determined to be a repeating sequence waveform. The similarity metric function is used to quantify the relationship between the candidate repetition pattern P and the j-th waveform segment S to be processed. j The similarity between the two waveforms is numerically reflected in the magnitude of the amplitude difference at the same sampling position. The similarity metric function is based on the root mean square error of the discrete sampling points. In the formula... The square of the amplitude difference between the two waveform segments at the i-th sampling point is used to amplify the amplitude deviation and reflect the degree of local inconsistency at that sampling point. Summing these squares represents the cumulative squared error of the two waveform segments across all sampling points within the entire band of length L, reflecting the overall shape difference. The similarity measurement function corr is used to characterize the amplitude similarity between the candidate repeating pattern and the waveform segment to be processed. It is obtained by calculating the root mean square error of the two waveform segments at corresponding sampling points, where the lengths of both the candidate repeating pattern and the waveform segment to be processed are L. The smaller the error value, the higher the repeatability between the two.
[0040] Furthermore, as a feasible implementation, the independent compressed storage format of the repeating sequence waveform is set as follows: The corresponding quantum waveform data is stored in a repeating pattern compression format, wherein the repeating pattern compression format includes at least a type identifier field, a pattern data field, and a repeat count field; The type identifier field is used to identify the repetition pattern type, the pattern data field is used to represent the candidate repetition pattern, and the repetition count field is used to represent the number of times the candidate repetition pattern is repeated; by storing the candidate repetition pattern and its repetition count, the corresponding multiple segments of repetition waveform data in the target quantum waveform are replaced.
[0041] For quantum bands identified as repeating sequence waveforms, a repetition pattern compression format is used for independent compression and storage. This compression format includes at least a type identifier field, a pattern data field, and a repetition count field. The pattern data field stores candidate repetition patterns, and the repetition count field records the number of times each candidate repetition pattern is repeated in the target quantum waveform. By storing candidate repetition patterns and their repetition counts, the corresponding multiple segments of repeating waveform data in the original quantum waveform are replaced. Through templated repetition pattern compression, structural-level lossless compression of highly repetitive quantum waveforms is achieved, significantly reducing data volume while ensuring the high fidelity and real-time performance required for quantum operations.
[0042] The type identifier field is used to explicitly identify the waveform type corresponding to the current compressed data as a repeating sequence waveform, enabling differentiated parsing of different compression strategies under a unified data encapsulation format. The pattern data field is used to store the candidate repeating pattern, storing only one representative waveform data, rather than multiple repeated original sampling points. The repeat count field is used to record the number of times the candidate repeating pattern is repeated continuously or logically in the target quantum waveform. This field, together with the pattern data field, determines the unfolded length of the original waveform on the time axis. In this embodiment, multiple continuous or logically equivalent bands in the original target quantum waveform that are determined to be repeating sequences are no longer stored in a point-by-point sampling form, but are replaced as a whole by a repeating pattern compression unit. This preserves the complete waveform structure information, does not introduce additional distortion, and can completely restore the repeating structure equivalent to the original waveform during decompression.
[0043] Furthermore, as a feasible implementation method, the piecewise approximation algorithm is further defined as follows: An error tolerance threshold is preset for all second-type bands in the target quantum waveform; taking any sampling point of each second-type band as the starting point, the line segment where the current starting point is located is gradually expanded along the time series direction; in each expansion process, based on the set of sampling points between the current starting point and the ending point, the linear regression parameters of the current line segment are calculated using the least squares method, wherein the linear regression parameters include a second slope parameter and a second intercept parameter; the calculation of the linear regression parameters is completed based on the cumulative statistics constructed by local indexes, wherein the cumulative statistics include at least the index sum, amplitude sum, index square sum, and the product sum of the index and amplitude, thereby obtaining the closed-form solution of the linear regression; After each extension endpoint, the fitting error of each sampling point within the current line segment is calculated based on the second slope parameter and the second intercept parameter. When the maximum absolute error in the fitting error exceeds the error tolerance threshold, the extension of the current line segment is terminated, and the current line segment is determined as a valid first-order compressed band. The error tolerance threshold is used to limit the maximum amplitude deviation allowed by the piecewise linear approximation.
[0044] The calculation of the linear regression parameters is not based on repeated traversal of all sampling points within the current line segment. Instead, it constructs accumulated statistics such as the sum of indices, sum of amplitudes, sum of squared indices, and sum of the products of indices and amplitudes by using the local indices of the sampling points and their corresponding amplitudes. The linear regression parameters are then directly obtained using the analytical formula of the least squares method, thus achieving a closed-form solution for the linear regression parameters. The piecewise approximation algorithm is implemented based on an error-controlled adaptive linear approximation method. It gradually expands the line segment length under a preset error tolerance threshold and calculates the linear regression parameters based on the accumulated statistics. Expansion terminates when the maximum fitting error within the line segment exceeds the error tolerance threshold, thereby obtaining a first-order compressed band that meets quantum fidelity requirements. Through error-driven adaptive piecewise linear approximation, a parameterized compression foundation that balances high compression ratio and real-time performance is achieved while ensuring the accuracy of quantum waveform amplitudes. When performing linear regression on a waveform segment, it is not necessary to repeatedly traverse or store all the sampling points within the segment. Instead, by constructing several "accumulative" statistics based on the sampling point index and amplitude, the linear regression parameters can be quickly obtained directly using the analytical formula of the least squares method.
[0045] The core of this implementation lies in dynamically expanding the line segment length within a strictly controlled amplitude error range and parameterizing the waveform using a least-squares linear model, thereby achieving efficient and controllable first-order compression while ensuring quantum fidelity. The error tolerance threshold is used to limit the maximum allowable amplitude deviation of the linear approximation. In specific applications, the corresponding amplitude threshold can be set according to the amplitude resolution of the AWG, the system noise level, or the quantum gate fidelity. Starting from any sampling point, the expansion proceeds along the time direction, and the effectiveness of the linear approximation is reassessed with each expansion. The second slope parameter represents the local waveform change trend, and the second intercept parameter represents the initial amplitude of the line segment in the local coordinate system. After each expansion endpoint, based on the current linear regression parameters, the fitting error of each sampling point within the current line segment is calculated. The maximum absolute error is used as the criterion. When the maximum absolute error exceeds the error tolerance threshold, the expansion of the current line segment is terminated, and the current line segment is determined as a valid first-order compressed band. This ensures that all sampling points within the line segment meet the error constraints.
[0046] As a feasible enumeration process, starting from the initial point i, the line segment is gradually extended to its endpoint j, allowing each... , where n represents the number of sampling points participating in the linear regression fitting; calculate the linear regression parameters for the current line segment: set the local index , points : Set the error tolerance threshold as ϵ tolerance , The index sum is then represented as: The amplitude is expressed as: , The sum of squares of the index is represented as: The sum of the product of the index and the magnitude is expressed as: , Calculation of the second slope parameter: , Calculation of the second intercept parameter: , Calculation of maximum fitting error: , Extended termination condition: .
[0047] The derivation process of the second slope parameter is as follows: The linear regression parameters of the current line segment are calculated using the least squares method, and the linear regression parameters include the second slope parameter. Then construct the least squares objective function: , This objective function measures the sum of squared errors between the actual quantum waveform sample values and the output values of the linear approximation model. Take the partial derivatives with respect to k and b and set them to 0: , , After simplification, we obtain the system of equations: , Substitute the accumulated statistics from the beginning: make , , , , After substituting the values, the system of equations can be rewritten as follows: , Substituting the second intercept parameter, we get: Multiplying both sides by m, we get: , Moving the term containing k to the other side yields: , Therefore, we get: .
[0048] Furthermore, as a feasible implementation method, the line segment similarity determination process is set as follows: Preset slope tolerance threshold ε k Translation tolerance threshold ε b Label any two first-order compressed bands for similarity comparison as the first regression line segment S. a Second regression line segment S b The first regression line segment S is determined only if the following conditions are met simultaneously. a Second regression line segment S b They have line segment similarity: , Where, k in the formula a With k b These respectively represent the first regression line segment S a Second regression line segment S b The third slope parameter, b in the formula a With b b These represent the first regression line segment S respectively. a Second regression line segment S b The third intercept parameter, L a With L b These represent the first regression line segment S respectively. a Second regression line segment S b The length of the regression line segment.
[0049] The core of this implementation lies in the fact that instead of comparing each original sampling point individually, it directly determines whether two linearly approximate bands are equivalent in shape and scale at the regression parameter level by comparing whether the slope, intercept, and segment length are within the tolerance range. This determination process provides reliable input for subsequent run-length encoding compression. The slope tolerance threshold is used to limit the maximum permissible deviation of the changing trend between different regression segments, and to control the consistency of the amplitude change direction and rate over time. The slope tolerance threshold can be set in relation to the linear approximation error tolerance.
[0050] The first regression line segment S a Second regression line segment S b For first-order compressed bands obtained from different second-type bands or segmentation within the same band, each regression segment is characterized by its linear regression parameter and length. The third slope parameter reflects the linear rate of change of the waveform within the corresponding segment, and the third intercept parameter reflects the amplitude reference of the segment at the starting position of the local time axis, |k a -k b |<ϵ k This indicates that the two line segments have a high degree of consistency in their changing trends. L a =L b This requires that the lengths of the two regression segments be exactly the same to ensure that they span the same distance along the time axis. This prevents segments with different lengths but similar parameters from being mistakenly identified as similar, which could affect the correctness of subsequent run-length encoding. The segment similarity determination process is achieved by comparing the linear regression parameters of the first-order compressed band and the segment lengths. When the difference in the slope parameters of the two regression segments is less than a preset slope tolerance threshold, the difference in the intercept parameters is less than a preset translation tolerance threshold, and their segment lengths are equal, the two regression segments are determined to be similar.
[0051] Furthermore, as a feasible implementation, the average of the sampling points is the arithmetic mean of the amplitudes of all sampling points within the band, and the constant tolerance threshold is used to limit the upper limit of amplitude fluctuation of the constant sequence within the allowable error range of quantum operation.
[0052] The average of the sampling points is the arithmetic mean of the amplitudes of all sampling points within the band to be detected, excluding other forms such as median, weighted average, or moving average, which facilitates implementation in real-time control systems. The constant tolerance threshold is used to limit the maximum allowable deviation of the sampling point amplitudes within the band from the average. This upper limit of deviation is set within the allowable error range of quantum operations to ensure that constant sequence compression does not introduce amplitude distortion that affects the fidelity of quantum gates, prevent bands with obvious changing trends or large noise from being misclassified as constant sequences, and ensure that subsequent "single amplitude and length" compression does not introduce distortion that affects quantum operations.
[0053] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. An AWG waveform compression transmission method for quantum computing, characterized in that, The method includes: Step S1: Set waveform segment feature detection to extract the target quantum waveform into first-class and second-class bands, and independently set up independent compression storage for special waveforms for all first-class bands. Step S2: Set up a piecewise approximation algorithm to perform linear regression analysis on all second-type bands, and perform linear regression data compression on the second-type bands based on the linear regression analysis to generate first-order compressed bands; Step S3: Perform line segment similarity judgment on all first-order compressed bands one by one by comparing the similarity of every two first-order compressed bands, and screen out the first-order compressed bands that meet the line segment similarity judgment. Step S4: Perform run-length encoding compression on the screened first-order compressed bands to generate second-order compressed bands, and encapsulate the data formats of the remaining first-order compressed bands and all second-order compressed bands in a unified manner to complete the target quantum waveform compression. The waveform types of the first type of band include constant sequence waveforms, linear sequence waveforms, and repeating sequence waveforms, and the independent compression storage is set independently for constant sequence, linear sequence, and repeating sequence, respectively. The piecewise approximation algorithm is further defined as follows: An error tolerance threshold is preset for all second-type bands in the target quantum waveform; taking any sampling point of each second-type band as the starting point, the line segment where the current starting point is located is gradually expanded along the time series direction; in each expansion process, based on the set of sampling points between the current starting point and the ending point, the linear regression parameters of the current line segment are calculated using the least squares method, wherein the linear regression parameters include a second slope parameter and a second intercept parameter; the calculation of the linear regression parameters is completed based on the cumulative statistics constructed by local indexes, wherein the cumulative statistics include at least the index sum, amplitude sum, index square sum, and the product sum of the index and amplitude, thereby obtaining the closed-form solution of the linear regression; After each extension endpoint, the fitting error of each sampling point within the current line segment is calculated based on the second slope parameter and the second intercept parameter. When the maximum absolute error in the fitting error exceeds the error tolerance threshold, the extension of the current line segment is terminated, and the current line segment is determined as a valid first-order compressed band. The error tolerance threshold is used to limit the maximum amplitude deviation allowed by the piecewise linear approximation.
2. The AWG waveform compression and transmission method for quantum computing according to claim 1, characterized in that, The waveform segment feature detection process for the constant sequence waveform is set as follows: A preset constant tolerance threshold is used to statistically analyze the amplitude of each sampling point within the target quantum waveform's detection band. When the maximum absolute difference between the amplitude of any sampling point within the detection band and the average value of the sampling points in the detection band is less than the constant tolerance threshold, the detection band is determined to be a constant sequence waveform.
3. The AWG waveform compression and transmission method for quantum computing according to claim 2, characterized in that, The independent compressed storage format of the constant sequence waveform is set as follows: The band is compressed and stored as a data structure containing a band type identifier, a representative amplitude parameter, and a band length parameter. The representative amplitude parameter is used to characterize the amplitude characteristics of the constant sequence, and the band length parameter is used to characterize the number of sampling points corresponding to the constant sequence.
4. The AWG waveform compression and transmission method for quantum computing according to claim 1, characterized in that, The waveform segment feature detection process for the linear sequence waveform is set as follows: A preset linear judgment threshold is used to construct a discrete-time index sequence t=[0,1,...,n-1] for continuous sampling points in the band to be detected. T The least squares method is used to perform linear fitting on the sampling points to solve for the first slope parameter k1 and the first intercept parameter b1 of the linear function, wherein the first slope parameter and the first intercept parameter satisfy the following minimization condition of the objective function: ; The optimal solution of the first slope parameter k1 and the first intercept parameter b1 is obtained according to the minimized objective function, and the fitting error is calculated based on the optimal solution of the first slope parameter k1 and the first intercept parameter b1. Let the fitting error be represented as ϵ linear , The formula for calculating the fitting error is as follows: ; When the fitting error is less than the preset linearity determination threshold, the band to be detected is determined to be a linear sequence.
5. The AWG waveform compression and transmission method for quantum computing according to claim 4, characterized in that, The independent compressed storage format of the linear sequence waveform is set as follows: The linear sequence is compressed and stored in a parameterized form. The compressed storage includes at least: a type identifier indicating the type of the linear sequence, the first slope parameter, the first intercept parameter, and the number of sampling points corresponding to the linear sequence.
6. The AWG waveform compression transmission method for quantum computing according to claim 1, characterized in that, The waveform segment feature detection process for the repeating sequence waveform is set as follows: A preset repetition error threshold is used to segment the target quantum waveform into its target band. A candidate repetition pattern P with a waveform length of L is set, and the target quantum waveform is divided into multiple continuous waveform segments S of the same length L. j , where the subscript j represents the ordinal number of the waveform segment to be processed, and let j = 1, 2, ..., m, and set m = ⌊n2 / L⌋, where n2 is the total number of data points of the target quantum waveform; Construct a similarity metric function, which is used to measure the similarity between candidate pattern P and each waveform segment S to be processed. j The similarity between them; set the similarity metric function as corr, The formula for calculating the similarity measurement function is then set as follows: , When the candidate repetition pattern P matches the total waveform segments to be processed S j When the similarity measurement function values are all less than the repetition error threshold, the candidate repetition pattern P is determined to constitute a valid repetition band, and the band to be detected is determined to be a repetition sequence waveform.
7. The AWG waveform compression transmission method for quantum computing according to claim 6, characterized in that, The independent compressed storage format of the repeating sequence waveform is set as follows: The corresponding quantum waveform data is stored in a repeating pattern compression format, wherein the repeating pattern compression format includes at least a type identifier field, a pattern data field, and a repeat count field; The type identifier field is used to identify the repetition pattern type, the pattern data field is used to represent the candidate repetition pattern, and the repetition count field is used to represent the number of times the candidate repetition pattern is repeated; by storing the candidate repetition pattern and its repetition count, the corresponding multiple segments of repetition waveform data in the target quantum waveform are replaced.
8. The AWG waveform compression transmission method for quantum computing according to claim 1, characterized in that, The line segment similarity determination process is set as follows: Preset slope tolerance threshold ε k Translation tolerance threshold ε b Label any two first-order compressed bands for similarity comparison as the first regression line segment S. a Second regression line segment S b The first regression line segment S is determined only if the following conditions are met simultaneously. a Second regression line segment S b They have line segment similarity: , Where, k in the formula a With k b These respectively represent the first regression line segment S a Second regression line segment S b The third slope parameter, b in the formula a With b b These represent the first regression line segment S respectively. a Second regression line segment S b The third intercept parameter, L a With L b These represent the first regression line segment S respectively. a Second regression line segment S b The length of the regression line segment.
9. The AWG waveform compression and transmission method for quantum computing according to claim 2, characterized in that, The average of the sampling points is the arithmetic mean of the amplitudes of all sampling points within the band, and the constant tolerance threshold is used to limit the upper limit of amplitude fluctuation of the constant sequence within the allowable error range of quantum operation.
Citation Information
Patent Citations
Method for processing transformer DGA online monitoring data
CN114372093A
Fast and accurate packet classification method based on learning index
CN120654109A