1 Introduction

The interaction between a quantum system and its environment is primarily responsible for the loss of essential quantum features, such as quantum coherence and entanglement, which is widely known as decoherence [1, 2]. However, it is these fragile features that make quantum systems advantageous in many different information processing tasks which significantly outperform their classical counterparts [3]. Therefore, it is compulsory to protect the quantum systems from the decohering effects of their environment to employ them in quantum computing protocols.

There are several well-known strategies for protecting a quantum system [4,5,6,7]. One of the most effective ways is the dynamical decoupling (DD) protocols which have been studied both theoretically [8,9,10,11,12,13,14,15,16,17] and experimentally [18,19,20,21,22,23,24]. The main idea of DD is to preserve the quantum features of the subject system by applying external pulses to eliminate the effect of the environment. Mathematically, this corresponds to introducing an external control Hamiltonian for the subject system, which cancels out the undesired dynamics arising from the system–environment coupling. Instead of applying a sequence of pulses, one can also protect the quantumness of a system by applying continuous external fields which is known in the literature as continuous dynamical decoupling (CDD) [25,26,27,28,29,30,31,32,33,34,35]. Experimentally, application of two qubit gates is fairly more natural when the system is protected by CDD [36,37,38] and also, CDD plays an important role in reducing the error induced by environmental perturbations in nitrogen vacancy centers in diamonds which are powerful candidates for the applications in the field of quantum information technologies [34, 39,40,41].

Besides the CDD protective scheme, one can also explore other aspects that may emerge during the dynamics. For certain system–environment interactions, there are some parts of the system Hilbert space that are unaffected by the decohering dynamics, therefore preserving the quantum information encoded in them. Such parts of the Hilbert space are called decoherence-free subspaces (DFSs), and they also constitute a very important place among the strategies to preserve quantum information [6, 7]. Encoding the desired information in these parts of the Hilbert space, of course, presents a very natural opportunity to transfer or process it without getting affected by the decoherence [42, 43], and this approach has also found many experimental applications [44,45,46,47,48,49,50,51,52].

In this work, we propose a model involving two qubits interacting with each other as well as with a bosonic environment. We assume that it is possible to control the exchange interaction between the qubits by changing their mutual distance. By varying this effective parameter, we both tune the interaction strength between the qubits and determine the way they couple to the environment. To be more precise, when the qubits are well separated, the interaction between them vanishes and they can be considered as if they are coupled to independent environments due to the large relative separation between them in the position space. In the opposite limit, in which qubits are close to each other, the interaction strength reaches its maximum and they are assumed to be coupled to a common environment. Our model is built in such a way that the transition between these limits is gradual, and both inter-qubit interaction strength and the environment coupling change simultaneously, since they are both controlled by the same parameter. In the absence of an environment, the interaction between the qubits is chosen so that after a certain time, qubits become maximally entangled. However, due to the environmental noise, which is present in realistic experimental situations, it is not possible to reach this ideal entangled state. Such degrading effects of environment on the entanglement qubits are simulated in this work by amplitude damping and dephasing channels. We then present a CDD scheme designed specifically for our model to eliminate these harmful effects of the environment. Moreover, in some certain cases, for example, depending on the final positions of qubits, we show that it is possible end up with a state in a DFS, which is indifferent to external noise even when the protection is switched off.

This paper is organized as follows. In Sect. 2, we present our CDD strategy and introduce the decoherence model that we consider together with its solution. Our results are presented in Sect. 3, and in Sect. 4 we conclude.

2 The model

In the interaction picture, the total Hamiltonian of the system under consideration is given in the form

$$\begin{aligned} H(t)=H_{\mathrm{gate}}+H_{\mathrm{env}}+U^{\dagger }_cH_{\mathrm{int}}U_c. \end{aligned}$$
(1)

