GKP code adaptive decoding method and device, storage medium and electronic equipment
Patent Information
- Application Number
- CN202611312669.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-27
- Publication Date
- 2026-09-29
AI Technical Summary
[0006]第一,固定参数解码器难以适应噪声漂移
[0051]其一,本发明将GKP码解码分解为快、慢两个时间尺度,使快回路保持简单、确定和可量化,同时让慢回路利用综合征统计跟踪噪声漂移,有利于在保持微秒级确定性时延的同时增强解码器对工作点漂移的在线适应能力。
Smart Images

Figure CN122840296A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of quantum information processing, quantum error correction, continuous variable Bose coding, GKP (Gottesman-Kitaev-Preskill) code decoding, machine learning-assisted calibration, and FPGA real-time signal processing, and particularly to a GKP code adaptive decoding method, apparatus, storage medium, and electronic device. Background Technology
[0002] GKP codes are a type of continuous-variable quantum error-correcting code that encodes qubits into periodic lattice points in the phase space of a harmonic oscillator. The error correction process typically involves measuring the modulus-lattice syndrome in two orthogonal directions—position-orthogonal and momentum-orthogonal—to estimate the displacement error and apply a reverse displacement correction. Unlike binary stable subcodes, GKP syndromes are inherently continuous values, containing analog information such as error magnitude, measurement noise, finite compression error, and drift states.
[0003] The peak width, envelope, auxiliary state noise, measurement efficiency, and device calibration drift of the practically finite-energy GKP states cause the syndrome distribution to change over time. Linear or approximately maximum likelihood decoders with fixed parameters may be effective at the static operating point, but as the noise variance, bias mean, or covariance principal axis slowly drifts, the original mapping from the syndrome to the correction will gradually mismatch, leading to an increase in the logic error rate.
[0004] In existing GKP decoding research, one approach emphasizes using simulated syndrome soft information to improve matching, belief propagation, or external code decoding weights; another approach attempts to introduce neural networks or calibration conditional models to improve decoding accuracy. These methods have demonstrated the value of simulated information and learning modules, but directly placing complex neural networks into the critical path of each syndrome cycle often fails to meet hardware constraints such as microsecond-level deterministic latency, fixed-point quantization, atomicity of parameter submission, and anomaly backoff.
[0005] In summary, existing technologies have at least the following problems and drawbacks:
[0006] First, fixed-parameter decoders struggle to adapt to noise drift. When the variance, mean bias, or correlation direction of the GKP syndrome statistics change, the static gain matrix and bias vector cannot consistently remain optimal.
[0007] Second, end-to-end neural network decoders are difficult to directly fall into the hardware critical path. Model inference latency, storage resources, fixed-point quantization error, and worst-case latency boundaries are difficult to simultaneously meet real-time feedback requirements.
[0008] Third, pure software or offline calibration schemes lack runtime closed-loop. Even if optimal parameters are estimated offline, it cannot be guaranteed that they will be safely submitted to the real-time decoder at each window boundary.
[0009] Fourth, traditional adaptive estimators are disconnected from hardware control semantics. A smaller error in estimating noise parameters does not necessarily correspond to optimal control performance of the gain matrix and bias vector at runtime.
[0010] Fifth, existing solutions rarely address the overall process of simultaneously handling syndrome histogram features, Convolutional Neural Network (CNN) residual calibration, parameter mapping security, fixed-point quantization, double-buffered submission, and anomaly rollback.
[0011] In conclusion, the existing technology obviously has inconveniences and defects in practical use, so it is necessary to improve it. Summary of the Invention
[0012] To address the aforementioned shortcomings, the present invention aims to provide an adaptive decoding method, apparatus, storage medium, and electronic device for GKP codes, which can reduce the critical path delay during decoding, enhance the online adaptability to noise drift, and improve the numerical stability and reliability of parameter updates.
[0013] To solve the above-mentioned technical problems, the present invention is implemented as follows:
[0014] In a first aspect, embodiments of the present invention provide a GKP code adaptive decoding method, comprising the following steps:
[0015] The decoding correction step involves performing an affine transformation on the continuous variable syndrome based on the currently active decoding parameters in the fast loop, generating an error correction amount, and performing inverse shift correction.
[0016] The feature extraction step involves statistically analyzing the continuous variable syndrome within a preset window in the slow loop, extracting syndrome statistical features including histogram distribution, inter-window differences, and / or baseline estimates.
[0017] The parameter calibration step involves inputting the statistical characteristics of the syndrome into the residual calibration model, outputting the parameter residuals, and combining them with the baseline estimate to generate the updated values of the decoded parameters.
[0018] The parameter update step involves performing pruning constraints, smoothing filtering, and / or fixed-point quantization on the value to be updated, writing it into the inactive parameter storage area, and triggering an atomic switch at the cycle boundary so that the fast loop uses the value to be updated for decoding in the next cycle.
[0019] The abnormal recovery step involves monitoring the operating status of the slow loop. When a preset abnormal event is detected, the fast loop is controlled to revert the decoding parameters to preset stable parameters.
[0020] Furthermore, in the decoding and correction step, the affine transformation is performed by a field-programmable gate array, including:
[0021] The continuous variable syndrome s in round t t =[s q,t , s p,t ] T s in q,t and s p,t After being cropped to a predetermined range, the data is quantized into a fixed number, and events exceeding the predetermined range are counted in the overflow count.
[0022] Read the gain matrix K from the currently active decoding parameters. t With bias vector b t Calculate Δ t =K t ·s t +b t The error correction amount is obtained, and the error correction amount is saturated.
[0023] The predetermined range is set based on the GKP code phase space grid spacing λ=sqrt(2π);
[0024] The s q,t The s represents the syndrome value corresponding to the orthogonal component of the position. p,t The K represents the syndrome value corresponding to the orthogonal components of momentum; t Let b be the decoding gain matrix for the t-th round. t Let Δ be the decoding bias vector for the t-th round. t Let be the error correction amount in round t.
[0025] Furthermore, in the feature extraction step, the statistics include:
[0026] Each round of the continuous variable syndrome is mapped to the corresponding grid point in the two-dimensional histogram grid, and the syndrome histogram of the current window is accumulated. Overflow events, saturation events and / or window completion events are recorded.
[0027] When the cumulative number of samples reaches the window length W or the preset triggering condition is met, the window is determined to be ready, and the syndrome histogram, the count of the overflow event, and the window identifier are transmitted to the slow loop.
[0028] The histogram distribution is a multi-window context constructed by normalizing the most recent several syndrome histograms, and the difference between windows is the difference between the syndrome histograms of adjacent windows.
[0029] Furthermore, in the feature extraction step, the baseline estimate is given by a classical estimator based on the syndrome histogram;
[0030] The classical estimators include window variance estimators, extended Kalman filters, unscented Kalman filters, and / or recursive least squares estimators;
[0031] The baseline estimator includes the noise state, the baseline gain matrix, and / or the baseline bias vector;
[0032] The statistical features of the syndrome also include the output of the classical estimator and the amount of parameter change of the classical estimator between adjacent windows.
[0033] Furthermore, in the parameter calibration step, the residual calibration model is a convolutional neural network. The convolutional neural network takes the histogram distribution, the inter-window difference, and / or the baseline estimate as input and outputs a bounded parameter residual, instead of directly outputting the error correction amount for each round.
[0034] The parameter residual is the bias residual δb = [δb q ,δb p ] T ;
[0035] Where, δb q δb represents the offset residual value corresponding to the position orthogonal component. p This represents the bias residual value corresponding to the orthogonal components of momentum.
[0036] Further, in the parameter calibration step, the step of generating the value to be updated for the decoding parameter includes:
[0037] When the slow loop outputs noise, based on the covariance C and the measurement noise R... meas Calculate K raw =C(C+R meas ) -1 Then according to b target =α(IK target μ is used to calculate the bias;
[0038] When the slow loop outputs the parameter residual, let K... next =K teacher b next =b teacher +δb;
[0039] Wherein, the Rmeas To measure the noise covariance matrix, the K raw The original gain matrix is given by α, where α is the bias calibration coefficient, I is the identity matrix, and K is the... target Let μ be the target gain matrix, and b be the mean vector of the syndrome. target K is the target bias vector. next For the gain matrix to be updated, the b next For the bias vector to be updated, the K teacher The gain matrix obtained from the baseline estimation, wherein b teacher δb is the bias vector obtained from the baseline estimation, and δb is the bias residual vector.
[0040] Furthermore, in the parameter update step, the pruning constraints include gain pruning, bias pruning, and / or outlier detection, and the smoothing filter includes exponential moving average and / or smoothing constraints; after the value to be updated is written into the inactive parameter storage area, a temporary storage period identifier is generated, and a submission is triggered at the period boundary or the window boundary. After the submission confirmation is returned, the active storage area identifier and the period identifier are updated.
[0041] In the anomaly recovery step, the anomaly events include the residual calibration model inference timeout, the value to be updated exceeding the safe range, the submission failure and / or the overflow rate exceeding the threshold, and the stable parameter is the decoding parameter of the previous update cycle or the conservative parameter output by the classical estimator.
[0042] In a second aspect, embodiments of the present invention provide a GKP code adaptive decoding device constructed based on any one of the methods described above, the device comprising:
[0043] The decoding correction module is used to perform an affine transformation on the continuous variable syndrome based on the currently active decoding parameters in the fast loop, generate error correction values, and perform inverse shift correction.
[0044] The feature extraction module is used to perform statistical analysis on the continuous variable syndrome in the slow loop according to a preset window, and extract syndrome statistical features including histogram distribution, inter-window difference and / or baseline estimate;
[0045] The parameter calibration module is used to input the statistical features of the syndrome into the residual calibration model, output the parameter residual, and combine the baseline estimate to generate the update value of the decoding parameter;
[0046] The parameter update module is used to perform pruning constraints, smoothing filtering and / or fixed-point quantization on the value to be updated, write it into the inactive parameter storage area, and trigger atomic switching at the cycle boundary so that the fast loop uses the value to be updated for decoding in the next cycle.
[0047] An anomaly recovery module is used to monitor the operating status of the slow loop. When a preset anomaly event is detected, the module controls the fast loop to roll back the decoding parameters to preset stable parameters.
[0048] Thirdly, embodiments of the present invention provide a storage medium for storing a computer program for performing any of the methods described herein.
[0049] Fourthly, embodiments of the present invention provide an electronic device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the computer program to implement any of the methods described above.
[0050] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0051] Firstly, this invention decomposes GKP code decoding into two time scales, fast and slow, so that the fast loop remains simple, deterministic and quantifiable, while the slow loop uses syntactic statistics to track noise drift. This helps to enhance the decoder's online adaptability to operating point drift while maintaining microsecond-level deterministic delay.
[0052] Secondly, this invention does not replace the GKP code decoder with a neural network, but instead allows the residual calibration model to perform residual calibration on the low-dimensional affine control parameters. This helps to reduce the bandwidth requirements and runaway risk of the learning module, enhance physical interpretability, and facilitate hardware deployment and fault diagnosis.
[0053] Third, this invention accumulates the continuous syndrome into a two-dimensional histogram by window and combines it with multi-window context and inter-window difference, which is beneficial to transform the soft information of GKP simulation into a learnable, low-bandwidth slow loop calibration signal, thereby enhancing the ability to characterize effective states such as noise scale, bias and rotation.
[0054] Fourth, this invention constrains the learning output to a hardware-executable and numerically stable runtime parameter space through parameter mapping, pruning constraints, smoothing filtering, and fixed-point quantization, which helps to improve the numerical stability of the parameter update process.
[0055] Fifth, the present invention employs a parameter storage area with active and inactive dual buffers and switches atomically at the cycle boundary, which helps to ensure the consistency of parameters read by the fast loop during the slow loop writing process and enhances the real-time reliability of the system.
[0056] Sixth, by distinguishing between diagnostic states such as input saturation, correction saturation, aggressive parameters, and inference timeout, and by combining stable parameter maintenance with conservative parameter rollback, this invention helps to improve the robustness of the system under abnormal operating conditions.
[0057] Seventh, this invention is compatible with non-neural statistical calibration branches, and can map statistical estimators, residual estimators, or a combination of the two to the same set of runtime parameter interfaces, which is beneficial to improving the versatility and engineering portability of the solution. Attached Figure Description
[0058] Figure 1 This is a flowchart illustrating the GKP code adaptive decoding method provided in an embodiment of the present invention;
[0059] Figure 2 This is a structural diagram of the dual-loop cooperative GKP adaptive decoding provided in an embodiment of the present invention;
[0060] Figure 3 This is a schematic diagram of the structure of the GKP code adaptive decoding device provided in an embodiment of the present invention;
[0061] Figure 4 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0062] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0063] It should be noted that references to "an embodiment," "embodiment," "example embodiment," etc., in this specification refer to the described embodiment including specific features, structures, or characteristics, but not every embodiment must include these specific features, structures, or characteristics. Furthermore, such expressions do not refer to the same embodiment. Moreover, when describing specific features, structures, or characteristics in conjunction with embodiments, whether or not explicitly described, it is indicated that incorporating such features, structures, or characteristics into other embodiments is within the knowledge of those skilled in the art.
[0064] Furthermore, certain terms are used in the specification and subsequent claims to refer to specific components or parts. Those skilled in the art will understand that manufacturers may use different names or terms to refer to the same component or part. This specification and subsequent claims do not distinguish components or parts by differences in name, but rather by differences in function. The terms "comprising" and "including" used throughout the specification and subsequent claims are open-ended and should be interpreted as "including but not limited to." Additionally, the term "connection" here includes any direct and indirect electrical connection means. Indirect electrical connection means include connections made through other means.
[0065] The GKP code adaptive decoding method provided by the present invention will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0066] In its research on drift-adaptive GKP code decoding, this invention discovered that the short-window histogram of GKP code syndromes and its temporal variations can reflect effective states such as noise scale, bias, and rotation. However, directly allowing the convolutional neural network (CNN) to output the error correction amount each time weakens both physical interpretability and makes the hardware latency path uncontrollable. Therefore, this invention restricts the learning module to a slow-loop calibration role, ensuring it only updates low-dimensional runtime parameters and does not replace the fast decoding computation for each syndrome.
[0067] Furthermore, this invention discovers that fixing the fast loop of the field-programmable gate array (FPGA) as affine decoding Δ=K・s+b can reduce each syndrome processing to fixed-point matrix-vector multiplication and addition; then the slow loop periodically reads the syndrome histogram, historical window difference and teacher model to estimate features, and corrects the bias residual or noise state through lightweight CNN output; finally, new K and b are generated through parameter mapping, pruning, smoothing and quantization.
[0068] The technical challenge of this invention lies not in using CNN or FPGA alone, but in separating them to different time scales: the FPGA handles microsecond-level deterministic fast loops, while the CNN handles millisecond-level or slower statistical calibrations; a closed loop is formed between them through parameter banks, window histograms, submission confirmation, and anomaly rollback. The specific technical challenges of this solution include:
[0069] (1) How to compress the continuous GKP syndrome into statistical features that can be used by CNN and are easy to accumulate in hardware within a limited window.
[0070] (2) How to align the CNN output with the hardware control parameters K and b, instead of just optimizing the regression error of offline noise parameters.
[0071] (3) How to keep parameters safe and submittable after fixed-point quantization, gain clipping, bias clipping and exponential smoothing.
[0072] (4) How to achieve period boundary atom switching through double buffer parameter bank to avoid destroying fast loop consistency during slow loop writing.
[0073] (5) How to distinguish the sources of anomalies such as histogram input saturation, correction saturation, aggressive parameters and inference timeout, and provide a rollback strategy.
[0074] Figure 1 This is a flowchart illustrating the GKP code adaptive decoding method provided in an embodiment of the present invention. The method includes the following steps:
[0075] Step S101, decoding correction step, performs an affine transformation on the continuous variable syndrome based on the currently active decoding parameters in the fast loop, generates error correction amount and performs inverse displacement correction.
[0076] Preferably, the affine transformation in the decoding and correction step is performed by a field-programmable gate array, including:
[0077] The continuous variable syndrome of round t. t =[s q,t , s p,t ] T s in q,t and s p,t After being cropped to a predetermined range, the data is quantized into a fixed number, and events exceeding the predetermined range are counted in the overflow count.
[0078] Read the gain matrix K from the currently active decoding parameters. t With bias vector b t Calculate Δ t =K t ·s t +b t Obtain the error correction amount and perform saturation processing on the error correction amount.
[0079] The predetermined range is set based on the GKP code phase space grid distance λ=sqrt (2π).
[0080] The s q,t s represents the syndrome value corresponding to the orthogonal component of the location. p,t K represents the syndrome value corresponding to the orthogonal components of momentum. t Let b be the decoding gain matrix for the t-th round. t Let Δ be the decoding bias vector for round t. t Let be the error correction amount in round t.
[0081] Step S102, feature extraction step, statistical analysis of continuous variable syndromes is performed in the slow loop according to a preset window, and statistical features of syndromes including histogram distribution, inter-window difference and / or baseline estimate are extracted.
[0082] Preferably, the statistical analysis in the feature extraction step includes:
[0083] Each round of continuous variable syndrome is mapped to the corresponding grid point in a two-dimensional histogram grid, and the syndrome histogram of the current window is accumulated. Overflow events, saturation events and / or window completion events are recorded.
[0084] When the cumulative number of samples reaches the window length W or the preset triggering condition is met, the window is determined to be ready, and the syndrome histogram, the overflow event count, and the window identifier are transmitted to the slow loop.
[0085] The histogram distribution is a multi-window context constructed by normalizing the histograms of the most recent syndromes, and the difference between windows is the difference between the syndrome histograms of adjacent windows.
[0086] Preferably, the baseline estimate in the feature extraction step is given by a classical estimator based on the syndrome histogram.
[0087] Preferably, the classical estimator includes a window variance estimator, an extended Kalman filter, an unscented Kalman filter, and / or a recursive least squares estimator.
[0088] Preferably, the baseline estimate includes noise state, baseline gain matrix and / or baseline bias vector, etc.
[0089] Preferably, the statistical features of the syndrome also include the output of the classical estimator and the amount of parameter change of the classical estimator between adjacent windows.
[0090] Step S103, parameter calibration step, inputs the statistical characteristics of the syndrome into the residual calibration model, outputs the parameter residuals, and combines the baseline estimate to generate the updated values of the decoding parameters.
[0091] Preferably, the residual calibration model in the parameter calibration step is a convolutional neural network. The convolutional neural network takes histogram distribution, inter-window difference and / or baseline estimate as input, and outputs bounded parameter residuals, instead of directly outputting the error correction amount for each round.
[0092] The parameter residual is the bias residual δb = [δb q ,δb p ] T .
[0093] Where, δb q δb represents the offset residual value corresponding to the position orthogonal component. p This represents the bias residual value corresponding to the orthogonal components of momentum.
[0094] Preferably, the step of generating the updated values for the decoding parameters in the parameter calibration step includes:
[0095] When the slow loop output noise is in the state, based on the covariance C and the measurement noise R meas Calculate K raw =C(C+R meas ) -1 Then according to b target =α(IK target )μ calculates the bias.
[0096] When considering the residual value of the slow loop output parameters, let K... next =Kteacher b next =b teacher +δb.
[0097] Among them, R meas To measure the noise covariance matrix, K raw Let I be the original gain matrix, α be the bias calibration coefficient, I be the identity matrix, and K be the value of K. target Let μ be the target gain matrix, μ be the mean vector of the syndrome, and b be the mean vector of the syndrome. target K is the target bias vector. next Let b be the gain matrix to be updated. next K is the bias vector to be updated. teacher b is the gain matrix obtained from the baseline estimation. teacher δb is the bias vector obtained from the baseline estimation, and δb is the bias residual vector.
[0098] Step S104, parameter update step, performs pruning constraint, smoothing filtering and / or fixed-point quantization processing on the value to be updated, writes it to the inactive parameter storage area, and triggers atomic switching at the cycle boundary so that the fast loop uses the value to be updated for decoding in the next cycle.
[0099] Preferably, in the parameter update step, the pruning constraints include gain pruning, bias pruning, and / or outlier detection, and the smoothing filtering includes exponential moving average and / or smoothing constraints. After the value to be updated is written to the inactive parameter storage area, a temporary storage period identifier is generated. A commit is triggered at the period boundary or the window boundary. After the commit confirmation is returned, the active storage area identifier and the period identifier are updated.
[0100] Step S105, anomaly recovery step: monitor the operating status of the slow loop, and when a preset abnormal event is detected, control the fast loop to roll back the decoding parameters to the preset stable parameters.
[0101] Preferably, the abnormal events include residual calibration model inference timeout, value to be updated exceeding the safe range, submission failure and / or overflow rate exceeding the threshold, etc., and the stable parameter is the decoding parameter of the previous update cycle or the conservative parameter output by the classical estimator.
[0102] The technical problem to be solved by this invention is: in the process of quantum error correction of GKP codes, how to achieve low-latency decoding that is adaptive to noise drift without placing complex neural networks on the critical delay path of each round of syndrome processing; and how to unify the output of convolutional neural network (CNN), classical baseline estimation, parameter mapping, fixed-point execution of field programmable gate array (FPGA) and secure submission mechanism into a closed loop that can be implemented in hardware.
[0103] The key points to be protected by this invention and their corresponding technical effects are as follows:
[0104] Key Point 1: The fast and slow dual-loop architecture of GKP code adaptive affine decoding. In the fast loop implemented by a field-programmable gate array, each round of syndrome processing is maintained as a deterministic fixed-point affine error correction Δ. t =K t ·s t +b t That is, using the currently active gain matrix K t With bias vector b t For continuous variable syndromes t An affine transformation is performed to generate error correction values and inverse shift correction is executed. Simultaneously, the learning module, composed of a convolutional neural network and a classical baseline estimator, is confined to a slow-loop parameter calibration role, periodically updating the gain matrix and bias vector—low-dimensional runtime decoding parameters. The technical effect is to help avoid complex neural networks entering microsecond-level critical delay paths, while enhancing the decoder's online adaptability to noise drift.
[0105] Key Point 2: Residual calibration for window statistical features and baseline anchoring of continuous syndromes in GKP codes. The continuous variable syndromes corresponding to the positional orthogonal components and momentum orthogonal components are accumulated into a two-dimensional histogram according to a preset window. This histogram, combined with multi-window context, inter-window differences, and the baseline estimate output by the classical baseline estimator, is then input into a lightweight residual calibration model. This residual calibration model does not directly output the error correction amount for each round, but rather outputs a bounded parameter residual, preferably a bias residual δb=[δbq,δbp]ᵀ. The technical effect is that it facilitates the transformation of GKP code analog soft information into learnable, low-bandwidth, and interpretable slow-loop calibration signals, reducing the risk of runaway from end-to-end neural networks.
[0106] Key Point 3: Secure mapping, atomic submission, and diagnostic rollback mechanism from slow-loop output to field-programmable gate array (FPGA) executable parameters. The gain matrix and bias vector are generated by mapping the output of the baseline estimator and the residual calibration model, or the statistical estimation results. After covariance mapping, gain clipping, bias clipping, exponential moving average, and fixed-point quantization, these are written to the inactive parameter storage area. Temporary storage and submission are completed at window or period boundaries, atomically switching to the active parameter storage area. Rollback is then performed based on diagnostic states such as submission confirmation, stale parameter retention, input overflow, correction saturation, aggressive parameters, and inference timeout. The technical effect is to constrain the learning output to a hardware-executable, numerically stable, and rollback-capable runtime parameter space.
[0107] The technical effects achieved by this invention are as follows:
[0108] (1) The present invention decomposes GKP code decoding into two time scales, fast and slow, so that the fast loop of the field programmable gate array remains simple, deterministic and quantifiable, while the slow loop uses syndrome statistics to track noise drift, which is beneficial to enhance the decoder’s ability to track operating point drift while maintaining deterministic delay.
[0109] (2) This invention does not replace the GKP code decoder with a neural network, but allows the residual calibration model to perform residual calibration on the low-dimensional affine control parameters, which is beneficial to improving the hardware deployment adaptability and fault diagnosability of the scheme.
[0110] (3) In the hardware-in-the-loop (HIL) verification level, the above-mentioned adaptive affine calibration can reduce the logic error rate proxy index in various drift scenarios, which is helpful to illustrate the engineering feasibility of the closed-loop structure of the present invention.
[0111] (4) The present invention is also compatible with non-neural statistical calibration branches, which can map statistical estimators, residual estimators or a combination of the two to the same set of runtime parameter interfaces of gain matrix and bias vector, which is beneficial to improving the universality and engineering portability of the scheme.
[0112] For ease of understanding, the technical solution of the present invention will be described with reference to specific embodiments.
[0113] Figure 2 This is a schematic diagram of the dual-loop cooperative GKP code adaptive decoding structure provided in an embodiment of the present invention. Figure 2 As shown, the system is divided into two parts on a time scale: a fast loop and a slow loop. The fast loop is implemented by a field-programmable gate array and only performs deterministic operations with low latency. The slow loop is implemented by a processor and updates the decoding parameters asynchronously. The two form a closed loop through a parameter storage area, a window histogram, submission confirmation, and diagnostic status.
[0114] Step 1: System parameter initialization
[0115] Set the GKP code phase space grid spacing λ = sqrt(2π) to determine the syndrome input range, two-dimensional histogram grid, window length W, and fast loop period T. fast Slow loop update cycle T slow The fixed-point format and parameter clipping threshold are specified. In one embodiment, the two-dimensional histogram grid is 32×32, the window length W = 2048, and the fast loop uses the Q4.20 fixed-point format, i.e., 4 bits represent the integer part and 20 bits represent the fractional part. During initialization, the active and inactive storage areas of the parameter storage area are written into the conservative initial gain matrix and initial bias vector, respectively, and the period identifier (epoch_id) is set to the initial value.
[0116] Step 2: Syndrome Collection
[0117] For each round of GKP code error correction measurement, the continuous value syndrome s is obtained. t = [s q,t , s p,t ] T , where s q,t s represents the syndrome value corresponding to the orthogonal component of the location. p,t Here, represents the syndrome value corresponding to the orthogonal components of momentum, and t represents the error correction round number. This syndrome can originate from the physical measurement system, the hardware-in-the-loop (HIL) interface, or the hardware simulation interface.
[0118] Step 3: Fast Loop Point Preprocessing
[0119] Field Programmable Gate Array (FPGA) will s q,t and s p,t After being cropped to a predetermined range, the data is quantized into a fixed-point number. If the input exceeds the predetermined range, the event is counted in the histogram input saturation count or the overflow count. The predetermined range is set based on the GKP code phase space interval λ = sqrt(2π).
[0120] Step 4: Affine Error Correction Calculation
[0121] The field-programmable gate array reads the decoding gain matrix K for the t-th round from the currently active parameter storage area. t and the decoding bias vector b in round t t Calculate Δ t = K t ·s t + b t The error correction amount Δ in round t is obtained. t The output error correction amount is then saturated; subsequently, a reverse displacement is applied to the corresponding harmonic oscillator mode based on the error correction amount, completing the reverse displacement correction for this round. This step only includes matrix-vector multiplication, addition, pruning, and fixed-point transformation, without iterative operations, division operations, or conditional branches. Therefore, the processing delay for each round is deterministic and can be predefined.
[0122] Step 5: Histogram Accumulation
[0123] Field-programmable gate arrays (FPGAs) or equivalent hardware modules map each syndrome to a corresponding grid point in a two-dimensional histogram, updating the syndrome histogram H of the current window. tSimultaneously, overflow events, saturation events, and window completion events are recorded. This step only involves grid address mapping and counter incrementing, and does not increase the critical path length of fast loops.
[0124] Step 6: Window Readiness and Data Transfer
[0125] When the cumulative number of samples reaches the window length W or a preset trigger condition is met, the window is determined to be ready. The fast loop transfers the window histogram, overflow count, and window identifier to the slow loop processor via DMA (Direct Memory Access), AXI (Advanced eXtensible Interface), or other interfaces.
[0126] Step 7: Constructing Slow Loop Features
[0127] The slow loop normalizes the syndrome histograms of the most recent windows, constructing features such as multi-window context, histogram differences between adjacent windows, baseline estimation output, and parameter changes of the baseline estimator between adjacent windows. The histogram differences are used to represent the temporal direction of noise drift.
[0128] Step 8: Baseline Estimation
[0129] The slow loop uses a window variance estimator, an EKF (Extended Kalman Filter), a UKF (Unscented Kalman Filter), an RLS (Recursive Least Squares) estimator, or other classical estimators to obtain the noise state or baseline parameters. The baseline estimator provides a stable baseline gain matrix K. teacher Baseline bias vector b teacher Or noise state θ teacher .
[0130] Step 9: Residual Reasoning
[0131] A lightweight convolutional neural network (CNN) receives the histogram context and baseline estimation features, and outputs a residual calibration. Preferably, the CNN outputs a bias residual δb = [δb q , δb p ] T , where δb q δb represents the offset residual value corresponding to the position orthogonal component. p The bias residual value is the value corresponding to the orthogonal component of momentum; the convolutional neural network does not directly output the error correction amount for each syndrome.
[0132] Step 10: Parameter Mapping
[0133] If the slow loop outputs noise, then based on the covariance C and the measurement noise R... meas Calculate K raw = C(C+R meas ) -1 Then according to b target = α(IK target )μ calculates the bias; if the slow loop output residual is true, then K can be set. next = K teacher b next =b teacher + δb. Where R meas To measure the noise covariance matrix, K raw Let I be the original gain matrix, α be the bias calibration coefficient, I be the identity matrix, and K be the value of the original gain matrix. target Let μ be the target gain matrix, μ be the mean vector of the syndrome, and b be the mean vector of the syndrome. target K is the target bias vector. next Let b be the gain matrix to be updated. next Let δb be the bias vector to be updated, and let δb be the bias residual vector.
[0134] Step 11: Parameter Safety
[0135] For K next and b next It performs gain pruning, bias pruning, outlier detection, exponential moving average, and smoothing constraints, and quantizes the data into a fixed-point format readable by a field-programmable gate array (FPGA). The exponential moving average and smoothing constraints are used to limit the rate of change of parameters between adjacent update cycles.
[0136] Step 12: Parameter writing and submission
[0137] New parameters are written to the inactive parameter storage area, generating a temporary period identifier (stage_epoch). A commit is triggered at the predetermined period boundary or window boundary. After the field-programmable gate array returns a commit acknowledgment (commit_ack), the active storage area identifier (active_bank) and the period identifier (epoch_id) are updated. Because the active and inactive storage areas form a double-buffered structure, parameter switching is completed atomically at the period boundary, and the write process of the slow loop will not disrupt the consistency of the parameters read by the fast loop.
[0138] Step 13: Abnormal rollback
[0139] If slow loop inference times out, parameters exceed the safe range, submission fails, or the overflow rate exceeds the threshold, the previous set of stable parameters is maintained, or the system falls back to the conservative parameters output by the baseline estimator. The stable parameters are the decoding parameters from the previous update cycle or the conservative parameters output by the classical estimator. It should be noted that the GKP code adaptive decoding method provided in this embodiment can be executed by an electronic device, apparatus, or a control module within that device. This embodiment uses an apparatus to execute the method as an example to illustrate the GKP code adaptive decoding apparatus provided in this embodiment.
[0140] The GKP code adaptive decoding device provided in this embodiment of the invention can achieve Figures 1-2 The various processes implemented in the GKP code adaptive decoding method embodiment shown are not described again here to avoid repetition.
[0141] Figure 3 This is a schematic diagram of the structure of the GKP code adaptive decoding device provided in an embodiment of the present invention. The device 100 includes a decoding correction module 10, a feature extraction module 20, a parameter calibration module 30, a parameter update module 40, and an anomaly recovery module 50, wherein:
[0142] The decoding correction module 10 is used to perform an affine transformation on the continuous variable syndrome based on the currently active decoding parameters in the fast loop, generate an error correction amount, and perform reverse displacement correction.
[0143] Preferably, the affine transformation is performed by a field-programmable gate array (FPGA), including:
[0144] The continuous variable syndrome of round t. t =[s q,t , s p,t ] T s in q,t and s p,t After being cropped to a predetermined range, the data is quantized into a fixed number, and events exceeding the predetermined range are counted in the overflow count.
[0145] Read the gain matrix K from the currently active decoding parameters. t With bias vector b t Calculate Δ t =K t ·s t +b t Obtain the error correction amount and perform saturation processing on the error correction amount.
[0146] The predetermined range is set based on the GKP code phase space grid distance λ=sqrt (2π).
[0147] s q,t s represents the syndrome value corresponding to the orthogonal component of the location.p,t K represents the syndrome value corresponding to the orthogonal components of momentum. t Let b be the decoding gain matrix for the t-th round. t Let Δ be the decoding bias vector for round t. t Let be the error correction amount in round t.
[0148] The feature extraction module 20 is used to perform statistical analysis on continuous variable syndromes in a slow loop according to a preset window, and extract syndrome statistical features including histogram distribution, inter-window difference and / or baseline estimate.
[0149] Preferably, the feature extraction module 20 performs statistics including:
[0150] Each round of continuous variable syndrome is mapped to the corresponding grid point in a two-dimensional histogram grid, and the syndrome histogram of the current window is accumulated. Overflow events, saturation events and / or window completion events are recorded.
[0151] When the cumulative number of samples reaches the window length W or the preset triggering condition is met, the window is determined to be ready, and the syndrome histogram, the overflow event count, and the window identifier are transmitted to the slow loop.
[0152] The histogram distribution is a multi-window context constructed by normalizing the histograms of the most recent syndromes, and the difference between windows is the difference between the syndrome histograms of adjacent windows.
[0153] Preferably, in the feature extraction step of the feature extraction module 20, the baseline estimate is given by a classical estimator based on the syndrome histogram.
[0154] Preferably, the classical estimator includes a window variance estimator, an extended Kalman filter, an unscented Kalman filter, and / or a recursive least squares estimator.
[0155] Preferably, the baseline estimate includes noise state, baseline gain matrix and / or baseline bias vector, etc.
[0156] Preferably, the statistical features of the syndrome also include the output of the classical estimator and the amount of parameter change of the classical estimator between adjacent windows.
[0157] The parameter calibration module 30 is used to input the statistical characteristics of the syndrome into the residual calibration model, output the parameter residual, and combine the baseline estimate to generate the value to be updated for the decoding parameter.
[0158] Preferably, the residual calibration model is a convolutional neural network. The convolutional neural network takes histogram distribution, inter-window difference and / or baseline estimate as input, and outputs bounded parameter residuals, instead of directly outputting the error correction amount for each round.
[0159] Preferably, the parameter residual is the bias residual δb = [δb q ,δb p ] T .
[0160] Where, δb q δb represents the offset residual value corresponding to the position orthogonal component. p This represents the bias residual value corresponding to the orthogonal components of momentum.
[0161] Preferably, the parameter calibration module 30 generates the updated values for the decoding parameters, including:
[0162] When the slow loop outputs noise, based on the covariance C and R meas Calculate K raw =C(C+R meas ) -1 Then according to b target =α(IK target The bias is calculated using μ. Where C is the equivalent displacement error covariance matrix in the orthogonal component coordinate system of phase space, i.e., C = R(θ)[[σ q 2 ,0], [0,σ p 2 R(θ) T R(θ) = [[cosθ,−sinθ],[sinθ,cosθ]] is a two-dimensional rotation matrix; σ q , σ p R represents the standard deviation of noise in the two principal axis directions. meas It is the covariance matrix of the measured noise.
[0163] When considering the residual value of the slow loop output parameters, let K... next =K teacher b next =b teacher +δb.
[0164] Among them, R meas To measure the noise covariance matrix, K raw Let I be the original gain matrix, α be the bias calibration coefficient, I be the identity matrix, and K be the value of K. target Let μ be the target gain matrix, μ be the mean vector of the syndrome, and b be the mean vector of the syndrome. target K is the target bias vector. next Let b be the gain matrix to be updated. next K is the bias vector to be updated. teacher b is the gain matrix obtained from the baseline estimation. teacher δb is the bias vector obtained from the baseline estimation, and δb is the bias residual vector.
[0165] The parameter update module 40 is used to perform pruning constraints, smoothing filtering and / or fixed-point quantization processing on the value to be updated, write it into the inactive parameter storage area, and trigger atomic switching at the cycle boundary so that the fast loop uses the value to be updated for decoding in the next cycle.
[0166] Preferably, the pruning constraints include gain pruning, bias pruning, and / or outlier detection, and the smoothing filtering includes exponential moving average and / or smoothing constraints. After the value to be updated is written to the inactive parameter storage area, a temporary storage period identifier is generated. A commit is triggered at the period boundary or the window boundary. After the commit confirmation is returned, the active storage area identifier and the period identifier are updated.
[0167] The anomaly recovery module 50 is used to monitor the operating status of the slow loop. When a preset abnormal event is detected, it controls the fast loop to roll back the decoding parameters to the preset stable parameters.
[0168] Preferably, the abnormal events include residual calibration model inference timeout, value to be updated exceeding the safe range, submission failure and / or overflow rate exceeding the threshold, and the stable parameter is the decoding parameter of the previous update cycle or the conservative parameter output by the classical estimator.
[0169] The present invention also provides a storage medium for storing, for example, Figures 1-2 A computer program for any of the GKP code adaptive decoding methods. For example, computer program instructions, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the present invention through the operation of the computer, achieving the same technical effect. To avoid repetition, these will not be elaborated further here. The program instructions for invoking the methods of the present invention may be stored in a fixed or removable storage medium, and / or transmitted via data streams in broadcast or other signal carrying media, and / or stored in the storage medium of a computer device operating according to the program instructions.
[0170] According to one embodiment of the present invention, the present invention also provides such a Figure 4The illustrated electronic device 400 may optionally include a storage medium 200 for storing a computer program and a processor 300 for executing the computer program. When the computer program is executed by the processor 300, it implements any of the aforementioned GKP code adaptive decoding methods, triggering the electronic device 400 to execute methods and / or technical solutions based on the foregoing embodiments, achieving the same technical effect. To avoid repetition, these methods will not be elaborated upon here. It should be noted that the electronic devices in this embodiment include mobile electronic devices and non-mobile electronic devices. For example, mobile electronic devices may be mobile phones, tablets, laptops, handheld computers, in-vehicle electronic devices, wearable devices, super mobile personal computers, netbooks, or personal digital assistants, etc., while non-mobile electronic devices may be servers, network-attached storage (NAS), personal computers (PCs), televisions (TVs), ATMs, or self-service machines, etc. This embodiment does not specifically limit the scope of the invention.
[0171] It should be noted that the present invention can be implemented in software and / or a combination of software and hardware, for example, using an application-specific integrated circuit (ASIC), a general-purpose computer, or any other similar hardware device. In one embodiment, the software program of the present invention can be executed by a processor to implement the steps or functions described above. Similarly, the software program of the present invention (including associated data structures) can be stored in a computer-readable recording medium, such as RAM memory, a magnetic or optical drive, a floppy disk, or similar devices. Furthermore, some steps or functions of the present invention can be implemented in hardware, for example, as circuitry that works with a processor to perform the various steps or functions.
[0172] This invention can be implemented on a computer as a computer-based method, or in dedicated hardware, or a combination of both. Executable code or portions thereof for the method according to the invention can be stored on a computer program product. Examples of computer program products include memory devices, optical storage devices, integrated circuits, servers, online software, etc. Optionally, the computer program product includes non-transitory program code components stored on a computer-readable medium so as to execute the method according to the invention when the program product is executed on a computer.
[0173] In an optional embodiment, the computer program includes computer program code components adapted to perform all the steps of the method according to the invention when the computer program is run on a computer. Optionally, the computer program is embodied on a computer-readable medium.
[0174] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of the present invention is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0175] Of course, the present invention may have other various embodiments. Without departing from the spirit and essence of the present invention, those skilled in the art can make various corresponding changes and modifications according to the present invention, but these corresponding changes and modifications should all fall within the protection scope of the appended claims.
Claims
1. A GKP code adaptive decoding method, characterized in that, Includes the following steps: The decoding correction step involves performing an affine transformation on the continuous variable syndrome based on the currently active decoding parameters in the fast loop, generating an error correction amount, and performing inverse shift correction. The feature extraction step involves statistically analyzing the continuous variable syndrome within a preset window in the slow loop, extracting syndrome statistical features including histogram distribution, inter-window differences, and / or baseline estimates. The parameter calibration step involves inputting the statistical characteristics of the syndrome into the residual calibration model, outputting the parameter residuals, and combining them with the baseline estimate to generate the updated values of the decoded parameters. The parameter update step involves performing pruning constraints, smoothing filtering, and / or fixed-point quantization on the value to be updated, writing it into the inactive parameter storage area, and triggering an atomic switch at the cycle boundary so that the fast loop uses the value to be updated for decoding in the next cycle. The abnormal recovery step involves monitoring the operating status of the slow loop. When a preset abnormal event is detected, the fast loop is controlled to revert the decoding parameters to preset stable parameters.
2. The method according to claim 1, characterized in that, In the decoding and correction step, the affine transformation is performed by a field-programmable gate array (FPGA), including: The continuous variable syndrome s in round t t =[s q,t , s p,t ] T s in q,t and s p,t After being cropped to a predetermined range, the data is quantized into a fixed number, and events exceeding the predetermined range are counted in the overflow count. Read the gain matrix K from the currently active decoding parameters. t With bias vector b t Calculate Δ t =K t ·s t +b t The error correction amount is obtained, and the error correction amount is saturated. The predetermined range is set based on the GKP code phase space grid spacing λ=sqrt(2π); The s q,t The s represents the syndrome value corresponding to the orthogonal component of the position. p,t The K represents the syndrome value corresponding to the orthogonal components of momentum; t Let b be the decoding gain matrix for the t-th round. t Let Δ be the decoding bias vector for round t. t Let be the error correction amount in round t.
3. The method according to claim 1, characterized in that, In the feature extraction step, the statistics include: Each round of the continuous variable syndrome is mapped to the corresponding grid point in the two-dimensional histogram grid, and the syndrome histogram of the current window is accumulated. Overflow events, saturation events and / or window completion events are recorded. When the cumulative number of samples reaches the window length W or the preset triggering condition is met, the window is determined to be ready, and the syndrome histogram, the count of the overflow event, and the window identifier are transmitted to the slow loop. The histogram distribution is a multi-window context constructed by normalizing the most recent several syndrome histograms, and the difference between windows is the difference between the syndrome histograms of adjacent windows.
4. The method according to claim 3, characterized in that, In the feature extraction step, the baseline estimate is given by a classical estimator based on the syndrome histogram; The classical estimators include window variance estimators, extended Kalman filters, unscented Kalman filters, and / or recursive least squares estimators; The baseline estimator includes the noise state, the baseline gain matrix, and / or the baseline bias vector; The statistical features of the syndrome also include the output of the classical estimator and the amount of parameter change of the classical estimator between adjacent windows.
5. The method according to claim 1, characterized in that, In the parameter calibration step, the residual calibration model is a convolutional neural network. The convolutional neural network takes the histogram distribution, the inter-window difference and / or the baseline estimate as input and outputs the bounded parameter residual, instead of directly outputting the error correction amount for each round. The parameter residual is the bias residual δb = [δb q ,δb p ] T ; Where, δb q δb represents the offset residual value corresponding to the position orthogonal component. p This represents the bias residual value corresponding to the orthogonal components of momentum.
6. The method according to claim 5, characterized in that, The step of generating the value to be updated for the decoding parameters in the parameter calibration step includes: When the slow loop outputs noise, based on the covariance C and the measurement noise R... meas Calculate K raw =C(C+R meas ) -1 Then according to b target =α(IK target μ is used to calculate the bias; When the slow loop outputs the parameter residual, let K... next =K teacher b next =b teacher +δb; Wherein, the R meas To measure the noise covariance matrix, the K raw The original gain matrix is given by α, where α is the bias calibration coefficient, I is the identity matrix, and K is the... target Let μ be the target gain matrix, and b be the mean vector of the syndrome. target K is the target bias vector. next For the gain matrix to be updated, the b next For the bias vector to be updated, the K teacher The gain matrix obtained from the baseline estimation, wherein b teacher δb is the bias vector obtained from the baseline estimation, and δb is the bias residual vector.
7. The method according to claim 4, characterized in that, In the parameter update step, the pruning constraints include gain pruning, bias pruning and / or outlier detection, and the smoothing filter includes exponential moving average and / or smoothing constraints; after the value to be updated is written into the inactive parameter storage area, a temporary storage period identifier is generated, and a submission is triggered at the period boundary or the window boundary. After the submission confirmation is returned, the active storage area identifier and the period identifier are updated. In the anomaly recovery step, the anomaly events include the residual calibration model inference timeout, the value to be updated exceeding the safe range, the submission failure and / or the overflow rate exceeding the threshold, and the stable parameter is the decoding parameter of the previous update cycle or the conservative parameter output by the classical estimator.
8. A GKP code adaptive decoding device constructed based on the GKP code adaptive decoding method according to any one of claims 1 to 7, characterized in that, The device includes: The decoding correction module is used to perform an affine transformation on the continuous variable syndrome based on the currently active decoding parameters in the fast loop, generate error correction values, and perform inverse shift correction. The feature extraction module is used to perform statistical analysis on the continuous variable syndrome in the slow loop according to a preset window, and extract syndrome statistical features including histogram distribution, inter-window difference and / or baseline estimate; The parameter calibration module is used to input the statistical features of the syndrome into the residual calibration model, output the parameter residual, and combine the baseline estimate to generate the update value of the decoding parameter; The parameter update module is used to perform pruning constraints, smoothing filtering and / or fixed-point quantization on the value to be updated, write it into the inactive parameter storage area, and trigger atomic switching at the cycle boundary so that the fast loop uses the value to be updated for decoding in the next cycle. An anomaly recovery module is used to monitor the operating status of the slow loop. When a preset anomaly event is detected, the module controls the fast loop to roll back the decoding parameters to preset stable parameters.
9. A storage medium, characterized in that, Used to store a computer program for performing the method according to any one of claims 1 to 7.
10. An electronic device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.