Nonlinear input transformations are ubiquitous in quantum reservoir computing

The nascent computational paradigm of quantum reservoir computing presents an attractive use of near-term, noisy-intermediate-scale quantum processors. To understand the potential power and use cases of quantum reservoir computing, it is necessary to define a conceptual framework to separate its constituent components and determine their impacts on performance. In this manuscript, we utilize such a framework to isolate the input encoding component of contemporary quantum reservoir computing schemes. We find that across the majority of schemes the input encoding implements a nonlinear transformation on the input data. As nonlinearity is known to be a key computational resource in reservoir computing, this calls into question the necessity and function of further, post-input, processing. Our findings will impact the design of future quantum reservoirs, as well as the interpretation of results and fair comparison between proposed designs.


I. INTRODUCTION
Quantum reservoir computing (QRC) is an emerging area in the field of quantum neuromorphic computing [1,2] that promises the potential application of near-term quantum technology to real-world problems.It generalizes the classical computing paradigm of reservoir computing [3][4][5] to consider quantum systems as the computational resource, or reservoir.Unlike in traditional machine learning approaches, such as neural networks, the internal dynamics of the reservoir are untrained in this paradigm.Instead, to achieve task performance the reservoir response to a time-dependent signal is recorded, and post-processed using a linear weight-matrix.This weight matrix is the only trainable element of the setup.
Considerable effort has been devoted to both understanding what makes a high performing reservoir, and using this understanding to design physical reservoirs that implement such dynamics naturally [6].To that end, quantum systems appear attractive due to i) their naturally large state-space available for computation, ii) potential for stronger-than-classical correlations, and, as we shall see, iii) ubiquitous nonlinearity.It is an active area of research to understand the conditions necessary to access the full benefit of quantum reservoirs.
In designing computational reservoirs, it is useful to elucidate which parts of the reservoir dynamics are necessary for performance, both to reduce useless complexity, and to understand limiting factors.In light of this, it is important to understand the nature of the dynamical map of the input data into reservoir state variables, which we refer to as the input encoding.It has been shown for classical reservoirs that a nonlinear input encoding may be sufficient for task performance, even if the rest of the dynamics are fully linear [7].
In this manuscript, we explore the nature of input encodings in QRC for explicitly time-dependent tasks, and find that by virtue of quantum mechanics nonlinear input encodings are ubiquitous.We consider both discrete * lcggovia@gmail.comencodings, where time-series data is discretized and feedin sequentially, and continuous encodings, where the input is simultaneous with internal reservoir dynamics and measurement.In both cases, we derive a set of conditions under which the input encoding is linear.For the purposes of this discussion, we will consider the computational nodes of a quantum reservoir to consist of the expectation values of a complete basis for the operator space acting on the reservoir's Hilbert space.We will often, though not exclusively, consider bases that consist of Hermitian matrices, i.e. observables.
This manuscript is organized as follows.In section II we formalize our definition of a linear input encoding, and derive the conditions required for a linear encoding in QRC.In sections III and IV we outline examples of input encodings for finite and infinite dimensional quantum reservoirs found in the literature, and discuss their (non)linearity.Finally, in section V we make our concluding remarks.

II. INPUT ENCODINGS
For an intrinsically time-dependent, N -dimensional input signal vector u(t), we separate QRC on timedependent tasks into two classes: 1. Discrete input encoding: u(t) is discretized into a finite series of vectors u j , where j indexes the time-step, which are sequentially input into the reservoir.The approaches within this class typically have distinct input, reservoir internal evolution, and measurement steps, described by separate quantum channels.
2. Continuous input encoding: the time dependent signal u(t) is feed directly into the system in a continuous fashion, concurrent with internal system evolution and measurement.
We consider an input encoding linear if for any input time (t j for the discrete case and t for continuous) the expectation value of any reservoir system operator (i.e. the state of the computational node) is a linear function of the input signal at that time.Explicitly, for discrete and continuous input encodings we require Discrete: Continuous: for all elements Bk of an operator basis for the reservoir system, indexed by k, where f 1 : R N → C is a linear function of the elements of u that returns a single complex number.By definition, a linear encoding in one basis implies a linear encoding in all other bases, since they are connected by linear transformations.Note that the other terms of Eq. ( 2), encapsulated in "+...", can include nonlinear functions of the previous state of the reservoir nodes, and therefore of the input history, i.e. u l for l < j or u(s) for s < t.While likely necessary for reservoir computational performance, this does not impact the discussion of the linearity of the input.
An important point that we emphasize in this discussion is that we require that we achieve input-relations of the form of Eq. ( 2) without nonlinear pre-processing of u(t).The reason for this is twofold.Firstly, with arbitrary nonlinear pre-processing it is always possible in principle to achieve a linear input encoding.This renders our entire discussion pointless, since we are interested in the conditions on QRC that allow for a linear input encoding.Secondly, nonlinear pre-processing is a computational resource in itself, and may alone be sufficient as the resource in a reservoir computing framework.Thus, we argue that allowing for nonlinear pre-processing is in opposition to the goal of understanding the computational power of QRC.

