Estimating the degree of non-Markovianity using variational quantum circuits

Several applications of quantum machine learning (QML) rely on a quantum measurement followed by training algorithms using the measurement outcomes. However, recently developed QML models, such as variational quantum circuits (VQCs), can be implemented directly on the state of the quantum system (quantum data). Here, we propose to use a qubit as a probe to estimate the degree of non-Markovianity of the environment. Using VQCs, we find an optimal sequence of qubit-environment interactions that yield accurate estimations of the degree of non-Markovianity for the amplitude damping, phase damping, and the combination of both models. This work contributes to practical quantum applications of VQCs and delivers a feasible experimental procedure to estimate the degree of non-Markovianity.


I. INTRODUCTION
The last few years have seen a tremendous advance in machine learning (ML) techniques for analyzing data in a wide variety of fields.Quantum physics has also benefited from ML in various aspects such as control of quantum systems, classification and estimation tasks [1][2][3][4][5][6].In such cases, ML techniques have been used to analyze classical data, obtained from measuring quantum systems.On the other hand, considerable research has been done to take advantage of the quantum properties to improve machine learning techniques [7,8].The development of quantum artificial neural networks [9] and quantum kernel methods [10] are examples of this.
Towards quantum machine learning algorithms, learning circuits have proved to be a practical approach [11].Considering the currently available noisy intermediate-scale quantum computers [12] with few qubits (50-100 qubits), hybrid quantumclassical algorithms have been designed to develop short-depth quantum circuits with free control parameters.These circuits have been termed as variational quantum circuits (VQCs) [13][14][15][16].In VQCs, * htdinani@gmail.comthe optimization task is done over quantum (free parameters in the quantum circuit) and classical parameters (used in postprocessing) using classical optimization techniques [13].
One of the main obstacles in quantum technologies is the interaction of the quantum system with its surrounding environment which results in the loss of coherence of the quantum system [17].Simplifications are generally imposed on the physical processes.For instance, the so-called Markovian approximation, in which it is assumed that the evolution of the system does not depend on the history of its dynamics, but only on its current state.Thus, memory aspects are ignored, which often works as a good approximation.
Accurate determination of the degree of non-Markovianity requires a large number of measurements.Moreover, for the measure of non-Markovianity based on entanglement dynamics, an ancillary qubit, protected from interactions with the environment, needs to be considered.In order to surpass these challenges, ML techniques such as neural networks [27], support vector machines [28], random forest regressor [29], tensor network-based machine learning [30], and polynomial regression [31] have been used to determine the degree of non-Markovianity of a quantum process.In addition, it has been shown that quantum circuits can be used to simulate non-Markovian dynamics [32,33] which is an important advance in the study of realistic situations.
In the present work, we show that the degree of quantum non-Markovianity can be estimated directly from measurements performed on the qubit.Using VQCs, through supervised learning, we find an optimal sequence of qubit-environment interactions to estimate the degree of non-Markovianity, reaching high precision.We apply this methodology to the paradigmatic amplitude and phase damping channels and the combination of both.For each damping channel, we will use exactly solvable models that provides a theoretical framework and parameter range to characterize non-Markovianity.
The remainder of this paper is organized as follows.In Sec.II we provide the theoretical framework for the open quantum dynamics and non-Markovianity.Section III contains a brief description of variational quantum circuits.In Sec.IV we focus on the estimation of the degree of non-Markovianity of the quantum processes.We conclude the paper in Sec.V.

II. OPEN QUANTUM SYSTEM DYNAMICS
In what follows, we describe two paradigmatic mechanisms for simulating open quantum systems, namely amplitude and phase damping channels.