Here, \(H_{\mathrm{gate}}\) defines the interaction between the two qubits which performs the entangling \(\sqrt{\textsc {SWAP}}\) gate operation and \(H_{\mathrm{env}}\) denotes the Hamiltonian of the environment. The last term includes the system–environment interaction \(H_{\mathrm{int}}\), and \(U_c\) is the time evolution operator corresponding to the CDD control Hamiltonian \(H_c\). The interaction picture transformation leaves \(H_{\mathrm{env}}\) intact since \(U_c\) only affects the Hilbert space of the protected system. This is also true for \(H_{\mathrm{gate}}\), which will be evident shortly after.

The tunable Heisenberg exchange interaction between the qubits can be written as

$$\begin{aligned} H_{\mathrm{gate}}=J(t){\varvec{\sigma }}^{(1)}.{\varvec{\sigma }}^{(2)}, \end{aligned}$$
(2)

for \(\hbar = 1\) and \({\varvec{\sigma }}^{(s)} = \hat{\mathbf{x}}\sigma _{x}^{(s)}+\hat{\mathbf{y}}\sigma _{y}^{(s)}+\hat{\mathbf{z}}\sigma _{z}^{(s)}\), where \(\sigma _{i}^{(s)}\)’s (\(s = 1,2\)) are the Pauli matrices acting on qubit s. In our model, we interpret the time dependence of J as being adjusted due to the alteration of the qubit separation. Without loss of generality, we assume that coupling between qubits is in the form of a Gaussian function of time given as \(J(t) = A\exp [-B(t-\tau /2)^2]\) where \(\tau \) is the total interaction time. Therefore, by using the known integral \(\int _{-\infty }^{+\infty }J(t){\hbox {d}}t = A\sqrt{\pi /B}\), we can safely assert the constraint \(B = (8A)^2/\pi \) as long as \(\tau /2\) is greater than three-sigma interval of J. We make use of two different J profiles specified by their peak heights A corresponding two different physical situations which will be explained later. From this point on, we will refer to the time t as being scaled by \(\tau \).

There are many advantages of considering a tunable exchange interaction between the qubits, for both the theoretical and experimental aspects of our model. First of all, it can be realized in double-quantum dot systems by controlling the intermediate tunnel barrier [53]. Among others such as voltage-controlled exchange [54], one of the possible ways of achieving this control is to adjust the separation between the dots [55, 56], which actually constitutes the motivation behind our aforementioned interpretation. It has also been shown experimentally that these kinds of couplings can be realized with neutral atoms trapped in an optical lattice [57], where initially separated and fully isolated Rubidium atoms are then gradually merged to occupy the same physical location and are allowed to interact. By this way, it is possible to create a tunable exchange constant J(t), and hence, to realize SWAP and \(\sqrt{\hbox {SWAP}}\) operations. Besides, Eq. (2) remains invariant under global rotations due to its scalar product form. As a result, the external control fields that are applied to protect the gate do not affect the gate operation itself, which in principle makes the concatenation of the protection mechanism and the entangling operation conceivable. Lastly, it is worthy mentioning that the tunable Heisenberg interaction alone is sufficient for universal quantum computation, i.e., it suffices to implement any quantum circuit without the necessity of having access to single-qubit operations [58], which is essential for quantum information processing.

The environmental Hamiltonian of both qubits is represented by a single thermal bath of harmonic oscillators. However, we assume that if the qubits are well separated, their interaction with the environment can effectively be regarded as if they are in contact with two independent environments, e.g., as for the case of tunable charge qubits [59]. Therefore, we define the environmental Hamiltonian \(H_{\mathrm{env}}\) in two different ways, depending on whether the qubits are coupled with a common environment (CE) or with independent environments (IEs). In the case of a CE, we have \(H_{\mathrm{env}} = \sum _{k} \omega _{k} {a_{k}}^{\dagger }a_{k}\), where \(\omega _{k}\) is the frequency of the kth normal mode of the environment, and \(a_{k}\) and \({a_{k}}^\dagger \) are the annihilation and creation operators, respectively. In the case of IEs, it can be written as \(H_{\mathrm{env}} = \sum _{s=1}^{2}\sum _{k} \omega _{k}^{(s)}{a_{k}^{(s)}}^{\dagger }a_{k}^{(s)}\), where \(\omega _{k}^{(s)}\) is the frequency of the kth normal mode of the sth qubit environment. We assume that IEs are identical, i.e., the frequencies \(\omega _{k}^{(s)}\) are the same and \(\omega _k\) for both.

