text:
\section{Introduction}
\label{Sec1}

We introduce the following notation.

\begin{itemize}
\item $T_1(a,b;h):= \sum_{i=1}^{h} \{\frac{ib}{a}\}^2$.
\item $T_2(a,b;h):= \sum_{i=1}^{h} i \lfloor \frac{ib}{a} \rfloor$.
\item $T_3(a,b;h):= \sum_{i=1}^{h} \lfloor \frac{ib}{a} \rfloor^2$.
\end{itemize}

We can reformulate these sums as follows. Let $q_i$ and $r_i$ denote the quotient and remainder when $ib$ is divided by $a$. Then
\begin{align*}
T_1(a,b;h) &= \frac{1}{a^2} \sum_{i=1}^h r_i^2, \\
T_2(a,b;h) &= \sum_{i=1}^{h} iq_i, \\
T_3(a,b;h) &= \sum_{i=1}^{h} q_i^2.
\end{align*}

Note that summations like $\sum_{i=1}^{h} ir_i $ and $\sum_{i=1}^{h} q_i r_i$ can be easily expressed in terms of these sums using the division algorithm. We remark in passing that in $2020$, the present author described a reciprocity relation which can be used to quickly calculate $\sum_{i=1}^{h} q_i $ and $\sum_{i=1}^{h} r_i$ (see \cite[Lemma 7]{Binner}). This reciprocity relationship is also described in Theorem \ref{Quotient} below.

In Section \ref{Sec2}, we derive reciprocity relations for $T_1(a,b;h)$. Using these, we then obtain a reciprocity relation for $T_2(a,b;h)$ in Section \ref{Sec3}. These reciprocity relations help us to easily calculate $T_1(a,b;h)$ and $T_2(a,b;h)$. In Section \ref{Sec4}, we show that $T_1(a,b;h)$ and $T_2(a,b;h)$ can be calculated in $O(\log t)$ and $O((\log t)^2)$ steps, where $t=\max(a,b)$ and by a step, we mean a basic arithmetic operation on the bits of $a$ and $b$. Further we show that $T_3(a,b;h)$ can be easily calculated using the values of $T_1(a,b;h)$ and $T_2(a,b;h)$.
In Sections \ref{Sub1} and \ref{Sub2}, we demonstrate our formulas for an example. Let $q_i$ and $r_i$ denote the quotients and remainders when $2732 \hspace{.05cm} i$ is divided by $8411$. By performing only a few steps, we show that
\begin{align*}
 \sum_{i=1}^{1221} r_i^2 &= 28850219593, \\
 \sum_{i=1}^{1221} iq_i &= 196956430, \\
 \sum_{i=1}^{1221} q_i^2 &= 63853169.
\end{align*}

We require three main results. The first one is the following well-known result of Sylvester.

\begin{theorem}[Sylvester (1882)]
\label{Sylvester}
 If $a$ and $b$ are positive coprime numbers, the number of natural numbers
 that cannot be expressed in the form $ax + by$  for nonnegative integers $x$ and $y$ is equal to $\frac{(a-1)(b-1)}{2}$.
\end{theorem}

This result can be found in \cite{Sylvester82}. Moreover, Sylvester posed this as a recreational problem, and Curran \cite{Sylvester} published a short proof based on generating functions.

Let $NR(a,b)$ denotes the set of nonnegative integers nonrepresentable in terms of $a$ and $b$. That is, $NR(a,b)$ is the set of nonnegative integers $n$ that cannot be expressed in the form $ax + by$. Then, by Theorem \ref{Sylvester}, $|NR(a,b)| = \frac{(a-1)(b-1)}{2}$. In $1993$, Brown and Shiue \cite{BS} discovered the sum $S(a,b)$ of natural numbers that cannot be expressed in the form $ax+by$.

\begin{theorem}[Brown and Shiue (1993)]
\label{Brown}
 For positive coprime numbers $a$ and $b$, $$ S(a,b) := \sum_{n \in NR(a,b)} n = \frac{1}{12}(a-1)(b-1)(2ab-a-b-1). $$
\end{theorem}
For various calculations involved in our examples, we need the following reciprocity relationship proved by the present author in $2020$.
\begin{theorem}[Binner(2020)]
\label{Quotient}
 Let $a$, $b$, $d$, and $K$ be positive integers such that $b < a$, $d < a$, $\gcd(a,b)  = 1$, and $K = \left\lfloor \frac{bd}{a} \right\rfloor$. Then  $$\sum_{i=1}^{d} \left\lfloor \frac{ib}{a} \right\rfloor + \sum_{i=1}^{K} \left\lfloor \frac{ia}{b} \right\rfloor = dK.$$
\end{theorem}

\section{An algorithm for $T_1(a,b;h)$}
\label{Sec2}

In this section, we derive reciprocity relations which can be used to calculate $T_1(a,b;h)$.

\subsection{Reciprocity relation}

Define $$ S(a,b;h) := \left(\frac{a}{2}\right) T_1(a,b;h) +  \left(\frac{a}{2} + 1\right) \sum_{i=1}^{h} \left \lfloor \frac{ib}{a} \right \rfloor. $$  We describe reciprocity relations for $S(a,b;h)$. This leads to a method to quickly calculate $T_1(a,b;h)$ because  $ \sum_{i=1}^{h} \left \lfloor \frac{ib}{a} \right \rfloor$ can be easily calculated using the algorithm described in \cite[Section 2.3]{Binner}. We need some more notation.

\begin{itemize}
\item $n_0$ is the remainder obtained upon dividing $-b(h+1)$ by $a$.
\item $n:=ab-a+n_0$. Note that $ab-a \leq n < ab$.
\item $H:= n_1-1$, where $n_1$ is the remainder when $-na^{-1}$ is divided by $b$.
\end{itemize}

Our approach is to calculate the number of nonnegative integer solutions $(x,y,z,u)$ of the equation $ax+by+z+u=n$ in two different ways. First, we use Theorems \ref{Sylvester} and \ref{Brown} to find the number of solutions of this equation.

\begin{lemma}
\label{Ref1}
The number of nonnegative integer solutions of the equation $ax+by+z+u=n$ is given by $$ \frac{(n+1)(n+2)}{2} + \frac{(a-1)(b-1)}{12} (2ab-a-b-6n-7). $$
\end{lemma}

\begin{proof}
It is well-known that the equation $ax+by=n$ has either $0$ or $1$ solutions if $n<ab$ (see \cite[Lemma 2 and Lemma 4]{AT}). We view the equation $ax+by+z+u=n$ as the pair of equations $ax+by=i$ and $z+u=n-i$, as $i$ varies from $0$ to $n$. Note that the former equation has a solution only if $i \not\in NR(a,b)$. Then the required number of solutions of the equation $ax+by+z+u=n$ is given by $$  \sum_{\substack{i=0, \\ i \not\in NR(a,b)}}^n (n+1-i). $$
Using Theorems \ref{Sylvester} and \ref{Brown} and simplifying, we get that

\begin{align*}
& \sum_{\substack{i=0, \\ i \not\in NR(a,b)}}^n (n+1-i) \\
&=\sum_{i=0}^n (n+1-i) - \sum_{i \in NR(a,b)} (n+1-i) \\
&=  \frac{(n+1)(n+2)}{2} -(n+1)|NR(a,b)| + \sum_{i \in NR(a,b)} i \\
&= \frac{(n+1)(n+2)}{2} -(n+1)\frac{(a-1)(b-1)}{2} + \frac{1}{12}(a-1)(b-1)(2ab-a-b-1) \\
&=  \frac{(n+1)(n+2)}{2} + \frac{(a-1)(b-1)}{12} (2ab-a-b-6n-7).
 \end{align*}

\end{proof}

Next, we find the number of solutions of this equation using the method of generating functions. Though our method is similar in spirit to the proof of \cite[Theorem 5]{Binner}, there are several key differences and we provide all the details here for the sake of completeness. We require some more notation.
\begin{align*}
&\alpha(a,b):= \frac{ab(a+b-2)}{2}, \\
&\beta(a,b):= \frac{ab(a-1)(b-1)}{2} + \frac{ab \left((a-1)(a-2)+(b-1)(b-2) \right)}{3}, \\
&\gamma(a,b):= \frac{2\alpha^2(a,b)-ab\beta(a,b)}{2(ab)^3}, \\
& \eta_1(a,b,h):= (h+H+1) + n\gamma(a,b) + \frac{n(n+3)}{2} \left(\frac{a+b-2}{2ab}\right) + \frac{n^3+6n^2+11n}{6ab} \\
& + \frac{(h+1)(a-1)(a-5)}{12a} + \frac{(H+1)(b-1)(b-5)}{12b} - \frac{bh(h+1)(a+2)}{4a} - \frac{aH(H+1)(b+2)}{4b}.
\end{align*}
\begin{lemma}
\label{Ref2}
Let $N$ denote the number of nonnegative integer solutions of the equation $ax+by+z+u=n$. Then $$N = S(a,b;h) + S(b,a;H) + \eta_1(a,b,h).$$
\end{lemma}
\begin{proof}
By elementary theory of generating functions, we know that $N$ is equal to the coefficient of $x^n$ in $$ \frac{1}{(1-x^a)(1-x^b)(1-x)^2}. $$ Let $\zeta_m$ denote $e^{{\frac{2\pi i}{m}}}$.  We know that
$$(1-x^a)(1-x^b)(1-x)^2  =  (1-x)^4  \prod_{k = 1}^{a-1}(1-\zeta_a^{-k}x) \prod_{k = 1}^{b-1}(1-\zeta_b^{-k}x). $$ Since $a$ and $b$ are coprime, $1-\zeta_a^{-k}x$ and $ 1-\zeta_b^{-k}x$ are distinct for all values of $k$. Thus, we obtain the partial fraction decomposition
 \begin{equation}
 \label{Partial Fraction}
 \begin{aligned}
  \frac{1}{(1-x^a)(1-x^b)(1-x)^2} & = \frac{d_1}{1-x} + \frac{d_2}{(1-x)^2} +\frac{d_3}{(1-x)^3} + \frac{d_4}{(1-x)^4} \\
  &\quad + \sum_{k=1}^{a-1}\frac{A_k}{1-\zeta_a^{-k} x} + \sum_{k=1}^{b-1}\frac{B_k}{1-\zeta_b^{-k} x}.
     \end{aligned}
     \end{equation}
   On comparing the coefficients of $x^n$ on both sides of \eqref{Partial Fraction}, we find
   \begin{equation}
