Realising and compressing quantum circuits with quantum reservoir computing

Quantum computers require precise control over parameters and careful engineering of the underlying physical system. In contrast, neural networks have evolved to tolerate imprecision and inhomogeneity. Here, using a reservoir computing architecture we show how a random network of quantum nodes can be used as a robust hardware for quantum computing. Our network architecture induces quantum operations by optimising only a single layer of quantum nodes, a key advantage over the traditional neural networks where many layers of neurons have to be optimised. We demonstrate how a single network can induce different quantum gates, including a universal gate set. Moreover, in the few-qubit regime, we show that sequences of multiple quantum gates in quantum circuits can be compressed with a single operation, potentially reducing the operation time and complexity. As the key resource is a random network of nodes, with no specific topology or structure, this architecture is a hardware friendly alternative paradigm for quantum computation. Building quantum computers typically requires substantial engineering efforts to achieve precise control on qubits and quantum gates. Here, the authors introduce an architecture based on reservoir computing and machine learning to realize efficient quantum operations without resorting to full optimization of the control parameters.


II. INTRODUCTION
While conventional computers rely on predetermined algorithms for performing tasks, computers based on artificial neural networks are flexible and can learn from example in analogy to a biological brain.Their resilience allows them to be versatile in applications and adaptive to practical situations.For instance, artificial neural networks are used across disciplines for a multitude of tasks [1][2][3][4][5][6][7][8][9], and are capable of extracting features from noisy [10,11] or incomplete data [12,13], as well as perturbed systems [14].
An artificial neural network is a system of interconnected nonlinear nodes capable of modelling complex mapping between input and output data.A given map is formed by carefully adjusting the connection weights between the nodes during a training procedure.While neural networks have been used for various applications, most of them are in the form of softwares implemented in conventional computers.Hardware realizations have been sought, however a major challenge is the control of the large number of connections between the nodes in conventional neural network architectures [15].
"Reservoir computing" refers to an alternative neural network architecture where the connections inside the network are taken to be fixed and random [16,17], thus avoiding the overhead of controlling a large number of connections, while keeping its wide range of applications [18,19].In this context, the fixed random network is known as the "reservoir".As it is easier to engineer a fixed and random network than a well controlled one, reservoir computing has been successfully implemented in a variety of physical systems [20][21][22][23].Recently, the reservoir computing concept was brought to the quantum domain [24], using networks of quantum nodes [25,26] and the performance of specific nonclassical tasks [27] including quantum state preparation [28,29] and tomography [30].While these examples operate with quantum systems, they work with classical data either in the input or output and are far from being quantum computers, which should be able to implement unitary transformations (at least approximately) of a quantum state.
In quantum computing, one of the most commonly used architectures is the quantum circuit model where an arbitrary quantum operation is decomposed with elementary quantum gates [31].Their realization requires precise engineering [32], which has led to the developments of quantum computers with a limited number of qubits so far [33,34], while the actual number required for meaningful applications is orders of magnitude higher [35].Although any quantum operation can be in principle obtained by applying gate combinations from a small set of quantum gates (referred to as universal gate set), long gate sequences require long operation time and lead to large errors.Alternatively, many frequently used elementary quantum operations can be obtained directly instead of obtaining them as combinations of gates from a universal gate set.However, realising different types of operations has required different types of interaction between the qubits, leading to more complex engineering.
FIG. 1.The scheme for quantum computing based on a quantum network.The QN is composed of a randomly connected network of nodes (black circles) driven with coherent excitation P (Blue arrow).The qubits on which computation is performed are denoted by q k (k ranges from 1 to the number of qubits).Quantum operations on qubits q k are performed by coupling them through the QN.J kl (l ranges from 1 to the number of network sites N ) represent a control layer of tunnelling amplitudes connecting the qubits to the QN.Different colors of qubits correspond to different levels of optimization.
Here, we introduce a scheme of quantum computing based on a reservoir computing framework.As the main network, we take a set of quantum nodes coupled via random and uncontrolled quantum tunneling.This network would traditionally be referred to as a reservoir within the context of neural networks.However, we will refer to the set of quantum nodes as the "quantum network" (QN) with its main feature being that its weight connections are not engineered.Similar networks of qubits were used before in Refs.[36,37] to realise non-trivial multi-qubit gates, where, unlike the reservoir computing architecture, all network weights were optimized.Let us also point out that our scheme has no relation to techniques of reservoir engineering, as we are not operating with a thermal bath or proposing to engineer the QN [38][39][40][41].Our use of the term "network" is not supposed to convey a particularly large number of nodes.For efficiency we will work with the smallest possible network.
The QN is connected to a layer of "computational" qubits upon which quantum processing is to be performed.We allow the strengths of the weights between the QN and computational qubit layer as the only layer of the network that needs optimization, as illustrated in Fig. 1.We show that a single QN can induce a wide variety of quantum operations on the qubits.In addition to universal quantum gates, we show that our scheme can directly induce non-unitary quantum operations, which is useful to simulate open quantum systems.We emphasise that these are achieved with quantum tunnelling as the only mode of interaction.