The qubit pair interacts with this bosonic environment according to the interaction Hamiltonian which is given by

$$\begin{aligned} H_{\mathrm{int}}=\mathbf{B}^{(1)}\cdot {\varvec{\sigma }}^{(1)}+\mathbf{B}^{(2)}\cdot {\varvec{\sigma }}^{(2)}, \end{aligned}$$
(3)

where \(\mathbf{B}^{(s)}=B_{x}^{(s)}{\hat{\mathbf{x}}}+B_{y}^{(s)}{\hat{\mathbf{y}}}+B_{z}^{(s)}{\hat{\mathbf{z}}}\) are Hermitian operators that act on the environmental Hilbert space. Accordingly, we take \(B_{m}^{(s)} = \sum _{k}\left( \lambda _{m}g_{k}^{*}a_{k}^{(s)}+ \lambda _{m}^{*}g_{k}a_{k}^{(s)\dagger }\right) \), where \(g_{k}\) are coupling constants. In the cases of CE or IE, Eq. (3) reads as

$$\begin{aligned} H_{\mathrm{int}}^\mathrm{CE}= & {} \left( {\varvec{\sigma }}^{(1)} + {\varvec{\sigma }}^{(2)}\right) \cdot \left( {\varvec{\lambda }}B + {\varvec{\lambda }}^*B^\dagger \right) , \end{aligned}$$
(4)
$$\begin{aligned} H_{\mathrm{int}}^\mathrm{IE}= & {} {\varvec{\sigma }}^{(1)}\cdot \left( {\varvec{\lambda }^{(1)}}B^{(1)} + {\varvec{\lambda }^{(1)}}^*{B^{(1)}}^\dagger \right) \nonumber \\&+\,{\varvec{\sigma }}^{(2)}\cdot \left( {\varvec{\lambda }^{(2)}}B^{(2)} + {\varvec{\lambda }^{(2)}}^*{B^{(2)}}^\dagger \right) . \end{aligned}$$
(5)

For the CE case, \({\varvec{B}}^{(s)} = {\varvec{\lambda }}B+{\varvec{\lambda }}^{*}B^{\dagger }\) where \({\varvec{\lambda }}\) is an arbitrary complex three-dimensional vector and B is a scalar operator that acts on the environmental Hilbert space. Similarly, for the IE case, \(B^{(s)}\) acts for the sth qubit and \({\varvec{\lambda }^{(s)}}\) is the respective complex vector. As we have explained earlier, we will consider a smooth transition from IE to CE and then, CE to IE as qubits get closer and get departed from each other during the interaction time \(\tau \), respectively. Therefore, we combine Eqs. (4) and (5) into one effective Hamiltonian modeling the environmental interaction as

$$\begin{aligned} H_{\mathrm{int}}= [1-\xi (t)]H_{\mathrm{int}}^\mathrm{IE}+ \xi (t) H_{\mathrm{int}}^\mathrm{CE}, \end{aligned}$$
(6)

where \(\xi (t) = \exp [-[c(t-0.5)]^{2d}]\) defines the transition between the two interpretations of system–environment coupling as the qubits move with respect to each other. We will arbitrarily fix the parameters of \(\xi (t)\) as \(c = 2.86\) and \(d = 9\) so that it yields a transition profile of smoothly interchanging low and high plateaus as we desire (see Fig. 1). After having \(H_{\mathrm{int}}\) fixed, now we define the \(\sqrt{\textsc {SWAP}}\) in two different ways as mentioned earlier. (i) A short-ranged interaction (SRI) scheme denoted by \(J_\textsc {sri}\) with \(A=2.2\), where whole interaction effectively arises and vanishes in the CE. (ii) A long-range interaction (LRI) scheme with parameters \(A=1.15\), denoted by \(J_\textsc {lri}\) where whole interaction effectively arises and vanishes in the IE. We note that the means of both J(t) and \(\xi (t)\) coincide, and they define the middle of the whole interaction at \(t= 0.5\). All parameters here were chosen especially to study the integration between CDD and DFS in different experimental situations.

