1 Introduction

The theory of open quantum systems deals with the dynamics of quantum systems interacting with the surroundings [1,2,3]. It allows to describe the out-of-equilibrium properties of quantum systems, providing a theoretical framework to assess the quantum measurement problem and giving the tools to investigate the deleterious effects of noise. For these reasons, its range of applicability is extremely wide, from solid-state physics to quantum field theory, from quantum chemistry and biology to quantum thermodynamics, and from foundations of quantum theory to quantum technologies [4,5,6,7,8,9,10,11,12].

Within quantum technologies, quantum key distribution (QKD) [13] represents a secure communication method which implements a cryptographic protocol involving components of quantum mechanics [14, 15]. Since Bennett and Brassard presented the first QKD protocol, called BB84 protocol [13], a significant progress has been made in this field. Nowadays, there is a significant progress in experiments for providing long-distance point-to-point QKD links [16,17,18], as well as establishing multi-site quantum networks [19], however before QKD can be widely adopted, it faces a number of important challenges as the coupling to environment that contributes to quantum bit error rate (QBER).

Generally, the dynamics of open quantum systems are described in terms of a master equation, i.e., the equation of motion for the reduced density operator describing the quantum state of the system. Master equations are either postulated phenomenologically or derived microscopically from a Hamiltonian model describing a quantum system interacting with the environment. Contrarily to the case of closed quantum systems, where the equation of motion describing the state dynamics is the Schrödinger equation, for an open quantum system, the general form of the master equation is not known. Only under certain assumptions, known as the Born–Markov approximation [20,21,22,23,24], one can derive a general equation in the so-called Lindblad form, which is able to describe the physical evolution of quantum states. When these assumptions are not satisfied, for example, for strong system–environment interaction and/or long-living environmental correlations, we enter the intricate regime of non-Markovian dynamics [25,26,27].

The simplest open quantum system model is a two-level system (a doublet) interacting with the modes of a harmonic oscillator. This model, known as Jaynes–Cummings (JC) model, was originally developed to study the interaction of atoms with the quantized electromagnetic field in order to investigate the phenomena of spontaneous emission and absorption of photons in a cavity [28, 29].

The JC model accurately describes the cavity quantum electrodynamics (QED) [30, 31], trapped ion experiments [32], and several setups in mesoscopic physics, where the qubit-oscillator model is essential in modeling superconducting qubits [33] with either coplanar transmission lines or nanomechanical resonators. Thanks to its simplicity, it can be used also in the description of quantum communication processes.

In this paper, we focus on the effect of dissipative dynamics in the BB84 QKD protocol due to the system–environment interaction. The JC model is applied to simulate the signal attenuation in an optical fiber, showing how the dynamics of the information transmission is affected. We compute the QBER to test the validity of the model, comparing the simulation results with the data provided by different experiments. The QBER allows not only to determine how the information process changes with distance but also the dynamical regime. For this reason, the last section is dedicated to a brief study on the type of dynamics that characterizes the information transmission process of the BB84 QKD protocol. Therefore, the difference between a Markovian and non-Markovian regime is highlighted by looking at the QBER as a function of the distance.

The paper is organized as follows: In Sect. 2, we discuss the amplitude damping model and connect it to the Jaynes–Cummings model. In Sect. 3, we introduce the quantum circuit model, based on ©Qiskit simulator, that reproduces the algorithm of the BB84 protocol to which the amplitude damping model is applied. Here, we discuss the results for the QBER comparing the data of the simulator to the experimental ones and showing that the dynamics of the QKD falls into a Markovian regime. Finally, in Sect. 4, we discuss the crossover from a Markovian to a non-Markovian dynamics. Finally, in Sect. 5, we give the conclusions.

2 Dynamics of Jaynes–Cummings model and amplitude damping

For an efficient quantum communication, protocol is relevant to identify which quantum operation describes the dissipation effects that take place when a state of a photon in an interferometer is subject to a scattering and attenuation. This process is well characterized by a quantum operation known as amplitude damping, which can be described as follows:

Let us consider a single optical mode in a quantum state \(a|0\rangle +b|1\rangle .\) The scattering of a photon can be modeled by inserting a partially silvered mirror, a beamsplitter, along the path of the photon. This beamsplitter allows the photon to couple to another single optical mode (which represents the environment) according to the following unitary transformation:

$$B|0\rangle (a|0\rangle +b |1\rangle )=a|00\rangle + b (cos\theta |01\rangle + sin \theta |10\rangle )$$

where \(cos\theta \) and \(sin \theta \) are the probability amplitudes that the photon is allowed to pass or be reflected.

By carrying out the trace on the environment, the quantum operation is given by

$$ \varepsilon_{AD} \left( \rho \right) = E_{0} \rho E_{0}^{\dag } + E_{1} \rho E_{1}^{\dag } $$

where \({E}_{k}=\langle k\left|B\right|0\rangle (k=\mathrm{0,1})\) is given by

$${E}_{0}=\left[\begin{array}{cc}1& 0\\ 0& \sqrt{1 -\gamma }\end{array}\right]$$
$${E}_{1}=\left[\begin{array}{cc}0& \sqrt{\gamma }\\ 0& 0\end{array}\right]$$

where \(\gamma ={sin}^{2}\theta \) can be defined as the probability of losing the photon due to reflections.

In the following, we focus on the dissipative dynamics within a QKD protocol [34, 35] described by the JC model. For this purpose, let us consider a qubit whose Hamiltonian has eigenstates \(|0\rangle \) and \(|1\rangle \), with respective eigenvalues zero and \({E}_{1}= \hslash {\omega }_{0}\), thus \({H}_{S}= \hslash {\omega }_{0} |1\rangle \langle 1|\). The system is coupled to a harmonic oscillators bath which describes the environment and is given by (\(\hslash =1\))

$${H}_{env}=\sum_{\omega } {\omega }_{0} {a}_{\omega }^{+}{a}_{\omega }$$

whose states are initially unoccupied. The system–environment interaction is described, in the rotating wave approximation [36], by

$$ H_{{int}} = \left( {\sum\limits_{\omega } {g_{\omega } } a_{\omega } } \right) \otimes |1\rangle \langle 0| + \left( {\sum\limits_{\omega } {g_{\omega }^{*} } a_{\omega }^{ + } } \right) \otimes |0\rangle \langle 1| $$

where \(a_{\omega }^{ + }\) and \(a_{\omega }\) are the creation and annihilation operators of the bath that couple to the singly occupied two-level system of the qubit, \(|10|\) and \(|01|\), and \(g_{\omega }\) are the coupling constants.

Passing to the interaction representation, we have

$$ \begin{aligned} H_{{int}}^{{\left( i \right)}} & = \sum\limits_{\omega } {g_{\omega } } a_{\omega } e^{{i\left( {\omega _{0} - \omega } \right)t}} \otimes |1\rangle \langle 0| \\ &\quad+ \sum\limits_{\omega } {g_{\omega }^{*} } a_{\omega }^{ + } e^{{ - i\left( {\omega _{0} - \omega } \right)t}} \otimes |0\rangle \langle 1| \\ &\equiv B\left( t \right) \otimes |1\rangle \langle 0| + B\left( t \right)^{*} \otimes |0\rangle \langle 1| \\ \end{aligned} $$

where \(B(t)=\sum_{\omega } {g}_{\omega }{a}_{\omega }{e}^{i({\omega }_{0}-\omega )t}\), and \({\omega }_{0}-\omega \) denotes the detuning between the system’s transition frequency \({\omega }_{0}\) and the frequency \(\omega \) of the environment, resulting in creation and destruction of a bosonic excitation in the system and in the environment.

\(W\)e can define a correlation function with the environment given by

$$ f\left( \tau \right){\text{ }} = \langle {\text{vacuum}}|B\left( \tau \right)B^{{\dag}} \left( 0 \right)|{\text{vacuum}}\rangle {\text{ }} = \sum\limits_{\omega } {\left| {g_{\omega } } \right|^{2} } e^{{i\left( {\omega _{0} - \omega } \right)\tau }} {\text{ }} = :\int {{\text{d}}\omega J\left( \omega \right)e^{{i\left( {\omega _{0} - \omega } \right)\tau }} } $$

