\section*{Introduction}
The notion of entropy of a countable probability space was introduced by Shannon in 1948.
He used it to define the asymptotic entropy (entropy rate) in order to  quantify the amount of information for a stationary stochastic process \cite{Sh48}.
Later in the mid 1950's  Kolomogorov  developed the notion of entropy of a measure preserving dynamical system \cite{Kol58}, and his work was completed  by Sinai \cite{Sin59}.
But, it was only  in 1972, that Avez defined the asymptotic entropy of a random walk on a group \cite{A72}.
Despite a formal similarity, the contexts of these definitions are different, and so far
there is no common approach which would unify them.

\medskip
The asymptotic entropy is an important quantity which describes the behavior of a random walk at infinity.
For instance, the triviality of the Poisson boundary of a random walk is equivalent to vanishing of the asymptotic entropy \cite{ A74,De80,KV83}.

\medskip

There are various formulas for the asymptotic entropy of a random walk on a group:
\begin{enumerate}
\item [\upshape(i)] In terms of the entropy of convolution powers \cite{KV83}, see equality (\ref{def asy}) below,
\item [\upshape(ii)] Shannon's formula \cite{De80,KV83}, see Theorem~\ref{shannon} below,
\item [\upshape(iii)]\label{iii} As the average of  {\it Kullback--Liebler deviations} between the harmonic measure and its translates  \cite{K83,KV83}, see equality (\ref{mubnd}) below,
\item [\upshape(iv)] As the exponential growth rate of the Radon--Nikodym derivatives of  the translates of the harmonic measure along sample paths of the random walk \cite{KV83}, see equality  (\ref{harmonic}) below.
\end{enumerate}

In the last two formulas, the asymptotic entropy is expressed in terms of the Poisson boundary of the random walk,
which suggests considering a possible relationship between asymptotic entropies for random walks on the same group which share
a common Poisson boundary.

Earlier this relationship was studied in two particular situations:
\begin{enumerate}
\item [(j)] convex combinations of  convolutions of a given probability measure  \cite{K83},
\item [(jj)] the induced random walk  on a recurrent subgroup \cite{Fu70, K91, K90, Y13}.
\end{enumerate}

In case (j), the asymptotic entropy can be obtained by a direct calculation based  on formula \upshape(iii) \cite{K83}.

 In case (jj), Furstenberg \cite{Fu70} introduced induced random walk on a recurrent subgroup and proved  that its Poisson boundary is the same as the original Poisson boundary.
Kaimanovich \cite{K90} used a similar model to study harmonic functions on a Riemannian manifold and  to compare the asymptotic entropies in this context. Although his setup was somewhat different, by the same approach one can also find the asymptotic entropy of the induced random walk  on a recurrent subgroup
\cite{K91}. Recently, Hartman, Lima and Tamuz  \cite{Y13} calculated the asymptotic entropy of the random walk induced on a finite index subgroup  in an alternative way by using formula \upshape(iii) (although, apparently,  they were not aware of \cite{K90} and \cite{K91}).

\medskip

The probability measures arising in the above situations are examples of transformations of probability measures which do not change the Poisson boundary. Finding all probability measures with the same Poisson boundary is important for understanding the structure of a group $G$. For instance, Furstenberg \cite{Fu70} proved that the Poisson boundary of $SL(n,\Bbb R)$ is the same as the Poisson boundary of a lattice of  $SL(n,\Bbb R)$ endowed with an appropriate measure. By using this fact, he concluded that the lattices of  $SL(n,\Bbb R)$ for $n\geq3$ are different from discrete subgroups of $SL(2,\Bbb R)$.
\medskip

Despite the existence of several examples, currently there is no general way  to find all probability measures
on a group $G$ which have the same Poisson
boundary as a given probability measure $\mu$.  However,
Kaimanovich and the author \cite{BK2013} proposed  a method  to construct many probability measures whose Poisson boundary coincides with that of $\mu$.
This method consists in applying  a Markov stopping time to the original random walk (or, to its randomization) and all currently known examples can be obtained by this method.
\medskip

The purpose of this article is to show how these transformations affect the asymptotic entropy.
We will show that the asymptotic entropy $h'$ of the transformed random walk is the result of rescaling the asymptotic entropy $h$ of the original random walk by the expectation $\boldsymbol{\tau}$ of the stopping time  (Theorem~\ref{markov extension}):
\begin{equation}\label{abra}
h'=\boldsymbol{\tau} h.
\end{equation}
The aforementioned examples (j) and (jj) are contained in this result as  particular cases.

\medskip

Equation~(\ref{abra}), the rescaling  of the asymptotic entropy under a  ``time change'', is analogous to Abramov's formula
 \cite{Ab59} for the entropy  of induced dynamical systems (Theorem~\ref{abramov}). However, as we have already pointed out,
 we are not aware of any common context which would unify these two formulas.

Our proof consists of three steps. Firstly, by using the martingale theory, we  prove that  finiteness of the entropy   of a probability measure is preserved after applying a  Markov stopping time with a finite expectation (Lemma~\ref{finite}).  Secondly, by taking into account
formula \upshape(iv) for the asymptotic entropy, we will establish the main result. And finally, applying the same method, we will prove that this result holds for randomized Markov stopping times as well (Theorem~\ref{markov extension}).

We would like to emphasize that in  our general setup finiteness of the expectation   $\boldsymbol\tau$ is not related to finiteness of any associated space (which can already be observed in the  case of convolution powers, see above (j) ). On the other hand, the technique used by Hartman, Lima and Tamuz \cite{Y13} crucially depends
on the fact that for the induced random walks on  recurrent subgroups  $\boldsymbol\tau<\infty$ if and only if the subgroup has finite index, in combination
with a  number of properties of finite state Markov chains (formulated in the Appendix to \cite{Y13}).

\medskip

The rate of escape  is another quantity which describes behavior of a random walk at infinity.
There are some interrelations between the rate of escape and asymptotic entropy  \cite{V85, KL07}.
We will show that  the rate of escape of a transformed random walk under a randomized Markov stopping time is also transformed according to formula  (\ref{abra}).

\medskip

\subsection*{Acknowledgment}
I am very grateful to my supervisor, Vadim Kaimanovich,
whose support  and patience have enabled me
to develop an understanding of the subject.
\section{Preliminaries
In this section, we will recall the basic definitions related to random walks on a group, the associated Poisson boundary and  transformations of a random walk via a Markov stopping time.
\subsection{Random walks on groups}
Throughout this paper, we assume that $G$ is a countable group with the identity element $e$
endowed with a probability measure $\mu$.  The random walk $(G,\mu)$ is the Markov chain on $G$ with the
transition probabilities
$$
p(g_1,g_2)=\mu(g^{-1}_1g_2).
$$
The {\it space of increments} of the random walk $(G,\mu)$ is denoted by $(G^{\mathbb N},\bigotimes\limits_{1}^{\infty}\mu)$ ($\bigotimes$ denotes the product measure), equivalenty,
it is the set of sequences $(h_n)_{n\geq 1}$ such that $h_n$'s are  independent and identically $\mu$-distributed.
The space of sample paths of the random walk $(G,\mu)$ is the probability
space $(G^{\Bbb Z+},\mathbf{P})$,  where $G^{\Bbb Z+}=\{e\}\times G^{\Bbb N}$ (we only consider  random walks issued from the identity),
and the probability measure $\mathbf{P}$  is the image of the measure
$\bigotimes_{1}^{\infty}\mu$ under the map
$$
(h_1,h_2,\cdots)\mapsto \boldsymbol{x}=(e,x_1,x_2,\cdots),
$$
where $x_n=h_1\cdots h_n$ is the position of the random walk $(G,\mu)$ at time $n$.

\subsection{Poisson boundary}
Let $T$ be the time shift on the space of sample paths, i.e., $T(x_n)=(x_{n+1})$. Let
$\mathcal{A}_T$ be the invariant $\sigma$-algebra of the time shift $T$.
In other words,
$$
\mathcal{A}_T=\{A\ \mbox{measurable } :\ A=T^{-1}A \}.
$$
Rokhlin's correspondence theorem  \cite{Ro52} implies that  there exists
a quotient map $\mathbf{bnd}$ from $(G^{\Bbb Z+},\mathbf{P})$ onto a Lebesgue space $(\Gamma,\nu)$
such that the pre-image of the $\sigma$-algebra of $(\Gamma,\nu)$ under the map $\mathbf{bnd}$ coincides (mod~0) with $\mathcal{A}_T$. The image of the measure  $\mathbf{P}$ under the map $\mathbf{bnd}$  is called {\it harmonic measure}.
The Lebesgue space $(\Gamma,\nu)$ is called the {\it Poisson boundary} of the random walk $(G,\mu)$.

\medskip

The group $G$ acts naturally on the Poisson boundary,  and $\nu$ is a $\mu$-stationary measure, that is,
$$
\mu*\nu=\sum_g\mu(g)g\nu=\nu.
$$

Let $\mu'$ be another probability measure on group $G$ whose Poisson boundary is $(\Gamma',\nu')$.
We say Poisson boundaries $(\Gamma,\nu)$ and $(\Gamma',\nu')$  are  the same, whenever these boundaries are isomorphic as two
measure $G$-spaces. More precisely,
there exists a bijective measurable map $\phi:(\Gamma,\nu)\to (\Gamma',\nu')$ such that
$\nu'$ is the image of the probability measure $\nu$ and $g\phi(\gamma)=\phi(g\gamma)$
for every $g\in G$, and almost every $\gamma\in\Gamma$.
\subsection{Transformed random walks}

Let $\tau:(G^{\Bbb Z+},\mathbf{P})\mapsto \Bbb N$ be a Markov stopping time on the space of sample paths, i.e., $\tau$
is a measurable map such that for every natural number $s$ the set $\tau^{-1}\{s\}$
belongs to $\mathcal{A}_0^s$, the $\sigma$-algebra generated by the position of the random walk between time 0 and $s$ of the random walk $(G,\mu)$.
[We only consider  Markov stopping times which are finite almost everywhere!].

\medskip

Random walks on groups are time and space homogenous, which allows us to iterate the Markov stopping time $\tau$ and produce a new random walk \cite{BK2013}. More precisely,  let $\tau_1=\tau$, and define by induction
\begin{equation}\label{iteration}
\tau_{n+1}=\tau_n+\tau(U^{\tau}),
\end{equation}
where
\begin{equation}\label{induced}
U(\boldsymbol{x})=(x_1^{-1}x_{n+1})_{n\geq0}
\end{equation}
 is the transformation of the path space induced by the time shift in the space of increments.

\medskip
Then, $(x_{\tau_n})$ is a sample path of the random walk $(G,\mu_{\tau})$, where
$\mu_{\tau}$ is  the distribution of  $x_{\tau}$, i.e.,
$$
\mu_{\tau}(g)=\mathbf{P}\{\boldsymbol{x}\ :\ x_{\tau}=g\}.
$$
Obviously, each $\tau_n$ is also a Markov stopping time, and, moreover,
the distribution of $x_{\tau_n}$ is the $n$-fold convolution of $\mu_{\tau}$, i.e, $\mu_{\tau_{n}}=(\mu_{\tau})^{*n}$.

\medskip

Straightforward examples of this construction are
\begin{ex}\label{convolution}
Let $k$ be a positive integer, and let  $\tau$ be the constant function $k$. Then $\mu_{\tau}$ is the $k$-fold convolution of measure $\mu$,
i.e., $\mu^{*k}$.
\end{ex}

\begin{ex}
Let $\tau_1$ and $\tau_2$ be two Markov stopping times for the random walk $(G,\mu)$. Then,
$\tau=\tau_1+\tau_2(U^{\tau_1})$ is a Markov stopping time,
and $\mu_{\tau}=\mu_{\tau_1}*\mu_{\tau_2}$.
\end{ex}

\begin{ex}\label{wil}
Let $B$ be a subset of $G$ with $\mu(B)>0$.  For a sample path $\boldsymbol{x}=(x_n)$, define
$$
\tau(\boldsymbol{x})=\min\{i\geq1\ :\ h_i\in B\},
$$
be the minimal time $i$ such that the increment $h_i$ belongs to $B$.
Then $\tau$ is a  Markov stopping time. If $\mu(B)=1$, then trivially $\mu_{\tau}=\mu$, otherwise
$$
\mu_{\tau}=\beta+\sum_{i=1}^{\infty}\alpha^{*i}*\beta,
$$
where $\beta$ is the restriction of $\mu$ into $B$, i.e.,  $\beta(A)=\mu(A\cap B)$ for a subset $A$ of $G$, and $\alpha=\mu-\beta$.
\end{ex}

\begin{ex}\label{recurrent}
Let $H$ be a  recurrent subset of $G$, i.e.,  $\mathbf{P}\{\boldsymbol{x}:\ x_n\in H \mbox{\ for\ some } n\}=1$.
Define $$\tau(\boldsymbol{x})=\min\{i\geq1\ x_i\in H\}.$$
Then, $\tau$ is a Markov stopping time called first {\it hitting time} of $H$.
Note that $\tau_2$ is not generally a hitting time of $H$, that is, $x_{\tau_2}$ does not necessarily belong to
the subset $H$. Although, if, in addition, $H$ is  a subgroup of $G$, then $\tau_n$ is precisely the moment when
the random walk returns to $H$ for the $n$-th time. Hence, in this case, $\mu_{\tau}$ is the probability measure induced on the recurrent subgroup $H$.
Consequently, $(G,\mu_{\tau})$ is the induced random walk on the recurrent subgroup $H$.
\end{ex}
\medskip

By \cite{BK2013}, the Poisson boundary of $(G,\mu_{\tau})$ is the same as the Poisson boundary of $(G,\mu)$.
However, Markov stopping times cannot produce all random walks with the same Poisson boundary as the following trivial
example shows:
\begin{ex}\label{trivial}
 Let $G=\Bbb Z_2=\{0,1\}$, then the Poisson boundary of $(\Bbb Z_2,\mu)$ is trivial for any probability measure $\mu$.
 Consider $\mu=\delta_1$, then $(0,1,0,1,0,\cdots)$ is the only sample path. Hence, in this situation, any Markov stopping time must be
 a constant function. Consequently,  the only probability measures that can be obtained by the above procedure for the random walk $(\Bbb Z_2,\delta_1)$ are convolution powers of $\delta_1$, which are $\delta_0$ and $\delta_1$.
 Therefore, the above procedure  cannot produce the probability measure $\dfrac{1}{2}(\delta_0+\delta_1)$.

\end{ex}
In the next section, we will extend our random walk to a larger space and apply Markov stopping times  to the new space to obtain
 even more random walks with the same Poisson boundary.
\subsection{Randomized Markov stopping times}
Let $(\Omega,\theta)$ be a Lebesgue space. Define transition probabilities
$\pi=\{\pi_{(g,\omega)}\}$ on the probability space $(G\times \Omega,\mu\otimes\theta)$ as follows
$$
\pi_{(g,\omega)}=\sum_h\mu(h)\delta_{gh}\otimes\theta.
$$

Denote by $\mathbf{P}_{\delta_e\otimes m}$ the  probability measure on the product space of the extended chain with
the initial distribution $\delta_e\otimes m$.

In this construction, we replace a sample path $\boldsymbol{x}=(x_n)$ with its ``randomization''
$$(\boldsymbol{x},\boldsymbol\omega)=((e,\omega_0),(x_1,\omega_1),\cdots),$$
where $\omega_i$'s are independent and identically $\theta$-distributed random variables.

In particular, the distribution of this Markov chain at time $n$ is $\pi^n_{(g,\omega)}=\sum\limits_h\mu^{*n}(h)\delta_{gh}\otimes\theta.$

\medskip

Now, let $\tau:G^{\Bbb N}\times \Omega^{\Bbb N}\to \Bbb N$ be a Markov stopping time for the extended Markov chain.
Then, we shall call $\tau$  a {\it randomized Markov stopping time} of the random walk $(G,\mu)$.
Note that, if $m$ is concentrated on one point, then any randomized Markov stopping time is just a usual Markov stopping time.

The transformation $U$ (see equation \ref{induced}) in the path space of the original random walk naturally extends to the following transformation of
the path space of the randomized random walk:
$$
\mathcal{U}(\boldsymbol{x},\boldsymbol{\omega})=(x_1^{-1}x_{n+1},\omega_{n+1})_{n\geq0},
$$
and then construct $\tau_n$ on the extended Markov chain as in the previous section.
By using $\mathcal{U}$ one can define the iterated stopping times $\tau_n$  for the randomized random walk in the same way as in formula (\ref{iteration}) above.

By projecting  $(x_{\tau_n},\omega_{\tau_n})_{n\geq0}$ onto the first component,  $(x_{\tau_n})_{n\geq0}$,
we obtain a new random walk $(G,\mu_{\tau})$ with
$$
\mu_{\tau}(g)=\mathbf{P}_{\delta_e\otimes m}\{(\boldsymbol{x},\boldsymbol{\omega})\ :\ \boldsymbol{x}_{\tau}=g\}.
$$

\begin{thm}\cite{BK2013}\label{BK}
Let $\tau$ be a randomized Markov stopping time on the random walk $(G,\mu)$, then $\Gamma(G,\mu)=\Gamma(G,\mu_{\tau})$.
\end{thm}
This randomization allows one to construct  even more random walks such that their Poisson boundaries are the same
as for the original random walk. For example, now we can obtain convex combinations of convolution powers (cf. Example~\ref{trivial}).

\begin{ex}\label{convex}\cite{BK2013}
Let $\Omega=\Bbb N$ with probability measure $\theta$.
Define a Markov stopping time $\tau$ as
$$
\tau((h_1,\omega_1),(h_2,\omega_2),\cdots)=\omega_1.
$$
Then
$
\mu_{\tau}=\sum\limits_{n\geq0}\theta(n)\mu^{*n}.
$
\end{ex}

\begin{ex}\label{wil2}\cite{BK2013}
Let  $\alpha$ and $\beta$ be two sub-probability measures with  $\mu=\alpha+\beta$. Then there is a
randomized Markov stopping time $\tau$ such that
$$
\mu_{\tau}=\beta+\sum_{i\geq1}\alpha^{*i}*\beta.
$$
\end{ex}
This transformation, $\mu=\alpha+\beta\mapsto\mu'=\beta+\sum\limits_{i\geq1}\alpha^{*i}*\beta$,  was introduced by Willis \cite{W90}. He also proved that $\Gamma(G,\mu)=\Gamma(G,\mu')$ .
If, in addition, $\alpha$ and $\beta$ are  mutually singular, then  this example reduces to Example~\ref{wil}.
\section{Entropy of transformed measures}  The aim of this  section is to study the relation between the asymptotic entropies of
 the transformed random walks defined as above and of the original random walk .
