text:
\section{Introduction}

Entanglement -- this very peculiar kind of correlation, not occurring in the classical world, is known to be a fragile property with respect to environmental influences \cite{ZurekDecoherenceeinselectionquantum2003, DurStabilityMacroscopicEntanglement2004, AlmeidaEnvironmentInducedSuddenDeath2007, YuSuddenDeathEntanglement2009}.
On the other hand, such an environmental interaction features also the capability to induce entanglement \cite{BraunCreationEntanglementInteraction2002, KimEntanglementinducedsinglemode2002, IsarEntanglementGenerationEvolution2009, MazzolaSuddenDeathSudden2009}, which can even last for arbitrary long times \cite{BenattiEntanglingoscillatorsenvironment2006, ZellDistanceDependenceEntanglement2009, SahrapourTunnelingDecoherenceEntanglement2013}.
The investigation of these competing environmental effects \cite{DubeDynamicsPairInteracting1998, ZyczkowskiDynamicsquantumentanglement2001, BasharovDecoherenceEntanglementRadiative2002, JakobczykEntanglingtwoqubits2002, SchneiderEntanglementsteadystate2002, LendiDaviestheoryreservoirinduced2006, PazDynamicsEntanglementTwo2008, SahrapourTunnelingDecoherenceEntanglement2013, KastBipartiteentanglementdynamics2014, AolitaOpensystemDynamicsEntanglement2015, DengDynamicsTwospinSpinboson2016, EasthamBathinducedcoherencesecular2016} adds to the understanding of entanglement and decoherence in the context of open quantum systems which is not only of importance from a fundamental point of view but is also most relevant for fields like quantum computation, communication and metrology.

Albeit the vast amount of publications in this field, sophisticated results for the microscopic model of a system and its environment are rare, even for the simple case of two qubits coupled to a common (sub-) Ohmic environment.
Therefore we investigate the two-qubit entanglement by means of the numerically exact \ac{HOPS} method \cite{SuessHierarchyStochasticPure2014, ZhangNonPerturbativeCalculationTwoDimensional2016, HartmannExactOpenQuantum2017, ZhangFlexibleschemetruncate2018, HartmannExactopenquantum2019} with two major objectives in mind.
First, we draw conclusions about the general applicability of various perturbative approaches.
It is in line with previous results \cite{HartmannAccuracyAssessmentPerturbative2020} that the \ac{RFE} is highly favorable.
As expected, our investigation confirms that in the perturbative regime the entanglement generation is well modeled by the environmentally induced Lamb shift Hamiltonian mediating an effective qubit-qubit interaction.
Further, it has also been argued that this unitary environmental effect on the system may be canceled by the so-called counterterm in the adiabatic limit \cite{WeissQuantumDissipativeSystems2008}.
Therefore, we secondly investigate the influences of the counterterm on the entanglement dynamics and find that it sensitively depends on the parameter $s$ of the \ac{SD}.
Whereas in the Ohmic case the inhibition of entanglement is well observed, in the deep sub-Ohmic regime ($s \lesssim 0.3$) a significantly larger cutoff frequency $\omega_c$ is required to see the same effect.
Notably, even under the assumption that the environment acts dissipatively only entanglement may still be generated \cite{BenattiEnvironmentInducedEntanglement2003}, however, much smaller in magnitude and on a slower time scale.

The model under consideration extends the prominent spin-boson model \cite{LeggettDynamicsdissipativetwostate1987} to two qubits
\begin{equation}
\begin{gathered}
  H = H_{\mathrm{sys}} + L\otimes \sum_{\lambda} g_{\lambda} (a_{\lambda} + a_{\lambda}^{\dagger}) + \sum_{\lambda} \omega_{\lambda} a^{\dagger}_{\lambda}
  a_{\lambda} \\
  H_{\mathrm{sys}} = -\frac{\omega_{A}}{2} \sigma_{x}^{A} - \frac{\omega_{B}}{2} \sigma_{x}^{B} \qquad
  L = \frac{1}{2} (\sigma_{z}^{A} + \sigma_{z}^{B}) \quad .
  \label{eqn:hamiltonian}
\end{gathered}
\end{equation}
Each qubit is modeled by the Pauli matrix $\sigma_x$ with tunneling frequency $\omega$.
They are coupled via $\sigma_z$ to a common bosonic environment where $a$ ($a^\dagger$) denotes the bosonic annihilation (creation) operator.
Note, units are chosen such that $\hbar$ and $k_B$ become unity.
For the continuous environment we choose a (sub-) Ohmic \ac{SD}
\begin{equation}
  \pi \sum_\lambda g_\lambda^2 \delta(\omega - \omega_\lambda) = J(\omega) = \frac{\pi}{2}\alpha\omega_c^{1-s}\omega^s e^{-\omega/\omega_c} \quad ,
\end{equation}
where $\alpha$ denotes the dimensionless coupling strength, $\omega_c$ the cutoff frequency of the exponential cutoff and the power $s$ allows to distinguish between the sub-Ohmic ($s<1$), Ohmic ($s=1$) and super-Ohmic ($s>1$) regime.

For such a microscopic model time local master equations provide perturbative results in the weak coupling regime and/or for a fast decaying \ac{BCF}.
In the case of two resonant qubits ($\omega_A = \omega_B$), the widely used \ac{QOME} \cite{DaviesMarkovianmasterequations1974, BreuerTheoryOpenQuantum2007} of \ac{GKSL} form \cite{ChruscinskiBriefHistoryGKLS2017} reveals that the relaxation dynamics is accompanied by an environmentally induced Hermitian coupling between the two parties \cite{BreuerTheoryOpenQuantum2007, KryszewskiMasterequationtutorial2008, WhitneyStayingpositivegoing2008, McCutcheonLonglivedspinentanglement2009, HartmannAccuracyAssessmentPerturbative2020}.
This effective interaction easily explains the entanglement generation, even in the absence of a direct coupling \cite{LendiDaviestheoryreservoirinduced2006, SolenovExchangeinteractionentanglement2007, McCutcheonLonglivedspinentanglement2009}.
However, for the more general case of two detuned qubits the \ac{QOME} does not show entanglement generation \cite{BenattiEntanglingtwounequal2010, MajenzCoarseGrainingCan2013}.
At first glance this seems contradictory since a small change in the system Hamiltonian should result in a small change in the dynamics, too.
But, since the \ac{QOME} relies on the \ac{RWA}, the slow phase caused by a small detuning requires a substantially weaker coupling for the \ac{RWA} to hold as compared to the resonant case (see \cite{HartmannAccuracyAssessmentPerturbative2020}).

We show by means of numerical results that if the coupling strength is not too small two detuned qubits become entangled, too.
We further investigate the question to what extent time local master equations, other than the \ac{QOME}, approximate the exact entanglement dynamics of two detuned qubits sufficiently well.

In addition, we find from the exact dynamics that even in the weak coupling regime the entanglement of the asymptotic state does not vanish irrespectively of the detuning.
The correct asymptotic value cannot be obtained by any of the time local master equations considered here.

To further enlighten the properties of environmentally induced entanglement we investigate the case where the environmentally mediated unitary qubit-qubit interaction is suppressed.
A similar study based on \ac{GKSL} type master equations has shown that if the bath induced unitary interaction is omitted, the action of the dissipator alone can result in entanglement generation as well \cite{BenattiEnvironmentInducedEntanglement2003}.

By means of the full microscopic model it is, a priori, not clear how to implement this scenario since the exact form of the induced unitary interaction is not known.
In the adiabatic limit, however, where the bath oscillators react instantaneously to the system dynamics \cite{WeissQuantumDissipativeSystems2008}, it takes the form
\begin{equation}
  - L^2 \sum_\lambda \frac{g_\lambda^2}{\omega_\lambda} = - \frac{\alpha \omega_c}{2} \Gamma(s) L^2 =: - H_c
\end{equation}
which defines the so-called ``counterterm'' ($\Gamma$ denotes the gamma function).
Based on this reasoning, adding the counterterm $H_c$ to the microscopic Hamiltonian [Eq. \eqref{eqn:hamiltonian}] is assumed to suppress the bath induced unitary interaction \cite{OrthDynamicssynchronizationquantum2010, KastBipartiteentanglementdynamics2014} and, thus, inhibit the buildup of entanglement.
However, the adiabatic assumption should be questioned for the deep sub-Ohmic regime where the low frequency modes are especially important.
We find and explain that for finite $\omega_c$ including the counterterm does not fully suppress the entanglement generation.
In addition we report the interesting phenomenon that for resonant qubits even in the limit $\omega_c \rightarrow \infty$ the truly adiabatic regime is never reached.
That is, a significant amount of entanglement will always be generated (and diminish afterwards) via an environmentally induced unitary interaction even in the presence of the renormalizing counter term.

The two-spin Boson model considered here with (sub-) Ohmic \ac{SD} and exponential cutoff has also been investigated by means of other numerical methods.
Unfortunately, the entanglement dynamics obtained using path integral Monte Carlo (PIMC) techniques \cite{KastBipartiteentanglementdynamics2014} does not agree with our numerical and analytical results.
As of missing information in Ref. \cite{SahrapourTunnelingDecoherenceEntanglement2013} we were not able to connect our calculations to results obtained from the quasi-adiabatic path integral (QUAPI) method.
However, the time-evolving matrix product operator (TEMPO) algorithm \cite{StrathearnEfficientNonMarkovianQuantum2018}, an advancement of QUAPI, gives results consistent with ours.

\section{Induced Entanglement Dynamics}

As a measure of the two-qubit entanglement we use concurrence \cite{HorodeckiQuantumentanglement2009}.
To examine its dynamics, the reduced dynamics of the two-spin boson model specified in Eq. \eqref{eqn:hamiltonian} is obtained numerically, solving the non-linear variant of the non-Markovian quantum state diffusion (NMQSD) equation \cite{DiosiNonMarkovianquantumstate1998, StrunzOpenSystemDynamics1999} by means of the well tested \ac{HOPS} approach \cite{SuessHierarchyStochasticPure2014, ZhangNonPerturbativeCalculationTwoDimensional2016, HartmannExactOpenQuantum2017, HartmannExactopenquantum2019}.
To use this method for a \mbox{(sub-)} Ohmic environment the exact \ac{BCF} with algebraic decay has to be approximated by a sum of exponentials where the accuracy of the approximation can be controlled by the number of exponential terms.
Increasing the accuracy also increases the time to which the approximation follows the algebraic decay (see Fig. \ref{fig:OhmFit}).
Further details on how the \ac{HOPS} method has been applied successfully on (sub-) Ohmic environments can be found in Ref. \cite{HartmannExactOpenQuantum2017, HartmannExactopenquantum2019}.

\begin{figure}[tb]
  \includegraphics[width = \columnwidth]{OhmFit}
  \caption{Details on the approximation of the (sub-) Ohmic \ac{BCF} in terms of a sum of exponentials are shown. Colored lines refer to the approximation and black lines to the exact \ac{BCF}. For the various parameters $s$ each approximation has a maximum absolute error of $10^{-3}$ (see the middle panel). Consequently, deviations are not visible when plotting the real/imaginary part on a linear scale (upper panel). However, showing the absolute value on a logarithmic scale reveals how the sum of exponentials mimics the algebraic decay up to a certain time (lower panel).}
  \label{fig:OhmFit}
\end{figure}

