Quantum reservoir computing on random regular graphs
Moein N. Ivaki Achilleas Lazarides Tapio Ala-Nissila





Quantum Technology Finland Center of Excellence, Department of Applied Physics, Aalto University,
P.O. Box 11000, FI-00076 Aalto, Finland

Interdisciplinary Centre for Mathematical Modelling and Department of Mathematical Sciences, Loughborough University, Loughborough, Leicestershire LE11 3TU, United Kingdom

Quantum Technology Finland Center of Excellence, Department of Applied Physics, Aalto University,
P.O. Box 11000, FI-00076 Aalto, Finland
Interdisciplinary Centre for Mathematical Modelling and Department of Mathematical Sciences, Loughborough University, Loughborough, Leicestershire LE11 3TU, United Kingdom

§ ABSTRACT 
Quantum reservoir computing (QRC) is a low-complexity learning paradigm that combines the inherent dynamics of input-driven many-body quantum systems with classical learning techniques for nonlinear temporal data processing. Optimizing the QRC process and computing device is a complex task due to the dependence of many-body quantum systems to various factors. To explore this, we introduce a strongly interacting spin model on random regular graphs as the quantum component and investigate the interplay between static disorder, interactions, and graph connectivity, revealing their critical impact on quantum memory capacity and learnability accuracy. We tackle linear quantum and nonlinear classical tasks, and identify optimal learning and memory regimes through studying information localization, dynamical quantum correlations, and the many-body structure of the disordered Hamiltonian. In particular, we uncover the role of previously overlooked network connectivity and demonstrate how the presence of quantum correlations can significantly enhance the learning performance. Our findings thus provide guidelines for the optimal design of disordered analog quantum learning platforms.


Quantum reservoir computing on random regular graphs
    Tapio Ala-Nissila
    
====================================================


Introduction. 
Quantum machine learning leverages principles of quantum computing to enhance and accelerate traditional machine learning algorithms, offering potential breakthroughs in data processing and complex problem solving beyond classical capabilities <cit.>. The high-dimensional complex space of quantum states and the rich dynamics of quantum channels offer possibilities for designing low-complexity and high-performing platforms for  quantum information processing <cit.>. Quantum reservoir computing (QRC) has recently emerged as a promising approach toward temporal data processing without the need for often inefficient and inaccurate gradient optimization <cit.>. QRC leverages the inherent dynamics of disordered and dissipative quantum systems to learn, predict, and classify various linear and nonlinear temporal tasks, both quantum and classical, including those inspired by human brain functions <cit.>. Essentially, QRC generalizes the classical reservoir learning frameworks such as chaotic liquid state machines and echo-state networks, which are known to significantly reduce the optimization complexity of conventional recurrent neural networks <cit.>. In QRC, a discrete or continuous stream of inputs interacts with a quantum system (the “reservoir”) and the system is then allowed to undergo quantum dynamical evolution described by a completely positive and trace-preserving quantum map <cit.>. After some time, determined by physical parameters, a set of measurements in the reservoir are post-processed using classical learning techniques. This is then the computing device. One should compare this approach with variational quantum algorithms on noisy systems <cit.>, which can suffer from notorious barren plateaus. In these cases, the optimization complexity diverges rapidly as the number of optimization parameters grows, causing learning to eventually fail and limiting scalability <cit.>. On the contrary, QRC systems can benefit from noise and dissipation and are much easier to scale up <cit.>.


Utilizing disordered, interacting quantum many-body systems as computing reservoirs <cit.> requires identifying the system setups and parameters which optimize the learning process. To this end, here we study the dependence of learnability performance on the underlying model, in particular, on the connectivity of the spin model and the strength of the interactions and disorder. While previous theoretical studies have focused either on one-dimensional or on fully connected models for the quantum reservoir, we study spin models defined on random regular graphs (RRGs), and find that the graph degree together with quantum correlations can significantly impact learnability. Notably, in the fully connected limit we observe that some advantages diminish. This is because in this limit the reservoir becomes “too effective" at spreading the information contained in the inputs non-locally while the measurements that are used to feed the classical post-processing are local. Interestingly, it has been shown that for certain spin models, in this densely-connected limit the level statistics demonstrate a suppression of quantum chaos <cit.>, which might be relevant to our findings.
 
Model and dynamics. We consider the following Hamiltonian of interacting quantum spins on a RRG:

    ℋ=∑_ij,αJ^α_ijσ^α_i σ^α_j  +∑_i,αh_i^ασ^α_i,

