Hybrid Quantum Singular Spectrum Decomposition for Time Series Analysis
Abstract
Classical data analysis requires computational efforts that become intractable in the age of Big Data. An essential task in time series analysis is the extraction of physically meaningful information from a noisy time series. One algorithm devised for this very purpose is singular spectrum decomposition (SSD), an adaptive method that allows for the extraction of narrow-banded components from non-stationary and non-linear time series. The main computational bottleneck of this algorithm is the singular value decomposition (SVD). Quantum computing could facilitate a speedup in this domain through superior scaling laws. We propose quantum SSD by assigning the SVD subroutine to a quantum computer. The viability for implementation and performance of this hybrid algorithm on a near term hybrid quantum computer is investigated. In this work we show that by employing randomised SVD, we can impose a qubit limit on one of the circuits to improve scalibility. Using this, we efficiently perform quantum SSD on simulations of local field potentials recorded in brain tissue, as well as GW150914, the first detected gravitational wave event.
I Introduction
A recently proposed approach to classical time series analysis is singular spectrum decomposition (SSD) Bonizzi et al. (2014). SSD aims to decompose non-linear and non-stationary time series into physically meaningful components. In stark contrast to a Fourier decomposition which employs a basis set of harmonic functions, SSD prepares an adaptive basis set of functions, whose elements depend uniquely on the time series. Applications include, but are not limited to, sleep apnea detection from an unprocessed ECG Bonizzi et al. (2015) and the processing and analysis of brain waves Lowet et al. (2017, 2016). In this work we will also cover application to gravitational wave analysis. The latter is interesting as real-time data analysis poses a challenge, and will be vital for next generations of gravitational wave detection technology. The main bottleneck for scaling this algorithm up for larger time series is the singular value decomposition (SVD) that is performed in each subroutine. For general matrices, the classical SVD algorithm yields a computational complexity of Cline and Dhillon (2006).
There exist clues that allude to quantum computing being able to provide a computational speedup for the computationally taxing SVD subroutine. Currently, quantum computing is in the Noisy Intermediate Scale Quantum (NISQ) era Preskill (2018). While some forms of error mitigation are proposed, noise still limits the amount of qubits and the fidelity of gate operations, such that their numbers are too little for full-fledged quantum computers running quantum error correction codes Kandala et al. (2018). Despite these shortcomings, hybrid quantum computers running variational quantum algorithms provide a useful platform for classically taxing calculations, one major example being the variational quantum eigensolver (VQE) for quantum chemistry O’Malley et al. (2016); Peruzzo et al. (2014); Colless et al. (2018). Hybrid algorithms complement the strengths of both processors: classically efficient tasks are performed on a classical computer, while unitary calculations such as quantum state preparation are handed to a quantum computer. Because of the iterative nature of variational algorithms, noise can be mitigated at every step, increasing robustness of the algorithm.
The SVD subroutine can be performed on a quantum computer through the variational quantum singular value decomposition (VQSVD) algorithm Wang et al. (2021). Besides its application to SSD, SVD forms a compelling application of hybrid quantum computing in general, because of its versatile utility. In a similar fashion to VQE, one can train two parameterisable quantum circuits (PQCs) to learn the left and right singular vectors of a matrix, and sample the singular values through Hadamard tests. In this work we explore both a gate-based paradigm Peruzzo et al. (2014), where the parameterisation is facilitated through rotational quantum gates, and a pulse-based paradigm de Keijzer et al. (2022), where we optimise laser pulse profiles on a neutral atom quantum computing platform. The latter is derived from quantum optimal control (QOC) theory, and is thought to be more NISQ efficient.
Our aim is to convert SSD into a variational hybrid quantum-classical algorithm called quantum singular spectrum decomposition (QSSD). Here, we pose the question whether quantum computing can provide an inherent computational speedup for SVD by surpassing the classical complexity. We employ randomised SVD to improve scalibility of the algorithm Halko et al. (2011). The classical theory behind SSD is introduced in Sec. II. The implementation of QSSD on a hybrid quantum computer is elaborated on in Sec. III, using a gate-based approach, while in Sec. IV we discuss a pulse-based approach. Simulation results for three different time series, among which the first observation of a gravitational wave, are presented in Sec. V. We conclude with a summary and discussion about the viability of QSSD in Sec. VI.
II Singular Spectrum Decomposition
The SSD algorithm is based on the singular spectrum analysis (SSA) method, whose basic ideas are presented in Appendix A Bonizzi et al. (2014); Vautard and Ghil (1989). SSA is designed to explore the presence of specific patterns within a time series, while SSD is designed to provide a decomposition into its constituents components. Let be an -dimensional string of numbers, sampled at a uniform sampling frequency from some time series. We are interested in extracting (physically) meaningful components from the signal. By embedding the signal in a matrix, correlation functions between pairs of sample points can be extracted through a singular value decomposition of said matrix. Several types of components can be found, among which trends, oscillations and noise for instance. In SSD, such identification is completely automated by focusing on extracting narrow frequency band components.
The time series is first embedded in a trajectory matrix, however, in comparison to SSA, the number of columns is extended to and the time series is wrapped around, yielding:
(1) |
It is to be understood that every subscript is . The singular value decomposition (SVD) of such a matrix yields
(2) |
where are the singular values, and and the left and right singular vectors. As explained above, SSD aims to find physically meaningful components through a data-driven and iterative approach. Starting from the original signal , at each iteration, a component is extracted, such that a residue
(3) |
remains, where .
For iteration :
The power spectral density (PSD) of the signal is calculated. The frequency associated with the dominant peak in the PSD is then estimated. If the ratio criterion is met, a trend is said to characterise the spectral contents of the residual. Ref. Bonizzi et al. (2014) sets . In such a case, the embedding dimension is set to , as described in Ref. Vautard et al. (1992). The first component is then extracted from Hankelisation of the matrix . Since most of the energy must be contained within the trend component, only 1 singular value is required for its reconstruction. If the ratio criterion is not met, the window length is defined by Bonizzi et al. (2014).
For iterations :
For all iterations , the embedding dimension is always set equal to . To extract meaningful components, only principal components with a dominant frequency in the band are selected. In order to estimate the value of the peak width , the Levenberg–Marquardt (LM) algorithm is used. First, the PSD of the residual is approximated with a sum of three Gaussian functions
(4) |
where is the vector of amplitudes, is the vector of Gaussian peak widths and are the peak locations, given by
(5) |
where is the frequency at which the second most dominant peak is situated. Starting the algorithm from the initial state vector components
(6) |
(7) |
the algorithm will eventually converge towards optimal . The peak width is then given by . Finally, the component is rescaled with a factor , so that . Such rescaling makes sure the variance of the residue is minimised. Solving for
(8) |
yields Bonizzi et al. (2014). The LM algorithm stops when the energy of the remainder has been reduced to a predefined threshold (default at 1%), ensuring proper convergence of SSD. This corresponds to the criterion
(9) |
so that the reconstructed signal reads
(10) |
III Hybrid gate-based Singular value decomposition
III.1 SVD quantum algorithm
The singular value decomposition (SVD) of a general matrix is given by
(11) |
where and are unitary square matrices, and is a diagonal matrix with all singular values ordered from highest to lowest on the diagonal. Through a suitable loss function, Wang et al. Wang et al. (2021) have shown that this decomposition can be implemented on a quantum computer by training two quantum circuits to learn the unitary matrices and , parameterised by two sets of trainable parameters and . For real matrices, and will be orthogonal, which can be efficiently prepared on a quantum computer since . We focus on this particular problem since data matrices are real. Through inversion of eq. (11), one finds that the singular values can be extracted from
(12) |
where is the Hermitian conjugate of the -th column of , and is the -th column of . The singular values and their associated left and right orthonormal singular vectors allow for a reconstruction of the original matrix through
(13) |
It is desirable to keep only the first few eigentriples such that they approximate the matrix to precision . Suppose that , then we find through the Cauchy-Schwarz inequality that the Frobenius norm of the difference is bounded by the squared sum of neglected singular values according to
(14) |
More particularly, the Eckart-Young theorem states that this approximation minimises this error norm, and is therefore the optimal matrix approximation Eckart and Young (1936).
III.2 Trajectory matrix implementation
In order to prepare inner products of the form (12) on a quantum computer, we must perform a unitary decomposition, coined a linear combination of unitaries (LCU), of the trajectory matrix:
(15) |
for unitaries . Because of the non-square nature of , we delay the discussion on the implementation of this decomposition to Sec. III.6. This set of unitaries is closely related to Pauli operator strings of the form , but different choices are possible. Throughout this paper we adopt the notation and
(16) |
Since -qubit states are elements of a -dimensional Hilbert space , the dimensions of the trajectory matrix must be enforced to be equal to a power of 2. The optimal dimensions of the trajectory matrix , as dictated by SSD, do not necessarily satisfy these constraints, so that we slightly alter the trajectory matrix dimensions for a VQSVD implementation. First, the optimal embedding dimension is rounded to the nearest power of two. Then, the number of columns is increased to the first power of two through periodic continuation, where the signal is artificially extended through a wrap-around. Defining
(17) |
the qubit numbers of the and circuits are given by and respectively. The trajectory matrix then takes the form