Fig. 1
figure 1

Schematic representation of the presented model. At \(t=0\), the non-entangled qubits are well separated so that we assume the Heisenberg interaction among them is zero (\(J=0\)) and also, they are considered as interacting with two independent environments (IEs). As qubits get closer to \(t\in [0,0.5]\), the interaction strength J increases and the IE behavior gradually turns to a common environment (CE) behavior, which is characterized by the parameter \(\xi \) as defined in Eq. (6). The same mechanism is reversed when \(t\in [0.5,1]\). We choose J(t) in two different ways where \(J_\textsc {sri}\) (\(J_\textsc {lri}\)) corresponds to a short (long)-range interaction effectively arising and vanishing in the CE (IE) region. In both cases, interactions are adjusted to lead the qubit pair evolve into a maximally entangled state in the absence of environmental effects. During the whole interaction time \(t \in [0,1]\), the system is kept in an external field \(\varvec{\Omega }(t)\) as given in Eq. (11) to protect this entanglement operation from the environmental noise with an appropriate CDD procedure introduced in the text

Before moving on to the introduction of the control Hamiltonian, we need to introduce a necessary condition that must be satisfied by the control Hamiltonian in order for it to completely eliminate the effects of environment which can be mathematically expressed as [8,9,10,11,12,13,14,15,16,17]

$$\begin{aligned} \int ^{\tau }_{0} U^{\dagger }_{c}(t)H_{\mathrm{int}}U_{c}(t) \hbox {d}t=0, \end{aligned}$$
(7)

where \(\tau = 2\pi /\omega \). In fact, Eq. (7) is derived from a Magnus expansion of the total Hamiltonian given by Eq. (1) in the limit \(\tau \rightarrow 0\), where, in general, only the first term in this expansion survives. Therefore, although in the ideal case of \(\tau \rightarrow 0\) this approach works fine, in this work, we will consider the more realistic case of finite \(\tau \) and expect Eq. (7) to also guide us in this case.

We propose the form of the control Hamiltonian that protects the entangling gate operation realized by Eq. (2) to be

$$\begin{aligned} H_{c}(t)={\varvec{\Omega }}(t)\cdot \left( {\varvec{\sigma }}^{(1)}+{\varvec{\sigma }}^{(2)}\right) , \end{aligned}$$
(8)

where \({\varvec{\Omega }}(t)\) is the external field configuration that needs to be applied. It has been shown that for Eq. (7) to be satisfied by the evolution operator corresponding to Eq. (8), the following equality has to be satisfied [30]

$$\begin{aligned} U_{c}(t)=U^{(2)}(t)U^{(1)}(t)=U^{(1)}(t)U^{(2)}(t), \end{aligned}$$
(9)

due to the fact that \({\varvec{\sigma }}^{(1)}\) and \({\varvec{\sigma }}^{(2)}\) commute, where

$$\begin{aligned} U^{(s)}(t)=\exp \left( -i\omega t n_{x}\sigma _{x}^{(s)}\right) \exp \left( -i\omega t n_{z}\sigma _{z}^{(s)}\right) , \end{aligned}$$
(10)

for \(s=1,2\). As a consequence, we obtain the external field configuration as

$$\begin{aligned} {\varvec{\Omega }}(t)=\hat{\mathbf{x}}n_{x}\omega +n_{z}\omega \left[ \hat{\mathbf{z}} \cos \left( n_{x}\omega t \right) -\hat{\mathbf{y}} \sin \left( n_{x}\omega t \right) \right] , \end{aligned}$$
(11)

