Pure quantum recurrent neural network and sequence data processing method, storage medium
By using a pure quantum recurrent neural network with dual quantum registers and a parameterized entanglement module, the optimization bottleneck and coherence violation problem of existing quantum machine learning architectures are solved, achieving efficient and stable end-to-end time-series data processing, and improving processing accuracy and hardware adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN POLYTECHNIC
- Filing Date
- 2026-04-28
- Publication Date
- 2026-06-12
AI Technical Summary
Existing quantum machine learning architectures suffer from optimization bottlenecks in temporal data processing, are prone to quantum coherence corruption, and have low hardware implementation efficiency. They fail to effectively integrate the recursive processing of temporal data with the coherent evolution mechanism of quantum systems.
By employing a dual-quantum register structure and a parameterized entanglement module, and through nonlinear angle encoding and trainable readout circuits, a pure quantum recurrent neural network is constructed to achieve coherent fusion of historical memory and current input, avoiding the involvement of classical modules and intermediate measurements, and utilizing coherent propagation within the quantum system for end-to-end processing.
It achieves efficient and stable end-to-end quantum processing, avoids information loss and low hardware efficiency, significantly improves the accuracy and stability of time-series data processing, and adapts to the actual operating conditions of current quantum hardware.
Smart Images

Figure CN122197964A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data processing technology, specifically relating to a pure quantum recurrent neural network and a sequence data processing method and storage medium. Background Technology
[0002] Currently, the technical solutions for time-series data processing in the field of quantum machine learning mainly include the following representative architectures, but they all have inherent structural defects.
[0003] The first type is the hybrid quantum-classical recurrent architecture, typically represented by variable quantum recurrent neural networks. Structurally, this type of scheme consists of classical recurrent units (such as long short-term memory network units or gated recurrent units) coupled with parameterized quantum circuits, where the quantum circuits act as neurons or feature extractors within the classical recurrent units. In this architecture, at each time step, the measurement results from the quantum circuit need to be converted into classical data and input into the classical recurrent unit for state updates, and then the updated classical state is re-encoded back into the quantum circuit. This iterative quantum-classical-quantum interface conversion not only introduces a data processing bottleneck, but more importantly, due to the involvement of classical recurrent units, the overall optimization of the model must be performed alternately in both the classical and quantum domains, making true end-to-end quantum acceleration impossible. Furthermore, the process of collapsing quantum information into classical values and then re-encoding it destroys the coherence of the quantum state, preventing the system from fully utilizing the complex information carried by quantum properties such as entangled states.
[0004] The second type is the pure quantum recursive architecture that relies on intermediate measurements. Structurally, this type of scheme requires a complete measurement and reset of the quantum register used to store historical information after each recursive step before processing the input for the next time step can begin. Specifically, the operation flow is: encode the new input, execute the quantum gate, measure the entire register, reset the register based on the measurement result, and prepare for the next time step. This structural design causes the encoded historical information in the quantum system (including entangled states and phase information between multiple qubits) to be forcibly collapsed and discarded at each time step, fundamentally undermining the information persistence required by recursive neural networks. For mainstream quantum hardware platforms such as superconducting qubits, frequent intermediate circuit reset operations are not only noisy and have low fidelity, but also significantly increase circuit execution time, making long-sequence processing tasks impractical.
[0005] The third category consists of quantum architectures that rely on post-selection or complex amplitude amplification. These schemes structurally depend on a post-selection mechanism, requiring the circuit to be run multiple times during training or inference, and only selecting experimental samples whose measurements meet specific conditions for computation. This design leads to severely low computational efficiency because a large number of circuit results are discarded. Furthermore, achieving fixed-point amplitude amplification often requires deep quantum circuits, which contradicts the limited coherence time and high gate error rate of current quantum devices. Moreover, the success probability of this method typically decreases exponentially with increasing circuit size, making it difficult to scale to more complex tasks.
[0006] The fourth category is constrained architectures for specific hardware platforms. These schemes are based on repeated measurements of the entire system and are suitable for scenarios where NMR platforms acquire system states through overall measurements. However, in today's mainstream single-measurement systems such as superconducting qubits and ion trap qubits, this structure is extremely inefficient, requiring numerous repeated measurements to construct the complete system state. This makes it difficult to deploy in practical applications due to the huge sampling overhead, and it lacks universality across different quantum hardware platforms.
[0007] In summary, existing technologies generally suffer from structural flaws such as reliance on classical modules, forced intermediate measurements, or low hardware implementation efficiency. The root cause of these flaws lies in the fact that existing architectures fail to natively integrate the recursive processing of time-series data with the coherent unitary evolution mechanism of quantum systems. Instead, they simulate recursion through artificially configured interfaces, measurements, or resets, thereby introducing processing bottlenecks and undermining quantum advantage. Summary of the Invention
[0008] To address the problems existing in the prior art, this invention provides a pure quantum recurrent neural network and a sequence data processing method and storage medium, which solves the problems of optimization bottlenecks, easy destruction of quantum coherence, and low hardware implementation efficiency in the existing hybrid architecture, thereby enabling efficient and stable end-to-end timing learning on current quantum devices.
[0009] To achieve the above objectives, the present invention provides the following solution: A pure quantum recurrent neural network includes: a dual quantum register structure and a parameterized entanglement module; the dual quantum register structure includes: a memory register and a data register; the memory register is used to store historical quantum memory states, and the data register is used to carry the input data of the current time step; the two registers are connected by a parameterized entanglement circuit; the memory register is not measured during the entire sequence processing except for the final output; the parameterized entanglement module is used to achieve coherent fusion between the historical memory state and the current input.
[0010] As a preferred approach, a nonlinear angle encoding method is used in the data encoding stage to load classical data into a quantum state.
[0011] As a preferred option, the parameterized entanglement module consists of multiple cascaded sub-blocks. Each sub-block contains a universal rotation gate sequence that operates on the memory register and the data register, as well as a controlled NOT gate layer that connects the corresponding qubits of the two registers. Each sub-block has the same structure and shares the same set of trainable parameters.
[0012] As a preferred option, for each time step, the classic input... Firstly, through the nonlinear angle encoding unit Encode into the data register; apply to the qubits sequentially Door and The door maps classic data onto the parabolic trajectory of Bloch's sphere.
[0013] This invention also provides a sequence data processing method, which processes the input sequence according to the time step sequence using a pure quantum recurrent neural network; wherein, at the initial moment, the memory register and the data register are prepared together in the initial ground state. For the t-th time step, the current input is first encoded using a nonlinear angle encoding unit. The data is encoded into a data register to form an input-dependent quantum state; subsequently, the parameterized entanglement module is... It operates on the system joint state at the end of the previous time step, achieving coherent fusion of historical memory and current input information to generate a new system joint state; the memory register part in this new system joint state will continue to propagate as the initial hidden state of the next time step, while the data register part will carry the input data of the next time step.
[0014] Preferably, after processing the entire input sequence, the prediction result is extracted through a readout circuit. The readout circuit first applies a trainable rotating gate to the memory register to adjust the measurement basis, and then measures the expected value of the Pauli-Z operator of the qubits in the memory register. The expected value ranges from [-1, 1], and is finally mapped to the output range required by the task through an affine transformation.
[0015] As a preferred approach, the training method for pure quantum recurrent neural networks employs a gradient-based optimization strategy.
[0016] The present invention also provides a storage medium storing a computer program, which executes a sequence data processing method when running.
[0017] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention constructs a recurrent neural network architecture that runs entirely within a quantum system by organically combining a dual quantum register structure, nonlinear angle encoding, parameterized entanglement module, and trainable readout circuit. This enables end-to-end quantum processing of time-series data and avoids structural problems in existing technologies, such as reliance on classical modules, forced intermediate measurements, or low hardware implementation efficiency. Attached Figure Description
[0018] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of a pure quantum recurrent neural network structure according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the parametric entangled circuit block structure; Figure 3 This is a schematic diagram of a complete quantum circuit implementation. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0022] Example 1 This invention provides a pure quantum recurrent neural network that fully integrates the entire time-series processing into a quantum system. It updates the internal quantum memory state through coherent unitary evolution without relying on any classical recurrent modules. The pure quantum recurrent neural network includes a dual-quantum register structure and a parameterized entanglement module. The dual-quantum register structure includes a memory register (Reg.A) and a data register (Reg.B). The parameterized entanglement module is used to achieve coherent fusion between the historical memory state and the current input.
[0023] As one embodiment of the present invention, such as Figure 1 As shown, in the dual quantum register structure, the memory register (Reg.A) contains at least one qubit, whose initial state carries the hidden state of the previous time step. The first register stores the quantum memory state extracted and compressed from historical time steps. This register is not measured during the entire sequence processing except for the final output, thus ensuring the coherence of historical information is not destroyed. The second register (Reg.B) contains multiple qubits, whose initial state carries the data-encoded input for the current time step, used to receive and process the current input data at each time step. The two registers are connected by a parameterized entanglement circuit. Enable connection and interaction.
[0024] In the data encoding stage, this invention employs a nonlinear angle encoding method to load classical data into a quantum state. For each time step, the classical input... Firstly, through the nonlinear angle encoding unit The data is encoded into a data register. Specifically, for a normalized input feature value ranging from [-1, 1], this method generates two rotation angles using two nonlinear functions. and Then apply sequentially to the qubits Door and The gate maps classical data to parabolic trajectories on a Bloch sphere, thereby enhancing the representational power of a single qubit without increasing the number of qubits.
[0025] As one embodiment of the present invention, the parameterized entanglement module adopts a hardware-efficient circuit structure, consisting of multiple sub-blocks. Each sub-block contains alternating single-qubit rotation gates and controlled-NOT gates (CNOT gates). Specifically, in each sub-block, a universal rotation gate is first applied to the qubits involved in the computation, and then the entanglement between the corresponding qubits of Reg.A and Reg.B is achieved through CNOT gates, forming a "ladder" structure. This design enables the coherent fusion of historical memory information and current input information through quantum entanglement and interference, effectively simulating the hidden state update mechanism in classical recurrent neural networks.
[0026] Furthermore, the parameterized entanglement circuit block of the present invention For a more detailed structural composition, see [link to relevant documentation]. Figure 2 . Figure 2 The specific construction of a single entangled sub-block is shown, comprising alternating sequences of rotation gates applied to Reg.A and Reg.B qubits, as well as a CNOT gate layer. Throughout the quantum circuit, these entangled sub-blocks are cascaded in temporal order, with each sub-block corresponding to a processing step in time. Notably, all time steps share the same set of trainable parameters. This makes the number of model parameters independent of the sequence length, thus avoiding the parameter explosion problem.
[0027] Example 2 This invention also provides a method for processing sequence data using a pure quantum recurrent neural network. During the forward propagation process, the pure quantum recurrent neural network of this invention processes the input sequence according to the time step order. Initially, the memory register and data register are prepared together in the initial ground state. For the t-th time step, the current input is first encoded using a nonlinear angle encoding unit. The data is encoded into a data register to form an input-dependent quantum state; subsequently, the parameterized entanglement module is... The algorithm operates on the system's joint state at the end of the previous time step, coherently fusing historical memory with current input information to generate a new system joint state. The memory register portion of this state will continue to propagate as the initial hidden state for the next time step, while the data register portion will carry the input data for the next time step. Throughout the forward propagation process, the quantum state of the memory register remains coherent, unmeasured, and unreset, thus ensuring the continuous preservation of historical information within the quantum state.
[0028] After processing the entire input sequence, the prediction result is extracted through a readout circuit. The readout circuit first applies a trainable rotating gate to the memory register to adjust the measurement basis, and then measures the expected value of the Pauli-Z operator of the qubits in the memory register. The expected value ranges from [-1, 1]. Finally, an affine transformation is used to map it to the output range required by the task. For example, for normalized predicted values, the following can be used: .
[0029] The implementation of this invention on a practical quantum hardware platform employs specific qubit partitioning and circuit layout; see [link to relevant documentation]. Figure 3 In the experimental implementation of the quantum cloud platform, the total number of qubits is 6, where Reg.A contains 1 qubit for storing the hidden state; Reg.B contains 5 qubits for carrying historical input data within the sliding window. Parameterized entanglement circuit. Employing a single-layer design comprising five sub-blocks, each sub-block performs a universal rotation and CNOT operation on one qubit of Reg.A and one corresponding qubit of Reg.B. Additionally, after all entanglement operations are completed, an extra universal rotation gate is applied to the qubit of Reg.A. The entire circuit contains 58 fundamental quantum gates and has a depth of 30 layers. All trainable parameters are shared across time steps, thus achieving efficient quantum resource utilization.
[0030] The training method of this invention employs a gradient-based optimization strategy. During the training phase, all trainable parameters are first initialized. Then, the aforementioned forward propagation process is executed for each sample in the training dataset to obtain the predicted output. The loss function between the predicted output and the true value is calculated. Subsequently, the gradient of the loss function with respect to each quantum gate parameter is calculated using a parameter shifting rule. This rule does not require complex auxiliary qubits or deep circuits and can directly obtain an unbiased estimate of the gradient on quantum hardware. Finally, classical optimization algorithms such as the Adam optimizer are used to update the parameters, iterating until the loss function converges. During the inference phase, forward propagation is directly executed, and the predicted result is output.
[0031] This invention has been systematically compared in meteorological forecasting tasks, complex dynamic system forecasting tasks, and noise environment simulation. The following is a detailed description of the effects of each technology based on the experimental data.
[0032] First, this invention achieves true end-to-end quantum processing, eliminating the optimization bottleneck of hybrid architectures. Existing hybrid quantum-classical architectures require repeated interface conversions of quantum measurement, classical computation, and recoding at each time step. In contrast, this invention employs a dual-quantum register structure, placing the entire time-series processing entirely within the quantum system. The parameterized entanglement module directly fuses historical states with current inputs through coherent unitary evolution, without the involvement of any classical recurrent units. As shown in Table 1, in the relative humidity prediction task, compared to the hybrid model VQRNN with the same number of parameters, this invention reduces the root mean square error (RMSE) by 73.5%, the mean absolute error (MAE) by 75.3%, and the mean absolute percentage error (MAPE) by 68.1%. This significant improvement stems from the fact that the pure quantum architecture of this invention avoids the information loss and optimization difficulties caused by information conversion in hybrid designs.
[0033] Meanwhile, as shown in Table 2, compared with the classic recurrent models RNN, LSTM, and GRU, the present invention exhibits extremely low statistical variance in the atmospheric pressure prediction task, with an RMSE standard deviation of only ±0.0040, which is an order of magnitude lower than that of the classic models, fully verifying the stability of the optimization process of the present invention.
[0034] Second, this invention avoids quantum state collapse through a coherent propagation mechanism, effectively preserving the integrity of historical information. Existing quantum recursive architectures that rely on intermediate measurements require a complete measurement and reset of the memory register after each time step, resulting in the forced discarding of historical information. In contrast, this invention designs the memory register to remain unmeasured throughout the entire sequence processing, with the memory state propagating coherently between time steps in the form of a pure quantum state. As shown in Table 1, in complex relative humidity prediction tasks, the prediction accuracy of this invention significantly outperforms the quantum tensor network models QTN-TTN and QTN-MERA; in complex dynamic system prediction, the prediction R² score of this invention for the Bessel function and Lotka-Volterra model reaches 1.000 on the test set, verifying the effectiveness of the coherent propagation mechanism in preserving long-range temporal information.
[0035] Third, this invention employs nonlinear angle encoding to enhance the expressive power of single-qubit quantum states, improving model performance without increasing qubit resources. Existing linear angle encoding only linearly maps input features to a single-axis rotation angle, restricting the quantum state to a single circular trajectory of the Bloch sphere. In contrast, this invention uses a nonlinear function transformation in the data encoding unit to map input features to a parabolic trajectory of the Bloch sphere. As shown in Table 3, under the same circuit topology and training conditions, compared to standard linear encoding, the nonlinear angle encoding scheme of this invention achieves a 63.8% reduction in root mean square error and a 63.9% reduction in mean absolute error in weather forecasting tasks, fully validating the significant improvement in model expressive power brought about by this encoding structure.
[0036] Fourth, this invention employs a shallow circuit structure with parameter sharing, exhibiting excellent hardware adaptability and training stability. In its implementation on a quantum cloud platform, the memory register is configured with only one qubit, the data register with five qubits, and the parameterized entanglement circuit uses a single-layer design containing 33 trainable parameters. All time steps share the same set of parameters, making the number of model parameters independent of the input sequence length, fundamentally avoiding the vanishing or exploding gradient problems. As shown in Table 2, this invention demonstrates extremely low statistical variance across all prediction tasks. This stability stems from the shallow parameter-sharing structure of this invention effectively avoiding gradient instability during the optimization process.
[0037] Fifth, this invention maintains robust performance even under real-world noise conditions. As shown in Table 4, under experimental conditions simulating real hardware noise (0.1% error rate for single-bit gates and 0.6% error rate for double-bit gates), the model of this invention shows only a slight decrease in accuracy across all prediction tasks. For example, in the atmospheric pressure prediction task, the RMSE only increases from 1.0873 to 1.0878, and the accuracy only decreases from 99.8932% to 99.8931%. Even in the most sensitive humidity prediction task, the RMSE of this invention significantly outperforms all the compared quantum baseline models. This result demonstrates that the circuit structure design of this invention has good noise robustness and can adapt to the actual operating conditions of quantum hardware in the NISQ era.
[0038] Example 3 The present invention also provides a storage medium storing a computer program, which executes a sequence data processing method when running.
[0039] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. A pure quantum recurrent neural network, characterized in that, include: Dual quantum register structure and parameterized entanglement module; The dual quantum register structure includes a memory register and a data register. The memory register is used to store historical quantum memory states, and the data register is used to carry the input data of the current time step. The two registers are connected by a parameterized entanglement circuit. The memory register is not measured during the entire sequence processing except for the final output. The parameterized entanglement module is used to achieve coherent fusion between the historical memory state and the current input.
2. The pure quantum recurrent neural network as described in claim 1, characterized in that, In the data encoding stage, a nonlinear angle encoding method is used to load classical data into a quantum state.
3. The pure quantum recurrent neural network as described in claim 2, characterized in that, The parameterized entanglement module consists of multiple cascaded sub-blocks. Each sub-block contains a universal rotation gate sequence that operates on the memory register and the data register, as well as a controlled NOT gate layer that connects the corresponding qubits of the two registers. Each sub-block has the same structure and shares the same set of trainable parameters.
4. The pure quantum recurrent neural network as described in claim 3, characterized in that, For each time step, the classic input Firstly, through the nonlinear angle encoding unit Encode into the data register; apply to the qubits sequentially Door and The door maps classic data onto the parabolic trajectory of Bloch's sphere.
5. A sequence data processing method, characterized in that, The input sequence is processed sequentially through a pure quantum recurrent neural network; initially, the memory register and data register are prepared together in the initial ground state. For the t-th time step, the current input is first encoded using a nonlinear angle encoding unit. The data is encoded into a data register to form an input-dependent quantum state; subsequently, the parameterized entanglement module is... It operates on the system joint state at the end of the previous time step, achieving coherent fusion of historical memory and current input information to generate a new system joint state; the memory register part in this new system joint state will continue to propagate as the initial hidden state of the next time step, while the data register part will carry the input data of the next time step.
6. The sequence data processing method as described in claim 5, characterized in that, After processing the entire input sequence, the prediction result is extracted through a readout circuit. The readout circuit first applies a trainable rotating gate to the memory register to adjust the measurement basis, and then measures the expected value of the Pauli-Z operator of the qubits in the memory register. The expected value ranges from [-1, 1], and is finally mapped to the output range required by the task through an affine transformation.
7. The sequence data processing method as described in claim 6, characterized in that, The training method for pure quantum recurrent neural networks employs a gradient-based optimization strategy.
8. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed, performs the sequence data processing method as described in any one of claims 5-7.