A time series quantum modeling method and system based on multi-architecture fusion

By employing a multi-architecture fusion-based time-series quantum modeling approach, which adaptively selects the quantum model architecture and combines hierarchical angle encoding and entanglement control, the problem of architecture adaptability and resource utilization in existing quantum time-series modeling is solved, thereby improving prediction accuracy and robustness.

CN122433010APending Publication Date: 2026-07-21CHINA CITIC BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA CITIC BANK CO LTD
Filing Date
2026-06-04
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing quantum time series modeling methods have shortcomings in terms of architecture adaptability, coding efficiency, resource utilization and generalization ability. They are difficult to meet the modeling needs of time series with different lengths and complexities at the same time, and are sensitive to noise and outliers, resulting in insufficient robustness of the models in real-world scenarios.

Method used

We adopt a time series quantum modeling method based on multi-architecture fusion. By adaptively selecting serial, parallel or extended parallel quantum model architectures and combining hierarchical angle encoding and entanglement control, we optimize the utilization of quantum resources and parameter configuration, thereby enhancing the model's generalization ability and robustness to different types of time series.

Benefits of technology

It enables adaptive modeling of time series of different lengths and complexities, improves the accuracy of prediction results and the adaptability of model architecture, reduces quantum state homogenization, makes efficient use of quantum resources, and enhances robustness in noisy environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122433010A_ABST
    Figure CN122433010A_ABST
Patent Text Reader

Abstract

The application discloses a time series quantum modeling method and system based on multi-architecture fusion. The method comprises the following steps: obtaining original time series data; determining one of a serial reupload architecture, a parallel reupload architecture and an extended parallel reupload architecture as an optimal quantum model architecture according to the sequence length and the sequence complexity corresponding to the original time series data; and processing a feature encoding quantum state determined based on the original time series data according to a target quantum circuit with the optimal quantum model architecture to obtain a prediction result corresponding to the original time series data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of quantum computing technology, and in particular to a time-series quantum modeling method and system based on multi-architecture fusion. Background Technology

[0002] Time series analysis is one of the core areas of data analysis, playing an irreplaceable role in scenarios such as financial market forecasting, meteorological data modeling, and industrial equipment condition monitoring. Traditional time series modeling methods mainly include statistical models and classical machine learning models. Statistical models rely on strict mathematical assumptions and are difficult to handle nonlinear, high-dimensional time series data; while classical machine learning models can capture some complex patterns, they face problems such as high computational complexity, vanishing or exploding gradients when dealing with long-range dependencies and high-dimensional feature mappings in time series, resulting in low model training efficiency and limited prediction accuracy.

[0003] With the rise of quantum computing technology, quantum machine learning has provided a new technical path for time series analysis. The superposition and entanglement properties of quantum computing theoretically enable efficient representation and processing of time series data in high-dimensional Hilbert spaces, breaking through the computational bottleneck of classical computing. Current research on quantum time series modeling mainly focuses on single-architecture designs, such as serial re-upload quantum circuits and parallel quantum neural networks. While serial architectures are highly parameter-efficient, their ability to process long sequences is limited. Parallel architectures, although capable of utilizing multiple qubit resources, are prone to excessive entanglement, leading to decreased trainability. Therefore, existing quantum computing methods struggle to simultaneously meet the modeling needs of time series of different lengths and complexities, exhibiting insufficient architectural adaptability. Summary of the Invention

[0004] To address the issue of insufficient architectural adaptability in existing quantum computing methods, this application discloses the following technical solution:

[0005] The first aspect of this application provides a time-series quantum modeling method based on multi-architecture fusion, including:

[0006] Obtain the raw time series data;

[0007] Based on the sequence length and sequence complexity corresponding to the original time series data, one of the serial re-upload architecture, parallel re-upload architecture, and extended parallel re-upload architecture is determined as the optimal quantum model architecture.

[0008] The target quantum circuit with the optimal quantum model architecture is used to process the feature-encoded quantum states determined based on the original time series data to obtain the prediction results corresponding to the original time series data.

[0009] A second aspect of this application provides a time-series quantum modeling system based on multi-architecture fusion, comprising:

[0010] The acquisition unit is used to obtain raw time series data;

[0011] The determining unit is used to determine the optimal quantum model architecture from among the serial re-upload architecture, the parallel re-upload architecture, and the extended parallel re-upload architecture, based on the sequence length and sequence complexity corresponding to the original time series data.

[0012] The processing unit is used to process the feature-encoded quantum states determined based on the original time series data according to the target quantum circuit having the optimal quantum model architecture, so as to obtain the prediction results corresponding to the original time series data.

[0013] The beneficial effects of this embodiment are as follows: based on the sequence length and sequence complexity of the original time series data to be processed, one of the various available quantum model architectures is selected as the optimal quantum model architecture, and then the prediction result is determined based on the target quantum circuit with this optimal quantum model architecture. In this way, the quantum model architecture adapted to different situations can be flexibly selected according to actual needs, and the advantages of different quantum model architectures can be brought into play in different situations, thereby improving the architecture adaptability when processing time series data based on quantum models, and thus improving the accuracy of prediction results. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0015] Figure 1 This is a schematic diagram of a serial re-upload circuit provided in an embodiment of this application;

[0016] Figure 2 This is a flowchart of a time-series quantum modeling method based on multi-architecture fusion provided in an embodiment of this application;

[0017] Figure 3 This is a schematic diagram of the structure of a time series quantum modeling system based on multi-architecture fusion provided in an embodiment of this application. Detailed Implementation

[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] Existing quantum time series modeling research suffers from insufficient architectural adaptability and also has the following problems:

[0020] Low data encoding efficiency. Time series data are characterized by continuity and strong correlation. Existing quantum encoding methods (such as simple angle encoding) do not fully consider the temporal correlation of the data, resulting in severe homogenization of quantum states and failing to effectively preserve the key features of the time series.