with conditions imposed by Eqs. (9) and (10). Here, \(\omega = 2\pi /\tau \), \(n_{x}\) and \(n_{z} \ne n_{x}\) are nonzero integers. This field configuration is composed of a combination of a static field along the x-axis and a rotating field around on the yz plane. In this form, \(H_c\) is capable of protecting our two-qubit system against both amplitude damping and dephasing errors. It is possible to consider a simpler field configuration by setting \(n_z = 0\) and still possible to provide protection solely against dephasing errors with a static field in the x-direction. It is worthy mentioning here that both dephasing and amplitude damping noises solely arise due to the interaction between two qubits and the environment. We assume that all other possible sources of noise, e.g., technical limitations caused by the driving of qubits, are negligible in our work. In other words, we are aware of the fact that amplitude fluctuations in the driving field can also introduce a noise to the system qubits; however, we assume that such fluctuations are unimportant for protection scheme considered in this work.

The reduced dynamics of the two qubits under consideration, which is dictated by the total Hamiltonian Eq. (1), is governed by a Redfield master equation. The derivation and the solution of this master equation are elaborated in “Appendix,” and also, an even more detailed explanation can be found in Refs. [30, 31].

3 Results

In the following sections, we consider two different scenarios to introduce environmental noise on the entangling dynamics of our pair of qubits. First, we assume that dephasing is the only source of noise acting on the system and we investigate how well our system is protected against it for different values of the protective field strength. We also adjust the final positions of the qubits to leave them in contact with a CE after J vanishes, so that we are able to make the two-qubit state to stay in a DFS. Second, we also let the amplitude damping to act on qubits together with dephasing and we examine how our protection scheme works in this case. Moreover, we show how the dynamics of entanglement is affected when either one of the error mechanisms is left as a residual error, i.e., no protection is provided against it.

The initial state of our two qubit system is \(\rho _0 = |\uparrow \downarrow \rangle \langle \uparrow \downarrow |\). In the absence of any external noise and protection, \(\sqrt{\textsc {SWAP}}\) gate—for both SRI and LRI—yields the maximally entangled state \(\rho _\tau = [a{|{\uparrow \downarrow }\rangle }+a^*{|{\downarrow \uparrow }\rangle }][a^*{\langle {\uparrow \downarrow }|}+a{\langle {\downarrow \uparrow }|}]\) with \(a = (1+i)/2\) at the end of the dynamics. Therefore, we examine the concurrence of this state with respect to time as a figure of merit when both the noise and the protection are introduced. The temperature of the environment(s) is chosen to be \(T = 0.2\) K, and we fix the relevant time scale in the dynamics to \(\tau = 10^{-9}\) s. The environmental spectral density is chosen to be ohmic. Recall that, in all the different scenarios that will be considered in the following sections, initially the qubits are well separated, not interacting and in contact with the independent environments.

Fig. 2
figure 2

Concurrence of the two-qubit state \(\rho _t\) along the interaction time \(\tau \) for increasing values of the protection \(n_x\). For all cases, the system is only subjected to dephasing, and hence, the \(n_z\) component of the protective field is set to zero. The abbreviations SRI and LRI correspond to short- and long-range interaction schemes, respectively. In a and b, the protection is maintained during the time evolution. In c and d, the protection is shut down (\(n_x=0\)) after \(t=0.75\), whereas in d the qubits are also halted after this time. Inset of c represents the DFS occupancy \(D_t\) at time t, where 1 (0) implies that the state \(\rho _t\) is completely in (out of) the DFS. No further change in concurrence is observed for larger values of \(n_x\). In d, the curves coincide for \(n_x=0\) and \(n_x=8\)

3.1 Dephasing

In this section, we assume that the errors introduced on the system are caused only by dephasing. Therefore, we do not need to provide any protection against amplitude damping errors. We modify our protective field for this case by simply setting \(n_z = 0\). In Fig. 2, we represent how the entanglement between the two qubits changes in time for different values of the protection strength, namely for \(n_x = 0,1,2\) and 8, where \(n_x = 0\) means no protection at all.