Throughout this work we refer to the expression $c = \lambda_1 - \lambda_2 - \lambda_3 - \lambda_4$ as concurrence \cite{HillEntanglementPairQuantum1997, HorodeckiQuantumentanglement2009} where, strictly speaking, only the positive values of $c$ quantify entanglement.
However, when comparing the dynamics of $c$ it seems more convenient to also show its negative values.
As usual, $\lambda_i$ are the decreasingly sorted eigenvalues of the matrix $R = \sqrt{\sqrt{\rho} \tilde \rho \sqrt{\rho}}$ with $\tilde \rho = \sigma_y^A\sigma_y^B \rho^\ast \sigma_y^A\sigma_y^B$.
For numerical reason we calculate the eigenvalues $\lambda_i$ from the eigenvalues $a_i$ of the matrix $\rho \tilde \rho$ via $\lambda_i = \sqrt{a_i}$.

\subsection{Exact Dynamics}

To examine the properties of the entanglement generation we choose as initial condition the two-qubit product state $\ket{\psi_0} = \ket{\uparrow\uparrow}$ and a zero temperature environment where $\ket{\uparrow}$ ($\ket{\downarrow}$) is the eigenvector of $\sigma_z$ with eigenvalue $+1$ ($-1$).
Note, for the unbiased single qubit Hamiltonian ($\epsilon \sigma_z$ with $\epsilon = 0$) considered here the initial state $\ket{\downarrow\downarrow}$ yields the same entanglement dynamics and is, thus, not considered explicitly.
Also, the symmetry of the resonant Hamiltonian \eqref{eqn:hamiltonian} ($\omega_A = \omega_B$) results in a decoherence free subspace spanned by the Bell-state $\ket{\Phi_-} \sim \ket{\uparrow\downarrow} - \ket{\downarrow\uparrow}$.
Therefore, since the product states $\ket{\uparrow\downarrow}$ and $\ket{\downarrow\uparrow}$ contain a contribution from the decoherence free subspace, it is not too surprising that entanglement is generated \cite{SahrapourTunnelingDecoherenceEntanglement2013} if they serve as initial condition.
Consequently, they are not considered here but will be discussed elsewhere for detuned qubits.

As shown in Fig. \ref{fig:HOPSDyn}, for the resonant case $\omega_A = \omega_B$ a substantial amount of entanglement builds up initially (referred to the rescaled time $t \omega_A \alpha (\omega_c / \omega_A)^{1-s}$) for any weak to intermediate coupling strength as well as a sub-Ohmic and Ohmic environment.
Subsequently, the entanglement diminishes.
This kind of behavior can easily be explained by the interplay between the bath induced unitary interaction \cite{McCutcheonLonglivedspinentanglement2009, HartmannAccuracyAssessmentPerturbative2020} and the relaxation of the system \cite{CarvalhoEntanglementDynamicsDecoherence2007, YuSuddenDeathEntanglement2009} (see also Sec. \ref{sec:RWA}).

\begin{figure}[tb]
  \includegraphics[width = \columnwidth]{HOPS_dyn}
  \caption{The dynamics of the two-qubit entanglement quantified by concurrence is shown for a sub-Ohmic ($s=0.3$) and Ohmic environment with $\omega_c = 10\omega_A$ and various coupling strengths.
  By keeping $\tilde \alpha = \alpha (\omega_c / \omega_A)^{1-s}$ constant the relaxation takes place on the same time scale for different parameters $s$.
  In addition different detuning parameters $\omega_B / \omega_A$ are considered.
  The dynamics shown here was obtained by the \ac{HOPS} method with an 5-term-exponential approximation of the \ac{BCF} which obeys an absolute error smaller than $10^{-3}$. The dynamics obtained using an even more accurate representation is indistinguishable with respect to the shown plots.
  In the same manner the convergence with respect to the hierarchy depth $k_\mathrm{max}$ and the number of samples $N$ has been checked.
  In this sense the dynamics shown here is exact.
  The graphs shown were obtained by using a simple simplex truncation with $k_\mathrm{max} = 2$ and $N=4096$ samples for $\tilde \alpha=2.00 \cdot 10^{-2}$, $k_\mathrm{max} = 4$ and $N=16384$ for $\tilde \alpha=6.32 \cdot 10^{-2}$ and $k_\mathrm{max} = 4$ and $N=16384$ for $\tilde \alpha=2.00 \cdot 10^{-1}$.
  }
  \label{fig:HOPSDyn}
\end{figure}

\begin{figure}[tb]
  \includegraphics[width = \columnwidth]{HOPS_dyn_long_time}
  \caption{The entanglement dynamics is shown with special emphasize on the asymptotic behavior (same parameters as in Fig. \ref{fig:HOPSDyn}).  The insets show the linear dependence of the asymptotic entanglement as a function of the coupling strength (double logarithmic plot).}
  \label{fig:HOPSDynLong}
\end{figure}

Our calculations show that for the slightly detuned scenario $\omega_B / \omega_A = 0.95$ the entanglement evolves very similar to the resonant case.
As expected, differences are most prominent in the weak coupling regime.
For a larger detuning $\omega_B / \omega_A = 0.8$ such differences become more significant.

Notably, our exact results reveal that in any case the asymptotic entanglement does not vanish (see Fig. \ref{fig:HOPSDynLong}).
A result which cannot be obtained correctly by any of the perturbative approaches considered in the following.
Further, the asymptotic value is rarely influenced by the detuning.
This is particularly remarkable in the weak coupling regime where the initial dynamics is very sensitive to the detuning.

\subsection{Perturbative Master Equations}

In addition to the exact calculations the properties of the dynamics obtained by perturbative master equations are of relevance, too.
The motivation is given by the rather simple structure of such master equations which allows to gain insights in the relevant mechanisms.
However, the suitability of these perturbative approaches has to be checked since an error estimation from within the perturbative formalism seems unfeasible.
With the help of the exact dynamics obtained by the \ac{HOPS} method we examine the applicability of the \ac{QOME} (Born-Markov approximation and \ac{RWA}) \cite{BreuerTheoryOpenQuantum2007, KryszewskiMasterequationtutorial2008}, its variation with only a \ac{PRWA} \cite{VogtStochasticBlochRedfieldtheory2013, JeskeBlochRedfieldequationsmodeling2015, TscherbulPartialsecularBlochRedfield2015}, the Redfield equation (RFE) (no \ac{RWA} at all) \cite{RedfieldTheoryRelaxationProcesses1957}, the very recent \ac{GAME} (\ac{GKSL} kind equation based on the \ac{RFE}) \cite{DavidovicCompletelyPositiveSimple2020} and the coarse-graining approach \cite{SchallerPreservationPositivityDynamical2008, BenattiEntanglingtwounequal2010, MajenzCoarseGrainingCan2013}, in the context of two independent qubits coupled to a common environment with sub-Ohmic \ac{SD}.

\subsubsection{The Rotating Wave Approximation}

\label{sec:RWA}

The great success of the \ac{QOME} (Born-Markov approximation and full \ac{RWA}, well known \ac{GKSL} form, see Ref. \cite{BreuerTheoryOpenQuantum2007, KryszewskiMasterequationtutorial2008, HartmannAccuracyAssessmentPerturbative2020}) to describe the dynamics of a single qubit encourages the use of the same formalism for two qubits also.
Since the \ac{QOME} is of \ac{GKSL} form positivity of the reduced state is assured for all times and any initial condition.
For the resonant case $\omega_A = \omega_B$ it is easily seen that the unitary contribution of the \ac{QOME} (Lamb shift term) \cite{BenattiEntanglingoscillatorsenvironment2006, McCutcheonLonglivedspinentanglement2009, HartmannAccuracyAssessmentPerturbative2020}
\begin{multline}
  H_\mathrm{Lamb}  = H_\mathrm{local} \\
  + \frac{S(\omega_A) + S(-\omega_A)}{8} \left(\sigma_z^A \sigma_z^B + \sigma_y^A\sigma_y^B \right)
\end{multline}
couples the qubits such that entanglement builds up \cite{LendiDaviestheoryreservoirinduced2006, SolenovExchangeinteractionentanglement2007, McCutcheonLonglivedspinentanglement2009, SahrapourTunnelingDecoherenceEntanglement2013} (see dashed graphs in Fig. \ref{fig:HOPSDyn}).
Here $S$ denotes the imaginary part of the half sided Fourier transform $F(\omega)$ of the zero temperature \ac{BCF} $\alpha_\mathrm{bcf}$ which is defined by means of the \ac{SD} $J(\omega)$
\begin{equation}
\begin{gathered}
  \alpha_\mathrm{bcf}(\tau) = \frac{1}{\pi} \il{0}{\infty}{\omega} J(\omega)^{-\mathrm{i}\omega\tau} \\
  F(\omega) = \il{0}{\infty}{\tau} \alpha_\mathrm{bcf}(\tau)^{\mathrm{i}\omega\tau} = J(\omega) + \mathrm{i} S(\omega) .
  \label{eqn:halfsidedFT}
\end{gathered}
\end{equation}
Since the local contribution $H_\mathrm{local}$ acts on a single qubit only it does not influence the entanglement dynamics.

Importantly, as of the \ac{RWA} involved in the derivation of the \ac{QOME}, for detuned qubits $\omega_A \neq \omega_B$ the Lamb shift term consists of the local part only and, thus, entanglement generation is not featured by the \ac{QOME} \cite{BenattiEntanglingtwounequal2010}.
However, as shown in Fig. \ref{fig:RWA} the exact dynamics obtained from the \ac{HOPS} method reveals that for slightly detuned qubits entanglement is generated in a very similar manner as in the resonant case (see also Ref. \cite{Flemingrotatingwaveapproximationconsistency2010, MaEntanglementdynamicstwo2012, EasthamBathinducedcoherencesecular2016, HartmannAccuracyAssessmentPerturbative2020} for more detailed discussions on the severe consequences of the \ac{RWA} on bipartite correlations).
Assuming that the \ac{QOME} provides a suitable approximation in some weak coupling regime it seems contradictory that an infinitesimal change of the system parameters results in a significant change of the dynamics.
The inconsistency can be resolved by recalling that a small detuning introduces a new very slow system time scale.
Only for a decay time scale (inverse of the coupling strength) much larger than the system time scale the \ac{RWA} and, thus, the \ac{QOME} is applicable.
This means that the applicability of the \ac{QOME} crucially depends on the system parameters.
Only in the limit of zero coupling (in combination with a rescaled time, the so called scaling or van Hove limit) the \ac{QOME} becomes exact \cite{daviesMarkovianMasterEquations1976}.
This means that for a sufficiently weak coupling strength the entanglement generation will vanish for any detuning, but remain in the resonant case.
This behavior can, to some extent, be seen from the exact dynamics shown in Fig. \ref{fig:HOPSDyn}.

\begin{figure}[tb]
  \includegraphics[width = \columnwidth]{RWA_dyn_alpha_0_00632}
  \caption{The entanglement dynamics obtained from the \ac{QOME} and \ac{PRWA} approach is shown together with the exact dynamics of the \ac{HOPS} method for a sub-Ohmic environment with $s=0.3$, $\omega_c=10\omega_A$ and $\tilde \alpha = 6.32 \cdot 10^{-2}$. The short time dynamics (left column) and long time dynamics (right column) is shown for different values of detuning $\omega_B/\omega_A$ (rows). Note, the \ac{QOME} and the \ac{PRWA} coincide in the resonant case. Whereas the \ac{QOME} is not able to predict the entanglement generation for detuned qubits, the \ac{PRWA} approach agrees well with the exact dynamics (except for the superimposed oscillations). Both master equations yield a vanishing asymptotic entanglement whereas the exact value remains finite.}
  \label{fig:RWA}
\end{figure}