where \(J(\omega )\) is the spectral function, which is assumed to be Lorentzian in the frequency:

$$J(\omega )=\frac{1}{2\pi } \frac{{Y}_{0}{\lambda }^{2}}{{\left({\omega }_{0}-\omega \right)}^{2}+{\lambda }^{2}}$$
(1)

with \({\omega }_{0}\) the qubit frequency, \({Y}_{0}\) is the coupling force and \(\lambda \) the amplitude at half height of the Lorentzian distribution.

If the system is initially in the state \({|\psi ,0\rangle }_{S}= {{C}_{0}|0\rangle }_{S} + {C}_{1}{|1\rangle }_{S}\) and the environment is in the vacuum state, the Hamiltonian dynamics leads to a state of the form:

$$ |\psi ,t\rangle = C_{0} |0\rangle _{S} |{\text{vacuum}}\rangle + C_{1} |1\rangle _{S} |{\text{vacuum}}\rangle + C_{1} |0\rangle \sum\limits_{\omega } {c_{\omega } } (t)|0\rangle _{S} |1_{\omega } \rangle $$

The temporal evolution of the system, given by the Schrödinger equation (\(H\left|\psi \rangle =E\right|\psi \rangle \)), is resolved analytically, and we find the probability amplitude \({C}_{1}(t)\) for the system to be in the excited state. It can be derived by the master equation for the JC model and is given by [28]:

$$C_{1} \left( t \right) = C_{1} \left( 0 \right)e^{{ - \lambda t/2}} \left[ {{\text{cos}}h\left( {\frac{{\lambda t}}{2}\sqrt {1 - 2{\mathcal{R}}} } \right) + \frac{1}{{\sqrt {1 - 2{\mathcal{R}}} }}{\text{sin}}h\left( {\frac{{\lambda t}}{2}\sqrt {1 - 2{\mathcal{R}}} } \right)} \right], $$
(2)

where \(\mathcal{R}=\frac{{Y}_{0}}{\lambda }\) is the ratio between the coupling force with the environment and the spectrum amplitude. The previous equation is obtained by assuming that the environment is a bosonic reservoir at zero temperature. As we see the result for probability, amplitude strongly depends on the parameter \(\mathcal{R}\). Once \(\mathcal{R}\) is given, we can define the decay rate or the amplitude damping as follows:

$$Y\left(t\right)= -2\mathcal{R}\left[\frac{\dot{{C}_{1} }\left(t\right)}{{C}_{1}\left(t\right)}\right]$$
(3)

where the overdot represents the time derivative.

From Eq. (2), a straightforward calculation shows that the time-dependent decay rate, defined in Eq. (3), takes negative values for certain time intervals whenever \(2\mathcal{R}<1\). In this case, the dynamical map is not CP-divisible and, therefore, non-Markovian. Moreover, if one looks at the excited state population, it oscillates since the qubit resonantly exchanges information with the central mode of the Lorentzian peak. This behavior is at odds with the Markovian case, when the decay rate is positive and the population of the excited states decays exponentially.

3 Simulation of BB84 QKD protocol

We proceed by applying the dynamical map of the amplitude damping above to the circuit model that reproduces the attenuation occurring in a real fiber using BB84 protocol (see Fig. 1). It consists of a controlled rotation along the Y-axis (\({U}_{3})\) and a CNOT. The starting polarization state is the anti-diagonal one \(|A\rangle \)=\({(|0\rangle }_{S}- {|1\rangle }_{S})/\sqrt{2}.\) The purpose of this application is to simulate the attenuation phenomena on the transmission channel (optical fiber), evaluating the effects in terms of QBER. The value of QBER corresponds to the probability that the state of the qubit is different from the initial one (see Fig. 2).

Fig. 1
figure 1