\subsection{Asymptotic entropy of a random walk}
The quantity
$$
H(\mu)=-\sum_g\mu(g)\log{\mu(g)}
$$
is called the {\it entropy} of $\mu$.
The sequence $\{H_n\}$ is sub-additive, i.e., $H_{n+m}\leq H_n+H_m,$
where $H_n=H(\mu^{*n})$.
Therefore the limit of $H_n/n$  exists. The {\it asymptotic entropy} of $(G,\mu)$ is defined  as
\begin{equation}\label{def asy}
h(\mu)=\lim\limits_n\dfrac{H_n}{n}.
\end{equation}
{\bf Throughout the rest of the paper,  we always assume that $H(\mu)=H_1$ is finite},
in which case $h({\mu})\leq H_1<\infty$.

\medskip

The asymptotic entropy can  also be obtained by Shannon's formula:
\begin{thm}\cite{KV83, De80}\label{shannon}
For $\mathbf{P}$-almost every sample path $(x_n)$,
$$
-h({\mu})=\lim\dfrac{1}{n}\log{\mu^{*n}(x_n)}.
$$
Moreover, the convergence holds in $L^1(\mathbf{P})$.
\end{thm}
Shannon's formula leads to the following description of the asymptotic entropy of $(G,\mu)$ as well:
\begin{thm}\cite{KV83}\label{harmonic}
For $\mathbf{P}$-almost every  sample path $\boldsymbol{x}=(x_n)$,
$$
h({\mu})=\lim_n\dfrac{1}{n}\log \dfrac{dx_n\nu}{d\nu}\mathbf{bnd}(\boldsymbol{x}).
$$

\end{thm}

\subsection{Main results}
As a motivation, let us consider the asymptotic entropy of
the random walk determined by the $k$-fold convolution of $\mu$, i.e., $(G,\mu^{*k})$. By definition of the asymptotic entropy
\begin{equation}\label{motivation}
h(\mu^{*k})=\lim_n\dfrac{1}{n}H_{kn}=\lim_nk\dfrac{H_{kn}}{kn}=kh({\mu}),
\end{equation}
which can be rewritten as
\begin{equation}\label{expectation}
h(\mu_{\tau})=\boldsymbol{E}(\tau)h({\mu}),
\end{equation}
where $\tau$ is the constant Markov stopping time $k$ (see Example~\ref{convolution}).

 \medskip

 The aim of the next theorem is to show  that  equality (\ref{expectation}) can be generalized to  all Markov stopping times (and to all randomized Markov stopping times as we shall do later, see Theorem~\ref{markov extension}) with finite expectation. This is analogous to Abramov's theorem for the entropy of induced dynamical systems:
 \begin{thm}\label{abramov}\cite{Ab59}
 Let $(X,\phi,\mu)$ be an ergodic measure preserving dynamical system. If $A$ is a  measurable subset of $X$ with $\mu(A)>0$, then
 $$
 h({\mu_A},\phi_A)=\dfrac{1}{\mu(A)}h({\mu},\phi).
 $$
 \end{thm}
 In order to complete the analogy, note that the constant $\dfrac{1}{\mu(A)}$ is equal to the expectation
 of the return time to the set $A$ (Kac formula) \cite{Kac47}.
\medskip

 Since the sequence $\{\mu_{\tau_n}\}$  is not, generally speaking, a subsequence of the sequence of convolution powers of $\mu$, the generalization of the equality (\ref{expectation}) cannot be done by the same trick as in (\ref{motivation}).

\begin{thm}\label{main}
Let $\tau$ be a Markov stopping time with a finite expectation $\boldsymbol{E}(\tau)$. Then
$H(\mu_{\tau})$ is also finite, and
$$
h({\mu_{\tau}})=\boldsymbol{E}(\tau)h({\mu}).
$$
\end{thm}

The proof is based on the fact that each sample path of  the random walk transformed by a Markov stopping time is a subsequence of
 the corresponding sample path of the original random walk, and  the description of the asymptotic entropy as the exponential
  growth rate of the Radon--Nikodym derivatives  of the translates of the harmonic measure
   along the sample path (Theorem~\ref{harmonic}). In order to  apply Theorem~\ref{harmonic}, we need  the Poisson boundaries of the random walks $(G,\mu)$ and $(G,\mu_{\tau})$ to be the same
(which follows from Theorem~\ref{BK}), and  the entropy of the random walk $(G,\mu_{\tau})$ to be finite.

\medskip

First, we  show that the entropy of $\mu_{\tau}$ is finite.

\medskip
\begin{lem}\label{finite}
If $\boldsymbol{E}(\tau)<\infty$, then the entropy of $\mu_{\tau}$ is also finite, and
$$
H(\mu_{\tau})\leq\boldsymbol{E}(\tau)H_1.
$$

\end{lem}
\begin{proof}
Let
$$
M_n(\boldsymbol{x})=nH_1+\log{\mu^{*n}(x_n)}.
$$
Since $H_1$ is finite, $M_n$'s are integrable.
If $\mathcal{A}_0^n$ is the $\sigma$-algebra generated by the position of the random walk $(G,\mu)$ between time $0$ and $n$, then
$$
\boldsymbol{E}(M_{n+1}|\mathcal{A}_0^n)(\boldsymbol{x})=(n+1)H_1+\sum_h\mu(h)\log{\mu^{*(n+1)}(x_nh)}.
$$
The sequence $\{M_n,\mathcal{A}_0^n\}$ is a sub-martingale, i.e.,
$$
\boldsymbol{E}(M_{n+1}|\mathcal{A}_0^n)(\boldsymbol{x})\geq(n+1)H_1+\sum_h\mu(h)(\log\mu^{*n}(x_n)+\log{\mu(h))}= M_n(\boldsymbol{x}),
$$
because
\begin{equation}\label{equality}
\mu^{*(n+1)}(x_nh)\geq\mu^{*n}(x_n)\mu(h).
\end{equation}
Let $\tau\wedge n=\min\{\tau,n\}$. Then, Doob's optional theorem (see \cite[p.~300]{Doob53}) implies that
$$
\boldsymbol{E}(M_{\tau\wedge n})~\geq\boldsymbol{E}(M_0)=0,
$$
and consequently,
$$
\boldsymbol{E}(\tau\wedge n)H_1+\sum_g\mathbf{P}(x_{\tau\wedge n}=g)\log{\mathbf{P} (x_{\tau\wedge n}=g)}\geq0.
$$
Since $\boldsymbol{E}(\tau\wedge n)\leq \boldsymbol{E}(\tau)$, we can write
\begin{equation}\label{fatu}
-\sum_g\mathbf{P}(x_{\tau\wedge n}=g)\log{\mathbf{P} (x_{\tau\wedge n}=g)}\leq \boldsymbol{E}(\tau)H_1.
\end{equation}
Applying Fatou's lemma to  inequality (\ref{fatu})  gives
\begin{equation}\label{fatu2}
-\sum_g\liminf_n\mathbf{P}(x_{\tau\wedge n}=g)\log{\mathbf{P} (x_{\tau\wedge n}=g)}\leq \boldsymbol{E}(\tau)H_1.
\end{equation}
On the other hand, the fact that $\lim\limits_n\mathbf{P} (x_{\tau\wedge n}=g)=\mu_{\tau}(g)$ in combination with the continuity of the function $x\log{x}$ implies that
\begin{equation}\label{fatu3}
\lim_n\mathbf{P}(x_{\tau\wedge n}=g)
\log{\mathbf{P}(x_{\tau\wedge n}=g)}=\mu_{\tau}(g)\log{\mu_{\tau}(g)}.
\end{equation}
Now, by (\ref{fatu2}) and (\ref{fatu3}) we obtain
$$
H(\mu_{\tau})=-\sum_g\lim_n\mathbf{P}(x_{\tau\wedge n}=g)\log{\mathbf{P} (x_{\tau\wedge n}=g)}\leq \boldsymbol{E}(\tau)H_1.
$$
Therefore, we have proved that
$$
\lim_{n\to\infty}H(\mu_{\tau\wedge n})=H(\mu_{\tau}).
$$
\end{proof}

\subsection{Proof of Theorem~\ref{main}}
Now, we can find the asymptotic entropy of the random walk $(G,\mu_{\tau})$. Since the expectation
of the Markov stopping time $\tau$ is finite,   Lemma~\ref{finite} implies that $H(\mu_{\tau})$ is also finite. Therefore, Theorem~\ref{harmonic} implies that
$$
h({\mu_{\tau}})=\lim_n\dfrac{1}{n}\log \dfrac{dx_{\tau_n}\nu}{d\nu}\mathbf{bnd}(\boldsymbol{x})
$$
for almost every sample path $\boldsymbol{x}=(x_n)$.
Since $U$ is a measure preserving transformation,
$\boldsymbol{E}(\tau_n)=n\boldsymbol{E}(\tau)$, and, moreover,
$\lim\limits_n\dfrac{\tau_{n}(\boldsymbol{x})}{n}=\boldsymbol{E}(\tau)$ for almost every sample path $\boldsymbol{x}$. Therefore, it is obvious that
$$
h(\mu_{\tau})=\lim_n\dfrac{\tau_{n}(\boldsymbol{x})}{n}\dfrac{1}{\tau_{n}(\boldsymbol{x})}\log \dfrac{dx_{\tau_{n}}\nu}{d\nu}\mathbf{bnd}(\boldsymbol{x}).
$$
By applying Theorem~\ref{harmonic} to the random walk $(G,\mu)$, we will have
$$
h(\mu_{\tau})=\boldsymbol{E}(\tau)h(\mu).
$$

