1 Introduction

The concept of controlling quantum physical systems, which emerged towards the end of the last century following the advent of laser technology [1,2,3,4,5,6,7], has become a cornerstone of quantum information theory and quantum technology. The field of quantum control has expanded significantly, both theoretically and experimentally, in recent years [8,9,10,11,12]. Theoretical advancements have introduced a variety of methods to exert control over quantum systems, such as optimal control theory [13, 14], Lyapunov control [15,16,17], learning control algorithms [18], and robust control methods [19]. Optimal quantum control, in particular, focuses on finding a control input that ensures the closed-loop stability of the quantum system while optimizing a predefined cost function [4]. The objective here is to identify a controller that can transition the quantum system from an initial state to a predefined desired state [4]. Historically, this has been approached by optimizing a cost function, typically the expected value of a predefined target operator [4]. To this end, several numerical algorithms have been developed for optimizing quantum control systems, notably the Krotov method [20] and the rapid, monotonically convergent iteration methods by Rabitz et al. [21,22,23,24]. Initially applied to manipulate transition probabilities between molecular system’s bound states [21], these methods have evolved to address a wider range of target operators [22].

The concurrent development of feedback control methods for quantum physical systems has seen the incorporation of optimal estimations of dynamical variables from measurement records [25]. When Gaussian measurement noise is assumed, the resulting quantum mechanical cost function exhibits a linear and quadratic form analogous to that found in classical systems [25]. This resemblance has permitted the extension of classical linear quadratic Gaussian control theory to the realm of quantum systems [25, 26]. However, despite the method’s success and its substantial applications, it is pertinent to note that its applicability is limited to specific systems and is contingent upon certain assumptions.

Building on the foundations laid by earlier research, the domain of quantum control has recently turned its focus towards the manipulation of spin systems due to their pivotal role in quantum optics and quantum information theory [27, 28]. Innovations in this area have seen the use of radio-frequency pulses within coherent spectroscopy to adeptly navigate the state transitions within spin systems [27]. Furthermore, strategies have been devised for the control of ensembles of spin systems with uniform distribution, with subsequent explorations extending to Gaussian distributions [28]. The continuous advancement of quantum control strategies attests to the field’s vibrant and complex character, constantly presenting new challenges and paving the way for inventive research and technological breakthroughs. This progressive trend underscores a broader commitment within the field to refine and expand control methodologies to meet the nuanced demands of quantum systems.

Despite the significant advancements made in quantum control, a pervasive challenge across existing methodologies is their reliance on deterministic cost functions, which do not fully account for the intrinsic noises and uncertainties prevalent in quantum systems. This oversight can lead to control strategies that, while theoretically sound, may falter under the unpredictable conditions of real-world applications. In response, our study introduces a paradigm shift in quantum control by proposing a methodology that inherently accommodates the complex uncertainties characteristic of quantum systems in noisy and uncertain environments. The cornerstone of our approach is the redefinition of the cost function as the distance between the probabilistic distributions describing the dynamics of the quantum system and the external control field, and a desired distribution that encapsulates the target system behavior. This approach, which characterizes system evolution through probability density functions (pdfs), offers a holistic view of the system’s behavior, allowing for a more accurate representation of its evolution amidst uncertainties. By leveraging distance measures between pdfs, a concept well-established in classical control theory [29,30,31,32,33,34], our method transcends traditional constraints, offering a robust framework for optimizing control strategies in the intricate domain of atomic-scale systems. This innovative approach not only addresses the limitations of previous quantum control techniques but also paves the way for the development of more resilient control strategies that are better suited to the realities of quantum technology applications.

The adaptation of a fully probabilistic control methodology to quantum systems introduces significant challenges. Quantum systems, distinguished by complex random variables in their time evolution, differ fundamentally from classical systems which are defined by real random variables. This necessitates the use of complex probability density functions to accurately describe quantum dynamics, diverging from the classical norm of real distributions. Furthermore, quantum systems are inherently influenced by their environment, leading to dissipation effects that add layers of complexity to their control. To manage this, our approach incorporates the Liouville–von Neumann equation, enhanced with a Lindblad term, to effectively model the interaction between the quantum system and its surroundings. Additionally, the derivation of optimal control laws for quantum systems faces hurdles, as conventional assumptions applicable in classical mechanics, such as non-perturbative information extraction, are not directly transferable to quantum contexts. While this paper does not delve into the complete resolution of this challenge, it suggests a prospective pathway through the incorporation of an additional Lindblad term, analogous to the method employed for addressing system-environment interactions. These integrated strategies collectively establish a comprehensive framework, facilitating nuanced control over quantum systems and bridging the gap between theoretical principles and practical implementation.

Our study introduces a transformative approach to quantum physical systems control, marking a departure from mere incremental advancements in existing methods. The proposed methodology is distinguished by several key features that underscore its novelty and significance. Firstly, unlike conventional quantum control approaches that may overlook the complexities introduced by factors like sensor noise and measurement inaccuracies, our method fully integrates these sources of uncertainty. This comprehensive consideration ensures a more accurate representation of real-world quantum system dynamics, offering a robust solution that is reflective of actual operating conditions. Secondly, a pivotal achievement of our research is the derivation of a closed-form solution for the optimal control law applicable to quantum systems characterized by arbitrary probability density functions (pdfs). This advancement facilitates an analytical framework specifically for systems described by Gaussian pdfs, contrasting sharply with the iterative or numerical solutions prevalent in current practices. This analytical approach simplifies the controller design process and broadens the spectrum of quantum systems amenable to control. Lastly, the method diverges from the traditional necessity for a positive definite target operator to guarantee the convergence of the objective function, a constraint common in many current methodologies. This flexibility allows for a wider array of quantum control problems to be effectively tackled, thereby enhancing the method’s applicability and utility. In essence, the methodological innovation presented in this research encompasses a holistic acknowledgment of quantum system dynamics, offers an analytical solution where previously only iterative methods may have been viable, and introduces a level of flexibility not found in many existing approaches. These contributions promise to significantly alter the landscape of quantum control, facilitating a closer alignment between theoretical constructs and their practical realizations. This paradigm shift in controller design for quantum systems represents a substantial leap towards the tangible implementation of quantum technologies.

This paper is organised as follows: Section 2 briefly recalls the evolution of open quantum systems and develops the corresponding state space model. In Sect. 3, we introduce a general theory to fully control the quantum systems using a probabilistic approach and demonstrate its general solution. The developed approach will then be applied in Sect. 4 to systems described by Gaussian pdfs. Thereafter, the method is applied to a spin system and an atomic system in Sect. 5. Finally, some conclusions are provided in Sect. 6.

2 Evolution of open quantum systems

2.1 A brief review of Liouville–von Neumann equation

The temporal evolution of an open quantum system is effectively described by the Liouville–von Neumann equation, which is given by:

$$\begin{aligned}{} & {} i \hbar \dfrac{d\rho (\tau )}{d \tau } =[H_0+H_u(\tau ),\rho (\tau )]+\mathcal {L}(\rho (\tau )), \nonumber \\{} & {} \quad \rho (0)=\rho _0. \end{aligned}$$
(1)

Here, \(\hbar \) represents the reduced Planck’s constant, a fundamental quantity in quantum mechanics. The term \(\rho (\tau )\) is the reduced density operator, which is a positive Hermitian operator with the property that its trace equals one, denoted by \({{\,\textrm{Tr}\,}}({\rho (\tau )})=1\). \(H_{0}\), referred to as the free Hamiltonian, describes the intrinsic energy of the system in the absence of any external influences. Conversely, \(H_u(\tau )=-\mu u(\tau )\) characterizes the interaction between the quantum system and an external electric field, denoted by \(u(\tau )\). The coupling between the system and the field is mediated by the operator \(\mu \), which depends on the specific physical characteristics of the system [35,36,37,38]. This equation forms the cornerstone of quantum dynamics, capturing the intricate interplay between the system’s inherent properties and external forces, as well as the influence of the surrounding environment encapsulated by the term \(\mathcal {L}(\rho (\tau ))\).

In Eq. (1), the commutator represents the Liouvillian super-operator acting on the reduced density operator, \(\rho (\tau )\), capturing the system’s intrinsic dynamics. The open system’s interactions with its environment are described by \(\mathcal {L}(\rho (\tau ))\), following the Lindblad form:

$$\begin{aligned} \mathcal {L}(\rho (\tau ))=i\hbar \sum _{s}\big (L_s\rho (\tau ) L_s^\dagger -\dfrac{1}{2}\{L_s^\dagger L_s,\rho (\tau )\}\big ). \end{aligned}$$
(2)

Here, the Lindblad operators \(L_s\), key to modeling dissipative effects in quantum systems, are formulated using transition rates \(\Gamma _{k\rightarrow j}\). These rates quantify the transition probabilities between the system’s eigenstates \(| k \rangle \) and \(| j \rangle \) under the free Hamiltonian. Specifically, each operator \(L_{j,k}\) is constructed as follows:

$$\begin{aligned} L_s=L_{j,k}=\sqrt{\Gamma _{k\rightarrow j}}| j \rangle <\!{k}|, \end{aligned}$$
(3)

where the index k spans a finite set, \({| k \rangle , k = 0,\ldots , l-1}\), with l denoting the total number of the free Hamiltonian’s eigenvectors. From Eq. (1), it can be straightforwardly shown that the time evolution of the elements of the density operator is given by,

$$\begin{aligned}{} & {} \dfrac{d\rho _{n,m}(\tau )}{d \tau }=\nonumber \\{} & {} \quad (-i\omega _{n,m}-\gamma _{n,m})\rho _{n,m}(\tau )+\sum _{k=0}^{l-1}\Gamma _{k\rightarrow n}\rho _{k,k}(\tau )\delta _{n,m}\nonumber \\{} & {} \qquad +i\dfrac{{u}(\tau )}{\hbar }\sum _{k=0}^{l-1}(\mu _{n,k}\rho _{k,m}(\tau )-\rho _{n,k}(\tau )\mu _{k,m}), \end{aligned}$$
(4)

with indices \({n,m}={0,1,\dots ,l-1}\), and \(\delta _{n,m}\) as the Kronecker delta. The matrix elements of the operator \(\mu \) are given by \(\mu _{k,n}:=<\! k| \mu |n\!>\). The Bohr frequencies, represented by \(\omega _{n,m}:=\dfrac{E_n-E_m}{\hbar }\), capture the energy differences between eigenstates \(| n \rangle \) and \(| m \rangle \) of the free Hamiltonian \(H_0\), where \(E_n\) specifies the energy eigenvalue corresponding to \(| n \rangle \). Additionally, the total dephasing rate \(\gamma _{n,m}\) is defined as:

$$\begin{aligned} \gamma _{n,m}:=\dfrac{1}{2}\sum _{j=0}^{l-1}(\Gamma _{n\rightarrow j}+\Gamma _{m\rightarrow j}). \end{aligned}$$
(5)

which quantifies the cumulative dephasing effects on the coherence between states \(| n \rangle \) and \(| m \rangle \) due to interactions with the environment. The time evolution of any physical observable, represented by an Hermitian operator \(\hat{o}\), within this open quantum system is determined by:

$$\begin{aligned} \tilde{o}(\tau )=\langle \hat{o} \rangle ={{\,\textrm{Tr}\,}}(\rho (\tau )\hat{o}). \end{aligned}$$
(6)

where \({{\,\textrm{Tr}\,}}(\rho (\tau )\hat{o})\) computes the expectation value of \(\hat{o}\) at time \(\tau \). This equation encapsulates the principle that the evolution of observables in a quantum system can be traced through the system’s density operator, \(\rho (\tau )\).

This section has laid down the essential theoretical foundation for understanding the dynamics of open quantum systems. This understanding is pivotal for the discussions that follow, setting the stage for delving into the intricacies of quantum control in the presence of environmental interactions and uncertainties.

2.2 Evolution of the vectorisation of the density operator

In exploring quantum mechanics, the dynamic evolution of quantum systems is pivotal. Central to this exploration is the density matrix, \(\rho (\tau )\), which defines the quantum system’s state. In the previous section, we formulated the density matrix as depicted in Eq. (1). A more granular representation can be written as,

$$\begin{aligned} \rho (\tau )= & {} (\rho (\tau ))^\dagger \nonumber \\= & {} \left( \begin{array}{ccccccccc} \rho _{0,0}(\tau )&{}\rho _{0,1}(\tau ) &{} \dots &{}\rho _{0,l-1}(\tau ) \\ \rho _{1,0}(\tau )&{}\rho _{1,1}(\tau ) &{} \dots &{}\rho _{1,l-1}(\tau ) \\ \vdots &{}\vdots &{} \ddots &{}\vdots \\ \rho _{l-1,0}(\tau )&{}\rho _{l-1,1}(\tau ) &{} \dots &{}\rho _{l-1,l-1}(\tau ) \\ \end{array} \right) \in \mathbb {C}^{l \times l},\nonumber \\{} & {} \text {with}\hspace{0.2cm}{{\,\textrm{Tr}\,}}(\rho (\tau ))=1. \end{aligned}$$
(7)

This representation highlights the complex, time-dependent components \(\rho _{i,j}(\tau )\) of the matrix, offering a detailed view of the quantum system’s evolving state.

Building upon the representation of the density matrix given in Eq. (7), we can further enhance our mathematical treatment of quantum dynamics through the introduction of the vectorization operation. This process transforms \(\rho (\tau )\) into a column vector \(\tilde{x}(\tau )\), as represented in the following equation,