While in Fig. 2a, c, d the coupling between the qubits effectively arises and vanishes when they are interacting with a common environment, Fig. 2b presents the same situation but this time for independent environments (see Fig. 1). In other words, the former are the cases of a SRI and the latter is the case of a LRI among the qubits, as mentioned in Sec. 2. First thing to notice in all cases is that as the strength of the external protection field increases, our CDD scheme works better and \(n_x=8\) proves to be sufficient to fully protect the entangling gate operation. Even with \(n_x = 2\), it is possible to achieve a concurrence value of \(\approx 0.9\). Thus, the present CDD protocol, which had proven to work for static inter-qubit coupling [30, 31], also performs completely well for the tunable case in question. Another point which also applies for all cases is that in the absence of any protection, qubits are getting highly entangled during a short time period before they start to get gradually non-entangled because of the noise induced by the interaction with IEs. The concurrence for \(n_x = 0\) even exceeds that of the \(n_x = 2\) and reaches to the level of \(n_x = 8\). Nevertheless, the protection is still required if we take into account the whole interaction time \(\tau \), i.e., setting the protection strength to at least \(n_x = 8\) is inevitable to obtain highly entangled states at \(t = \tau \) for Fig. 2a, b. For the higher values of \(n_x > 8\), no further change in concurrence takes place.

We now turn our attention to the more interesting point of utilizing DFSs for protection after the qubits are entangled. First of all, in general, a DFS is only possible when the qubits are interacting with a common dephasing bath. In particular, the Hilbert space of two qubits, DFS is spanned by the following set of basis states \(\mathcal {D} = \{{|{\uparrow \downarrow }\rangle }, {|{\downarrow \uparrow }\rangle }\}\). We have stated that, in the ideal case of isolated qubits, the initial state we consider ends up in a maximally entangled state in this subspace. Therefore, we want to see whether it is also possible to make use of this naturally occurring phenomenon for protection. At this point, we emphasize that there are two crucial requirements that need to be satisfied in order to maintain the existence of the two-qubit state in DFS. First of all, we must keep the qubits interacting with a CE after the inter-qubit interaction does its duty of entangling the qubits and vanishes. We can manage to do this in the SRI setting where the interaction begins and ends in the CE regime. The second condition is to turn the CDD field off since it drastically drives the two-qubit state into and out of the DFS in time. To quantify how well the state \(\rho _t\) is contained in the DFS, we can define

$$\begin{aligned} D_t=\frac{1}{\xi _t}\sum _{i,j\in \mathcal {D}} \left| \left\langle {i}\right| {\rho _t}\left| {j}\right\rangle \right| . \end{aligned}$$
(12)