\label{Coefficient}
    N =  d_1 + (n + 1) d_2 + \frac{(n + 2)(n + 1)}{2} d_3 + \frac{(n + 3)(n+2)(n + 1)}{6} d_4 +  \sum_{k=1}^{a-1}A_k   \zeta_a^{-nk} + \sum_{k=1}^{b-1}B_k   \zeta_b^{-nk}.
   \end{equation}
   If we substitute $x=0$ in \eqref{Partial Fraction}, we get
   \begin{equation}
      \label{x=0}
    1 = d_1 + d_2 + d_3 + d_4 + \sum_{k=1}^{a-1} A_k + \sum_{k=1}^{b-1} B_k.
   \end{equation}
  Upon subtracting \eqref{x=0} from \eqref{Coefficient}, we get
   \begin{equation}
   \label{Almost}
   \begin{aligned}
   N - 1 &=  nd_2+ \frac{n(n+3)}{2} d_3 + \frac{n^3+6n^2+11n}{6} d_4 \\
   &\quad - \sum_{k=1}^{a-1}A_k(1-\zeta_a^{-nk}) - \sum_{k=1}^{b-1}B_k(1-\zeta_b^{-nk}).
   \end{aligned}
    \end{equation}
   The usual procedure for finding coefficients of a partial fraction expansion gives the following equations.
   \begin{align*}
    d_4 &= \frac{1}{ab},\\
    d_3 &= \frac{a+b-2}{2ab}, \\
    d_2 &= \gamma(a,b), \\
    A_k &= \frac{1}{a(1-\zeta_a^{bk})(1-\zeta_a^{k})^2}, \\
    B_k &= \frac{1}{b(1-\zeta_b^{ck})(1-\zeta_b^{k})^2}. \\
       \end{align*}
   Substituting these back into \eqref{Almost}, we have
   \begin{equation}
   \label{Formula'}
   N =  1 + n\gamma(a,b) + \frac{n(n+3)}{2} \left(\frac{a+b-2}{2ab}\right) + \frac{n^3+6n^2+11n}{6ab} - \left(\frac{S_1}{a} + \frac{S_2}{b} \right),
   \end{equation}
  where $$ S_1 =  \sum_{k=1}^{a-1} \frac{1-\zeta_a^{-nk}}{(1-\zeta_a^{bk})(1-\zeta_a^{k})^2} $$ and $$S_2 = \sum_{k=1}^{b-1} \frac{1-\zeta_b^{-nk}}{(1-\zeta_b^{ak})(1-\zeta_b^{k})^2}.$$
    Next, we find $S_1$ and $S_2$. By definition of $n$, we have $n \equiv -b(h+1) $ (mod $a$), so $\zeta_a^{-nk} = \zeta_a^{b(h+1)k}$, and thus,
 \begin{equation}
  \label{sums}
  \begin{aligned}
    S_1 &=  \sum_{k=1}^{a-1} \frac{1-\zeta_a^{b(h+1)k}}{(1-\zeta_a^{bk})(1-\zeta_a^{k})^2} \\
    &= \sum_{k=1}^{a-1} \sum_{j = 0}^{h} \frac{\zeta_a^{jbk}}{(1-\zeta_a^{k})^2}  \\
    &= \sum_{k=1}^{a-1} \sum_{j = 0}^{h} \frac{1}{(1-\zeta_a^{k})^2} - \sum_{k=1}^{a-1} \sum_{j = 0}^{h} \frac{1-\zeta_a^{jbk}}{(1-\zeta_a^{k})^2}.
    \end{aligned}
    \end{equation}
 Note that for each $1 \leq k \leq (a-1)$, $\frac{1}{1-\zeta_a^{k}}$ satisfies $\left(1-\frac{1}{x}\right)^a = 1$. That is, for each $1 \leq k \leq (a-1)$, $\frac{1}{1-\zeta_a^{k}}$ is a root of the equation $$ax^{a-1} - {a \choose 2} x^{a-2} + {a \choose 3} x^{a-3} - \cdots = 0. $$  From there, it is easy to see that $$ \sum_{k=1}^{a-1} \frac{1}{(1-\zeta_a^{k})^2} = -\frac{(a-1)(a-5)}{12}, $$
    and thus, changing the order of summations yields
  \begin{equation}
  \label{7}
   \sum_{k=1}^{a-1} \sum_{j = 0}^{h} \frac{1}{(1-\zeta_a^{k})^2} = -\frac{(h+1)(a-1)(a-5)}{12}.
   \end{equation}
   Moreover,

   \begin{equation}
   \label{8}
    \begin{aligned}
    \sum_{k=1}^{a-1} \sum_{j = 0}^{h} \frac{1-\zeta_a^{jbk}}{(1-\zeta_a^{k})^2} &= \sum_{k=1}^{a-1} \sum_{j = 1}^{h} \frac{1-\zeta_a^{jbk}}{(1-\zeta_a^{k})^2} \\
    &= \sum_{k=1}^{a-1} \sum_{j = 1}^{h} \sum_{l=0}^{bj-1} \frac{\zeta_a^{kl}}{1-\zeta_a^k} \\
    &= \sum_{k=1}^{a-1} \sum_{j = 1}^{h} \sum_{l=0}^{bj-1} \frac{1}{1-\zeta_a^k} - \sum_{k=1}^{a-1} \sum_{j = 1}^{h} \sum_{l=1}^{bj-1} \frac{1-\zeta_a^{kl}}{1-\zeta_a^k} \\
    &=  \sum_{j = 1}^{h} \sum_{l=0}^{bj-1} \sum_{k=1}^{a-1} \frac{1}{1-\zeta_a^k} - \sum_{k=1}^{a-1} \sum_{j = 1}^{h} \sum_{l=1}^{bj-1} \sum_{m=0}^{l-1} \zeta_a^{mk} \\
    &= \frac{(a-1)bh(h+1)}{4}  - \sum_{k=0}^{a-1} \sum_{j = 1}^{h} \sum_{l=1}^{bj-1} \sum_{m=0}^{l-1} \zeta_a^{mk} + \frac{b^2h(h+1)(2h+1)}{12} - \frac{bh(h+1)}{4} \\
     &= \frac{(a-2)bh(h+1)}{4}  - \sum_{k=0}^{a-1} \sum_{j = 1}^{h} \sum_{l=1}^{bj-1} \sum_{m=0}^{l-1} \zeta_a^{mk} + \frac{b^2h(h+1)(2h+1)}{12}.
\end{aligned}
\end{equation}
We know that $ \sum_{k=0}^{a-1} \zeta_a^{mk} \neq 0$ only if $a$ divides $m$, and in that case, the sum is $a$. Therefore,
\begin{equation}
\label{9}
    \begin{aligned}
\sum_{k=0}^{a-1} \sum_{j = 1}^{h} \sum_{l=1}^{bj-1} \sum_{m=0}^{l-1} \zeta_a^{mk} &= \sum_{j = 1}^{h} \sum_{l=1}^{bj-1} \sum_{m=0}^{l-1} \sum_{k=0}^{a-1} \zeta_a^{mk} \\
&= a \sum_{j = 1}^{h} \sum_{l=1}^{bj-1} \left(\left \lfloor \frac{l-1}{a} \right \rfloor +1 \right) \\
&= a \sum_{j = 1}^{h} \sum_{l=1}^{bj-1} \left \lfloor \frac{l-1}{a} \right \rfloor + \frac{abh(h+1)}{2} - ah.
\end{aligned}
\end{equation}
Next, note that $\left \lfloor \frac{l-1}{a} \right \rfloor = \left \lfloor \frac{l}{a} \right \rfloor$ unless $a$ divides $l$. Therefore,
\begin{equation}
\label{10}
\begin{aligned}
\sum_{j = 1}^{h} \sum_{l=1}^{bj-1} \left \lfloor \frac{l-1}{a} \right \rfloor &= \sum_{j = 1}^{h} \sum_{l=1}^{bj-1} \left \lfloor \frac{l}{a} \right \rfloor -  \sum_{j = 1}^{h}  \left \lfloor \frac{bj-1}{a} \right \rfloor \\
&=  \sum_{j = 1}^{h} \sum_{l=1}^{bj-1} \left \lfloor \frac{l}{a} \right \rfloor -  \sum_{j = 1}^{h}  \left \lfloor \frac{bj}{a} \right \rfloor \\
&=  \sum_{j = 1}^{h} \sum_{l=1}^{bj} \left \lfloor \frac{l}{a} \right \rfloor - 2 \sum_{j = 1}^{h}  \left \lfloor \frac{bj}{a} \right \rfloor. \\
\end{aligned}
\end{equation}
Finally, note that for any $1 \leq j \leq h$,
\begin{equation}
\label{11}
\begin{aligned}
\sum_{l=1}^{bj} \left \lfloor \frac{l}{a} \right \rfloor &= a\left(1+2+ \cdots +\left(\left \lfloor \frac{bj}{a} \right \rfloor - 1\right)\right) + \left \lfloor \frac{bj}{a} \right \rfloor \left(bj - a\left \lfloor \frac{bj}{a} \right \rfloor + 1 \right) \\
&= \left(bj  \left \lfloor \frac{bj}{a} \right \rfloor - \frac{a}{2} \left \lfloor \frac{bj}{a} \right \rfloor^2\right) - \left(\frac{a}{2}-1\right) \left \lfloor \frac{bj}{a} \right \rfloor \\
&= \frac{a}{2} \left \lfloor \frac{bj}{a} \right \rfloor \left(\frac{2bj}{a} - \left \lfloor \frac{bj}{a} \right \rfloor \right) - \left(\frac{a}{2}-1\right) \left \lfloor \frac{bj}{a} \right \rfloor \\
&= \frac{a}{2} \left(\frac{bj}{a} -  \left\{\frac{bj}{a}\right\} \right) \left(\frac{bj}{a} +  \left\{\frac{bj}{a}\right\} \right) - \left(\frac{a}{2}-1\right) \left \lfloor \frac{bj}{a} \right \rfloor \\
&= \frac{a}{2} \left(\left(\frac{bj}{a}\right)^2 -  \left\{\frac{bj}{a}\right\}^2 \right) - \left(\frac{a}{2}-1\right) \left \lfloor \frac{bj}{a} \right \rfloor.
\end{aligned}
\end{equation}
Therefore, by \eqref{10} and \eqref{11},
\begin{equation}
\label{12}
\begin{aligned}
\sum_{j = 1}^{h} \sum_{l=1}^{bj-1} \left \lfloor \frac{l-1}{a} \right \rfloor &= \frac{b^2h(h+1)(2h+1)}{12a} - \frac{a}{2} \left(\sum_{j=1}^h \left\{ \frac{bj}{a} \right\}^2\right) -  \left(\frac{a}{2}+1\right) \sum_{j=1}^h \left \lfloor \frac{bj}{a} \right \rfloor \\
&= \frac{b^2h(h+1)(2h+1)}{12a} - S(a,b;h).
\end{aligned}
\end{equation}
From \eqref{sums}, \eqref{7},  \eqref{8}, \eqref{9} and \eqref{12}, we get that
\begin{equation}
\label{13}
S_1= -\frac{(h+1)(a-1)(a-5)}{12} + \frac{bh(h+1)(a+2)}{4} -a \sum_{j = 1}^{h}  \left \lfloor \frac{bj}{a} \right \rfloor-ah - aS(a,b;h).
\end{equation}
Symmetrically, we get
\begin{equation}
\label{14}
S_2= -\frac{(H+1)(b-1)(b-5)}{12} + \frac{aH(H+1)(b+2)}{4} -b \sum_{j = 1}^{H}  \left \lfloor \frac{aj}{b} \right \rfloor-bH - bS(b,a;H).
\end{equation}
The result now follows from \eqref{Formula'}, \eqref{13} and \eqref{14}.
\end{proof}
Using Lemma \ref{Ref1} and Lemma \ref{Ref2}, we get the following reciprocity relation for $S(a,b;h)$. For brevity of notation, define $$ \eta_2(a,b,h):= \frac{(n+1)(n+2)}{2} + \frac{(a-1)(b-1)(2ab-a-b-6n-7)}{12} - \eta_1(a,b,h). $$
\begin{theorem}
\label{Reci}
For given positive coprime integers $a$ and $b$, and a given natural number $h$, $S(a,b;h)$ satisfies the following reciprocity relationship: $$ S(a,b;h) + S(b,a;H) = \eta_2(a,b,h). $$
\end{theorem}
Next, we describe our algorithm for calculating $S(a,b;h)$.
\begin{enumerate}
\item Suppose $a>b$. We express $S(a,b;h)$ in terms of $S(b,a;H)$ using Theorem \ref{Reci}.
\item Suppose $b \geq a$.  Then, $b=aq+r$ for some $q \geq 1$ and $r < a$. Then, it is easy to observe that
\begin{equation}
\label{Div}
 S(a,b;h) =  S(a,r;h) + \frac{qh(h+1)(a+2)}{4}.
 \end{equation}
\item We keep repeating Steps $1$ and $2$ until we are done.
\end{enumerate}

\subsection{An example}
\label{Sub1}
Suppose we want to calculate the value of $T_1(8411,2732;1221)$, that is $$ \sum_{i=1}^{1221} \left\{\frac{2732 \hspace{.05cm} i}{8411}\right\}^2. $$ First, we evaluate $S(8411,2732;1221)$ using the above algorithm. Set $a=8411$, $b=2732$ and $h=1221$
in Theorem \ref{Reci} to get
\begin{equation}
\label{Eqn 31}
 S(8411,2732;1221) + S(2732,8411;2335) =  \frac{5521952154451967}{441901}.
 \end{equation}
  Using \eqref{Div}, we get
  \begin{equation}
\label{Eqn 32}
  S(2732,8411;2335) = S(2732,215;2335) + 11184575280.
  \end{equation}
   Using Theorem \ref{Reci}, we get
 \begin{equation}
\label{Eqn 33}
S(2732,215;2335) + S(215,2732;31) = \frac{43105956866071}{146845}.
\end{equation}
  Using \eqref{Div}, we get
   \begin{equation}
  \label{Eqn 34}
  S(215,2732;31) = S(215,152;31) + 645792.
  \end{equation}
   Using Theorem \ref{Reci}, we get
   \begin{equation}
    \label{Eqn 35}
    S(215,152;31) + S(152,215;129) = \frac{62027530983}{65360}.
    \end{equation}
     Using \eqref{Div}, we get
     \begin{equation}
   \label{Eqn 36}
      S(152,215;129) = S(152,63;129) + 645645.
      \end{equation}
      Using Theorem \ref{Reci}, we get
      \begin{equation}
   \label{Eqn 37}
       S(152,63;129) + S(63,152;9) = \frac{1719655381}{6384}.
       \end{equation}
      Using \eqref{Div}, we get
      \begin{equation}
   \label{Eqn 37}
       S(63,152;9) = S(63,26;9) + 2925.
       \end{equation}
        Using Theorem \ref{Reci}, we get
        \begin{equation}
   \label{Eqn 38}
         S(63,26;9) + S(26,63;21) = \frac{9093619}{1092}.
         \end{equation}
          Using \eqref{Div}, we get
          \begin{equation}
   \label{Eqn 39}
   S(26,63;21) = S(26,11;21) + 6468.
  \end{equation}
          Using Theorem \ref{Reci}, we get
  \begin{equation}
  \label{Eqn 40}
   S(26,11;21) + S(11,26;1) = \frac{757997}{572}.
   \end{equation}
           Finally, it is easy to see that
         \begin{equation}
\label{Eqn 41}
            S(11,26;1) = \frac{151}{11}.
            \end{equation}
From \eqref{Eqn 31} to \eqref{Eqn 41}, we get that $$ S(8411,2732;1221) = \frac{658946167630}{647}. $$ That is,
\begin{equation}
\label{Eqn 50}
 \left(\frac{8411}{2}\right) \sum_{i=1}^{1221} \left\{\frac{2732 \hspace{.05cm} i}{8411}\right\}^2  +  \left(\frac{8413}{2}\right) \sum_{i=1}^{1221} \left \lfloor \frac{2732 \hspace{.05cm} i}{8411} \right \rfloor=  \frac{658946167630}{647}.
  \end{equation}

The summation $\sum_{i=1}^{1221} \left \lfloor \frac{2732 \hspace{.05cm} i}{8411} \right \rfloor$  can be easily calculated using the algorithm described in \cite[Section 2.3]{Binner}. However, we provide all the details here for the sake of completeness.

In order to solve the first sum, we apply Theorem \ref{Quotient} to get
\begin{equation}
\label{Eqn 17}
 \sum_{i=1}^{1221} \left\lfloor \frac{2732  \hspace{.05cm} i}{8411} \right\rfloor = 483516 -  \sum_{i=1}^{396} \left\lfloor \frac{8411  \hspace{.05cm} i}{2732} \right\rfloor.
\end{equation}
Then, by the division algorithm,
\begin{equation}
\label{Eqn 18}
\begin{aligned}
\sum_{i=1}^{396} \left\lfloor \frac{8411  \hspace{.05cm} i}{2732}  \right\rfloor&= \sum_{i=1}^{396} \left(3i + \left\lfloor \frac{215i}{2732} \right\rfloor \right) \\
&= 235818 + \sum_{i=1}^{396} \left\lfloor \frac{215i}{2732} \right\rfloor.
\end{aligned}
\end{equation}
Repeated applications of Theorem \ref{Quotient}, followed by the division algorithm, give the following equations.
\begin{equation}
\label{Eqn 19}
\begin{aligned}
 \sum_{i=1}^{396} \left\lfloor \frac{215i}{2732} \right\rfloor &= 12276 -   \sum_{i=1}^{31} \left\lfloor \frac{2732 \hspace{.05cm} i}{215} \right\rfloor \\
  &=  6324 -  \sum_{i=1}^{31} \left\lfloor \frac{152i}{215} \right\rfloor,
\end{aligned}
\end{equation}
\begin{equation}
\label{Eqn 20}
\begin{aligned}
   \sum_{i=1}^{31} \left\lfloor \frac{152i}{215} \right\rfloor, &= 651-   \sum_{i=1}^{21} \left\lfloor \frac{215i}{152} \right\rfloor  \\
  &= 420 -   \sum_{i=1}^{21} \left\lfloor \frac{63i}{152} \right\rfloor,
\end{aligned}
\end{equation}
\begin{equation}
\label{Eqn 21}
\begin{aligned}
   \sum_{i=1}^{21} \left\lfloor \frac{63i}{152} \right\rfloor  &=  168 -  \sum_{i=1}^{8}   \left\lfloor \frac{152i}{63} \right\rfloor  \\
   &= 96 -  \sum_{i=1}^{8}   \left\lfloor \frac{26i}{63} \right\rfloor,
 \end{aligned}
 \end{equation}
 \begin{equation}
 \label{Eqn 22}
 \begin{aligned}
        \sum_{i=1}^{8}   \left\lfloor \frac{26i}{63} \right\rfloor &=  24 -  \sum_{i=1}^{3} \left\lfloor \frac{63i}{26} \right\rfloor \\
        &= 12 -  \sum_{i=1}^{3} \left\lfloor \frac{11i}{26} \right\rfloor,
      \end{aligned}
      \end{equation}
and
      \begin{equation}
      \label{Eqn 23}
      \begin{aligned}
       \sum_{i=1}^{3} \left\lfloor \frac{11i}{26} \right\rfloor  &= 3 - \sum_{i=1}^{1} \left\lfloor \frac{26i}{11} \right\rfloor \\
       &=1.
\end{aligned}
\end{equation}
From \eqref{Eqn 17} to \eqref{Eqn 23}, we get
 \begin{equation}
 \label{Eqn 100}
  \sum_{i=1}^{1221} \left\lfloor \frac{2732  \hspace{.05cm} i}{8411} \right\rfloor = 241709.
   \end{equation}
   From \eqref{Eqn 50} and \eqref{Eqn 100}, we get that
\begin{equation}
\label{Eqn 500}
T_1(8411,2732;1221) = \sum_{i=1}^{1221} \left\{\frac{2732 \hspace{.05cm} i}{8411}\right\}^2 = \frac{2219247661}{5441917}.
\end{equation}
Multiplying both sides of this equation by $8411^2$, the above statement is equivalent to $$ \sum_{i=1}^{1221} r_i^2 = 28850219593, $$ where $r_i$ is the remainder when $2732 \hspace{.05cm} i$ is divided by $8411$.

\section{An algorithm for $T_2(a,b;h)$ and $T_3(a,b;h)$}
\label{Sec3}
Recall our notation from Section \ref{Sec1}.
\begin{itemize}
\item $T_1(a,b;h)= \sum_{i=1}^{h} \{\frac{ib}{a}\}^2$.
\item $T_2(a,b;h)= \sum_{i=1}^{h} i \lfloor \frac{ib}{a} \rfloor$.
\item $T_3(a,b;h)= \sum_{i=1}^{h} \lfloor \frac{ib}{a} \rfloor^2$.
\end{itemize}
Note that
\begin{align*}
 T_3(a,b;h) - T_1(a,b;h) &= \sum_{i=1}^{h} \frac{ib}{a}\left(\left \lfloor  \frac{ib}{a} \right \rfloor -  \left\{\frac{ib}{a}\right\} \right) \\
 &= \sum_{i=1}^{h} \frac{ib}{a}\left(2 \left \lfloor  \frac{ib}{a} \right \rfloor -  \frac{ib}{a} \right) \\
 &= \frac{2b}{a} T_2(a,b;h) - \frac{b^2h(h+1)(2h+1)}{6a^2}.
 \end{align*}
Thus, we get the following relationship between $T_1(a,b;h)$, $T_2(a,b;h)$ and $T_3(a,b;h)$.
\begin{equation}
\label{Imp*}
T_3(a,b;h) =  T_1(a,b;h) + \frac{2b}{a} T_2(a,b;h)- \frac{b^2h(h+1)(2h+1)}{6a^2}.
\end{equation}

\subsection{Reciprocity relation for $T_2(a,b;h)$}

Next, we use another method to calculate $T_3(a,b;h)$. We generalize the ideas in the proof of Theorem \ref{Quotient} described in \cite{Binner}. For the sake of completeness, we provide all the details here. Let $h'$ denote the quantity $\left \lfloor \frac{bh}{a} \right \rfloor$. Then, $$ T_3(a,b;h) = \sum_{t=1}^{h'} t^2n_t, $$  where $n_t$ is the number of $i$ such that $1 \leq i \leq h$ and $\left\lfloor \frac{ib}{a} \right\rfloor = t$. Clearly, if $ t < h'$, then $$n_t = \left \lfloor \frac{(t+1)a}{b} \right \rfloor - \left \lfloor \frac{ta}{b} \right \rfloor; $$  if $t=h'$, then $$n_t  = h - \left \lfloor \frac{h'a}{b} \right \rfloor.$$ Therefore,
\begin{align*}
\sum_{i=1}^{h}\left \lfloor \frac{ib}{a} \right \rfloor^2 &= \sum_{t=1}^{h'-1} \left(\left\lfloor\frac{(t+1)a}{b}\right\rfloor - \left\lfloor \frac{ta}{b} \right\rfloor \right) t^2 + \left(h-\left\lfloor \frac{h'a}{b}\right\rfloor \right)h'^2 \\
&= \sum_{t=1}^{h'-1} \left( t^2 \left \lfloor \frac{(t+1)a}{b} \right \rfloor - (t-1)^2 \left \lfloor \frac{ta}{b} \right \rfloor \right)  - \sum_{t=1}^{h'-1} (2t-1) \left \lfloor \frac{ta}{b} \right \rfloor + \left(h-\left\lfloor \frac{h'a}{b}\right\rfloor \right)h'^2 \\
&= (h'-1)^2 \left \lfloor \frac{h'a}{b} \right \rfloor - \sum_{t=1}^{h'-1} (2t-1) \left \lfloor \frac{ta}{b} \right \rfloor + hh'^2 -h'^2 \left\lfloor \frac{h'a}{b}\right\rfloor \\
&= hh'^2 -  \sum_{t=1}^{h'} (2t-1) \left \lfloor \frac{ta}{b} \right \rfloor \\
&= hh'^2 -  2T_2(b,a;h') + \sum_{t=1}^{h'} \left \lfloor \frac{ta}{b} \right \rfloor.
\end{align*}

Thus, we obtain the following relation:
\begin{equation}
\label{Imp}
 T_3(a,b;h) = hh'^2 -  2T_2(b,a;h') + \sum_{t=1}^{h'} \left \lfloor \frac{ta}{b} \right \rfloor.
 \end{equation}

 Using \eqref{Imp*} and \eqref{Imp}, we get the following reciprocity relation for $T_2(a,b;h)$:
 \begin{equation}
 \label{Imp**}
 T_2(a,b;h) + \frac{a}{b} T_2(b,a;h') = \frac{ahh'^2}{2b} + \frac{a}{2b} \left(\sum_{t=1}^{h'} \left \lfloor \frac{ta}{b} \right \rfloor \right)  -\frac{a}{2b}T_1(a,b;h) + \frac{bh(h+1)(2h+1)}{12a}.
 \end{equation}

 We describe our algorithm for calculating $T_2(a,b;h)$. The quantity $T_3(a,b;h)$ can then be easily obtained from $T_1(a,b;h)$ and $T_2(a,b;h)$ using \eqref{Imp*}. Our algorithm for  $T_2(a,b;h)$ is as follows:

 \begin{enumerate}
\item Suppose $a>b$. We express $T_2(a,b;h)$ in terms of $T_2(b,a;h')$  using \eqref{Imp**}.  Note that the expression involves the terms $T_1(a,b;h)$ and $\sum_{t=1}^{h'} \left \lfloor \frac{ta}{b} \right \rfloor$. The former can be calculated using the algorithm in Section \ref{Sec2} and the latter can be calculated using Theorem \ref{Quotient}, as described in the algorithm in \cite[Section 2.3]{Binner}.
\item Suppose $b \geq a$.  Then, $b=aq+r$ for some $q \geq 1$ and $r < a$. Then, it is easy to observe that
\begin{equation}
\label{Eqn 200}
 T_2(a,b;h) =  T_2(a,r;h) + \frac{qh(h+1)(2h+1)}{6}.
 \end{equation}
\item We keep repeating Steps $1$ and $2$ until we are done.
\end{enumerate}

\subsection{An example}
\label{Sub2}
We return to our example $a=8411$, $b=2732$ and $h=1221$.
Using our algorithm for $T_1(a,b;h)$ in Section \ref{Sec2} and the algorithm for $\sum_{i=1}^{h'} \left \lfloor \frac{ia}{b} \right \rfloor$ in \cite[Section 2.3]{Binner}, we easily obtain
\begin{align*}
 T_1(8411,2732;1221) &= \frac{2219247661}{5441917}, \\
 \sum_{i=1}^{396} \left \lfloor \frac{8411 \hspace{.05cm}i}{2732} \right \rfloor &= 241807.
 \end{align*}
Then using \eqref{Imp**},
\begin{equation}
\label{Eqn 202}
 T_2(8411,2732;1221) + \frac{8411}{2732} T_2(2732,8411;396) = \frac{1075804292917}{2732}.
 \end{equation}
From \eqref{Eqn 200}, we get
\begin{equation}
\label{Eqn 203}
 T_2(2732,8411;396) = T_2(2732,215;396) + 62334558.
\end{equation}
Using our algorithm for $T_1(a,b;h)$ in Section \ref{Sec2} and the algorithm for $\sum_{i=1}^{h'} \left \lfloor \frac{ia}{b} \right \rfloor$ in \cite[Section 2.3]{Binner}, we easily obtain
\begin{align*}
 T_1(2732,215;396) &= \frac{489539849}{3731912}, \\
 \sum_{i=1}^{31} \left \lfloor \frac{2732 \hspace{.05cm}i}{215} \right \rfloor &= 6287.
\end{align*}
Then using \eqref{Imp**},
\begin{equation}
\label{Eqn 205}
 T_2(2732,215;396) + \frac{2732}{215}T_2(215,2732;31) = \frac{704030131}{215}.
\end{equation}
From \eqref{Eqn 200}, we get
\begin{equation}
\label{Eqn 206}
 T_2(215,2732;31) = T_2(215,152;31) + 124992.
\end{equation}
Using our algorithm for $T_1(a,b;h)$ in Section \ref{Sec2} and the algorithm for $\sum_{i=1}^{h'} \left \lfloor \frac{ia}{b} \right \rfloor$ in \cite[Section 2.3]{Binner}, we easily obtain
\begin{align*}
 T_1(215,152;31) &= \frac{483579}{46225}, \\
  \sum_{i=1}^{21} \left \lfloor \frac{215 \hspace{.05cm}i}{152} \right \rfloor &= 316.
\end{align*}
Then using \eqref{Imp**},
\begin{equation}
\label{Eqn 208}
 T_2(215,152;31) + \frac{215}{152} T_2(152,215;21) = \frac{515533}{38}.
 \end{equation}
From \eqref{Eqn 200}, we get
 \begin{equation}
\label{Eqn 209}
 T_2(152,215;21) = T_2(152,63;21)+ 3311.
\end{equation}
 Using our algorithm for $T_1(a,b;h)$ in Section \ref{Sec2} and the algorithm for $\sum_{i=1}^{h'} \left \lfloor \frac{ia}{b} \right \rfloor$ in \cite[Section 2.3]{Binner}, we easily obtain
 \begin{align*}
 T_1(152,63;21) &= \frac{164511}{23104}, \\
  \sum_{i=1}^{8} \left \lfloor \frac{152 \hspace{.05cm}i}{63} \right \rfloor &= 83.
 \end{align*}
Then using \eqref{Imp**},
 \begin{equation}
\label{Eqn 211}
 T_2(152,63;21) + \frac{152}{63} T_2(63,152;8) = \frac{151139}{63}.
 \end{equation}
From \eqref{Eqn 200}, we get
 \begin{equation}
\label{Eqn 212}
 T_2(63,152;8) = T_2(63,26;8) + 408.
 \end{equation}
 Using our algorithm for $T_1(a,b;h)$ in Section \ref{Sec2} and the algorithm for $\sum_{i=1}^{h'} \left \lfloor \frac{ia}{b} \right \rfloor$ in \cite[Section 2.3]{Binner}, we easily obtain
 \begin{align*}
 T_1(63,26;8) &= \frac{3233}{1323}, \\
 \sum_{i=1}^{3} \left \lfloor \frac{63 \hspace{.05cm}i}{26} \right \rfloor &= 13.
 \end{align*}
Then using \eqref{Imp**},
 \begin{equation}
\label{Eqn 214}
 T_2(63,26;8) + \frac{63}{26} T_2(26,63;3) = \frac{3695}{26}.
\end{equation}
 From \eqref{Eqn 200}, we get
 \begin{equation}
\label{Eqn 215}
 T_2(26,63;3) = T_2(26,11;3) + 28.
 \end{equation}
Using our algorithm for $T_1(a,b;h)$ in Section \ref{Sec2} and the algorithm for $\sum_{i=1}^{h'} \left \lfloor \frac{ia}{b} \right \rfloor$ in \cite[Section 2.3]{Binner}, we easily obtain
 \begin{align*}
 T_1(26,11;3) &= \frac{327}{338}, \\
 \sum_{i=1}^{1} \left \lfloor \frac{26 \hspace{.05cm}i}{11} \right \rfloor &= 2.
 \end{align*}
Then using \eqref{Imp**},
 \begin{equation}
\label{Eqn 216}
 T_2(26,11;3) + \frac{26}{11} T_2(11,26;1) = \frac{85}{11}.
\end{equation}
 From \eqref{Eqn 200}, we get
 \begin{equation}
\label{Eqn 217}
 T_2(11,26;1) = T_2(11,4;1) + 2.
 \end{equation}
It is easy to see that
 \begin{equation}
\label{Eqn 218}
 T_2(11,4;1) = 0.
\end{equation}
 From \eqref{Eqn 202} to \eqref{Eqn 218}, it follows that
 \begin{equation}
\label{Eqn 220}
 T_2(8411,2732;1221) = \sum_{i=1}^{1221} i \left \lfloor \frac{2732 \hspace{.05cm} i}{8411} \right \rfloor = 196956430.
 \end{equation}

Finally, we use \eqref{Imp*} to calculate $T_3(8411,2732;1211)$ from the values of $T_1(8411,2732;1211)$ and $T_1(8411,2732;1211)$ obtained in \eqref{Eqn 500} and \eqref{Eqn 220}, respectively.
\begin{align*}
T_3(8411,2732;1221) &= T_1(8411,2732;1221)  + \frac{5464}{8411} T_2(8411,2732;1221) - \frac{348800520350128}{5441917} \\
&=  \frac{2219247661}{5441917} + \frac{5464}{8411} \times 196956430 - \frac{348800520350128}{5441917} \\
&= 63853169.
\end{align*}
That is, $$ T_3(8411,2732;1221) = \sum_{i=1}^{1221} \left \lfloor \frac{2732 \hspace{.05cm} i}{8411} \right \rfloor^2  =  63853169. $$

\section{Efficiency of the algorithms}
\label{Sec4}
We compare the reciprocity relation in Theorem \ref{Reci} with that in Theorem \ref{Quotient}. The analysis in \cite[Section 2.5]{Binner} shows that $S(a,b;h)$ can be calculated in $O(\log t)$ steps where $t = \max(a,b)$. The quantity $\sum_{i=1}^{h} \left \lfloor \frac{ib}{a} \right \rfloor$ can also be calculated in $O(\log t)$ steps, as described in  \cite[Section 2.5]{Binner}. Therefore, $T_1(a,b;h) = \sum_{i=1}^{h} \{\frac{ib}{a}\}^2$ can be calculated in $O(\log t)$ steps.

Consider the reciprocity relation for $T_2(a,b;h)$ in \eqref{Imp**}. Note that this is similar to the ones above except that in each step, we need to calculate $T_1(a,b;h)$ and $\sum_{i=1}^{h'} \left \lfloor \frac{ia}{b} \right \rfloor$, both of which require $O(\log t)$ steps. Thus, in order to calculate $T_2(a,b;h)$, we need to apply the reciprocity relation $O(\log t)$ times and each time, we need to perform $O(\log t)$ steps. Hence, the number of steps required for calculating $T_2(a,b;h) = \sum_{i=1}^{h} i \lfloor \frac{ib}{a} \rfloor$ is $O((\log t)^2)$.

The quantity $T_3(a,b;h)$ can be obtained from $T_1(a,b;h)$ and $T_2(a,b;h)$ using \eqref{Imp*}. Therefore, the number of steps required for calculating $T_3(a,b;h) = \sum_{i=1}^{h} \lfloor \frac{ib}{a} \rfloor^2$ is also $O((\log t)^2)$.

\section{Acknowledgements}
 I want to thank the Maths Department at SFU for providing me various awards and fellowships which help me conduct my research.

redpajama_set_name: RedPajamaArXiv


text:
Hirsutine is een zenuwbeschermend indool dat voorkomt in onder andere Uncaria rhynchophylla, de bast van Uncaria tomentosa, bovengrondse delen van Cocculus hirsutus en de zaden van ruige scheefkelk.

De stof kan ook gesynthetiseerd worden.

Externe link
 Hirsutine, an indole alkaloid of Uncaria rhynchophylla, inhibits inflammation-mediated neurotoxicity and microglial activation

Indool

redpajama_set_name: RedPajamaWikipedia


The Shanghai Tower is a 632-metre (2,073 ft), 128-story megatall skyscraper in Lujiazui, Pudong, Shanghai. It also has the world's highest observation deck within a building or structure (Level 121, 561.25 m), and the world's fastest elevators at a top speed of 20.5 metres per second (74 km/h; 46 mph). It is the world's second-tallest building by height to architectural top.


text:
\section{Introduction}

The interaction of electromagnetic radiation with matter is of fundamental as well as of practical importance. In practice, while a fundamental quantum field theoretic description is available, simplified models are often used. For example, the Jaynes-Cummings model, derived from the atomic dipolar coupling to the electromagnetic field under the rotating-wave and single mode approximations \cite{ScullyBook}, has proven to be adequate for the description of many quantum optics experiments. However, experimental advances keep pushing for refinements of the models used.

In particular, recent experimental techniques in quantum optics and superconducting circuits have allowed for ultrafast optical measurements, approaching time scales comparable with the inverse of the characteristic frequency of the atomic energy gap between the ground and the excited states. In this regime, two of the most commonly employed approximations break down: the rotating-wave approximation and the single mode approximation \cite{ScullyBook}.

Concretely, as has been pointed out in \cite{Fay,Fermicausality}, the naive use of a Jaynes-Cummings model with a single mode approximation (i.e., considering a system of detectors which interact only with a single mode of the quantum field in a cavity) shows inconsistencies at these scales, in the sense that it would allow superluminal signalling. The occurrence of this problem is plausible, considering that a single mode is a completely nonlocal degree of freedom. In principle, it takes all modes to describe arbitrarily localized interactions, and traveling waves, and therefore causal propagation. In \cite{UdWGauss} it was shown in a particular scenario using harmonic oscillators that causal behavior should be approximately recoverable when only a finite number of modes is taken into account.

This leads to a question of practical importance. Namely, given an arbitrary level of desired accuracy, which finite minimum number of modes does one need to take into account in order to make the model consistent with causal communication? In order to address this question we will here study the fundamental quantum communication channel consisting of two localized quantum systems, such as atoms, that exchange field quanta in a cavity.

On one hand, our approach will allow us to find the answer to the practical question posed: the number of modes that one needs to take into account needs to grow according to a certain power law with respect to the required accuracy with which communication is to be described as causal.

On the other hand, the study of this quantum channel, this time without cutting off the number of modes, will here also lead us to a new basic observation in the regime of the earliest times when the signal can arrive. We will find that, in this regime, amplitude modulation is not optimal, i.e., that it can be improved upon through modulation in bases other than the eigenbasis of the sender's free Hamiltonian.

With this unexpected result we extend a body of literature \cite{Hegerfeld,Ferm2,Ferm3,Fermicausality} that started with a question by Fermi \cite{Fermi}: How do quantum field theories guarantee causality, given that quantum field theoretic Feynman propagators necessarily \cite{Feynm} possess tails outside the light cone (which decay exponentially for massive fields and polynomially for massless fields)? Consider, for example, two atoms $\cal{A}$ (Alice) and $\cal{B}$ (Bob) at rest separated by a spatial distance $R$ at some common proper time $t=0$. $\cal{A}$ is prepared in an excited state while $\cal{B}$ is in the ground state and the electromagnetic field is in the vacuum state. Fermi's question is then ``Can the atom $\cal{A}$ decay to the ground state and induce an excitation of the atom $\cal{B}$ at a time $t<R/c$?''.  The answer has to be that the atom $\cal{B}$ has a non-zero probability of getting excited outside the light cone, but that this probability is completely independent of atom $\cal{A}$ \cite{Sab1,Sab2,Fermicausality}, so that no information is being carried over a spacelike distance.

From a more modern perspective than Fermi's, namely that of quantum information theory, it is clear that nonlocal quantum correlations outside the light cone do not necessarily pose a problem. This is because the vacuum state is a spatially entangled state. In fact, it is known that two localized and spacelike separated quantum systems can be made entangled by merely letting them interact with the field vacuum state. The systems get entangled because they swap entanglement from the vacuum rather than by interacting through the exchange of real field quanta, see e.g., \cite{reznik,Hegerfeld, Sab1,Sabin2,Sab2,resin,mathieuachim1}. The impact of curvature was studied in \cite{ClicheKempfD}.

The Fermi problem was  formulated entirely in a quantum information theoretic framework in \cite{mathieuachim1}, namely by defining and studying the quantum channel that maps the density matrix of Alice to the density matrix of Bob. There, it was shown that the classical and quantum capacities of the quantum channel from Alice to Bob exactly vanish outside the light cone to all orders in perturbation theory.  Here, we will use the quantum channel of \cite{mathieuachim1}, but with Alice and Bob in a cavity.

First, we will study how many modes need to be taken into account in practical calculations so that causality is preserved to any desired accuracy.  We will find that arbitrary accuracy can be reached, in principle, (in spite of the Gibbs phenomenon) and we will find the scaling behavior of the number of modes needed. To obtain the most stringent bound, we will assume that the interaction is switched on suddenly and left on thereafter.

Second, without cutting off the number of modes, we will consider the regime of the earliest times that the signal can arrive, where we will derive the unexpected result that Alice can do better than send her message through amplitude modulation. Namely, when she amplitude-codes her message by preparing a ground or an excited state, Bob only hears her as weakly as in 4th order of perturbation theory. If instead she ``phase-modulates" her signal by preparing instead for example $\vert +\rangle, \vert - \rangle$ states, Bob will receive a signal from Alice in second order of perturbation theory. Finally, we will also discuss the generalization from cavities to free space.

\section{Setting}\label{sec:setting}

Our aim is to analyze signal transmission from an atom $\mathcal{A}$ placed inside a cavity at some distance from a second atom $\mathcal{B}$ through the interaction with the field in the cavity.  As a first approximation to the problem let us consider that the atoms are point like (their characteristic size is much smaller than the smallest characteristic wavelength in the cavity). For realistic atoms in microwave and optical cavities this is a very good approximation as it is discussed, e.g., in \cite{Wavepackets}.

To model this situation we consider a pair of two-level quantum systems as our atoms $\mathcal{A}$ and $\mathcal{B}$ as it is commonplace in the literature \cite{reznik,Sab1,Sab2,PastFutPRL,Wavepackets,AasenPRL}. The interaction of an atom and the radiation inside a cavity can be  approximated (for atomic transitions with no exchange of angular momentum) by the Unruh-DeWitt Hamiltonian, \cite{Wavepackets}, which describes the interaction of a two-level system with a scalar field \cite{DeWitt}. The Hamiltonian is
$H=H_0^{(\mathcal{D})}+H_0^{(\mathcal{F})}+H_I$, where $H_0^{(\mathcal{D})}$ and $H_0^{(\mathcal{F})}$ are the free Hamiltonians of  the two-level system and the field respectively, and $H_{I}$ is the interaction Hamiltonian:
\begin{equation}
H_{I}= \lambda \ \chi(\tau) \mu(\tau) \phi(x(\tau))\label{udw0},
\end{equation}
Here, $\lambda$ is the coupling strength and $\chi(\tau)$ is a switching function controlling the interaction time. The two-level system (which we will refer to as the 'detector' or 'atom') is coupled to the  massless scalar field $\phi (x)$  along its worldline (parametrized in terms of its proper time $\tau$) $x(\tau)$ through its monopole moment $\mu(\tau)$.

In the case where we have two inertial detectors $\mathcal{A, B}$ placed at constant positions $x_\mathcal{A}$ and $x_\mathcal{B}$ in a stationary cavity of length $L$,  with the usual mode expansion for the field, the interaction Hamiltonian can be written as
\begin{align}\label{hamilto}
H_{I} &=  \sum_{\mathcal{D}=\mathcal{A,B}}\lambda_\mathcal{D}\, \chi_\mathcal{D}(t) \mu_\mathcal{D}(t) \,  \nonumber\\
&\qquad \quad \times\sum_{j=1}^{\infty} (a_{j}^{\dagger}e^{i \omega_{j} t}+a_{j} e^{-i \omega_{j} t})\frac{\sin{k_j x_\mathcal{D}}}{\sqrt{\omega_jL}}
\end{align}
in the interaction picture.
Notice, that the proper time of the detector now coincides with the time coordinate $t$ of the cavity's frame in which the field quantization was carried out.
Now, the monopole moment of the two-level detectors takes the usual form
\[\mu_\mathcal{D} (t)=\sigma_\mathcal{D}^{+} \, e^{i \Omega_\mathcal{D} t}+\sigma_\mathcal{D}^{-} \, e^{-i \Omega_\mathcal{D} t},\]
where $\Omega_\mathcal{D}$ is the energy difference (or gap) between the ground and excited state of the detector $\mathcal{D}$, and   $\sigma_\mathcal{D}^+=\ket{e_\mathcal{D}}\bra{g_\mathcal{D}}$ and $\sigma_\mathcal{D}^- = \ket{g_\mathcal{D}}\bra{e_\mathcal{D}}$.

As can be  seen easily, the Jaynes-Cummings model that describes the radiation-matter interaction commonly used in quantum optics is essentially what is obtained by taking a single-mode approximation in $H_I$ \cite{ScullyBook}.

The communication between Alice and Bob is modelled as follows: Initially, the switching functions are chosen to vanish. So the detectors are not coupled to the field and Alice and Bob can prepare them for the interaction. To encode her message, Alice is free to prepare her detector in any state $\rho_{\mathcal{A},0}$ she chooses. Bob prepares his detector in the ground state and the field is assumed to start out in the vacuum. Hence the initial state of the system is
\begin{equation}\label{eq:instate}
\rho_{0} = \rho_{\mathcal{A}, 0} \otimes \ket{g_\mathcal{B}} \bra{g_\mathcal{B}} \otimes \ket0 \bra0.
\end{equation}
The detectors are then coupled to the field within a time interval $t\in (0,T)$. In this interval the initial state evolves under the action of $H_\text{int}$ in general into an entangled output state $\rho_T$.

As we are interested in the communication between Alice and Bob, we are interested in how the output state of Bob's detector is dependent on Alice's choice of $\rho_{\mathcal{A},0}$.
This gives rise to a quantum channel map from Alice's input density matrix to Bob's output density matrix
\begin{equation}\label{eq:channel}
\xi: \rho_{\mathcal{A}, 0} \mapsto \rho_{\mathcal{B}, T}=\operatorname{Tr}_{\mathcal{A}} \operatorname{Tr}_\mathcal{F} \left( \rho_T \right)
\end{equation}
where we obtain Bob's output state by taking the partial trace over Alice's and the field's Hilbert space.

The time evolution operator under this Hamiltonian from a time $t=0$ to a time $t=T$ is given by the following expansion:
\begin{multline}\label{eq:pert}
U(T,0) = \openone\!\underbrace{-\mathrm{i}\int_{0}^{T}\!\!\!\!\!d t_1 H_{I}(t_1)}_{U^{(1)}} \\
\underbrace{ - \int_{0}^{T}\!\!\!\!\!dt_1 \!\!\int_{0}^{t_1}\!\!\!\!\!dt_2\,    H_{I}(t_1) H_{I}(t_{2})}_{U^{(2)}}+\hdots
\end{multline}
Under the realistic assumption that the coupling strength is small enough, we can neglect higher orders in \eqref{eq:pert}. If we denote by $\rho_0$ the initial density matrix of the field-detector system we get that after a time $T$,
\begin{equation}
\rho_T=[\openone+U^{(1)}+U^{(2)}+\mathcal{O}(\lambda^3)]\rho_0[\openone+U^{(1)}+U^{(2)}+\mathcal{O}(\lambda^3)]^{\dagger
\end{equation}
This is, $\rho_T=\rho_0+\rho_T^{(1)}+\rho_T^{(2)}+\rho_T^{(3)}+\rho_T^{(4)}+\mathcal{O}(\lambda^5)$, where
\begin{align}
\label{eq:rho1}\rho_T^{(1)}&=U^{(1)}\rho_0+\rho_0{U^{(1)}}^\dagger \sim\mathcal{O}(\lambda)\\
\label{eq:rho2}\rho_T^{(2)}&=U^{(1)}\rho_0{U^{(1)}}^\dagger+U^{(2)}\rho_0+\rho_0{U^{(2)}}^\dagger \sim\mathcal{O}(\lambda^2)\\
& \dots \nonumber \\
\label{eq:rhogen}\rho_T^{(n)}&=\sum_{k=0}^n \, U^{(n-k)} \, \rho_0 \, {U^{(k)}}^\dagger \sim\mathcal{O}(\lambda^n)
\end{align}
and $U^{(0)}=\openone$ is understood.
The symbol $\mathcal{O}(\lambda^n)$ stands for the combined powers of the two coupling constants, i.e., $\mathcal{O}(\lambda_\mathcal{A}^i \lambda_\mathcal{B}^j)\sim \mathcal{O}(\lambda^{i+j})$.

In \cite{mathieuachim1}, the time evolution was formulated in terms of commutators between
$H_I$ and $\rho_0$. We here choose to use the Dyson expansion of $U(t)$ directly instead, because it facilitates the intuitive  interpretation of the different perturbative processes  and leads to an integral structure that is easier to evaluate numerically.

Note that  all the  perturbative corrections from \eqref{eq:rhogen} to the final density matrix $\rho_T$ are traceless:
\begin{equation}\label{eq:traceless}
\operatorname{Tr} \rho_T^{(n)}=0.
\end{equation}
Therefore, independent of up to which order $\mathcal{O}(\lambda^n)$ in the coupling constant the corrections are taken into account, the trace of the final state is always preserved,
\begin{equation}
\operatorname{Tr} \rho_T =1,
\end{equation}
and no normalization constant is necessary in front of $\rho_T$ at any given order in perturbation theory if all the terms of a given order are consistently taken into account. To see this, let us verify that the derivative of the left hand side of \eqref{eq:traceless} with respect to the switching time $T$ vanishes:
\begin{equation}\label{proof1}
\partialfrac{}T \operatorname{Tr} \rho_T^{(n)}=0,\; \forall\, T\geq 0.
\end{equation}
As all the $\rho_T^{(n)}$ are identically zero for $T=0$, their trace also vanishes for $T=0$. Hence, if \eqref{proof1} is true then $\operatorname{Tr} \rho_T^{(n)}$ vanishes for all $T$. To evaluate \eqref{proof1}  we differentiate \eqref{eq:rhogen}:
\begin{multline}\label{eq:trrhoderiv}
\partialfrac{}T\operatorname{Tr} \rho_T^{(n)} =\operatorname{Tr} \left[ \left(-\mathrm{i}\, H_I(T) U^{(n-1)}\right) \rho_0 \right.  \\ + \sum_{k=1}^{n-1} \left(-\mathrm{i}\, H_I(T) U^{(n-k-1)}\right) \rho_0 \, {U^{(k)}}^\dagger \\ +\sum_{k=1}^{n-1} U^{(n-k)} \,  \rho_0 \left(\mathrm{i}\, {U^{(k-1)}}^\dagger  H_I(T) \right) \\ \left. + \rho_0\left(\mathrm{i}\, {U^{(n-1)}}^\dagger  H_I(T) \right) \right]
\end{multline}
where we used $\partialfrac{}{T} U^{(n)}= -\mathrm{i}\, H_I(T) U^{(n-1)}$, which follows from \eqref{eq:pert}. Using the cyclic property of the trace, we can rewrite \eqref{eq:trrhoderiv} so as to have $H_I(T)$ stand, e.g., in front of every term in the sum. Then we see that the terms form pairs that exactly cancel each other, so \eqref{eq:trrhoderiv} vanishes. This shows that $\operatorname{Tr} \rho_T^{(n)}$ is indepent of $T$ and vanishes for all $T$.

Of course, independently of that, the Dyson expansion is not unitary order by order, but instead it is unitary up to the power of the perturbative parameter of the first ignored term in the perturbative expansion. Additionally, it is well-known that for very long times we can leave of the perturbative regime (where the Dyson expansion is valid) \cite{Wiilliam}. However, in the current paper we are concerned with timescales smaller or of the order of the light-crossing time of the cavity, and for all the values considered here, the Dyson expansions will be unitary up to at least the 4th (or 6th) power of the perturbative parameter.

Now to obtain Bob's output density matrix $\rho_{B, T}$, as defined in \eq{eq:channel}, we trace out the field and Alice's detector from $\rho_T$. However, all $\rho_T^{(n)}$, with $n$ odd, do not contain diagonal matrix elements in the field components, hence they drop out when the partial trace over the field is taken. This is because the field starts out in the vaccuum state, hence the partial trace over the field can be expressed as a vaccuum $n$-point function of the field. These $n$-point functions are identically zero for odd numbers of field operators. So the contributions to $\rho_{B, T}$ are all of even power in the coupling constant.
\begin{equation} \label{eq:rhobout}
\rho_{B, T} =\rho_{B,0} + \operatorname{Tr}_{{A},\mathcal{F}} \rho_T^{(2)}+ \operatorname{Tr}_{\mathcal{A},\mathcal{F}} \rho_T^{(4)} + \mathcal{O}(\lambda^6)
\end{equation}

The dependence of Bob's output density matrix on the elements of Alice's input density matrix is captured by the quantum channel $\xi$ from \eq{eq:channel}.
\begin{align}
\xi \left[ \rho_{A, 0} \right] = \rho_{B, T}
\end{align}•
Denoting Alice's initial density matrix as
\begin{align}\label{eq:defnrhoA}
\rho_{A,0} &= \theta \ket e \bra e + \gamma \ket e \bra g + \gamma^* \ket g \bra e + \beta \ket g \bra g\nonumber\\
&= \begin{pmatrix} \theta & \gamma \\ \gamma^* & \beta \end{pmatrix},
\end{align}
it's general structure   is given by \cite{mathieuachim1}
\begin{align}\label{eq:chanstruct}
\xi \left[ \begin{pmatrix}
\theta & \gamma \\ \gamma^* & \beta \end{pmatrix} \right]
&= \begin{pmatrix}
P & 0 \\ 0 & 1-P
\end{pmatrix} \nonumber\\
&\qquad + \begin{pmatrix} \theta A +\beta B & \gamma C + \gamma^* D^* \\ \gamma^* C^* +\gamma D & -\theta A - \beta B
\end{pmatrix}.
\end{align}

 The term $P$ accounts for the  noise observed by Bob and is independent of the presence of Alice's detector. Indeed, it is not affected by the elements of the density matrix of $\mathcal{A}$ in \eqref{eq:chanstruct}.
The terms that account for the influence of detector $\mathcal{A}$ on $\mathcal{B}$ are those labeled $A,B,C$ and $D$.
$A, B$ and $P$ are real, while $C$ and $D$ are complex. They depend on the parameters of the detectors  and cavity and the switching function. Their lowest order contributions are:
\begin{align}
\label{eq:P}P&= \lambda_\mathcal{B}^2 \,  P_2 + \lambda_\mathcal{B}^4 \, P_4 +\mathcal{O}(\lambda_\mathcal{B}^6)\displaybreak[0]\\
\label{eq:A}A&=\lambda_\mathcal{A}^2 \lambda_\mathcal{B}^2 \, A_4+\mathcal{O}(\lambda^6)\displaybreak[0]\\
\label{eq:B} B&=\lambda_\mathcal{A}^2 \lambda_\mathcal{B}^2 \, B_4+\mathcal{O}(\lambda^6)\displaybreak[0]\\
\label{eq:C}C&= \lambda_\mathcal{A} \lambda_\mathcal{B} \, C_2 + \mathcal{O}(\lambda^4)\displaybreak[0]\\
\label{eq:D} D&=\lambda_\mathcal{A} \lambda_\mathcal{B} \, D_2 + \mathcal{O}(\lambda^4)
\end{align}
Here again the symbol $\mathcal{O}(\lambda^n)$ stands for the combined powers of the two coupling constants. The expressions for $C_2,D_2,A_4,B_4,P_2$ and $P_4$ are rather complex and are given in appendix \ref{AppA} where some interesting points about their mathematical form are also discussed.

We can understand both the general structure of the channel and the form of the individual terms by discussing how they originate from \eq{eq:rhobout}.

Every term $U^{(k)}$ in the expansion of the time evolution operator in \eqref{eq:pert} can be expanded into $2^k$ summands, by using that the interaction Hamiltonian \eqref{hamilto} is the sum $H_I = H_{\mathcal{A},I} +H_{\mathcal{B},I}$ of the interaction Hamiltonian for each of the detectors. Accordingly, each $\rho_T^{(k)}$ can be written as a sum of terms sorted by their orders in the coupling constants $\lambda_\mathcal{A}$ and $\lambda_\mathcal{B}$

 In this fashion, the lowest order contribution to $\rho_{B,T}$, which reads
\begin{eqnarray}\label{eq:rbt2}
\rho_{\mathcal{B},T}^{(2)} &=&  \operatorname{Tr}_{\mathcal{A},\mathcal{F}} \, \rho_T^{(2)} \nonumber\\ &=&\operatorname{Tr}_{\mathcal{A},\mathcal{F}} \left[ U^{(1)}\rho_0{U^{(1)}}^\dagger+U^{(2)}\rho_0+\rho_0{U^{(2)}}^\dagger \right],
\end{eqnarray}
contains terms of order $\mathcal{O}(\lambda_\mathcal{A}^2), \, \mathcal{O}(\lambda_\mathcal{B}^2)$ and $\mathcal{O}(\lambda_\mathcal{A} \lambda_\mathcal{B})$.

The terms of order $\mathcal{O}(\lambda_\mathcal{A}^2)$ do not contribute to $\rho_{B,T}$  because they cancel out when the partial trace over detector $\mathcal{A}$ is taken.  This holds true for all terms that do not contain any power of $\lambda_\mathcal{B}$, hence no terms of order $\mathcal{O}(\lambda_\mathcal{A}^n)$ contribute to $\rho_{B,T}$.

The terms of order $\mathcal{O}(\lambda_\mathcal{B}^2)$ contribute to either the upper or to the lower diagonal element of $\rho_{B,T}$. The contribution of this kind originating from $U^{(1)} \rho_0 {U^{(1)}}^\dagger$ is proportional to $\proj{e_\mathcal{B}}{e_\mathcal{B}}$, while the $\mathcal{O}(\lambda_\mathcal{B}^2)$ contribution  from $U^{(2)}\rho_0+\rho_0{U^{(2)}}^\dagger$ leads to terms that are proportional to $\proj{g_\mathcal{B}}{g_\mathcal{B}}$.  Although they come with different integral structures, the coefficients of these matrix elements are equal up to an overall sign. They both constitute $P_2$, the lowest order contribution to $P$.

It is important to remark that,  as mentioned above, $P$ is nothing but the excitation probability of the single detector in the quantum vacuum. This quantum noise term is  independent of the presence of the second detector and it contains only  terms of order $\mathcal{O}(\lambda_\mathcal{B}^n)$.

Any terms that describe an interaction between the two detectors have to contain powers of both coupling constants, i.e., they are $\mathcal{O}(\lambda_\mathcal{A}^i \lambda_\mathcal{B}^j)$.

The terms of order $\mathcal{O}(\lambda_\mathcal{A}^i \lambda_\mathcal{B}^j)$, with $i$ and $j$ odd, always appear multiplied by $\gamma$ or $\gamma^*$ (off-diagonal elements of A's initial state) and  $\proj{e_\mathcal{B}}{g_\mathcal{B}}$ or $\proj{g_\mathcal{B}}{e_\mathcal{B}}$ (off-diagonal elements of B's final state), so they contribute to the factors $C$ or $D$, which couple the off-diagonal elements of $\rho_{\mathcal{A},0}$ and $\rho_{B,T}$ as we see in the general structure of the quantum channel \eqref{eq:channel}.

This means that the terms of order  $\mathcal{O}(\lambda_\mathcal{A} \lambda_\mathcal{B} )$ from \eqref{eq:rbt2} are the lowest order terms that account for any signalling from A to B if the initial state of Alice's detector is such that $\gamma\neq0$.

As all the terms contributing to $\rho_{B,T}$ are of even (combined) powers in the coupling constant, the only other class of terms contributing to the channel are of order $\mathcal{O}(\lambda_\mathcal{A}^i \lambda_\mathcal{B}^j)$, with both $i$ and $j$ even. These terms couple the diagonal terms of both density matrices and hence contribute to the factors $A$ and $B$ in \eqref{eq:channel}. The lowest order terms in this class are of order $\mathcal{O}(\lambda_\mathcal{A}^2 \lambda_\mathcal{B}^2)$ given in \eqref{eq:A} and \eqref{eq:B}.

These observations have implications for the study of the causal behaviour of the setting. As mentioned above,  the leading contribution in order to study causality  depend on the initial state of the atoms and will, in general, be of order $\mathcal{O}(\lambda^2)$.  However, in the particular case where the initial density matrix of $\mathcal{A}$ is diagonal as, for instance, in the Fermi problem, the causal contributions are only of order $\mathcal{O}(\lambda^4)$ in the coupling strength and can hence be overpowered  by the noise term $P$, which is of second order. We will discuss this  more deeply below.

\section{Study of the quantum channel}

In the following we study the quantum channel \eqref{eq:chanstruct} between two detectors inside a cavity in different communication settings by  evaluating the leading order contributions to the factors $P, A, B, C, D$.

 As discussed previously, we know that for the model to be causal we need to consider the infinite number of field modes in the cavity. This is both unpractical and physically weakly founded since realistic cavities are not good cavities for the whole frequency spectrum. That seems to imply that the usual light-matter interaction model in cavities  violates causality and might therefore fail to describe the real light-matter interaction in realistic  cavities, above all if we are concerned with the transmission of information.

Nevertheless, we know from quantum optics that models of cavities with a finite (and  often small) number of levels provide a very good approximation to the experimental phenomenology \cite{ScullyBook}. How good this approximation is depends on the timescales considered in the experiment, as discussed in the introduction.

Here we are interested in how the magnitude of the imposed UV-cutoff, i.e., the number of field modes that are taken into account, affects the accuracy with which causality is respected by the model.  In other words, we will study the magnitude of faster-than-light error terms as a function of the UV-cutoff.

As a first setting, we will consider what we will call the Fermi problem scenario, i.e., we study signalling from detector $\mathcal{A}$ to detector $\mathcal{B}$ under the condition that the initial state of the first detector is either the ground or the excited state. Although it appears to be a very natural choice to use the energy eigenstates for signalling, we know from the previous section that these signalling terms are suppressed by two orders in the coupling constant: here, the effect on Bob's detector is only of order $\mathcal{O}(\lambda^4)$, whereas the effect is of order $\mathcal{O}(\lambda^2)$ for any other set of pure input states.

To illustrate this, we will consider a second scenario where detector $\mathcal{A}$ initially is prepared in either the state
\begin{equation}
\ket{+}=\frac{1}{\sqrt{2}}\left(\ket{g} +\ket{e}\right)
\end{equation}
or
\begin{equation}
\ket{-}=\frac{1}{\sqrt{2}}\left(\ket{g} -\ket{e}\right).
\end{equation}

In what follows we use natural units $\hbar = c =1$ and consider a massless Klein-Gordon field inside a one-dimensional cavity. Hence $\omega_j = k_j = j \pi / L$ in \eqref{hamilto}.
Also we choose both detectors to be resonant with a field mode, so $\Omega_\mathcal{A} = \Omega_\mathcal{B} = \omega_n$ for some given resonance mode number $n$.

The detectors are switched on and off sharply at $t=0$ and $t=T$ respectively, i.e., the switching function is defined to be $\chi(t) = 1$ for $t \in (0,T)$ and vanish at all other times. Under  these conditions the perturbative terms in \eqref{eq:P}, \eqref{eq:A}, \eqref{eq:B}, \eqref{eq:C}, \eqref{eq:D} are analytically integrable (although very involved to obtain).  Even though different switching protocols could be considered, to have detector $\mathcal{B}$ switched in parallel with the first detector is the most conservative setting in order to detect any error terms that would propagate signals from $\mathcal{A}$ to $\mathcal{B}$ outside the lightcone.

 \begin{figure}[htb]
\includegraphics[width=0.48\textwidth]{fig1b.pdf}
  \caption{(Color online) Leading order contribution $P_2$ to the single detector excitation probability \eqref{eq:P} for a detector at $x_b$ in a cavity of length $L=10$. The detector is resonant to the fourth  field mode ($n=4$). The contribution $P_2$ is periodic with a periodicity of $T_\text{per} = 2L$. The number of valleys in every period is equal to $n$.
 For the calculation a cutoff of $N_C=100$ modes was used. (All plotted quantities are dimensionless.)
}
  \label{fig:P2}
\end{figure}

Before we study the influence of detector $\mathcal{A}$ on the final state of $\mathcal{B}$ we review the contribution to $\rho_{\mathcal{B},T}$ in \eqref{eq:chanstruct} which is independent of the presence of detector $\mathcal{A}$. This is the term $P$ in \eqref{eq:P} which captures the probability of the single detector $\mathcal{B}$ to get excited on its own due to the switching, i.e., which captures its vacuum noise.

 Figure \ref{fig:P2} shows the lowest order contribution $P_2$ to the single detector excitation probability which is mostly induced from the vacuum due to the sudden switching. It is non-negative and periodic with a periodicity of $T_\text{per}=2 L$, which is twice the cavity crossing time.
When the detector is tuned resonant to a field mode with an even mode number $n$ (as in the figure), the term $P_2$ peaks at the light-crossing time of the cavity for a detector positioned at the middle of the cavity. If $n$ is odd $P_2$ vanishes here. The number of valleys per period along the $T$-axis is equal to the resonance mode number $n$. The contribution of the non-resonant modes is what makes the probability non-zero in these valleys.

In figure \ref{fig:A4B4P4}, one example of the second order contribution $P_4$ is plotted.
$P_4$ captivates the probability of a single detector to get excited and deexcited again during the interaction interval. Hence it gives a non-positive correction to the single detector excitation probability.

All other contributions to $\rho_{\mathcal{B},T}$ depend on the initial state of  Alice's detector.

As pointed out above, in the Fermi problem the contribution of $\mathcal{A}$ to the state of $\mathcal{B}$ appears only in the diagonal elements of Bob's density matrix. Hence, as discussed earlier, in the Fermi problem the signalling terms which are of order $\mathcal{O}(\lambda^4)$ compete directly with the single detector excitation probability $P \sim \mathcal{O}(\lambda^2)$ which might on the one hand masks any effects of causality violations in the probability of excitation of Bob and on the other hand hinders the ability of Alice to signal Bob.

In the second example that we will consider by measuring in the $\{\ket{+}, \ket{-}\}$ basis Bob can detect the $\mathcal{O}(\lambda^2)$ effect of Alice's input  without any influence of $P$ at all on the measurement outcomes. This effect will be relevant if we want to use the field to transmit information from Alice to Bob.

\subsection{Signalling in the Fermi problem}
We can analyze the Fermi problem, i.e., the question of how the excitation probability of detector $\mathcal{B}$, which starts out in the ground state at $t=0$, is affected by the presence of the other detector starting out in its excited state. From \eqref{eq:chanstruct} we see that the detector $\mathcal{B}$ ends up in the state
\begin{equation}
\xi \left( \proj{e_\mathcal{A}}{e_\mathcal{A}} \right) = \begin{pmatrix}
P+A & 0 \\ 0 & 1-P-A
\end{pmatrix}.
\end{equation}
So the factor $A$ describes the probability for the detector $\mathcal{B}$ to become excited due to the presence of the initially excited detector $\mathcal{A}$.
If we compare this output to the case where the detector $\mathcal{A}$ is initially prepared in its ground state,
\begin{equation}
\xi \left( \proj{g_\mathcal{A}}{g_\mathcal{A}} \right) = \begin{pmatrix}
P+B & 0 \\ 0 & 1-P-B
\end{pmatrix},
\end{equation}
we see that $B$ describes the contribution to the probability of finding detector $\mathcal{B}$ excited after the interaction due to the presence of the other detector starting out in the ground state.

 \begin{figure}[htb]
\includegraphics[width=0.48\textwidth]{A4B4P4}
  \caption{(Color online) Numerical values of the $\mathcal{O}(\lambda^4)$ coefficients defined in \eqref{eq:A},\eqref{eq:B} and \eqref{eq:P} for the quantum channel in the Fermi problem. The length of the cavity is $L=10$ and the distance between the two detectors is $|x_\mathcal{A} - x_\mathcal{B} | =2$. (All plotted quantities are dimensionless.)}
  \label{fig:A4B4P4}
\end{figure}

As we have seen in \eqref{eq:A} and \eqref{eq:B}, the factors $A$ and $B$ are of order $\mathcal{O}(\lambda^4)$. I.e., if Alice wants to send a message, or just a single bit, to Bob and tries to encode it by either preparing her detector in the ground or excited state initially, she only influences Bob's final measurement result at fourth order $\mathcal{O}(\lambda^4)$ in the coupling constant.

In figure \ref{fig:A4B4P4}, one example of the lowest order contributions to $A$ and $B$ is plotted. The general behaviour is that $A_4$ is non-negative and grows faster with the switching length $T$ than the other contributions of order $\mathcal{O}(\lambda^4)$, whereas $B_4$ is oscillating.

We also see that $A_4$ and $B_4$ vanish outside the lightcone, i.e., for switching times $T<|x_\mathcal{A}-x_\mathcal{B}|$ smaller than the distance between the two detectors. Of course this is necessary to prevent superluminal signalling: If $A$ or $B$ were not to vanish for $T<|x_\mathcal{A}-x_\mathcal{B}|$ then the state of detector $\mathcal{B}$ at time $t=T$ would be influenced by the the state of detector $\mathcal{A}$ at $t=0$, and thus retrieve information about the initial state of  $\mathcal{A}$, although no light signal could have reached $\mathcal{B}$ within this time.

It was shown in \cite{mathieuachim1} that the quantum channel $\xi$ is causal in the continuum scenario at leading order in perturbation theory. All the factors $A,B,C$ and $D$ in \eqref{eq:chanstruct} vanish outside the lightcone, which relies on the property of the field commutator to vanish for spacelike separations.

This also holds in the cavity if all (infinite) field modes are taken into account. However, when a UV-cutoff  is introduced such that only a finite number of modes $N_C$ are taken into account, the commutator does not vanish outside the lightcone any longer. Hence a model with only a finite number of field mode also predicts that superluminal signalling between two detectors is possible for certain settings. In the following we want to investigate how these acausalities depend on the number of modes $N_C$ and how the model of light-matter interaction behaves more and more causally with increasing cutoffs to a point where the predicted acausal behaviour would be undetectable in practice.

 \begin{figure}[htb]
\includegraphics[width=0.48\textwidth]{A4NC}
  \caption{(Color online) Numerical values of the lowest order contribution $A_4$ from \eqref{eq:A} to the signalling term in the Fermi problem for two detectors separated by $|x_A-x_B|=5$ for different switching times $T$, depending on the number of modes below the cutoff $N_C$. The biggest contribution are acquired around the resonance mode number $n=15$. For $N_C > n$ the results oscillate around a limiting value which is approached for higher cutoffs.  For the lowest switching time the detectors are spacelike separated during the interaciton with the field, hence no signalling is possible. (All plotted quantities are dimensionless.)}
  \label{fig:A4ofNC}
\end{figure}

Figure \ref{fig:A4ofNC} illustrates how the result obtained for the coefficient in the channel, in this case of $A$, improve with the number of modes $N_C$ taken into account. As expected the main contribution to the coefficient originate from the mode to which the detectors are resonant. For cutoffs $N_C>n$ larger than the resonance mode the results begin to converge toward a limit in an oscillating manner. In figure \ref{fig:A4ofNC} this limit is positive because $T$ is chosen to be larger than the distance between the operators so that signalling is possible. If we have $T\leq |x_\mathcal{A}-x_\mathcal{B}|$ then the results for $A_4$ converge to zero.

\subsubsection*{Non-causal error terms decay with a power law in UV cutoff}

 \begin{figure}[htb]
\includegraphics[width=0.48\textwidth]{A4T}
  \caption{(Color online) The signalling term $A_4$ from \eqref{eq:A} in the Fermi problem for two detectors at a distance of $|x_\mathcal{A} - x_\mathcal{B} | =2$ for different switching times $T$ for increasing cutoffs at $N_C$. The dashed line indicates the lightcone. In general the values of $A_4$ inside the lightcone grow towards the lightcone. Hence to check the level of causality violation for a specific cutoff the value on the lightcone, i.e.,  for a switching time $T= |x_\mathcal{A} - x_\mathcal{B}|$ is relevant. (All plotted quantities are dimensionless.)}
  \label{fig:A4ofT}
\end{figure}

The most relevant figures are Fig. \ref{fig:A4ofT} and \ref{fig:A4max}. There we study the behaviour of $A_4(T)$ in the proximity of the light cone as the UV cutoff $N_C$ is increased.

In figure \ref{fig:A4ofT}, we see that for low values of $N_C$ the contribution $A_4$ is not vanishing for switching times $T<|x_\mathcal{A}-x_\mathcal{B}|$ shorter than the distance between the detectors. This would allow for superluminal signalling. Only with increasing $N_C$ the graph approaches the exact limit and causal behaviour is restored. We also observe in figure \ref{fig:A4ofT} that the values outside of the lightcone, i.e., for switching times $T<|x_\mathcal{A}-x_\mathcal{B}|$, grow with increasing switching times $T$.  Hence the lightcone where the switching time $T=|x_\mathcal{A}-x_\mathcal{B}|$ equals the distance between the detectors marks a critical case which we can use to quantify the violation of causality in a model with UV-cutoff: To avoid superluminal signalling the coefficients of the channel in \eqref{eq:chanstruct}, like $A$, have to vanish on
the lightcone. As the value of $|A_4(T)|$ for a fixed cutoff $N_C$ is larger on the lightcone than further outside the lightcone, we can take $|A_4(T=|x_\mathcal{A}-x_\mathcal{B}|)|$ as a measure for the violation of causality.

In other words, given that the coefficients $A,B,C,D$ are smooth functions of time, their being zero outside the light cone implies that their value is also zero right on the light cone. If we are looking for an estimation of how big the   acausal error in signalling is  for a finite number of modes $N_C$, we can analyze the value of the contributions of Alice's detector initial state to Bob's detector right on the light cone, since this is the most conservative scenario.

\begin{figure}[htb]
\includegraphics[width=0.48\textwidth]{A4loglog}
  \caption{(Color online) The plot shows $\max_{N\geq N_C} |A_4(N)|$, the maximum value of the signalling term $A_4$ from \eqref{eq:A} on the light cone  \mbox{$|A_4(T=|x_\mathcal{A}-x_\mathcal{B}|)|$} obtained for any higher cutoff, i.e., for any number of modes $N\geq N_C$ larger than or equal to $N_C$.
For different $n$ the modes have been normalized as explained in the text.
The values of $|A_4|$ on the lightcone, i.e., for $T=|x_\mathcal{A}-x_\mathcal{B}|$ approach zero following a power law for large numbers of modes $N_C$. (All plotted quantities are dimensionless.)
}
  \label{fig:A4max}
\end{figure}

Because of the oscillating behaviour that we observed in figure \ref{fig:A4ofNC} for large cutoffs, it is not convenient to directly compare values of $|A_4(T=|x_\mathcal{A}-x_\mathcal{B}|)|$ obtained for different values of $N_C$ to each other directly. Instead, in figure \ref{fig:A4max}, for a given cutoff $N_C$, we plot the maximum value obtained for $|A_4(T=|x_\mathcal{A}-x_\mathcal{B}|)|$ for any cutoff $N$ larger than or equal to $N_C$.

Notice that for all switching times $T$ the value of $A_4(T)$ depends also on the mode $n$ with which the detectors are resonant. In general, all contributions to the channel coefficients $A, B, C, D$ and $P$ in \eqref{eq:chanstruct} tend to be smaller for higher mode numbers $n$.  Therefore, in order to be able to compare the values for detectors being resonant with different modes $n$  on equal footing,  in figure \ref{fig:A4max}, we show the value of the $A_4$ term on the light cone divided by the respective value of $A_4$ for each $n$ at a time inside the lightcone. Hence we are computing the relative magnitude of the faster-than-light signalling signature as compared to the causal signal.
In particular, the values in figure \ref{fig:A4max} have been normalized by the respective value of $|A_4(T=\frac32 |x_A-x_B|, N_C=100)|$.

Interestingly, we observe that this value decays following a power law for cutoffs $N_C$ well above the resonance mode $n$.

The asymptotic power of this decay is  the same for different choices of the mode the detectors are tuned to be in resonance with. Similarly, the distance between the two detectors and their positioning inside the cavity do not change the slope of the decay, but only shift the asymptotic behaviour along the $y$-axis in a double-logarithmic plot as in figure \ref{fig:A4max}. This shift in the double-logaritmic plot corresponds to a multiplying factor in front of the functional relation between $N_C$ and $A_4$.

The power law decay can be traced back to the structure of $A_4$ as it is given in equation \eqref{eq:Aa} of the appendix. Inside the cavity the 2-point function of the field is given by a sum with a single contribution from each field mode. Hence the 4-point function which occurs in $A_4$ is given by a twofold sum with two summation variables running over all the field modes, because the 4-point function can be expressed in terms of 2-point functions in the usual way. For each term in this sum the time integrations of equation  \eqref{eq:Aa} lead to a polynomial in the summation variables (with the physical parameters and trigonometric functions as coefficients) which is divided by a common denominator. This denominator is itself a polynomial in the summation variables. Hence for higher cutoffs the asymptotic power law behaviour should emerge from the leading behaviour of the polynomial fraction for high values of the summation variables.

\subsection{Signalling using $\{\ket{+}, \ket{-}\}$ encoding}\label{sec:pmcoding}

We will discuss here how the use of $\ket{+}$ and $\ket{-}$ states can lead to a large improvement in the ability of Alice to signal Bob through the field as compared to preparing Alice's detector in the ground or excited states.

In \eqref{eq:chanstruct} we see that the off-diagonal elements of $\rho_{T,B}$ are given by products of the factors $C$ and $D$ (and their complex conjugates) with the off-diagonal elements $\gamma$ and $\gamma^*$ of $\rho_{A,0}$. So in general (i.e.,  unless $\rho_{\mathcal{A},0}$ is diagonal) the initial state of detector $\mathcal{A}$ has an influence on the final state of detector $\mathcal{B}$ at  second order in the coupling strength, because $C,D \sim \mathcal{O}(\lambda^2)$. However to make use of this effect, e.g., for signalling, the off-diagonal element of the input state $\gamma$ has to be large and on the recipients side, the off-diagonal elements of $\rho_{\mathcal{B},T}$ have to be measured.

As a simple example for this we look at the following protocol: Just as before,the system is assumed to start out in the state \eqref{eq:instate}, i.e., the field is prepared in the vacuum, detector $\mathcal{B}$ in its ground state and detector $\mathcal{A}$ in an arbitrary state
\begin{equation}
\rho_{\mathcal{A},0}= \begin{pmatrix}
\theta & \gamma \\ \gamma^* & \beta \end{pmatrix}.
\end{equation}
After the interaction has taken place between $t=0$ and $T=0$ a measurement on detector $\mathcal{B}$ is performed in the $\{\ket{+}, \ket{-}\}$ basis.

\begin{equation}\label{eq:pmstates}
\ket{\pm} = \frac{1}{\sqrt{2}} \left(\ket{g} \pm \ket{e} \right)
\end{equation}
we find that the projectors onto these two states are given by
\begin{equation}
P_\pm (t=0) = \proj{\pm}{\pm}= \frac12 \begin{pmatrix} 1 & \pm 1 \\ \pm 1 & 1 \end{pmatrix}  .
\end{equation}
Because we work in the interaction picture $P_\pm$ needs to be evolved with the corresponding free Hamiltonian.
\begin{multline}
P_\pm(t)= \exp(\mathrm{i} H_0^{(\mathcal{D})} t) \, P_\pm(t=0) \, \exp (-\mathrm{i} H_0^{(\mathcal{D})} t) \\ = \frac12 \begin{pmatrix}
1 & \pm e^{\mathrm{i} \Omega_\mathcal{D} t} \\ \pm e^{-\mathrm{i} \Omega_\mathcal{D} t}  & 1
\end{pmatrix}
\end{multline}
So for $t>T$ the probability to find detector $\mathcal{B}$, e.g.,  in the $\ket{+}$-state is given by:
\begin{equation}
\operatorname{Tr} \left( P_+(t)  \rho_{T,B} \right) = \frac12 + \text{Re} \left( (\gamma C +\gamma^* D^*) \, e^{-\mathrm{i} \Omega_\mathcal{B} t} \right)
\end{equation}
It is interesting to note, that this detection probability is completely independent of all other terms occuring in the general form of the channel. It is independent of $A$ and $B$ and hence from the diagonal elements of $\rho_{A,0}$ and the single detector excitation probability $P$ does not have any influence either.

This could be of use for signalling between the two detectors: Say the detector $\mathcal{A}$ was intially prepared in the $\ket{+}$-state, for which $\gamma=\frac12$ or the $\ket{-}$-state, for which $\gamma=-\frac12$. Then for a given set of parameters, i.e., if $C$ and $D$ are known, the time point of the measurement on detector $\mathcal{B}$ can be chosen such, that the probability to find detector $\mathcal{B}$ in the $\ket{+}$-state is given by
\begin{equation}\label{eq:pmprob}
p\left(\mathcal{B}=\ket{+} | \mathcal{A}=\ket\pm\right) = \frac12 \pm \left| C + D^*\right|.
\end{equation}
Figure \ref{fig:C2D2} plots one example of the lowest order contributions to this probability.

\begin{figure}[htb]
\includegraphics[width=0.48\textwidth]{C2D2T}
  \caption{(Color online) Plot of $|C_2 + D_2^*|$ as defined in \eqref{eq:C}, \eqref{eq:D}, the lowest order contribution to the detection probability in \eqref{eq:pmprob}, for different cutoffs $N_C$. The detectors are located at a distance of $|x_A - x_B| =2$. The dashed line indicates the lightcone. The use of $\ket\pm$-states enhances signalling by two orders of magnitude in the coupling constant as compared to the use of energy eigenstates. (All plotted quantities are dimensionless.)
}
  \label{fig:C2D2}
\end{figure}

The fact that $C,D\sim\mathcal{O}(\lambda^2)$ and that the detection probabilities \eqref{eq:pmprob} are independent of the other factors in the channel \eqref{eq:chanstruct} indicates that the protocol outlined above should allow for much enhanced signalling as compared to the use of eigenstates like in the Fermi problem. Although the preparation and detection of $\ket{\pm}$-states might be experimentally more difficult than the use of energy eigenstates. However for the energy eigenstates the leading order contributions to the detection probabilities are of order $\mathcal{O}(\lambda^4)$ and furthermore they compete with the single detector excitation probability $P\sim\mathcal{O}(\lambda^2)$ which also contributes to the diagonal elements of $\rho_{\mathcal{B},T}$.

Figures \ref{fig:C2D2} and \ref{fig:C2D2NCloglog} show that the dependence of $|C_2 +D_2^*|$ on the size of the cutoff $N_C$ is similar to the behaviour obtained for the signalling term in the Fermi problem in the previous section. Figure \ref{fig:C2D2} illustrates the behaviour of close to the lightcone. If a too small number of modes are taken into account, the model is clearly inconsistent with causality but for higher and higher cutoffs the curve approaches the limit of full causality. In figure \ref{fig:C2D2NCloglog} we see that the errors again decay according to a power law, as already observed in the previous section.

 \begin{figure}[htb]
\includegraphics[width=0.48\textwidth]{C2D2loglog}
  \caption{(Color online) The plot shows $\max_{N\geq N_C} |C_2 (N)+D^*_2 (N)|$ on the light cone, i.e., for $T=|x_A-x_B|=5$. Analogous to figure \ref{fig:A4max}, also here the values for different $n$ have been normalized in order to be able to compare them better. Again we observe a power law decay for high cutoffs $N_C$. (All plotted quantities are dimensionless.)}
  \label{fig:C2D2NCloglog}
\end{figure}

\section{The channel in general scenarios and for arbitrary initial states of  $\mathcal{B}$}\label{sec:changen}
 After the previous analysis, one  may ask  how many of these results carry over to the continuum scenario and, additionally, what influence the initial state of detector $\mathcal{B}$ has as to which order in the coupling strength the signalling terms occur. So far we always assumed the initial state at $T=0$ to be of the form \eqref{eq:instate}: While detector $\mathcal{A}$ was free to be prepared in an arbitrary state, detector $\mathcal{B}$ always started out in its ground state $\rho_{\mathcal{B},0}=\proj{g}{g}$.

In this section we analyze the general structure of the quantum channel, analogously to \eqref{eq:chanstruct}, for arbitrary input states of detector $\mathcal{B}$. We find that the observations of the previous sections generalize. If $\mathcal{A}$ is prepared in an  eigenstate of the free Hamiltoinian, the influence of detector $\mathcal{A}$ on $\mathcal{B}$ is always suppressed by two orders of magnitude as compared to any other choice of pure input states.
The analysis and results of this section are as general as the introductory section \ref{sec:setting} and not restricted to fields inside a cavity, i.e., they equally apply to the light-matter interaction in the continuum scenario.

To allow arbitrary initial states for both detectors, we denote their initial density matrices as
\begin{equation}
\rho_{\mathcal{A},0} =\begin{pmatrix} \theta & \gamma \\ \gamma^* &  \beta \end{pmatrix},
\end{equation}
which is the same as in \eqref{eq:defnrhoA}, and
\begin{equation}
\rho_{\mathcal{B},0} = \begin{pmatrix} \varphi & \delta \\ \delta^* & \kappa
\end{pmatrix}.
\end{equation}
Now the initial state of the entire system consisting of the two detectors and the field, which starts out in the vaccuum, reads
\begin{equation}
\rho_0 = \rho_{\mathcal{A},0}\otimes\rho_{\mathcal{B},0}\otimes \proj{0}{0}.
\end{equation}
The question is now how the final state
\begin{equation}
\rho_{\mathcal{B},T}=\operatorname{Tr}_{\mathcal{A},\mathcal{F}} [\rho_T] = \operatorname{Tr}_{\mathcal{A},\mathcal{F}} \left[ U(T,0)\, \rho_T \,  U(T,0)^\dagger \right]
\end{equation}
of detector $\mathcal{B}$ depends on the elements of the inital density matrices. With the same kind of arguments as in section \ref{sec:setting}, that explained the structure of the channel in \eqref{eq:chanstruct}, and using the tracelessness and Hermiticity of the denisty matrix, we can deduce that the final state of detector $\mathcal{B}$ for general initial states of both detectors is of the form:

\begin{multline}\label{eq:chanstructgeneral}
\rho_{\mathcal{B},T}=\begin{pmatrix}
\varphi & \delta \\ \delta^* & \kappa
\end{pmatrix}+\begin{pmatrix}\kappa P + \varphi Q & \delta R + \delta^* S^* \\ \delta^* R^* +\delta S & -\kappa P -\varphi Q\end{pmatrix}\\
+ \gamma \begin{pmatrix} \delta I+\delta^* J & \kappa C+ \varphi G \\ \kappa D + \varphi H & -\delta I-\delta^* J  \end{pmatrix}\\
+ \gamma^* \begin{pmatrix}\delta J^* + \delta^* I^* & \kappa D^* + \varphi H^*\\ \kappa C^*+\varphi G^* &  -\delta J^* -\delta^* I^* \end{pmatrix}\\
+\theta \begin{pmatrix}
\kappa A+\varphi E & \delta K + \delta^* L^*\\ \delta L+\delta^* K^* & -\kappa A - \varphi E
\end{pmatrix}\\
+\beta \begin{pmatrix}
\kappa B+\varphi F & \delta M + \delta^* N^* \\ \delta N + \delta^* M^* & -\kappa B - \varphi F
\end{pmatrix}.
\end{multline}
Here $A,B,E,F,P,Q \in \mathbb{R}$ are real, whereas all other Latin letters stand for complex constants, that depend on the parameters, the geometry and the switching functions of the set-up. The constants $A,B,C,D,P$ are the ones which were already introduced in \eqref{eq:chanstruct}.

The constants multiplying $\gamma$ and $\gamma^*$, the off-diagonal elements of $\rho_{\mathcal{A},0}$, are all of order $\mathcal{O}(\lambda^2)$. Just as discussed for $C$ and $D$ earlier, all their perturbation expansion are of the form
\begin{equation}\label{eq:defn_ch_coefX}
X = \lambda_\mathcal{A} \lambda_\mathcal{B} X_2 +\mathcal{O}(\lambda^4), \text{ for } X= C,D,G,H,I,J.
\end{equation}
Whereas the terms that multiply the diagonal elements $\theta$ and $\beta$ of $\rho_{\mathcal{A},0}$ are of order $\mathcal{O}(\lambda^4)$.
\begin{equation}\label{eq:defn_ch_coefY}
Y = \lambda^2_\mathcal{A} \lambda^2_\mathcal{B} Y_4 + \mathcal{O}(\lambda^6), \text{ for } Y=A,B,E,F,K,L,M,N.
\end{equation}

 This means that signals that are encoded using energy eigenstates of the free detector are strongly suppressed as compared to any other choice of encoding.
This is because independently of the receiver's initial state, its final state is only influenced by the sender at order $\mathcal{O}(\lambda^4)$ with this encoding. That may be a problem for signal transmission because the quantum noise terms
\begin{equation}\label{eq:defn_ch_coefZ}
Z = \lambda_\mathcal{B}^2 Z_2 +\mathcal{O}(\lambda_\mathcal{B}^4) , \text{ for } Z=P,Q,R,S
\end{equation}
are of higher order in the coupling strength and might therefore overpower the signal. Hence, pure states with large off-diagonal elements, like the $\ket{\pm}$-states, should be a better choice for encoding, since they influence the receiver's final state at order $\mathcal{O}(\lambda^2)$. In this context, see also \cite{referee} where it was observed, studying correlation functions, that longitudinal correlations behave in a different way than transversal correlations.

In Appendix \ref{app:calc} we calculate the leading order terms in the perturbative expansion of Bob's final state \eqref{eq:chanstructgeneral}, i.e., all the $\mathcal{O}(\lambda^2)$ contributions to the coefficients in \eqref{eq:defn_ch_coefX} and \eqref{eq:defn_ch_coefZ}. All second order contributions to the coefficients in \eqref{eq:defn_ch_coefX} are found to have the same absolute value (see \eqref{eq:G2a} to \eqref{eq:J2a}). Therefore the perturbative expansion of Bob's final state \eqref{eq:chanstructgeneral} simplifies to
\begin{align}\label{eq:pertexpr2}
\rho_{\mathcal{B},T} &= \begin{pmatrix}\varphi & \delta \\ \delta^* &  \kappa \end{pmatrix} \nonumber\\
&\quad +\lambda_\mathcal{B}^2\begin{pmatrix} \kappa P_2 + \varphi Q_2 & \delta R_2 + \delta^* S_2^* \\ \delta^* R_2^* + \delta S_2 & -\kappa P_2 - \varphi Q_2\end{pmatrix}\nonumber\\
& \quad +\lambda_\mathcal{A} \lambda_\mathcal{B} \left[ \gamma \begin{pmatrix} \delta D_2 + \delta^* C_2 & (\kappa-\varphi) C_2  \\ (\kappa -\varphi) D_2  & - \delta D_2 - \delta^* C_2\end{pmatrix} + \text{H.c.}\right]\nonumber\\
&\quad +\mathcal{O}(\lambda^4).
\end{align}

From this we see that to leading order in perturbation theory the strength of any signal sent from detector $\mathcal{A}$ to $\mathcal{B}$ is characterized just by the two integral expression for $C_2$ in \eqref{eq:C2a} and for $D_2$ in \eqref{eq:D2a}.

The initial state of the receiving detector $\mathcal{B}$ is not of as fundamental importance as the initial state of the sender, because in general its final state is always affected at order $\mathcal{O}(\lambda^2)$. (Except, possibly, for an unfortunate choice of initial states which depends on the actual values of the channel constants $A,...,N$.) However, it is interesting to see that one observation from the previous subsection generalizes: The contributions to the off-diagonal elements of $\rho_{\mathcal{B},T}$ are proportional to the diagonal elements $\varphi, \kappa$ of the initial state $\rho_{\mathcal{B},0}$ of the detector $\mathcal{B}$ and vice versa. This suggests that to detect the signals sent from detector $\mathcal{A}$, the final measurement on the state of detector $\mathcal{B}$ should be done in a basis which is orthogonal to the initial state.

This was the case in the protocol analyzed in section \ref{sec:pmcoding}, where $\mathcal{B}$ started out in the ground state but was finally measured in the $\ket{+}/\ket{-}$-basis. And from \eqref{eq:pertexpr2} we see, that if $\mathcal{B}$ starts out in a state $\rho_{\mathcal{B},0}$ such that $\varphi=\kappa$, i.e., an equal-weight superposition of $\ket e$ and $\ket g$ like the $\ket\pm$ states, then the off-diagonal terms of $\rho_{\mathcal{B},T}$ vanish. Hence the final measurement has to be done in the energy eigenbasis which is orthogonal to the initial state.

\section{Conclusions}

In practice, it is desirable for computational efficiency to truncate the mode expansion of a field inside a cavity, but the truncated model, in principle, suffers from noncausal signalling. We set out to determine how many modes need to be taken into account for the model to preserve causal signalling as a function of the desired smallness of the acausal error terms. We found that these error terms decay with the increase of the number of modes according to a universal power law, i.e., according to a power law that is independent of the initial state and the detector parameters. This means that suitable `few-mode approximations'  can be used to reliably model light-matter interactions in cavities even in the short-time regime.

Additionally, we found that amplitude modulation is sub-optimal in the short-time regime. In fact, it is the least efficient way to code with an orthogonal pair of states. Concretely, we found that if amplitude modulation is used, i.e., when energy eigenstates of the free detector are used to encode the signal, then the signal travels from one detector to the other only from the fourth order, $\mathcal{O}(\lambda^4)$, in perturbation theory. If instead superpositions of these states are used then the initial state of Alice influences Bob's final measurement outcome already to second order $\mathcal{O}(\lambda^2)$, which is the lowest order at which causal influence of $\mathcal{A}$ on $\mathcal{B}$ can possibly manifest itself.
Since  the quantum noise also influences the detectors at order $\mathcal{O}(\lambda^2)$, a much better signal-to-(quantum)noise ratio is to be expected when coding with states other than $\ket{g},\ket{e}$.

As an illustrative example, we studied a protocol where $\ket\pm$-states where used to code the signal. We studied how the number of modes has to scale as a function of the desired accuracy with which causality is preserved and we found again that the scaling follows a certain power law. Finally we discussed that our results carry over to the case of Alice and Bob communicating through the exchange of quanta of a massless quantum field when the size of the cavity diverges, i.e., when one approaches a continuum of modes.

To draw our final conclusions, let us recall the communication regime that we here considered. It is the regime where the coupling constants are small and, crucially, it is the regime of the earliest possible times when the signal could be picked up by Bob. This suggests an intuition for why amplitude modulation is sub-optimal in that regime: if Alice used $\ket{ e}$ states to signal, the emission of her signal would tend to be delayed because of the time that it can take the state $\ket{e}$ to decay and therefore to emit a field quantum that Bob could receive. What we found is that in the early-time regime, i.e., within roughly the half-life of Alice's excited state, any other coding is more efficient, as it relies not on the emission and absorption of a field quantum but on the immediately-starting overall change of the system that occurs when the interactions are switched on.

\section{Outlook}

It should be very interesting to determine the change of the optimal coding scheme for communication through this channel
when moving from the early-time regime to the late-time regime.
Indeed, as figure \ref{fig:P2} shows, the noise term is bounded in time while one of the signalling terms when Alice uses amplitude coding, namely the term $A$, is growing in time. It grows even faster than the causal term, $C$, in the $\{\ket{+}, \ket{-}\}$ coding. Thus, even though $A$ is merely of fourth order in the coupling constant, given enough time it could in principle grow to the size of the term $C$ which is of second order in the coupling constant. The time scale at which this could happen is $T\approx \lambda^{-1}$, roughly the half lifetime of Alice's excited state. In this regime, when $T\lambda$ is no longer small,
the transition matrix elements of $-\mathrm{i} H_I T$ are no longer small, i.e., the perturbation theory that we have used so far then breaks down. Here, it should be very interesting to apply the recently-developed non-perturbative methods for detectors that are harmonic oscillators \cite{UdWGauss,Fuenetesevolution} in order to extend our present study into the nonperturbative regime.

Further, our results suggest to re-investigate the intriguing generalized Huygens principle which is also called the lacuna effect \cite{mclenaghan1969explicit,mclenaghan1982huygens}. The lacuna effect is a phenomenon in the theory of differential equations. It implies that massless classical fields such as classical light only propagate on the light cone itself but not inside the light cone, in 3+1 dimensions, but, crucially, not in all dimensions. This means that in 3+1 dimensions, Bob's detector should have to be switched on exactly when Alice's signal passes through. A little later and he misses the chance to receive it, even though Bob is timelike to Alice's emission.

With our new methods, and using pulsed switching of the detectors, it should be possible to model signalling using wave packets, to optimize the coding strategy and consequently to calculate the corresponding capacities explicitly. Once one can localize signal emission and absorption in time, it should then become possible to investigate the lacuna effect information theoretically, and perhaps gain new insight into the reasons for its mysterious dimension dependence. Notice that a connection between the Lacuna effect and the dimension-dependence of Hawking radiation has been proposed in \cite{ooguri1986spectrum}. There may well also exist a deep connection to studies of time-like vacuum entanglement, \cite{Olson2011,Olson2012,PastFutPRL}.

The communication channel that we study here can be considered to be the basic prototype for any communication between simple quantum systems through the exchange of field quanta. It should be very interesting, therefore, to study this channel in various key circumstances, for example, where Alice and/or Bob are accelerated, where there is curvature, a horizon or a potential, or in the presence of a dissipative environment.

It may also be of interest to extend this study to a scenario of quantum broadcasting, with many potential senders and receivers. Indeed, ultimately, thinking speculatively, any interaction between systems through the exchange of intermediate particles, including even the interactions among elementary particles, may become describable information theoretically, namely in terms of the flow of quantum information through those interactions.  This may be a desirable route to go because the unit of information, the qubit, is more robust than, for example, the units of mass or distance, which tend to loose their operational meaning in sufficiently extreme circumstances, such as in quantum gravity phenomena.

\section{Acknowledgements} The authors gratefully acknowledge support through the Ontario Trillium Scholarship and NSERC's Banting, Discovery and Canada Research Chairs Programs. AK acknowledges the kind hospitality during his sabbatical stay at the Centre for Quantum Computation \& Communication Technology at the University of Queensland.