State Transfer via On-Line State Estimation and Lyapunov-Based Feedback Control for a N-Qubit System

In this paper, we propose a Lyapunov-based state feedback control for state transfer based on the on-line quantum state estimation (OQSE). The OQSE is designed based on continuous weak measurements and compressed sensing. The controlled system is described by quantum master equation for open quantum systems, and the continuous measurement operators are derived according to the dynamic equation of system. The feedback control law is designed based on the Lyapunov stability theorem, and a strict proof of proposed control laws are given. At each sampling time, the state is estimated on-line, which is used to design the control law. The simulation experimental results show the effectiveness of the proposed feedback control strategy.


Introduction
Quantum control theory has attracted considerable attention both theoretically [1][2][3][4][5][6] and experimentally [7,8]. Most studies of quantum control are concerned with transferring the state of the system to a desired final state [9,10]. Quantum Lyapunov control (QLC) has been widely studied to control quantum systems for state preparation [11,12], trajectory tracking [13,14] and state transfer [15][16][17] with different Lyapunov functions [18,19]. In QLC, the control laws are designed by keeping the first-order time derivative of a selected Lyapunov function less than zero. The selection of the appropriate Lyapunov function is tricky, where different Lyapunov functions make different control effects. The best approach is to use some special geometric or physical meanings of the system to design the Lyapunov function. The most common Lyapunov functions are: Lyapunov function based on the state distance, on the average value of an imaginary mechanical quantity, and on the state error [18]. In [15,20] the control laws are designed using the distance-based Lyapunov function, and the conditions are obtained for the asymptotic stability of the closed-loop system by linearizing the unitary operator of the state. Using the QLC feedback control, one can achieve more accurate control performance. However, it should use the system's state, which needs to be estimated on-line.
Quantum state estimation (QSE) is a useful tool which describes the characterization of the state of a quantum system [21]. To estimate the state of the system, one needs to apply appropriate measurements on the system and reconstruct the state based on the results of the measurements by an estimator algorithm. Different measurements and estimation methods have been well studied in the field of QSE. For instance, projective measurement [22,23], continuous weak measurement [24][25][26] and sequential unsharp measurement [27], which have been used with estimation approaches such as maximum likelihood or Bayesian method to reconstruct the initial state of the measurement processes [28,29]. These methods have been widely used in experiments [30,31]. Compressed quantum tomography, based on techniques from compressed sensing [23,32], reduces the required number of measurements to reconstruct the state. In classical control theory, one gets the best estimation of the state of the system at each time and uses the results of the estimation for controlling a closed loop system. The same feedback control is possible for quantum feedback control by using OQSE [33]. On-line quantum state estimation (OQSE) is a continuous state estimation at any moment by using continuous weak measurements with the help of some optimization algorithms. In OQSE, the results of continuous measurements are used to reconstruct the state of the system at any time. The measurement operators should be designed based on the dynamic equation of the system which changes over time. In [34], the authors proposed a quantum state estimation scheme and employed a continuous measurement protocol to perform QSE on the seven-dimensional, F = 3 atomic hyperfine spin manifold, in an ensemble of cesium atoms. Then a state-to-state quantum mapping performance estimation based on the continuous weak measurement is achieved, as well as the optimal control technology design and implementation [35]. By using non-destructive measurements and the dynamics of the system, at the end of the estimation procedure, the state of the system was reconstructed. Hence, the result of OQSE can be used for real-time state feedback control. The dynamic of the open quantum system can be described using the Lindblad-type Markovian master equation [36]. In Markovian quantum control, any time delay is ignored and a memoryless controller is assumed. The measurement record is immediately fed back onto the system to alter the system dynamics [37].
In this paper, we propose a Lyapunov-based state feedback control based on the OQSE, to transfer the state of a N-qubit system to a desired final state for a Markovian open quantum system. The measurement operators for the N-qubit system are derived, which are indirectly acted on the controlled system and change as the time. The quantum state is estimated on-line based on the continuous weak measurements and compressed sensing, and the state feedback control law is designed based on the Lyapunov stability theorem, which is used to transfer the state of N-qubit Markovian system from an initial state to a desired final state. The control laws based on the Lyapunov stability theorem are designed with variable control parameters.
The layout of the paper is as follows. We derive the process of N-qubit OQSE in Section 2. Then, we design the Lyapunov-based feedback control based on on-line estimation in Section 3 and the numerical simulation is in Section 4. Finally, Section 5 presents the conclusions.