Here, \(\xi _t^{-1}\) is the normalization factor which is obtained by summing over the absolute values of all elements in \(\rho _t\). Thus, while \(D_t = 1\) implies a complete confinement of the \(\rho _t\) in the DFS, the contrary case of \(D_t = 0\) indicates that the state is completely out of the DFS. In Fig. 2c, we show the dynamics of entanglement when the protection is turned off after \(t = 0.75\) for a SRI scenario by knowing in advance that the \(\sqrt{\textsc {SWAP}}\) gate operation is completed and the qubits are maximally entangled before \(t = 0.75\). It can be seen from the inset that \(D_t\) approximately reaches its maximum value with a period of 0.25. For this reason, \(t = 0.75\) is a carefully selected time where the two-qubit state is well confined in the DFS. Therefore, after the protection is turned off, entanglement remains at its maximum value for a relatively short time, during which the qubits are still in a DFS, and then, it starts decreasing as the CE transforms into IE gradually, making DFS disappear. Such a behavior in the dynamics of entanglement can be understood by noting that the first of the aforementioned conditions to form a DFS, namely interaction with a common bath, is no longer satisfied. The results for the most ideal case are presented in Fig. 2d in which case we both turn the protection off and stop altering the position of the qubits after the time \(t = 0.75\). In this scenario, one can observe that even if there exists no external field to protect the entanglement between the qubits against the dephasing environment, entanglement remains intact since we keep the qubits in a DFS by maintaining a CE. Therefore, under these conditions, it is actually not necessary to provide an external protection to the qubits at all since the nature of the dynamics guides the system to stay in a DFS. Obviously, the choice of the initial state \(\rho _0\) is also relevant here because an initial state defined outside of DFS would not yield the same results. On the other hand, if one intends to keep the protection field on at all times, then the protection field should be sufficiently strong to preserve the entanglement in the system. If the protection the field is not strong enough, i.e., \(n_x = 1, 2\), the situation becomes worse than the case of no protection at all since such a case neither provides sufficient protection to reach the levels of entanglement obtained in \(n_x = 0\) case, nor lets the system stay in the DFS. All the same, the \(n_x = 8\) case in Fig. 2d is an example of how one can use different techniques of preserving the quantumness of a state complementary to each other. Although we have seen that it is not necessary in the present scenario, it should be possible to protect a system from noise by applying a CDD scheme up until the system enters a DFS before turning off the external field. In the next section, we will present an example along these lines.

3.2 Dephasing and amplitude damping

In this section, we present our results when both amplitude damping and dephasing errors are present. We consider two different scenarios for the protection of the qubits’ dynamics. On the one hand, we provide protection against both decoherence mechanisms. On the other hand, we let either dephasing or amplitude damping affect the system, i.e., supply no protection against it, while providing protection against the other. We also refer to this second case as leaving one of the error mechanisms as a residual error on the dynamics. These studies are relevant since it is experimentally simpler to implement a partial protection compared to the full protection. For example, a simple static field is enough to protect the system, while the full protection requires a more complicated field.

Fig. 3
figure 3

Dephasing and amplitude damping affecting the system together: The upper panel, where qubits are halted at a \(t=0.755\) and b \(t=0.72\), represents the advantage of leaving dephasing as a residual error, i.e., one can utilize both a DFS and a CDD at the same time to eliminate the undesired effects of the environmental noise. In a and b, the dashed lines represent the case where dephasing is kept as a residual error. For the solid lines, the dephasing protection is applied (\(n_x=8\)) until the qubits are halted, and then, it is turned off. In the middle panel, marked by c and d, amplitude damping is left as a residual error by setting \(n_z=0\), while in the bottom panel, shown by e and f, qubits are protected against the both error mechanisms. No considerable change is observed for larger values of \(n_x\) and/or \(n_z\)

Motivated by the results in Fig. 2d, which shows the natural evolution of qubits in a DFS during the dynamics without any protection against dephasing, we want to further investigate this case in a slightly different setting. On top of dephasing, we now assume amplitude damping environment is also acting on our system and we provide full protection against it at all times. Fig. 3a, b presents our results on the described setting and compares the cases of no protection with protection turned off at \(t = 0.755\) and \(t = 0.72\) for the dephasing, respectively. We know that the entangling gate operation has already ended at these time instants, and we stopped both qubits thereafter to leave them in contact with the CE similar to the case of Fig. 2d. Intuitively, one can regard this specific time assignment as a way to gauge how an imperfect timing of shutting the dephasing protective field down would change the entanglement dynamics after that point in time. We observe that in the present setting, it is possible to reach the desired maximally entangled state. The dynamics of the two-qubit density matrix entirely stays inside the subspace spanned by \(\mathcal {D}\), which is the same subspace as the DFS occurs. However, it is not possible to directly say that a DFS forms in the present case, due to the fact that there is also an amplitude damping environment and the external field to cancel its effect on the system. Even so, we think the that the perfect generation of the entangled state is because of the reminiscent effect of the DFS. All in all, this result sets an example of the aforementioned hybrid utilization of external and natural protection mechanisms. We now turn our attention to the partial dephasing protection cases that are presented as red solid curves in Fig. 3a, b. Recall that the external field that protects against dephasing errors also makes the state of our system to oscillate in and out of the DFS. We observe that higher confinement inside the DFS at the time we close the dephasing protection results in a slower decay in the entanglement. Since for \(n_x = 0\) there is no external dephasing protection field to perturb the system out of the DFS, the performance of the protocol is better in that case as compared to the partial protection.