$$\begin{aligned} \tilde{x}(\tau )&=\text {vec}(\rho (\tau )) \nonumber \\&=\left[ \begin{aligned}&\rho _{0,\, 0}(\tau )\, \rho _{1,1}(\tau ) \dots \rho _{l-1,l-1}(\tau )\, \rho _{0,1}(\tau ) \dots \\&\rho _{0,\, l-1}(\tau )\,\rho _{1,0}(\tau ) \dots \rho _{l-1,0}(\tau ) \dots \dots \dots \\&\rho _{l-2,\, l-1}(\tau )\, \rho _{l-1,l-2}(\tau ) \end{aligned}\right] ^T, \end{aligned}$$
(8)

This vectorization facilitates a more streamlined manipulation of quantum dynamics.

Employing the vectorized form \(\tilde{x}(\tau )\), we reformulate the differential equations from (4) into:

$$\begin{aligned} \dfrac{d\tilde{x}(\tau )}{d \tau } =(\tilde{A}+iu(\tau ) \tilde{N})\tilde{x}(\tau ),\hspace{0.5cm} \tilde{x}(0)=\tilde{x}_0, \end{aligned}$$
(9)

where \(\tilde{A} \in \mathbb {C}^{l^2 \times l^2}\), and \(\tilde{N} \in \mathbb {C}^{l^2\times l^2}\) representing matrices, the elements of which are computable from Eq. (4), while \(\tilde{x}_0\) symbolizes the vectorization of the initial density operator [38]. The notation ‘T’ in Eq. (8) represents the transpose operation. We detail the derivation of \(\tilde{A}\) and \(\tilde{N}\) for a two-dimensional system in Appendix (A), a process extendable to l-dimensional systems for \(l>2\).

To further simplify the analysis, a shifting operation is applied to transition from \(x(\tau )\) to \(\tilde{x}(\tau )-x_e\). This adjustment allows for a more succinct representation of the differential Eq. (9), encapsulating the essence of the system’s dynamics in a streamlined form as illustrated by,

$$\begin{aligned} \dfrac{dx({\tau })}{d \tau }=\tilde{A} x({\tau })+\tilde{B}(x(\tau )) u(\tau ),\,\,x(0)=\tilde{x}_0-x_e,\qquad \end{aligned}$$
(10)

Here, \(x_e\) represents an eigenvector of \(\tilde{A}\) that fulfills the condition \(\tilde{A}x_e=0\). The term \(\tilde{B}(x(\tau ))\) is defined as \(i\tilde{N}(x(\tau )+x_e)\), effectively capturing the system’s response to the external electric field \({u(\tau )}\). This compact expression of the system dynamics offers a clearer insight into the interaction between the quantum system and the control input, facilitating an intuitive understanding of the control process [38].

To facilitate analysis within discrete time intervals, the continuous state-space equation is discretized. By denoting \(x_t \equiv x(t\Delta \tau )\) and \(u_t \equiv u(t \Delta \tau )\), where \(t=0,1,2,\dots \) is an integer indexing discrete steps and \(\Delta \tau \) is the sampling period, the discrete-time state-space model is articulated as:

$$\begin{aligned} x_{t+1} = A x_t + B(x_t) u_t. \end{aligned}$$
(11)

where A and \(B(x_{t})\) are derived through time discretization as follows:

$$\begin{aligned} A = e^{\tilde{A} \Delta \tau }, B(x_{t})= \bigg ( \tilde{B}(x_t) \int _0^{\Delta \tau } e^{\tilde{A} \lambda } \textrm{d} \lambda \bigg ), \end{aligned}$$
(12)

and where \(\lambda \) is the integration variable. Rewriting the discrete state-space Eq. (11) for the t-th time step, we get:

$$\begin{aligned} x_{t} = A x_{t-1} + B(x_{t-1}) u_{t-1}. \end{aligned}$$
(13)

As mentioned in the introduction section and in related literature [25], the evolution of quantum systems can be influenced by various sources of uncertainties, such as sampling, parameter, and functional uncertainties. Consequently, to account for these various sources of uncertainty, we introduce a noise term into the discretised Eq. (13), resulting in:

$$\begin{aligned} {x}_{t}=Ax_{t-1}+B u_{t-1} + \zeta _{t}, \end{aligned}$$
(14)

where \(\zeta _{t}\) is a multivariate Gaussian noise term. It is also important to highlight that in Eq. (14), we symbolize B instead of \(B(x_{t-1})\), which is a deliberate simplification of notation for readability. Nonetheless, please remember that B does indeed retain its dependency on \(x_{t-1}\). This is a critical aspect to consider while interpreting the subsequent discussion and results.

With the state-space model in place, we now turn our attention to the observation model. This model can leverage the well-known property stating that for any pair of matrices \(Z_1\) and \(Z_2\), \({{\,\textrm{Tr}\,}}(Z_1^{\dagger }Z_2)=(\text {vec}(Z_1))^{\dagger }\text {vec}(Z_2)\). This principle facilitates the expression of observations \(\tilde{o}_t\) from Eq. (6) as a linear function of the system state:

$$\begin{aligned} \tilde{o}_t=D\tilde{x}_t=D(x_t+x_e), \end{aligned}$$
(15)

where \(D=(\text {vec}(\hat{o}^{\dagger }))^{\dagger }\) acts as a transformation matrix, and \(Dx_e\) serves as an offset term. To reflect real-world measurements, we incorporate a noise term \(\sigma _t\), representing multivariate Gaussian noise, into our observation model:

$$\begin{aligned} o_t=D(x_t+x_e)+\sigma _t, \end{aligned}$$
(16)

These observations constitute the output equation.

In essence, the bilinear state-space model, encapsulating the dynamics of quantum systems, is defined by the interaction between the state Eq. (14) and the observation Eq. (16). This framework not only captures the influence of the input electric field but also incorporates the inherent uncertainties and noise present in quantum systems, offering a comprehensive view of their evolution.

3 Fully probabilistic control for quantum systems

In this section, we aim to outline the control objectives and provide a general solution to the probabilistic control problem for quantum systems. These systems are characterized by arbitrary probabilistic dynamical models.

3.1 Objectives of the fully probabilistic control for quantum systems

The presence of the noise signal, \(\zeta _{t}\), in Eq. (14) implies that the system state at time step t cannot be completely specified by the preceding state and control input. Instead, it can only be fully determined by its probabilistic description, \(s(x_{t} | u_{t-1}, x_{t-1})\). Similarly, the measurement output can only be determined by a suitable probability density function (pdf), \(s(o_{t} | x_{t})\).

Following this probabilistic representation, the control problem is formulated as: derive the pdf of the randomized controller \(c(u_{t-1}|x_{t-1})\) that minimizes the Kullback–Leibler divergence (KLD) between the joint pdf of the closed-loop description of the system dynamics, \(f(\mathcal {Z}(t, \mathcal {H}))\), and a predefined ideal one, \(^If(\mathcal {Z}(t, \mathcal {H}))\),

$$\begin{aligned} \mathcal {D}(f||^I f)=\int f(\mathcal {Z}(t, \mathcal {H})) \ln \big (\dfrac{f(\mathcal {Z}(t, \mathcal {H}))}{^If(\mathcal {Z}(t, \mathcal {H}))}\big )d\mathcal {Z}(t, \mathcal {H}).\nonumber \\ \end{aligned}$$
(17)