N-Qubit OQSE Establishment
In OQSE, the results of continuous weak measurements are used to reconstruct the state of the system in real time with compressed sensing theory. The measurement operators are derived by means of the weak measurement and the dynamic equation of the system. At each instant time, one can obtain the records of the expectation values with some measurement operators by the indirect results of continuous weak measurements. The estimated state can be obtained by solving convex optimization problem with physical constraints.
The n-dimensional dynamics of open quantum system can be described as where ρ(t) is the density matrix of the system which is a 2 N × 2 N matrix, N the number of qubits and n = 2 N the dimension of the system; H(t)the total Hamiltonian of the system, and H(t) = H 0 + ∑ m j=1 U j (t)H j ; H 0 is the free Hamiltonian of the system, and H j is the control Hamiltonian. Let D[L, ρ] = LρL † − (1/2) L † Lρ + ρL † L , which is the decoherence effect of the measurement process, and manifests as the drift term of the Lindblad form.
For the continuous weak measurements of a two-level quantum systems, the measurement operator group contains two operators: m 0 (∆t) and m 1 (∆t) as [33] where ∆t is the time for measurement and L is a Lindblad operator as where ξ is the strength of the measurement, and the operator B is chosen from the Stokes measurements set in this paper as: The discrete-time dynamic equation of the open quantum system is: For N-qubit state estimation, one usually needs to use 2 N measurement operators, which are calculated by tensor products of m 0 and m 1 given in Equation (2): The corresponding discrete-time dynamic equation of continuous weak measurement operators for N-qubit is: The reconstruction problem of density matrix ρ is transformed into the following optimization problem: min ρ * s.t. y = A.vec(ρ), where ρ * is the nuclear-norm of estimated density matrixρ, vec(·) represents the transformation from a matrix to a vector by stacking the matrix's columns in order on the top of one another. The vector y and matrix A can be expressed according to the current measurement configurations as: and where M(l) , l = 1, 2, ..., K is the corresponding measurement value in the l-th measurement; the sampling vector y is the vector form of the corresponding observation values M(l) ; and K is the selected number of measurements to estimate the state of the system accurately at each sampling time. The estimator needs to estimate density matrix parameters, which are d 2 elements of density matrix for a d-dimensional Hilbert space. Hence the maximum amount of K is d 2 . To limit the number of measurements, we define the measurement rate as: where K is the number of measurements used in the state estimation and d is the dimension of Hilbert space. Hence, at each sampling time, we choose the last K number of measurements and discards the others. The measurement rate is proportional to the number of measurements and when β = 1(K = d 2 ) the measurement set is an informationally complete set; and when the number of measurement outcomes is less than the number of elements K < d 2 , the measurement set is called an informationally incomplete set.
To solve the optimization problem, we use the non-negative least squares estimator of minimizing the 2-norm under the positive definite constraint: To solve Equation (11) we used CVX, a package for specifying and solving convex programs [38,39].
In this paper, we use fidelity as the performance of OQSE which is defined as the trace between actual state and estimated state as: whereρ(t) is the estimated state and ρ(t) the actual state of the system at sampling time t. Generally, fidelity F ∈ [0, 1] measures how much two states overlap each other. A fidelity of 1 means the states are identical, whereas the fidelity of 0 means the states are orthogonal.

Lyapunov-Based State Feedback Control
In this section, we propose the Lyapunov-based state feedback control to transfer the state from given initial state to the desired final state of Markovian open quantum systems. The control laws are designed based on the Lyapunov stability theorem and the theoretical proof is given. (1) If |T 2 | > θ, then the designed control law is U 2 = −C / T 2 to compensate C and U j =1,2 = −K j .T j where K j is a positive tunable number that satisfiesV = ∑ j =1,2 −K j .T 2 j < 0. In this case, the control laws which can make the control system asymptotically stable are:

Theorem 1. For the dynamics equation of controlled system Equation
. . .
(j) If |T 2 | < θ, . . . and T j > θ , we designed the control law U j to counteract the drift C. Therefore, the control laws, which can make the control system asymptotically stable, become: . . .
(m) If |T 2 | < θ , . . . , and |T m | > θ , we designed the control law U m to counteract the drift C. In this case, the control system becomes asymptotically stable by setting control laws as: . . , and |T m | < θ , the control laws which can make the control system asymptotically stable are: where g is a small positive number.
Proof of Theorem 1. Based on the Lyapunov stability theorem, one needs to select a scalar function V(X) with continuous partial derivatives which satisfies following conditions: (a) V(X) is a positive definite, V(x) ≥ 0; (b) the first order time derivative of the Lyapunov function is negative:V(x) < 0. We select the trace distance as the Lyapunov function Trace distance measures the closeness of two quantum statesρ and ρ f . In the feedback control system, we need to make the amount of trace distance as small as possible to make sure that the system reaches the desired final state ρ f .
The first time derivative of the Lyapunov function V can be calculated as: where T j = tr i H j ,ρ(t) ρ(t) − ρ f , j = 1, 2, . . . , m is a real function of the real time estimated stateρ(t) at time t; C = tr (D [L,ρ(t)] − i [H 0 ,ρ(t)]) ρ(t) − ρ f is a drift term which its sign cannot be determined.
By setting first control Hamiltonian equal to free Hamiltonian of the system H 0 = H 1 , with control law U 1 = −1, the effects of free Hamiltonian of the system is compensated H(t) = H 0 − H 1 + . . . U j (t)H j + . . . + U m (t)H m = U 2 (t)H 2 + . . . + U m (t)H m . Now one needs to design the control laws to transfer the state to the desired final state.
In each case of control law design, two crucial tasks should be done. (i) to compensate the influence of the drift term C. (ii) make sure thatV(ρ(t), t) < 0 holds. Hence, in each case of control law design, we compare T j with a small positive number θ = 0.0005. If T j > θ the control law U j choose to counteract the drift term C, as U j (t) = −C T j ; and other control laws are designed to hold theV(ρ(t), t) < 0, as U j (t) = −K j .T j where K j is a positive tunable number that satisfieṡ V = ∑ j −K j .T 2 j < 0. By applying the designed control laws, the first time derivative of the Lyapunov function V in Equation (18) becomes: If none of the conditions in cases j = 1, ..., m satisfied, we need to apply a disturbance to the system. In case (m + 1) where |T 2 | < θ , . . . , and |T m | < θ , means T j ≈ 0 and the system is in a stable point. In N-qubit system, there are two stable points ρ st1 = diag ([1, 0]) ⊗N and ρ st2 = diag ([0, 1]) ⊗N . When the system is in one of these stable pointsρ(t) = ρ st1 orρ(t) = ρ st2 , the first derivative of the Lyapunov function becomes always equal to zeroV = tr ˙ρ (t) ρ(t) − ρ f (t) = 0 . In this case, we apply a disturbance to the system to bring it out of the stable point as given in Equation (16).
The detailed control procedure is given in Algorithm 1.

Algorithm 1 Pseudocode of state transfer based on OQSE and QLC
Require: Initialize variables L in Equation (3) Set Calculate continuous measurement operators as in Equation (6). 4: Find the state of the system ρ(t) as in Equation (5). 5: Find the estimator variables y(l) and M(l) as in Equations (8) and (9). 6: Find the estimated state ρ e by solving Equation (11) with CVX optimization. 7: Find the performance of estimation (fidelity) as in Equation (12). 8: Calculate the variables of Lyapunov function T j , C as in (18). 9: Set the control laws U j (t) as Equations (13)-(16). 10: Find state distance V as in Equation (17). 11

: end for
Steps 3 to 7 are related to OQSE and steps 8 to 10 are related to QLC. We note that at each sampling time, according to the designed control laws, a new Hamiltonian is defined (step 2 of the algorithm). Otherwise, the decoherence effect of the measurement process as defined in Equation (1), reduces the off-diagonal elements of the density matrix and leads the state to a maximally mixed state.