[0021] Resource utilization is inefficient. Multi-qubit models suffer from wasted quantum resources, while single-qubit models are limited by their expressive power. At the same time, the balance between the gradient space flattening caused by overparameterization and the insufficient expressive power caused by underparameterization has not been effectively resolved.

[0022] The generalization ability is weak. Existing models lack adaptive adjustment mechanisms when facing different types of time series (such as oscillating and trending types), and are sensitive to data noise and outliers, resulting in insufficient robustness of the models in real-world scenarios.

[0023] In summary, the limitations of existing quantum time series modeling techniques in terms of architectural flexibility, encoding efficiency, resource utilization, and generalization ability restrict their engineering applications. Therefore, there is an urgent need for a time series quantum modeling method that integrates the advantages of multiple architectures, optimizes encoding strategies, and efficiently utilizes quantum resources to improve the model's expressive power, trainability, and practical adaptability.

[0024] The core objective of this application is to provide a time-series quantum modeling method and system based on multi-architecture fusion, addressing the technical shortcomings of existing quantum time-series models in terms of architecture adaptability, coding efficiency, resource utilization, and generalization ability. Specifically, the technical problems to be solved by this application include:

[0025] How to integrate the advantages of serial, parallel and extended parallel quantum architectures to achieve adaptive modeling of time series of different lengths and complexities;

[0026] How to design quantum encoding strategies for the continuous characteristics of time series to reduce quantum state homogenization and improve feature preservation?

[0027] How to optimize the parameter configuration and entanglement control of quantum circuits to improve trainability and reduce quantum resource consumption while ensuring the model's expressive power;

[0028] How to enhance the model's generalization ability to different types of time series and improve its robustness in noisy environments.

[0029] It should be noted that this application is based on the existing quantum computing hardware level and adopts a hybrid quantum-classical computing framework. Under the current limited quantum hardware resources, it achieves engineering feasibility through the optimization of architecture and algorithm, and provides technical support for the practical application of quantum time series modeling.

[0030] The time-series quantum modeling method based on multi-architecture fusion of this application may include the following steps.

[0031] Step 1, Time Series Data Preprocessing and Feature Engineering. The implementation of Step 1 may include the following sub-steps.

[0032] 1.1 Obtain the raw time series data.

[0033] Depending on the application scenario of the method in this application, the obtained raw time series data will vary, and there is no specific limitation. As some examples, in the weather forecasting scenario, the raw time series data can be the meteorological temperature data of a certain location within a recent period, such as the last month or the last 40 days; in the financial analysis scenario, it can be the daily unit price data of a specified financial product, such as a specified stock or a specified fund, within a recent period; and in the traffic analysis scenario, it can be the daily traffic flow data of a specified intersection within a recent period, etc.

[0034] For ease of explanation, the original time series data is denoted as Xt = (x1, x2, ..., xt). N ), where x1 to x N For example, it could be meteorological temperature data from day 1 to day N.

[0035] 1.2 Data standardization.

[0036] The original time series data Xt is standardized to the interval [0, 1] to eliminate the influence of dimensions. Specifically, the standardization of the original time series data can be achieved through the following formula (1).

[0037]

[0038] Where min(Xt) and max(Xt) are the minimum and maximum values ​​in the original time series data, respectively, and the value of i ranges from 1 to N. i ' represents the i-th standardized data obtained after data standardization of the i-th data in the original time series data. The time series data composed of N standardized data is denoted as the standard time series data X' = (x1', x2', ..., x...). N ').

[0039] 1.3 Time window division.

[0040] The sliding window is adaptively divided according to the sequence length N of the standard time series data. Specifically, if the sequence length is less than or equal to the preset single-step threshold, the single-step input mode is adopted, that is, the standard time series data is not divided into a sliding window, but the key feature extraction in step 1.4 is performed directly on the entire standard time series data.

[0041] If the sequence length exceeds the single-step threshold, a sliding window input mode is used. The specific implementation of sliding window input is as follows: Determine the window size W based on the sequence length, and then gradually slide the window of size W in the standard time series data, starting from the first standardized data point, with a step size s=1. Each slide extracts W standardized data points from the standard time series data. These W standardized data points are denoted as one window sequence. Thus, M window sequences can be obtained, where the value of M depends on the window size W and the sequence length, i.e., M = N - W + 1. The k-th window sequence can be denoted as Win. k Specifically, it can be represented as Win k = (x k ', x k+1 '...x k+W-1 The set of all M window sequences is denoted as the input sample Window, where Window = (Win1, Win2, ..., Win...). M ).

[0042] For example, the single-step threshold can be set to 30, that is, if the sequence length is less than or equal to 30 (N≤30), the single-step input mode is adopted, and if the sequence length is greater than 30 (N>30), the sliding window input is adopted. There is no limit to the way to determine the window size based on N. As an example, the square root of N can be taken and rounded up to obtain the result as W, as shown in formula (2).

[0043]

[0044] The Roundup() function rounds up the value within the parentheses.

[0045] 1.4 Key Feature Extraction.

[0046] When using the sliding window input mode, for each window sequence Win k Extract the trend feature vector TR of this window sequence. k and statistical eigenvectors ST k Among them, the trend feature vector TR kFor example, it can include the moving average, slope value, and other indicators representing trends of the k-th window sequence, and the statistical feature vector ST. k For example, it can include the variance, autocorrelation coefficient and other statistical indicators of the k-th window sequence;

[0047] Then, the trend feature vector TR of the k-th window sequence k and statistical eigenvectors ST k This is concatenated to the k-th window sequence to form the k-th enhanced window sequence feature, denoted as Wins. k The splicing method can be represented by the following formula (3).

[0048]

[0049] In the single-step input mode, the trend feature vector and statistical feature vector of the standard time series data are directly extracted. The standard time series data, trend feature vector and statistical feature vector are then concatenated to form an enhanced time series feature. The concatenation method is the same as the method for obtaining enhanced window sequence features in the sliding window input mode, and will not be repeated here.

[0050] 2. Multi-architecture adaptive selection mechanism. The implementation method of step 2 is as follows.

[0051] The optimal quantum model architecture is automatically selected based on the sequence length N and the sequence complexity C of standard time series data.