III. RESULT
A QN is formed with a network of two-level quantum nodes, which are interconnected via quantum tunnelling with random weights and excited with a classical field.The Hamiltonian is The field operators â † l and âl are the raising and lowering operators of a two-level system, which can be defined as â † l = |e g| l and âl = |g e| l , where |g and |e are the ground and excited states of the system with index l.E l and K ll ′   are site-dependent energies and nearest-neighbour hopping amplitudes, uniformly distributed in the intervals [±E 0 /2] and [±K 0 /2], respectively.The last term in Eq. 1 corresponds to the driving by a classical field.For simplicity we consider a uniform driving, such that P l = P .All calculations are performed with an open boundary condition (i.e., finite lattice with no periodicity) for the QN Hamiltonian.
The QN interacts with a set of computational qubits with the coupling weights J kl , such that the whole system is described by the Hamiltonian where σ± k = σx k ± iσ y k with σx k and σy k being the Pauli-X and Y operators for the qubit q k .Note that the computational qubits do not directly interact with each other, but only via the QN through quantum tunnelling.Our proposition is to induce quantum operations on the qubits q k by switching on the tunnelling amplitudes J kl for a time τ .The parameters are chosen with a four-step method: (a) We consider a sufficiently large QN with random fixed hopping amplitudes K ll ′ and energies E l .(b) P and τ are chosen (but not fine-tuned) in regimes where the output fidelity is high.(c) We then train (fine-tune) the tunnelling amplitudes J kl by maximising the fidelity.(d) For very small QNs, we train J kl , P l and τ to maximise the fidelity.
For training, we sample a set of pure input states for the qubits and compute fidelity of the states resulting from the QN compared to the ideal states corresponding to a desired quantum operation.The optimisation is performed using a hybrid genetic Nelder-Mead algorithm to set the tunnelling amplitudes J kl (details in Supplementary Section 1).In practice, this supervised learning procedure requires access to a set of ideal input-output state pairs (we considered 10 randomly generated states), which can either be calculated theoretically or taken as a resource in an experimental setup.We allow J kl to be complex, for generality, however this is not strictly necessary for our scheme.Once J kl are optimised, the fidelity is retested with an independent sample of input states.
Regarding the practical feasibility we note that the Fermi-Hubbard model represented by the Hamiltonian Ĥ has efficiently been implemented using cold atoms in optical lattices [42][43][44] and is expected to be accessible in nonlinear cavity arrays [45,46], depending on the strongly interacting photon regime.Substantial progress has been made toward reaching this regime using a variety of systems, including Rydberg atoms in high quality factor cavities [47], photonic crystal structures [48], superconducting circuits [49], exciton-polaritons [50], and trion-polaritons [51,52] A variety of physical implementations of coupling of quantum emitters to waveguides [53] or resonators [54] have also been considered, where lattices of superconducting qubits [55] have been particularly successful.These classes of systems are typically described by the Jaynes-Cummings-Hubbard model [56,57] where bosonic cavity modes are used to couple separated fermionic modes.The bosonic modes can be eliminated (under some conditions), giving an effective Fermi-Hubbard model [58].