(18) |
Again, it is to be understood that every index is mod . While not obeying optimal SSD dimensions, this definition makes the most use of the space constrained by the dimensionality restrictions. Additionally, this definition reduces the number of unitaries required for the LCU in eq. (15), compared to embedding the trajectory matrix in a large null matrix.
III.3 Randomised QSSD
To obtain a more economic SVD routine, we approximate the SVD of the trajectory matrix in a low-rank fashion, such that we maintain only the first singular values:
(19) |
where is the singular value matrix, with for all . The computational complexity yields , which is a ’lower’ complexity than the conventional for . By performing this low-rank approximation, we hope to improve the scaling laws of the QSSD algorithm and mitigate the two major problems which persist within the theory laid out by Ref. Wang et al. (2021): the input problem and the output problem. The former refers to the fact that the decomposition of a matrix in a Pauli basis requires us to have a basis set that grows exponentially in the number of qubits. The latter refers to the read-out of the quantum circuits to obtain the matrices and , which is also an operation whose computation time is exponential in the number of qubits.
First, we aim to find an optimal basis with as few columns as possible, such that Erichson et al. (2016)
(20) |
This optimal basis can be approximated through a randomised matrix decomposition. Multiplication of the trajectory matrix by a random matrix
(21) |
where the vectors are drawn from the standard distribution , yields . This allows for a random sampling of . Performing a QR-decomposition on , and trimming the -matrix to a size , gives the optimal basis . This matrix encompasses a basis transformation that lifts to a lower-dimensional space where the SVD is approximated up to the -th value. Constructing this transformation gives , whose SVD yields
(22) |
We can establish a natural qubit cut-off number that defines a low-dimensional space onto which our trajectory matrix is projected. Because we focus on narrow frequency bands in the PSD, we can predict that we do not need plenty of singular values to reconstruct a signal. Every dominant frequency component yields 2 singular values, and simulations have shown that to obtain a faithful reconstruction of the corresponding signal, we need at most a number of singular values close to . Therefore, we establish a dimensional cut-off with associated qubit cut-off . Henceforth, we shall denote the reduced trajectory matrix as .
III.4 The parameterisable quantum circuits
We prepare two quantum circuits that learn to approximate the matrices of left () and right () singular vectors of the randomised trajectory matrix simultaneously. Let and represent the qubit number and the unitary circuit representation of one circuit, agnostic to which one we refer to. For both circuits, we initialise the qubits in the vacuum state: , and employ the hardware efficient ansatz:
(23) |
where represents the depth of the circuit, is a general entanglement operator over at most qubits, and is a rotational operator generated by the Pauli operator:
(24) |
We opt for this ansatz rather than a set of Euler rotations around the Bloch sphere, since this approach generates real amplitudes which are sufficient for the construction of orthonormal matrices, while simultaneously requiring a lower-dimensional parameter space. We choose a CNOT chain as our entanglement operation:
(25) |
III.5 The loss function
Knowing the columns of and , the maximum singular value is retrieved from
(26) |
where is the set of normalised vectors of length and respectively. Other singular values are retrieved through a similar fashion, where the vectors and are restricted to be orthogonal to previous ones. This yields
(27) |
where
(28) |
Through the Ky Fan theorem Fan (1951), we arrive at a suitable loss function for VQSVD, given by a linear combination of the measured singular values:
(29) |
where form a set of ordered real-valued weights and and are sets of orthonormal vectors that select the right columns and vectors from and , respectively. Here, Wang et al.’s linear parameterisation is adopted Wang et al. (2021). Naturally, optimisation aims to find optimal such that
(30) |
The terms can be measured on a quantum computer through a Hadamard test, if the matrix is decomposed into a basis of unitary operators such that .
III.6 Pseudo-unitary Hadamard Tests
Quantum computing usually deals with square matrices, since they are natural dimensions of operators in a Hilbert space. Decomposition of the trajectory matrix requires us to find a decomposition in a non-square basis, however. We can do so, if we relax the condition of unitarity of to
(31) |


