{'fraction_non_alphanumeric': 0.036799294394355156, 'fraction_numerical': 0.008183065464523716, 'mean_word_length': 4.206377551020408, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 11, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Bellman equations for optimal feedback control of qubit states

Using results from quantum filtering theory and methods from classical control theory, we derive an optimal control strategy for an open two-level system (a qubit in interaction with the electromagnetic field) controlled by a laser. The aim is to optimally choose the laser's amplitude and phase in order to drive the system into a desired state. The Bellman equations are obtained for the case of diffusive and counting measurements for vacuum field states. A full exact solution of the optimal control problem is given for a system with simpler, linear, dynamics. These linear dynamics can be obtained physically by considering a two-level atom in a strongly driven, heavily damped, optical cavity.


Introduction
The advent of quantum information theory and the ever increasing experimental possibilities to implement this theory on real physical systems e.g. [2], [13], has created great demand for a theory on the control of quantum systems. Since qubits, i.e. two-level quantum systems, make up the hardware for quantum information processing, one important question is how to optimally control or engineer their states. Many problems of quantum computation can be formulated in terms of quantum optimal control of unitary or decohering gates. Most previous work on the optimal control of qubit states use an open loop strategy with a variational calculus approach to optimization [18], [22], [19]. However, in order to apply controls one must consider the qubit as an open quantum system which gives the possibility for time-continuous non demolition measurements and thus a closed (feedback) loop strategy would be more advantageous. In this paper, we employ a feedback strategy using dynamic programming which is a globally optimal solution to the control problem and thus extends the previous locally optimal variational approaches.
The importance of feedback control theory in the control of open quantum systems was first recognized by Belavkin in [5]. Like in the classical case with partially observed systems, a feedback control strategy is usually favorable to the open loop control (without feedback). Optimal feedback control strategies for the open quantum oscillator appeared even earlier in [3] and a quantum Bellman equation for optimal feedback control was introduced in [6] for a general diffusive and a counting measurement process. An interest in optimal quantum control and stability theory has recently emerged in the optics community [12], [21], [14].
As it was shown in the above papers, since we never have complete observability of quantum systems, the problem of quantum feedback control must involve a filtering procedure in order to measure and control the system optimally. We can separate these two problems as was suggested in [5] and consider first the problem of quantum filtering [4], [6], [7], [8], [10]. In quantum filtering theory pioneered by Belavkin in [3]- [6], the quantum filtering equation for the system with a chosen continuous non demolition measurement has to be derived. A system observed through its interaction with the electromagnetic field by continuous measurement of some field observables, needs to be updated continuously in time to incorporate the information gained by the measurement. That is we have to condition the quantum state of the system on the obtained measurement results continuously in time. The quantum filtering equation as it was first introduced in [4], [6] is a stochastic differential equation for the conditioned state in which the innovation process, representing the information gain, is one of the driving terms. Like in the quantum optics literature, we take the filtering equation as our starting point, however, the driving Wiener process is not treated as the noise, but as an innovation process. For more background on the derivation of this stochastic equation as a general filtering equation in an open quantum system conditioned with respect to a non demolition observation, see [7], [8], [10].
Once the quantum filtering equation is obtained, we are left with a classical control problem. In particular, if the state of a qubit is parameterized by its polarization vector in the Bloch sphere, i.e. a vector in the 3-dimensional unit ball providing sufficient coordinates for the system [5], the filtering equation provides stochastic dynamics for the polarization vector. The control is present in the dynamics through Rabi oscillations, which perform rotations of the polarization vector in the Bloch sphere caused by a laser driving the qubit. The phase and intensity of the laser are the parameters that can be controlled.
The main aim of this paper is to demonstrate the relevance of classical control and quantum filtering when controlling quantum systems. This is shown by the example of optimal control of a two-level quantum system. A cost function, which is a measure of optimality of the control, is introduced and the corresponding Bellman equations are derived for this system. From these equations, we produce an optimal control strategy which depends on the solutions to the corresponding Hamilton-Jacobi-Bellman equation. In general these solutions are very difficult to find, even numerically, so we resort to a physically motivated simplification of the dynamics by considering a qubit in strongly driven, heavily damped, optical cavity. This enables us to present an exact solution to the control problem.
The remainder of the paper is organized into four main sections. Firstly we describe the model and introduce the dynamics of the polarization vector from the filtering equation for diffusive and counting measurement for an initial vacuum field state. The next section describes the principle of optimality which is the key idea behind optimal feedback control and enables us to derive the Bellman equations in Section 4. We finish the paper with the simpler model corresponding to a two-level system in a strongly driven, heavily damped, optical cavity. Here we obtain a linear filtering equation, which we use with a quadratic cost function to give an exact solution for the optimal feedback control strategy.

The model and state dynamics
We consider a two-level system, i.e. a qubit, in interaction with the quantized electromagnetic field in the weak coupling limit [11], [1]. This means that the unitary dynamics of the qubit and the field together in the interaction picture is given by a quantum stochastic differential equation (QSDE). In this way the field acts as non-commutative noise on the qubit. The initial state of the noise (electromagnetic field) is taken to be the vacuum state and the reduced dynamics of the qubit is given by a master equation. Such a quantum Langevin model was the starting point of the quantum stochastic theory of continuous non demolition measurements developed in [4]- [7].
We control the state of the qubit by its interaction with a laser beam. This laser beam is given by a channel in the field, called the forward channel, which is in a coherent state ψ(u), where u is a square integrable complex valued function of time. The control function u induces Rabi oscillations which we must choose carefully to rotate the state of the qubit in the desired manner. The rest of the field is called the side channel. We assume that there is no direct scattering between the two channels. Following [6] and [7], we consider two different continuous time measurement schemes to be performed in the side channel. The first measurement scheme we consider is a homodyne detection experiment which measures the field quadrature Y t = A * s (t) + A s (t) which is a classical diffusive observable process at the output of the quantum system. The second scheme is a counting experiment, counting the number Y t = N t of fluorescence photons emitted by the qubit up to time t.
Since the side channel and atom are in interaction, we gain information on how the state of the qubit changes from the measurement results of the homodyne detection experiment or the counting experiment. The state of the qubit conditioned on the measurement result ω of the non demolition output process Y t is a random state. This means it is a map ρ t • from the possible paths of measurement results Ω to the 2 × 2-density matrices, mapping ω ∈ Ω to the density matrix ρ t ω which represents the state of the qubit conditioned on a path of measurement results ω up to time t. Note that for homodyne detection, a path ω of measurement results is just the path of the photocurrent from time 0 to time t. For the counting experiment a path of measurement results is given by the collection of times at which photons were detected.
The conditional state evolution of the qubit is given by a classical stochastic differential equation for the density matrix ρ t • called the quantum filtering or Belavkin equation [6], [8], [10]. For the homodyne detection experiment we take the quantum filtering qubit equation derived in [8] with respect to the diffusive output process Y t , as our starting point and κ 2 s is the decay rate into the side channel. Furthermore, the Lindblad term L is given by with time dependent controlling Hamiltonian and with V f := κ f V where κ 2 f is the decay rate into the forward channel. We choose units such that κ 2 s + κ 2 f = 1. The form of the Hamiltonian physically relates to two orthogonal control fields corresponding to the real and imaginary parts of the complex control function u(t). The innovating martingale (second line of (1)) is just a Wiener process W t which describes the information gain from the measurement, i.e. the observed process Y t satisfies the stochastic differential equation and the Belavkin diffusion filtering equation (1) can be written as a stochastic master equation For a ∈ R 3 we introduce the notation σ(a) := a 1 σ x + a 2 σ y + a 3 σ z , where σ x , σ y and σ z denote the Pauli spin matrices. The states of a qubit can be parameterized by vectors in the Bloch sphere B := {p ∈ R 3 ; ||p|| ≤ 1}. The random vector with which we parameterize the state ρ t • is denoted P t and is called its polarization vector, i.e. we write Introducing u + t := κ f Re(u(t)) and u − t := κ f Im(u(t)) we can write the filtering equation (5) as For the counting experiment, the Belavkin filtering equation derived in [6] reads as where L and V s are given by (3) and (2), and N t is the random variable counting the number of detected photons up to time t. In parameterized form this reads 3 The principle of optimality In order to find an optimal quantum feedback control strategy based on the continuous non demolition observation we shall use the dynamic programming method for the sufficient qubit coordinate P t as it was suggested in [5].
At time t = 0 the qubit is taken to be in a known initial state P 0 . It is our objective to bring it in the σ z -up state at time t = T , at which the control experiment is stopped. This is done by choosing the laser intensity and phase, given in terms of u + t and u − t , at every time t which may depend on the stochastic state P t of the qubit at time t, via a feedback mechanism. The total cost of the control experiment from time 0 up to time T is described by The first term reflects our main objective which is to bring the system in the σ z -up state at time T , whereas the second term reflects the cost for using the laser. The second term restricts our resources. Without this restriction it would be possible to apply brute force, e.g. a very strong laser pulse at the end of the experiment, to obtain our goal.
Note that the total cost J of equation (8) is a random variable. It depends on the stochastic measurement results through the random variable P T z and the applied controls u + t and u − t , which in their turn depend on the random state P t of the qubit. From equation (8) it follows that the expected cost-to-go J(t, P t ) at time t when we are in the state P t at time t, is given by where E P t denotes the expectation over all possible paths of measurement results conditioned on the fact that we are in state P t at time t. The problem addressed in this paper is how to choose the feedback controls u + t and u − t at every time t, such that the total expected cost J(0, P 0 ) (= E P 0 [J]) is minimal. The solution to this problem, i.e. a map µ * : [0, T ] × B → R 2 assigning numbers u + t and u − t to every time t and state P t that minimize J(0, P 0 ), is called an optimal strategy. Here the star * in µ * denotes optimality of the strategy. Extending this convention we denote the minimal or optimal cost by J * (0, P 0 ).
A key observation in this problem is that if we have a strategy µ * [s,T ] , 0 < s < T that is optimal over the interval [s, T ] (i.e. one which minimizes J(s, P s ) for every possible state P s at time s) then the optimal strategy µ * of the whole experiment coincides with µ * [s,T ] when restricted to the interval [s, T ]. So we optimize over disjoint intervals, working backwards in time to build an optimal strategy for the whole experiment. This idea is called the principle of optimality [9] and lies at the heart of optimal feedback control theory.
Iteration of the principle of optimality enables a recursive solution to the optimal control problem known as dynamic programming [9]. To illustrate this method we divide the time interval [0, T ] into N parts of equal size ∆ := T /N . The principle of optimality leads for 0 ≤ n < N to the following recursive dynamic programming equation [9], [17] J * (n, P n ) = min with boundary condition J * (N, P N ) = 1 − P N z . Using the state dynamics, P n+1 can be expressed in terms of P n , u + n and u − n . The minimization of (10) working backwards from n = N − 1 to n = 0 yields the optimal control strategy (u + n , u − n ) = µ * (n, P n ).
In the next section we derive a partial differential equation for the expected optimal cost to go J * by studying equation (10) with boundary condition J * (T, P T ) = 1 − P T z in infinitesimal form This is done by using the state dynamics for P t+dt and by subsequently expanding J * up to the correct order according to Itô's formula. Solving the obtained partial differential equation is equivalent to running the dynamic programming algorithm and therefore provides a solution to the optimal control problem.

Bellman equations
In this section we first consider the case where we are measuring the field quadrature Y t = A * s (t) + A s (t) by a homodyne detection scheme. The dynamics are given by equation (6). According to Itô's formula we have where ∂ µ denotes partial differentiation of J * (t, P t ) with respect to P t µ and ∂ 2 µν denotes partial differentiations with respect to P t µ and P t ν where we assume that J * is suitably differentiable. Using the state dynamics (6), the differentials dP t µ can be expressed in terms of dt and dW t and products of differentials can be evaluated using Itô's rule dW t dW t = dt. Since the expectation of the innovating martingale is zero, i.e. E P t [dW t ] = 0, equation (11) simplifies a great deal by substituting J * (t + dt, P t+dt ) = J * (t, P t ) + dJ * (t, P t ) and using (12) to obtain with boundary condition J * (T, P T ) = 1 − P T z . In control theory, equation (13) is known as the Bellman equation and it was introduced into quantum feedback control theory in [6].
We evaluate the minimum in the Bellman equation (13) by completing the squares on u + t and u − In this way we find an optimal control strategy in terms of the partial derivatives of the optimal expected cost-to-go, given by where the optimal expected cost-to-go J * is the solution to the following second order non-linear partial differential equation with boundary condition J * (T, P T ) = 1 − P T z . This type of equation is called a Hamilton-Jacobi-Bellman (HJB) equation. However, even finding a numerical solution to this equation is still a very hard problem which is beyond the scope of this paper. In the following section we will look at a system with much simpler dynamics for which we can actually solve the HJB-equation.
In the remainder of this section we turn our attention to the situation where we count photons in the side channel. We consider the same problem as before, i.e. we want to find optimal controls u + t and u − t depending on P t for each time t, such that the total expected cost J(0, P 0 ) of equation (9) is minimal. Since N t is a jump process, we use the Itô rule dN t dN t = dN t and the Itô formula for calculating dJ * (t, P t ) has also changed. Using the dynamics (7) we find where Q t in the difference term is given by Starting from the equation (11), using J * (t + dt, P t+dt ) = J * (t, P t ) + dJ * (t, P t ), Itô's formula (16) and the fact that E P t dN t = κ 2 s 2 1 + P t z dt, we find the following Bellman equation for the photon counting case (cf. [14]) where the partial derivatives are all evaluated at (t, P t ) and the boundary condition is J * (T, P T ) = 1 − P T z . Completing the squares leads again to an optimal control strategy given by equation (14), where J * in the case of photon counting has to satisfy the following HJB equation with boundary condition J * (T, P T ) = 1 − P T z . Solving this equation is again beyond the scope of this paper.

A simpler model
As we have discovered in the previous section, realistic optimal control problems usually lead to very difficult Bellman equations. In this section we will study a drastically more simple model with linear dynamics given by with α a real constant and In parametrised form equation (18) reads as The dynamics of equation (18) corresponds to a two-level atom in a strongly driven, heavily damped, optical cavity as in [20], [21]. The cavity field is assumed to be far off resonance with the atomic transition. The cavity is aligned along the z-axis and instead of controlling with a laser beam as in the previous sections, we now control the atom with an external magnetic field B t aligned along the z-axis. At the output of the cavity we measure the quadrature Y t = i(A * (t)−A(t)) by a homodyne detection scheme. Adiabatic elimination of the cavity dynamics [20] then leads to the dynamics of equation (18). The constant α is determined by properties of the cavity and the probe beam [20].
From the dynamics (18) it follows that dP t z = 0 and furthermore we have x 2 + P t y 2 = 2P t x dP t x + dP t x dP t x + 2P t y dP t y + dP t y dP t y = 0, which satisfies (22) as is easily checked. Equation (21) now easily leads to an optimal control strategy given by Summarizing, at time t we have a found measurement result ω, integrating the dynamics (20) we find the state Θ t (ω) and from equation (23) we can determine the optimal control field B t (ω) to be applied at time t.

Discussion
In this paper we have studied the feedback control of a qubit in interaction with the electromagnetic field. The Belavkin quantum filtering equation has been our starting point. Introducing the Bloch vector P t as a sufficient statistic, as suggested in [5], we obtained generally non-linear equations for the dynamics. In these equations the laser's phase and amplitude, represented by u + t and u − t , entered as the control parameters. The goal of the control was presented by a cost function J. We proceeded by using the method of dynamic programming [9] to find the optimal feedback control strategy. In infinitesimal form the dynamic programming algorithm leads to the HJB-equation for the optimal cost-to-go function J * . The optimal control strategy can be expressed in terms of the solution to this equation.
Since the filter equation in general provides non-linear dynamics the resulting HJB-equation is often very difficult to solve and we have kept this outside the scope of this article. Linear dynamics are obtained for systems in which the interaction with the environment is essentially commutative [15]. This means the qubit couples only to one classical noise of the field. The linear dynamics are obtained only when the observed process Y t is exactly this classical noise in the field. In the last section of the article we have studied an example of a system for which the dynamics are linear. Together with the quadratic cost function this lead to an HJB-equation that could be solved exactly, providing an explicit expression for the optimal control strategy.