A. Quantum operations
Here we describe the protocol for inducing quantum operations on the computational qubits.An operation begins at time t = 0 with the initialization of qubits.We sample the initial states |ϕ in uniformly at random, assuming that the QN starts in the vacuum state |vac R .The whole system is allowed to evolve up to a time t = τ , corresponding to the unitary operator Û = exp[−i Ĥτ / ].The final state of the combined system is thus given by |Ψ out = Û |ϕ in ⊗ |vac R .The final state of the qubits is given by ρ q = Tr R [|Ψ out Ψ out |] where Tr R [. . .] represents the partial trace that traces out the QN.For each initial state we compute the fidelity given by the overlap of the ideal final quantum state |ϕ ideal = ûq |ϕ in and the obtained state ρ q : where ûq is the desired quantum operation for the qubits.We plot fidelity histograms to show that the realised gates are almost perfect for any input state.We first show that the same QN can realize a range of different two-qubit gates, e.g., controlled inversion (cNOT), controlled-Y (cY), controlled-Z (cZ) and qubit swap (SWAP), see Fig. 2. A specific gate operation is induced with well chosen tunnelling amplitudes J kl and appropriate values of P and τ .In Fig. 3, we also demonstrate that high fidelity single-qubit gates are realized with a QN consisting of only one node.The same can be achieved with larger QNs, see Supplementary Section 2. These quantum gates, together with the two-qubit gates, form a universal gate set, from which any quantum operation can be constructed in principle.
Although our demonstrations are based on only few-qubit quantum operations, it is to be noted that, even within this few-qubit regime, many frequently used quantum gates are not native gates in most physical systems.Consequently, these gates are then composed of the native universal gate set.As a result, the depth of the circuits increases.Our idea is that since the same QN can induce a large number of quantum operations, this will reduce the depth (compressing) of the circuits.Our study also opens up the possibility of inducing quantum operations involving large number of qubits with a single QN, however that requires further study for a definitive answer.

B. Nonunitary operations
In general, the operations induced by the QN on the qubits can be nonunitary.The signature of the nonunitary nature of the operation can be observed in the purity of the qubits, shown in Fig. 4a.The purity oscillates and reaches 1 only at certain times (only at which the effective operation on the qubit can be considered unitary).We conclude that the system can also be trained to perform non-unitary gates.For a demonstration we consider a Markovian dynamics for the qubit given by the master equation: ρ = (γ/2)(2σ − ρσ + − σ + σ − ρ − ρσ + σ − ).Using the QN, we obtain a non-unitary quantum operation equivalent to the same induced by the master equation of the qubit (see Fig. 4 b).

C. Compression of quantum circuits
We have achieved a universal gate set from single-and two-qubit quantum gates with the QN.In the quantum circuit model, an arbitrary unitary is approximated with a sequence of single-and two-qubit gates.Using the same method, we achieve universality of a QN.Here, a single QN induces different quantum gates in a quantum circuit by changing the output tunnelling amplitudes J kl .However, a QN has an important advantage.A long sequence of quantum gates in a circuit model can be replaced with a single operation by a QN.For instance, a two-qubit Grover's algorithm [59,60] can be implemented in one step with a QN, while the circuit model requires several quantum gates in sequence (see Fig. 5).
In Fig. 6, we present numerical evidence for the possibility of replacing an entire quantum circuit by a single operation.A diffusion operator for the three-qubit Grover's algorithm is shown in Fig. 6a.This circuit includes a three-qubit Toffoli gate, which can also be implemented with single-and two-qubit gates, see Fig. 6b.The whole circuit would require 29 quantum gates in the conventional quantum circuit architecture.In contrast, a QN can implement all the gates by a single operation.The distribution of the output fidelity is plotted in Fig. 6c.We note that although considering fault-tolerance in Grover's algorithm, as it is the case in the circuit model, could be interesting, it is beyond the scope of this paper.
For implementing Grover's search algorithm, a diffusive operator D is required to operate √ N times on an N -qubit initial state to find out the search query.The operator D can be expressed as, where H ⊗N stands for Hadamard gates applied on all N qubits and |0 ⊗N represents the qubits in their ground state.
For N = 2 and 3, the quantum circuits composed of single-and two-qubit gates are presented in Fig. 5 and Fig. 6, respectively.

D. Robustness
Our scheme is inspired by reservoir computing frameworks, which are known for their robustness against imprecisions in the fabrication of the network.Similarly here quantum operations can withstand any undesirable change in the QN, provided that we retrain the amplitudes J kl .Indeed, as shown in the Supplementary Section 3, we find that the use of a neural network approach means that the system automatically learns how to deal with static errors in fabrication.