so that we find a non-square pseudo-unitary basis decomposition. Because we adapted new optimal dimensions for the trajectory matrix to conform to quantum computing, we can construct a pseudo-Pauli basis:
(32) |
where is the set of all possible Pauli operators of string length , and is the null matrix. It is readily shown that every is pseudo-unitary and that together, they form a complete basis for any trajectory matrix, so that we can decompose according to
(33) |
where the expansion coefficients read
(34) |
Implementation of these basis elements in a Hadamard test still requires square matrices. We employ pseudo-unitary continuation to easily implement these elements by extending them to square matrices that have an easy tensor decomposition in a square Pauli basis, a protocol which is provided in Appendix B. Because the pseudo-Hadamard tests employ matrices and of different size, operating on different numbers of qubits, we must alter the controlled circuit subroutine of the Hadamard test as well. This is displayed in Fig. 2. must be altered through
(35) |
because it only acts on the last qubits.
III.7 Analytical Gradient Optimiser
For the classical optimisation routine, we employ an optimiser based on analytical gradients with adaptive Armijo conditions. Such optimisers circumvent finite difference inaccuracies by directly sampling the loss function at a point in parameter space through a parameter shift Schuld et al. (2019). The gradient of the loss function is given by its entries:
(36) |
(37) |
where are unit vectors along the direction in parameter space. A brief proof is provided in Appendix C. At every iteration , we update the variational parameters along its gradient. The step size is determined at every iteration and adapts to the loss function evaluation as well as past iterations. Generally, the parameter update reads
(38) |
At every iteration, we check for the first Wolfe condition, given by
(39) |
for some control parameter . If the condition is satisfied, we keep the step size equal to , otherwise the step size is halved and the condition is checked again. Additionally, we introduce a tracker mechanism that can rescale the step size dependent on past steps. Initially set to 0, we update the tracker through if the Wolfe condition is met, otherwise, we set . If the tracker hits a threshold , it is reset to 0, and the step size is doubled or halved. Throughout our work, we adopt an initial step size of , a control parameter and a threshold of .
III.8 Orthonormal Matrix Reconstruction
In order to reconstruct Hankel matrices from , we must perform qubit state tomography over both circuits. Each column of the circuit matrix representation can be read out by sending the orthonormal set through the circuits, and sampling all Pauli moments. Such approach is known to require an exponential number of samplings in the number of qubits. Matrix elements of the form (12) are unprotected against global phase invariance, though. In contrast, the expectation value of an Hermitian operator
(40) |
are invariant under for arbitrary phases . The columns of and allow relative phase differences of for , so that VQSVD finds local maxima where the singular values can be measured to be
(41) |
If the -th singular value is measured to be negative, the sign needs to flipped, and the -th column of gains an additional minus sign as well.
IV Pulse-based implementation for QSSD
Besides the gate paradigm, variational quantum optimal control (VQOC) de Keijzer et al. (2022) offers an alternative approach to searching through a Hilbert space (see Ref. Koch et al. (2022) for a review on QOC in general). Rather than optimising parameterised gates, we directly optimise the physical controls through which quantum operations are implemented. It is believed that for highly entangled systems, VQOC is able to outperform VQE in terms of accuracy, when resources are comparible. This is a result of the higher expressibility of optimal control, which one can prove by showing that a set of randomly initialised pulses produces unitary operations that resemble the Haar distribution more closely than a set of randomly initialised gates in the hardware efficient ansatz Hubregtsen et al. (2021).
In this paper, we consider application to a neutral atom quantum computer that is realised on a lattice of trapped Rydberg atoms, whose electronic state manifold offers an embedding of qubit states and . Consider 2 linear arrays of respectively and atoms, which are treated as 2-level systems where the -state is mapped to a hyperfine electronic ground state, and the -state is mapped to a Rydberg state. Qubit states are addressed by monochromatic laser pulses, which we aim to optimise in order to find an optimal pulse that approximates the target state through propagators and . For a total evolution time and , the circuit unitaries are subject to the propagator Schrödinger equation
(42) |
(43) |
Here, , are the total Hamiltonians that drive the evolution of the qubit states. On a neutral atom quantum computing platform, the native qubit Hamiltonian reads
(44) |
where is the drift Hamiltonian, which represents ’always-on’ interactions in the system, and is the control Hamiltonian, parameterised by the controls we impose on our system. For a linear array of qubits and controls, we find the van der Waals interaction
(45) |
and the control Hamiltonian
(46) |
Here, characterises the Rydberg-Rydberg interaction strength, is the interatomic distance between neighbouring qubits, and are control operators associated with our control parameters. In this work, we control the Rabi frequency and laser phase , and the detuning of the -state, so that their controls are given by
(47) |
These controls parameterise both circuits by modeling pulses as a set of time-discretised control pulses with duration . The physical implementation is a result from smoothing out the piecewise constant equidistant pulses at a minor loss of fidelity. We aim to optimise a new loss function
(48) |
by adjusting (29) to penalise strong controls for . We enforce these constraints by adding time-dependent Lagrange multiplier terms to :
(49) |
(50) |
where the multipliers are called adjoints, the inner product is given by
(51) |
and . To ensure a realistic implementation, we restrict our controls to the space of admissible pulses
(52) |
In Appendix D, we prove that it is possible to optimise this Lagrangian under these constraints by sampling the necessary quantities on a quantum computer, where we have omitted the proof of existence and uniqueness of the solutions. Our update scheme at iteration becomes
(53) |
for the -controls, and idem dito for . For optimisation, we adopt the same Armijo optimiser protocol where we check for the first Wolfe condition at every step. In Appendix D we also explicitly solve for the adjoints. In conclusion, the VQOC paradigm requires to solve the propagator Schrödinger equations (42), (43), the adjoint equations (80) and (81), and the analytical gradient (53).
V Analyses and Results
To benchmark the performance of QSSD, several simulations have been run, using a classical emulator of a noise-free quantum circuit. For efficiency purposes we assume full access to all relevant matrix elements, without resorting to sampling amplitudes through measurements. We compare gate-based and pulse-based results to the retrieved classical SSD components for a variety of applications, though we stress that because of the inherent inefficiency of the algorithm, we have not attempted to make a fair comparison between the two implementations. In order to draw a fair contrast, either implementation needs to be run on equivalent evolution circuits, where both the gate-based and pulse-based have equivalent resources. This alludes to a similar circuit evolution time , equivalent controls such as Bloch sphere rotational control only, and the number of quantum evaluations QE should scale linearly in the quantum resources compared to the number of quantum evaluations QE.
In this work, we adopted the hardware efficient ansatz for the gate-based circuits, with depth and an iteration number it = 1000, and we assumed full control for the pulse-based circuits, in natural units where and , for a total evolution time , a step size discretisation and an iteration number it = 150. We aim to show that with general resources, one can approximate the function space of the SVD reasonably well on a quantum computer, without employing equivalent evolution circuits. Note that the VQOC parameters are not fine-tuned for any implementation in particular. For a more realistic implementation on a neutral atom quantum computer, the parameters should lie in experimental bounds, and the space should be adjusted accordingly.
We first apply QSSD to a simple toy example to showcase that properties of the SSD algorithm, such as pinpointing non-stationarity of a signal, carry over to the quantum algorithm. Then we apply QSSD to simulated cortical local field potentials (LFPs), electric potentials originating from the extracellular space in brain tissue, as well as GW150914 data, resulting from the first observation of a gravitational wave event. As a figure of merit we introduce the error measure
(54) |
where is the PSD of the simulated individual band components, and where is the PSD of the SSD-recovered component. is the relevant frequency band of the PSD over which we integrate, and is its measure. This error focuses more closely on the frequency content of the retrieved components than an -norm would, and is not cumulative over time due to small displacements.
V.1 Non-stationary signal
As a first proof of principle, we applied SSD to the following non-stationary toy signal, composed of two harmonic sinusoidal functions:
(55) |
where is the Heaviside function, for . The classical SSD and QSSD results are presented and compared, in Fig. 3. The figure shows a clear separation of harmonic functions, while also pinpointing the moment when the non-stationary harmonic function begins. In Fig. 6, the error is graphed for both components, for all SSD variations.
V.2 Local Field Potential signal
Next we applied SSD to simulated local field potentials (LFPs), which represent the relatively slow varying temporal components of the neural signal, picked up from within a few hundreds of microns of a recording electrode. Brain waves can be separated into separate characteristic frequency bands called alpha [8-12 Hz], beta [13-30 Hz], gamma [30-90 Hz] and theta [4-7 Hz] bands, corresponding to the frequency range in which their dominant frequency lies Bonizzi et al. (2014). We simulated these LFPs by superimposing four components, each in every aforementioned band Liang et al. (2005). Because the alpha and theta components have overlapping frequency contents, we grouped them together as