In the equation above, \(\mathcal {Z}(t, \mathcal {H}) = {x_t, \dots , x_\mathcal {H}, o_t, \dots , o_\mathcal {H}, }{u_{t-1}, \dots , u_\mathcal {H}}\) signifies the system closed-loop data sequence, while \(\mathcal {H} \le \infty \) represents a given control horizon. The joint probability function of the closed-loop description of the system dynamics can be calculated as,

$$\begin{aligned} f(\mathcal {Z}(t, \mathcal {H})) = \prod _{t=1}^\mathcal {H} s(x_t|x_{t-1},u_{t-1})s(o_t|x_{t})c(u_{t-1}|x_{t-1}).\nonumber \\ \end{aligned}$$
(18)

Conversely, the ideal joint pdf of the closed-loop data can be factored as follows,

$$\begin{aligned} ^If(\mathcal {Z}(t, \mathcal {H}))= & {} \prod _{t=1}^\mathcal {H} {s(x_t|x_{t-1},u_{t-1})} {^Is(o_t|x_{t})}\nonumber \\{} & {} \times {^Ic(u_{t-1}|x_{t-1})}, \end{aligned}$$
(19)

where \(^Is(o_t|x_{t})\) represents the ideal distribution of the measurement \(o_t\), and \(^Ic(u_{t-1}|x_{t-1})\) symbolizes the ideal pdf of the controller. Importantly, in Eq. (19), the factor \(s(x_t|x_{t-1},u_{t-1})\) describing the ideal distribution of the state vector of the vectorized density operator, is deemed identical to the corresponding component in Eq. (18). This assumption suggests that the evolution of the density matrix adheres to the Liouville von-Neumann equation.

To contextualize the development of our optimal randomized controller, we introduce a theorem that encapsulates the core principles of our approach. This theorem, grounded in the foundational works of [29,30,31], formalizes the derivation of a controller that strategically minimizes the Kullback–Leibler Divergence (KLD), as previously outlined. By adopting a recursive strategy, we define the expected minimum cost-to-go function \(-\ln (\gamma (x_{t-1}))\) through the following relationship:

$$\begin{aligned}&-\ln (\gamma (x_{t-1})) \nonumber \\&\quad = \underset{c(u_{{t'}-1}|x_{{t'}-1})}{\text {min}} \sum _{{t'}=t}^\mathcal {H} \int f(\mathcal {Z}_t, \dots , \mathcal {Z}_\mathcal {H}|x_{t-1}) \nonumber \\&\quad \times \ln \left( \dfrac{s(o_{t'}|x_{t'})c(u_{{t'}-1}|x_{{t'}-1})}{^Is(o_{t'}|x_{t'})^Ic(u_{{t'}-1}|x_{{t'}-1})} \right) \nonumber \\&\quad \times d(\mathcal {Z}_t, \dots , \mathcal {Z}_\mathcal {H}). \end{aligned}$$
(20)

This principle applies universally across any time step \({t'}\) within the horizon \(\mathcal {H}\).

Theorem 1

In accordance with the defined cost-to-go function in Eq. (20), the recursive minimization of the Kullback–Leibler divergence (17), contrasting the joint probability density function (18) with an ideal counterpart (19), is articulated by the following recursive functional equation:

$$\begin{aligned}&-\ln (\gamma (x_{t-1})) \nonumber \\&\quad = \underset{c(u_{t-1}|x_{t-1})}{\text {min}} \int \bigg [ s(x_t|x_{t-1}, u_{t-1})s(o_t|x_t)c(u_{t-1}|x_{t-1})\nonumber \\&\qquad \times \bigg (\ln \left( \dfrac{s(o_t|x_t)c(u_{t-1}|x_{t-1})}{^Is(o_t|x_t)^Ic(u_{t-1}|x_{t-1})} \right) \nonumber \\&\qquad -\ln (\gamma (x_{t}))\bigg ) \bigg ]d(x_t,o_t,u_{t-1}), \end{aligned}$$
(21)

Proof

The derivation of the result above can be achieved by evaluating the optimal cost-to-go function specified in Eq. (20). \(\square \)

This theorem serves as a pivotal element in navigating towards our control objective. By iteratively solving the recursive functional Eq. (21), we can ascertain the optimal control strategy that minimizes the KLD. This ensures the quantum system’s trajectory is optimally aligned with the predefined probabilistic framework. The practical application and implications of this theorem will be expounded upon in the subsequent sections, highlighting its significance in the broader context of quantum control optimization.

3.2 General solution to the fully probabilistic quntum control problem

To address the quantum control problem within our probabilistic framework, we turn our focus towards deriving a general solution that encapsulates our control objectives for quantum systems. Building upon the foundational concept introduced in the previous section, the cost-to-go function, denoted as \(\gamma (x_{t-1})\), this section aims to expand upon its implications and articulate a comprehensive solution to the control problem. Our approach hinges on identifying an optimal control distribution, \(c(u_{t-1}|x_{t-1})\), that effectively minimizes the cost-to-go function, thereby aligning the quantum system’s behavior with our targeted outcomes.

To formalize this approach, we present the following theorem, which delineates the formulation of the optimal control law’s probability density function, crucial for achieving the desired control objectives.

Theorem 2

The probability density function of the optimal control law, \(c(u_{t-1}|x_{t-1})\), that minimizes the cost-to-go function, as encapsulated in (21), is defined as:

$$\begin{aligned} c(u_{t-1}|x_{t-1})=\frac{^Ic(u_{t-1}|x_{t-1}) \exp [-\beta (u_{t-1},x_{t-1})]}{\gamma (x_{t-1})},\nonumber \\ \end{aligned}$$
(22)

where,

$$\begin{aligned} \gamma (x_{t-1})= & {} \int {^Ic(u_{t-1}|x_{t-1})} \nonumber \\{} & {} \times \exp [{-\beta (u_{t-1},x_{t-1})}] \textrm{d} u_{t-1},\nonumber \\ \end{aligned}$$
(23)
$$\begin{aligned} \beta (u_{t-1},x_{t-1})= & {} \int s(x_{t}|u_{t-1}, x_{t-1}) s(o_{t}|x_{t})\nonumber \\{} & {} \times \ln \bigg ( \frac{s(o_{t}|x_{t}) }{ ^I s(o_{t}|x_{t}) } \frac{1}{{\gamma }(x_{t})}\bigg ) \textrm{d} x_{t}\textrm{d} o_{t}.\nonumber \\ \end{aligned}$$
(24)

Proof

The derivation of this theorem are inspired by and adapted from the proof of Proposition 2 detailed in [39]. This adaptation ensures the theorem’s applicability within the quantum control context, providing a rigorous foundation for the proposed control strategy. \(\square \)

The significance of Theorem 2 lies in its universality. Specifically, the solution to the control problem it presents is not bounded by the specific distributions that depict the quantum system’s dynamical evolution, its controllers, or their ideal manifestations. In essence, this theorem offers a comprehensive solution applicable to any arbitrary probability density functions, encompassing a wide array of quantum control scenarios. However, an interesting observation arises when all generative probabilistic models (pertaining to system dynamics, controller, and ideal outcomes) follow Gaussian distributions.Under such circumstances, the theorem enables the derivation of a more explicit and analytically tractable form for the randomized controller. This analytical form, which will be elaborated upon in the following section, provides a concrete methodological pathway for implementing the control strategy in practical scenarios where Gaussian models are prevalent, a common occurrence in quantum mechanics. This dual facet of Theorem 2 not only underscores its theoretical robustness but also enhances its practical utility in the realm of quantum control, bridging the gap between abstract theoretical constructs and their real-world applications.

4 Solution of quantum control problems with Gaussian PDFs

In the preceding section, we introduced a general framework for quantum control problems that can be applied to systems influenced by various noise types. Recognizing the prevalence and importance of Gaussian distributions in quantum systems, we will now focus on demonstrating the applicability of this general solution to quantum systems affected specifically by Gaussian noise.

The predominance of Gaussian distributions in quantum and other physical systems can often be attributed to the Central Limit Theorem. This theorem posits that, under certain conditions, the sum of a large number of independent and identically distributed (i.i.d) variables, irrespective of their original distributions, will converge to a Gaussian distribution. Given the inherent uncertainties and the multitude of variables in quantum mechanics, Gaussian distributions are particularly apt descriptions for such systems.

4.1 Gaussian description of quantum systems

In our model, where \(\zeta _t\) in Eq. (14) represents the amalgamation of diverse uncertainties as Gaussian noise, the state probability density function (pdf), \(s(x_t \left| {x_{t - 1}},u_{t-1} \right. )\), naturally transitions into a complex normal pdf. This transition is not arbitrary but deeply rooted in the fundamental constructs of quantum mechanics. Given that density matrices serve as the cornerstone for depicting quantum states, especially within mixed state frameworks, their constituents can exhibit complex values. This complexity stems directly from their association with wave functions, which themselves are solutions to the Schrödinger equation, a fundamentally complex-valued equation. Thus, the intricate probabilistic narrative woven by density matrices necessitates the adoption of complex numbers and, consequently, complex distributions to encapsulate the full spectrum of quantum phenomena comprehensively. This requirement underscores the inherent complexity of quantum systems and the necessity for a probabilistic framework that can accommodate the nuanced characteristics of quantum states.

Given this, our system state pdf becomes,

$$\begin{aligned} s(x_{t}\left| {x_{t - 1}},u_{t-1} \right. )&\sim \mathcal {N}_{\mathcal {C}}(\mu _{t},{\Gamma }), \end{aligned}$$
(25)

where the parameters of this distribution are further detailed as,

$$\begin{aligned} \mu _t&=E(x_t)=Ax_{t-1}+Bu_{t-1},\nonumber \\ \Gamma&= E((x_t-\mu _t)(x_t-\mu _t)^\dagger ), \end{aligned}$$
(26)

with A and B being the state and control matrices respectively, \(E(\cdot )\) represents the expected value, and \(\dagger \) is the conjugate transpose operator. Notably, \(\mu _t\) and \(\Gamma \) represent the mean and covariance matrices, respectively. For completeness, the form of the complex normal distribution is recalled in Appendix B.

Additionally, in quantum mechanics, measurements are usually described by observables that are Hermitian operators, and their expected values are real numbers. Given the real nature of quantum measurements, it becomes intuitive to characterize the probabilistic distribution of these measurements using real Gaussian distributions. Hence, when the noise, \(\sigma _t\), from Eq. (16), stems from a Gaussian source, the measurement pdf, \(s(o_t|x_t)\), can be articulated in terms of a real Gaussian distribution. Specifically, the measurement pdf can be characterized as:

$$\begin{aligned} s({o_t}\left| {{x_{t}}} \right. )&\sim \mathcal {N}(Dx_{t},G), \end{aligned}$$
(27)

where \(Dx_t\) is the mean of the distribution. The covariance matrix G is defined as:

$$\begin{aligned} G&= E((o_t-Dx_t)(o_t-Dx_t)^T). \end{aligned}$$

To re-emphasize, the selection of a real Gaussian for \(o_t\) is rooted in the physical significance and practicality of real-valued measurements in quantum systems. This ensures that our probabilistic representation aligns with the observable realities of quantum mechanics.

With the previously defined constructs, the entire system which includes the quantum system state, measurements, and the electric field or controller, \(u_t\) can be comprehensively represented as,

$$\begin{aligned} f(x_t,o_t,u_{t-1}|x_{t-1})= & {} c(u_{t-1}|x_{t-1})\mathcal {N}(Dx_{t},G)\nonumber \\{} & {} \times \mathcal {N}_{\mathcal {C}}(\mu _{t},{\Gamma }), \end{aligned}$$
(28)

where \(c(u_{t-1}|x_{t-1})\) represents the electric field distribution as discussed in earlier sections.

The model further postulates an ideal joint pdf that captures the desired distributions of the system state, measurement, and controller,

$$\begin{aligned} ^If(x_t,o_t,u_{t-1}|x_{t-1})= & {} {}^Is(x_{t} | x_{t-1},{u_{t-1}}){}^Is({o_t} \left| {{x_{t}}} ) \right. \nonumber \\{} & {} \times {}^Ic\left( {u_{t-1}}\left| {x_{t - 1}} \right) \right. , \end{aligned}$$
(29)

wherein,

$$\begin{aligned}&^Is(x_{t} | x_{t-1},{u_{t-1}}) =s(x_{t} | x_{t-1},{u_{t-1}})\sim \mathcal {N}_{\mathcal {C}}(\mu _{t},{\Gamma }), \end{aligned}$$
(30)
$$\begin{aligned}&^Is({o_t}\left| {{x_{t}}} \right. ) \sim \mathcal {N}({o}_{d},G_r), \end{aligned}$$
(31)
$$\begin{aligned}&^Ic({u_{t-1}}\left| {x_{t - 1}} \right. ) \sim \mathcal {N}(u_r,\Omega ). \end{aligned}$$
(32)

In these equations, \(o_d\) and \(G_r\) stand for the mean and covariance of the ideal measurement pdf, respectively. Simultaneously, \(u_r\) and \(\Omega \) represent the mean and covariance of the ideal controller pdf. Notably, as evidenced by Eq. (30), the ideal state distribution is congruent with the actual state distribution, reflecting the principles of the Liouville-von Neumann equation. A deeper exploration into this congruence is warranted to appreciate its implications fully.

4.2 Quantum system Gaussian controller

The fundamental objective in controlling the quantum system is succinctly defined: Devise a randomized controller, denoted as \(c(u_{t-1}|x_{t-1})\), that bridges the gap between the current joint distribution of the quantum system, as represented by Eq. (28), and the desired distribution expressed in Eq. (29). Before diving deeper into the intricacies of this distribution, it is imperative to shed light on the architecture of the performance index. This discussion will naturally lead us to the upcoming theorem.

Theorem 3

Incorporating the ideal distribution of measurements from Eq. (31), the ideal controller distribution from Eq. (32), along with the actual measurement distribution (27) and system dynamics (25) into Eq. (23), yields the following performance index,

$$\begin{aligned}&- \ln \left( {\gamma \left( {{x_{t-1}}} \right) } \right) = 0.5{x}_{t-1}^{T}{M_{t-1}}{x_{t-1}}\nonumber \\&\quad +0.5P_{t-1}{{x}_{t-1}} + {0.5\omega _{t-1}}, \end{aligned}$$
(33)

where,

$$\begin{aligned} {M_{t - 1}}&=A^{T} (D^{T} G_r^{-1}D+M_{t})A-A^{T} (D^{T} G_r^{-1}D\nonumber \\&\quad +M_{t})^{T} B \big (\Omega ^{-1}+B^{T} ({D^{T} }G_r^{ - 1}D+M_{t})B\big )^{-1} \nonumber \\&\quad \quad \times B^{T} (D^{T} G_r^{-1}D+M_{t})A, \end{aligned}$$
(34)
$$\begin{aligned} P_{t-1}&=(P_{t}-2{o}_{d}^{T} G_r^{-1}D)A\nonumber \\&\quad +2(\Omega ^{-1}u_r-0.5B^{T} (P_{t}^{T} -2D^{T} G_r^{-1}{o}_{d}))^{T} \nonumber \\&\quad \quad \times \big (\Omega ^{-1}+B^{T} ({D^{T} }G_r^{ - 1}D+M_{t})B\big )^{-1}\nonumber \\&\quad \quad \times B^{T} (D^{T} G_r^{-1}D+M_{t})A, \end{aligned}$$
(35)

and

$$\begin{aligned} \omega _{t-1}&={\omega _{t}}+ {o}_{d}^{T} G_r^{ - 1}{{o}_{d}} +\ln (\dfrac{|G_r|}{|G|})- {{\,\textrm{Tr}\,}}\big (G(G^{-1}-G_r^{ - 1})\big ) \nonumber \\&\quad +{{\,\textrm{Tr}\,}}(\Gamma ({D^{T} }G_r^{ - 1}D+M_{t})) +u_r^{T} \Omega ^{-1}u_r \nonumber \\&\quad -\big ( \Omega ^{-1}u_r-0.5B^{T} (P_{t}^{T} -2{D}^{T}G_r^{ - 1}{{o}_{d}})\big )^{T} \nonumber \\&\quad \quad \times \big (\Omega ^{-1}+B^{T} ({D^{T} }G_r^{ - 1}D+M_{t})B\big )^{-1}\nonumber \\&\quad \quad \times \big ( \Omega ^{-1}u_r-0.5B^{T} (P_{t}^{T} -2{D}^{T}G_r^{ - 1}{{o}_{d}})\big )\nonumber \\&\quad -2\ln ({|\Omega |^{-1/2}}|\Omega ^{-1} \nonumber \\&\quad +B^{T} ({D^{T} }G_r^{ - 1}D+M_{t})B|^{-1/2}), \end{aligned}$$
(36)

such that |G| represents the determinant of matrix G.

Proof

Detailed proof is articulated in Appendix C. \(\square \)

Remark 1

To ensure the performance index from Eq. (33) is real, the matrix \(M_{t - 1}\) should be the outcome of a vectorized Hermitian operator’s transpose multiplied with the operator itself. For instance, with a vectorized Hermitian operator, \(W_{t-1}\), the relationship \(M_{t - 1}=W^T_{t-1}W_{t-1}\) holds. Consequently, the first term in Eq. (33) remains real. Likewise, \(P_{t-1}\) in Eq. (33) represents a vectorized Hermitian operator.

Equation (33) signifies a quadratic performance index, which arises due to the Gaussian assumption made on the distributions involved in the minimization of the Kullback–Leibler distance. Specifically, the quadratic term, \(0.5{x_{t-1}^{T}}{M_{t-1}}{x_{t-1}}\), the linear term, \(0.5P_{t-1}{{x_{t-1}}}\), which primarily emerges in the context of a tracking problem, and the constant term, \(0.5\omega _{t-1}\), together construct the complete quadratic function. This arrangement of terms illustrates the fundamental structure of the performance index in the context of the assumed Gaussian distributions.

This quadratic form of the performance index allows a more straightforward derivation of the optimal controller distribution, \(c(u_{t-1}|x_{t-1})\), as per definition (22), with the details presented in the following theorem.

Theorem 4

The controller’s distribution that optimally minimizes the recurrence Eq. (21) emerges as,

$$\begin{aligned} c({u_{t-1}}\left| {x_{t - 1}} \right. )&\sim \mathcal {N}(v_{t-1},R_t), \end{aligned}$$
(37)

where,

$$\begin{aligned} v_{t-1}&=\bigg ({\Omega ^{ - 1}} + {B^T}( {D^T}G_r^{ - 1}D + {M_t})B\bigg )^{-1} \nonumber \\&\quad \times \bigg ({\Omega ^{ - 1}}{u_r} - {B^T}({D^T}G_r^{ - 1}D + {M_t})A{x_{t - 1}} \nonumber \\&\quad -0.5 {B^T}( P_{t }^T - 2{D^T}G_r^{ - 1}{{o}_{d}} )\bigg ), \end{aligned}$$
(38)

and,

$$\begin{aligned} R_t&=\bigg ({\Omega ^{ - 1}} + {B^{T} }( {D^{T} }G_r^{ - 1}D + {M_t})B\bigg )^{-1}. \end{aligned}$$
(39)

Proof

The comprehensive proof can be found in Appendix D. \(\square \)

This theorem extends our understanding of the optimal control strategy by providing a distribution form, with both its mean \(v_{t-1}\) and variance \(R_t\) articulated as explicit functions of system parameters and states. This transparency elucidates how different components within the system impact the control strategy, offering insights into the intricate interplay of variables within the system.

Moreover, this theorem marks a significant stride in bridging the gap between theoretical constructs and their practical implications. The derived expressions underpin the control distribution in a real-world context, serving as a valuable reference in the implementation of control strategies. Consequently, it not only validates the preceding theoretical discourse but also paves the way for practical applications and future explorations.

The distribution, as described in Eq. (37), albeit derived for Gaussian distributions, retains the fundamental attributes of linear quadratic controllers, with the addition of a random factor. This randomization broadens the exploratory nature of the control strategy, enhancing its capacity to adapt to changing system dynamics. Despite a marginal compromise on control precision, the beneficial trade-off lies in the controller’s amplified exploratory capability, crucial for navigating complex and dynamic operational environments.

4.3 Implementation of the Gaussian controller

This subsection provides a detailed, step-by-step procedure for implementing the Gaussian controller, as derived from Theorem 4. For clarity and ease of reference, this process is presented as algorithmic pseudo-code.

Algorithm 1
figure b

Fully Probabilistic Control of Quantum Systems

In the subsequent section, Algorithm 1 will be applied to control a variety of quantum physical systems. This algorithm integrates the theoretical concepts presented in the preceding section, detailing the probabilistic quantum control approach in the presence of Gaussian noise.

5 Results and discussions

The probabilistic control approach, presented in earlier sections, finds its application here in manipulating selected quantum physical systems. The objective is to guide these systems in achieving outcomes that align with predefined target operators. Specifically, this study will scrutinize the transition dynamics of open spin and atomic systems when they interact with an external electric field.

To streamline the upcoming analysis, a simplifying assumption is made: \(\hbar =1\). This normalization simplifies computations by setting the reduced Planck constant, a fundamental parameter in quantum mechanics, equal to one. Consequently, all parameters in this section will be considered dimensionless, allowing a more focused investigation of the system dynamics independent of the physical units. This is a common practice in theoretical quantum mechanics, known as natural units, and will facilitate the elucidation of the key concepts under discussion.

In the subsequent analysis, the emphasis is placed on understanding how the probabilistic control approach can effectively shape the evolution of these quantum systems in response to external influences. The findings from this investigation will be pivotal in establishing the real-world applicability and utility of the control approach, moving beyond theoretical explorations to practical quantum control scenarios.

5.1 Control of a spin system

This subsection focuses on controlling a spin system. The state of a spin-j system is represented as,

$$\begin{aligned} | \psi \rangle =\sum _{m=-j}^{j}c_m| j,m \rangle , \end{aligned}$$
(40)

where, \(c_m\) are complex coefficients fulfilling \(\sum _{m=-j}^{j}|c_m|^2=1\). The basis \({| j,m \rangle \equiv | m \rangle , m=-j,\dots ,j}\) comprises the common eigenstates of the operators \(J^2=J_1^2+J_2^2+J_3^2\) and \(J_3\). The three observables \(J_i\) \((i = 1,2,3)\) comply with the angular momentum commutation relations \([J_1,J_2]=i\hbar \epsilon _{123}J_3\) (with \(\epsilon _{123}\) being the Levi-civita symbol).

The spin system’s interaction with an external electric field \(u(\tau )\) is considered. The objective is to transition the system from an initial state \(\rho _{i}\) to a target state \(\rho _{d}\) through this interaction. Hence, the control sequence optimizing this transition needs to be derived. In this context, the output \(o(\tau )\) at every time instant \(\tau \) is \(o(\tau )={{\,\textrm{Tr}\,}}(\rho (\tau )\rho _d)\) where \(\rho (\tau )\) represents the system’s density operator at time \(\tau \). Therefore, the chosen value for \(o_d\) should be 1.

A spin-1/2 system (i.e., \(j=\dfrac{1}{2}\)) is considered for this study. The interaction of a spin-1/2 system with an external electric field, \(u(\tau )\), is modelled as follows:

$$\begin{aligned} H=H_0+H_u(\tau )=\dfrac{1}{2}\sigma _3+\dfrac{1}{2}(\sigma _1+\sigma _2)u(\tau ). \end{aligned}$$
(41)

The Pauli matrices, \(\sigma _1\), \(\sigma _2\), and \(\sigma _3\), are given in the basis \({| + \rangle \equiv | \dfrac{1}{2},\dfrac{1}{2} \rangle ,| - \rangle \equiv | \dfrac{1}{2},-\dfrac{1}{2} \rangle }\) as,

$$\begin{aligned} \sigma _1 =\left( \begin{array}{cc} 0&{}\quad 1\\ 1 &{}\quad 0 \\ \end{array} \right) ,\quad \sigma _2=\left( \begin{array}{cc} 0 &{}\quad -i\\ i &{}\quad 0 \\ \end{array} \right) , \quad \sigma _3 =\left( \begin{array}{cc} 1 &{}\quad 0\\ 0 &{}\quad -1\\ \end{array} \right) ,\nonumber \\ \end{aligned}$$
(42)

The spin-1/2 system’s interaction with an external environment is described by the following master equation,

$$\begin{aligned} \dfrac{d\rho (\tau )}{d\tau }{} & {} =-i[H,\rho (\tau )] +\Theta \bigg (\sigma _{-}\rho (\tau )\sigma _{+}-\dfrac{1}{2}\{\sigma _{+}\sigma _{-}, \rho (\tau )\}\bigg ),\nonumber \\{} & {} \quad \rho (0)=\rho _0=| - \rangle \langle -|, \end{aligned}$$
(43)

where \(\sigma _{\pm }=\dfrac{\sigma _{1}\pm i\sigma _{2}}{2}\), and \(\Theta \) denotes the system-environment coupling.

The control goal for this example is to determine an optimal control sequence to transition the system from initial state \(\rho _{0}=| - \rangle \langle -|\) to the state \(\rho _{d}=| + \rangle \langle {+}\vert \) utilizing the proposed probabilistic quantum control approach. Hence, the target operator is chosen as \(D=[1\hspace{0.2cm}0 \hspace{0.2cm}0\hspace{0.2cm}0]\), which is equal to \(D=(\text {vec}(\Pi _+))^T\), where \(\Pi _+=| + \rangle \langle {+}\vert \).

Subsequently, using operators \(\tilde{A}\) and \(\tilde{N}\) (their calculations and values detailed in Appendix E), the matrices A and B needed for evaluating the optimal control signal are determined via Eq. (12), with \(\Delta {t}=0.000025\). After calculating the A, B, and D operators and selecting \(G_r=0.00001\), \(\Omega =10\), and \(\Theta =0.05\), the matrices \(M_t\) and \(P_t\) as defined in Eqs. (34) and (35) are evaluated at each time instant, following Algorithm (1). The matrices \(M_t\) and \(P_t\) are then utilized to calculate the electric field (i.e., the control signal), \(v_{t-1}\). These steps are repeated until the measurement output, \(o(\tau )\), approximates the predefined desired value \({o_d}\). The predefined desired value \({o}_{d}\) is considered to be 1 for this experiment.

Figure 1a illustrates the time evolution of the population, \(\rho _{11}\) of the \(| + \rangle \) state for a spin-1/2 system initially prepared in state \(\rho _{0}\). This is the result of the system’s interaction with the derived electric field as calculated from Eq. (38). Figure 1b showcases the time evolution of the optimal control signal. From Fig. 1a, it is evident that the population \(\rho _{11}\) reaches the predefined desired target value \({o}_{d}=1\) within a few time steps. This outcome underscores the potential effectiveness of the proposed method.

Fig. 1
figure 1

a The blue curve represents the time evolution of the population of the \(| + \rangle \) state of the considered spin-1/2 system. The red curve is the desired value \({o}_{d}=1\). b Time evolution of the control signal, \(u(\tau )\) responsible of achieving the control objective

5.2 Control of a \(\Lambda \)-type atomic system

To further substantiate the performance of the proposed probabilistic quantum control method, it is applied her to manage a \(\Lambda \)-type atomic system initially prepared in its ground state. The interaction between the system and the electric field is captured by the Hamiltonian, provided in the basis \({| 2 \rangle ,| 1 \rangle ,| 0 \rangle }\) as,

$$\begin{aligned} H=H_0+H_u(\tau )= & {} {\omega }\left( \begin{array}{ccc} \dfrac{3}{2} &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 1 &{}\quad 0 \\ 0 &{}\quad 0&{}\quad 0 \\ \end{array}\right) \nonumber \\ {}{} & {} \quad +{\theta }\left( \begin{array}{ccc} 0 &{}\quad 0 &{}\quad 1 \\ 0 &{}\quad 0 &{}\quad 1 \\ 1 &{}\quad 1&{}\quad 0 \\ \end{array}\right) u(\tau ),\nonumber \\ \end{aligned}$$
(44)

where \(\omega \) and \(\theta \) are constant. The interaction of the system is illustrated by the master Eq. (1). Considering simplicity, only one jump operator is taken into account, \(L_{02}=\sqrt{\Theta }| 0 \rangle <\!\! 2|\), where \(\Theta \) represents the relaxation from the state \(| 2 \rangle \) to the state \(| 0 \rangle \). In the following, we consider, without loss of generality, that \(\omega \equiv \theta \).

For this instance, the control objective aims to transition the system from the initial state \(\rho _0=| 0 \rangle \langle {0}\vert \) to the state \(\rho _d=| \psi _d \rangle \langle {\psi _d}\vert \), where \(| \psi _d \rangle =\dfrac{1}{\sqrt{2}}(| 1 \rangle +| 2 \rangle )\). The target operator corresponding to this objective is the projector \(\Pi _d=| \psi _d \rangle \langle {\psi _d}\vert \), which in vectorized form appears as \(D=(\text {vec}(\Pi _d)^T)^T\).

Considering \(\omega =\theta =10^{-4}\), \(\Theta =0.9\times 10^{-4}\) and utilizing the operators, \(\tilde{A}\) and \(\tilde{N}\), the calculations and values of which are detailed in Appendix F, the matrices A, and B required for evaluating the optimal control signal get determined using Eq. (12), with \(\Delta {t}=0.0001\). After computing the A, B and D operators, and setting \(G_r=0.0000001\), and \(\Omega =10000\), the matrices \(M_t\) and \(P_t\), defined in Eqs. (34) and (35) respectively, get evaluated at each instant of time as delineated in Algorithm (1). The matrices \(M_t\) and \(P_t\) then get employed to calculate the electric field, \(v_{t-1}\). This process continues until the measurement output, \(o(\tau )\), approximates the predefined desired value \({o}_{d}\) as closely as possible, which is set to be 1 for this experiment.

Figure 2a depicts the time evolution of the measurement \(o(\tau )={{\,\textrm{Tr}\,}}(\rho (\tau )\rho _d)\), with \(\rho (\tau )\) being the density operator at time \(\tau \), for the atomic system under consideration. This is prepared in the state \(\rho _{0}\) and is the result of its interaction with the derived electric field calculated from Eq. (38). Figure 2b presents the time evolution of the acquired optimal control signal that facilitated the realization of this control objective. As evident from Fig. 2a, the designed probabilistic controller succeeds in accomplishing the control objective and transitioning the state of the atomic system from the initial state, \(\rho _{0}\), to the desired state, \(\rho _{d}\). This results corroborate the effectiveness of the proposed approach.

Fig. 2
figure 2

a The blue curve represents the time evolution of the measurement \(o(\tau )={{\,\textrm{Tr}\,}}(\rho (\tau )\rho _d)\) of the considered \(\Lambda \)-type atomic system. The red curve is the desired value \({o}_{d}=1\). b Time evolution of the control signal, \(u(\tau )\) responsible for achieving the control objective

6 Final comments

This study advanced the field of quantum control by introducing a probabilistic framework, marking a departure from the conventional deterministic methodologies prevalent in the literature. Initially, the study developed a state space model tailored specifically for quantum systems, revealing that the inherent complexity of these systems necessitated the employment of probability density functions (pdfs) for their thorough characterization. Central to our approach was the minimization of the Kullback–Leibler divergence, which served as a measure of the discrepancy between the actual joint pdf, capturing the quantum system’s dynamics including an external electric field, and a target joint pdf. This divergence underpinned our cost function, steering the optimization process. Our findings were twofold: the proposed methodology is applicable to quantum systems delineated by arbitrary pdfs and providing an explicit solution for systems defined by bilinear equations and Gaussian pdfs, contingent on the system’s parameters. In scenarios involving bilinear equations and Gaussian pdfs, an analytical feedback controller emerges from our methodology.

The hallmark of this research lies in its probabilistic stance, a notable departure from the deterministic narratives that dominate current discussions on quantum control. By integrating the noises and uncertainties inherent in quantum systems into the formulation of the optimal control law, our strategy aimed at enhancing precision. The application of this methodology, aimed at managing target operators within open spin systems and \(\Lambda \)-type atomic systems under the influence of external electric fields, corroborated its effectiveness. These numerical validations underscored the algorithm’s capability to swiftly reconcile the expected value of the target operator with its intended state, highlighting its potential for real-time quantum applications.

While the analytical demonstration of the proposed framework in this study has centred on bilinear and Gaussian systems, reflecting the inherent linearity within the formalism of quantum mechanics as dictated by the Liouville von-Neumann equation, it is important to acknowledge that our methodology is versatile enough to accommodate a wider spectrum of quantum scenarios. As detailed in Sect. 3.2, Theorem (2) presents a general solution that not only encompasses nonlinear dynamics but also extends to non-Gaussian distributions. This solution is particularly relevant for scenarios in quantum mechanics where nonlinearity plays a key role, such as in Bose-Einstein condensates and certain quantum optical configurations, as well as systems where non-linear effects emerge from interactions with non-linear environments or non-linear measurement processes. The flexibility of our methodology to accommodate these intricate quantum scenarios highlights its potential and innovative nature. However, the full realization of these sophisticated models extends beyond the scope of our current analytical methods, necessitating a shift toward computational and numerical strategies. These strategies are crucial for a comprehensive representation and management of the diverse behaviors encountered in quantum systems, including stochastic processes and nonlinear dynamics. This expansion of focus paves the way for new research directions. Future efforts will be dedicated to incorporating these complex dynamics and uncertainties within our framework, employing computational techniques to navigate the intricacies of increasingly complex quantum systems.

In summary, this study not only introduced a novel perspective on quantum system control but also underscored the efficiency and accuracy of this probabilistic approach. By considering quantum noise and system uncertainties, it pushed forward the boundaries of accuracy in quantum control. The results presented also provide promising indications for further exploration and applications in the quantum domain, marking a significant step forward in the development of quantum technology.