E. Physical systems
In our considered QN, quantum tunnelling is the only mode of interaction between the nodes.It is thus in principle compatible with a wide range of experimental platforms, including essentially all platforms currently considered for quantum computing, but with far less stringent requirements on the control of coupling between nodes.For example, let us mention ultracold atoms or ions (arguably the most advanced platform), cavity quantum electrodynamic systems (which enjoy relatively accessible measurement via optics), circuit quantum electrodynamic systems (which can be considered more accessible in setup) [61], or novel platforms such as those based on the internal states of molecules [62], coupled Bose-Einstein condensates [63] and lattices of exciton-polaritons [64].In some systems, interactions such as the Coulomb interaction are present in addition to tunnelling, which can in principle further enrich the complexity of quantum networks and potentially improve their computing capacity.Our scheme is particularly applicable for systems like quantum dots (QDs) where positioning them in regular patterns is a challenge.Consequently, these systems face challenges with disorder in the couplings between QDs, but this poses no problem for our scheme based on random coupling between nodes.The reduction in the number of gates may help less developed systems to implement examples of complete algorithms, even without having the relatively larger number of coupled qubits available in advanced ultracold ion traps.

IV. CONCLUSION
We have presented a platform for quantum computing where an underlying set of quantum nodes connects computing qubits and a learning algorithm is used to adapt the system to a particular quantum operation.Several previous works have considered how quantum neural networks can enhance the efficiency of solving classical tasks [25], while others have considered the use of assumed quantum computers [65,66] and quantum annealers [67] in neuromorphic architectures.In contrast, here we imagine a neuromorphic architecture that can allow a set of quantum nodes to realize quantum computation.The learning of quantum operations from quantum networks has been considered before, based on nonlocal spin coupling [36] and adiabatic pulse control [68].The advantage of the QN architecture introduced here is that only quantum tunnelling is considered for network connections, which is readily accessible in many systems (e.g.photonics, polaritons, cold atoms, and trapped ions), and that only a small subset of total network connection weights need to be controlled.We note that a very simple learning algorithm in the optimization of the tunnelling amplitudes was used.The application of more advanced evolutionary algorithms in quantum control would likely lead to improved results for our system [69].Alternatively, emerging quantum assisted algorithms [70] can be used for operations with large number qubits, for instance, using hybrid quantum-classical algorithms based on gradient descent, since gradients can be efficiently measured on near term hardwares [71].We note that while an advantage of quantum reservoir computing is that effects from disorder are corrected for at the training stage, a limitation is that each individual device would require separate training.This could make large-scale deployment by a manufacturer difficult.

V. AUTHOR'S CONTRIBUTION
SG conceived the project through discussion with TCHL, TP, and TK.SG performed all the calculations with helps from TK.All authors wrote the paper, discussed the results, and agreed with the conclusions.TCHL supervised the project.are random variables drawn from the interval [−1, +1].We retrain J kl for each set of parameters.We then calculate the average fidelity for each of the sets.Supplementary Figure 8 shows indeed the average fidelity is little affected by the random change in the network parameters.Note that for ∆ ≥ 0.5, the randomness is as high as the values of the parameters E l and K ll ′ .

XI. SUPPLEMENTARY SECTION 4: ONE-QUBIT GATES
Here, we consider a special case where one input qubit interacts with a one-site QN.The QN has an onsite energy E 1 , a coherent driving (pump) P , and negligible decay.The dynamics of the whole system is unitary, where the Hamiltonian is written as with J 11 being the strength of the coupling term.Note that we have used σ− 1 (â 1 ) as the annihilation operator of the input qubit (the QN site).Below we will present the working parameters for the dynamics of this system such that the evolution of the input qubit implements the X, Y, and Z gates given by the Pauli operators respectively.We will present two regimes, namely the low and high energy limit, in which one can implement the one-qubit gates on the input qubit.