A. Discrete input encodings
The total evolution of the state during one time-step of a discrete input encoding QRC protocol is given by where C µ for µ ∈ {in, res, out} are the quantum channels describing the input, evolution, and measurement steps.QRC operation of this form is similar to the implementation of classical reservoir computing in software, such as echo state networks [4].We note that for the purposes of this manuscript the internal dynamics and measurement can happen simultaneously.Only the input step must be separated for the discussion that follows.The benefits of this approach are that it aligns more closely to the discrete circuit-model picture of quantum computation, and it can be used to artificially slow down the data input-rate.The main drawbacks are that it does not take full advantage of the time-dependent nature of a reservoir built from a physical dynamical system in hardware, nor does it allow for processing at the (potentially fast) natural timescale of the physical reservoir.
As discussed in Ref. [8], all discrete input encodings can be described by a quantum channel that is parameterized by the elements of u j , which we write as The linear encoding condition for discrete input can then be expressed as for a basis of operator space { Bk }.
From the above expression, it is clear that the requirements of a linear encoding depend entirely on the form of the state ρ in j after the input step of each time-step, and can simply be expressed by the requirement that in any basis decomposition of ρ in j the coefficients are linear functions of the elements of u j .That is to say we require that for {τ m } a basis of operator space.Taking {τ m } to be an orthogonal basis, it is clear that the linear encoding condition of Eq. ( 5) is valid if and only if Eq. ( 6) is valid.As a reminder, if Eq. ( 6) is true for one basis it is true for all by linearity of basis transformations.While seemingly benign, the linear encoding condition is actually a strong constraint on the nature of the input channel, since Eq. ( 6) must be valid for any state ρ j−1 of the previous step.Later in this manuscript we will explore examples of discrete encodings present in the literature, some of which will be linear, and some not.We leave a detailed understanding of the form of channels that satisfy linear encoding for future work.