V.3 Gravitational wave event GW150914
Black holes and gravitational waves are characteristic predictions of general relativity, and are therefore favourable probes of the theory. The waveforms of such gravitational waves are constrained by the underlying mechanisms such as their generation and propagation. The analysis of such waves is crucial to the understanding of relativistic gravitational physics, and may provide useful insights in black hole physics, the structure of neutron stars, supernovae and the cosmic gravitational wave background. Gravitational wave analysis will likely become classically intractable in the age of Big Data and third generation detectors such as the Einstein Telescope Punturo et al. (2010), and can greatly benefit from quantum data analysis algorithms. We applied SSD to gravitational wave analysis since it serves as an interesting addition to the classical gravitational wave data analysis pipeline. Not only is it capable of providing waveforms with a more crisp quality, it is also able to filter out glitches, lowering the risk of a wrong signal-to-noise ratio (SNR) threshold exceedance.
To showcase the applicability of SSD, we applied it to the the first measured gravitational wave event GW150914, eminent from a black hole binary merger, consistent of a pair of black holes with inferred source masses and Abbott (2016); LIGO-Virgo collaboration (2019). We have taken the raw data as measured by the LIGO Hanford detector around the merger time, after which we applied noise whitening, band-passing and notching to obtain an approximate gravitational waveform Center (2017). Through SSD we hope to separate the relevant information about the binary merger from any other unwanted component or noise, thus obtaining a subset of SSD components that can provide a more crisp waveform. The results of SSD filtering are presented in Fig. 5, as well as their respective time-frequency spectrograms. Since we are analysing a real signal rather than a simulated one, we cannot fairly compare the quality of a components to any original benchmark, because we do not know a priori what the true gravitational wave signal should look like, given the right physical parameters. For this reason, we can only provide a figure of merit of the QSSD components with respect to the classical SSD components. The errors are given in Fig. 6, where the comparison with classical SSD is missing for GW150914 because of the aforementioned argument.