After having pointed out the severe problems in the detuned case arising from the \ac{RWA} we consider perturbative approaches which aim to circumvent the \ac{RWA}.
A first one, very similar to the \ac{QOME}, makes use of the \ac{RWA} only partially \cite{VogtStochasticBlochRedfieldtheory2013, JeskeBlochRedfieldequationsmodeling2015, TscherbulPartialsecularBlochRedfield2015} which results in a master equation of \ac{GKSL} kind also.
The specific expression of the master equation for the model considered here can be found in Ref. \cite{HartmannAccuracyAssessmentPerturbative2020}.
The master equation using the \ac{PRWA} is constructed from the same non-local Lindblad operators occurring in the \ac{QOME} for resonant qubits.
Henceforth, the Lamb shift term is non-local and features entanglement generation also in the detuned case.

The initial entanglement dynamics obtained from the \ac{PRWA} master equation agrees quantitatively, up to some fast oscillation, with the exact dynamics obtained by the \ac{HOPS} method (see Fig. \ref{fig:RWA}).
The fast superimposed oscillation are not captured because the \ac{PRWA} still neglects some secular terms.
Keeping all secular terms yields the \ac{RFE} considered next.
Both, the \ac{QOME} and the \ac{PRWA} approach yield a vanishing asymptotic entanglement which is in disagreement with the exact dynamics.

\subsubsection{The Redfield Equation}

Motivated by the detailed accuracy assessment of perturbative master equations \cite{HartmannAccuracyAssessmentPerturbative2020} we consider not only all secular terms but also use the \ac{RFE} with time dependent coefficients which was shown to be the most accurate method.
As shown in Fig. \ref{fig:RF} the high degree of accuracy also holds for the sub-Ohmic environment considered here.
The entanglement dynamics obtained from the \ac{RFE} with time dependent coefficients matches very well the exact dynamics.
Even the fast oscillations are recovered.

\begin{figure}[tb]
  \includegraphics[width = \columnwidth]{RF_dyn_alpha_0_00632}
  \caption{The entanglement dynamics obtained from the \ac{RFE} ($\rho \rightarrow \sqrt{\rho\rho^\dagger}$), the \ac{GAME} master equation and exact dynamics is shown for the same parameters as in Fig. \ref{fig:RWA}. For all three detuning parameters the \ac{RFE} matches the exact dynamics very well over a significant period of time. For larger times deviations become apparent. Despite the fact that the asymptotic entanglement from the \ac{RFE} does not vanish it disagrees with the exact value. Although slightly less accurate the \ac{GAME} yields comparable results to the \ac{RFE}.}
  \label{fig:RF}
\end{figure}

Small positivity violations of the reduced dynamics occur already in a regime where the accuracy is still acceptable (see Fig. \ref{fig:RF_diff}).
Consequently, using the positivity violation as an indicator for the break down of the weak coupling assumption, as proposed for a Lorentzian environment with an exponentially decaying \ac{BCF} \cite{HartmannAccuracyAssessmentPerturbative2020}, is not that simple for a sub-Ohmic \ac{SD} with a slow algebraic decay of the \ac{BCF}.
The positivity violation is of particular relevance here because the concurrence is not defined for non-positive $\rho\tilde\rho$ even though $\rho$ approximates the exact state suitably well.
However, since the positivity violation is of the order of the perturbative error the matrix $\sqrt{\rho \rho^\dagger}$ is consistent with the degree of perturbation (see Fig. \ref{fig:RF_diff}) while being positive by construction.
This justifies the calculation of the concurrence using the positive matrix $\sqrt{\rho \rho^\dagger}$ obtained from the reduced dynamics of the \ac{RFE}.

\begin{figure}[tb]
  \includegraphics[width = \columnwidth]{RF_dyn_diff_c_t_db_0_95}
  \caption{To justify the use of the positive matrix $\sqrt{\rho \rho^\dagger}$ used to calculate the concurrence for the \ac{RFE} the deviation of $\rho$ (red line) and $\sqrt{\rho \rho^\dagger}$ (black dots) from the exact state is shown using the Hilbert-Schmidt-norm. The deviations are nearly indistinguishable which means that $\sqrt{\rho \rho^\dagger}$ approximates the exact state as good as $\rho$. This is in accordance with the magnitude of the smallest negative eigenvalue of $\rho$ which is significantly smaller than the deviation. In addition the absolute difference between the exact and the \ac{RFE} concurrence is shown (blue line). The error of the concurrence exceeds the error of the state only marginally.
  Furthermore, the error of the concurrence (yellow line) as well as the density matrix (purple line) is plotted also for the \ac{GAME}. As of the additional approximation involved the approach is slightly less accurate compared to the \ac{RFE}. Nonetheless, the \ac{GAME} outperforms the other \ac{GKSL} kind equations considerably.}
  \label{fig:RF_diff}
\end{figure}

\subsubsection{The Geometric-Arithmetic Master Equation (GAME)}

In a recent publication the failure to quantify entanglement of a non-positive state in an approximative sense has been addressed as well \cite{DavidovicCompletelyPositiveSimple2020}.
The proposed \ac{GAME} modifies the \ac{RFE} such that it becomes a master equation of \ac{GKSL} type.
Crucially, the environmentally induced unitary influence on the system is identified from the \ac{RFE} before the approximation is applied.
The justification of \ac{GAME} is based on the relaxation time scale in the interaction picture, roughly given by the inverse of the coupling strength, and properties of the \ac{SD} only.
In contrast to the \ac{QOME} the particular spectrum of the system Hamiltonian is irrelevant.
It is, thus, expected that the entanglement generation is well captured for any detuning of the qubits.
As shown in Fig. \ref{fig:RF} this is indeed the case.
The \ac{GAME} master equation mimics even the fast oscillations of the entanglement dynamics, however, slightly less accurate compared to the positive state constructed from the \ac{RFE} dynamics (see also Fig. \ref{fig:RF_diff} which shows the error).
Since the \ac{GAME} master equation is based on the \ac{RFE} it is consistent that the asymptotic entanglement deviates from the exact value on the same scale as the \ac{RFE} result (see Fig. \ref{fig:RF}), although the value is overestimated.
This allows to conclude that the positivity issues related to the evaluation of the entanglement can be cured slightly more accurate using the Redfield formalism with $\rho_{\mathrm{aprx}} := \sqrt{\rho \rho^\dagger}$ than applying the additional \ac{GAME}.

\subsubsection{The Coarse-Graining Master Equations}

An alternative path towards a master equation for the microscopic model which assures positive dynamics is the so-called coarse-graining procedure \cite{SchallerPreservationPositivityDynamical2008, BenattiEntanglingtwounequal2010, MajenzCoarseGrainingCan2013}.
It has been proposed precisely with the aim to overcome the limitations due to the \ac{RWA}.
In particular for the case of two detuned qubits entanglement generation has been shown using such a \ac{CGME} \cite{BenattiEntanglingtwounequal2010}.
We confirm this result for a common sub-Ohmic environment (see Fig. \ref{fig:CG}).
However, the quantitative comparison for a sub-Ohmic environment with $s=0.3$ and $\omega_c = 10\omega_A$ shows that the \ac{CGME} does not reach the accuracy of the \ac{PRWA} nor the \ac{GAME}.
To understand the deviation of the \ac{CGME} recall that the condition for its applicability reads $\tau_\mathrm{env} \ll \tau \ll \tau_\mathrm{ind.}$ \cite{HartmannAccuracyAssessmentPerturbative2020}.
The environmentally induced timescale for the system dynamics scales with the inverse coupling strength.
From the exact dynamics in Fig. \ref{fig:CG} its follows $\tau_\mathrm{ind} \approx 0.2 (\tilde \alpha \omega_A)^{-1} \approx 3 \omega_A^{-1}$.
Although the decay time of the \ac{BCF} scales with the cutoff frequencies $\tau_\mathrm{env} \sim \omega_c^{-1}$ the particular time at with the \ac{BCF} has decayed over, for example, one order of magnitude is $\tau_{\mathrm{env},1} \approx 10^{1/(s+1)} \omega_c^{-1}$.
For the example considered here it follows $\tau_{\mathrm{env},1} \approx 0.6\omega_A^{-1}$.
Obviously, a clear separation of the three timescales is not justified.

\begin{figure}[tb]
  \includegraphics[width = \columnwidth]{CG_dyn_alpha_0_00632}
  \caption{The entanglement dynamics of the \ac{CGME} is shown for comparison (same environmental parameters as in Fig. \ref{fig:RWA}). Since the \ac{QOME} is suitable in the resonant case it is not surprising that for large coarse-graining parameters $\tau$ the \ac{CGME} yields similar results. For the detuned case the entanglement generation is still visible, in contrast to the \ac{QOME}. However, the \ac{PRWA} agrees better with the exact results than the \ac{CGME} (see the text for a discussion about the time scale separation required by the \ac{CGME}).}
  \label{fig:CG}
\end{figure}

\subsubsection{Summary}

As expected, the approach with the least approximations, namely the \ac{RFE} with time dependent coefficients, yields the most accurate results for the entanglement dynamics of two qubits coupled to a common sub-Ohmic environment.
Positivity violations can consistently be healed by using the positive matrix $\sqrt{\rho \rho^\dagger}$ to estimate the concurrence.
The \ac{PRWA}, which coincides with the \ac{QOME} in the resonant case, yields the correct overall dynamics while missing faster oscillations.
The \ac{CGME} is less appropriate for the set of parameters considered here.
Note that the recent \ac{GAME} outperforms the other \ac{GKSL}-type master equations in terms of accuracy.
However, as of the simple structure of the \ac{PRWA}, we use this approach together with the exact results to illuminate the influence of the counterterm in the next section.
The reasoning could have been done equally well based on the \ac{GAME} since due to the weak coupling both approaches yield nearly indistinguishable dynamics.

\section{Influence of the Counterterm}

To recapitulate the motivation for the counterterm -- compensation of the environmentally induced unitary effect on the system dynamics -- a particle with position $q$ and momentum $p$ moving in a potential $V(q)$ and coupled to a set of harmonic oscillators with position (momentum) $x_\lambda$ ($p_\lambda$) is considered.
The linear coupling $-\sum_\lambda F_\lambda(q) x_\lambda$ to the environmental modes contributes to the potential affecting the particle.
It has been argued that in the adiabatic regime (instantaneous adjustment of the environmental modes to the particle position) the effective potential becomes \cite{WeissQuantumDissipativeSystems2008}
\begin{equation}
  V_\mathrm{eff}(q) = V(q) - \sum_\lambda \frac{F_\lambda(q)^2}{2 m_\lambda \omega_\lambda^2} \quad .
\end{equation}
For a mode independent coupling operator $F_\lambda(q) = c_\lambda F(q)$, as in Eq. \eqref{eqn:hamiltonian}, the Hamiltonian
\begin{multline}
  H = \frac{p^2}{2M} + V(q) + \\
  \sum_\lambda \left[\frac{p_\lambda^2}{2m_\lambda} + \frac{m_\lambda \omega_\lambda^2}{2}\left(x_\lambda - \frac{c_\lambda}{m_\lambda \omega_\lambda^2}F(q)\right)^2 \right]
  \label{eqn:hamiltonian_with_CT}
\end{multline}
compensates that change of the potential.
It is assumed that the same holds true when casting the above Hamiltonian to the more abstract form of Eq. \eqref{eqn:hamiltonian}.
In particular the relations $g_\lambda \sqrt{2m_\lambda \omega_\lambda} = c_\lambda$ and $L = -F(q)$ yield for the so-called counterterm
\begin{multline}
H_\mathrm{c} = \sum_\lambda \frac{c_\lambda^2 F(q)^2}{2 m_\lambda \omega_\lambda^2}  = \sum_\lambda \frac{g_\lambda^2}{\omega_\lambda} L^2 \\
             = \frac{1}{\pi}\il{0}{\infty}{\omega} \frac{J(\omega)}{\omega} L^2