B. Continuous input encodings
We define a continuous-mode quantum reservoir to be a dynamical quantum system that experiences a continuous force or "drive" that is a function of the input signal u(t).In this operation mode, there are no longer distinct input, reservoir evolution, and measurement steps, but rather all three happen simultaneously.The total evolution of the reservoir can therefore be described by the parameterized quantum channel where α are the hyper-parameters of the reservoir dynamics and measurement that are independent of the input.
We will focus on quantum channels that can be described in differential form by a Lindbladian generator as this allow us to write the equivalent adjoint master equation for the evolution of operators where L † is the Hermitian adjoint operator of L. Furthermore, by focusing on the differential map, we align ourselves more closely with the mindset of the operation of physical devices, where one often thinks of the evolution in terms of controllable Hamiltonian (or even dissipative) dynamics, as opposed to the integrated channel.However, we must be careful when describing the reservoir dynamics in differential form, as it may be tempting to assume that the input encoding is linear if L † depends linearly on the elements of u(t).This is not the case, as from Eq. ( 2) we see that linearity of the encoding will depend on the integration of Eq. ( 9).
We can always write Eq. ( 9) (restricted to the inputdependent parts) in an operator basis as where for reasons that will soon be apparent, we fix B1 = Î the identity operator.Even if all f k are linear functions of u(t), if any terms of the right-hand side of the above equation are nonzero other than that for the identity matrix (i.e.k = 1), the solution for B(t) will be defined by an exponential map.To see this, we set B = Bn an element of the basis, and then for the vector of expectation values of the basis elements we can write the differential equation where M(u(t)) is a matrix that expresses the differential equations for all n.
The solution to Eq. ( 12) can be expressed as B(t) = exp[P(u(t))]B(0), where P(u(t)) will often have no closed form solution.In the most general case where M(u(t)) does not commute with itself at different times, a series expansion for P(u(t)) known as the Magnus expansion can be constructed [9], and the lowest order term in this series is intuitively given by Regardless of the form of P(u(t)), it is clear that an exponential map has been applied to the matrix M(u(t)).Thus, the input encoding of u(t) cannot be linear unless f k,n (u(t)) are chosen precisely to invert the matrix exponential.This is generally impossible, since f k,n (u(t)) act element-wise in M(u(t)) and the matrix exponential does not, but in any case would require a nonlinear preprocessing step applied to u(t).
The only way to avoid this is to require that the input part of the differential equation governing the reservoir dynamics is of the form for all elements n of an operator basis where the first element is the identity.It is straightforward to integrate this to obtain the solution for the expectation value which is still not guaranteed to be a linear encoding, since the definite integral will depend on the functional form of f 1,n (u(s)).
If f 1,n is an arbitrarily weighted summation of the elements of the derivative of u(t) with respect to time, then a linear input encoding is obtained.This can be approximated to a high degree of accuracy by a linear function that has access to u(t) at times in the past and future (using numerical differentiation).While such pre-processing is strictly speaking linear, it is also something we consider outside of the scope of acceptable pre-processing because it requires u(s) for s > t to calculate.
To recover a linear input encoding without complex pre-processing, we remind ourselves that to ensure the fading memory property any functioning reservoir will have finite lifetimes 1/γ n for all basis elements.Adding this to the differential equation we have which has the general solution where is the full derivative of f 1,n (u(t)) with respect to time.The first line of the above equation has the form of a linear input encoding, provided f 1,n is a linear function, with an exponentially decaying contribution form the initial input.
The second line of Eq. ( 18) complicates matters.Expanding the integration kernel C n (u(t), t) under the assumption that f 1,n (u(t)) is a linear function of u(t) we have where f 1,n (u(t)) = l c n,l (t)u l (t) is the general form for a linear function of the elements u l (t) = [u(t)] l .Assuming c n,l (t) = c n,l , which in reservoir computing language implies that the input weights or mask are timeindependent, we see that the input encoding of Eq. ( 18) is linear except for the nonlinear contribution Thus, the input encoding is linear if the derivative of the input signal vanishes, as is the case for constant input.
Otherwise, there will be a nonlinear contribution to the input encoding.
To summarize, we have arrived at two conditions to obtain a linear continuous input encoding: i) The input acts as a linearly encoded inhomogeneous forcing term: ∂ t Bn (t) = f 1 1,n (u(t)) Î + ... ii) The input signal u(t) is constant or piece-wise constant.
In regards to criteria ii), if one ignores the non-zero derivative at the edge of piece-wise constant sections, then the encoding is linear.This can be justified by the fact that any physical implementation of continuous input will have finite resolution, such that one can treat piece-wise constant input as a series of constant input evolutions with updating initial conditions.This brings continuous input closer to discrete, but the internal dynamics and measurement still happen simultaneously.As we will show with examples in the rest of this manuscript, only a highly select set of QRC models will satisfy both of these conditions.Note that in Appendix A we explain why even when we consider in full generality the internal dynamics of the reservoir that occur simultaneously with the input, the above conditions are unmodified.

III. FINITE DIMENSIONAL SYSTEMS
We first consider quantum reservoirs with a finite dimensional Hilbert space, for example, a single qudit in a d-dimensional Hilbert space, or an array of qubits.We separate the following examples into discrete and continuous encodings.
A. Discrete input encodings

State re-initialization
The first example of a discrete input encoding is a re-initialization of the state of one (or more) subcomponents of the full system, such that the state after input at step j is given by where P in is the number of sub-components used for input.This is the input encoding employed in a majority of QRC studies to date [10][11][12][13][14][15][16][17][18].The linearity of this input encoding depends on the linearity (with respect to the input parameters) of the states σ n themselves.A linear encoding will satisfy for all elements of the basis and all σ n , where the specific linear function may depend on the basis element k, the state n, and the time-step j.
As an example, consider the scheme first introduced in Ref. [10], which re-initializes a single qubit at each time-step via It is easy to show that while the encoding is linear in the Pauli-Z operator, as Ẑ = 1 − 2u j , it is nonlinear in the Pauli-X operator: X = u j (1 − u j ).A minimal modification that would create a fully linear encoding would be an input scheme with no coherence, such as which was used in Refs.[8,19].More generally, coherent superpositions where the coefficients depend on the elements of u j as result in a square-root nonlinearity in the expectation values of the operators |ψ m ψ l | for m = l.Re-initialization input encodings are linear if they can be written as convex sums of the form where σm are density matrices on the combined system of all input subcomponents.While linear encodings with input via re-initialization are possible, they require sophisticated mixed state engineering, as the above equation must be valid for all j and any ρ j−1 .

