Quantum Reservoir Computing for Speckle-Disorder Potentials

Quantum reservoir computing is a machine-learning approach designed to exploit the dynamics of quantum systems with memory to process information. As an advantage, it presents the possibility to benefit from the quantum resources provided by the reservoir combined with a simple and fast training strategy. In this work, this technique is introduced with a quantum reservoir of spins and it is applied to find the ground-state energy of an additional quantum system. The quantum reservoir computer is trained with a linear model to predict the lowest energy of a particle in the presence of different speckle-disorder potentials. The performance of the task is analyzed with a focus on the observable quantities extracted from the reservoir and it shows to be enhanced when two-qubit correlations are employed.


Introduction
In the last few years, the study of quantum systems has taken advantage of the increasing interest and the developments of machine learning techniques to face both theoretical and experimental challenges, which has lead to the emergence of the broad field of quantum machine learning [1][2][3][4][5]. Some successful examples of the use of machine learning include, among others, the detection and classification of quantum phases [6][7][8][9][10][11][12][13], the prediction of the ground-state energy and other characteristic quantities of quantum systems [14][15][16][17], and the enhanced control and readout in experimental setups [18][19][20][21]. Additionally, many efforts are devoted to develop machine-learning algorithms that exploit quantum resources, aiming to find a quantum advantage in performing tasks. Quantum reservoir computing (QRC) and related approaches belong to this last category [22,23].
The concept of QRC was introduced in [24] as an extension to the quantum realm of classical reservoir computing (RC) [25][26][27][28]. The main idea behind RC, as an unconventional computing method [29,30], is the use of the natural dynamics of systems to process information, together with a simplified training strategy [31]. For supervised learning techniques, for instance in the case of deep neural networks, one of the major drawbacks is the training process of models with typically thousands of free parameters to be optimally adjusted, which requires a lot of computational resources and/or time. Instead of that, in RC, the connections between the constituents of the reservoir are kept fixed and only the output quantities from the reservoir are involved in the training process and could be easily retrained for a different purpose. This scheme has shown to be sufficient to achieve very good performances in diverse tasks [32][33][34][35].
Quantum reservoirs are good candidates to be exploited for computational purposes for several reasons. First of all, the number of degrees of freedom in quantum systems increases exponentially with the number of constituents. Therefore, with relatively small systems, a large state space is available, which has been shown to be beneficial, i.e. it increases the memory capacity [24,[36][37][38][39]. In second place, the presence of entanglement can also contribute to achieve a quantum advantage when quantum correlations are exploited [39]. Finally, there exist several proposals suitable to be implemented in a wide variety of experimental platforms to realize not only classical tasks but also quantum ones [22], for instance, entanglement detection [40], quantum state tomography [41] and quantum state preparation [42,43].
In this article, the possibility of using a quantum reservoir to study another quantum system is explored as an alternative to classical machine-learning models. A first goal in this work is to show that a quantum reservoir can be used to make predictions on the ground-state energy of a quantum particle in a speckle-disorder potential [44] by only providing as an input this external potential and by using only a linear model to train the output observables. This problem is of relevance for understanding the Anderson localization phenomenon in quantum systems due arXiv:2201.11096v1 [quant-ph] 26 Jan 2022 to the presence of disorder, which determines their transport properties [45]. Additionally, we aim to analyze the effect on the performance when two-body quantum correlations in the reservoir are used compared with one-body observables for the mentioned task.
This work is organized as follows. In Section 2, the details on the quantum system in study are provided together with the database used. The description of how the input is encoded into the quantum reservoir is found in Section 3. In Section 4, the characteristics of the quantum reservoir system are explained. In Section 5, the quantum reservoir computing procedure is presented with the mathematical description of the state of the reservoir and its observables. The expressions of the trained models and an analysis of their performance are given in Section 6. Finally, the discussion of the results and the conclusions are in Section 7.

Database of Speckle-Disorder Potentials and Ground-State Energies
The problem to be addressed with the model proposed in this work consists in finding the lowest energy of the following Hamiltonian, which describes a particle of mass m in one dimension with position x in the presence of an external potential V(x): whereh is the reduced Planck constant. V(x) is a speckle potential that in cold-atoms experiments is created by means of optical fields passing through a diffusion plate [46][47][48] and can be numerically produced with Gaussian random numbers [49,50]. This potential introduces disorder into the system and originates the Anderson localization phenomenon [44,45].
In previous studies, classical machine-learning models with convolutional neural networks have shown to be able to make very good predictions on the first energies of this system and for different system sizes by applying transfer-learning protocols [16]. Additionally, the extension to the system with few repulsively interacting bosons [51] has also been explored including the particle number as an additional feature to the trained model [17].
The database used in this article is part of the database used in [17], which is publicly available at [52]. In this work, the first 10000 speckle-potential instances of the single-particle dataset and their corresponding ground-state energies are used. The energies in the database were computed numerically by means of exact diagonalization as explained in [51] and in more detail in [53].

Input Ecoding into the Quantum Reservoir
The values of each different speckle-potential instance in the dataset are provided in a discrete grid in space of K = 1024 points, V(x k ) = V k , with k = 1, ... , K. Therefore, our input is a set of vectors of size 1024 where the spatial structure of each potential is given by the order of the elements. For this reason, the values of the potential are introduced into the dynamics of the quantum reservoir in the same order. From the point of view of the quantum reservoir, a given speckle potential corresponds to an external time-dependent signal fed at discrete times, t = k∆t.
The input at a given time, V k , is encoded in one of the qubits of the system (See Figure 1), qubit 1, by setting its state as [24,39,54,55]: where s k = V k /V max and the value of V max is always the same and fixed as the maximum reached among all the 10000 speckle instances in the dataset. In this way, s k ∈ [0, 1] to have a properly normalized state for the qubit and all inputs are re-scaled the same quantity. The basis states that are used are the eigenstates of the Pauli matrix σ z , namelyσ z |0 = |0 andσ z |1 = − |1 .

Hamiltonian of the Reservoir of Spins
The quantum reservoir employed in this work is a system consisting of N = 6 spins (or qubits). The unitary dynamics of this system are governed by the following transverse-field Ising Hamiltonian:

QUANTUM RESERVOIR
Spin System Output Observables

Ground-State Energy
Training Figure 1. Schematic representation of the use of a quantum reservoir to predict the ground-state energy of a quantum particle in a speckle potential. The spatial-dependent values of the speckle potential are transformed into a time-dependent signal fed into the state of one spin of the reservoir at discrete time steps. The quantum reservoir system evolves between input injections. Different observables are extracted from the reservoir system and used in the training process to produce ground-state energy whereσ z i andσ x j are Pauli matrices acting on qubits i and j, respectively. The spin-spin couplings J ij , represented as lines of different thickness in Figure 1, are randomly generated once from a uniform distribution in the interval [−J s /2, J s /2] and then kept constant. We work on a system of units withh = 1 and J s = 1. The time intervals ∆t, are expressed in units of 1/J s , and h, that corresponds to an external magnetic field in the z direction, is fixed at h = 10J s , such that the system is in the appropriate dynamical regime [54]. This kind of system was in the original proposal of QRC in [24] and has been extensively studied for information processing purposes in further several works [39,[54][55][56][57][58][59].

Quantum Reservoir Computer Operation
The role of the quantum reservoir is to provide a map between the input speckle to the output observables. They carry the information about the input that has been processed during the time-evolution of the reservoir system. The memory of the system, for the present purposes, is exploited within each instance. However, the system is reset before the introduction of each speckle-potential at time t = 0. In this way, there are no dependencies between consecutive instances. The general scheme of the procedure is depicted in Figure 1.
The density matrix that describes the quantum state of the reservoir of spins before the injection of each potential reads: Afterwards, for a given speckle-potential instance, the state of the reservoir at each time step k, is given by: where Tr 1 () indicates the partial trace with respect to the first qubit. The dependence on the speckle points, V k , is through fixing the state of the first qubit, |ψ k ψ k |, in the form of Equation (2). Between input injections, there is a unitary evolution of the state of the reservoir of ∆t duration governed by the Hamiltonian in (3).
From the state of the reservoir, the expectation values of the following single-qubit observables at each time step k are computed as: for all spins, i = 1, .... N, and in the three directions α = x, y, z. Afterwards, the average over all time steps is taken to obtain: Similarly, the expectation values of the two-qubit observables are calculated, and with i < j and α, β = x, y, z.

Training and Predictions of the Models
From the output observables of the quantum reservoir, two models to make predictions,Ẽ, on the ground-state energies are proposed. Both are constructed by fitting a least-squares linear model with the training dataset, which corresponds to the first 7500 speckle instances and target energies E. The quality of the models is tested with the remaining 2500 potentials and it is quantified by the mean absolut error (MAE), and the coefficient of determination whereĒ is the mean energyĒ ≡ (1/M) ∑ M l=1 E l , and M is the number of instances, M = 7500 for the training data, and M = 2500 for the test data. If R 2 = 0, the predicted and the target energies are not linearly related, whereas for R 2 = 1 the predictions are perfect.
In the first case, the single-qubit observables in Equation (7) are employed and the final output,Ẽ, for each instance is written as: In this last model and for a system with N = 6, there are 61 free parameters, v with the corresponding labels, that are optimized during the training.
In the second case, there are 451 different weights w to be adjusted when the two-qubit quantities in Equation (9) are used in the similar following way: As in the neural-network models in [16] and [17], the predictionsẼ are functions of the speckle points in space. In the present case, the required nonlinear dependence of the outputs on the input values of the potential are, in general, guaranteed by both the form of input encoding in Equation (2) and an appropriate choice of the Hamiltonian parameters [58]. Beyond that, further nonlinear dependencies on the input have been introduced by combining the observables in (12) and (13) because it is beneficial to increase the performance without losing the linearity of the models.
The quality of the predictions of the two models is shown in Figure 2. Remarkably, the model that produces the predictions from the single-qubit observables of the reservoir with only 61 optimized parameters is able to learn from the training data without overfitting. The MAE and R 2 for the training data are 0.1126 and 0.8808, respectively, and practically equal to the values of the test data provided in Figure 2. In panel (a), in the distribution of the absolute error, there is a considerable number of speckle instances whose error is below the MAE. Moreover in panel (b), there is a clear correlation between the target energies and the predicted ones for the test data reflected on the large value of R 2 = 0.880, which is close to 0.9. If the model of two-qubit observables is employed instead, the accuracy of the predictions is, in general, improved. The peak of the distribution in panel (c) of the absolute error is sharper and closer to 0, as well as the value of the MAE. In accordance, in the scatter plot in panel (d) the value of R 2 surpasses 0.9 and we are closer to the ideal situation. Also in this case with much more free parameters, 451, the comparison between the values of the MAE= 0.0833 and R 2 = 0.936 for the training data and the test data in panels (c) and (d) indicates that there is not a significant overfitting problem.

Discussion and Conclusions
The results obtained with the models proposed in this work show that a quantum reservoir is suitable to be used to address the problem of making predictions on the ground-state energy of different speckle-disorder potentials. By following this approach, the computational capabilities of the quantum dynamics of the system are exploited and linear models with the observables of the quantum reservoir are sufficient to achieve a noticeable accuracy. In this way, we have taken advantage of both a simple and fast training strategy and the presence of quantum correlations. This paves the way to further develop models that follow a similar strategy, for instance, for systems of interacting particles in the presence of a speckle potential.
In fact, for practical purposes, the quality of the predictions should be increased in order to compete with state-of-the-art deep convolutional neural networks. To reach this aim, several strategies could be followed. It would be interesting to explore the effect of changing the form of the input encoding into the quantum reservoir and to study its impact on the quality of the predictions of the models. In addition to that, in the present work we have only explored the possibility of using single-qubit and two-qubit observables. The extension to three-body quantities and beyond should be considered and could contribute to improve the performance. This would lead to more flexible models, as the number of observables would be increased as well as the number of free parameters. Additionally, in a similar way, increasing the number of spins would enlarge the Hilbert space and increase the capabilities of the quantum reservoir. Regarding the Hamiltonian of the reservoir system, the values of the couplings and the external magnetic field could be seen as hyperparameters. As the performance in realizing the task depends on their values, to improve the results presented in this work, they could be optimized by defining an additional validation dataset.

Data Availability Statement:
The data used in this study are openly available in Zenodo at [52].

Acknowledgments:
The author acknowledges Rodrigo Martínez-Peña, Gian Luca Giorgi, Miguel C. Soriano and Roberta Zambrini for useful discussions and valuable comments and a careful reading of this manuscript.

Conflicts of Interest:
The author declares no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

Abbreviations
The following abbreviations are used in this manuscript:

QRC
Quantum Reservoir Computing RC Reservoir Computing MAE Mean Absolute Error