A. Amplitude damping
For the amplitude damping (AD) channel, we consider a qubit interacting with a bath of harmonic oscillators, given by the Hamiltonian ( = 1) [34,35] Here, σ + = σ † − = |1 0| with |1 (|0 ) corresponding to the excited (ground) state of the qubit with transition frequency ω 0 , a k (a † k ) is the annihilation (creation) operator of the k-th mode of the bath with frequency ω k , and g k is the coupling between the qubit and the k-th mode.We assume that the bath has a Lorentzian spectral density where λ ≈ 1/τ r with τ r being the environment correlation time, γ 0 ≈ 1/τ s where τ s is the typical time scale of the system.The evolved density matrix for the AD channel can be expressed as follow (super index a refers to amplitude) where the Kraus operators are given by [32,36] in which [37] p with d = 2γ 0 λ − λ 2 .The dynamics is known to be non-Markovian in the strong coupling regime λ < 2γ 0 (τ s < 2τ r ) [37].The non-Markovianity can be evidenced in Fig. 1(a shows the evolution of the Bloch vector initialized along the x axis.This representation of the time evolution of the state provides insights for choosing the ansatz for the VQC.For the case of AD, as time evolves the length of the Bloch vector becomes smaller than 1 and after sufficiently long time the vector decays to the ground state |0 recovering its full length.This type of decoherence is also known as longitudinal relaxation which plays a fundamental role in color centers in diamond such as nitrogen-vacancy center coupled to lattice vibrations [38,39], and superconducting qubits in circuit QED [40]. The AD process can be simulated for a general scenario with a quantum circuit via an ancilla qubit [32,36].After tracing out the ancilla qubit, we obtain the desired mixed state.Figure 1(c) shows the quantum circuit.The Hadamard gate prepares the qubit in the superposition state (|0 + |1 ) / √ 2 while the controlled y rotation and CNOT gates simulate the interaction of the qubit with the environment.In this circuit, the angle θ a is given by [32,36] where p a (t) is given in Eq. ( 5)

B. Phase damping
For the phase damping (PD) channel, following Ref.[41], we consider a qubit undergoing decoherence induced by a colored noise given by the stochastic Hamiltonian ( = 1) Here, Γ(t) is a random variable which obeys the statistics of a random telegraph signal defined as , where α is the coupling between the qubit and the external influences, n(t) is a random variable with Poisson distribution with mean t/(2τ ), and σ z is the Pauli z operator.In this case, the dynamics of the qubit is given by the following Kraus operators [36,41] (super index p refers to phase) where with µ = (4ατ ) 2 − 1, and I being the identity matrix.
where ρ is the density matrix and |0 , |1 are the qubit states.Figure 2(b) shows the evolution of the Bloch vector initialized along the x axis.For such initialization, after sufficiently long time, the vector length decays to zero.In other words, the probability of qubit states is conserved but the phase information between them is lost.Phase damping is also known as transverse relaxation.Examples of systems that undergo this type of decoherence are nitrogen-vacancy center due to its interaction with lattice vibrations [43] and surrounding nuclear spins [44], and superconducting qubits under low- frequency noise [45].
The PD channel can also be simulated using a quantum circuit, as shown in Fig. 2(c) [36].In this circuit, the Hadamard gate prepares the qubit into the superposition state and the controlled y rotation simulates the interaction with the environment.The angle θ p is given by where Λ(t) is given in Eq. ( 9).

C. Combined amplitude and phase damping
There are several system where phase and amplitude damping effects are present at the same time.This generate a more complex scenario from the point of view of non-Markovianity, as explained in Ref [43].Thus, in order to extend the applicability of the proposed approach we also considers a serial concatenation of AD and PD.
The Kraus operators of this combined channel are obtained by multiplication of the Kraus operators of AD and PD channels [46] where i, j = 0, 1, k = 0, 1, 2, 3, and K (a) i and K (p) j are given in Eqs. ( 4) and ( 8), respectively.We note that the resultant density matrix of the evolved qubit is independent of the order of AD and PD channels, i.e., ρ (ap) (t) = ρ (pa) (t).This combined channel can be simulated with a quantum circuit that contains two ancillae, one for PD and one for AD, with the corresponding gates for each channel acting on the qubit and each ancilla.

D. Non-markovianity measure
Several measures of non-Markovianity have been introduced [47][48][49][50][51].In this work, we consider the measure based on entanglement dynamics of a bipartite quantum state.This bipartite system is composed of the system and an auxiliary ancilla that is isolated from the environment [47].It is worth noticing that this ancilla only serves the theoretical purpose of quantifying non-Markovianity and it is not implemented in the quantum circuits.On the contrary, the ancilla (qubit a) is present in the quantum circuit since it is used to simulate the effect of the environment.
A monotonic decrease in the entanglement of the bipartite system implies that the dynamics is Markovian.An increase in the entanglement during the evolution is a result of memory effects and thus non-Markovianity.Using this criteria, the degree of non-Markovianity can be calculated as where the maximization is done over all initial states ρ(0) and E(t) is the measure of entanglement where we use concurrence [52].It has been found that the maximization is achieved for Bell states [53].Therefore, we consider a bipartite system in a Bell state.
In the following sections, we first briefly review VQCs.We then use VQCs to find an optimal sequence to estimate the degree of non-Markovianity of a qubit under PD, AD and the combination of both dissipative channels.

III. VARIATIONAL QUANTUM CIRCUIT
VQCs, also known as parametrized quantum circuits (sometimes also referred to as quantum neural networks), are a type of quantum circuit with some free parameters (normally for single qubit operations) [14].We label the free quantum parameters of the circuit by ϕ.In addition, we consider classical parameters, labelled by w, in post-processing the measurement outcomes of the quantum circuit.
The optimization of both quantum and classical parameters ϕ and w can be done in a supervised manner using a set of input data, x, and their corresponding labels, f t (x).We aim to minimize a generic cost function defined as the mean square error (MSE), i.e., where n is the number of input data.In this approach, fϕ,w (x) is the estimate of f t (x) obtained from the output of the VQC.The output fϕ,w (x) is calculated as a linear combination of the measurement outcomes M i x,ϕ : Here, k is the number of measurement outcomes performed on the circuit.The whole optimization can be done through gradient-based techniques, such as stochastic gradient descent [54], gradient-free techniques such as Nelder-Mead method [55], or particle swarm optimization [56].The gradient can also be calculated using the quantum circuit [57].

IV. ESTIMATION OF THE DEGREE OF NON-MARKOVIANITY
We use VQCs to estimate the degree of non-Markovianity N of the dynamics of a qubit, under AD and PD channels.We first consider each of these channels independently.We found that a precise estimate of N can be obtained using a sequence of qubit-environment interactions.Our proposed scheme is the following: the qubit, initially in the state |0 , is rotated along the y axis with angle ϕ 0 .Next, it interacts with the environment in a sequence of two interactions, each with time t i .Each interaction is followed by a rotation along the y axis with angle ϕ i (i = 1, 2).Finally, the qubit is measured in the Pauli z basis.The estimate of N is obtained as We consider ϕ i (i = 0, 1, 2), t j (j = 1, 2), w 0 , and w 1 as the training parameters.The VQCs for AD and PD channels, are shown in Fig. 3(a) and (c), respectively.The optimal values of these parameters are found by minimizing the cost function, Eq. ( 13), for a range of values of the parameters λ/γ 0 (for AD) and ατ (for PD).Each VQC consists of a qubit (s) and two ancillas (a 1 and a 2 ).Each ancilla is used to simulate the dynamics of the qubit in each of its interactions with the environment.Note that, in the experiment, only one qubit (that interacts with the environment) is required to perform this estimation task, and no operation is required to be performed on the environment.
We remark that the selection of this ansatz for the structure of the circuit is influenced by the evolution of the Bloch vector and our intuition about the separation of two classes, i.e.Markovianity and non-Markovianity.We refer to this choice as a problem-based ansatz, although the approach could be extended to other tasks.
We performed our simulations using the quantum simulator of Pennylane [58].We used a combination of RMSprop [59] and Adagrad optimizers [60] (see Appendix A for some details about the optimizers).In order to find the optimal values of the parameters we generate 1000 data points (feature vectors) for each channel.The data is uniformly distributed for the parameter λ/γ 0 in the range [0.1, 3] (for AD) and for the parameter ατ in the range [0.1, 0.75] (for PD).The feature vectors contain the FIG. 3. VQCs for estimating the degree of non-Markovianity N for AD channel (a) and PD channel (c).In each circuit the system qubit (s) is first initialized by the rotation R y (ϕ 0 ).The qubit s then interacts with the environment in a sequence of two interactions with time t i .After each interaction a rotation R y (ϕ i ) acts on the qubit s.The two ancilla qubits (a 1 and a 2 ) simulate the effect of the environment for each interaction, one ancilla for each interaction.In the output, the qubit s is measured in σ z basis.values of the parameters λ/γ 0 (AD) and ατ (PD) and the labels are the corresponding values of N for each channel.
We use 50% of the whole data points (which are chosen randomly) to train the VQC for each channel.For AD channel, we obtained 7.2×10 −6 and for the PD channel we obtained 4.3×10 −5 for the MSE, testing on the whole data points.Figures 3(b) and (d) show the target (dotted red line) and the predicted values (solid blue line) of N versus λ/γ 0 (for AD) and versus ατ (for PD), respectively.For the AD channel, the predicted values are very close to the target values for the full range of λ/γ 0 .For the PD channel, there is a small difference between the target and predicted values of N where N = 0.
Using only one interaction of the qubit with the environment, for the AD channel, we obtained 1 × 10 −4 for the MSE, while for the PD channel, we were not able to obtain a good estimate of N .A single interaction of the qubit with the environment is a nonlinear mapping from the characteristic parameter of the environment (λ/γ 0 for AD and ατ for PD) to the state of the qubit, which is measured by σ z .For the case of AD, one interaction (with a properly chosen interaction time) is sufficient to obtain a reasonable estimate of N , while for the case of PD, only one interaction is not sufficient.After the first interaction with the environment, each value of the characteristic parameter is mapped to a different Bloch vector, from which the nonlinear mapping of the second interaction gives N with high precision.It is worth mentioning that, for the case of PD, we did not obtain a significant decrease in MSE by increasing the number of interactions of the qubit with the environment (up to 5 interactions).
We also considered serial concatenation of AD and PD channels.In this case, we considered 2025 data points in the range [0.1,3] for λ/γ 0 and [0.1, 0.75] for ατ (45 uniformly distributed data points for each range), and defined the estimate of N as to avoid negative values.Training of the circuit is done using 70% of the data points.We obtained a precise estimate of N (7.8 × 10 −6 testing on the The system qubit (s) is first initialized by the rotation R y (ϕ 0 ).The qubit s then interacts with the environment in a sequence of four interactions with time t i .After each interaction a rotation R y (ϕ i ) acts on the qubit s.For each interaction, two ancilla qubits are used to simulate the effect of the environment, one for AD and one for PD.In the output, the qubit s is measured in σ z basis.(b) and (c) show the contour plots of the degree of non-Markovianity, N , and Ň (estimate of N ) versus λ/γ 0 and ατ , respectively.
whole dataset) using a sequence of four interactions of the qubit with the environment.As the dynamics (in this case) depends on two parameters, ατ and λ/γ 0 , a larger number of interactions of the qubit with the environment is required to achieve a precise estimate.After each combined AD and PD interaction a R y (ϕ) gate is applied on the qubit (Fig. 4a).The optimization is done over the interaction times t i , i = 1, ..., 4, the rotation angles ϕ j , j = 0, ..., 4, and the parameters w 0 and w 1 .Note that R y (ϕ 0 ) is the initialization gate and we have taken the interaction time of AD and PD channels to be equal.

V. CONCLUSIONS
In summary, we proposed an experimentally feasible scheme to estimate the degree of non-Markovianity based on entanglement dynamics.We implemented this approach to the paradigmatic models of phase, amplitude damping and combination of both.We assumed that the type of decoherence channel and the range of characteristic parameters of the channel that determine the non-Markovianity of the process are known.In contrast to previous works, the methodology proposed in this work uses variational quantum circuits (through su-pervised learning) to take advantage of the quantum nature of the problem.Based on our physical knowledge we provided a problem-based ansatz that involves a sequence of qubit-environment interactions yielding accurate estimations of the degree of non-Markovianity from measurement outcomes with minimal classical post-processing.Finally, the ansatz proposed here for the variational quantum circuit may be used for other estimation and classification tasks.
) by the oscillations in the expectation value of the Pauli z operator.Figure 1(b)
FIG.3.VQCs for estimating the degree of non-Markovianity N for AD channel (a) and PD channel (c).In each circuit the system qubit (s) is first initialized by the rotation R y (ϕ 0 ).The qubit s then interacts with the environment in a sequence of two interactions with time t i .After each interaction a rotation R y (ϕ i ) acts on the qubit s.The two ancilla qubits (a 1 and a 2 ) simulate the effect of the environment for each interaction, one ancilla for each interaction.In the output, the qubit s is measured in σ z basis.(b) and (d) show the predicted (solid blue line) and target values (dotted red line) of N versus λ/γ 0 for AD and versus ατ for PD, respectively.

FIG. 4 .
FIG. 4. (a)VQC for estimating the degree of non-Markovianity N for the case of combined amplitude and phase damping.The system qubit (s) is first initialized by the rotation R y (ϕ 0 ).The qubit s then interacts with the environment in a sequence of four interactions with time t i .After each interaction a rotation R y (ϕ i ) acts on the qubit s.For each interaction, two ancilla qubits are used to simulate the effect of the environment, one for AD and one for PD.In the output, the qubit s is measured in σ z basis.(b) and (c) show the contour plots of the degree of non-Markovianity, N , and Ň (estimate of N ) versus λ/γ 0 and ατ , respectively.
VI. ACKNOWLEDGEMENTThe authors thank Mauro Cirio for helpful comments on the manuscript.H.T.D. acknowledges support from Universidad Mayor through a postdoctoral fellowship.D.T acknowledges financial support from Universidad Mayor through the Doctoral fellowship.F.F.F.acknowledges support from Fundação de Amparo á Pesquisa do Estado de São Paulo (FAPESP), Project No. 2019/05445-7.A. N. acknowledges financial support from Fondecyt Iniciación No 11220266.R.C. acknowledges financial support from FONDECYT Iniciación No. 11180143.