\end{multline}
which is expected to renormalize the system Hamiltonian.
For the class of (sub-) Ohmic SD, as given in Eq. \eqref{eqn:hamiltonian}, the counterterm evaluates to $H_c = \frac{\alpha \omega_c}{2} \Gamma(s) L^2$.

\begin{figure*}[tb]
  \includegraphics[width = \textwidth]{counterterm}
  \caption{The influence of the counterterm $H_c$ on the entanglement dynamics for two resonant qubits is shown (blue lines: exact dynamics without $H_c$, orange lines exact dynamics including $H_c$, $\omega_c / \omega_A = 10$). For weak and intermediate coupling strength the influence is evidently visible in the Ohmic case, however, diminishes in the deep sub-Ohmic regime.
  It seems obvious that if the counterterm compensates the Lamb shift Hamiltonian in the weak coupling regime the \ac{QOME} with dissipator only (dashed line) should yield a similar behavior to the exact dynamics including the counter term (orange line).
  The second row shows that this assertion holds in the Ohmic case but fails spectacularly for small values like $s=0.3$.
  This behavior is further confirmed by looking at the unitary dynamics only (third row).
  The system Hamiltonian in combination with the Lamb shift results in generation of entanglement (green line) which is reflected by the short time dynamics of the exact dynamics without the counterterm (blue line).
  Adding the counterterm (purple line) the entanglement buildup is slowed down significantly in the Ohmic case.
  Therefore, on the timescale of the relaxation the counterterm cancels the effect of the Lamb shift term.
  However, the speed of the entanglement generation increases with decreasing $s$ (purple lines) which manifests that the counterterm cancels the Lamb shift term less effectively for small $s$.}
  \label{fig:counterterm}
\end{figure*}

\begin{figure}[tb]
  \includegraphics[width = \columnwidth]{counterterm_db_0_95}
  \caption{For slightly detuned qubits ($\omega_B / \omega_A = 0.95$) and a cutoff frequency $\omega_c / \omega_A = 10$ the entanglement dynamics under the influence of the counterterm is shown (same coloring as in Fig. \ref{fig:counterterm}).
  As of the detuning the \ac{PRWA} master equation is used to obtain the perturbative dynamics.
  Similar to the case of resonant qubits, the counterterm approximately cancels the Lamb shift term in the Ohmic case. As shown in the lower left panel, the exact dynamics including the counter term (orange line) agrees with the dynamics under the action of the \ac{PRWA} dissipator only (dashed black line).
  However, this expected behavior is not observed for a sub-Ohmic \ac{SD} with small $s$.
  Including the counterterm rarely affects the entanglement dynamics (blue and orange lines, lower right panel).
  The influence of the cutoff frequency is shown in Fig. \ref{fig:large_wc_small_s_1_0_3}.}
  \label{fig:counterterm_db_0_95}
\end{figure}

It will be shown in the following that for two non-interacting qubits it is primarily the environmentally induced unitary interaction which generates entanglement.
Therefore, including the counterterm is expected to suppress the generation of entanglement.
As an example, its influence on the entanglement dynamics is shown in Fig. \ref{fig:counterterm} (resonant qubits) and Fig. \ref{fig:counterterm_db_0_95} (detuned qubits).
Two main features are observed.
First, with decreasing $s$ (going from the Ohmic to the deep sub-Ohmic regime) the impact of the counterterm becomes less, independent of the coupling strength (see first and second row in Fig. \ref{fig:counterterm}).
Second, for weak coupling and $s=1$ the entanglement dynamics including the counterterm is very well mimicked by the action of the dissipator only of the \ac{PRWA} master equation (which coincides with the \ac{QOME} in the resonant case).
This shows that the counterterm does compensate the induced unitary interaction up to a certain level.
However, for $s=0.3$ the exact dynamics, hardly influenced by $H_c$, does not agree with the dissipative dynamics in the perturbative regime.
Consequently the above assertion about the effect of the counterterm does not hold true in the deep sub-Ohmic regime.

To understand this behavior we investigate the dynamics in the weak coupling regime.
In that regime the \ac{RFE} is known to be very accurate \cite{HartmannAccuracyAssessmentPerturbative2020}.
Using asymptotic coefficients it reads
\begin{equation}
  \dot \rho = -\mathrm{i} [H_\mathrm{sys}, \rho] + \sum_{i} \left( F(\omega_i) [L_{\omega_i} \rho, L] + \mathrm{h.c.} \right)
\end{equation}
where $L_{\omega_i} = \sum_{\{\epsilon, \epsilon' | \epsilon'-\epsilon = \omega_i\}} \ket{\epsilon}\bra{\epsilon}L \ket{\epsilon'}\bra{\epsilon'}$ is the decomposition of the coupling operator by means of projectors of eigenstates of the system Hamiltonian $H_\mathrm{sys} \ket{\epsilon} = \epsilon \ket{\epsilon}$ and the coefficients $F(\omega_i)$ are the values of the half-sided Fourier transform of the \ac{BCF} [Eq. \eqref{eqn:halfsidedFT}].
It is well known from several perturbative treatments that the real part of $F(\omega) = J(\omega) + \mathrm{i} S(\omega)$ accounts for the dissipative dynamics whereas the imaginary part determines the unitary contribution.
Under the assumption that the particular values $S(\omega_i)$ can be approximated by $S(0)$ (recall $\omega_i$ takes the value of all possible transition frequencies of the system Hamiltonian) the corresponding contribution in the \ac{RFE}
becomes
\begin{equation}
    \mathrm{i} \sum_i \left(S(\omega_i) [L_{\omega_i} \rho(t), L] + \mathrm{h.c.}\right) \approx - \mathrm{i} S(0) [L^2, \rho(t)]