(b)
(c)
(d)
(e)
(a)








(b)
(c)
(d)

VI Conclusion and discussion
In this work we have established a unified framework that combines the promising method of singular spectrum decomposition for classical time series analysis with the variational quantum singular value decomposition algorithm into quantum singular spectrum decomposition (QSSD). The singular value decomposition subroutine is designed to be performed on quantum hardware, while the retrieval of the SSD components is done classically. Using analytical gradient optimisers, we circumvent finite difference errors, and we guarantee optimisation at every iteration. QSSD could find interesting applications to near-term gravitational wave analysis because of the variational formulation. Here, we demonstrated this algorithm for providing a more crisp waveform for matched filtering.
QSSD translates a classical algorithm into a hybrid quantum-classical framework. In contrast to the classical algorithm, the quantum formulation does not have efficient access to all matrix elements of and . Unpacking the dense trajectory matrix into its unitary basis elements and reading out all the columns of and are two processes that required us to perform an exponential number of quantum circuit runs, in the number of qubits . An efficient quantum algorithm would rely on knowing only few parameters that are readily measured on a quantum device, while employing few resources. To mitigate the effects of the exponential scaling laws, we have adopted randomised SVD. While rendering QSSD more economic, the same trick can be applied to the classical algorithm, providing no inherent quantum speedup. An efficient rendition of SSD would circumvent measuring and , and instead use a different pipeline to read out SSD components. For further research, we pose the question whether this is possible within this variational framework.
The quality of SSD is related to the quality of the singular vectors, not the singular values, as dictated by Eq. (8), since a rescaling is performed after every iteration to ensure optimal energy extraction. It is therefore crucial for the convergence of the quantum routine to select a circuit ansatz that can approximate the solution space well. For the gate-based approach we have adopted the hardware efficient ansatz (HEA), and for the pulse-based approach we have assumed full control. Despite the HEA being often invoked as a standard method for quantum state preparation, there is a lack of understanding on its capabilities. Since data analysis does not know an effective design or model, we pose the question if an effective model can be established for specific time series applications, and if certain ansätze, either gate-based and pulse-based, can improve convergence for finding the orthonormal matrices.
In conclusion, it remains an open problem whether a true quantum speedup can be achieved through the method of QSSD. The variational formulation of this quantum algorithm does not allow for polynomial scaling laws in the number of qubits, and requires measuring exponentially many quantum amplitudes. At the same time, as mentioned above, several aspects of the theory can be improved upon, which are not necessarily restricted to QSSD applications only. For quantum state preparation purposes, it is interesting to investigate if one could apply quantum natural gradient (QNG) theory to the optimiser routine to improve convergence Stokes et al. (2020), or quantify the geometry of the search space to find better initial states Katabarwa et al. (2022). Overall, results from this preliminary attempt to translate SSD to a quantum computing framework show that this should be likely achievable with proper improvements in the theory and methods employed. In turn, this may pave the way to a true quantum speedup of QSSD over classical SSD. We leave the adaptations of all these ideas to future studies of QSSD and alternative approaches to time series analysis on a quantum computer.
Acknowledgements
We thank Robert de Keijzer, Madhav Mohan and Menica Dibenedetto for discussions. This research is financially supported by the Dutch Ministry of Economic Affairs and Climate Policy (EZK), as part of the Quantum Delta NL programme, and by the Netherlands Organisation for Scientific Research (NWO) under Grant No. 680.92.18.05.
Data Availability
Appendix A Preliminaries - Singular Spectrum Analysis
Suppose a time series is sampled times at a steady rate to obtain the string . Then, the SSA algorithm works as follows:
-
1.
The time series is turned into an Hankel matrix, where is the embedding dimension and . This gives the trajectory matrix
(56) Such a matrix encapsulates correlations between the data points. By tuning the embedding dimension just right, SSA can faithfully extract sub-components. If is too low, not enough correlation can be captured through the trajectory matrix. If is too large, however, ghost oscillations called spurious components will be captured.
-
2.
An SVD is performed on the trajectory matrix, yielding , with all relevant notation defined in eq. (11). One can further decompose a rectangular matrix of rank into a sum of rank-1 matrices according to
(57) The set is referred to as the -th eigentriple for fixed .
-
3.
The index set is partitioned into disjoint subsets . Each element contains a set of principal components that capture a specific component in a time series (like trend, oscillations, noise, etc.) The original trajectory matrix is then decomposed into
(58) where each matrix on the right hand side represents a specific component series .
-
4.
Sub-components are reconstructed by Hankelisation of each , where the matrix components of each cross-diagonal are averaged over. Reverse engineering those Hankel matrices gives the embedded sub-signals .
Appendix B Pseudo-unitary continuation
In this Appendix, we provide a protocol for the most economic extension of a pseudo-unitary matrix to a square unitary matrix that can be readily prepared for a Hadamard test. Let
(59) |
be a pseudo-unitary, with . The location of the operator inside the string, starting from 0 to can be turned into a binary string . Using the definition of the Pauli operators (16), we can find the continuation of the pseudo-unitaries as
(60) |
for . Such -qubit operators are readily prepared on a quantum computer, while preserving the structure of the original pseudo-unitary. Such protocol works equally well for transpose structures. Then, the evaluated singular values yield:
(61) |
Appendix C Analytic gradients
Because the constituent gates of the quantum circuits are generated by Hermitian generators, analytical gradients are readily calculated. The loss function is given by
(62) |
and both circuits are parameterised by the hardware efficient ansatz
(63) |
Loss function gradients can therefore directly be related to derivatives of the circuit representation with respect to the variational parameters according to
(64) |
Because the entanglement operations are unparameterised, we can relate this derivative to a shift in the parameter:
(65) |
In a similar spirit, we find
(66) |
This completes the proof.
Appendix D Quantum Optimal Control for SVD
In this Appendix, we prove that QOC finds a suitable application in performing SVD on a quantum computer, by showing that the quantities we must measure for optimisation can be prepared on a quantum computer. Additionally, we formally lay out some of the QOC theory laid out in Ref. de Keijzer et al. (2022) and tweak it to describe an SVD application. The Lagrangian for SVD applications is given by
(67) |
where and are the unitary representations of the pulses on circuit and respectively, and represent the controls over the circuits, and and are the adjoints. The first term represents the loss function we want to minimise regardless of optimal control:
(68) |
where we defined the artificial density matrix
(69) |
Furthermore, we include the regularisation of the pulse norms
(70) |
for some regularisation parameter , which we will fix at We also add two Lagrange multiplier terms that makes sure that the unitaries that are generated by the pulses are constrained to satisfy the Schrödinger equation. These are given by
(71) |
(72) |
where denotes the Hamiltonian that drives the circuit and respectively, and where the inner product is given by
(73) |
First we show how adjoints are calculated. This follows from the Fréchet derivates of the Lagrangian with respect to the quantity , be it the circuit unitary representation, the pulses or the adjoints. If we vary a Lagrangian with respect to a certain quantity with with , and if we obtain
(74) |
then is said to be the Fréchet derivative. In our next calculation, we omit by making it implicit in the variation, and we sloppily write as . We find
(75) |
(76) |
(77) |
(78) |
Stationary of the action under the Lagrangian requires all its Fréchet derivatives to vanish. This gives us
(79) |
where we have used the property . This gives us the propagator equation for the adjoint
(80) |
In a similar fashion we find
(81) |
The derivatives with respect to the pulse controls yield
(82) |
(83) |
If QOC is to implemented for a quantum SVD application, we need to be able to measure quantities defined by
(84) |
on a quantum computer. Defining , we find that we need to measure quantities of the form
(85) |
which we can sample through Hadamard tests. A similar calculation for the other circuit yields a similar conclusion. Therefore, a QOC implementation of quantum SVD is possible. With this implementation, we can analytically calculate gradients too, to find the update for the pulses at iteration :
(86) |
We find that
(87) |
(88) |
Because of the dependence of -adjoints on and vice versa, this allows for a coupled gradient calculation on a quantum computer for SVD applications.
References
- Bonizzi et al. (2014) P. Bonizzi, J. M. Karel, O. Meste, and R. L. Peeters, Advances in Adaptive Data Analysis 6, 1450011 (2014).
- Bonizzi et al. (2015) P. Bonizzi, J. Karel, S. Zeemering, and R. Peeters, in 2015 Computing in Cardiology Conference (CinC) (2015) pp. 309–312.
- Lowet et al. (2017) E. Lowet, M. J. Roberts, A. Peter, B. Gips, and P. De Weerd, Elife 6, e26642 (2017).
- Lowet et al. (2016) E. Lowet, M. J. Roberts, P. Bonizzi, J. Karel, and P. De Weerd, PloS one 11, e0146443 (2016).
- Cline and Dhillon (2006) A. K. Cline and I. S. Dhillon, Handbook of Linear Algebra (CRC Press, 2006).
- Preskill (2018) J. Preskill, Quantum 2, 79 (2018).
- Kandala et al. (2018) A. Kandala, K. Temme, A. D. Corcoles, A. Mezzacapo, J. M. Chow, and J. M. Gambetta, arXiv preprint arXiv:1805.04492 (2018).
- O’Malley et al. (2016) P. J. J. O’Malley, R. Babbush, I. D. Kivlichan, J. Romero, J. R. McClean, R. Barends, J. Kelly, P. Roushan, A. Tranter, N. Ding, B. Campbell, Y. Chen, Z. Chen, B. Chiaro, A. Dunsworth, A. G. Fowler, E. Jeffrey, E. Lucero, A. Megrant, J. Y. Mutus, M. Neeley, C. Neill, C. Quintana, D. Sank, A. Vainsencher, J. Wenner, T. C. White, P. V. Coveney, P. J. Love, H. Neven, A. Aspuru-Guzik, and J. M. Martinis, Phys. Rev. X 6, 031007 (2016).
- Peruzzo et al. (2014) A. Peruzzo, J. McClean, P. Shadbolt, M.-H. Yung, X.-Q. Zhou, P. J. Love, A. Aspuru-Guzik, and J. L. O’brien, Nature communications 5, 1 (2014).
- Colless et al. (2018) J. I. Colless, V. V. Ramasesh, D. Dahlen, M. S. Blok, M. E. Kimchi-Schwartz, J. R. McClean, J. Carter, W. A. de Jong, and I. Siddiqi, Physical Review X 8, 011021 (2018).
- Wang et al. (2021) X. Wang, Z. Song, and Y. Wang, Quantum 5, 483 (2021).
- de Keijzer et al. (2022) R. de Keijzer, O. Tse, and S. Kokkelmans, arXiv preprint arXiv:2202.08908 (2022).
- Halko et al. (2011) N. Halko, P.-G. Martinsson, and J. A. Tropp, SIAM review 53, 217 (2011).
- Vautard and Ghil (1989) R. Vautard and M. Ghil, Physica D: Nonlinear Phenomena 35, 395 (1989).
- Vautard et al. (1992) R. Vautard, P. Yiou, and M. Ghil, Physica D: Nonlinear Phenomena 58, 95 (1992).
- Eckart and Young (1936) C. Eckart and G. Young, Psychometrika 1, 211 (1936).
- Erichson et al. (2016) N. B. Erichson, S. Voronin, S. L. Brunton, and J. N. Kutz, arXiv preprint arXiv:1608.02148 (2016).
- Fan (1951) K. Fan, Proceedings of the National Academy of Sciences of the United States of America 37, 760 (1951).
- Schuld et al. (2019) M. Schuld, V. Bergholm, C. Gogolin, J. Izaac, and N. Killoran, Phys. Rev. A 99, 032331 (2019).
- Koch et al. (2022) C. P. Koch, U. Boscain, T. Calarco, G. Dirr, S. Filipp, S. J. Glaser, R. Kosloff, S. Montangero, T. Schulte-Herbrüggen, D. Sugny, et al., arXiv preprint arXiv:2205.12110 (2022).
- Hubregtsen et al. (2021) T. Hubregtsen, J. Pichlmeier, P. Stecher, and K. Bertels, Quantum Machine Intelligence 3, 1 (2021).
- Liang et al. (2005) H. Liang, S. L. Bressler, E. A. Buffalo, R. Desimone, and P. Fries, Biological cybernetics 92, 380 (2005).
- Punturo et al. (2010) M. Punturo, M. Abernathy, F. Acernese, B. Allen, N. Andersson, K. Arun, F. Barone, B. Barr, M. Barsuglia, M. Beker, et al., Classical and Quantum Gravity 27, 194002 (2010).
- Abbott (2016) B. P. Abbott (LIGO Scientific Collaboration and Virgo Collaboration), Phys. Rev. Lett. 116, 061102 (2016).
- LIGO-Virgo collaboration (2019) LIGO-Virgo collaboration, “Data release for event GW150914,” https://www.gw-openscience.org/events/GW150914/ (2019).
- Center (2017) G. W. O. S. Center, “Signal processing with GW150914 open data,” https://www.gw-openscience.org/s/events/GW150914/GW150914_tutorial.html (2017).
- Stokes et al. (2020) J. Stokes, J. Izaac, N. Killoran, and G. Carleo, Quantum 4, 269 (2020).
- Katabarwa et al. (2022) A. Katabarwa, S. Sim, D. E. Koh, and P.-L. Dallaire-Demers, Quantum 6, 782 (2022).
- Johansson et al. (2012) J. R. Johansson, P. D. Nation, and F. Nori, Computer Physics Communications 183, 1760 (2012).