[0052] Specifically, if the sequence length is less than or equal to the first length threshold and the sequence complexity C is less than or equal to the first complexity threshold, then the serial re-upload architecture is determined as the optimal quantum model architecture so as to achieve efficient fitting using a single quantum bit; the first length threshold can be, for example, equal to 30, and the first complexity threshold can be, for example, equal to 0.5; the first length threshold can be equal to the aforementioned single-step threshold.

[0053] If the sequence length is greater than the first length threshold and less than or equal to the second length threshold, and the sequence complexity is greater than the first complexity threshold and less than or equal to the second complexity threshold, the parallel re-upload architecture is determined as the optimal quantum model architecture so as to utilize the parallel processing features of multiple qubits; the second length threshold can be, for example, equal to 100, and the second complexity threshold can be, for example, equal to 1.

[0054] If the sequence length is greater than the second length threshold or the sequence complexity is greater than the second complexity threshold, then the extended parallel re-upload architecture (xparallel) is selected as the optimal quantum model architecture to combine the advantages of serial re-upload and parallel entanglement, balancing expressive power and trainability.

[0055] The sequence complexity can be calculated using the approximate entropy formula shown in formula (4).

[0056]

[0057] Wherein, p(Win) k ) represents the k-th window sequence Win k The probability of occurrence in all samples, that is, in multiple standard time series data, is represented by log(), which is the logarithm of the value in parentheses to the base 10. In particular, if a single-step input mode is used, M in formula (4) can be set to 1, and the sequence complexity can still be calculated according to formula (4).

[0058] 3. Layered angle coding strategy.

[0059] In step 3, the aforementioned enhanced time series features, or each enhanced window sequence feature, can be quantum encoded based on a pre-designed hierarchical angle encoding scheme so that these features are mapped to quantum states in a quantum circuit.

[0060] In step 3, if a single-step input mode was used previously, the enhanced time series features are directly quantum-encoded to obtain a single feature-encoded quantum state. If a sliding window input mode was used previously, each enhanced window sequence feature can be quantum-encoded to obtain a corresponding feature-encoded quantum state, resulting in a total of M feature-encoded quantum states. The method for quantum-encoding an enhanced window sequence feature is the same as that for quantum-encoding the enhanced time series features.

[0061] The following section examines the features of the k-th enhanced window sequence Wins. k Using quantum encoding as an example, this illustrates how quantum encoding is performed in step 3.

[0062] 3.1, Utilizing the basic coding layer, the Wins feature of the k-th enhanced window sequence is processed. k Perform angle encoding, and convert Wins k The i-th data w k,i The mapping yields the i-th fundamental quantum state. Here, i ranges from 1 to Sum, where Sum is the feature of the k-th enhancement window sequence. k The number of data items contained, for example, Wins k =(Win k TR k ST k If the array contains 40 data points, then Sum equals 40.

[0063] The process of encoding the i-th fundamental quantum state can be represented by the following formulas (5) and (6).

[0064]

[0065]

[0066] Where π represents pi, θ k,i Wins k The i-th data w k,i The mapping angle formed by the mapping, formula (5) represents Wins k Each data point contained herein is mapped to a corresponding mapping angle;

[0067] |Pai1 k,i > indicates Wins k The i-th data w k,i The i-th fundamental quantum state formed by the mapping, cos() and sin() represent the cosine function and sine function respectively, and |0> and |1> are the symbols used to represent the two basic states of a qubit, called Dirac symbols. Since this application realizes quantum computing through quantum circuits, in this application, |0> can represent the spin-up state of an electron, and |1> can represent the spin-down state of an electron.

[0068] 3.2, Based on the association coding layer, for every two adjacent data w in the k-th enhanced window sequence features k,i and w k,i+1 The difference is encoded to obtain the i-th correlated quantum state, where the value of i ranges from 1 to Sum. When i equals Sum, d can be set... k,Sum It equals 0.

[0069] The process of encoding to obtain the i-th correlated quantum state can be represented by the following formulas (7) to (9).

[0070]

[0071]

[0072]

[0073] Formula (7) represents the calculation of the i-th difference d. k,i d k,i Equals two adjacent data w k,i and w k,i+1 The absolute value of the difference. In formula (8), ω k,i This represents the mapping angle formed by mapping the i-th difference. In formula (9), |Pai2 k,i > indicates Wins k The i-th data w k,i The i-th associated quantum state is formed by the difference mapping of its adjacent data.

[0074] 3.3 Based on the controlled NOT gate (CNOT) in the feature fusion layer, all the fundamental quantum states and all the associated quantum states of the k-th enhanced window sequence feature, that is, the Sum fundamental quantum states obtained in step 3.1 and the Sum associated quantum states obtained in step 3.2, are entangled and fused to obtain the k-th feature-encoded quantum state corresponding to the k-th enhanced window sequence feature.

[0075] The above entanglement and fusion process can be represented by the following formula (10).

[0076]

[0077] Where |Pai k > indicates the feature of the k-th enhanced window sequence in Wins k After processing in steps 3.1 to 3.3, the characteristic encoded quantum state is obtained. The symbol represents the tensor product, CNOT() represents the controlled NOT gate, and the symbol on the left side of CNOT() represents the cumulative multiplication operation, that is, the cumulative multiplication from i=1 to i=Sum. Formula (10) represents the Wins... k After performing a tensor product operation on the first fundamental quantum state and the first correlated quantum state, the result of the tensor product operation is processed using a controlled NOT gate (CNOT) to obtain the first output of the CNOT. This process is repeated to obtain the second to the Sumth outputs of the CNOT. Then, the Sumth outputs of the CNOT are multiplied together, and the resulting product is used as the Wins feature of the kth enhanced window sequence. k The corresponding characteristic encoding quantum state | Pai k >

[0078] The advantage of obtaining the feature-encoded quantum state through steps 3.1 to 3.3 is that it enables the quantization representation of local correlations in time series, thereby improving the accuracy of the final prediction results.

[0079] 4. Adaptive quantum circuit design.

[0080] In step 4, a quantum circuit with the optimal quantum model architecture determined in the multi-architecture adaptive selection mechanism can be constructed, denoted as the target quantum circuit, so as to process the feature-encoded quantum state obtained in step 3 according to the target quantum circuit.

[0081] Specifically, if the optimal quantum model architecture is a serial re-upload architecture, then the target quantum circuit to be constructed can be a serial re-upload circuit with a serial re-upload architecture.

[0082] The serial re-upload circuit uses one quantum bit. For circuit structure details, please refer to [link to relevant documentation]. Figure 1 The serial re-upload circuit includes L layers of alternating re-upload modules and L+1 trainable single-qubit modules. Each re-upload module includes a single-qubit rotation gate Rx() that uses a quantum state rotated around the X-axis. The h-th re-upload module can be represented as Rx(Theta) h ), of which Theta h Theta1 represents the input of the h-th re-upload module. When h equals 1, Theta1 equals the set of all feature-encoded quantum states obtained in step 3. Specifically, the optimal quantum model architecture is a serial re-upload architecture, which means that the feature-encoded quantum states are obtained in the previous steps using a single-step input mode. Therefore, Theta1 includes one feature-encoded quantum state obtained in step 3.