Circuit that reproduces the attenuation of BB84 protocol (in the polarization state \(|A\rangle \), which is the anti-diagonal one) subject to the action of the amplitude damping map. It consists of a controlled rotation along the Y-axis (\({U}_{3})\) and a CNOT. (Adapted from IBM Quantum. https://quantum-computing.ibm.com/)The parameter θ of the rotation along the Y-axis corresponds to =arccos(1()), where 1() is the probability amplitude for the system to remain in the excited state

Fig. 2
figure 2

Probability that the qubit is in the state \(|1\rangle \) or \(|0\rangle .\) In the specific case, QBER corresponds to 0.075 for the polarization state \(|A\rangle \)

The circuit is composed by 2 qubit. Qubit \({q}_{0}\) represents the system (Alice and Bob), and \({q}_{1}\) represents the environment with which the system interacts. Alice encodes 0 or 1 of a key in the qubit \({q}_{0}\) using single-qubit gates I or X, respectively. After that, we choose the basis “+” or “×” by applying single-qubit gates I or Hadamard gate H, respectively. Then, we apply a controlled rotation along the Y-axis (\({U}_{3})\) and a CNOT to simulate the environment interaction in the transmission line between Alice and Bob. Finally, Bob, which is physically located at the same site within our simulation, measures this qubit in the same basis “ + ” or “ × .”

In particular, we compare the data provided by the qiskit simulator with a real apparatus data running the BB84 QKD protocol [37,38,39]. In Eq. (2), the value of \(\lambda \) is given by \(\lambda = v a \frac{\mathrm{ln}(10)}{10}\), where \(v\) is the light speed in the fiber (we fix it equal to \(v=203390\mathrm{ Km}/\mathrm{s}\)) and \(a\) is the fiber loss, expressed in dB/Km. The value of \(\mathcal{R}\) is obtained by applying the best fit procedure to the experimental data, in such a way that the mean square deviation of the QBER between the experimental data and those of the simulator is minimal.

Before discussing the results of the simulation, let us briefly describe the experimental setups from which the data are taken. The scheme of the experimental apparatus is shown in Fig. 3.

Fig. 3
figure 3

Experimental setup of single-photon QKD as taken from Ref. [39]. It is a test-bed system, i.e., a time-bin encoding QKD system based on the standard BB84 protocol

The experimental setup is based on two asymmetric Mach–Zehnder interferometers (AMZI) that simulate the two interpreters of the QKD protocol, Alice and Bob. The source simulating Alice is a single-photon source (SPS) that emits an optical pulse, passing through the first AMZI is converted into a pair of pulses at fixed polarization. The first pulse is used for the time-bin qubit while the other is used to track the position of the SPS. Subsequently, the relative phase of the double pulse is modulated using a phase modulator (PM) with a value chosen randomly from θ = {0, π/2, π, 3π/2}. The double pulse arrives at Bob's site after traveling through a single-mode fiber (SMF) core. At this point, the pulse polarization is randomized using a polarization scrambler (PS). Then, the double pulse is fed into the second AMZI, which acts as an analyzer for the base X associated with θ = {0, π} and for the Y-basis associated with θ = {π/2, 3π/2}. The PS and the AMZI constitute a BB84 decoder. The photon arrival gate provides both the chosen base and the measurement result. The arrival is detected by four single-photon detectors (SPDs) connected to each gate.

Finally, both the receiving port of the photon and time are recorded using a time interval analyzer (TIA).

Below we present a comparison between the results of our simulations and the real apparatus data (see Fig. 4) from the experiments [37,38,39].

Fig. 4
figure 4

QBER as a function of the distance traveled by the photon. The orange points represent the result provided by the simulator, while the blue ones represent the experimental data. Experimental data shown in panel (b) are taken from [37], in panel (c) are taken from [38], while in panel (a) are taken from [39]. The speed of light in the fiber is fixed for all simulations and equal to \(v =203390\frac{Km}{s}.\) The value of \(a\) is given in all the cases by \(a\,=\,0.21\,\frac{dB}{Km},\) while \(\mathcal{R}\) is obtained as the best-fitting parameter of the experimental data. In particular, for the three cases analyzed, we have obtained (a) \(\mathcal{R}\,=\,0.11\,\pm\, 0.03, (\)b) \(\mathcal{R}\,=\,0.12\,\pm\, 0.04\); (c) \(\mathcal{R}\,=\,0.36\,\pm \,0.01\)

The simulations give the probability that the state of the qubit (the photon) is altered during the transmission in the channel, i.e., the QBER.

Specifically, the QBER trend is reported as a function of the travel distance of the signal and compared with the experimental results for three different communication systems based on optical fibers. For such systems, the typical attenuation factor a is provided while the value of \(\mathcal{R}\) is determined as the best-fitting parameter (see caption of Fig. 4) and varies between 0.11 and 0.36. The results show that the model used fits the experimental data with good agreement, and therefore, it can be used to provide an estimate of the information loss in a QKD protocol.

Further analyzing the expression of \({C}_{1}(t)\), defined in Eq. (2), a straightforward calculation shows that the time-dependent decay rate \(Y(t)\), defined in Eq. (3), takes negative values whenever \(2\mathcal{R}\ge 1.\) In this case, the dynamics become non-Markovian [40]. For the considered experiments, the \(\mathcal{R}\) values that give the best fit to the experimental data are lower than 1/2 showing that the dynamics of BB84 QKD protocol is Markovian.

4 Markovian versus non-Markovian dynamics

In this section, we use the amplitude damping model above to describe the crossover from a Markovian to a non-Markovian dynamics in the QKD. In fact, as shown in Eqs. (2) and (3), the dynamics of the amplitude damping model strongly depends on the parameter \(\mathcal{R}\). The QBER dependence on \(\mathcal{R}\) is shown in Fig. 5.

Fig. 5
figure 5

QBER as a function of the distance traveled by the photon for different \(\mathcal{R}\) values. The attenuation of the optical fiber a is fixed to 0.2 dB/Km and the light speed in the fiber to \(v =203390\frac{Km}{s}\)

As \(\mathcal{R}\) increases, the QBER trend evolves toward a non-Markovian dynamics, as can be observed from the typical oscillating behavior that appears at short distances. As the distance increases, the QBER saturates at a common threshold value for all values of \(\mathcal{R}\). Specifically, we observe a monotonic increase in the QBER or decay of the excited state population in the Markov case (\(2\mathcal{R}\le 1)\), while in the non-Markov one, the population oscillates since the qubit exchanges energy with the mode described by the Lorentzian peak, i.e., the oscillations may be understood as a virtual absorption and re-emission of a quantum of energy with the environment.

Finally, in Fig. 6, we show the behavior of the QBER as a function of the attenuation factor a. In particular, the increase in a determines an increase in the QBER for a fixed distance at short distances, while it saturates at the same value (\(\approx 0.5)\) at large distances.

Fig. 6
figure 6

As shown in Fig. 5 for \(\mathcal{R}=1\) and a = 0.3 dB/Km (black curve) and a = 0.1 dB/Km (red curve)

5 Conclusions

In this paper, we focused on the dissipative dynamics in a BB84 QKD protocol to take into account the system–environment interaction. The Jaynes–Cummings model was applied to simulate the signal attenuation in an optical fiber, showing how the dynamics of the information transmission process can be well described using a quantum processor. The results for the quantum bit error rate (QBER) were compared with the experimental data coming from an apparatus for the BB84 QKD protocol, obtaining a good agreement and therefore supporting the validity of the model used. The comparison with the experimental data showed that the QKD dynamics always falls in the Markovian regime of the Jaynes–Cummings model.

Furthermore, we investigated the transition between Markovian and non-Markovian dynamics of the open system during the information transmission in the BB84 protocol, demonstrating how the evolution of the Jaynes–Cummings model varies in a crucial way by varying the parameter \(\mathcal{R}\).

We conclude that quantum processors are versatile and robust testbeds for verifying a number of properties of QKD and open quantum systems. This paves the way to a deeper understanding of other fundamental aspects of quantum information and communication in the presence of coupling to the environment.