In Fig. 3c, d, the amplitude damping mechanism is left as a residual error, that is, there is no protection against it \(n_z = 0\). The former is when the interaction is long ranged, while the latter represents the case when the interaction is short ranged. Both figures show qualitatively the same behavior for which in none of them is it possible to reach maximal entanglement. The amount of entanglement follows a decreasing trend after \(t\approx 0.5\) after the initial increase. We can conclude that it is possible to reach a certain level of entanglement while leaving amplitude damping channel affecting the qubit system; however, the generated level of entanglement is not sustainable over the course of the dynamics.

In Fig. 3e, f, the behavior of the entanglement is considered for LRI and SRI schemes, respectively. In these figures, we provide protection against both amplitude damping and dephasing for different protection strengths, where \(n_x = n_z = 0\) corresponds to no protection at all for comparison. Examining graphs closely, similar to the previous section, we can conclude that as the external field strength is increased, the CDD scheme works better on the system. Although it is possible to reach the maximal entanglement after the gate operation, the protection is not as stable as the sole dephasing setting even for the highest provided external field strengths \(n_x = 16\) and \(n_z = 32\). This instability, however, can be further improved by increasing the strength of the CDD field, but we chose to stick to these modest strengths since they are sufficient to demonstrate that proposed protection scenario works well under these circumstances. One more observation is that there is no difference between LRI and SRI cases for any protection strength except that entanglement reaches its maximum slightly earlier in the latter one. This is actually expected since SRI is completed faster than the LRI by definition.

4 Conclusion

We proposed a CDD strategy for protecting the dynamics of two qubits from the decohering effects of the environment (amplitude damping and/or dephasing), where we can tune both the inter-qubit interaction strength and qubit-environment couplings. We chose the effective distance between the qubits as our tuning parameter, such that it both adjusts the strength of qubit–qubit interaction and varies the qubit–environment couplings gradually between IE and CE. The qubits get entangled due to the specific type of interaction between them, and we employed concurrence as the figure of merit for our protection scheme. We showed that the entangling gate operation, which is mediated by the Heisenberg interaction, can be preserved almost perfectly if the strength of the external protective field is strong enough for both decoherence channels. Although the presented model has its own limitations and relies on a set of assumptions, we believe that it could potentially serve as an example to provide a direction for the protection of entanglement in open quantum systems.

An interesting finding in this work is the possibility of utilizing DFS in the Hilbert space of the qubits under some specific conditions. We observed that if the inter-qubit coupling starts and ends inside the region where the qubits are in contact only with a common dephasing environment, the natural occurrence of DFS due to the CE dephasing dynamics perfectly preserves the entangled state, even in the absence of any external protection mechanism. The very presence of a CDD field actually destroys the DFS; however, what one can do is to turn this external protection off once the system enters into the DFS, guaranteeing that it remains unaffected from the environmental noise afterward. We demonstrated that provided that the field cannot be turned off completely, then its strength should be over a certain threshold value; otherwise, the external field may drive the state of the system out of the DFS and makes the situation worse than the case of no external field. Furthermore, we showed that when amplitude damping errors are also present, it is sufficient to provide external protection only for amplitude damping while the system is protected from dephasing naturally by evolving into a DFS-like subspace. We hope that the strategy presented in our example model might be of interest as it combines two of the well-known methods to prevent the undesired effects of an environment from destroying quantum features of a system. Besides, it partially relies on external resources (CDD) up to a point where it can use the internal mechanisms arising from the nature of the dynamics (DFS).