[0083] When h is greater than 1, Theta h It is equal to the output of the previous single-qubit trainable module, which is the output of the (h-1)th single-qubit trainable module; the value of h ranges from 1 to L.

[0084] A single-qubit trainable module can be represented using a universal single-qubit unitary operator. Specifically, in the range 1 to L, the h-th single-qubit trainable module can be denoted as U(Para). h Para h Let represent the set of trainable parameters contained in the h-th single-qubit trainable module, specifically including Para. h1 Para h2 and Para h3 With three trainable parameters, the trainable module of the h-th single qubit can be represented by the following formula (11).

[0085]

[0086] Rx(), Ry(), and Rz() represent single-qubit rotation gates for quantum states rotating around the X, Y, and Z axes, respectively. The output of the h-th re-upload module serves as the input to the h-th single-qubit trainable module.

[0087] Therefore, the serial re-upload circuit can include a total of 3*(L+1) trainable parameters, and each single-qubit trainable module includes 3 trainable parameters. L is a preset positive integer.

[0088] according to Figure 1 The serial re-upload circuit shown processes the feature-encoded quantum state to obtain the final quantum state |Pai corresponding to the original time series data. final The process of serial re-uploading circuit processing the feature-encoded quantum state to obtain the final quantum state can be represented by the quantum state evolution process shown in the following formula (11-1).

[0089]

[0090] If the optimal quantum model architecture is a parallel re-upload architecture, then the target quantum circuit to be constructed can be a parallel re-upload circuit with a parallel re-upload architecture.

[0091] The parallel re-upload circuit has Q qubits, where Q is equal to the number M of the aforementioned characteristic encoded quantum states.

[0092] In terms of circuit structure, the parallel re-upload circuit includes a pre-encoding entanglement layer, a parallel encoding layer, and a post-encoding entanglement layer.

[0093] Both the pre-encoding entangled layer and the post-encoding entangled layer use controlled NOT gates (CNOT) to construct a ring-shaped entangled structure. The structure U of both the pre-encoding entangled layer and the post-encoding entangled layer can be represented by formula (12).

[0094]

[0095] Wherein, qmodQ represents the result obtained by taking the remainder of q with respect to the total number of qubits Q. For the specific method of the remainder operation, please refer to the relevant existing technology.

[0096] The parallel coding layer can be represented by the following formula (13).

[0097]

[0098] in, k=1~Q This indicates that for any Rx(|Pai1>) to Rx(|Pai1>) Q >) A total of Q quantum states undergo tensor product operations consecutively, En Q This indicates a parallel coding layer. |Pai1> to |Pai Q >These represent the feature-coded quantum states corresponding to the first to Qth enhanced window sequence features obtained in step 3, in sequence.

[0099] By processing the feature-encoded quantum states using the parallel re-upload circuit, the final quantum state corresponding to the original time series data can be obtained. final The process of parallel re-uploading circuit processing the feature-encoded quantum state to obtain the final quantum state can be represented by the quantum state evolution process shown in the following formula (14).

[0100]

[0101] Uq() represents the unitary operator acting on the q-th qubit, and its specific expression can be found in existing technologies in the field of quantum computing. Ue() represents the pre-encoding entangled layer and the post-encoding entangled layer with the structure shown in formula (12). Pa m+1 Pa c , Pa and Pa k All of these are trainable parameters included in the parallel re-upload circuit. m and n are preset integers, and their specific values ​​can be set as needed without limitation. Specifically, m is the number of entangled layers before encoding, that is, the number of entangled modules in the parallel circuit before encoding, and n is the number of entangled layers after encoding, that is, the number of entangled modules in the parallel circuit after encoding. Rx (Pa) Q This represents the product of Q consecutive Rx(Pa). Formula (14) is used to represent the combination of quantum states in a multi-qubit system.

[0102] If the optimal quantum model architecture is an extended parallel re-upload architecture (xparallel), then the target quantum circuit to be constructed can be an extended parallel re-upload circuit (xparallel) with an extended parallel re-upload architecture.

[0103] The number of qubits Q in the extended parallel re-upload circuit depends on the window size W, which can be equal to half of W. If half of W is not an integer, it is rounded up to obtain Q.

[0104] In terms of circuit structure, the extended parallel re-upload circuit includes L re-upload-entanglement alternation modules connected in sequence. Each re-upload-entanglement alternation module contains a parallel coding sublayer and an entanglement sublayer.

[0105] The structure of the parallel coding sublayer can be represented by the aforementioned formula (13). The structure of the entangled sublayer can be represented by the aforementioned formula (12).

[0106] By processing the feature-encoded quantum states using the extended parallel re-upload circuit, the final quantum state corresponding to the original time series data can be obtained. final The process of extending the parallel re-upload circuit to process the feature-encoded quantum state and obtaining the final quantum state can be represented by the quantum state evolution process shown in the following formula (15).