Channel mixtures
The second example of a discrete input encoding is a mixture of fixed quantum channels applied to the quantum state at each input step, described by the transformation where C m are the fixed quantum channels.Provided that f m,j (u j ) are linear functions of their input parameters, then this is a linear encoding of the input.This class of input encodings was studied in Ref. [20], with unitary transformations for the fixed channels, and is the simplest discrete input encoding that can be made linear.

Parameterized Unitaries
As a final example, we consider a natural encoding of the input signal into the parameters of a quantum circuit, i.e. a unitary transformation.Such an encoding was considered in Ref. [21].In a qubit architecture, this is often done by encoding the real-valued input into the angle of a single or two-qubit gate, which results in a sinusoidal nonlinearity for the input encoding.
More generally, one can write the input encoding unitary in its diagonal basis as where Pm are the projection operators for the eigenvectors of Û with corresponding eigenvalues e iϕm = R m + iI m .The action of such a unitary is to return the state If we write each eigenvalue pair-product in terms of its real and imaginary parts as e i(ϕm−ϕ l ) = R m,l + iI m,l , where R 2 m,l +I 2 m,l = 1, then we can achieve a linear encoding if R m,l and I m,l are linear functions of the elements of u j for all m and l.
If more than one eigenvalue, e.g. e iϕn and e iϕ k , is a function of the input signal, then since the real an imaginary components of any one eigenvalue must be nonlinear functions of the input signal parameters for their products to be linear functions.Thus, for more than one eigenvalue of the input unitary to depend on the input data we require nonlinear pre-processing.Furthermore, conversion from the physically controllable parameters in the input unitary to its eigenvalues is likely to require additional nonlinear pre-processing.

B. Continuous input encodings
Finite dimensional systems cannot have a linear continuous input encoding as they cannot satisfy condition i).To see this, consider the adjoint master equation (in diagonal form) for the element Bk of a basis formed by Hermitian trace-zero matrices plus the identity For finite dimensional systems the first term on the righthand side of Eq. ( 31), the communtator with the Hamiltonian, has trace zero and cannot be proportional to the identity.Similarly, the second term is also trace zero for Hermitian Bk , which implies that there is no term proportional to the identity.Note that this result also follows from the fact that the adjoint master equation generates unital evolution, which implies that the identity operator is an eigen-operator of the adjoint master equation (with eigenvalue 0).Straightforward input encodings that encode the input signal into the parameters of a time-dependent Hamiltonian Ĥ(t) naturally implement an exponential nonlinearity on the input data [22].Another noteworthy example of a nonlinear continuous input encoding for finite dimensional QRC is that of Refs.[23,24], which uses the cascaded interaction with an infinite dimensional ancillary system as input to the QRC.

IV. INFINITE DIMENSIONAL SYSTEMS
We now consider quantum systems with infinite dimensional Hilbert spaces, otherwise known as continuous variable systems.Proposals for QRC in this domain have focused on bosonic systems described by harmonic or nonlinear oscillators, and both discrete [25] and continuous [26,27] input schemes have been considered.For continuous variable systems, it is convenient to define the reservoir nodes as the expectation values of the basis formed by the quadrature moments where X and P are the position and momentum operators for a single continuous variable quantum system.The moments for n + m = 1 and n + m = 2 are the average values and covariance matrix, respectively, and form a complete description of Gaussian continuous variable systems.

A. Discrete input encodings
Just as for finite dimensional systems, infinite dimensional systems admit the linear input encodings discussed previously that either use state re-initialization into a mixed state, or a mixture of quantum channels.Beyond these, infinite dimensional systems have a straightforward linear input encoding that preserves state purity.It uses the displacement operator where â = ( X + i P )/ √ 2 is the lowering operator and β ∈ C, to implement the input transformation As is clear from the above equations, linearly encoding u j into the real and imaginary parts of β results in a linear input encoding.Displacement operator input encoding can also be used to realize a state re-initialization input scheme that creates pure states, as proposed for Gaussian systems in Ref. [25].This approach first re-initializes the target system into the vaccum state, and then applies the displacement transformation, resulting in the coherent state |β .On the other hand, a linear input encoding cannot be obtained from the squeezed state re-initialization of Ref. [25], as the covariance matrix elements are different nonlinear functions of the complex squeezing parameter.