XII. SUPPLEMENTARY SECTION 5: TWO-QUBIT GATES (VIA DIRECT INTERACTIONS)
Consider two interacting two-level systems as in the effective picture discussed in the main text.Each qubit has an onsite energy E j , a coherent pumping P j , and no decay.Together with a hopping interaction term, one writes the Hamiltonian as It will be shown below that this type of system is able to implement universal two-qubit gates on its initial state.We will start by presenting the working parameters for important gates, such as the square-root-swap (sSWAP), control-X (cNOT), control-Y (cY), control-Z (cZ), square-root-iSwap (siSWAP), and swap (SWAP).These gates are written as: We performed a search algorithm realising the above two-qubit gates.Our numerical results show that all these gates can be achieved with gate fidelity F > 0.999 (see Supplementary Table I for exemplary parameters).Supplementary Figure 9 shows a comparison of the high fidelity achieved with the search method for different gates.Note that genetic algorithms have been used for realising ÛsSWAP , ÛcNOT , ÛcY , and ÛcZ .The parameters for ÛsiSWAP and ÛsSWAP are not sensitive to small changes and therefore we did not perform precise search algorithms.

B. Supplementary Section 7: Universal quantum gates
We note that each of the two-qubit gates presented above, apart from the SWAP gate, combined with single-qubit gates form a universal set.In this way, they are equivalent to each other.As an example, we recall that the cNOT gate can be created, by the cY, cZ, sSWAP or siSWAP gate with the help of single qubit gates as follows Note that we have used the following single-qubit rotation matrices.
Even though different gates can be constructed from specific combinations of a universal set of gates, it should be noted that the ability to directly construct the gate needed for a particular application will bring the highest efficiency in terms of operation time.Indeed the ability of the QN to learn to perform a whole range of different quantum gates is one of its key advantages.

FIG. 4 .
FIG.4.A quantum network can induce nonunitary operation.a, Time dependence of qubit purity.b, Distribution of fidelity of a qubit evolving under a Markovian process.We consider a decay strength γ and a propagation time t = 0.5 /γ for the Markovian process.Here, we considered a single network node and 2000 uniformly distributed initial states.K0 is the hopping strength.

FIG. 6 .
FIG. 6. Implementation of the three-qubit Grover's algorithm with a quantum network.a A quantum circuit (blue box) implementing the three-qubit Grover's diffusion operator, which includes 29 single-and two-qubit gates.The circuit in the red box represents a three-qubit Toffoli gate.We have replaced the whole circuit with a single operation implemented by a quantum network (QN).We achieved an average fidelity 0.986 with five sites in the QN.b Quantum circuit (blue box) composed with single-and two-qubit gates for a three-qubit Toffoli gate (red box) used in a. c The distribution of fidelity for 2000 randomly generated input states.Here, X, H, T, T † and yellow boxes represent Pauli-X, Hadamard, π/8, −π/8 and controlled-NOT gates, respectively.We have use E0/K0 = 2.99 × 10 3 , P/K0 = 994.25 and τ K0/ = 1.22 and 10 randomly generated pure states for training, where E0, K0, P and τ are energy, hopping strength, driving strength, and evolution time, respectively.

FIG. 9 .
FIG. 9. Fidelity F of various two-qubit gates for the parameters listed in Supplementary TableI.
FIG. 9. Fidelity F of various two-qubit gates for the parameters listed in Supplementary TableI.
FIG. 9. Fidelity F of various two-qubit gates for the parameters listed in Supplementary TableI.
we consider 6 nodes for the quantum network.The fidelity distributions are obtained over 2000 uniformly at random generated states.The average fidelities for all gates are larger than 0.99.
FIG.5.Implementation of the two-qubit Grover's algorithm with a quantum network.a A quantum circuit implementing the two-qubit Grover's algorithm.The circuit in the blue box contains 11 gates, which we have replaced with a single operation acting on a state |ψ .Here, |ψ is created with a state preparation circuit (green box) and an oracle (red box).We achieved an average fidelity 0.99 with six sites in the quantum network.The obtained output probabilities (expressed in percentage) for the Grover's search task are presented in panels b-e for different |ψ , where the x-axis represents the measurement basis states.Here, we use E0/K0 = 300, P/K0 = 98 and τ K0/ = 10.6 and 10 randomly generated pure states for training.Here, H, X and the yellow box represent Hadamard, Pauli-X and controlled-NOT gates, and E0, K0, P and τ are energy, hopping strength, driving strength, and evolution time, respectively.

TABLE I .
Exemplary parameters for the realisation of two-qubit gates.We have used τ = E2t/ .All the gates are achieved with F > 0.999 with N = 10 5 .Note that the parameters for the ÛsiSWAP and ÛSWAP gates are not as sensitive as the others.Especially for ÛsiSWAP, one gets very high fidelity in the limit E1 = E2 ≫ P1 = P2, J.