[0107]

[0108] Uq() represents the unitary operator acting on the q-th qubit, and its specific expression can be found in existing technologies in the field of quantum computing. Ue() represents the entangled sublayer with the structure shown in formula (12). Pa m+1 Pa k and Pa iAll are trainable parameters included in the extended parallel re-upload circuit. m and n are preset integers, and their specific values ​​can be set as needed without limitation. Specifically, m is the number of entangled sublayers, i.e., the number of entangled sublayers in the extended parallel circuit, Rx (Pa i ) Q Represents Q consecutive Rx(Pa) i Multiply by 1. Q This represents the parallel coding sublayer contained in each re-upload-entanglement alternation module.

[0109] Extending the parallel re-upload circuitry can enable long-range dependency capture of time series data, which helps improve the accuracy of prediction results.

[0110] 5. Hybrid quantum-classical training framework.

[0111] In step 5, the trainable parameters contained in the aforementioned target quantum circuit can be trained based on a hybrid quantum-classical training framework to determine the values ​​of these trainable parameters.

[0112] In the definition of the loss function, the mean squared error (MSE) is used as the loss function to measure the difference between the predicted value and the true value. Specifically, the loss function L can be expressed by the following formula (16).

[0113]

[0114] Where y k y represents the pre-labeled true value of the k-th sample. k ' represents the predicted value corresponding to the k-th sample. The predicted value of the k-th sample can be the predicted value obtained after processing the original time series data of the samples contained in the k-th sample through steps 1 to 4 and step 6, which is the prediction value of the quantum model. Total represents the total number of samples.

[0115] For the selection of optimization algorithms, the BFGS algorithm (L-BFGS-B) with bounded, limited-memory support can be used to optimize the trainable parameters. BFGS stands for Broyden–Fletcher–Goldfarb–Shanno, a quasi-Newton method for updating formulas. L-BFGS-B is an iterative algorithm for solving large-scale, nonlinear, and nonconvex optimization problems.

[0116] Furthermore, an adaptive learning rate adjustment strategy can be incorporated during training. In this strategy, the initial learning rate can be set to 0.01, and the learning rate can be reduced by 10% from the previous learning rate every 10 training rounds.

[0117] In each round of training, the gradient calculation and update method can be: calculate the gradient of the loss function with respect to the trainable parameters of the target quantum circuit through the quantum estimator, and then update the parameters using the classical optimizer. The update process in each round can be represented by the following formula (17).

[0118]