where σ^α_i is the Pauli spin-1/2 operator at the vertex i and α∈{x,z} determines the spin direction. The coupling J^α_ij=J^αA_ij, where A_ij are the matrix elements of the adjacency matrix of the graph. The degree k of a vertex (site) is defined as the number of edges connected to that vertex, and a RRG is a graph where all vertices have the same degree while the edges are otherwise randomly assigned. Such model Hamiltonian can represent different types of systems, including ion traps, as well as nuclear and electronic spins <cit.>. We set h^α_i=h^α+δ^α_i with δ^α_i∈ [-Δ^α,Δ^α] and fix J^z=1, h^z=0, h^x=1, Δ^z=0.2. The last term ensures the absence of extra Hamiltonian symmetries. All energy and time-scales are given in terms of J^z and the model is generally non-integrable (including the case Δ^x=J^x=0 for k>2). 

We separate the total system into the auxiliary system 𝒮 used for data input and the reservoir 𝒮' (see Fig. <ref>). Computation is carried out in steps, as follows: Input data is encoded into the density matrix ρ_𝒮 for 𝒮, and the entire system is set to ρ_𝒮𝒮'→ρ _𝒮⊗ρ _𝒮', where ρ_𝒮'= Tr_𝒮[ρ_𝒮𝒮']; thus the ancillary qubits are set to the inputs, and the reservoir is left in a reduced state. The entire system is then allowed to evolve unitarily for the time-scale J^zΔ t, and the process is then repeated. Thus after n input steps, the state of  ρ_𝒮𝒮' is

    ρ_𝒮𝒮' (n Δ t) = 𝒰(Δ t)  ρ_𝒮,n⊗ρ_𝒮'[(n-1) Δ t ]  𝒰^†(Δ t),

with 𝒰(Δ t)=e^-iℋΔ t, ρ_𝒮,n encodes the n-th input and ρ_𝒮'[(n-1) Δ t ] is the reservoir state after evolving for Δ t after the n-1-th input step. The quantum map describing this dynamics is strictly contractive, ensuring fading-memory and convergence in an optimal dynamical regime <cit.>. This resembles the Stinespring representation of a quantum channel, where the evolution of a physical open quantum system can be described as partial trace of a unitary operation on a composite system in a dilated Hilbert space <cit.>. Alternatively, as a result of consecutive input injections and resetting, this is equivalent to an incoherent process on the auxiliary system, which can be approximated by local dissipators of rank dim(𝒮) <cit.>.




Training, Learning and Readout. The input-output relation of a quantum reservoir supplemented with a classical learning layer can be summarized in a functional form as {y_n}=ℱ( {ρ_𝒮,n}, ρ_𝒮𝒮',n, 𝒲). Here, {y_n} indicates the set of predictions obtained after classical post-processing. These predictions are derived by minimizing an error measure with respect to a sequence of desired targets y_n through a learning process. During training, the measurements of local expectation values ⟨σ^α_i (nΔ t)⟩ =  Tr[ρ_𝒮'(nΔ t) σ^α_i], and two-point correlation functions, ⟨σ^α_i(nΔ t) σ^α_j(nΔ t) ⟩, where i,j ∈𝒮', are used as “features". These features are combined linearly to fit the desired targets y_n, and the optimal weights 𝒲 are determined by this fitting process. Importantly, we only consider measurements in the computational basis α=z and do not apply time-multiplexing techniques <cit.>, which increases the complexity in number of measurements drastically. Moreover, we do not address the back-action of projective measurements <cit.>. However, by the virtue of the fading-memory and echo-state properties of a suitable reservoir, a full temporal re-initialization of the system is unnecessary; only the recent state of the system is relevant for making accurate predictions <cit.>. To quantify the information retrieval accuracy, we employ the Pearson correlation coefficient 𝒞_n=cov^2(y_n,y̅_n)/(var (y_n) ,var (y̅_n)) <cit.>, where y̅_n denotes the predicted value at step n. The coefficient 𝒞_n is bounded between 1 and 0, indicating complete or no linear correlation between the predicted and target values, respectively. We also estimate prediction accuracy using the averaged mean-squared error, defined as MSE=∑_n^N_L(y_n-y̅_n)^2/N_L, where N_L is the length of the input data. 

Given this discussion, it is clear that the dynamical properties of the reservoir play a pivotal role in learning. In particular, localization behavior of quantum Hamiltonian models defined on RRGs is directly affected by the connectivity, i.e., the graph degree k <cit.>. Connectivity can also influence the integrability and chaotic properties in certain models <cit.>. In earlier work it was found that, akin to some classical computation models and for tasks which require both sufficient memory and degree of nonlinearity, QRC systems achieve optimal performance at the edge of chaos, or more generally at the vicinity of a (quantum) phase transition <cit.>. Here we will study whether this is also the case in our model.
 
Quantum Tomography and Memory. As our first example, we study a linear quantum task. Consider the following family of bipartite input quantum states, known as Werner states <cit.>

    ρ_ W(η,d,t)= d-1+η(t)/d-1𝕀/d^2- η(t)/1-d𝒱/d ,

given as a mixture of a swap operator 𝒱 and a maximally mixed state 𝕀, with the mixing parameter η. The swap operator is defined as 𝒱(|Ψ⟩⊗|Φ⟩)=|Φ⟩⊗|Ψ⟩, exchanging the states of a bipartite quantum state. d is dimension of the input and here indicates the number of ancillary qubits. We consider two-qubit input states and can write ρ_ W(η',t)= 1/4 (1-η'(t)) 𝕀- η'(t) ρ_ B, with ρ_ B=|Φ⟩⟨Φ| and |Φ⟩=(|↑↓⟩-|↓↑⟩)/√(2) a singlet Bell state <cit.>. With 0≤η'≤1, ρ_ W is entangled for η'>1/(d+1) and separable otherwise <cit.>. For a given unitary 𝒰, this family of bipartite quantum states (by definition) satisfy ρ_ W=𝒰⊗𝒰 ρ_ W 𝒰^†⊗𝒰^†; a property which is of practical interest in quantum steering and communication protocols <cit.>. A large family of quantum states, including both Werner and isotropic states, can be expressed in a similar manner, where only a single mixing parameter can characterize the state uniquely. A high fidelity temporal learning of the mixing parameter η(t) is thus a proxy to learning dynamical evolution of quantum correlations of input states. Generalization of the described learning scheme to higher-dimensional inputs is straightforward and only requires the ability to encode such states. To evaluate the linear memory capacity, we set the learning target to recovering previous inputs, y_n,τ≡ y(nΔ t-τΔ t)=η' (nΔ t-τΔ t). The total memory capacity for delayed construction of previous inputs is defined as 𝒞_T=∑_n,τ𝒞_n,τ, with τ≥0 an integer specifying the delay time and 𝒞_n,τ the Pearson correlation coefficient for y_n,τ. We note that the total memory is also bounded and we have 𝒞_n,τ→ 0 when τ→∞. For a fixed finite delay time, we can normalize the averaged total memory and write 𝒞_T=𝒞_T/τ_ max.

Optimal Learning Regimes. Figure <ref> displays a learning diagram for 𝒞_T and MSE of the predicted values in the Δ^x-J^x plane. The optimal learning regime for our model occurs at around the boundary of chaotic-localized phase transitions. Notably, for a given interaction timescale J^zΔ t and for a graph with a fixed degree k, the addition of interactions σ^x_i σ^x_j in the disordered regimes is advantageous to both memory and also short-term predication accuracy.  As we will numerically establish later, this term represents an entangling and delocalizing interaction. The behavior of memory capacity as a function of the 𝒮-𝒮' interaction timescale J^zΔ t is shown for selected points in Fig. <ref>. In certain dynamical regimes, there can be a window where the largest memory performance is achieved, in accordance with previous studies <cit.>. As disorder increases, only high-degree reservoirs exhibit rapid initial growth of memory, followed by saturation in the long-time limit. Interestingly, in this set, the graphs with k=2,3 exhibit anomalously slow behavior, which reflects the slow propagation of information in the reservoir in these regimes. Adding the ordering interactions recovers the fast growth of the quantum memory capacity and allows the system to reach the optimal possible performance for all degrees; we attribute this to their delocalizing effect.

The main features discussed above are also evident in Fig. <ref>, where we additionally observe that, for the specified time intervals, higher connectivity elevates the memory capacity and improves the short-term prediction errors. However, the most optimal learning regime, in terms of both memory and accuracy, is achieved by tuning moderate interactions and computing on graphs with an intermediate k/N ratio. While reservoirs defined on higher degree graphs can evade localization in the presence of stronger disorder, it becomes exceedingly difficult to extract the non-locally hidden inputs information through only (quasi-) local measurements when k→ N-1. In such cases, retrieving the inputs information in a chosen measurement basis possibly requires measuring higher-order correlation functions of the form ⟨σ^α_iσ^α_j⋯σ^α_N⟩, which should be useful as extra learnable features in the training stage. Changes in the quantum chaotic behaviour in the highly-connected limit <cit.> may also be responsible for the drop in learning performance.



Correlation and Entanglement. The performance of quantum reservoirs can be related to fundamental and physical measures, such as degree of “quantumness" <cit.>, information scrambling and dynamical correlations <cit.>. Here we study an alternative version of the correlation operator introduced in Refs. <cit.>, and define the auxiliary system-reservoir correlation as χ(t)=ρ_𝒮𝒮'(0)-ρ_𝒮𝒮'(t), with ρ_𝒮𝒮'(0)=ρ_𝒮(0)⊗ρ_𝒮'(0) and ρ_𝒮𝒮'(t)=𝒰(t) ρ_𝒮𝒮'(0) 𝒰^†(t). We numerically calculate ‖χ(t)‖, with ‖·‖ the Hilbert-Schmidt norm. This probe measures the degree of total correlation introduced by the dynamics between the initially unentangled 𝒮 and 𝒮', and here it can also be interpreted simply as a distance measure. We set ρ_𝒮=ρ_W with some random η' and average over different realization of initial states and disordered Hamiltonians. As shown in Fig. <ref>(a), initially ‖χ(0)‖=0, indicating no correlation between auxiliary and reservoir degrees of freedom. As time passes by, ‖χ(t)‖ displays an initial growth within the time-scale τ∝ 1/Δ^x for Δ^x/J^z>1. Notably, with an optimal disorder level, composite system can avoid localization while leveraging chaotic dynamics for rapid and enhanced developments of correlations. While being sensitive to certain forms of information localization and the spectral properties of the underlying Hamiltonian, this measure lacks the ability to distinguish between quantum and classical correlations.


A more useful measure of the dynamical quantum correlation build-up is the mixed-state entanglement between the auxiliary system 𝒮 and the reservoir 𝒮'. We characterize this here by the logarithmic negativity defined as ℰ_SS'=log_2‖ρ^T_𝒮_𝒮𝒮'‖, where T_𝒮 indicates partial transpose with respect to 𝒮 and ‖·‖ is the trace norm <cit.>. Finite logarithmic negativity quantifies entanglement cost and entanglement of distillation <cit.>. The dynamical behavior of ℰ_SS' for different disorder strengths is shown in Fig. <ref>(b). Slow logarithmic growth of entanglement can be attributed to (the onset of) localization, which should support area-law scaling with the system size, as opposed to the usual volume-law scaling in chaotic quantum systems <cit.>. As can be seen, adding the ordering interactions σ^x_iσ^x_j in the large disorder regime recovers the fast growth and produces strong entanglement at short times. The presence of quantum correlations can in turn improve the memory capacity and learnability accuracy of disordered reservoirs, as observed in the previous section. 

Classical Logical Multitasking. To showcase the ability of our spin reservoir in performing nonlinear tasks, we now consider classical logical multitasking <cit.>. Given two independent sequences of binary inputs, the network tries to simultaneously learn how to 𝙰𝙽𝙳, 𝙾𝚁 and 𝚇𝙾𝚁 them. We set the state of each input spin to ρ_n = (1-η_n)|↑⟩⟨↑| + η_n|↓⟩⟨↓| with η_n ∈{0,1} encoding the input bits. Figure <ref> displays the accuracy of the learned operations as the disorder and connectivity are varied. The 𝚇𝙾𝚁 operation is the only operation that cannot be separated linearly in the two-dimensional input space and shows higher sensitivities to tuning the strength of disorder. However, adding moderate interactions recovers the maximal performance in most regimes, consistent with earlier observations. This supports the expectation that excessive local disorder, in the absence of quantum interactions, can quickly undermine nonlinear information processing capabilities <cit.>. Remarkably, in this case the critical disorder strength for the accuracy of the 𝚇𝙾𝚁 to fall just below ≈ 0.7 behaves almost linearly as a function of the graph degree, offering a practical tool to control the performance of QRC systems.


Summary and Discussion. We have introduced a many-body spin reservoir defined on RRGs and evaluated its learning capabilities for various tasks. Our findings demonstrate that, in an optimal dynamical regime, given in terms of disorder, interactions, and connectivity, our model captures the key properties of a high-performing quantum reservoir without requiring time-multiplexing. Our work paves the way towards designing practical analog QRC platforms by linking their performance to fundamental physical and geometrical properties. In experimental realizations, utilizing spatial-multiplexing for small quantum systems is a practical option <cit.>. Possibly, a few random measurements can provide enough information to perform a given learning task with high fidelity <cit.>. Additionally, it would be informative to study how different (symmetry) classes of unitary operations <cit.> and non-trivial electronic topology <cit.> affect the learning performance. Finally, while here we focused on supervised learning, it is worth exploring the potential for unsupervised approaches for classification tasks.

Acknowledgements. We wish to thank Alexander Balanov, Juan Sebastian Totero Gongora, Sergey Savielev, and Alexandre Zagoskin for useful discussions. We acknowledge the support of the UK Research and Innovation (UKRI) Horizon Europe guarantee scheme for the QRC-4-ESP project under grant number 101129663 and the Academy of Finland through its QTF Center of Excellence program (Project No. 312298).


apsrev4-1





§ APPENDIX A: DETAILS OF CALCULATIONS
 
Here, we provide some details of our numerical calculations. As usual <cit.>, a number of initial steps are discarded to eliminate transient effects. Specifically, we discard N_ transient=600-800 steps. We use N_ train=1000-2000 steps for training, where each “training steps” refers to a point in time where measurements are used to update the model's parameters by comparing the predicted outputs to the target values. Finally, N_ test=100-200 steps are reserved for testing the performance of the trained model. The training data is stored in a matrix of size N_O× N_ train, where the entry (i,j) represents the i-th observable measured at the j-th training step. Here, N_O=N_𝒮'×(N_𝒮'+1)/2, with N_O being the total number of measured observables and N_𝒮' the number of spins in the reservoir. The reported results are averaged over 50-200 independent realizations of random Hamiltonians and graphs, and the averages are taken over the results of the evaluation stage. We only consider connected graphs, i.e., graphs without isolated subgraphs. 

To emulate encoding errors and avoid overfitting in the training process regarding the memory task studied in the main manuscript, we add small initial noise to inputs by setting η'(t)→η'(t)±δ^η with δ^η∈ [0, 0.02], and rescale properly. For the supervised learning, we utilize the ridge linear regression with appropriate regularization strength. For the classification of the logical multitasking, we use support vector machines with a nonlinear kernel <cit.>. In this case, the accuracy is calculated by simply matching the binary predictions with the inputs.



§ APPENDIX B: ADDITIONAL RESULTS

In this section we present supplementary data for the previously unexplored regions of the learning diagrams related to the memory task. Figure <ref> shows the memory capacity for (Δ^x, J^x)=(0,0), i.e., in the absence of disorder and interactions. Surprisingly, the performance declines as the graph degree increases. While we cannot provide a definitive explanation for this behavior, it may be attributed to several factors, including the specific form of the initial state, the locality of measurements, finite-size effects, and most notably, the possibility that the system is in a (dynamical) critical state in this limit. We note that this behavior is not related to integrability, as the model cannot be mapped to a free-fermionic system due to random or all-to-all connectivities. This can be further supported by calculating the gap ratio r_n= min[δ_n,δ_n+1]/ max[δ_n,δ_n+1], where n labels the sorted eigenvalues and δ_n=E_n+1-E_n. The mean level spacing averaged over different disordered Hamiltonians and graph realizations ⟨ r⟩ is ≈ 0.39 and ≈ 0.53, for localized and ergodic phases, respectively <cit.>. As shown in Fig. <ref>(b), as disorder increases, ⟨ r⟩ decreases from its expected thermal value. Notably, for (Δ^x, J^x)=(0,0), the gap ratio remains close to its ergodic value for all degrees. Additionally, introducing interactions deep within the localized regimes pushes the gap ratio higher, moving it closer to its ergodic value. However, a thorough investigation of this behavior would require finite-size scaling, which is beyond the scope of the current study.



Furthermore, we calculate the logarithmic negativity for the extreme cases with k=2 and k=N-1. For k=2 and Δ^x≠0, one observes a lower amount of entanglement generation between auxiliary system and the reservoir compared to the the case k=3 studied in the main text, as one might have expected. With k=7 and at finite disorder, the dynamical quantum correlations grow faster and reach higher values at finite times, compared to the former case. However, in the absence of disorder and interactions, the negativity exhibits an anomalous dynamical behavior. We have also verified that the qualitative behavior is not sensitive to the strength of the symmetry breaking term Δ^z, which breaks the Ising ℤ_2 symmetry ∏_i σ^x_i. The long-time saturation value of ℰ_SS'(t) is controlled solely by the system size, and thus the memory for rather long 𝒮-𝒮' interaction time-scale ∝ J^zΔ t is expected to be comparable in all cases, provided that the system is not strictly localized. One should note that while having a strong entanglement is necessary for optimal learning <cit.>, it does not guarantee it. This is reflected in the small Δ^x region of the learning diagrams of the main text. While not crucial to the results presented in the main manuscript, the observed behavior within this parameter regime and in the limit of fully connected graphs is believed to be mostly of dynamical nature, warranting further studies. In this context, it would be insightful to investigate whether some of the observed anomalies can be accounted for by the findings presented in Ref. <cit.>.