\end{equation}
where we have used that by definition $L = \sum_i L_{\omega_i}$.
For zero temperature $S(\omega)$ is related to the SD by
\begin{equation}
  S(\omega) = - \frac{1}{\pi} \mathcal{P} \il{0}{\infty}{\omega'} \frac{J(\omega')}{\omega' - \omega}
\end{equation}
where $\mathcal{P}$ denotes the Cauchy principal value.
We finally conclude that given $S(\omega_i) \approx S(0)$ the unitary contribution in the perturbative treatment (Lamb shift term) is approximately canceled by the counterterm
\begin{equation}
  H_\mathrm{Lamb} \approx S(0) L^2 = - \frac{1}{\pi} \il{0}{\infty}{\omega} \frac{J(\omega)}{\omega} L^2 = -H_c \; .
\end{equation}

\begin{figure}[tb]
  \includegraphics[width = \columnwidth]{s_w}
  \caption{The behavior of the imaginary part of the half-sided Fourier transform of the BCF $S(\omega)$ is shown for different parameters $s$.
  (solid lines: exact analytic expression, dashed lines: expansion around zero, dots: numeric Fourier integral)}
  \label{fig:Sw}
\end{figure}

For the class of (sub-) Ohmic SD the validity of the assumption $S(\omega_i) \approx S(0)$ depends on the parameter $s$ in a very sensitive way.
To see that, it is convenient to expand the function $S(\omega)$ by introducing $x = \omega / \omega_c$.
Expressing $F(\omega)$ analytically
\begin{multline}
  F(\omega) = \frac{\eta \Gamma(s+1)}{\pi} \frac{(-\mathrm{i} \omega)^s}{\mathrm{i}^{s+1}} e^{-x}\\
  \times \lim_{\epsilon \rightarrow 0} \Gamma\left(-s, -(x+\mathrm{i}\epsilon)\right)
\end{multline}
(the limit assures the correct branch of the incomplete gamma function) and expanding the incomplete gamma function for small $x$ allows to write
\begin{equation}
    S(x) = - \frac{\alpha \Gamma(s)}{2} \omega_c e^{-x} f(s, x)
\end{equation}
where in the sub-Ohmic case $f$ expands to
\begin{equation}
\begin{aligned}
  f(s, x) & = 1 + s g(s, x) \Gamma(-s) |x|^s  + \frac{s x}{s-1} + \mathcal{O}(x^2) \\
  g(s, x) & = \cos(\pi s)\Theta(x) + \Theta(-x)
\end{aligned}
\end{equation}
with $\Theta$ denoting the Heaviside step function.
For an Ohmic environment $f$ becomes
\begin{equation}
    f(1,x) = 1 - x \ln(|x|) + (1-e_\gamma)x + \mathcal{O}(x^2)
\end{equation}
where $e_\gamma$ denotes the Euler–Mascheroni constant.
The expansion shows that the lowest order behaves like $|x|^s$ in the sub-Ohmic and $x\log(|x|)$ in the Ohmic case (see Fig. \ref{fig:Sw} for example plots).
In addition, for positive $x$ the term $\sim|x|^s$ changes its sign at $s=0.5$ which results in a pointed minimum at $S(0)$ for $s < 0.5$.

It follows that the approximation $S(x\!=\!\omega_i/\omega_c) \approx S(0)$, obviously, becomes better when increasing $\omega_c$.
However, since $S(x\!=\!\omega_i/\omega_c)$ behaves like $\sim |x|^s$ around zero, for a fixed $\omega_c$ the approximation becomes significantly worse when changing from the Ohmic ($s=1$) to the deep sub-Ohmic ($s < 0.5$) regime.
This behavior explains that the cancellation of the Lamb shift Hamiltonian by the counterterm fails spectacularly for small $s$ and the cutoff frequency $\omega_c = 10\omega_A$ considered in the above examples.

In order to relate these considerations to the example dynamics shown above the dynamics of the unitary contributions are shown in Fig. \ref{fig:counterterm}, too (bottom row).
As expected, the pure influence of the Lamb shift on the system Hamiltonian results in oscillatory dynamics of the concurrence (green graph).
Adding the counterterm $H_c$ (purple graph) yields a significantly slower generation of entanglement for $s=1$.
The two contributions compensate, at least approximately, on the relaxation time scale.
However, as elucidated above for $s=0.3$ the effect of including $H_c$ is far from cancellation -- entanglement is generated even slightly faster.
This behavior is directly captured by the exact entanglement dynamics of the two-spin-boson model calculated using the HOPS method (Fig. \ref{fig:counterterm} and Fig. \ref{fig:counterterm_db_0_95}).

Nonetheless, the above reasoning suggests that in the limit $\omega_c \rightarrow \infty$, where the approximation $S(\omega_i) \approx S(0)$ becomes exact, the counterterm should truly cancel the Lamb shift contribution also in the deep sub-Ohmic regime.
For two detuned qubits this behavior is confirmed by the example shown in the left column of Fig. \ref{fig:large_wc_small_s_1_0_3}.
The entanglement dynamics (red line) approaches the purely dissipative dynamics (dashed black line) when increasing the cutoff frequency.
The unitary effect of the Lamb shift $H_\mathrm{lamb}$ (blue line) is compensated by the counterterm $H_c$ (solid black line) where the degree of compensation increases with the cutoff frequency $\omega_c$.
Hence, it seems plausible that the entanglement induced by the Lamb shift Hamiltonian vanishes in the adiabatic limit $\omega_c \rightarrow \infty$.

\begin{figure}[t!]
  \includegraphics[width = \columnwidth]{large_wc_s_0_3}
  \caption{The entanglement dynamics (including the counterterm) is shown (red lines) for a sub-Ohmic environment with $s=0.3$ and $|S(0)|/\omega_A = 0.03 = \tilde \alpha \Gamma(s) \omega_c^s / \omega_A^s / 2$ while increasing the cutoff frequency $\omega_c$ from top to bottom, hence $\tilde \alpha$ decreases.
  As expected, for the detuned case increasing $\omega_c$ results in a more effective compensation of the Lamb shift contribution by the counterterm (black solid line).
  This explains that the exact entanglement dynamics (red line) approaches the dynamics obtained by the \ac{PRWA} master equation under the action of the dissipator only (dashed line).
  Remarkably, for resonant qubits (right column) this expectation is not fulfilled.
  In that case the joint unitary dynamics $H_\mathrm{sys} + H_\mathrm{Lamb} + H_c$ (black solid line) builds up entanglement on the same time scale as the dissipation takes place, independently of the cutoff frequency $\omega_c$.
  Consequently, the exact dynamics does not approach the dynamics of the \ac{QOME} under the action of the dissipator only (dashed line).
  This qualitative difference originates from the time scale set by the detuning which is independent of $\omega_c$ (gray vertical lines). Note, this time scale decreases on the rescaled time $\tilde \alpha t \omega_A$ while increasing $\omega_c$.
  Since the entanglement dynamics of the joint unitary part is periodic on that time scale, but the buildup takes place on the time scale set by $\Delta S \propto S_0$ (constant on the rescaled time), the generation of entanglement is effectively suppressed.}
  \label{fig:large_wc_small_s_1_0_3}
\end{figure}

Remarkably, this does not hold true for resonant qubits (see right column in Fig. \ref{fig:large_wc_small_s_1_0_3}).
To affirm that this effect remains even in the adiabatic limit we argue as follows.
The remaining Hermitian contribution $H_\mathrm{Lamb} + H_c$ scales in lowest order like
\begin{equation}
  \Delta S = S_0 - S(\omega_A) \sim S_0 \left(\frac{\omega_A}{\omega_c}\right)^s
\end{equation}
which sets the timescale on which the unitary interaction between the qubits induced by the full Hamiltonian [Eq. \eqref{eqn:hamiltonian_with_CT}] takes place.
Obviously, increasing $\omega_c$ while keeping $S_0$ constant increases that timescale which could mean an effective cancellation if the damping takes place on a faster time scale.
It turns out, however, that this is not the case since the damping rate $\gamma$, determined by the SD at the resonance frequency, scales with $\omega_c$ in the same manner.
This can be seen by expressing the coupling strength in terms of $S_0$ and expanding the SD in lowest order in $\omega_A/\omega_c$
\begin{equation}
  \gamma \sim J(\omega_A) \sim S_0 \left(\frac{\omega_A}{\omega_c}\right)^s \quad.
\end{equation}
In summary we find the counter-intuitive result that for two resonant qubits and a sub-Ohmic environment the effect of the Lamb shift contribution is not compensated by the counterterm, even in the limit $\omega_c \rightarrow \infty$ which is usually considered the adiabatic limit.
Consequently, entanglement generation beyond the purely dissipative contribution remains for any $\omega_c$.
This, in particular, stays in contrast with the results presented in Ref. \cite{KastBipartiteentanglementdynamics2014}.
The authors claim that for sufficiently weak coupling the model including the counterterm (as in Eq. \ref{eqn:hamiltonian_with_CT}) does not result in any entanglement generation for the two qubits.

\section{Conclusions}

In the context of an open two-qubit system we address the fundamental question: To what extent does the incorporation of the counterterm into the microscopic model counterbalance the effect of the Lamb shift Hamiltonian and, thus, inhibit the environmentally induced generation of entanglement?
The answer requires some prerequisites which we provided and discussed as well.
First of all we used the well tested \ac{HOPS} method to obtain the exact entanglement dynamics.
With the exact dynamics at hand we were able to assess the accuracy of various perturbative approaches.
We found that the \ac{RFE} yields the most accurate results which is not too surprising since it involves the least approximations.
We argued that positivity violations can be consistently dealt with by using the positive matrix $\sqrt{\rho \rho^\dagger}$ to estimate the amount of entanglement.
However, to answer our main question a master equation of \ac{GKSL} kind is desirable which clearly separates the unitary from the dissipative influence of the environment.
As expected, we confirm that the \ac{GAME} as well as \ac{PRWA} approach yield reasonable entanglement dynamics also for detuned qubits.
Concerning the above assertion, if the Lamb shift Hamiltonian (unitary influence of the environment) is truly compensated by the counterterm the resulting dynamics should match the perturbative dynamics obtained by the master equation under the exclusive action of the dissipator in the weak coupling regime.
Therefore, we compared the exact dynamics including the counter term with the dissipator only dynamics of the \ac{PRWA} approach.
The \ac{GAME} approach could have been used equally well.
It is clear, that for finite $\omega_c$, if at all, the compensation is only approximate.
We found that for an Ohmic environment the exact dynamics matches fairly well the dissipative dynamics of the perturbative approach -- the counterterm compensates the Lamb shift Hamiltonian in some sense.
However, decreasing $s$ (sub-Ohmic environment) while keeping $\omega_c$ constant worsens the compensation.
For small $s \lesssim 0.3$ the entanglement generation is rarely influenced by the counterterm.
This behavior can be traced back to the power law behavior of $S(\omega) \sim |\omega/\omega_c|^s$, the imaginary part of the half sided Fourier transform of the \ac{BCF}, and is amplified by the pointed minimum of $S(\omega)$ at $\omega=0$ for $s < 0.5$.
Remarkably, for resonant qubits and a sub-Ohmic environment even in the adiabatic limit $\omega_c \rightarrow \infty$ the entanglement generation cannot be modeled solely by the dissipator of the perturbative master equation.
We showed that on the one hand, increasing $\omega_c$ slows down the generation of entanglement, which is due to the still imperfect compensation.
On the other hand the relaxation time increases in precisely the same manner.
Consequently, even in the limit $\omega_c \rightarrow \infty$ the entanglement dynamics is influenced by the infinitesimal non-zero difference between the Lamb shift Hamiltonian and the counterterm.

In summary, for an environment with finite $\omega_c$ including the counterterm in the microscopic model does not imply that the unitary influence of the environment on the system is canceled.
For the general detuned case, in order to achieve the same level of compensation while going from the Ohmic to the deep sub-Ohmic regime the cutoff frequency $\omega_c$ needs to be increased.
It is a special property of two resonant qubits that even though the Lamb shift Hamiltonian and the counterterm approach each other in the large cutoff regime the entanglement dynamics is influenced significantly by the remaining infinitesimal difference.

Alongside these main findings we reported that in a perturbative regime the \ac{RFE} with time dependent coefficients yields the most accurate entanglement dynamics when curing positivity issues by the replacement $\rho \rightarrow \sqrt{\rho \rho^\dagger}$.
The recently proposed \ac{GAME} which guarantees positivity yields results which qualitatively agree with the \ac{RFE} while being slightly less accurate.
Applying the \ac{RWA} only partially yields reasonable entanglement behavior also for detuned qubits while superimposed fast oscillations are obviously missing.
As of the rather small cutoff frequency considered here and the slow algebraic decay of the \ac{BCF} the \ac{CGME} is not suitable.
These findings are in line with results in Ref. \cite{HartmannAccuracyAssessmentPerturbative2020} obtained for a Lorentzian environment.

In addition we report that although the initial entanglement generation is followed by a decay, the asymptotic value of entanglement does not vanish for the initial states $\ket{\uparrow \uparrow}$ and $\ket{\downarrow \downarrow}$.
From the exact numeric solution we find a linear relation between the asymptotic entanglement and the coupling strength.
None of the perturbative methods considered here capture this feature correctly.

Further, independent of the particular model and based on the \ac{RFE} we argued that the Lamb shift Hamiltonian and the counterterm cancel up to some error which is related to the approximation $S(\omega_i) \approx S(0)$ for all $\omega_i$ where $\omega_i$ takes the values of all possible transition frequencies of the system Hamiltonian.
For a (sub-) Ohmic environment this approximation becomes exact in the limit $\omega_c \rightarrow \infty$ (adiabatic limit).
This, however, does not necessarily imply that the dynamics is not influenced by the remaining very small unitary influence of the environment, as explained above.

As a continuation of the results presented here, the entanglement dynamics under the influence of a thermal environment, again with particular focus on the perturbative regime, will be considered in future work.
Both, the exact \ac{HOPS} method as well as the perturbative master equations are capable of treating non-zero temperature environments.
In general, as of the additional thermal fluctuations we expect less entanglement generation.
The particular behavior of the asymptotic entanglement and whether or not the anomaly in the adiabatic regime will remain has yet to be investigated.

We gratefully acknowledge fruitful discussions with Kimmo Luoma, Valentin Link, Konstantin Beyer and Dario Egloff.
We also thank the \mbox{IMPRS} "Many-Particle Systems in Structured Environments" for their support.
The computations were performed on a Bull Cluster provided at the Center for Information Services and High Performance Computing (ZIH) at TU Dresden.

\bibliographystyle{unsrtnat}

redpajama_set_name: RedPajamaArXiv


By all appearances the Future of Food event organized by WashingtonPostLive was an all-star gala featuring some of my favorite writers and food-movement activists. I am a card-carrying member of the choir to whom the speakers of the conference were preaching. Marion Nestle, one of the high-profile participants heralded the event as an indication that the nascent food movement has gone mainstream. If the Future of Food was the mainstream unveiling of the food movement to America then, in my judgment, it's not quite ready for primetime.
My concern is not with the content of what was said and advocated, most of which I agree with, but rather with the elitist overtones. I would normally acknowledge the elitist undertones of the sustainable food movement, but when you have the Prince of Wales as your keynote speaker, there is nothing understated about it. Again, the content of what Prince Charles said is great, but in this case the medium is more powerful than the message. Do we really want a British royal as voice of advocacy for sustainable food in the US. I don't care if he has a bunch of employees that run an organic farm for him, that doesn't mean you can introduce him as an "organic farmer." It reinforces the worst elitist caricatures traditional ag. advocates attach to the food movement and has the potential to weaken the cultural argument for organic and sustainable alternatives.
Apparently others don't share my concern. Maria Rodale at the Huffington Post couldn't hardly contain her excitement describing her encounter with the Prince in an article titled, "What It's Like to Meet a Prince."
The first sign that I knew I would like the Prince was that a burly Scottish-looking brute came into the room and opened all the windows (even though it was a bit chilly and rainy outside). "The Prince prefers fresh air," he stated. While others in the room shuddered with the cold, I sighed with relief. I'm a lover of fresh air, too.
Suddenly, I turned and there he was, heading straight for me! Our eyes met…his were blue. All I could remember from the protocol was that I didn't have to curtsy, but I was supposed to wait until he extended his hand first for a shake. We shook hands. His shake was firm (hands of a gardener!). He seemed kind of tan, too. I don't think it was fake.
The future of food will apparently be ushered in by hunky Scottish men making sure all of us food pioneers have plenty of fresh air. I'm sure Bob Stallman, president of the American Farm Bureau, will take this as a forboding shot across the bow of entrenched agri-business. His adversaries in the local/organic food community have real tans and the "hands of gardeners."
Five days after hosting one of the most spectacular celebrations of privilege ever seen, the Prince of Wales has been telling Americans about the importance of restraint and responsibility.
We must not work or think on a heroic scale. In our age of global industrialism heroes too likely risk the lives of people, places, and things they do not see. We must work on a scale proper to our limited abilities.
In other words, changes to the food system are best worked out by people who are in a direct relationship with people, places, and things. It needs to be a grassroots movement of real people in real places fleshing out real practices. It's nice to have famous and powerful people advocating for a better food system, but the real work needs to happen in our communities among ordinary folks working with our limited abilities, and limited resources. As he says, sometimes the heroes do more damage than good.
We must quit solving our problems by moving on. We must try to stay put and try to learn where we are geographically, historically and ecologically.
In defense of Miss Rodale's breathless response to meeting Prince Charles, I would have reacted with the same star-struck adoration upon meeting Wendell Berry. He will be speaking in Seattle on May 24.
Picture: Wildhorse Monument in Central Washington. Part of my efforts to pay attention to a place.


Tent (nickname of Red Shirt leader Natthawut Sai-kuea): We can not live without Thaksin!!!!
Caption: Tent is so clear.
[This references the belief that those who support Thaksin–Red Shirt leaders and MPs–only do so because they are on the payroll of the Shinawatra family.


Miles' music continues to grow in its beauty, subtlety and sheer magnificence.these chaps have discovered a new way to cook." as stated by Rolling Stone (5/28/70, p.50). This quote says it all. Trumpeter Miles Davis was a great artist who was creating a New World for jazz music. He made a career out of shifting gears and encouraging his fans to not get too comfortable in their listening habits. Miles Davis once said that music was "a curse" for him because he thought of nothing else while he was awake. Music was his life. .
Miles Davis was born in Alton, Illinois and grew up in East St. Louis. When his father gave him his first trumpet at the age of 11, all he wanted to do was learn to play it better. He was inspired to become a musician in the 1940's and received first hand education from Charlie Parker. Miles Davis's career was almost 50 years long. He died in 1991, and had been part of many different jazz revolutions. When he started it was the middle of the Be Bop revolution. Charlie Parker, Dizzy Gillespie and Max roach were a great part of this revolution. He recorded one of the most popular jazz albums in the 50's, titled "Kind of Blue." In the 60's he listened to Herbie Hancock and Tony Williams and played a new intense jazz. From this he started looking towards electronic music. These new songs were usually longer and did not have the melodies and choruses that most listeners were used to. Then in 1975 he retired from music after exploring a lot of aspects of electric jazz. He only stayed retired for a short 5 years though. In 1980 Miles came back into music exploring contemporary music. He did covers for songs by Cyndi Lauper, Michael Jackson and Scritti Politti. When he died in 1991 he was just starting to experiment with hip-hop music. .
In the late 1960's and early 1970's Davis ushered in the age of fusion with a steamy electric concoction of bubbling funk, explosive rock and abrasive jazz.


Make your teacher evaluations even more effective and meaningful with professional development integrated into EvaluWise that is targeted to the areas you identify as needing improvement based on your evaluation data.
Accessible through mobile devices and computers, information is stored securely in the cloud. Making your teacher evaluation data available when you need it most.
Take EvaluWise® for a test drive with a free trial. Set it up for your organization or try a demo account that's ready to go.
Explore EvaluWise® and learn how it makes teacher evaluation manageable and effective. Learn how getting started is as easy as 1-2-3.
Make your teacher evaluations even more effective and meaningful with professional development integrated into EvaluWise®.
Get EvaluWise® for your organization today so you can easily and efficiently manage the teacher evaluation process.
Learn how EvaluWise will save you at least 2-3 hours per evaluation! Have us contact you for a live demo.
EvaluWise® is the single most effective digital tool for streamlining and improving the teacher evaluation process, regardless of the evaluation model you are using. This tool makes data entry as simple and easy as possible. Built from the ground up by administrators and teachers who understand the real-world demands of educators, EvaluWise® improves the accuracy, usefulness and effectiveness of both formal and informal teacher evaluations as well as classroom walkthroughs.


Lessons from an 18-month geek out over the history of Eames communication design.
Designing and manufacturing an iconic award for the Palo Alto International Film Festival.
A bottle opener that also provides personal protection.
A few days ago a friend in Indianapolis sent me a lovely gift of olive oils and vinegars from a local place called Artisono's Oils and Spices. After cracking open and sampling a few of the bottles, I learned that this place truly has earned the 5 stars and rave reviews on its Yelp page. While the oils and vinegars are delicious on their own, it would be a shame to just use them for dipping bread or making vinaigrettes like the stuff we usually have. Why not, I thought, use them for something more interesting?
As you may recall, I have a bit of an affinity toward ice cream. I recalled having eaten olive oil ice cream in the past, and 5 seconds on Google confirmed that all you need to do is take a regular custard-based recipe and dump in half a cup of olive oil at the end in lieu of normal flavorings like chocolate or mint. After a rigorous scientific test involving one spoonful each of the lime and blood orange flavors, I determined that the blood orange was the least risky of my options. I didn't even consider the herbed flavor, although I bet it would be good for a non-dessert ice cream.
Soooo good! The blood orange flavor makes it taste like a buttery smooth Creamsicle. The orange flavor is definitely stronger than the olive oil taste, but neither were overwhelming.
I received the 2-Quart Cuisinart ice cream maker as a wedding present and have found that it's just perfect for my current burn rate of about one batch per month. There's just a bowl that you pop in the freezer for a couple of days before you make the ice cream, and otherwise it's pretty much a giant motor attached to an ice cream paddle with an on/off switch. The best part is that it's small and lightweight. This is good if you move frequently or just don't have a lot of storage space.
On the other hand, if you want to, say, make multiple batches of ice cream for a number of party guests, or find yourself impulsively wanting to whip up a batch and can't wait 24-48 hours for the freezer bowl to cool, there are some fancier models out there that include built-in cooling units. These are good if you have unreasonably large amounts of kitchen storage and someone with a very strong back at your disposal to help transfer your ice cream maker from storage to counter. Needless to say, I haven't spent much time investigating these fancier models.
Set up an ice-bath: Fill a large bowl 1/4 of the way up with ice water. Place a medium-sized bowl over the ice water. Place a mesh strainer on top.
In a medium saucepan, dissolve the sugar and salt in the milk and cream over medium heat. Slowly drizzle the warmed mixture into the egg yolks, whisking without stopping, until smooth. Return to the saucepan and cook over medium heat, stirring and scraping the bottom and sides of the pan constantly, until the custard thickens and coats the back of a spoon.
Pour the custard through the strainer, discarding the solids left behind.into your chilled bowl. Add the olive oil and vanilla extract, and whisk well for 2 minutes, until it is well blended. Cover the mixture and refrigerate 2 hours or overnight. Churn according to your ice cream maker's instructions. Store in a shallow container*, covered with plastic wrap and and air-tight lid. Keeps up to 2 months frozen.
* Pro tip: The quart-sized rectangular Pyrex is perfect for storing a batch of Cuisinart ice cream; I recommend puting it in the freezer at least an hour before your ice cream is finished to prevent your batch from melting around the edges. Since it's never very frozen after the machine, melting is always a bit of a concern.
Ideas for taking a pleasant museum-going experience and turning it into an extremely happy experience for all stakeholders.
I designed the UX for this iPad app that lets you sift through your news like it's a stack of papers. What's UX, you ask? Read to learn.
A Processing data visualization shows that money and happiness are not as correlated as you might think.
While recovering from my turkey-and-pecan-pie-induced-coma this afternoon, I visited San Francisco's Cartoon Art Museum. The venue is very small-- just the right size for a perfectly digestible bit of culture. My favorite exhibit was Once Upon a Dream: The Art of Sleeping Beauty. Not having seen the film since I was a kid, I had no appreciation of how great this film was from an artistic perspective; artistic lead Eyvind Earle was given free reign and nearly ten years by Disney himself in order to create the film's "unique blend of lush detail and bold, stylized designs." The best part was seeing the rough sketches, and Sleeping Beauty painted with many trial combinations of skin and dress colors juxtaposed to the final animation cels. In the Stanford JPD we place a lot of emphasis on these types of simple sketches and cardboard mockups, knowing this process can (and often does) yield wonderful masterpieces.
Other current exhibits include Monsters of Webcomics, where the medium meets the internet, Fantastic Mr. Fox's puppets and sets, and Spain Rodriguez: Rebel in Ink and the highlights of his 40-year comic book career.
Unfortunately, cameras weren't allowed inside the exhibit, so you will need to go in-person to enjoy the shows.
Today is the Big Game, the annual football game between Stanford and UC Berkeley. The excitement surrounding this game is completely foreign to me, having spent my undergraduate years at a school with a D3 team that many students are unaware even exists. All week friends were making plans for tailgating, special breakfast events, and other festivities in honor of the game. Student tickets are hard to come by, and require having gone to a number of games earlier in the season. Unfortunately, I am not in town to witness the spectacle today, but I did see the many signs around campus this week proclaiming "Beat Cal." Yesterday I stumbled on my favorite preparation for the Big Game: one of Stanford's many fountains had been dyed red in honor of Cardinal, Stanford's school color.


text:
Amateur baseball standouts earn Hall of Fame status
New inductees include Mike Garry and Brad Goldstine of Sioux Falls, Pat Schmidt of Dell Rapids, Lee Stoddard of Madison and Lonni Stover of Redfield.
Amateur baseball standouts earn Hall of Fame status New inductees include Mike Garry and Brad Goldstine of Sioux Falls, Pat Schmidt of Dell Rapids, Lee Stoddard of Madison and Lonni Stover of Redfield. Check out this story on argusleader.com: https://www.argusleader.com/story/sports/2018/07/27/south-dakota-amateur-baseball-hall-fame/841894002/
Argus Leader Staff Published 10:08 a.m. CT July 27, 2018 | Updated 11:46 a.m. CT July 27, 2018
Pat Schmidt was a mainstay both offensively and defensively for much of his career as a member of the Dell Rapids PBR.(Photo: Argus Leader)Buy Photo
Five former standouts will be inducted into the South Dakota Amateur Baseball Hall of Fame in September.
The new inductees include Mike Garry and Brad Goldstine of Sioux Falls, Pat Schmidt of Dell Rapids, Lee Stoddard of Madison and Lonni Stover of Redfield.
The Hall of Fame class will be recognized on Aug. 11 during semifinal day of the state amateur baseball tournament in Sioux Falls.
The Hall of Fame banquet is scheduled for Sept. 29 at Nicky's Restaurant and Lounge in Madison. Further details on the banquet will be finalized in the coming weeks.
Here are the inductees:
Mike Garry
Garry played for Montrose, the Sioux Falls Merchants and Harrisburg during a 22-year amateur baseball career in which he batted .335 and compiled 154 pitching victories.
During his three years of amateur ball in Montrose, he recorded consecutive no-hitters against Marion and Spencer — a state record. He spent one year with the Sioux Falls Merchants and played in the state Class A tournament before closing with a 15-year stretch (1978-1992) with Class B Harrisburg.
He played in 11 state tournaments, including two as a pickup player with Canova and Larchwood (Iowa) and eight with Harrisburg — which finished second in the 1982 state B tournament and also reached the semifinals in 1980, 1981 and 1984.
Brad Goldstine
The Bridgewater native also enjoyed plenty of success as a hitter and pitcher during a nearly two-decade amateur baseball career with teams in Emery, Bridgewater, Salem and the Renner Monarchs.
A four-year college football starter at South Dakota Tech in Rapid City, Goldstine never hit below .370 in his first 15 seasons of amateur ball. He batted over .500 one season in Bridgewater and well over .400 in another at Salem. He also compiled a 10-0 regular-season pitching record one season at Salem and compiled a 26-game hitting streak in 1976.
The left-handed hitter and thrower spent more than a decade at the close of his career as a mainstay for the Class B powerhouse Renner Monarchs.
Lee Stoddard
The Parker native also spent nearly 20 years as a standout player for amateur teams in Lennox, Montrose, Freeman and Arlington-Oldham before playing in his final 12 years with the Madison Broncos.
The Broncos, with Stoddard as one of the leaders, captured state championships in 1974, 1978 amd 1981 and also reached the semifinals in 1970, 1977 and 1979. Stoddard served as the player-manager for the 1978 state champions.
Noted as a power hitter, Stoddard batted over .350 during his amateur career and recorded two five-hit games in the state tournament in 1977 and 1979.
Stoddard earned all-tournament honors in the state tournament five times — 1970, 1972, 1974, 1977 and 1979.
Pat Schmidt
Schmidt played collegiate baseball at South Dakota State before embarking on a notable amateur career as a standout hitter and shortstop that spanned from 1989 through 2015.
He was a mainstay both offensively and defensively for much of his career as a member of the Dell Rapids PBR, which claimed eight state Class B titles from 1991 through 2002. PBR won titles in 1991, 1993, 1994, 1996, 1997, 1998, 2001 and 2002.
Schmidt consistently batted over .400 for much of his career and had two seasons where he batted over .500. He earned Class B all-tournament honors at state in 1991, 1993, 1994 and 1996 and was named the Class B MVP in 1994.
He played in 19 state tournaments — 16 with Dell Rapids PBR from 1989 through 2005, one as a pickup player for Garretson in 2009 and two the Renner Old Timers (Over 40) in 2010 and 2012.
Lonni Stover
The Webster native opened his 26-year amateur baseball career with his hometown Dux before closing it with an 18-year run as a member of the Redfield Dairy Queen teams that compiled a record of 520-118 from 1995 through 2012.
Stover was a regular on the mound and in the lineup for the Redfield teams that won 16 district championships and state Class B titles in 2000 and 2006. Stover was named the Class B MVP in the 2000 state tournament and went 12-0 on the mound that season.
The right-handed hurler won 176 games and lost only 36 during his career, going 42-19 with Webster and 134-17 with Redfield. He notched 30 consecutive wins from 2000 through 2002 and went 26-6 in the postseason for the DQ teams.
Sanford International looks to boost fan experience

redpajama_set_name: RedPajamaCommonCrawl


Great opportunity to own and build on a Lakefront lot with Gulf View in a Panama City Beaches premiere waterfront subdivision ''The Lakes at Summer Breeze''. This lot has a seawall already in place and may just be the best lot in the entire subdivision. This subdivision is walking distance to the Gulf of Mexico with views of the gulf possible. Easy access to subdivision down Hwy 79 and Front Beach rd. Short drive to Pier Park and all the amenities this upscale shopping center has to offer. Including Pier Park North that just recently opened. If you need help building a home on this lot one of the owners is a excellent Coastal Custom Home builder. Call for details. The lot dimensions should be verified by a survey and all utilities, building requirements, zoning and restriction as well.
Amazing Opportunity - A RARE corner lot with multiple access options and water views. Located just steps from Front Beach Rd. and a public beach access. This is a great place to call your fulltime home or to vacation. We have house plans to fit this lot or you can use your own!


The National Honor Society (NHS) is one of the oldest and largest recognition programs for high school students in grades 10-12 in the United States of America; however, it is also present in several other countries. NHS honors those students who have demonstrated excellence in the areas of scholarship, leadership, service, and character. The National Honor Society was founded in 1921 by the National Association of Secondary School Principals.
Students in grades 10, 11, and 12 are invited to apply for induction in to Brent's chapter of the National Honor Society. Completed applications must be submitted to Mrs. Jewell in S-313 by 3:30 pm on Wednesday, January 30, 2019. Late applications will NOT be accepted. Students may also reference the NHS Candidate Rubric (to be completed by the NHS Faculty Council) for more information about how new members are selected.
The Faculty Council of the chapter selects students who demonstrate outstanding performance in all four criteria of scholarship, leadership, service, and character.
The scholarship requirement is based on a student's cumulative grade point average. The minimum GPA allowable in Brent International School, Manila is a 3.50. All students who meet this requirement are then eligible for consideration on the basis of service, leadership, and character.
This quality is defined through the voluntary contributions made by a student to the school or community, done without compensation and with a positive, courteous, and enthusiastic spirit.
The student of good character upholds principles of morality and ethics, is cooperative, demonstrates high standards of honesty and reliability, shows courtesy, concern, and respect for others, and generally maintains a good and clean lifestyle.
National Honor Society members, along with other Brent students and an NHS advisor, go to Gawad Kalinga Philips Village every Saturday morning and teach Math and English to a group of about 50 children in the village. Since it has been going on for a few years, the children of this village have become part of Brent family. NHS students organize Christmas and end of the year party every year at Brent International School Manila Campus for the students and their parents.
The NHS chapter at Brent International School Manila has been making a difference in the lives of the public school children of Gawad Kalinga (GK) Philips Village, Philippines. For the past 6 years we have held a weekly tutoring program, but these children only had access to two workbooks (Math and English). Last year, the chapter decided to establish a children's library for the village. Members took initiatives and worked collaboratively for 6 months. They organized a school- wide book drive and a fundraiser to build the library. The 'Brent NHS Children's Library' was inaugurated on the10th December by our principal and the president of the village. For this accomplishment they were selected for one of the 10 Outstanding Service Project Awards given in 2012. Considering there are 23,000 active chapters of NHS and NJHS worldwide, this is a remarkably admirable accomplishment. The full list of winning chapters is posted on the national website at www.nhs.us/osp.


text:
Q: NSAttributedString not changing colour of certain text of NSTextview I'm using NSAttributedString to change the text color of my NSTextview. When I want to change the color of a word, the color will not show. Here is my code for more detail
let main_string = "Hello World"
let string_to_color = "World"
let range = (main_string as NSString).range(of: string_to_color)
textView.textStorage?.addAttribute(NSAttributedString.Key.foregroundColor, value: NSColor.orange, range: range);

When I want the change the text Colour of another string,
let main_string = "Hello World"
let string_to_color = "World"
let range = (main_string as NSString).range(of: string_to_color)
textView.textStorage?.addAttribute(NSAttributedString.Key.foregroundColor, value: NSColor.orange, range: range)

let jhgfds = "Lorem Ipsum"
let tdftgdg = "ipsum"
let raresrgsdnge = (jhgfds as NSString).range(of: tdftgdg)
textView.textStorage?.addAttribute(NSAttributedString.Key.foregroundColor, value: NSColor.orange, range: range)

This is what happens

Can you please help me with this
Here is my full code…
import Cocoa
import WebKit

class ViewController: NSViewController, NSTextViewDelegate {
    struct Keys {
        static let noteBook = "noteTaking"
        static let title = "appTitle"
    }
    @IBOutlet weak var livePreviewOn: NSButton!
    var isPaused = true
    var timer = Timer()
    @IBOutlet var textView: NSTextView!
    let defaults = UserDefaults.standard
    @IBOutlet weak var webView: WKWebView!
    @IBOutlet weak var scrollView: NSScrollView!
    /// - Tag: setRepresentedObjectExample
    override var representedObject: Any? {
        didSet {
            // Pass down the represented object to all of the child view controllers.
            for child in children {
                child.representedObject = representedObject
            }
        }
    }
    override func viewDidLoad() {
        super.viewDidLoad()
        scrollView.magnification = 1.5
        textView.isAutomaticQuoteSubstitutionEnabled = false
        checkSavedText()
        Timer.scheduledTimer(timeInterval: 0.5, target: self, selector: #selector(self.updater), userInfo: nil, repeats: true)
    }
    @IBAction func pauseResume(sender: AnyObject) {
        if isPaused{
            timer =  Timer.scheduledTimer(timeInterval: 0.5, target: self, selector: #selector(self.update), userInfo: nil, repeats: true)
            isPaused = false
        } else {
            timer.invalidate()
            isPaused = true
        }
    }
    @IBAction func saveBTN(_ sender: Any) {
        saveNoteBookText()
    }
    func saveNoteBookText() {
        defaults.set(textView.string, forKey: Keys.noteBook)
    }
    func checkSavedText() {
        let name = defaults.value(forKey: Keys.noteBook) as? String ?? ""
        textView.string = name
    }
    @objc func update() {
        saveBTN(self)
        webView.loadHTMLString(textView.string, baseURL: nil)
    }
    @objc func updater() {
        saveBTN(self)
        let main_string = "Hello World"
        let string_to_color = "World"
        let range = (textView.textStorage!.string as NSString).range(of: string_to_color)
        textView.textStorage?.addAttribute(NSAttributedString.Key.foregroundColor, value: NSColor.orange, range: range)
    }
}

redpajama_set_name: RedPajamaStackExchange


Let our Ashley dress become your new go-to for all your spring events! The sweetheart off-the shoulder design and soft floral pattern make for the perfect bridal shower, wedding guest, and brunch with the girls dress. The dress features ruching, ruffles, asymmetrical hem and an invisible back zipper closure.


text:
You are here: Platypus /Archive for category Halifax Upcoming Events
[10.15.2015] Electoral Politics and the Left (Halifax)
Halifax, NS:
Shirley Tillotson (Department of History, Dalhousie University)
Herb Gamberg (Author of "Marxism After Marx" (forthcoming))
Madelaine (Parti communiste révolutionnaire-Revolutionary Communist Party (supporter))
During the 19th century, suffrage rights were widened in the heart of capital, confronting political radicals with the question of whether and how elective offices could be used to achieve revolutionary aims. Since that time, differences of opinion on how to approach electoral politics have been at issue throughout the Left's most fundamental splits: the break between Marxism and anarchism; the apparent capitulation of international social democracy to world war; the struggle for the legacy of the Russian Revolution; to capitalist stabilization and the apparent apathy to politics that would characterize our time.
Since the early 20th century such splits have attended the decline of the Left rather than its ascendancy, forcing recent generations of marginalized radicals to grapple with an impossible choice: either a "realistic" electoral compromise with the status quo, often couched in the logic of "lesser evilism," or a "sectarian" electoral purism doomed to irrelevance, often inspired by fidelity to once-revolutionary "correct positions." This impasse guarantees a hearing for those who, like many Occupy movement activists, advocate a principled abstention from electoral politics.
In the present moment there seems to be a shift back from popular mobilization and movement building, to electoral strategies and parliamentary representation. Although previously social movements severely criticized existing parliamentary democracy, the idea of facilitating radical causes through electoral politics and campaigns has recently gained prominence. So in Canada there has been the growth of the NDP (not only federally, but with a victory in Alberta); the European crisis has seen the rise of Syriza in Greece, Podemos in Spain in and the victory of Jeremy Corbyn to the leadership of the Labour Party in the U.K.; in the U.S. an avowedly social democratic Bernie Saunders appears to be having some success in the race for the Democratic leadership.
This panel tries to bring into question the significance of electoral politics in a moment when party representation has been largely delegitimized and disapproved. What are the uses, limits, promises, and perils of electoral campaigns and elective offices for Leftist politics?
Coffee Break Reminder
Our monthly Coffee Breaks are a great way to meet Platypus members and fellow travelers, and to get to know the Platypus project. It's an opportunity to discuss issues raised in the latest issue of the Platypus Review, consider the state of the Left, and just hang out with people who have similar political interests.
Monthly 2014 Coffee Breaks
March 4th | 5:00 pm
Coburg Coffee 6085 Coburg Road, Halifax, Nova Scotia
Contact: Quentin Cyr | halifax@platypus1917.org
[1.21.15] What is Political Party for the Left?
In spite of many different political currents and tendencies, perhaps the most significant question informing the "Left" today is the issue of "political party."
Differing Perspectives on the Left: GegenStandpunkt (Germany)
Tuesday, October 14 at 6:30pm
Shatford Room, University of King's College
co-sponsored by NSPIRGDal/King's Platypus presents a workshop on the German Marxist group GegenStandpunkt by a visiting member of the group to Halifax.
http://www.gegenstandpunkt.com/The Platypus "Differing Perspectives on the Left" workshop series asks speakers from various perspectives are to bring their experience of the Left's recent history to bear on today's political possibilities and challenges. For recordings of other events in this series visit:
http://platypus1917.org/differing-perspectives-on-the-left/
Can There Be a Working Class Culture & Experience?
Presented by the Dalhousie/King's Platypus Affiliated Society
Co-sponsored by Carbon Arc Independent Cinema, NSCAD University, the King's Student Union and the Dalhousie Student Union Sustainability Office
Please join us for two events that explore the concept of working-class culture, its history and what it might mean today.
//OCT 17 (fri) @ 7pm - Leviathan (2012, 87 min, Lucien Castaing-Taylor and Véréna Paravel), Film Screening and Discussion
Carbon Arc Independent Cinema, 1747 Summer Street, Halifax
An experimental documentary on the North American commercial fishing industry. Leviathan captures the collaborative clash of people, nature and machine. Shot on a dozen cameras - tossed and tethered, passed from fisherman to filmmaker - it is an stunning and unusual portrait of contemporary work.
"visually ravishing. leviathan is in every way sensational." – j. hoberman, artinfotrailer link: https://www.youtube.com/watch?v=U2wNiJt-I6U
//OCT 20 (mon) @ 6:30pm - Can there be a working class culture and experience? Panel discussion
Room D500, NSCAD University Fountain Campus, 5163 Duke Street, Halifax
Bruce Barber (Media Arts Faculty at NSCAD University),
Sebastien Labelle (SEIU, Mayworks Festival Organizer), and
Chris Mansour (Platypus Member and independent writer).
Description: Throughout the 20th century, there was a powerful idea that there could be a homogeneous experience which would culminate into a revolutionary 'working class culture.' Whether represented through the USSR's Prolekult during the 1920s, the Mexican muralists and American Artist Union in the 1930s, or by the artists associated with the Art Workers Coalition in the 1960s-70s, each movement sought to create artworks which would transcend the decadent forms characteristic of bourgeois culture. However, since the variety of revolutionary aspirations of all these groups ultimately failed to transform society in an emancipatory direction, the merits and potentiality of a coherent working-class culture have been thrown into question. This panel seeks to explore the concept of working-class culture, its history, and what it might mean today.


You can test your geography skills and earn a few thousand Priority Club Rewards points with the program's latest promotion, The Anywhere Challenge.
Every Tuesday until the end of October, Priority Club will post a picture of a mystery location at http://www.priorityclub.com/challenge. The first picture posted on Tuesday will only reveal a part of the location plus one written clue about the destination. Each consecutive day, another piece of the picture will be displayed along with an additional clue.
Priority Club Rewards members who correctly identify the location of the picture by 11:59 PM (ET) on Tuesday will receive 2,000 points. Answer correctly on Wednesday to receive 1,500 points, Thursday to receive 1,000 points and Friday to receive 500 points. You can only enter once per day and you have four days to answer correctly, but you will earn more points if you answer correctly the first time.
Every week, members who have entered the contest will automatically be entered into a random drawing to win 30,000 or 60,000 points and other prizes, such as a digital camera or iPad.
Members can earn up to 16,000 points with this promotion, and it won't cost you anything. You will need to provide a detailed answer, such as Mt. Rainier National Park, WA USA instead of just Washington. If you want some help figuring out the location, FlyerTalkers have created a thread to discuss each week's location at http://www.insideflyer.com/link/?2926.
The promotion is only open to members residing in the U.S., Canada (excluding Quebec) and U.K.


text:
Q: How to get all users who upload photo in instagram for a specific location using location username or id? I want to get the list of users who has uploaded (shared) a photo on specific location (page)?
the user can type @location_user_name and then share the photo.
I want to get the user who share this photo from instagram api using location_user_name!
I tried the code below
https://api.instagram.com/v1/users/" + this.instagram_id + "/media/recent?min_timestamp=" + dateString + "&access_token=XXX";

I got the photos uploaded by the location itself not users.

A: As far as I know, Instagram always returns the same data about Photos entity.
I have completed the following request:
https://api.instagram.com/v1/users/41864127/media/recent/?client_id=my_client_id
And received the following response:
{
    "pagination":
    {
       ...
    },
    "meta": {
        "code": 200
    },
    "data": [{
       ...
       "user" : {
           "username" : "annafaithxoxo",
           "website" : "",
           "profile_picture" : "https:\/\/igcdn-photos-a-a.akamaihd.net\/hphotos-ak-xaf1\/10748350_344686255703816_1812933634_a.jpg",
           "full_name" : "A\u035cn\u0361n\u0361a\u035c F\u0361a\u035ci\u035ct\u0361h\u0361",
           "bio" : "",
           "id" : "41864127"
      }

...
So, there is an information about a user in the end of Instagram Photo data object.
I am sure that it should be there in your case too :)
If you don't get it from the server then show me your example json response, please.

A: Here is an implementation that does wha you want: http://www.gramfeed.com/instagram/places
You can search for a location, then view all pictures and get the usernames.
It used facebook places API to search for places at a location and then open the photos using the instagram endpoint:
https://api.instagram.com/v1/locations/<location_id>/media/recent?access_token=ACCESS-TOKEN


Answer a few questions and view jobs at Baryonyx that match your preferences.
Do You Work At Baryonyx?
How Would You Rate The Company Culture Of Baryonyx?
Have you worked at Baryonyx? Help other job seekers by rating Baryonyx.
You can find out what it is like to work at Baryonyx, also known as BARYONYX CORP, Baryonyx, Baryonyx Corp and Baryonyx Corporation.
Zippia gives an in-depth look into the details of Baryonyx, including salaries, political affiliations, employee data, and more, in order to inform job seekers about Baryonyx. The employee data is based on information from people who have self-reported their past or current employments at Baryonyx. While we have made attempts to ensure that the information displayed are correct, Zippia is not responsible for any errors or omissions, or for the results obtained from the use of this information. The data presented on this page does not represent the view of Baryonyx and its employees or that of Zippia.


The South Africa Wealth Report, released on Thursday, found that these streets far outperform the rest of the country when it comes to property prices.
The most expensive street outside Cape Town is in Plettenberg Bay where you'd pay an average of R43,000 per square metre – R52,000 less than Cape Town's most expensive street.
These are the most expensive streets for property in Cape Town and the whole of South Africa, according to the report.


The Markets in Financial Instruments Directive (MiFID) II came into effect on 3 January 2018 and delivered some significant changes to investing regulations in the UK.
The Terms and Conditions will be changing as a result of these new regulations. A copy of the new Terms and Conditions will be provided towards the end of the year.
MiFID II requires investors to supply additional information to be able to continue trading in 2018.
Check your full name, date of birth and nationality/nationalities are recorded correctly on your account.
For sole UK nationals, the NCI is your National Insurance Number.
Non-UK nationals, and anyone who has multiple nationalities, may be asked for a different NCI. e.g. your passport number.
When do I need to supply the information?
Prior to your first trade in 2018.
If you don't provide this information, we may not be able to trade for you in 2018 until your information is updated. This includes any Regular Investments and Dividend Reinvestments.
Log in to your account as usual. Update your information in 'My profile' which can be found by clicking on your initials within the circle at the top right hand of the page.
You can also take the opportunity to review your other personal details and marketing preferences at the same time.
The first named account holder can check and update information online by logging in to the account as usual. Update information in 'My profile' which can be found by clicking on your initials within the circle at the top right hand of the page.
Please complete and post the Personal Details Update form to us.
Information for all account holders must be updated.
The Personal Details update form has to be completed for every member of the Investment Club, including the Lead Investor. The Lead Investor can complete the form on behalf of the members – a signature is not required.
Please post all the completed forms to Selftrade together.
The parent/guardian managing this account should complete and post the Third Party Regulatory Details form to us.
We have the child's name, address and date of birth on file.
When returning your form, or calling Customer Services, please confirm their nationality. If they are solely a UK National, we will not require anything from you, as they are not allocated a National Insurance Number until they are 16. If they are a non-UK national, or have multiple nationalities, we may need a different NCI.
MiFID II regulations state that company, charity and trust accounts are required to obtain, and supply, a Legal Entity Identifier (LEI).
A LEI is a 20-character identifier that identifies distinct legal entities that engage in financial transactions. Further information can be found on the London Stock Exchange at www.lseg.com/LEI.
In order to place a trade after 2 January 2018, please obtain and provide us with the LEI. Please send the LEI to us by secure message from your account.
An LEI must be applied for via an accredited body – a list of all issuing organisations can be found at: https://www.gleif.org/en/about-lei/how-to-get-an-lei-find-lei-issuing-organizations Please note that the issuing organisation will charge a fee for providing and renewing an LEI.
In the lead up to 3 January, it's likely that organisations issuing LEIs will be subject to an increased volume of requests and lead times for obtaining your LEI may vary.
If there is a third party linked to your account e.g. a relative or an advisor, who makes investment decisions on your behalf, they will also need to provide some additional information.
The information can be provided by completing the Third Party Regulatory Details form, found in the forms and guides section of our website, or by calling Customer Services 0345 0700 720.
Find out more about the MiFID II changes and how they might affect the investment landscape.
There will also be changes to 'complex' products that may affect you.


text:
define(['exports', 'aurelia-templating', 'aurelia-dependency-injection', 'aurelia-logging', 'aurelia-pal'], function (exports, _aureliaTemplating, _aureliaDependencyInjection, _aureliaLogging, _aureliaPal) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.CompileSpy = undefined;

  var LogManager = _interopRequireWildcard(_aureliaLogging);

  function _interopRequireWildcard(obj) {
    if (obj && obj.__esModule) {
      return obj;
    } else {
      var newObj = {};

      if (obj != null) {
        for (var key in obj) {
          if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
        }
      }

      newObj.default = obj;
      return newObj;
    }
  }

  var _dec, _dec2, _class;

  var CompileSpy = exports.CompileSpy = (_dec = (0, _aureliaTemplating.customAttribute)('compile-spy'), _dec2 = (0, _aureliaDependencyInjection.inject)(_aureliaPal.DOM.Element, _aureliaTemplating.TargetInstruction), _dec(_class = _dec2(_class = function CompileSpy(element, instruction) {

    LogManager.getLogger('compile-spy').info(element, instruction);
  }) || _class) || _class);
});

redpajama_set_name: RedPajamaGithub


If I use the TAB key to go to the "RST sent" field in CW mode, cqrlog fills in a 599 with the S field highlighted. That's fine. But if I enter an S value, say "5", it updates the "T" field, so the report becomes 595 instead of the expected 559.
Anybody noticed this bug too?
yes, I know about this bug. Unfortunately it's happening only on specific configuration of GTK theme. It's alredy fixed in the source code on GitHub and it will be part of new release. I wrote my own code to rewrite the selected part of the report and it's independent on the GTK configuration.
Thanks Petr. I did not see this bug on my old Kubuntu 16,04 (with same version of CQRLOG IIRC), so I'll check what the difference in the GTK configuration is.
The new version j2.3.0 ust came in. This bug is fixed, thank you very much!