[0119] Where η is the learning rate used for training in the (t+1)th round, DeltaL (Parameter t The gradient vector used to update parameters is calculated based on the loss function L. For specific calculation methods, please refer to relevant existing technologies. Parameter t Parameter represents the trainable parameters obtained from the previous training round (i.e., the t-th round). t+1 This represents the trainable parameters obtained in this round of training (i.e., the (t+1)th round).

[0120] Furthermore, an early stopping mechanism can be used during training, and a validation set monitoring can be set. Training can be stopped when the loss function calculated based on the validation set does not decrease for 15 consecutive rounds or the decrease is less than or equal to the magnitude threshold, in order to avoid overfitting.

[0121] 6. Prediction and Result Optimization.

[0122] In step 6, the final quantum state obtained in step 4 can be processed to obtain the predicted value corresponding to the original time series data (or the original time series data of the sample).

[0123] The predicted values ​​can be obtained in the following ways:

[0124] Quantum measurements are performed on the final quantum state to obtain quantum characteristic outputs;

[0125] The predicted value is obtained by processing the quantum feature output based on the classical fully connected layer.

[0126] The parameters contained in a classic fully connected layer (including the weight parameters and linear parameters described below) can also be included in the trainable parameters in step 5 and trained together.

[0127] When obtaining the quantum feature output, the final quantum state can be measured with all qubits, and the expected value of the Pauli Z operator can be selected as the quantum feature output. This process can be represented by the following formula (18).

[0128]

[0129] in, <z>This represents the quantum characteristic output, which is the expectation value of the Pauli Z operator, Z. q represents the Pauli Z operator. <Pai final | represents the conjugate transpose of the final quantum state |Paifinal>.

[0130] The process of classical fully connected layers processing quantum feature outputs can be represented by the following formula (19).

[0131]

[0132] y k ' represents the predicted value, Sigma() represents the activation function, and its specific function form is not limited. As an example, Sigma() can be an S-shaped growth curve function (also known as the sigmoid function). For its specific expression, please refer to the existing technology. Wight represents the weight parameters contained in the classic fully connected layer, and B represents the linear parameters contained in the classic fully connected layer.

[0133] Furthermore, after obtaining the above predicted values, the predicted values ​​can be output directly, or the predicted values ​​can be calibrated first, and then the calibrated predicted values ​​can be output.

[0134] Specifically, polynomial regression can be used to calibrate the predicted values ​​in order to correct the deviation caused by quantum measurement noise. The calibration process can be represented by the following formula (20).

[0135]

[0136] y ks 'Indicates the calibrated predicted value, y k ' represents the predicted value, and C1, C2 and C3 are calibration parameters, which can be obtained by fitting the training set data, that is, by fitting multiple samples used for training in step 5. For specific fitting methods, please refer to relevant existing technologies, which will not be elaborated here.

[0137] 7. Model evaluation and adaptive adjustment.

[0138] In step 7, the coefficient of determination (R²), mean absolute error (MAE), and root mean square error (RMSE) can be used as core evaluation metrics to evaluate the performance of the target quantum circuit of this application.

[0139] The coefficient of determination R2 can be calculated using the following formula (21).

[0140]

[0141] Totals represents the total number of samples in the validation set (or test set), which is the total number of test samples. k-avg y represents the average of the true values ​​of all test samples. k ' represents the predicted value of the k-th test sample, y k This represents the pre-labeled true value of the k-th test sample.

[0142] The mean absolute error can be calculated using the following formula (22).

[0143]

[0144] The root mean square error can be calculated using the following formula (23).

[0145]

[0146] Based on core evaluation metrics, adaptive adjustments can be made during the application of the target quantum circuit. For example, if R² is less than 0.8, the architecture selection strategy and the number of circuit layers are automatically adjusted, and retraining is performed; if MAE is greater than 0.1, the encoding angle range and entanglement strength are optimized to improve feature representation capabilities.

[0147] The following section uses an oscillating synthetic time series dataset (2_sins dataset) and real meteorological temperature time series as examples to explain in detail the specific implementation process and effect verification of the method in this application.

[0148] The 2_sins dataset is a classic synthetic dataset used for teaching and demonstration, particularly popular for explaining neural network capacity, overfitting, and regularization. The 2_sins dataset is an artificially generated dataset consisting of two superimposed sine waves of different frequencies, typically used for regression tasks. Its goal is to allow the neural network to learn the relatively complex underlying true function through noisy sample points.

[0149] 1. Preparation of experimental data.

[0150] The synthetic dataset uses f(x) = [sin(5.0x) + 0.5sin(8.0x)] / 4 + 0.5 to generate an oscillating time series of 70 data points. After standardization, it is divided into 50 training samples and 20 test samples, with a sequence complexity C = 0.72.

[0151] The real dataset consists of a 30-day daily average temperature time series (90 data points) of a certain region. After standardization, it is divided into 65 training samples and 25 test samples, with a sequence complexity of C=0.85.

[0152] II. Specific implementation steps.

[0153] (I) Data preprocessing and feature engineering.

[0154] The synthesized dataset has a standardized sequence range of [0, 1], a sequence length of N=70, a window size of W=9, and generates M=70-9+1=62 input samples. The moving average (window size 3) and variance are extracted as enhancement features.

[0155] The real dataset, after standardization, has a sequence range of [0, 1], a sequence length of N=90, a window size of W=10, and generates M=90-10+1=81 input samples. The slope and autocorrelation coefficient (lag 1) are extracted as enhancement features.

[0156] (ii) Architecture selection.

[0157] For the synthetic dataset, N=70, C=0.72, the extended parallel re-upload architecture (xparallel) was selected as the optimal quantum model architecture, with the number of qubits Q=5.

[0158] For a real dataset with N=90 and C=0.85, the extended parallel re-upload architecture (xparallel) is selected as the optimal quantum model architecture with qubit number Q=5.

[0159] (III) Layered Angular Coding.

[0160] Using a synthetic dataset, a certain window Win k For example, with the formula [0.32, 0.45, 0.58, 0.62, 0.55, 0.41, 0.33, 0.28, 0.35]:

[0161] Fundamental quantum state: θ k,i Approximately 1.005, the first fundamental quantum state | Pai1 k,1 >=0.876|0>+0.482|1>, and the same applies to the other elements;

[0162] Correlated quantum state: d k,1 Equal to 0.13, the first correlated quantum state |Pai2 k,1 >=0.979|0>+0.203|1>, and the same applies to the other elements;

[0163] Feature fusion: The fundamental quantum state and the correlated quantum state are fused through the CNOT gate to obtain the feature-encoded quantum state.

[0164] (iv) Quantum circuit design and training.

[0165] Circuit structure: The extended parallel architecture contains 7 layers of re-entanglement modules, each containing a 5-qubit parallel encoding sublayer and a ring entanglement sublayer, with a total of 81 trainable parameters;

[0166] Training configuration: L-BFGS-B optimizer, learning rate 0.01, 60 training epochs, early stopping threshold 15 epochs, loss function is MSE;

[0167] Classical post-processing: The quantum measurement output is mapped through two fully connected layers (the dimension of the fully connected layer is 16), and the calibration parameters are obtained by fitting the training set to obtain C1=0.12, C2=0.85, and C3=0.03.

[0168] The method of this application and existing methods in related technical fields were tested based on synthetic and real datasets to obtain the index values ​​of the method of this application and existing methods on various evaluation indicators, as shown in Table 1.

[0169] Table 1

[0170] Synthetic dataset (test set) R2 0.983 0.879 0.921 MAE 0.015 0.048 0.032 RMSE 0.019 0.062 0.041 Real dataset (test set) R2 0.947 0.823 0.886 MAE 0.028 0.057 0.043 RMSE 0.035 0.071 0.052

[0171] Method 1 refers to the existing prediction method based on a single-architecture quantum model (xqnn), and Method 2 refers to the existing prediction method based on a classical long short-term memory network (LSTM) model. As shown in Table 1, the method in this application significantly outperforms existing methods in all core evaluation metrics.

[0172] It should be noted that the above steps 1 to 7 are only one optional process of the method provided in this application. In other optional embodiments, only some optional steps in the above process may be included, without including all steps 1 to 7, and the execution order of each step is not limited to the above process.

[0173] In summary, the method provided in this application has at least the following beneficial effects.

[0174] First, the adaptive architecture capability is improved. Through the fusion design of multiple architectures, the model can automatically select the optimal architecture (serial, parallel or extended parallel) according to the length and complexity of the time series, achieving the dual goals of efficient fitting of short series and accurate prediction of long series. The R2 value of the test set is improved compared with the single architecture model.

[0175] Secondly, the coding efficiency is optimized. The hierarchical angle coding strategy based on the continuity of time series effectively reduces the homogenization of quantum states and improves the feature retention rate, providing richer feature information for subsequent quantum circuit processing.

[0176] Third, quantum resources are used efficiently. Through parameterized entanglement control and qubit reloading technology, the consumption of qubit resources is reduced under the same prediction accuracy, while avoiding training difficulties caused by over-parameterization and improving the model convergence speed.

[0177] Fourth, the generalization ability is enhanced by introducing adaptive adjustment of the time window and a noise-robust coding mechanism, which reduces the average prediction error of the model on different types of time series (oscillatory, trend, and stochastic) and significantly improves the tolerance to data noise.

[0178] Depending on the application scenario of the method in this application, the meaning of the predicted value obtained in step 6 above may vary. As some examples, when applied to a weather forecasting scenario, the predicted value may be the average temperature of a certain location over the next day or several days; when applied to a financial analysis scenario, the predicted value may be the average unit price of a specified financial product over the next day or several days; and when applied to a traffic analysis scenario, the predicted value may be the average traffic flow at a specified intersection over the next day or several days.

[0179] The above predicted values ​​are equivalent to the prediction results of any embodiment of this application.

[0180] Based on the above embodiments, this application also provides a time-series quantum modeling method based on multi-architecture fusion. Please refer to [link to relevant documentation]. Figure 2 The method may include the following steps.

[0181] S201, Obtain the raw time series data.

[0182] S202. Based on the sequence length and sequence complexity corresponding to the original time series data, determine one of the serial re-upload architecture, parallel re-upload architecture, and extended parallel re-upload architecture as the optimal quantum model architecture.

[0183] S203, based on the target quantum circuit with the optimal quantum model architecture, the characteristic encoded quantum state determined by the original time series data is processed to obtain the prediction result corresponding to the original time series data.

[0184] The beneficial effects of this embodiment are as follows:

[0185] Based on the sequence length and complexity of the original time series data to be processed, one of the various available quantum model architectures is selected as the optimal quantum model architecture. Then, the prediction result is determined based on the target quantum circuit with this optimal quantum model architecture. In this way, the quantum model architecture adapted to different situations can be flexibly selected according to actual needs, and the advantages of different quantum model architectures can be brought into play under different situations. This improves the architecture adaptability when processing time series data based on quantum models, and thus improves the accuracy of prediction results.

[0186] Optionally, methods for determining feature-encoded quantum states based on raw time-series data include:

[0187] Standardize the raw time series data to obtain standard time series data;

[0188] Divide the standard time series data into at least one window series;

[0189] The characteristic encoded quantum state is determined based on at least one window sequence.

[0190] The method for obtaining standard time series data can be found in step 1.2 above, and the method for dividing the data into at least one window sequence can be found in step 1.3 above.

[0191] Optionally, determining the characteristic-encoded quantum state based on at least one window sequence includes:

[0192] Determine the trend feature vector and statistical feature vector corresponding to at least one window sequence;

[0193] At least one window sequence, a trend feature vector, and a statistical feature vector are concatenated to form at least one enhanced window sequence feature;

[0194] The feature-encoded quantum state is determined based on at least one enhanced window sequence feature.

[0195] The methods for determining the trend feature vector and statistical feature vector in the above embodiments, and for concatenating at least one window sequence, the trend feature vector, and the statistical feature vector to form an enhanced window sequence feature, can be found in step 1.4.

[0196] Optionally, the feature-encoded quantum state is determined based on at least one enhanced window sequence feature, including:

[0197] The fundamental quantum state is obtained by quantum encoding each data contained in at least one enhanced window sequence feature.

[0198] Quantum encoding is performed on the difference between every two adjacent data points contained in at least one enhanced window sequence feature to obtain the associated quantum state;

[0199] By integrating the fundamental quantum state and the correlated quantum state, a characteristic encoded quantum state is obtained.

[0200] The method for obtaining the fundamental quantum state is described in step 3.1 of the aforementioned embodiment; the method for obtaining the correlated quantum state is described in step 3.2 of the aforementioned embodiment; and the method for fusing the fundamental quantum state and the correlated quantum state to obtain the characteristic encoded quantum state is described in step 3.3 of the aforementioned embodiment.

[0201] The method for determining the optimal quantum model architecture in step S202 can refer to step 2 of the aforementioned embodiment, namely the multi-architecture adaptive selection mechanism. The specific structure and working principle of the target quantum circuit with the optimal quantum model architecture can refer to step 4 of the aforementioned embodiment, namely the adaptive quantum circuit design.

[0202] Optionally, the characteristic encoded quantum states determined based on the original time series data are processed according to the target quantum circuit with the optimal quantum model architecture to obtain the prediction results corresponding to the original time series data, including:

[0203] The final quantum state is obtained by processing the feature-encoded quantum state determined based on the original time series data using a target quantum circuit with an optimal quantum model architecture.

[0204] The quantum characteristic output is obtained by measuring the final quantum state;

[0205] Based on the quantum feature output processed by the fully connected layer, the prediction results corresponding to the original time series data are obtained.

[0206] Wherein, the final quantum state is equivalent to |Pai in the aforementioned embodiment. final The method for obtaining the final quantum state based on the target quantum circuit processing can be found in the content about the quantum state evolution process in step 4. The method for measuring the final quantum state to obtain the quantum feature output can be found in formula (18) and related explanations. The method for obtaining the prediction result based on the quantum feature output can be found in formula (19) and related explanations. The prediction value obtained in step 6 is equivalent to the prediction result.

[0207] This application also provides a time-series quantum modeling system based on multi-architecture fusion; please refer to [link to relevant documentation]. Figure 3 The system may include the following units.

[0208] Unit 301 is used to obtain raw time series data;

[0209] The determination unit 302 is used to determine the optimal quantum model architecture from among the serial re-upload architecture, the parallel re-upload architecture, and the extended parallel re-upload architecture, based on the sequence length and sequence complexity corresponding to the original time series data.

[0210] The processing unit 303 is used to process the characteristic encoded quantum state determined based on the original time series data according to the target quantum circuit with the optimal quantum model architecture, so as to obtain the prediction result corresponding to the original time series data.

[0211] Optionally, when processing unit 303 determines the feature-encoded quantum state based on the original time series data, it is specifically used for:

[0212] Standardize the raw time series data to obtain standard time series data;

[0213] Divide the standard time series data into at least one window series;

[0214] The characteristic encoded quantum state is determined based on at least one window sequence.

[0215] Optionally, when processing unit 303 determines the feature-encoded quantum state based on at least one window sequence, it is specifically used for:

[0216] Determine the trend feature vector and statistical feature vector corresponding to at least one window sequence;

[0217] At least one window sequence, a trend feature vector, and a statistical feature vector are concatenated to form at least one enhanced window sequence feature;

[0218] The feature-encoded quantum state is determined based on at least one enhanced window sequence feature.

[0219] Optionally, when processing unit 303 determines the feature-encoded quantum state based on at least one enhanced window sequence feature, it is specifically used for:

[0220] The fundamental quantum state is obtained by quantum encoding each data contained in at least one enhanced window sequence feature.

[0221] Quantum encoding is performed on the difference between every two adjacent data points contained in at least one enhanced window sequence feature to obtain the associated quantum state;

[0222] By integrating the fundamental quantum state and the correlated quantum state, a characteristic encoded quantum state is obtained.

[0223] Optionally, when processing unit 303 processes the feature-encoded quantum states determined based on the original time series data according to the target quantum circuit with the optimal quantum model architecture to obtain the prediction results corresponding to the original time series data, it is specifically used for:

[0224] The final quantum state is obtained by processing the feature-encoded quantum state determined based on the original time series data using a target quantum circuit with an optimal quantum model architecture.

[0225] The quantum characteristic output is obtained by measuring the final quantum state;

[0226] Based on the quantum feature output processed by the fully connected layer, the prediction results corresponding to the original time series data are obtained.

[0227] The working principle of the time series quantum modeling system based on multi-architecture fusion in this embodiment can be found in the relevant steps of the time series quantum modeling method based on multi-architecture fusion in the previous embodiment, and will not be repeated here.

[0228] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0229] For ease of description, the above systems or devices are described separately as various modules or units based on their functions. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware components.