\subsection{Entropy of random walks transformed  via a randomized Markov stopping time}
Let $\tau$ be a randomized Markov stopping time with finite expectation.
If we replace the sub-martingale in Lemma~\ref{finite} with
 $$
 M_n(\boldsymbol{x},\boldsymbol{\omega})=nH_1+\log\mu^{*n}(x_n),
 $$
 then finiteness of the entropy of $\mu_{\tau}$ can be obtained by reproducing the proof of Lemma~\ref{finite}.
Since the Poisson boundary of $(G,\mu_{\tau})$ is the same as the Poisson boundary $(G,\mu)$,  the proof of Theorem~\ref{expectation} applies. Hence, we have

\begin{thm}\label{markov extension}
Let $\tau$ be a randomized Markov stopping time for the random walk $(G,\mu)$. If  $\boldsymbol{E}(\tau)$ is finite, then
$$
h(\mu_{\tau})=\boldsymbol{E}(\tau)h({\mu}).
$$
\end{thm}
The combination of Example~\ref{convex} and the preceding theorem implies the following result of Kaimanovich \cite{K83}.
\begin{ex}\label{kaiver}
Let  $\mu'=\sum\limits_{k\geq0}a_k\mu_k$, where $\sum\limits_{k\geq0}a_k=1$ and $a_k\geq0$. Then
$$
h({\mu'})=(\sum_{k\geq0}ka_k)h({\mu}).
$$
\end{ex}

\begin{ex}
Let $\mu=\alpha+\beta$ be as in Example~\ref{wil2}.
Let $\mu'=\beta+\sum\limits_{i\geq1}\alpha^{*i}*\beta$, then
$$
h({\mu'})=\dfrac{1}{\|\beta\|}h(\mu),
$$
where $\|\beta\|$ is the total mass of $\beta$.
\end{ex}

\subsection{$\mu$-boundary}
A {\it $\mu$-boundary} $(\Gamma_{\xi},\nu_{\xi})$ is the quotient of the Poisson boundary with respect to a  $G$-invariant measurable partition $\xi$ (see, \cite{Fu70, K00}).  The {\it differential entropy} of a $\mu$-boundary is defined as
\begin{equation}\label{mubnd}
E_{\mu}(\Gamma_{\xi},\nu_{\xi})=\sum_g\mu(g)\int\log{\dfrac{dg\nu_{\xi}}{d\nu_{\xi}}(g\gamma_{\xi})}d\nu_{\xi}(\gamma_{\xi}).
\end{equation}
Kaimanovich \cite{K83} showed that the asymptotic entropy $h({\mu})$ is the upper bound for
 the asymptotic entropies of $\mu$-boundaries, i.e.,
$$
E_{\mu}(\Gamma_{\xi},\nu_{\xi})\leq h({\mu}).
$$
Moreover, he \cite{K00}  proved an analogue of  Theorem~\ref{harmonic} for $\mu$-boundaries.
Therefore the claim of  Theorem~\ref{markov extension} is also valid the differential entropy of $\mu$-boundaries:

\begin{thm}
Let $\xi$ be a measurable $G$-invariant partition of the Poisson boundary $(G,\mu)$.
If $\tau$ is a randomized Markov stopping time with finite expectation, then
$$
E_{\mu_{\tau}}(\Gamma_{\xi},\nu_{\xi})=\boldsymbol{E}(\tau)E_{\mu}(\Gamma_{\xi},\nu_{\xi}).
$$

\end{thm}

\section{Rate of escape}
In this section,  we establish a relationship between the escape rates of the  random walk transformed via a randomized Markov stopping time and of the original one.

\medskip

\begin{df}
A gauge $\mathcal{G}=(\mathcal{G}_n)$ on a group $G$ is an increasing sequence of subsets of  $G$ such that $G=\bigcup\limits_n\mathcal{G}_n$. A gauge function $|.|_{\mathcal{G}}$ on $G$ defined as
$$
|g|=|g|_{\mathcal{G}}=\min\{n\ : \ g\in\mathcal{G}_n\}.
$$

A gauge $\mathcal{G}$ is called {\it sub-additive}, whenever its gauge function is sub-additive.
\end{df}
A measure $\mu$ has a finite {\it first moment} with respect to a gauge $\mathcal{G}$, if
$$
|\mu|=\sum_g|g|\mu(g)
$$
is finite.
If  $\mathcal{G}$ is a sub-additive gauge, then obviously
$$
|x_{n+m}|\leq|x_n|+|(U^n\boldsymbol{x})_m|,
$$
so that
Kingman's sub-additive theorem implies
\begin{thm}\cite{De80, G79}
Let $\mathcal{G}$ be a  sub-additive gauge and $\mu$ have a finite first moment with respect to $\mathcal{G}$. Then
\begin{equation}
\ell(G,\mu,\mathcal{G})=\ell(\mu)=\lim_n\dfrac{|x_n|}{n}
\end{equation}
exists for $\mathbf{P}$-almost every sample path $\boldsymbol{x}=(x_n)$, and also in $L^1(\mathbf{P})$.
\end{thm}
The quantity $\ell(\mu)$ is called the rate of escape (drift) of the random walk $(G,\mu)$ with respect to the gauge $\mathcal{G}$.
\medskip
\begin{ex}
Let $G$ be a group generated by  a finite set $S=S^{-1}$. Then, $(S^n)_n\geq1$ is a sub-additive gauge.
\end{ex}
\begin{ex}
Let $(G,\mu)$  be a {\it transient} random walk. Denote by $F(g)<1$ the probability that
the random walk $(G,\mu)$ ever visits a point $g\in G$.
Let $\mathcal{G}_n=\{g\in G : -\ln{F(g)}\leq n\}$, then $\mathcal{G}=(\mathcal{G}_n)_{n\geq0}$ is a sub-additive gauge.
Actually,  $-\ln{F(g)}$ is the ``distance'' of $g$ from  the identity element in the so-called {\it Green metric}
\cite{BS07}.
The rate of escape with respect to the Green metric is equal to the asymptotic entropy \cite{BHM08}.
\end{ex}
\begin{thm}
Let $\mathcal{G}$ be a sub-additive gauge for  group $G$ and $\mu$ have a finite first moment.
Let $\tau$ be a randomized Markov stopping time with finite expectation $\boldsymbol{E}(\tau)$.
Then, the probability measure $\mu_{\tau}$ has a finite first moment with respect  to the gauge $\mathcal{G}$,
and
\begin{equation}\label{rate}
\ell(\mu_{\tau})=\boldsymbol{E}(\tau)\ell(\mu).
\end{equation}
\end{thm}
\begin{proof}
Let $L_n(\boldsymbol{x},\boldsymbol{y})=n\boldsymbol{E}(|x_1|)-|x_n|$. Then
$$
\boldsymbol{E}(L_{n+1}(\boldsymbol{x},\boldsymbol{y})|\mathcal{A}_0^n)=(n+1)\boldsymbol{E}(\tau)-\sum_h|x_nh|\mu(h).
$$
The sub-additivity of the gauge $\mathcal{G}$ implies that $\{L_n,\mathcal{A}_0^n\}$ is a sub-martingale.
Now applying the same argument as in Lemma~\ref{finite} and Theorem~\ref{main}, we get the equality (\ref{rate}).
\end{proof}
\bibliographystyle{alpha}
\begin{bibdiv}
\begin{biblist}
\bib{Ab59}{article}{
   author={Abramov, L. M.},
   title={The entropy of a derived automorphism},
   language={Russian},
   journal={Dokl. Akad. Nauk SSSR},
   volume={128},
   date={1959},
   pages={647--650},
   issn={0002-3264},

}

\bib{A72}{article}{
   author={Avez, Andr{\'e}},
   title={Entropie des groupes de type fini},
   language={French},
   journal={C. R. Acad. Sci. Paris S\'er. A-B},
   volume={275},
   date={1972},
   pages={A1363--A1366},

}

\bib{A74}{article}{
   author={Avez, Andr{\'e}},
   title={Th\'eor\`eme de Choquet-Deny pour les groupes \`a croissance non
   exponentielle},
   language={French},
   journal={C. R. Acad. Sci. Paris S\'er. A},
   volume={279},
   date={1974},
   pages={25--28},

}

\bib{BS07}{article}{
   author={Blach{\`e}re, S{\'e}bastien},
   author={Brofferio, Sara},
   title={Internal diffusion limited aggregation on discrete groups having
   exponential growth},
   journal={Probab. Theory Related Fields},
   volume={137},
   date={2007},
   number={3-4},
   pages={323--343},
   issn={0178-8051},

}

\bib{BHM08}{article}{
   author={Blach{\`e}re, S{\'e}bastien},
   author={Ha{\"{\i}}ssinsky, Peter},
   author={Mathieu, Pierre},
   title={Asymptotic entropy and Green speed for random walks on countable
   groups},
   journal={Ann. Probab.},
   volume={36},
   date={2008},
   number={3},
   pages={1134--1152},
   issn={0091-1798},

}

\bib{De80}{article}{
   author={Derriennic, Yves},
   title={Quelques applications du th\'eor\`eme ergodique sous-additif},
   language={French, with English summary},
   conference={
      title={Conference on Random Walks},
      address={Kleebach},
      date={1979},
   },
   book={
      series={Ast\'erisque},
      volume={74},
      publisher={Soc. Math. France, Paris},
   },
   date={1980},
   pages={183--201, 4},

}

\bib{Doob53}{book}{
   author={Doob, J. L.},
   title={Stochastic processes},
   publisher={John Wiley \& Sons, Inc., New York; Chapman \& Hall, Limited,
   London},
   date={1953},
   pages={viii+654},

}

\bib{BK2013}{article}{
    author = {Forghani, B.}
    author={Kaimanovich, V. A.},
     title = {Boundary preserving transformations of random walks},
     date={2014},
   journal = {In preparation},
}

\bib{Fu70}{article}{
   author={Furstenberg, Harry},
   title={Random walks and discrete subgroups of Lie groups},
   conference={
      title={Advances in Probability and Related Topics, Vol. 1},
   },
   book={
      publisher={Dekker, New York},
   },
   date={1971},
   pages={1--63},

}

\bib{G79}{article}{
   author={Guivarc'h, Y.},
   title={Sur la loi des grands nombres et le rayon spectral d'une marche
   al\'eatoire},
   language={French, with English summary},
   conference={
      title={Conference on Random Walks},
      address={Kleebach},
      date={1979},
   },
   book={
      series={Ast\'erisque},
      volume={74},
      publisher={Soc. Math. France, Paris},
   },
   date={1980},
   pages={47--98, 3},

}

\bib{Y13}{article}{
   author={Hartman, Yair},
   author={Lima, Yuri},
   author={Tamuz, Omer},
   title={An Abramov formula for stationary spaces of discrete groups},
   journal={Ergodic Theory Dynam. Systems},
   volume={34},
   date={2014},
   number={3},
   pages={837--853},
   issn={0143-3857},

}

\bib{Kac47}{article}{
   author={Kac, M.},
   title={On the notion of recurrence in discrete stochastic processes},
   journal={Bull. Amer. Math. Soc.},
   volume={53},
   date={1947},
   pages={1002--1010},
   issn={0002-9904},

}
\bib{K83}{article}{
   author={Kaimanovich, V. A.},
   title={Differential entropy of the boundary of a random walk on a group},
   language={Russian},
   journal={Uspekhi Mat. Nauk},
   volume={38},
   date={1983},
   number={5(233)},
   pages={187--188},
   issn={0042-1316},

}

\bib{KV83}{article}{
   author={Kaimanovich, V. A.},
   author={Vershik, A. M.},
   title={Random walks on discrete groups: boundary and entropy},
   journal={Ann. Probab.},
   volume={11},
   date={1983},
   number={3},
   pages={457--490},
   issn={0091-1798},

}

\bib {K91}{article}{
   author={Kaimanovich, Vadim A.},
   title={Poisson boundaries of random walks on discrete solvable groups},
   conference={
      title={Probability measures on groups, X},
      address={Oberwolfach},
      date={1990},
   },
   book={
      publisher={Plenum, New York},
   },
   date={1991},
   pages={205--238},

}

\bib{K90}{article}{
   author={Kaimanovich, Vadim A.},
   title={Discretization of bounded harmonic functions on Riemannian
   manifolds and entropy},
   conference={
      title={Potential theory},
      address={Nagoya},
      date={1990},
   },
   book={
      publisher={de Gruyter, Berlin},
   },
   date={1992},
   pages={213--223},

}

\bib{K00}{article}{
   author={Kaimanovich, Vadim A.},
   title={The Poisson formula for groups with hyperbolic properties},
   journal={Ann. of Math. (2)},
   volume={152},
   date={2000},
   number={3},
   pages={659--692},
   issn={0003-486X},

}

\bib{KL07}{article}{
   author={Karlsson, Anders},
   author={Ledrappier, Fran{\c{c}}ois},
   title={Linear drift and Poisson boundary for random walks},
   journal={Pure Appl. Math. Q.},
   volume={3},
   date={2007},
   number={4, Special Issue: In honor of Grigory Margulis.},
   pages={1027--1036},
   issn={1558-8599},

}

\bib {Kol58}{article}{
   author={Kolmogorov, A. N.},
   title={A new metric invariant of transient dynamical systems and
   automorphisms in Lebesgue spaces},
   language={Russian},
   journal={Dokl. Akad. Nauk SSSR (N.S.)},
   volume={119},
   date={1958},
   pages={861--864},
   issn={0002-3264},

}

\bib{Ro52}{article}{
   author={Rohlin, V. A.},
   title={On the fundamental ideas of measure theory},
   journal={Amer. Math. Soc. Translation},
   volume={1952},
   date={1952},
   number={71},
   pages={55},
   issn={0065-9290},

}

\bib {Sh48}{article}{
   author={Shannon, C. E.},
   title={A mathematical theory of communication},
   journal={Bell System Tech. J.},
   volume={27},
   date={1948},
   pages={379--423, 623--656},
   issn={0005-8580},

}
\bib {Sin59}{article}{
   author={Sinai, Ja.},
   title={On the concept of entropy for a dynamic system},
   language={Russian},
   journal={Dokl. Akad. Nauk SSSR},
   volume={124},
   date={1959},
   pages={768--771},
   issn={0002-3264},

}
\bib {V85}{article}{
   author={Varopoulos, Nicholas Th.},
   title={Long range estimates for Markov chains},
   language={English, with French summary},
   journal={Bull. Sci. Math. (2)},
   volume={109},
   date={1985},
   number={3},
   pages={225--252},
   issn={0007-4497},

}

\bib{W90}{article}{
   author={Willis, G. A.},
   title={Probability measures on groups and some related ideals in group
   algebras},
   journal={J. Funct. Anal.},
   volume={92},
   date={1990},
   number={1},
   pages={202--263},
   issn={0022-1236},

}
\end{biblist}
\end{bibdiv}

\end{document}


\section{Introduction}

\begin{figure}[h!]
\includegraphics[angle=0,width=.85\columnwidth]{fig1.eps}
\caption{(Color online) Sketch of the hybrid quantum system studied in this paper: a) a spin ensemble (yellow) coupled to a transmission-line resonator (gray) confining the electromagnetic field inside a small volume. b) Scheme of the spin ensemble-cavity coupled system. An incoming signal $\eta(t)$ passes through the cavity characterized by a frequency $\omega_c$ which is coupled to a spin ensemble with each individual spin of frequency $\omega_j$. The transmitted signal is proportional to the cavity amplitude, $A(t)$. $\kappa$ and $\gamma$ stands for the  cavity and spin losses, respectively.}
\label{Fig1_ensemble_cavity}
\end{figure}

Over the past decade various setups in cavity quantum electrodynamics (QED) have been studied in terms of their potential for future technologies involving the storage and processing of quantum information. Among different hybrid quantum systems \cite{You2005}, the ones based on spin, atomic or even molecular ensembles coupled to superconducting microwave cavities have recently attracted much attention \cite{Amsuess2011,Sandner2012,Kubo2010,Kubo2011,Kubo2012,Probst2013,Rabl2006,Verdu2009,Xiang2013}, see Fig.~\ref{Fig1_ensemble_cavity}. In such systems the spin or atomic ensemble plays the role of a quantum memory, to which the quantum information is coherently stored and retrieved from at some later time. The cavity, in turn, serves as a quantum bus for the in- and output of information as well as for the coupling between several constituents of such hybrid quantum systems (see e.g. \cite{Kubo2011}). One of the necessary conditions for the coherent transfer of quantum information between an ensemble and a cavity is the strong coupling between them. Fortunately, various spin ensembles, as for instance, negatively charged nitrogen-vacancy (NV) defects in diamond \cite{Amsuess2011,Sandner2012,Kubo2010,Kubo2011,Kubo2012}, rare-earth spin ensembles \cite{Probst2013}, clouds of ultracold atoms \cite{Atac2009,Verdu2009} or magnons in yttrium iron garnet with or without doping \cite{Huebl2013,Tabuchiarxiv}, may satisfy this requirement when being collectively coupled to \cite{Dicke54}. We also note that in recent proposals the direct coupling of a qubit to such spin-ensembles has been suggested without any cavity being involved \cite{Zhu2011,Saito2013}.

Here we study the dynamics of a superconducting cavity strongly coupled to an ensemble of negatively charged NV centers. Each individual NV center can possess a sufficiently long coherence time \cite{Bar-Gill2013} needed for the coherent transfer of quantum information. However, since the local magnetic dipole-dipole couplings of NV centers constituting the ensemble to the bath of magnetic impurities (such as nitrogen atoms not converted into NV centers) slightly differ from each other, the NV electron spin resonance line of a large ensemble is inhomogeneously broadened \cite{Stanwix2010}. This line broadening acts as the main source of decoherence, and constitutes a significant drawback of this solid-state spin ensemble leading to a drastic decrease of its coherence time. Several approaches including echo-type refocusing techniques \cite{Grezes2014,Wu2010} have meanwhile been suggested to overcome this limitation. Recent stationary transmission studies demonstrate that the decoherence can be strongly suppressed altogether \cite{Kurucz2011,Diniz2011} when the spin density has a spectral distribution with tails that decay sufficiently fast \cite{Kurucz2011,Diniz2011,Sandner2012}. In this paper we report on a detailed time-dependent study for exactly such a case and demonstrate how the corresponding dynamics can be efficiently captured using a Volterra integral equation for the cavity amplitude \cite{Nature2014}. The excellent correspondence between our theoretical model and a corresponding experiment allows us to closely look into the fascinating features following from a pulsed driving of this hybrid quantum system in the strong-coupling regime.

Our paper is organized as follows. In section II we present the theoretical framework of our problem and summarize the most important assumptions made. We sketch the general form of the equations obtained, describing the two methods for solving the Volterra equation in Appendices \ref{App_time_integr_Volt_Eq}, \ref{App_Lapl_Transf}.
Furthermore, we discuss the specific experimental realization of our theory. In section III, we consider the dynamics under the action of a long rectangular microwave pulse which allows us to obtain the precise form for the spin density and its parameters by detailed comparison with the experimental results. We also present analytical results for a Lorentzian spin density distribution and demonstrate which features are captured by this approximation and which are not. Section IV will then address the question how the decoherence in our system caused by inhomogeneous broadening changes as a function of the coupling strength. We show that a non-Lorentzian functional profile of the spin distribution leads to a strong suppression of decoherence for large values of the coupling strength -- an effect known as ``cavity protection'' \cite{Kurucz2011,Diniz2011}. Finally, in section V, we propose a scheme which allows us to induce giant coherent oscillations between the cavity and our spin ensemble as well as to transfer energy into the spin ensemble very efficiently.

\section{Theoretical model}
\label{Sec_Theory}

We study the temporal dynamics of a system consisting of a large spin ensemble coupled with a single-mode cavity via magnetic or electric dipole interaction. We assume that the distance between spins is large enough such that the dipole-dipole interactions between spins can be neglected. Our starting point is the Tavis-Cummings Hamiltonian ($\hbar=1$) \cite{Tavis68}
\begin{eqnarray}
&&{\cal H}=\omega_ca^{\dagger}a+\frac{1}{2}\sum_j^N\omega_j\sigma_j^z+\text{i}\sum_j^N\left[g_j\sigma_j^-a^{\dagger}-g_j^*\sigma_j^+a\right]-
\nonumber\\
&&\text{i}\left[\eta(t) a^{\dagger}\text{e}^{-\text{i}\omega_p t}-\eta(t)^* a\text{e}^{\text{i}\omega_p t}\right]\,,
\label{Hamilt_fun}
\end{eqnarray}
where $a^{\dag}$ and $a$ are standard creation and annihilation operators of the single cavity mode with frequency $\omega_c$ and $\sigma_j^+,\,\sigma_j^-,\,\sigma_j^z$ are the Pauli operators associated with each individual spin of frequency $\omega_j$. An incoming signal is characterized by the carrier frequency $\omega_p$ and by the amplitude $\eta(t)$ whose time variation is much slower as compared to $1/\omega_p$. The interaction part of ${\cal H}$ is written in the dipole and rotating-wave approximation (terms $\propto a\sigma_j^-,\,a^\dag \sigma_j^+$ are neglected), where $g_j$ stands for the coupling strength of the $j$-th spin.

Despite the fact that each individual spin is coupled weakly to the cavity, one can nevertheless reach the strong coupling regime due to the large number of spins which are collectively coupled to the cavity mode (see e.g. \cite{Amsuess2011,Verdu2009,Kubo2011} for NV spin ensembles). The effect of collective coupling is particularly  evident when reducing the interaction term to a collective term $\Omega(S^-a^{\dagger}-S^+a)$ \cite{Emary2003}, where the collective spin operators are given by $S^\pm=N^{-1/2}\cdot \sum_j^N\sigma_j^\pm$. The prefactor $\Omega^2=\sum_j^Ng_j^2$ stands for an effective coupling strength, which scales up a single coupling strength, $g_j$, by a factor of $\sqrt{N}$, so that $\Omega$ can be sufficiently enhanced for the realization of the strong coupling regime. In this formulation the effective spin-waves that are excited by the cavity mode can be identified as superradiant collective Dicke states which are effectively damped by the coupling to subradiant states in the ensemble \cite{Dicke54,Kurucz2011,Diniz2011}. Note that the rotating-wave approximation mentioned above is applicable only if
$\Omega \ll \omega_c$.

Next, we derive the Heisenberg operator equations, for the cavity and spin operators, $\dot a=i [{\cal H},a]-\kappa a$, $\dot \sigma_k^-=i [{\cal H},\sigma_k^-]-\gamma \sigma_k^-$, respectively. Here $\kappa$ and $\gamma$ stand for the total dissipative cavity and spin losses.  Strictly speaking, the noise operators should also be added to the r.h.s. of these equations in order to preserve the commutation relations. However, their expectation values vanish
as was shown already in earlier works \cite{Kurucz2011,Diniz2011} on the example of an NV ensemble and therefore these terms are not included here explicitly. These Heisenberg equations describe the dynamics to a very high accuracy, provided that the energy of photons of the external bath is substantially smaller than that of cavity photons, $kT\ll\hbar \omega_c$.  We then write a set of equations for the expectation values, $\langle a(t)\rangle$ and $\langle\sigma_k^-(t)\rangle$ in the frame rotating with the probe frequency $\omega_p$. In what follows the amplitude of the pumping signal $\eta(t)$ is taken to be rather small and therefore the number of the excited spins is always small compared to the ensemble size. This allows us to simplify these equations further by setting $\langle \sigma_k^z \rangle \approx -1$ (Holstein-Primakoff-approximation \cite{Primakoff1939}). With all these simplifications the equations for the cavity and spin amplitudes become
\begin{subequations}
\begin{eqnarray}
\label{Eq_a_Volt}
&&\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \dot{A}(t)= -\left[\kappa+i(\omega_c-\omega_p)\right]A(t) + \sum_k
g_k  B_k(t)-\eta(t), \\
\label{Eq_bk_Volt}
&&\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\dot{B}_k(t) = -\left[\gamma+i(\omega_k-\omega_p) \right]B_k(t) - g_k A(t),
\end{eqnarray}
\end{subequations}
where $A(t)\equiv \langle a(t)\rangle$ and $B_k(t)\equiv\langle\sigma_k^-(t)\rangle$.

\subsection*{Experimental realization}
In the following, we will compare our theoretical model with one specific experimental realization, namely a $\lambda/2$ superconducting microwave coplanar waveguide resonator magnetically coupled with a spin ensemble of negatively charged NV centers in diamond. The corresponding  experiment is carried out in a standard dilution refrigerator with a synthetic diamond placed on top of a resonator cooled to millikelvin temperatures ($\sim25$\,mK) (see \cite{Nature2014} for more details). The concentration of NV centers in diamond is sufficiently low and the distance between spins is still large enough, so that the dipole-dipole interactions between spins is negligibly small justifying the assumption of our model. By applying an external magnetic field, two degenerate sub-ensembles, which can effectively be considered as a single sub-ensemble,  are brought into resonance with the cavity, whereas the other sub-ensembles make a slight dispersive contribution only and their influence is neglected here (see e.g. \cite{Nature2014,Amsuess2011,Sandner2012} for more details). The individual spins are distributed around the mean frequency $\omega_s=2\pi\cdot 2.6915$\,GHz, with the width $\Delta \ll \omega_s$, which is of the order of $10$\,MHz. The coupling strength of each individual spin with a cavity mode is typically of the order of $g_j/2\pi\sim10$\,Hz \cite{Verdu2009}. However, the effective coupling $\Omega$ is enhanced by a factor of $\sqrt{N}$ with the ensemble size $N\sim 10^{12}$, so that $\Omega$ can reach values as large as $10$\,MHz which is sufficient to reach the strong coupling regime. Note that the energy of thermal photons is substantially smaller than that of microwave photons, $kT\ll\hbar \omega_c$, resulting in an occupation probability of the ensemble in the ground state which is larger than $0.99$. In what follows, the cavity frequency was taken to be always equal to the spin mean frequency, $\omega_c=\omega_s=2\pi\cdot 2.6915$\,GHz. Therefore the inequality $\Omega \ll \omega_c$ always holds, such that the rotating-wave approximation is very well fulfilled. Note also that the spin dissipation is much smaller than the cavity dissipation, $\gamma \ll \kappa$, so that the former does not contribute to the dynamics realized in the experiment. We thus omitted $\gamma$ everywhere, except when necessary for the calculation of some integrals which would otherwise be singular.

\subsection*{Setting up the Volterra integral equation}

Owing to the large number of spins within the ensemble ($N\sim 10^{12}$), there are a lot of spins in each frequency subinterval around $\omega_s$ which make a non-negligible contribution to the dynamics. We can thus introduce a continuous spectral density as $\rho(\omega)=\sum_k g_k^2 \delta(\omega-\omega_k)/\Omega^2$, where $\Omega^2=\sum_j^Ng_j^2$ is the collective coupling strength of the spin ensemble to the cavity, satisfying the normalization condition $\int d\omega\rho(\omega)=1$. As we shall see below, one should take special care when choosing the functional profile of the spectral distribution for the spin density, $\rho(\omega)$, which describes its inhomogeneous broadening and which plays a crucial role for the dynamics.

To go to the continuous limit (in frequency) we carry out the following formal replacement from the discrete function $F(\omega_k)$ to the continuous one, $F(\omega)$: $\sum_k F(\omega_k) \rightarrow \Omega^2 \int d\omega \rho(\omega) F(\omega)$.  By integrating Eq.~(\ref{Eq_bk_Volt}) in time, each individual spin amplitude, $B_k(t)$, can be expressed in terms of the cavity amplitude, $A(t)$, as
\begin{eqnarray}
\label{Eq_Bk}
&&B_k(t)\!=\!B_k(0)e^{-i (\omega_k-\omega_p-i\gamma)t}\!-
\\\nonumber\!
&&g_k \int\limits_{0}^t\! d\tau e^{-i (\omega_k-\omega_p-i\gamma)(t-\tau)}\!\cdot\!A(\tau),
\end{eqnarray}
where $B_k(0)$ is the initial spin amplitude. Substituting Eq.~(\ref{Eq_Bk}) into Eq.~(\ref{Eq_a_Volt}) we arrive at the Volterra equation for the cavity amplitude, $A(t)$
\begin{eqnarray}
\nonumber
&&\!\!\!\!\!\!\!\!\!\dot A(t)\!=\!-i(\omega_c-\omega_p-i\kappa) A(t)\!+\!\sum_k g_k B_k(0) e^{-i(\omega_k-\omega_p-i\gamma)t}
\\
&&\!\!\!\!\!\!\!\!\!-\Omega^2 \int_0^{\infty} d\omega \rho(\omega) \int\limits_{0}^t d\tau
e^{-i(\omega-\omega_p-i\gamma)(t-\tau)}A(\tau)-\eta(t).
\label{Eq_a_with_Bk0}
\end{eqnarray}
After integrating Eq.~(\ref{Eq_a_with_Bk0}) in time, performing lengthy but straightforward algebraic calculations and assuming that the cavity is initially empty, $A(0)=0$, and all spins are initially in the ground state, $B_k(0)=0$, we end up with the following Volterra equation for the cavity amplitude
\begin{eqnarray}
\label{Volt_eq}
A(t)=\int\limits_0^t d\tau {\cal K}(t-\tau) A(\tau)+{\cal F}(t),
\end{eqnarray}
which contains the kernel function ${\cal K}(t-\tau)$,
\begin{eqnarray}
\label{Volt_eq_K}
&&\!\!\!\!\!\!\!\!{\cal K}(t-\tau)=\Omega^2\cdot
\\\nonumber
&&\!\!\!\!\!\!\!\! \bigintsss_0^{\infty}\!\!\! d\omega\,
\dfrac{\rho(\omega) \left[e^{-i (\omega-\omega_c+i \kappa)(t-\tau)}-1\right]
}{i (\omega-\omega_c+i \kappa)}\!\cdot\! e^{-i(\omega_c-\omega_p-i\kappa)(t-\tau)},
\end{eqnarray}
and the function ${\cal F}(t)$,
\begin{eqnarray}
\label{Volt_eq_F}
{\cal F}(t)=-\int\limits_0^t d\tau\, \eta(\tau)\cdot e^{-i(\omega_c-\omega_p-i\kappa)(t-\tau)},
\end{eqnarray}
where the amplitude, $\eta(t)$, represents an arbitrarily shaped incoming pulse or a sequence of pulses. Note, that the kernel function ${\cal K}(t-\tau)$ accounts for memory effects and leads in general to a non-Markovian feedback of the NV ensemble on the cavity. In Appendices \ref{App_time_integr_Volt_Eq}, \ref{App_Lapl_Transf} we give a detailed description of the two methods which allow us to solve the Volterra equation in a very efficient way.

Having calculated the cavity amplitude, $A(t)$, we can find the expectation values of the collective spin operator, $J_x+i J_y=\sum_k g_k B_k(t)/[2(\sum_i g_i^2)^{1/2}]$, which in the continuous limit and for the initial conditions $A(0)=0$ and $B_k(0)=0$ introduced above read as follows
\begin{eqnarray}
\label{Eq_a_with_A0}
J_x+i J_y=-\dfrac{\Omega}{2} \int_0^{\infty} \! d\omega \rho(\omega) \int\limits_{0}^t  \! d\tau
e^{-i(\omega-\omega_c)(t-\tau)}A(\tau).
\end{eqnarray}
The $z$-component of the expectation value of the collective spin operator, $J_z=\sum_k \langle \sigma_k^z \rangle/(2\sqrt{N})$, remains $J_z \approx -\sqrt{N}$, in accordance with the approximations discussed above.

Note that Eqs.~(\ref{Eq_a_Volt},\ref{Eq_bk_Volt}), as well as the resulting Volterra equation (\ref{Eq_a_with_Bk0}) are linear equations with respect to the cavity and spin amplitudes, $A(t)$ and  $B_k(t)$, respectively. We can thus always rescale our solution by multiplying the amplitude of the driving signal, $\eta(t)$, by an arbitrary scaling factor. In the following we take the amplitude of the incoming signal equal to the cavity decay rate, $\eta=\kappa$. Note that such a choice corresponds to the situation when the incoming signal, being in a coherent state, gives rise to a single photon in the empty cavity on average. The experimental curves will be appropriately rescaled with a constant prefactor such as to match the corresponding theoretical curves.

\section{Dynamics under the action of a long pulse}
\label{Sec_dyn_long_pulse}
\begin{figure}
\includegraphics[angle=0,width=1.\columnwidth]{fig2.eps}
\caption{(color online). Cavity probability amplitude $|A(t)|^2$ versus time $t$ under the action of an incident long rectangular pulse of duration $800$\,ns with the carrier frequency matching the resonance condition, $\omega_p=\omega_c=2\pi\cdot 2.6915$\,GHz, where $\omega_c$ stands for the cavity resonance frequency. Gray (white) area indicates a time interval during which the pumping signal is on (off). a) (taken from \cite{Nature2014}) Red (gray) curve: Numerical results for the cavity transmission at a coupling strength $\Omega/2\pi=8.56$~MHz. In the calculations the spectral density is modelled by a $q$-Gaussian distribution. The frequency of Rabi oscillations, $\Omega_R=2\pi\cdot 19.2$\,MHz. Black curve: experimental results for the cavity transmission. b) Red (gray) curve the same as in a). Orange (light gray) curve: results of numerical calculations assuming a Lorentzian distribution of the spin density.}
\label{Figure_long_pulse_with_Lorentz}
\end{figure}

In order to choose an appropriate form for the spectral density, $\rho(\omega)$, we compare our numerical results with the experiment performed within the strong-coupling regime. Specifically, we apply a rectangular microwave pulse [$\eta(t)=\eta$ for $0\le t \le \tau_d$ and $\eta(t)=0$ otherwise, see Eq.~(\ref{Volt_eq_F})], with the resonance carrier frequency ($\omega_p=\omega_c=\omega_s$). This pulse has a duration $\tau_d$ substantially longer than the resulting period of damped Rabi oscillations and the inverse of the total decay rate, so that the system sets into a steady state before the signal is turned off [see Fig.~\ref{Figure_long_pulse_with_Lorentz}a)]. Note that the total decay rate describes the overall decoherence in our system which consists of two contributions: The first one is due to dissipative cavity losses $\kappa$, while the second one originates from the inhomogeneous broadening of the spin ensemble which leads to the dephasing of spins during the time evolution. As we shall see below, this dephasing mechanism gives the dominant contribution to the decoherence (the spin dissipation $\gamma$ is negligible in our case).

In accordance with our previous study \cite{Sandner2012,Nature2014}, we obtain a very good agreement between theory and experiment, when taking a $q$-Gaussian \cite{Tsallis09} as the distribution function for the spectral density defined as
\begin{eqnarray}
\label{rho_w_Eq}
\rho(\omega)=C\cdot\left[1-(1-q)\dfrac{(\omega-\omega_s)^2}{\Delta^2}\right]^{
\dfrac{1}{1-q}}.
\end{eqnarray}
 Here $q$ is the dimensionless shape parameter, $1<q<3$, $\gamma_q=2\Delta\sqrt{\dfrac{2^q-2}{2q-2}}$ is the full-width at half maximum (FWHM) and $C$ is the normalization constant. Note, that for $q\rightarrow 1$ and  $q=2$ we recover a Gaussian  and Lorentzian distribution, respectively. From the comparison with the experiment, we extracted the following parameters used in our calculations: $q=1.39$, $\gamma_q/2\pi=9.4$\,MHz, and $\kappa/2\pi=0.8$\,MHz (FWHM of the cavity decay). We have also tested other lineshapes for describing the spectral spin density such as the stable alpha-distribution, but found them to be less suitable for describing the experimentally observed data.

An interesting and, at first sight, surprising fact is that the first Rabi peak of the cavity amplitude after switching off the microwave signal is approximately twice as large as the steady state amplitude, as seen in Fig.~\ref{Figure_long_pulse_with_Lorentz}a). This overshoot effect takes place after the incoming signal is turned off, because the energy stored in the spin ensemble is released back to the cavity and interferes constructively with the energy stored there (see  Appendix \ref{App_Decay} for more details). It will be shown in the next section that this overshoot appears only if the coupling strength is larger than a certain critical value. In addition to this condition, the overshoot effect also requires a finite amount of energy being stored in the spin ensemble, but does not show up if it is in the ground state and the field inside the cavity is described by a Fock state, as for instance when it is fed with a single photon, see Appendix \ref{App_Lapl_Transf}.

\subsection{Dynamics for a Lorentzian spin density distribution}
\label{Subsec_Dyn_Lorentz_distr}

To illustrate the importance of the spectral spin distribution, we have also tried to achieve an agreement with the experiment when assuming a Lorentzian instead of a $q$-Gaussian distribution for the spectral density,
\begin{eqnarray}
\label{rho_Lorentz}
\rho(\omega)=\dfrac{\Delta}{\pi[(\omega-\omega_s)^2+\Delta^2]}.
\end{eqnarray}
For this purpose, we adapt the parameters such that the period of the resulting Rabi oscillations and the cavity amplitude at the steady-state agree with the measurements, see Fig.~\ref{Figure_long_pulse_with_Lorentz}b). As seen there, the Lorentzian predicts a sufficiently larger decay rate as compared to that observed in the experiment [compare the values of the Rabi peaks during damped Rabi oscillations for the $q$-Gaussian and for the Lorentzian distributions shown in Fig.~\ref{Figure_long_pulse_with_Lorentz}b)]. Such an inadequate overestimation of the total decay rate becomes particularly pronounced in the case of even higher values of the coupling strength as those used in Fig.~\ref{Figure_long_pulse_with_Lorentz} (see Sec.~\ref{Sec_Class_dyn} for more details). Nevertheless, it is very instructive to consider at first the simple picture associated with a Lorentzian distribution, because in this case the problem can be solved analytically giving intuitive insights into the dynamical properties of our system. By plugging the Lorentzian distribution (\ref{rho_Lorentz}) into Eq.~(\ref{Eq_a_with_Bk0}) and assuming that the cavity is initially empty, $A(0)=0$, and spins are unexcited, $B_k(0)=0$, we obtain the following Volterra equation (in the frame rotating with $\omega_p$) under the action of a rectangular microwave pulse introduced above for $t \le \tau_d$:
\begin{eqnarray}
\label{Eq_a_with_A0_Lorentz_decay}
\dot A(t)=-\kappa A(t)-\Omega^2  \int\limits_{0}^t  \! d\tau e^{-\Delta (t-\tau)}A(\tau)-\eta.
\end{eqnarray}
By differentiating Eq.~(\ref{Eq_a_with_A0_Lorentz_decay}) with respect to time, and after doing some algebra, the above equation reduces to the one for a damped harmonic oscillator driven by a time-independent external force
\begin{eqnarray}
\label{Eq_a_with_A0_Lorentz_decay_diff}
\ddot A(t)+[\Delta+\kappa] \dot A(t)+[\Omega^2+\Delta\kappa] A(t)+\eta \Delta=0.
\end{eqnarray}
The solution of Eq.~(\ref{Eq_a_with_A0_Lorentz_decay}), which is also the one of Eq.~(\ref{Eq_a_with_A0_Lorentz_decay_diff}), can be represented as $A(t)=\alpha e^{\lambda_1 t}+\beta e^{\lambda_2 t}$, so that the dynamics is characterised by two exponents, namely
\begin{eqnarray}
\label{Gam_Lorentz_charact_exponent}
\lambda_{1,2}=\left[-(\Delta+\kappa)\pm\sqrt{(\Delta-\kappa)^2-4 \Omega^2}\right]/2.
\end{eqnarray}
In the strong-coupling regime the dynamics is underdamped, the expression under the square root is negative and the system exhibits damped oscillations with the Rabi frequency
\begin{eqnarray}
\label{Eq_Rabi_Om}
\Omega_{R}=\sqrt{4 \Omega^2-(\Delta-\kappa)^2},
\end{eqnarray}
and the decay rate of $|A(t)|^2$ is $\Gamma=\Delta+\kappa$. It is worth noting that for the case shown in Fig.~\ref{Figure_long_pulse_with_Lorentz}b), the expression (\ref{Eq_Rabi_Om}) for the Rabi frequency can be approximated as $\Omega_R \approx 2\Omega$. Finally, we obtain the following expression for the cavity amplitude for $t\le \tau_d$
\begin{eqnarray}
\label{Afunsolon}
\nonumber
&&A(t)\!=\!-\dfrac{\Delta \eta}{\Omega^2+\Delta\kappa}+\dfrac{\eta\cdot e^{-(\Delta+\kappa)t/2}}{2\Omega_{R}(\Omega^2+\Delta\kappa)}\times
\\
\\\nonumber
&&\left[2 \Omega_R \Delta \cos(\Omega_R t/2) -[\Omega_R^2-\Delta^2+\kappa^2)] \sin(\Omega_R t/2)\right].\,\,\,\,\,\,
\end{eqnarray}
The reason why $A(t)\in {\mathbb R}$ in Eq.~(\ref{Afunsolon}) is due to the fact that the Lorentzian distribution (\ref{rho_Lorentz}) is symmetric with respect to $\omega_s$, and $\omega_p=\omega_c=\omega_s$. For the same reason the $y$-component of the collective spin $J_y=0$, whereas $J_x(t)$ can easily be determined from Eq.~(\ref{Eq_a_Volt})
\begin{eqnarray}
\label{Jx_evol_on}
J_x(t)\!=\!\dfrac{\sum_k g_k B_k(t)}{2\Omega}\!=\!\dfrac{\dot A(t)+\kappa A(t)+\eta}{2\Omega}.
\end{eqnarray}
Indeed, by inserting the solution (\ref{Afunsolon}) into this equation we get
\begin{eqnarray}
&&J_x(t)\!=\!\dfrac{\eta\Omega}{2(\Omega^2+\Delta\kappa)}-\dfrac{\eta\Omega\cdot e^{-(\Delta+\kappa)t/2}}{2\Omega_{R}(\Omega^2+\Delta\kappa)}\times
\\\nonumber
\\
&&\left[(\Delta+\kappa) \sin(\Omega_R t/2) +\Omega_R\cos(\Omega_R t/2)\right].\,\,\,\,\,\,
\label{J_xon}
\end{eqnarray}
By differentiating Eq.~(\ref{Eq_a_Volt}) with respect to time twice, making use of Eq.~(\ref{Eq_a_with_A0_Lorentz_decay_diff}), and performing straightforward algebraic calculations, we find that $J_x(t)$ obeys also the following equation
\begin{eqnarray}
\label{Eq_a_with_Jx_Lorentz_decay_diff}
\ddot J_x(t)+\Delta \dot J_x(t)+\Omega^2 J_x(t) -\dfrac{\kappa\Omega}{2}A(t)-\dfrac{\eta\Omega}{2}=0.
\end{eqnarray}
Therefore in the case of a Lorentzian distribution the dynamics can be modelled by two coupled damped harmonic oscillators governed by Eqs.~(\ref{Eq_a_with_A0_Lorentz_decay_diff}, \ref{Eq_a_with_Jx_Lorentz_decay_diff}).

Thus, after switching on a rectangular microwave signal our system exhibits damped Rabi oscillations and it tends finally to a steady-state
\begin{eqnarray}
\label{Amp_st_Lor}
A_{st}\!=\!-\dfrac{\Delta \eta}{\Omega^2+\Delta\kappa},\,\,\,\,J_x^{st}=\dfrac{\eta\Omega}{2(\Omega^2+\Delta\kappa)},\,\,\,\,J_y^{st}=0,
\end{eqnarray}
provided that the pulse duration is long enough, i.e. $\tau_d \gg 1/(\Delta+\kappa)$. (Note that this condition is very well fulfilled in Fig.~\ref{Figure_long_pulse_with_Lorentz}.) Inserting the Lorentzian profile (\ref{rho_Lorentz}) into Eq.~(\ref{Eq_a_with_Bk0_cont_2}) from Appendix \ref{App_Decay} yields the equation for the cavity amplitude $A(t)$, which governs the decay process from the steady-state given by Eq.~(\ref{Amp_st_Lor}):
\begin{eqnarray}
\label{Eq_a_with_A0_Lorentz_decay_from_st_state}
\!\!\!\!\!\!\dot A(t)\!=\!-\kappa A(t)\!+\!\dfrac{\eta \Omega^2 \cdot e^{-\Delta t}}{\Omega^2+\kappa \Delta}
\!-\!\Omega^2  \int\limits_{0}^t  \! d\tau e^{-\Delta (t-\tau)}A(\tau),
\end{eqnarray}
where, for the sake of simplicity, the time is counted from zero as the pulse is turned off. As discussed in detail before  and also in Appendix \ref{App_Decay}, the second term in Eq.~(\ref{Eq_a_with_A0_Lorentz_decay_from_st_state}) stands for the excitation stored in the spin ensemble, which is coherently released back into the cavity, after switching off the microwave pulse. Similarly as done above, we can derive from Eq.~(\ref{Eq_a_with_A0_Lorentz_decay_from_st_state}) a damped harmonic oscillator equation, $\ddot A(t)+[\Delta+\kappa] \dot A(t)+[\Omega^2+\Delta\kappa] A(t)=0$, so that finally the damped Rabi oscillations of the cavity amplitude and the $x$-component of the collective spin to the ground state for $t\ge \tau_d$ are solved by
\begin{eqnarray}
\label{Afunsoloff}
\nonumber
\!\!\!\!\!\!\!\!\!\!&&A(t)\!=\!\dfrac{\eta\cdot e^{-(\Delta+\kappa)(t-\tau_d)/2}}{2\Omega_{R}(\Omega^2+\Delta\kappa)}\cdot\left[-2 \Omega_R \Delta \cos(\Omega_R (t-\tau_d)/2) +\right.
\\
\!\!\!\!\!\!\!\!\!\!
\\
\!\!\!\!\!\!\!\!\!\!
\nonumber
\!\!\!\!\!\!\!\!\!\!\!\!&&\left. (\Omega_R^2-\Delta^2+\kappa^2) \sin(\Omega_R (t-\tau_d)/2)\right]\!,
\\
\!\!\!\!\!\!\!\!\!\!
\nonumber
\\
\!\!\!\!\!\!\!\!\!\!
\nonumber
\!\!\!\!\!\!\!\!\!\!&&J_x(t)\!=\!\dfrac{\eta\Omega\cdot e^{-(\Delta+\kappa)(t-\tau_d)/2}}{2\Omega_{R}(\Omega^2+\Delta\kappa)}\cdot\left[(\Delta+\kappa)\sin(\Omega_R (t-\tau_d)) +\right.
\label{J_xoff}
\\
\!\!\!\!\!\!\!\!\!\!
\\
\nonumber
\!\!\!\!\!\!\!\!\!\!&&\left. \Omega_R\cos(\Omega_R (t-\tau_d)/2)\right]\!.
\end{eqnarray}
\begin{figure}
\includegraphics[angle=0,width=1.\columnwidth]{fig3.eps}
\caption{(color online). Cavity probability amplitude $|A(t)|^2$ and the corresponding $x$-component of the collective spin $J_x^2(t)$ versus time $t$ under the action of an incident long pulse assuming a Lorentzian spin distribution, given by Eqs.~(\ref{Afunsolon},\ref{Afunsoloff}) and (\ref{J_xon},\ref{J_xoff}), respectively. $|A(t)|^2$ coincides with the orange (light gray) curve from Fig.~\ref{Figure_long_pulse_with_Lorentz}b). Symbols designate the maxima and minima of $|A(t)|^2$ and $J_x^2(t)$ during the damped Rabi oscillations. The carrier frequency matches the resonance condition, $\omega_p=\omega_c=2\pi\cdot 2.6915$\,GHz, and the frequency of Rabi oscillations, $\Omega_R=2\pi\cdot 19.2$\,MHz. Gray (white) area indicates the time interval during which the pumping signal is on (off).}
\label{Fig_A_2_Jx_2_Lor}
\end{figure}
\begin{figure}
\includegraphics[angle=0,width=1.\columnwidth]{fig4.eps}
\caption{(color online). Damped Rabi oscillations from the stationary state which the system exhibits after the action of an incident long pulse assuming a Lorentzian spin distribution.  a) Cavity probability amplitude given by Eq.~(\ref{Afunsoloff}), versus time for three different values of the coupling strengths, $\Omega/2\pi=6,7.15$ and $12$~MHz [black, red (gray), orange (light gray)]. The carrier frequency matches the resonance condition, $\omega_p=\omega_c=2\pi\cdot 2.6915$\,GHz. The lowest value for the stationary state corresponds to the highest value of $\Omega$ in accordance with Eq.~(\ref{Amp_st_Lor}). b) The amplitude of the stationary state $|A_{st}|^2$ and the amplitude of the first maximum $|A_1|^2$,  versus coupling strength $\Omega$ during the damped Rabi oscillations [see Eqs.~(\ref{Amp_st_Lor}, \ref{A1})]. Black symbol designates the intersection between these two curves at the value of coupling strength $\Omega/2\pi=7.15$~MHz, below which the overshoot effect is absent.}
\label{Figure_A0_A1_2_Lorentz}
\end{figure}
\begin{figure}
\includegraphics[angle=0,width=1.\columnwidth]{fig5.eps}
\caption{(color online). Cavity probability amplitude, $|A(t)|^2$, and the corresponding $x$-component of the collective spin, $J_x^2(t)$, versus time $t$ under the action of an incident long pulse for the $q$-Gaussian spin distribution. $|A(t)|^2$ coincides with the red (gray) curve from Fig.~\ref{Figure_long_pulse_with_Lorentz}b). Symbols designate the maxima and minima of, respectively, $|A(t)|^2$ and $J_x^2(t)$ during the damped Rabi oscillations. The carrier frequency matches the resonance condition, $\omega_p=\omega_c=2\pi\cdot 2.6915$\,GHz, and the coupling strength $2\Omega=17.12$~MHz. The frequency of the resulting Rabi oscillations, $\Omega_R=2\pi\cdot 19.2$\,MHz. Gray (white) area indicates the time interval during which the pumping signal is on (off).}
\label{Fig_A_2_Jx_2_q_Gauss}
\end{figure}
\begin{figure}
\includegraphics[angle=0,width=1.\columnwidth]{fig6.eps}
\caption{(color online).  Cavity probability amplitude, $|A(t)|^2$, versus time $t$ under the action of an incident long pulse with the carrier frequency matching the resonance condition, $\omega_p=\omega_c=2\pi\cdot 2.6915$ GHz. The coupling strength $2\Omega$ is: a) $2\pi\cdot 15.8$\,MHz; b) $2\pi\cdot 12.0$\,MHz; c) $2\pi\cdot 10.2$\,MHz; d) $2\pi\cdot 2.12$\,MHz. Gray (white) area indicates the time interval during which a pumping signal is on (off). Red (gray) curves: results of numerical calculations. Black curves: experimental results for the cavity transmission.}
\vspace*{.3cm}
\label{fig_A_2_diff_Omega_wp_eq_wc}
\end{figure}
In Fig.~\ref{Fig_A_2_Jx_2_Lor},  $|A(t)|^2$ and $J_x^2(t)$, defined by Eqs.~(\ref{Afunsolon},\ref{Afunsoloff}) and by Eqs.~(\ref{J_xon},\ref{J_xoff}), respectively, are plotted versus time $t$. Note that this analytical solution for the cavity probability, $|A(t)|^2$, perfectly coincides with the one found numerically which is depicted in Fig.~\ref{Figure_long_pulse_with_Lorentz}b) (For that reason the analytical solution is not shown in this figure.) One sees, that the cavity and spin ensemble exchange their energies during the time evolution, so that maxima of $A^2(t)$ correspond to minima of $J_x^2(t)$ or, in other words, the energy inside the cavity is maximal at those moments of time, when the energy stored in the ensemble is entirely emitted back into the cavity.

Let us summarize the collective spin dynamics under the action of a long pulse governed by Eqs.~(\ref{J_xon},\ref{J_xoff}) in the $\omega_p$-rotating frame. Since $J_z \approx -\sqrt{N}$ is always valid, our dynamics is restricted to the vicinity of the pole of the Bloch sphere. Additionally, $J_y=0$ owing to symmetry arguments. As a rectangular microwave signal is turned on, the $x$-component, $J_x(t)$, exhibits damped Rabi oscillations starting from the ground state and tends towards a steady state, $J_x^{st}$. After the signal is switched off, $J_x(t)$, again undergoes damped  Rabi oscillations and returns to its initial state on the pole of the Bloch sphere. These spin components in the $\omega_p$-rotating frame are connected with those in the laboratory frame as follows, $J_x^{lab}(t)=J_x(t) \cos(\omega_p t)$, $J_y^{lab}(t)=J_x(t) \sin(\omega_p t)$, and $J_z^{lab}(t)=J_z(t)\approx -\sqrt{N}$. From these expressions follows that in the laboratory frame high frequency oscillations are superimposed on the damped Rabi oscillations found in the $\omega_p$-frame. Moreover the steady state in the $\omega_p$-frame is represented by a simple precession around the $z$-axis in the laboratory- frame.

We show in Fig.~\ref{Figure_A0_A1_2_Lorentz} that the first Rabi peak of the cavity amplitude after switching off the driving pulse may exceed the corresponding steady state value (overshoot effect), if the value of the coupling strength is above a certain threshold. As discussed earlier in this Section, this effect is in principle possible due to the fact that in the steady-state at constant driving nonzero energy is preliminarily stored in the spin ensemble. However, the smaller the coupling strength $\Omega$ is, the larger the value of the cavity amplitude, $|A_{st}|$, and the weaker the excitation of the spin ensemble, $|J_x^{st}|$, see Eq.~(\ref{Amp_st_Lor}). In the limiting case of $\Omega \rightarrow 0$, there is no coupling to the spin ensemble, and it remains unexcited, $J_x^{st}=0$, whereas $|A_{st}|$ acquires its maximal value, $|A_{st}|=\eta/\kappa$. The overshoot effect can be easily quantified analytically by searching for the first maximum of the decaying cavity amplitude (\ref{Afunsoloff}), which is found to be
\begin{eqnarray}
\label{A1}
A_1^2\!=\!A_{st}^2\cdot e^{-\dfrac{2(\Delta+\kappa)}{\Omega_R}\cdot \text{\normalsize{arccos}}\left[-(\Delta-\kappa)/(2\Omega)\right]}.
\end{eqnarray}
We present $A_1^2$ and $A_{st}^2$ versus coupling strength $\Omega$ in Fig.~\ref{Figure_A0_A1_2_Lorentz}b), where one can see that the overshoot effect is realized for $\Omega/2\pi>7.15$\,MHz (for the Lorentzian distribution). Note that the strong coupling regime, the hallmark of which are Rabi oscillations, terminates at $\Omega/2\pi=2$\,MHz, where $A_1=0$. At lower values of the coupling strength the oscillations do not occur and the dynamics becomes Markovian, see Sec.~\ref{Sec_Class_dyn} for more details.
\subsection{Dynamics for the $q$-Gaussian spin density distribution}
\label{Subsec_Dyn_Q_Gauss_distr}

\begin{figure}
\includegraphics[angle=0,width=1.\columnwidth]{fig7.eps}
\caption{(color online). Cavity probability amplitude, $|A(t)|^2$, versus time $t$ under the action of an incident long pulse for different values of the carrier frequency: a) $\omega_p=\omega_c$; b) $\omega_p=\omega_c\pm \Omega_R/8$; c) $\omega_p=\omega_c\pm \Omega_R/4$; d) $\omega_p=\omega_c\pm \Omega_R/2$, where $\omega_c=2\pi\cdot 2.6915$\,GHz and $\Omega_R=2\pi\cdot 19.2$\,MHz are, respectively, the cavity and Rabi frequencies. Gray (white) area indicates the time interval during which the driving signal is on (off). Red (gray) curves: results of numerical calculations for the coupling strength $2\Omega=17.12$~MHz. Black curves: experimental results for the cavity transmission.}
\label{fig_A_2_vs_t_diff_wp}
\end{figure}

After considering the case of a Lorentzian distribution for the spin density, which allows us to capture some of the important features of the dynamics, we return to the case of the $q$-Gaussian density profile to describe the dynamics accurately and to demonstrate a qualitatively new effect not existing in the framework of the Lorentzian distribution, i.e., the so-called cavity protection effect, see Sec.~\ref{Sec_cavit_prot}.

In Fig.~\ref{Fig_A_2_Jx_2_q_Gauss} we present the coherent energy exchange between cavity and spin ensemble under the action of the long pulse, which looks rather similar to the one shown in Fig.~\ref{Fig_A_2_Jx_2_Lor} for the Lorentzian distribution. For the latter, however, our analysis predicts an overestimated decay rate with deviations that grow to an unacceptable degree for higher values of the coupling strengths as will be demonstrated in Sec.~\ref{Sec_Class_dyn}. Another signature of the non-Lorentzian line shape of our spectral spin distribution $\rho(\omega)$ is that the Rabi frequency $\Omega_R$ deviates significantly from twice the value of the coupling strength $2\Omega$. In other words, our hybrid cavity-spin system cannot be modeled as two coupled damped harmonic oscillators as in the case of a purely Lorentzian spin distribution.

In Fig.~\ref{fig_A_2_diff_Omega_wp_eq_wc} we show the dynamics under the action of a long pulse for the resonant  case, $\omega_p=\omega_c=\omega_s$, but for different values of the coupling strength $\Omega$ \cite{Omega_exp}.
One can see in Figs.~\ref{fig_A_2_diff_Omega_wp_eq_wc}a)-d) that the steady-state value, $|A_{st}|$, increases as $\Omega$ decreases, which is in line with Eq.~(\ref{Ast_gen}). One can also see that the value of the first Rabi peak decreases with a decrease of the coupling strength. As a result, the overshoot effect fades away gradually; finally the Rabi oscillations disappear, implying that we enter the regime of Markovian dynamics. As discussed in Sec. IIIA these features are also qualitatively captured when approximating the spin density by the Lorentzian distribution.

Next, we keep the value for the coupling strength constant (staying in the strong-coupling regime) and vary the probe frequency, see Fig.~\ref{fig_A_2_vs_t_diff_wp}. The larger the mismatch from the resonance condition, $\omega_p=\omega_c=\omega_s$, the less visible the Rabi oscillations, so that finally they become completely blurred. The reason for this behavior is the following: as the probe frequency, $\omega_p$, gets increasingly detuned from the central spin frequency, $\omega_s$, the phase in the exponential function of Eq.~(\ref{Eq_a_with_Bk0}) increases at those frequencies where the contribution of $\rho(\omega)$ is non-negligible. As a consequence, during subsequent time integration the resulting integral becomes small due to the fast oscillations of the exponential function, so that the effect of strong coupling smears out. In this case the dynamics is reminiscent of the Markovian regime which occurs right at the resonance condition but for small values for $\Omega$, see Fig.~\ref{fig_A_2_diff_Omega_wp_eq_wc}d).

We would like to emphasize, that in our numerical calculations shown in Figs.~\ref{fig_A_2_diff_Omega_wp_eq_wc}-\ref{fig_A_2_vs_t_diff_wp}, we vary only the values for the coupling strength and probe frequency, whereas all other parameters are kept the same as those in Fig.~\ref{Figure_long_pulse_with_Lorentz}a). Still, the agreement between our theoretical model and the experiment is found to be excellent.

\section{Classification of the dynamics}
\label{Sec_Class_dyn}

\begin{figure}
\includegraphics[angle=0,width=1.\columnwidth]{fig8.eps}
\caption{(color online). Decay rate $\Gamma$ of the the cavity mode $|A(t)|^2$ versus coupling strength $\Omega$.
{\it Red curve}: decay rates extracted from the full numerical calculations with the $q$-Gaussian spin distribution. {\it Black symbols}: experimentally observed decay rates.  {\it Green curve (1)}: Decay rate
under the assumption of a Lorentzian distribution of the spin density.  The overdamped regime ($\Omega/2\pi<1.8$~MHz) is characterised by two exponents given by $\Gamma=\Delta+\kappa\pm\sqrt{(\Delta-\kappa)^2-4 \Omega^2}$. The regime of underdamped oscillations ($\Omega/2\pi>1.8$~MHz) with the Rabi frequency (\ref{Eq_Rabi_Om}) has the constant decay rate, $\Gamma=\Delta+\kappa$. {\it Orange curve (2)}:  $\Gamma$ derived under Markovian approximation, $\Gamma=2[\kappa+\pi\Omega^2\rho(\omega_s)]$. {\it Magenta curve (3)}: an estimate for $\Gamma$ within the strong coupling regime with a well-resolved Rabi splitting in the limit of $\Omega\rightarrow\infty$, $\Gamma=\kappa+\pi\Omega^2\rho(\omega_c\pm\Omega)$. {\it Blue curve (4)}: the decay rate in the absence of dephasing. For $\Omega/2\pi<0.2$~MHz the overdamped regime is characterised by two exponents $\Gamma=\kappa\pm\sqrt{\kappa^2-4 \Omega^2}$. In the opposite case, $\Omega/2\pi>0.2$~MHz, the regime of underdamped Rabi oscillations takes place with the Rabi frequency $\sqrt{4 \Omega^2-\kappa^2}$ and the constant decay rate  $\Gamma=\kappa$. {\it White region}: Markovian dynamics. {\it Gray region}: non-Markovian dynamics.}
\label{Figure_Gamma_vs_Omega}
\end{figure}

To clarify the role played by the non-Lorentzian inhomogeneous broadening, we classify the dynamics by calculating and measuring the total decay rate $\Gamma$ of the cavity amplitude squared, $|A(t)|^2$, from its steady state value  for different coupling strengths $\Omega$. For the sake of simplicity, we focus on the resonant case, $\omega_p=\omega_c=\omega_s$, only. It should be stressed that the total decay rate $\Gamma$ is independent of the initial conditions (see also \cite{Nature2014}), so that we can start from simpler initial conditions corresponding to the case when only a single photon is populating the cavity and the spin ensemble is in the ground state, $|1,G \rangle=a^{\dagger}(t=0)|0 \rangle$ ($|0 \rangle$ corresponds to the vacuum state). In this case it is possible to get a relatively simple form for the Laplace transform of the Volterra equation and to considerably speed up the calculations, see Appendix~\ref{App_Lapl_Transf}. One can prove that the Volterra equation (\ref{Eq_a_with_Bk0}) is indeed the governing equation for $A(t)$ also in this case with the initial condition, $A(t=0)=1$ and $B_k(t=0)=0$, by virtue of the following arguments. Acting with the Heisenberg operator equations on the bra- and ket-vectors $\langle 0|$ and $a^{\dagger}(t=0)|0 \rangle$, respectively, it can be shown that the corresponding equations for the expectation values coincide with Eqs.~(\ref{Eq_a_Volt},\ref{Eq_bk_Volt}) from Sec.~\ref{Sec_Theory}. The only formal difference now is that the amplitudes $A(t)$ and $B_k(t)$ are given as $A(t)\equiv \langle 0| a(t)a^{\dagger}(t=0)|0 \rangle$ and $B_k(t)\equiv \langle 0|\sigma_k^-(t) a^{\dagger}(t=0)|0 \rangle$, respectively. Thus the variable $A(t)$ describes the probability amplitude for a photon to be in the cavity at time $t$, if it was there initially, $A(t=0)\equiv \langle 0| a(t=0)a^{\dagger}(t=0)|0 \rangle=\langle 1,G |1,G \rangle=1$.

The results are presented in Fig.~\ref{Figure_Gamma_vs_Omega}, where we show that the decay rate varies surprisingly strongly and in a non-monotonous fashion with $\Omega$ covering a range of almost one order of magnitude (see the red curve on this figure). Before going to further details, let us analyze at first how the decay rate $\Gamma$ behaves as a function of the coupling strength under different simplifying assumptions.

For the case of a Lorentzian distribution for the spin density, the decay process is characterized by two exponents given by Eq.~(\ref{Gam_Lorentz_charact_exponent}). If $4 \Omega^2>(\Delta-\kappa)^2$, then the Rabi oscillations are underdamped and the total decay rate reduces to $\Gamma=\Delta+\kappa$. In the opposite case, we are dealing with a pure exponential decay without oscillations (overdamped regime) with $\Gamma=\Delta+\kappa\pm\sqrt{(\Delta-\kappa)^2-4 \Omega^2}$. Thus, the Lorentzian distribution gives rise to qualitatively different behaviour for the decay process as compared to the $q$-Gaussian one, since $\Gamma$ remains constant in the whole range of $\Omega$ within the strong-coupling regime. However, as is unambiguously seen in Fig.~\ref{Figure_Gamma_vs_Omega}, the  non-monotonic behavior obtained in the framework of the $q$-Gaussian spin density distribution is supported by our experimental data thereby confirming our initial assumption for the shape of this distribution.

In the absence of inhomogeneous broadening, when the spin density function is written as $\rho(\omega)=\delta(\omega-\omega_s)$, the expressions for the decay rate are obtained from those for a Lorentzian distribution by setting its width to zero, $\Delta=0$. Thus, in the regime of underdamped oscillations we get, $\Gamma=\kappa$, whereas in the overdamped regime, $\Gamma=\kappa\pm\sqrt{\kappa^2-4 \Omega^2}$. Correspondingly, the blue lines in Fig.~\ref{Figure_Gamma_vs_Omega} determine the lowest border for possible decay rates reached in our system, because the values for $\Gamma$ in the presence of inhomogeneous broadening should always be larger than the corresponding ones in the case when it is absent. It is seen from Fig.~\ref{Figure_Gamma_vs_Omega} that this condition is indeed always fulfilled.

Next, we apply the so-called Markov approximation in Eq.~(\ref{Eq_a_with_Bk0}) with respect to the cavity amplitude $A(t)$ which implies that the memory effects caused by a feedback from the NV ensemble onto the cavity are disregarded. Specifically, we shift the initial time of integration on the r.h.s.\,of  Eq.~(\ref{Eq_a_with_Bk0})  to $-\infty$, put $A(\tau) \approx A(t)$, and make use of the Sokhotski-Plemelj theorem (\ref{Sokhotski_theorem}) in the limit of $\gamma\rightarrow 0$, when performing the integration with respect to $\omega$. Under all these assumptions the third term on the r.h.s. of Eq.~(\ref{Eq_a_with_Bk0}) reduces to ($\omega_p=\omega_s$)
\begin{eqnarray}
\nonumber
&&-\Omega^2 \int_0^{\infty} d\omega \rho(\omega) \int_{0}^t d\tau
e^{-i(\omega-\omega_s-i\gamma)(t-\tau)}A(\tau) \approx
\\
&&i \Omega^2 A(t) \int_0^{\infty}\dfrac{d\omega \rho(\omega)}{\omega-\omega_s-i \gamma}=-\pi\Omega^2\rho(\omega_s)\cdot A(t).
\label{Eq_Mark_Volt}
\end{eqnarray}
Note, that the principal value does not appear in the above equation because $\rho(\omega)/(\omega-\omega_s)$, is an antisymmetric function with respect to the singular point, $\omega=\omega_s$. In the simplest case when there is no driving and all spins are initially in the ground state, the Volterra equation (\ref{Eq_a_with_Bk0}) reduces to $\dot A(t)\!=-[\kappa+\pi\Omega^2\rho(\omega_s)]\cdot A(t)$. Therefore, the Markov approximation leads to a pure exponential decay with the decay rate, $\Gamma=2[\kappa+\pi\Omega^2\rho(\omega_s)]$. The spin ensemble density thus gives rise to a significant enhancement of the cavity decay rate as compared to the one for a bare cavity, $\Gamma=2\kappa$. Remarkably, this effect has a direct analogy to the Purcell enhancement of the spontaneous emission rate of a single emitter inside a cavity \cite{Purcell1946} which appears due to the increase of the local density of photonic states at the emitter position as compared to the vacuum case. The Markov approximation, however, loses its validity at fairly low coupling strengths, starting to deviate from the real values of $\Gamma$ already at $\Omega/2\pi \approx 1.5$\,MHz (see Fig.~\ref{Figure_Gamma_vs_Omega}). The hallmark of non-Markovianity of the resulting dynamics are Rabi oscillations setting in at higher values of $\Omega$.

In a next step we put forward an analytical estimate for the decay rate in the limit of very strong coupling ($\Omega \rightarrow \infty$) employing the Laplace transform of our Volterra equation summarized in Appendix \ref{App_Lapl_Transf}. For that purpose we use recently developed concepts for another cavity QED problem dealing with non-Markovian quantum dynamics of a single emitter inside an open multimode cavity \cite{KLRT14}. The key insight from that study is that the dominant frequency components contributing to the dynamics of $A(t)$ are those which are resonant in its Laplace transform, $U(\omega)$, given by Eq.~(\ref{Eq_Phis_34}). For such resonances to occur we find the following requirement on the nonlinear Lamb shift (\ref{Eq_Lamb_shift}), $\omega_r-\omega_c= \Omega^2\delta( \omega_r)$. In the limit of sufficiently large values of the coupling strength the Laplace transform, $U(\omega)$, has a well-resolved double-peak structure with two resonance frequencies given approximately by, $\omega_r \approx\omega_c\pm\Omega$. Furthermore, $A(t)$ essentially displays damped Rabi oscillations of the form, $A(t)\sim \cos(\Omega t)\cdot e^{-[\kappa+\pi\Omega^2\rho(\omega_c\pm\Omega)]t/2}$, due to the Fourier transforms of the two curves in $U(\omega)$ centered at these two resonance frequencies. One can see in Fig.~\ref{Figure_Gamma_vs_Omega} that such an estimate for the decay rate, $\Gamma=\kappa+\pi\Omega^2\rho(\omega_c\pm\Omega)$, works rather well if $\Omega/2\pi \ge 25$\,MHz. Thus, in contrast to the Markovian dynamics, the relevant frequencies which contribute to the value of the decay rate are those associated with two resonant peaks in $U(\omega)$. Remarkably, a pair of poles in the complex plane occurring for $\Omega/2\pi \ge 25$\,MHz do not spoil this asymptotic behavior, see Appendix \ref{App_Lapl_Transf}. Note that our expression for the decay rate in the limit of  $\Omega \rightarrow \infty$ coincides with the one obtained in \cite{Diniz2011}, where the behavior of poles of the stationary transmission has been analyzed.

\subsection*{Cavity protection effect}
\label{Sec_cavit_prot}
It follows from the above analysis that for spectral distributions $\rho(\omega)$ whose tails fall off faster than
$1/\omega^2$, an increasing coupling strength inevitably leads to a reduction of the decay rate $\Gamma$, so that the system will finally be protected against decoherence, a phenomenon referred to as ``cavity protection effect'' \cite{Kurucz2011,Diniz2011}. It is not hard to see that our $q$-Gaussian satisfies such a requirement, whereas a Lorentzian spin distribution does not. As a consequence, the latter does not protect the cavity against decoherence, featuring a constant decay rate in the strong coupling regime (see green line in Fig.~\ref{Figure_Gamma_vs_Omega}). In contrast, our numerical analysis for the $q$-Gaussian shows that for a collective coupling strength of $\Omega/2\pi \sim 25$\,MHz, the decay rate induced is already suppressed below $8\%$ of its maximal value at $\Omega/2\pi \sim 2.25$\,MHz. It is interesting to note, that the minimal possible value for the decay rate reached in the limit of large $\Omega$ is $\kappa$ as the decay rate for a bare cavity without diamond is $2\kappa$. This can be explained by the fact that due to the strong coupling between the spin ensemble and the cavity, the excitation is trapped by $50\%$ within the spin ensemble which has a negligible direct decay rate during the course of our experiment.

Physically, the ``cavity protection effect" can  be understood as follows: In the presence of inhomogeneous spin broadening, the polariton states, defined as superpositions of the cavity mode with the superradiant (bright) spin-wave modes, become coupled to the sub-radiant (dark) spin-wave modes \cite{Kurucz2011}. This coupling acts as the main source of decoherence, leading to a strong damping of the polariton modes. However, for strong enough coupling strength, the Rabi-splitting of the polariton peaks opens up a gap for the super-radiant polaritons.  If the spectral profile of the inhomogeneous spin distribution decays sufficiently fast for increasing gap size, an energetic decoupling of the super-radiant polaritons from the sub-radiant spin-wave modes occurs, leading to a suppressed damping of the polaritons and to a corresponding decrease of their peak linewidth.
\begin{figure}
\includegraphics[angle=0,width=1.\columnwidth]{fig9.eps}
\caption{(color online). Cavity probability amplitude $|A(t)|^2$ under the action of eleven successive rectangular microwave pulses with carrier frequency $\omega_p=\omega_c=\omega_s=2\pi\cdot 2.6915$\,GHz, phase-switched by $\pi$, as a function of time and pulse duration $\tau$. The white line indicates the corresponding moment of times, $11 \tau$, at which the driving signal is switched off. The coupling strength $2\Omega/2\pi=17.12$\,MHz.}
\label{fig_6_pulses_2D}
\end{figure}
\begin{figure}
\vspace*{0.84cm}
\includegraphics[angle=0,width=1.\columnwidth]{fig10.eps}
\caption{(color online). Resonant dynamics under the action of eleven successive rectangular microwave pulses (horizontal cut of Fig.~\ref{fig_6_pulses_2D} at $\tau=2\pi/\Omega_R=52$\,ns). This specific driving corresponds to the largest enhancement of both the cavity amplitude $|A(t)|^2$ and the $x$-component of the collective spin $J_x^2(t)$ which coherently exchange the energy during course of time. Red (gray) curve: results of numerical calculations for $|A(t)|^2$. Black curve: $|A(t)|^2$ measured in the experiment. Orange (light gray) curve: results of numerical calculations for $J_x^2(t)$. The alternating gray and white vertical bars designate the pulses sketched at the top of Fig.~\ref{fig_6_pulses_2D}. The last white area corresponds to the damped dynamics when the driving signal is switched off.}
\label{Fig_A_2_Jx_2_q_Gauss_6_pulses}
\end{figure}

\section{Coherently driven spin ensembles}
\label{Sec_period_drive}

In a next step we address an important question arising in the context of possible realizations of coherent-control schemes, which is how to reach high excitation levels in the spin ensemble with a driving signal that has only limited power to avoid heating up the hybrid quantum device. We have seen in Sec.~\ref{Subsec_Dyn_Lorentz_distr} that the assumption of a Lorentzian distribution for the spin density leads to a simplified picture reducing the dynamics to the one of two coupled damped harmonic oscillators, where one of them stands for the cavity and the other for the spin ensemble. Furthermore, the expectation value of the collective spin operator can formally be excluded, so that we end up with a single equation for the cavity amplitude which has the same form as the equation for a damped and driven harmonic oscillator. Therefore, if our system is subjected to a periodic driving force, a resonance is expected to occur when the driving frequency is equal to the characteristic frequency of the system. Based on this reduced model, we conjecture that coherent cavity oscillations, and as a consequence, spin ensemble oscillations with a large amplitude can also be achieved for the $q$-Gaussian spin distribution. Also in this case the system needs to be driven periodically, so that the period of $\eta(t)$ matches the resonance condition given by the Rabi period, $T_R=2\pi/\Omega_R$.

By pumping the cavity by a sequence of rectangular pulses with a carrier frequency $\omega_p=\omega_c=\omega_s$, phase-switched by $\pi$, we indeed reveal a strongly resonant structure of $|A(t)|^2$ as a function of pulse duration $\tau$ and time $t$, see Fig.~\ref{fig_6_pulses_2D}. The corresponding increase of $|A(t)|^2$ can reach two orders of magnitude as compared to the case when the system is driven by a long rectangular pulse [see Fig.~\ref{Figure_long_pulse_with_Lorentz}a)], provided that the resonance condition is met, $\tau=2\pi/\Omega_R$ (see  Fig.~\ref{Fig_A_2_Jx_2_q_Gauss_6_pulses}). Note that the net power injected into the cavity, when applying a long rectangular pulse or a sequence of rectangular pulses phase-switched by $\pi$, is exactly the same as we are just periodically changing the sign of the amplitude. Also in both cases the cavity and spin ensemble coherently exchange their energy, so that the cavity amplitude $|A(t)|^2$ oscillates in antiphase with respect to the spin ensemble component $J_x^2(t)$.

In Fig.~\ref{Fig_A_2_q_Gauss_vs_Lorentz_6_pulses} we present results for such a resonant driving both for a $q$-Gaussian and for a Lorentzian profile of the spectral distribution for the spin density. We take the value of the coupling strength, $\Omega/2\pi=25$\,MHz, for which the decoherence effect caused by the $q$-Gaussian form of the inhomogeneous broadening is strongly suppressed. Indeed, the resulting total decay rate shown in Fig.~\ref{Figure_Gamma_vs_Omega} for this value of $\Omega$ is $3.7$ times smaller than that for $\Omega/2\pi=8.56$\,MHz used so far in Figs.~\ref{fig_6_pulses_2D}, \ref{Fig_A_2_Jx_2_q_Gauss_6_pulses} and 5.4 times smaller than the total decay rate predicted in the framework of the Lorentzian distribution. For this situation we see that the giant oscillations of the cavity probability amplitude, $|A(t)|^2$, induced by the resonant driving is a factor of 20 larger than what would be predicted for by a Lorentzian functional profile. This clear signature of the ``cavity-protection effect'' paves the way for the realization of sophisticated coherent-control schemes in the strong-coupling regime of QED.

\begin{figure}
\includegraphics[angle=0,width=1.\columnwidth]{fig11.eps}
\caption{(color online). Resonant dynamics under the action of seventy successive rectangular microwave pulses ($\omega_p=\omega_c=\omega_s$) for a pulse duration $\tau=2 \pi/\Omega_R=19.5$\,ns. Red (gray) curve: numerical results for the $q$-Gaussian spin distribution. The coupling strength is chosen to be $\Omega/2\pi=25$\,MHz. In this case the value for the total decay rate $\Gamma$ (see Fig.~\ref{Figure_Gamma_vs_Omega}) is $3.7$ times smaller than that for $\Omega/2\pi=8.56$\,MHz used so far in Figs.~\ref{fig_6_pulses_2D}, \ref{Fig_A_2_Jx_2_q_Gauss_6_pulses}. Orange (light gray) curve: corresponding numerical results for the Lorentzian spin distribution. }
\label{Fig_A_2_q_Gauss_vs_Lorentz_6_pulses}
\vspace*{0.5cm}
\end{figure}

\begin{figure}
\includegraphics[angle=0,width=1.\columnwidth]{fig12.eps}
\caption{(color online). The maximal value of the cavity probability amplitude $|A(t)|^2$, $\max[|A(t)|^2]$, reached during coherent oscillations to which the system sets in under the action of incident rectangular pulses of duration $\tau$ that are phase-switched by $\pi$. We consider four different values for the carrier frequency of our periodic driving signal: $\omega_p=\omega_c$; $\omega_p=\omega_c\pm \Omega_R/8$; $\omega_p=\omega_c\pm \Omega_R/4$; $\omega_p=\omega_c\pm \Omega_R/2$, where $\omega_c=2\pi\cdot 2.6915$\,GHz and $\Omega_R=2\pi\cdot 19.2$\,MHz are, respectively, the cavity and Rabi frequencies.}
\label{fig_A2_max_in_units_Omega_fin}
\end{figure}

In a further study we take the probe frequency out of resonance with the cavity  $\omega_p \ne \omega_c$. (The condition $\omega_c=\omega_s$, however, always holds.) In Fig.~\ref{fig_A2_max_in_units_Omega_fin} we present the maximal value of the cavity amplitude, $\max[|A(t)|^2]$, reached during coherent oscillations to which the system sets in under the action of incident rectangular pulses of duration $\tau$ that are phase-switched by $\pi$. We deduce from this figure that the cavity amplitude experiences maximal growth at the resonance condition, $\omega_p=\omega_c=\omega_s$. It is worth noting that for the off-resonant cases ($\omega_p \ne \omega_c$) the right peak of $\max[|A(t)|^2]$ appears exactly at such values of $\pi/\tau$ which correspond to the mismatching value of the probe frequency from the resonant case ($\omega_p=\omega_c$). A similar tendency is also seen for the left peak for not too high values of the mismatch from the resonance condition.

\section{Conclusions}
We have studied in detail the dynamics of an inhomogeneously broadened spin ensemble interacting with a single cavity mode. For that purpose we numerically solved the Volterra integral equation for the cavity amplitude which explicitly contains the spin distribution function describing the inhomogeneous broadening of the spin ensemble. By assuming a Lorentzian functional profile for the spin density, we solved the problem analytically. This analytical solution provides an  intuitive understanding of some important features of the resulting spin-cavity dynamics, such as an overshoot effect resulting from the constructive interference between the energy stored in the spin ensemble and in the cavity. Several features of the temporal dynamics in the strong coupling regime are, however, specifically due to the $q$-Gaussian spectral spin density which we find to be realized in our experiment. In particular, the non-Lorentzian functional profile of the spin distribution allows us to observe as well as to accurately describe a phenomenon known as ``cavity protection effect" \cite{Kurucz2011,Diniz2011} for large values of the coupling strength. This effect results in a complete suppression of the decoherence induced by inhomogeneous broadening in the strong-coupling regime. To highlight the potential of this effect for the implementation of coherent-control schemes, we reveal how an appropriately chosen pulse sequence can excite giant coherent oscillations between the cavity and the spin ensemble. We classify the dynamics as a function of the coupling strength and the probe frequency covering both Markovian and non-Markovian regimes.

\section*{Acknowledgements}

We would like to thank R. Ams\"uss, B. Hartl, F. Mintert, T. N\"obauer, P. Rabl, J. Schmiedmayer and A. Valookaran for helpful discussions.  D.O.K. and S.R acknowledge funding by the FWF through Project No. F49-P10 (SFB NextLite).  The experimental effort has been supported by the TOP grant of TU Vienna. S.P. acknowledges support by the Austrian Science Fund (FWF) in the framework of the Doctoral School ``Building Solids for Function" (Project W1243).