B. Continuous input encodings
Unlike the finite dimensional case, condition i) for a linear continuous input encoding can be satisfied for infinite dimensional QRC.One way to do so, using coherent evolution, is to implement the Hamiltonian dynamics that generate a displacement transformation, as considered in Refs.[26,27].As an example, for the X operator this would be ∂ t X = i Ĥ(t), X = u(t) Î, for Ĥ(t) = u(t) P , (34) with a univariate input signal u(t).Suitable choice of u(t) will satisfy condition ii) of a linear continuous input encoding.It is worth noting that the short-term memory capacity benchmark of Ref. [27] satisfies condition ii), as it is piece-wise constant input.The sinusoidal parameter estimation tasks of Refs.[26,27] are linear if the signal input is encoded in amplitude, but nonlinear if it is encoded phase, which highlights how the task itself can determine linearity of the input encoding.
This linear encoding comes about due to the canonical commutation relation X, P = i, which is only valid for an infinite dimensional system (and operators that are unitarily equivalent to X and P ).No other elements of the moment basis have this commutation relation, and as such linear input encoding is only possible for the quadrature operators themselves.
Expanding the discussion to consider dissipative interactions encoding the input signal, it may be possible to engineer other linear continuous input encodings for infinite dimensional systems.One possibility would be to modify the cascaded-input framework of Ref. [23] to consider a bosonic ancilla and a bosonic reservoir.The details of such dissipative input encodings, or a proof of their nonlinearity are beyond the scope of this work.

V. CONCLUSION
In this manuscript, we have critically examined the input procedure in quantum reservoir computing to determine the conditions on a linear encoding of the input data.As we have shown, nonlinear input encodings are ubiquitous.Linear encodings are impossible in many proposed implementations of quantum reservoir computing, and even when possible require complex engineering to achieve.Notable exceptions are linear input encoding by a mixture of quantum channels [20], or via a displacement transformation [25][26][27].
The relevance of this discussion stems from the fact that nonlinearity is a necessary component for nontrivial computation and task performance in reservoir computing, and thus considerable effort is spent on achieving sufficient nonlinearity in the reservoir internal dynamics.If the input encoding is itself nonlinear, this calls into question the necessity of this effort.It may be sufficient for the internal dynamics to select the "right" parts of the transformed input data, as recently discussed for other frameworks of quantum machine learning [28].
For discrete input encodings, we have shown that the family of transformations that can be applied to the input data, as allowed by the laws of quantum mechanics, often result in quadratic, square-root, or exponential maps of the input data they encode.For continuous input encodings, the conditions we have derived for linear input in a quantum reservoir are more a feature of the fact that reservoir dynamics are described by an inhomogeneous differential equation than of quantum mechanics.
To that end, very similar conditions would be derived for a classical reservoir.We have shown that linearity of the input parameters in this differential equation is insufficient for a linear encoding, and that the input must act like a linear "forcing term", which is only possible for infinite dimensional systems.
In the continuous case, since the input and internal dynamics happen simultaneously our separation of the two may seem arbitrary.However, as in the discrete case, we argue that this dichotomy is important to consider when designing reservoirs.With very limited exceptions, quantum reservoirs with continuous input impart an exponential map on the input data, which may already be sufficient for computation without complex internal dynamics.
Finally, we note that quantum reservoir computing protocols such as those in Refs.[29][30][31] fall outside the scope of this manuscript.They have nominally constant "input" as their task is to prepare a resource quantum state or implement desired dynamical evolution, not to perform computation on an input of time-series data.Now we assume condition i) for continuous input, and separate out the component of the evolution due to the input to write the evoltuion as ∂ t B(t) = LA (α)B(t) + F(u(t)), (A4) where F is the vector of functions acting on the input for each element of B(t).
Assuming that LA (α) is diagonalizable, then we can make a linear transformation defined by the matrix V such that where {ǫ n } are the eigenvalues of LA (α).From the form of the above equation it is clear that the conditions for a linear input encoding derived from Eq. ( 18) hold in the general case for the elements of Fn (u(t)).Importantly, because Fn (u(t)) and F n (u(t)) are connected by a linear transformation, the linear input encoding conditions can equivalently be applied to F n (u(t)).

Figure 1 .
Figure 1.Quantum reservoir computing with a discrete (upper panel) or continuous (lower panel) input encoding.(Upper panel) Example quantum circuits for the input encoding, including state (re)initialization and unitary encodings; the internal reservoir dynamics, which may make use of ancillary systems to implement incoherent dynamics; and the measurement step.(Lower panel) Continuous-time quantum reservoirs have simultaneous input, internal dynamics, and measurement, represented by the control fields incedent on the reservoir (e.g. a network of spins as shown).
Since D is diagonal, each element of the above equation can be solved independently, with the general solution [analogous to Eq. (18)]