[0230] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0231] Finally, it should be noted that in this document, relational terms such as first, second, third, and fourth are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, 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 said element.

[0232] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.< / z>

Claims

1. A time-series quantum modeling method based on multi-architecture fusion, characterized in that, include: Obtain the raw time series data; Based on the sequence length and sequence complexity corresponding to the original time series data, one of the serial re-upload architecture, parallel re-upload architecture, and extended parallel re-upload architecture is determined as the optimal quantum model architecture. The target quantum circuit with the optimal quantum model architecture is used to process the feature-encoded quantum states determined based on the original time series data to obtain the prediction results corresponding to the original time series data.

2. The method according to claim 1, characterized in that, The method for determining the feature-encoded quantum state based on the original time series data includes: The original time series data is standardized to obtain standard time series data; The standard time series data is divided into at least one window sequence; The feature-encoded quantum state is determined based on the at least one window sequence.

3. The method according to claim 2, characterized in that, Determining the characteristic encoded quantum state based on the at least one window sequence includes: Determine the trend feature vector and statistical feature vector corresponding to the at least one window sequence; The at least one window sequence, the trend feature vector, and the statistical feature vector are concatenated to form at least one enhanced window sequence feature; The feature-encoded quantum state is determined based on the at least one enhanced window sequence feature.