Numerical Simulations and Results Analyses
In this section, the experimental simulation results and analysis for N-qubit state transfer based on OQSE are given. In the simulation experiments we assume that each qubit is in the initial eigenstate ρ in = diag ([0, 1]), and the desired final eigenstate is ρ f = diag ([1, 0]). The initial and final states of N-qubit system are: The free Hamiltonian and control Hamiltonians are defined as: where σ i=1,2,3 are Pauli matrices as σ To compensate for the effects of the free Hamiltonian of the system H 0 , we design the first control Hamiltonian equal to free Hamiltonian of the system H 1 = H 0 with control law U 1 = −1. The other control Hamiltonians are set along x and y axis with designed Lyapunov control laws, given in Theorem 1 to transfer the state to the desired final state.
The weak measurement initial operator is set as: where B i are chosen from stokes measurement set given in Equation (4). First, we do the experiment for a two-qubit system. The parameters for OQSE and Lyapunov control of two-qubit system are set as: the number of control fields is m = 4, with the free Hamiltonian H 0 = σ z ⊗ σ z and the control Hamiltonians as ; the first control law is fixed as u 1 = −1 at all sampling times to compensate the effects of free Hamiltonian of the system; the control law parameters are set as K 2 = 16, K 3 = 25, K 4 = 30, g = 0.25; the measurement strength is set as ξ = 0.7 , the Lindblad operator as L = ξB 3 , and the initial weak measurement operator as M(0) = B 3 ⊗ B 3 . The measurement rate is set as β = 0.25, which means at each sampling time, the last four measurements and corresponding results are used in the optimization algorithm.
Fidelity between actual state and estimated state is calculated according to Equation (12), and trace distance between estimated state and the desired final state as Equation (17). The behavior of fidelity, state distance and the control law parameters are given in Figure 1. We note that the fidelity evaluates the performance of the state estimation by comparing actual state and estimated state, and trace distance evaluates the performance of the transfer control by comparing the estimated state and the desired final state. As Figure 1 shows, at sampling time 4, the amount of fidelity is close to 1, which means the OQSE estimates the state accurately; but the amount of trace distance is 0.22, which means the system could not reach the desired final state yet. After sampling time 11, the trace distance between the estimated state and the desired final state becomes less than 0.01; and after sampling time 40 the trace distance becomes less than 0.001. As Figure 1c depicted, the amount of first control law U 1 is always equal to −1 to compensate the effects of free Hamiltonian of the system and the other control laws are designed according to Lyapunov control method in Theorem 1.
To show the evolution of the state during the sampling times, Figure 2 shows the density matrix of the two-qubit system at 8, 20 and 100 sampling times. As one can see from Figure 2, at sampling time 8, the state is far from the desired state (the trace distance is 0.61); however, as the sampling times increase, the state becomes closer to the desired final state. In a way, the density matrix at sampling time 20 becomes closer to the desired final state with trace distance 0.02; and at sampling time 100, the state is exactly same as the desired final state with trace distance 0.001. Now we do the simulation experiment for a three-qubit system. The parameters for OQSE and Lyapunov control of three-qubit system are set as: the number of control fields m = 5, where the free Hamiltonian is H 0 = σ z ⊗ σ z ⊗ σ z and the control Hamiltonians are set as H 1 = σ z ⊗ σ z ⊗ σ z , which is same as free Hamiltonian with U 1 = −1 to compensate the effects of free hamiltonian, H 2 = σ y ⊗ (σ x + σ y ) ⊗ σ y , H 3 = σ x ⊗ σ x ⊗ σ y , H 4 = σ x ⊗ σ x ⊗ (σ x + σ y ) and H 5 = (σ x + σ y ) ⊗ σ x ⊗ σ y ; the control law parameters are set as K 2 = 25, K 3 = 28, K 4 = 22, K 5 = 30 and g = 0.25; the measurement strength is set as ξ = 0.7 , the Lindblad operator as L = ξB 3 , and the initial weak measurement operator as M(0) = B 3 ⊗ B 3 ⊗ B 3 . The measurement rate is set as β = 0.25, which means at each sampling time, the last 16 measurements and corresponding results are used in the optimization algorithm. The behavior of three-qubit state transfer control performance is given in Figure 3.  As Figure 3 depicts, the OQSE reaches the amount of fidelity more than 99% at sampling time 8; and the trace distance between estimated state and the desired final state becomes less than 0.01 at sampling time 24, and becomes less than 0.001 after sampling time 80. Compare with two-qubit system, for three-qubit system the feedback control needs longer sampling times to bring the state close to the desired final state. Two-qubit system trace distance is less than 0.01 after sampling time 11, but for three-qubit system, it happens after sampling time 24. Hence, we can conclude that for higher number of qubits, one can reach the desired final state in longer sampling times.
It is worth noting that the proposed state transfer control is applicable for any arbitrary initial and final states. However, one needs to find the suitable control parameters: control law parameters, Hamiltonians, measurement operators, measurement strength, Lindbald operator and initial measurement operator, for each initial and final states.

Conclusions
We designed the N-qubit state transfer control via OQSE and Lyapunov feedback control. The continuous weak measurement operators are designed based on the dynamic evolution of the system to estimate the state of the system in real time by compress sensing estimator. The control laws have been designed based on the Lyapunov stability theorem. The designed control laws can effectively achieve the state transfer of a N-qubit Markovian system from a given initial state to the desired target state. Fidelity between actual state and estimated state is defined to study the performance of the OQSE; and trace distance between estimated state and the desired final state is defined to study the performance of the state transfer control.