4. The method according to claim 3, characterized in that, Determining the feature-encoded quantum state based on the at least one enhanced window sequence feature includes: The data contained in the at least one enhanced window sequence feature are quantum encoded to obtain the fundamental quantum state; The difference between every two adjacent data contained in the at least one enhanced window sequence feature is quantum encoded to obtain the associated quantum state; By fusing the fundamental quantum state and the associated quantum state, a characteristic encoded quantum state is obtained.

5. The method according to claim 1, characterized in that, The step of processing the feature-encoded quantum states determined based on the original time series data using a target quantum circuit with the optimal quantum model architecture to obtain the prediction results corresponding to the original time series data includes: The final quantum state is obtained by processing the feature-encoded quantum state determined based on the original time series data using the target quantum circuit with the optimal quantum model architecture described above; The quantum characteristic output is obtained by measuring the final quantum state; The prediction results corresponding to the original time series data are obtained by processing the quantum feature outputs using the fully connected layer.

6. A time-series quantum modeling system based on multi-architecture fusion, characterized in that, include: The acquisition unit is used to obtain raw time series data; The determining unit is used to determine the optimal quantum model architecture from among the serial re-upload architecture, the parallel re-upload architecture, and the extended parallel re-upload architecture, based on the sequence length and sequence complexity corresponding to the original time series data. The processing unit is used to process the feature-encoded quantum states determined based on the original time series data according to the target quantum circuit having the optimal quantum model architecture, so as to obtain the prediction results corresponding to the original time series data.

7. The system according to claim 6, characterized in that, When the processing unit determines the feature-encoded quantum state based on the original time series data, it is specifically used for: The original time series data is standardized to obtain standard time series data; The standard time series data is divided into at least one window sequence; The feature-encoded quantum state is determined based on the at least one window sequence.

8. The system according to claim 7, characterized in that, When the processing unit determines the feature-encoded quantum state based on the at least one window sequence, it is specifically used for: Determine the trend feature vector and statistical feature vector corresponding to the at least one window sequence; The at least one window sequence, the trend feature vector, and the statistical feature vector are concatenated to form at least one enhanced window sequence feature; The feature-encoded quantum state is determined based on the at least one enhanced window sequence feature.

9. The system according to claim 8, characterized in that, When the processing unit determines the feature-encoded quantum state based on the at least one enhanced window sequence feature, it is specifically used for: The data contained in the at least one enhanced window sequence feature are quantum encoded to obtain the fundamental quantum state; The difference between every two adjacent data contained in the at least one enhanced window sequence feature is quantum encoded to obtain the associated quantum state; By fusing the fundamental quantum state and the associated quantum state, a characteristic encoded quantum state is obtained.

10. The system according to claim 6, characterized in that, When the processing unit processes the feature-encoded quantum states determined based on the original time series data according to the target quantum circuit with the optimal quantum model architecture to obtain the prediction results corresponding to the original time series data, it is specifically used for: The final quantum state is obtained by processing the feature-encoded quantum state determined based on the original time series data using the target quantum circuit with the optimal quantum model architecture described above; The quantum characteristic output is obtained by measuring the final quantum state; The prediction results corresponding to the original time series data are obtained by processing the quantum feature outputs using the fully connected layer.