# Variation of the centered maximal operator

Paul Hagelstein  Paul Hagelstein<EMAIL_ADDRESS>
Baylor University, Waco, Texas 76798, USA  ,  Dariusz Kosz  Dariusz Kosz
<EMAIL_ADDRESS>
Wrocław University of Science and Technology, 50-370 Wrocław, Poland  and
Krzysztof Stempak  Krzysztof Stempak<EMAIL_ADDRESS>
55-093 Kiełczów, Poland

###### Abstract.

Let $M$ denote the centered Hardy–Littlewood operator on $\mathbb{R}$. We
prove that

${\rm Var}(Mf)\leq{\rm
Var}(f)-\frac{1}{2}\big{|}|f(\infty)|-|f(-\infty)|\big{|}$

for piecewise constant functions $f$ with nonzero and zero values alternating.
The above inequality strengthens a recent result of Bilz and Weigt [4] proved
for indicator functions of bounded variation vanishing at $\pm\infty$. We
conjecture that the inequality holds for all functions of bounded variation,
which is a stronger version of the known conjecture ${\rm Var}(Mf)\leq{\rm
Var}(f)$. We also obtain the discrete counterpart of our theorem, moreover
proving a transference result on equivalency between both settings that is of
independent interest.

###### Key words and phrases:

Maximal operator, bounded variation.

###### 2020 Mathematics Subject Classification:

Primary 42B25; Secondary 26A45.

##  1\. Introduction

Regularity properties of maximal operators have been investigated in numerous
papers and various frameworks. Kinnunen [10] initiated the study of
boundedness of the Hardy–Littlewood maximal operator on the Sobolev spaces
$W^{1,p}(\mathbb{R}^{n})$ for $p\in(1,\infty)$. Subsequently, [10] was
complemented by Kinnunen and Lindqvist [11] to the setting of open subsets of
$\mathbb{R}^{n}$. See also Tanaka [16] for the case $p=1$ and $n=1$. Starting
from the Euclidean setting and the Hardy–Littlewood maximal operators, both
centered and uncentered, the study then encompassed their variants such as
fractional maximal operators or maximal operators of convolution type; see
[6], [7], [13], [14], and references therein. Also discrete analogues of these
operators were considered, and related questions in both settings have been
recently studied; see [15], [9], [5], [2], [8].

It was an important observation of Aldaz and Pérez Lázaro [1] that maximal
operators can actually improve the regularity of involved functions rather
than simply to preserve it. They also pointed out the role to be played by
variation when measuring the regularity. In particular, it was proved in [1]
that if $f\in{\rm BV}(\mathbb{R})$, then for the uncentered Hardy–Littlewood
maximal operator $\widetilde{M}$ the function $\widetilde{M}f$ is absolutely
continuous on $\mathbb{R}$ and ${\rm Var}(\widetilde{M}f)\leq{\rm Var}(f)$.
For the centered operator $M$, on the other hand, Kurka [12] proved

${\rm Var}(Mf)\leq C{\rm Var}(f),\qquad f\in{\rm BV}(\mathbb{R}),$

with some, quite large, $C>0$. It was conjectured that also in this case $C=1$
is enough, see e.g. [12, Section 1]. In the discrete case, i.e., for $f\in{\rm
BV}(\mathbb{Z})$ and the discrete counterpart of $M$, the same was
conjectured, see [3, Question B]. It is worth recalling the common truth that
the uncentered maximal operator has better regularity behavior than its
centered counterpart. Furthermore, the proofs of analogous results are usually
much subtle in the centered setting.

It seems that both conjectures, although reasonable and expected to be true,
do not take the full advantage of how the limits $f(\pm\infty)$ or
$F(\pm\infty)$ for $f\in{\rm BV}(\mathbb{R})$ or $F\in{\rm BV}(\mathbb{Z})$,
respectively, determine the limits $Mf(\pm\infty)$ or $MF(\pm\infty)$; see
Section 3. We thus propose the following strengthening.

######  Conjecture $\Delta$.

Suppose $f\in{\rm BV}(\mathbb{R})$. Then

(1.1) ${\rm Var}(Mf)\leq{\rm
Var}(f)-\frac{1}{2}\big{|}|f(\infty)|-|f(-\infty)|\big{|}.$

Our first main result, Theorem 1.1, supports this conjecture. We mention that
there is no need to formulate separately the discrete counterpart of
Conjecture $\Delta$, since by our second main result, Theorem 2.2, inequality
(1.1) and its discrete analogue are equivalent. Clearly, verification of
either version of the conjecture, continuous or discrete, reduces to
consideration of nonnegative functions. We shall prove that a certain further
reduction to nonnegative simple functions is available; see Proposition 2.3.
Finally, we show that the constants $1$ and $\frac{1}{2}$ in (1.1) are
optimal; see Section 4.

Let $\mathbb{K}$ be either $\mathbb{R}$ or $\mathbb{Z}$. For
$g\colon\mathbb{K}\to\mathbb{C}$ and any nonempty $E\subseteq\mathbb{K}$
define

${\rm Var}_{E}(g)\coloneqq\sup_{\text{monotone }\phi\colon\mathbb{Z}\to
E}\sum_{m\in\mathbb{Z}}\big{|}g\big{(}\phi(m+1)\big{)}-g\big{(}\phi(m)\big{)}\big{|},$

which we call the _variation of_ $g$ _over_ $E$. We write $g\in{\rm
BV}(\mathbb{K})$ when the _total variation_ ${\rm Var}(g)\coloneqq{\rm
Var}_{\mathbb{K}}(g)$ is finite. For each such $g$ the limits
$g(\pm\infty)\coloneqq\lim_{x\to\pm\infty}g(x)$ exist and, when
$\mathbb{K}=\mathbb{R}$, for each $x\in\mathbb{R}$ the one-sided limits
$g(x^{\pm})\coloneqq\lim_{y\to x^{\pm}}g(y)$ exist as well.

Recall the definition of the centered Hardy–Littlewood maximal operator $M$.
We set

$Mg(x)\coloneqq\sup_{r>0}\frac{1}{2r}\int_{x-r}^{x+r}|g|\quad\text{and}\quad
MG(n)\coloneqq\sup_{m\geq 0}\frac{1}{2m+1}\sum_{y=n-m}^{n+m}|G(y)|$

for any locally integrable $g\colon\mathbb{R}\to\mathbb{C}$ and
$x\in\mathbb{R}$, and for any $G\colon\mathbb{Z}\to\mathbb{C}$ and
$n\in\mathbb{Z}$. Of course, if $g\in{\rm BV}(\mathbb{R})$, then $g$ is
bounded, hence so is $Mg$. The same is true for $MG$ when $G\in{\rm
BV}(\mathbb{Z})$.

Our first main result says that (1.1) holds for a certain special class of
functions.

######  Theorem 1.1.

Let $-\infty<A<B<+\infty$, $a,b\in\mathbb{C}$,
$K\in\mathbb{N}\coloneqq\\{1,2,\dots\\}$, and
$\\{\alpha_{k}\\}_{1}^{K}\subset\mathbb{C}$ be given. For a system
$-\infty<A=t_{0}<t_{1}<\dots<t_{K}=B<+\infty$ define

$f(x)\coloneqq
a{\mathds{1}_{{(-\infty,A)}}}(x)+\sum_{k=1}^{K}\alpha_{k}{\mathds{1}_{{(t_{k-1},t_{k})}}}(x)+b{\mathds{1}_{{(B,\infty)}}}(x),$

for $x\in\mathbb{R}\setminus\\{t_{0},\ldots,t_{K}\\}$. Arbitrary values can be
set for $f(t_{0})$ and $f(t_{K})$, and also for $f(t_{k})$, $1\leq k\leq K-1$,
unless both $\alpha_{k}$ and $\alpha_{k+1}$ are different from $0$ when we set
$f(t_{k})=0$. Then

(1.2) ${\rm Var}(Mf)\leq{\rm Var}(f)-\frac{1}{2}\big{|}|a|-|b|\big{|}.$

Similarly, replacing the system of real numbers $\\{t_{k}\\}_{0}^{K}$ by a
system of integers $-\infty<A=n_{0}<n_{1}<\dots<n_{K}=B<+\infty$, and assuming
$\alpha_{k}\alpha_{k+1}=0$, $1\leq k\leq K-1$, define

$F(n)\coloneqq
a{\mathds{1}_{{(-\infty,A)}}}(n)+\sum_{k=1}^{K}\alpha_{k}{\mathds{1}_{{[n_{k-1},n_{k})}}}(n)+b{\mathds{1}_{{[B,\infty)}}}(n)$

for all $n\in\mathbb{Z}$. Then

(1.3) ${\rm Var}(MF)\leq{\rm Var}(F)-\frac{1}{2}\big{|}|a|-|b|\big{|}.$

Theorem 1.1 implies (1.2) or (1.3) for all indicator functions of bounded
variation, $f\colon\mathbb{R}\to\\{0,1\\}$ or $F\colon\mathbb{Z}\to\\{0,1\\}$,
respectively, thus strengthening [4, Theorems 1.1 and 1.3]. Notice a
_separation condition_ encoded in the considered systems $\\{t_{k}\\}_{0}^{K}$
and $\\{n_{k}\\}_{0}^{K}$, when we require either $f(t_{k})=0$, in some
circumstances depending on the behavior of $f$ around $t_{k}$, or
$\alpha_{k}\alpha_{k+1}=0$, respectively.

Throughout the paper, $I$ with possible subscripts affixed will denote an open
bounded interval on $\mathbb{R}$. Then $c(I),l(I),r(I)$ will be the center and
the left/right endpoint of $I$, respectively. As already mentioned, ${\rm
Var}$ with no subscripts, $\mathbb{R}$ or $\mathbb{Z}$, will denote the total
variation; it will be clear from the context to which situation this symbol
refers to. Appearance of a subscript will indicate that the variation is
related to a subset represented by this subscript.

##  2\. Transference

The main goal of this section is to prove a transference result, Theorem 2.2,
which seems to be of independent interest. We begin with a simple result that
exhibits a substantial improvement of regularity of $M$. Namely, given
$g\in{\rm BV}(\mathbb{R})$, not only does $Mg$ have one-sided limits at every
$x\in\mathbb{R}$ but it is one-sided continuous as well. Of course, the first
claim follows, since $Mg\in{\rm BV}(\mathbb{R})$, cf. [12], but we decided to
provide a short proof of this fact to make the whole argument self-contained.

######  Lemma 2.1.

For a generic function $g\in{\rm BV}(\mathbb{R})$ and $x\in\mathbb{R}$ the
limits $Mg(x^{\pm})$ exist and we have

(2.1) $Mg(x)=\min\\{Mg(x^{-}),Mg(x^{+})\\}.$

###### Proof.

We can assume $g\geq 0$. Regarding the existence of the limits, fix
$\varepsilon>0$ and take $\delta>0$ such that $|g(y)-g(x^{-})|<\varepsilon$
for $y\in(x-2\delta,x)$ and $|g(y)-g(x^{+})|<\varepsilon$ for
$y\in(x,x+2\delta)$. Let $\tilde{g}(y)$ be $g(x^{-})$, $g(x^{+})$, or $g(y)$,
if $y$ belongs to $(x-2\delta,x)$, $[x,x+2\delta)$, or
$\mathbb{R}\setminus(x-2\delta,x+2\delta)$, respectively. Then
$|Mg(y)-M\tilde{g}(y)|\leq\varepsilon$ for $y\in\mathbb{R}$. Note that
$M\tilde{g}=\max\\{M_{<\delta}\tilde{g},M_{\geq\delta}\tilde{g}\\}$, where
$M_{<\delta}$ and $M_{\geq\delta}$ allow only the centered intervals $I$ with
$|I|<2\delta$ and $|I|\geq 2\delta$, respectively. If $y\in(x,x+\delta)$, then

$M_{<\delta}\tilde{g}(y)=\max\Big{\\{}g(x^{+}),\frac{(\delta-y+x)g(x^{-})+(\delta+y-x)g(x^{+})}{2\delta}\Big{\\}},$

whereas if $x<y<z<x+\delta$, then

$|M_{\geq\delta}\tilde{g}(z)-M_{\geq\delta}\tilde{g}(y)|\leq\frac{(z-y){\rm
Var}(g)}{2\delta},$

since for $r\geq\delta$ we have

$\displaystyle\Big{|}\frac{1}{2r}\int_{z-r}^{z+r}\tilde{g}-\frac{1}{2r}\int_{y-r}^{y+r}\tilde{g}\Big{|}=\int_{y+r}^{z+r}\frac{|\tilde{g}(t)-\tilde{g}(t-2r)|}{2r}\,dt\leq\frac{(z-y){\rm
Var}(g)}{2r}\leq\frac{(z-y){\rm Var}(g)}{2\delta}.$

Thus, $\limsup_{t\to x^{+}}Mg(t)-\liminf_{t\to x^{+}}Mg(t)\leq 2\varepsilon$.
Analogously we show that $Mg(x^{-})$ exists.

Regarding (2.1), we have $Mg(x)\leq\min\\{Mg(x^{-}),Mg(x^{+})\\}$ by lower
semicontinuity of $Mg$. By using $Mg(x)\geq\frac{g(x^{-})+g(x^{+})}{2}$ and
$Mg(x^{-})\geq\max\\{g(x^{-}),\frac{g(x^{-})+g(x^{+})}{2}\\},$ and standard
symmetry arguments, we conclude that to show the opposite inequality it
suffices to prove the implication

$Mg(x^{-})>\max\Big{\\{}g(x^{-}),\frac{g(x^{-})+g(x^{+})}{2}\Big{\\}}\implies
Mg(x)\geq Mg(x^{-}).$

But if the left part above holds, then there is $\delta>0$ such that
$Mg(y)=M_{\geq\delta}g(y)$ for $y\in(x-\delta,x)$. Since like before
$|M_{\geq\delta}g(x)-M_{\geq\delta}g(y)|\leq\frac{(x-y){\rm Var}(g)}{2\delta}$
for all such $y$, the proof is concluded. ∎

Now, for $\mathbb{K}=\mathbb{R}$ or $\mathbb{K}=\mathbb{Z}$, and
$a,b\in\mathbb{C}$, define

${\rm BV}_{a}^{b}(\mathbb{K})\coloneqq\\{g\in{\rm
BV}(\mathbb{K}):g(-\infty)=a,\,g(+\infty)=b\\}.$

By $c(\mathbb{K})$ we denote the smallest value $c\in(0,\infty]$ such that

${\rm Var}(Mg)\leq c{\rm Var}(g),\qquad g\in{\rm BV}(\mathbb{K}),$

and by $C_{a}^{b}(\mathbb{K})$ we denote the largest value $C\in[0,\infty)$
such that

${\rm Var}(Mg)\leq c(\mathbb{K}){\rm Var}(g)-C,\qquad g\in{\rm
BV}_{a}^{b}(\mathbb{K}),$

with the convention $C_{a}^{b}(\mathbb{K})=0$ if $c(\mathbb{K})=\infty$.

The transference result that follows complements [4, Proposition 1.4]. We
include the potential case $c(\mathbb{K})=\infty$ to emphasize that the proof
works independently of whether $c(\mathbb{K})$ is finite or not. Nonetheless,
in [12] it was shown that $c(\mathbb{R})<\infty$, thus Theorem 2.2, even in
the weaker form with the additional assumption $c(\mathbb{K})<\infty$,
immediately gives $c(\mathbb{Z})<\infty$.

######  Theorem 2.2.

We have $c(\mathbb{Z})=c(\mathbb{R})$ and
$C_{a}^{b}(\mathbb{Z})=C_{a}^{b}(\mathbb{R})$ for all $a,b\in\mathbb{C}$.

###### Proof.

We first show $c(\mathbb{Z})\leq c(\mathbb{R})$ and $C_{a}^{b}(\mathbb{Z})\geq
C_{a}^{b}(\mathbb{R})$ by using a natural extension procedure, cf. [4, Lemma
4.1]. If $c(\mathbb{R})=\infty$, then $C_{a}^{b}(\mathbb{R})=0$ and there is
nothing to show. Assume therefore that $c(\mathbb{R})<\infty$. Given $G\in{\rm
BV}_{a}^{b}(\mathbb{Z})$, consider

$g\coloneqq\sum_{n\in\mathbb{Z}}G(n){\mathds{1}_{{[n-1/2,n+1/2)}}}.$

Then ${\rm Var}(g)={\rm Var}(G)$ so that $g\in{\rm BV}_{a}^{b}(\mathbb{R})$.
Moreover, $Mg(n)=MG(n)$ for $n\in\mathbb{Z}$, since in this case the averages
of $|g|$ over the centered intervals $I$ of length $|I|\in 2\mathbb{N}-1$
dominate the remaining ones. Thus, ${\rm Var}(MG)={\rm
Var}_{\mathbb{Z}}(Mg)\leq{\rm Var}(Mg)$ and the claimed inequalities follow.

In the opposite direction, we claim that $c(\mathbb{Z})\geq c(\mathbb{R})$ and
$C_{a}^{b}(\mathbb{Z})\leq C_{a}^{b}(\mathbb{R})$, and use a convenient
variant of a sampling procedure. Obviously, we can assume that
$c(\mathbb{Z})<\infty$. Given $g\in{\rm BV}_{a}^{b}(\mathbb{R})$ and
$\varepsilon>0$, in view of (2.1), there is
$N_{*}=N_{*}(\varepsilon)\in\mathbb{N}$ such that for $E_{N_{*}}\coloneqq
2^{-N_{*}}\mathbb{Z}\cap[-2^{N_{*}},2^{N_{*}}]$ we have

(2.2) ${\rm Var}_{E_{N_{*}}}(Mg)\geq{\rm
Var}(Mg)-\varepsilon\quad\text{or}\quad{\rm
Var}_{E_{N_{*}}}(Mg)\geq\varepsilon^{-1},$

depending on whether ${\rm Var}(Mg)$ is finite or not, respectively. For
$N\in\mathbb{N}$, let $M_{N}$ be the variant of $M$ allowing only the centered
intervals $I$ with $|I|\in(2\mathbb{N}-1)/2^{N}$. We have
$\lim_{N\to\infty}M_{N}g=Mg$ pointwise, since for $x\in\mathbb{R}$ and
$\delta>0$ there are $0<\rho_{1}<\rho_{2}<\infty$ such that
$\frac{1}{2\rho}\int_{x-\rho}^{x+\rho}|g|\geq Mg-\delta$ for all
$\rho\in[\rho_{1},\rho_{2}]$. Thus, there exists $N_{0}\in\mathbb{N}$ such
that ${\rm Var}_{E_{N_{*}}}(M_{N}g)\geq{\rm Var}_{E_{N_{*}}}(Mg)-\varepsilon$
for all $N\geq N_{0}$. Consider $\tilde{G}_{N}(n)\coloneqq
2^{N}\int_{(n-1/2)/2^{N}}^{(n+1/2)/2^{N}}|g|$ and $G_{N}(n)\coloneqq
2^{N}\int_{(n-1/2)/2^{N}}^{(n+1/2)/2^{N}}g$. Then

(2.3) $\max\\{{\rm Var}(\tilde{G}_{N}),{\rm
Var}(G_{N})\\}\leq\int_{-1/2}^{1/2}{\rm Var}_{(\mathbb{Z}+t)/2^{N}}(g)\,{\rm
d}t\leq{\rm Var}(g),$

so that $\tilde{G}_{N}\in{\rm BV}_{|a|}^{|b|}(\mathbb{Z})$ and $G_{N}\in{\rm
BV}_{a}^{b}(\mathbb{Z})$. Notice that $MG_{N}(n)\leq
M\tilde{G}_{N}(n)=M_{N}g(n/2^{N})$ for all $n\in\mathbb{N}$. Now, we show that
taking $N\geq\max\\{N_{*},N_{0}\\}$ large enough we obtain $MG_{N}(n)\geq
M\tilde{G}_{N}(n)-\varepsilon/(10N_{*}^{2})$ for all $n\in
E_{N_{*}}^{N}\coloneqq\\{2^{N}Q:Q\in E_{N_{*}}\\}\subset\mathbb{N}$. Given
$Q\in E_{N_{*}}$, we have

$|I_{Q}|^{-1}\int_{I_{Q}}|g|\geq
M\tilde{G}_{N}(2^{N}Q)-\varepsilon/(20N_{*}^{2})$

for some $I_{Q}$ centered at $Q$. For each $N$ large enough, let $I_{Q}^{N}$
be the longest interval centered at $Q$, contained in $I_{Q}$, with
$|I_{Q}^{N}|\in(2\mathbb{N}-1)/2^{N}$. Denoting
$g_{N}\coloneqq\sum_{n\in\mathbb{Z}}G_{N}(n){\mathds{1}_{{[(n-1/2)/2^{N},(n+1/2)/2^{N})}}}$,
we see that
$\lim_{N\to\infty}|I_{Q}^{N}|^{-1}\int_{I_{Q}^{N}}|g_{N}|=|I_{Q}|^{-1}\int_{I_{Q}}|g|$
by the dominated convergence theorem on $I_{Q}$, because $g$ is continuous
almost everywhere and bounded. Since
$MG_{N}(2^{N}Q)\geq|I_{Q}^{N}|^{-1}\int_{I_{Q}^{N}}|g_{N}|$ and $E_{N_{*}}$ is
finite, the desired bounds follow for some large $N\geq\max\\{N_{*},N_{0}\\}$.
Consequently,

(2.4) ${\rm Var}_{E_{N_{*}}}(Mg)-\varepsilon\leq{\rm
Var}_{E_{N_{*}}}(M_{N}g)={\rm Var}_{E_{N_{*}}^{N}}(M\tilde{G}_{N})\leq{\rm
Var}_{E_{N_{*}}^{N}}(MG_{N})+\varepsilon\leq{\rm Var}(MG_{N})+\varepsilon.$

Assuming ${\rm Var}(Mg)=\infty$ gives

$\varepsilon^{-1}\leq{\rm Var}_{E_{N_{*}}}(Mg)\leq{\rm
Var}(MG_{N})+2\varepsilon\leq c(\mathbb{Z}){\rm
Var}(g)-C_{a}^{b}(\mathbb{Z})+2\varepsilon,$

which contradicts our assumption $c(\mathbb{Z})<\infty$. Hence, we have ${\rm
Var}(Mg)<\infty$ (this includes the case $c(\mathbb{R})<\infty$), and applying
successively the first part of (2.2), (2.4), (2.3) for $G_{N}$, and the
definitions of $c(\mathbb{Z})$ and $C_{a}^{b}(\mathbb{Z})$, and then letting
$\varepsilon\to 0$, we verify the claim. ∎

Later on, we shall refer to the two methods from the proof of Theorem 2.2 as
to the _extension procedure_ and the _sampling procedure_ , respectively.

Below we show that proving Conjecture $\Delta$ reduces to consideration of
nonnegative simple functions. We call $G\in{\rm BV}(\mathbb{Z})$ _simple_ ,
abusing slightly the common terminology, if there exist $a,b\in\mathbb{C}$ and
$N\in\mathbb{N}$ such that $G(-n)=a$ and $G(n)=b$ when $n>N$. Similarly,
$g\in{\rm BV}(\mathbb{R})$ is _simple_ if $G(-x)=a$ and $G(x)=b$ when $x>N$,
and $g$ is constant on the intervals $[n-\frac{1}{2},n+\frac{1}{2})$,
$n\in\mathbb{Z}$.

######  Proposition 2.3.

Conjecture $\Delta$ is true if (1.1) is satisfied by nonnegative simple
functions.

###### Proof.

It is convenient to prove a version of the above for the discrete case,
$\mathbb{K}=\mathbb{Z}$, and then apply Theorem 2.2 and the extension
procedure to obtain the result for $\mathbb{K}=\mathbb{R}$.

Given nonnegative $G\in{\rm BV}(\mathbb{Z})$ and $\varepsilon>0$, we have
${\rm Var}_{[-N_{*},N_{*}]\cap\mathbb{Z}}(MG)\geq{\rm Var}(MG)-\varepsilon$
for some $N_{*}=N_{*}(\varepsilon)\in\mathbb{N}$. Note that $G\in{\rm
BV}_{a}^{b}(\mathbb{Z})$ for some $a,b\in[0,\infty)$. We choose
$N=N(\varepsilon,N_{*})\in\mathbb{N}$ such that
$|G(-n)-a|<\varepsilon/(5N_{*})$ and $|G(n)-b|<\varepsilon/(5N_{*})$ if $n>N$.
Let $G_{N}(n)$ be equal to $a$, $G(n)$, or $b$, for $n<N$, $n\in[-N,N]$, or
$n>N$, respectively. Then

${\rm Var}_{[-N_{*},N_{*}]\cap\mathbb{Z}}(MG_{N})\geq{\rm
Var}_{[-N_{*},N_{*}]\cap\mathbb{Z}}(MG)-\varepsilon\geq{\rm
Var}(MG)-2\varepsilon,$

because $|MG_{N}(n)-MG(n)|\leq\varepsilon/(5N_{*})$. Since ${\rm
Var}(G_{N})\leq{\rm Var}(G)$, we are done. ∎

##  3\. Proof of Theorem 1.1

For a generic function $g\in{\rm BV}(\mathbb{K})$ one has

$Mg\geq\frac{|g(-\infty)|+|g(\infty)|}{2}\quad\text{and}\quad
Mg(\pm\infty)=\max\Big{\\{}|g(\pm\infty)|,\frac{|g(-\infty)|+|g(\infty)|}{2}\Big{\\}}.$

We say that $Mg$ has a local maximum at $x\in\mathbb{K}$ if there exist
$y^{\prime},y^{\prime\prime}\in\mathbb{K}$ such that
$y^{\prime}<x<y^{\prime\prime}$ and

$\max\\{Mg(y^{\prime}),Mg(y^{\prime\prime})\\}<\sup\\{Mg(y):y\in\mathbb{K}\cap[y^{\prime},y^{\prime\prime}]\\}=Mg(x);$

a local minimum of $Mg$ at $x$ is defined analogously.

We are ready to prove Theorem 1.1. By the extension procedure it suffices to
deal with $\mathbb{K}=\mathbb{R}$. Indeed, given $F\in{\rm
BV}_{a}^{b}(\mathbb{Z})$ as in Theorem 1.1 with the corresponding system
$\\{n_{k}\\}_{0}^{K}$, define $f\in{\rm BV}_{a}^{b}(\mathbb{R})$ with the
corresponding system $\\{t_{k}\\}_{0}^{K}$, $t_{k}=n_{k}-\frac{1}{2}$, by
$f\coloneqq\sum_{n\in\mathbb{Z}}F(n){\mathds{1}_{{[n-1/2,n+1/2)}}}$. By using
the separation condition $\alpha_{k}\alpha_{k+1}=0$ for $F$, we verify that
$f$ has the form as in Theorem 1.1. Moreover, ${\rm Var}(f)={\rm Var}(F)$ and
${\rm Var}(Mf)\geq{\rm Var}(MF)$. Then (1.3) for $F$ follows from (1.2) for
$f$.

Until the end of this section we fix $f$ as in Theorem 1.1 and denote
$I_{k}=(t_{k-1},t_{k})$, $k=1,\ldots,K$, the corresponding intervals. Without
any loss of generality we can consider nonnegative $f$ only, hence from now on
we assume $a,b\geq 0$ and $\alpha_{k}\geq 0$ for $k=1,\ldots,K$. Clearly, $Mf$
may not have local maxima at all. However, if $x$ is a local maximum of $Mf$,
then two cases may occur:

  1. (1)

$Mf$ is constant on some interval $J\ni x$, i.e., each point of $J$ is also a
local maximum of $Mf$;

  2. (2)

there is no $J$ with this property, i.e., $x$ is isolated.

In the first case, considering $J$ as the longest interval with the declared
property, we shall choose exactly one element $x_{*}\in J$ as a representative
and this local maximum will be called substantial. In addition every isolated
maximum from the second case, if any, will also be called substantial. It
follows from Lemma 3.1 that the number of substantial maxima is finite and
does not exceed $K^{2}$.

######  Lemma 3.1.

Let $x$ be a local maximum of $Mf$. Then there exists $x_{*}$ (either equal to
$x$ or such that $Mf$ is constant on the closed interval connecting $x$ and
$x_{*}$) with the property that $Mf(x_{*})$ is attained for some $I_{x_{*}}$
centered at $x_{*}$ with
$l(I_{x_{*}})=l(I_{k^{\prime}}),r(I_{x_{*}})=r(I_{k^{\prime\prime}})$ for some
$1\leq k^{\prime}\leq k^{\prime\prime}\leq K$.

###### Proof.

Take any sequence $\\{\rho_{n}\\}\subset(0,\infty)$ such that
$Mf(x)=\lim_{n\to\infty}\frac{1}{2\rho_{n}}\int_{x-\rho_{n}}^{x+\rho_{n}}f$.
Clearly, if $\\{\rho_{n}\\}$ has a subsequence diverging to $\infty$, then
$Mf(y)\geq Mf(x)$ for all $y\in\mathbb{R}$. Thus, $\\{\rho_{n}\\}$ is bounded.

Assume $\\{\rho_{n}\\}$ contains a subsequence converging to $0$. Then
$Mf(x)=\frac{f(x^{-})+f(x^{+})}{2}$. This implies $f(x^{-})=f(x^{+})=Mf(x)$ by
$Mf(x)\geq Mf(x^{\pm})\geq f(x^{\pm})$, where the first inequality holds
because $x$ is a local maximum. Note that $x\leq A$ cannot happen because then
$Mf(x)=f(x^{-})=a$ so that $Mf(y)\geq Mf(x)$ for all $y\leq x$. Similarly,
$x\geq B$ is impossible. Thus, $x\in I_{k}$ and $Mf(x)=\alpha_{k}$ for some
$k$. We can replace $x$ by $c(I_{k})$, since $Mf(y)\geq Mf(x)$ for all $y\in
I_{k}$ so that $Mf$ is constant on $I_{k}$ because $x$ is a local maximum.
Taking $x_{*}=c(I_{k})$ and $I_{x_{*}}=I_{k}$, we obtain the claimed property.

If $\\{\rho_{n}\\}$ is separated from $0$, then it contains a subsequence
converging to a positive number. Consequently,
$Mf(x)=\frac{1}{|I_{x}|}\int_{I_{x}}f$ for some $I_{x}$ centered at $x$. Note
that $f\big{(}l(I_{x})^{+}\big{)}\geq Mf(x)$, since otherwise we could show
$Mf(y)>Mf(x)$ for some $\delta>0$ and all $y\in(x,x+\delta)$ by taking $I_{y}$
with $r(I_{y})=r(I_{x})$. Moreover, $l(I_{x})\geq A$ because otherwise we
would have $Mf(y)\geq Mf(x)$ for all $y\leq x$. Thus,
$l(I_{x})\in\big{[}l(I_{k^{\prime}}),r(I_{k^{\prime}})\big{)}$ for some
$k^{\prime}$. Similarly, $f\big{(}r(I_{x})^{-}\big{)}\geq Mf(x)$ and
$r(I_{x})\in\big{(}l(I_{k^{\prime\prime}}),r(I_{k^{\prime\prime}})\big{]}$ for
some $k^{\prime\prime}\geq k^{\prime}$. Let
$x_{*}=\frac{l(I_{k^{\prime}})+r(I_{k^{\prime\prime}})}{2}$. If $x=x_{*}$,
then $Mf(x)$ is attained for
$\big{(}l(I_{k^{\prime}}),r(I_{k^{\prime\prime}})\big{)}$, as desired. If not,
then we can show $Mf(y)\geq Mf(x)$ for all $y$ in the closed interval
connecting $x$ and $x_{*}$ by taking all $I$ with $l(I_{k^{\prime}})\leq
l(I)\leq l(I_{x})$ and $r(I_{x})\leq r(I)\leq r(I_{k^{\prime\prime}})$. Since
$x$ is a local maximum, $Mf$ is constant on this closed interval and
$Mf(x_{*})$ is attained for
$\big{(}l(I_{k^{\prime}}),r(I_{k^{\prime\prime}})\big{)}$, as desired. ∎

We conclude with noting that each substantial local maximum $x$ of $Mf$, if
exists, is of the form $x=\frac{l(I_{k^{\prime}})+r(I_{k^{\prime\prime}})}{2}$
for some $1\leq k^{\prime}\leq k^{\prime\prime}\leq K$, and
$Mf(x)=\frac{1}{|I_{x}|}\int_{I_{x}}f$ for
$I_{x}=\big{(}l(I_{k^{\prime}},r(I_{k^{\prime\prime}})\big{)}$. Moreover, if
$Mf$ has local maxima and there are $N\geq 1$ substantial among them, say
$x_{1}<x_{2}<\dots<x_{N}$, then for $N\geq 2$ and every $2\leq n\leq N$ we
choose a local minimum $y_{n}\in(x_{n-1},x_{n})$. Then

${\rm Var}(Mf)={\rm
Var}_{(-\infty,x_{1}]}(Mf)+\Big{(}\sum_{n=2}^{N}Mf(x_{n-1})-2Mf(y_{n})+Mf(x_{n})\Big{)}+{\rm
Var}_{[x_{N},\infty)}(Mf),$

with the middle term disappearing when $N=1$.

Let $T_{I}(x)\coloneqq\frac{|I|}{|J_{I}(x)|}$ for all $x\in\mathbb{R}$, where
$J_{I}(x)$ is the smallest interval $J\supseteq I$ with $c(J)=x$. The next
result says that the variation of $Mf$ is controlled locally by the variation
of $T_{I_{k}}$, $1\leq k\leq K$.

######  Lemma 3.2.

Suppose $Mf$ has $N\geq 2$ substantial local maxima $x_{1}<\dots<x_{N}$. Then

$\displaystyle Mf(x_{n-1})-Mf(y_{n})\leq\sum_{k=1}^{K}\alpha_{k}{\rm
Var}_{[x_{n-1},y_{n}]}(T_{I_{k}})\quad\text{and}\quad
Mf(x_{n})-Mf(y_{n})\leq\sum_{k=1}^{K}\alpha_{k}{\rm
Var}_{[y_{n},x_{n}]}(T_{I_{k}})$

for all $2\leq n\leq N$ and $x_{1}<y_{2}<x_{2}<\dots<x_{N-1}<y_{N}<x_{N}$.
Moreover, if $l(I_{1})=A$ and $\alpha_{1}\leq a$, then the first summand in
each sum above may be omitted (note that $N\geq 2$ implies $K\geq 2$).

###### Proof.

We shall prove the second inequality, the proof of the first one is analogous.

Given $x_{n}$, we take $I_{x_{n}}$ as in the conclusions of Lemma 3.1 with
accompanying $1\leq k^{\prime}\leq k^{\prime\prime}\leq K$. Then, for
$I_{y_{n}}$ centered at $y_{n}$ and such that $r(I_{y_{n}})=r(I_{x_{n}})$, we
have

$Mf(x_{n})-Mf(y_{n})\leq\frac{1}{|I_{x_{n}}|}\int_{I_{x_{n}}}f-\frac{1}{|I_{y_{n}}|}\int_{I_{y_{n}}}f\leq\sum_{k=k^{\prime}}^{k^{\prime\prime}}\frac{\alpha_{k}|I_{k}|}{|I_{x_{n}}|}-\frac{\alpha_{k}|I_{k}|}{|I_{y_{n}}|}.$

Observe that $k^{\prime}=1$ cannot happen if $l(I_{1})=A$ and $\alpha_{1}\leq
a$ because then $\alpha_{1}\geq Mf(x_{n})$ implies $Mf(y)\geq Mf(x_{n})$ for
all $y\leq x_{n}$; this explains the last sentence of the statement. Next, we
notice that the numerical inequality
$\frac{1}{\rho_{2}}-\frac{1}{\rho_{2}+\rho_{0}}\leq\frac{1}{\rho_{1}}-\frac{1}{\rho_{1}+\rho_{0}}$
holds for $\rho_{0},\rho_{1},\rho_{2}\in(0,\infty)$ when
$\rho_{1}\leq\rho_{2}$. Thus, if either $x_{n}\leq c(I_{k})$ or $c(I_{k})\leq
y_{n}$, then

$\frac{\alpha_{k}|I_{k}|}{|I_{x_{n}}|}-\frac{\alpha_{k}|I_{k}|}{|I_{y_{n}}|}\leq\alpha_{k}\Big{|}\frac{|I_{k}|}{|J_{I_{k}}(x_{n})|}-\frac{|I_{k}|}{|J_{I_{k}}(y_{n})|}\Big{|}=\alpha_{k}|T_{I_{k}}(x_{n})-T_{I_{k}}(y_{n})|=\alpha_{k}{\rm
Var}_{[y_{n},x_{n}]}(T_{I_{k}}).$

In the remaining case, $y_{n}<c(I_{k})<x_{n}$, we add and subtract
$\frac{\alpha_{k}|I_{k}|}{|I^{\prime}|}$ with $I^{\prime}$ such that
$c(I^{\prime})=c(I_{k})$ and $r(I^{\prime})=r(I_{y_{n}})=r(I_{x_{n}})$, which
gives

$\alpha_{k}\bigg{(}\frac{|I_{k}|}{|I_{x_{n}}|}-\frac{|I_{k}|}{|I^{\prime}|}+\frac{|I_{k}|}{|I^{\prime}|}-\frac{|I_{k}|}{|I_{y_{n}}|}\bigg{)}\leq\alpha_{k}\bigg{(}\Big{|}\frac{|I_{k}|}{|J_{I_{k}}(x_{n})|}-\frac{|I_{k}|}{|J_{I_{k}}(c(I_{k}))|}\Big{|}+\Big{|}\frac{|I_{k}|}{|J_{I_{k}}(c(I_{k}))|}-\frac{|I_{k}|}{|J_{I_{k}}(y_{n})|}\Big{|}\bigg{)}$

and the last quantity does not exceed
$\alpha_{k}\big{(}2T_{I_{k}}(c(I_{k}))-T_{I_{k}}(x_{n})-T_{I_{k}}(y_{n})\big{)}=\alpha_{k}{\rm
Var}_{[y_{n},x_{n}]}(T_{I_{k}})$. ∎

###### Proof of Theorem 1.1.

For simplicity, we assume $a\geq b$. If $Mf$ has no local maxima, then

${\rm
Var}(Mf)=\frac{a-b}{2}=\big{(}f(+\infty)-f(-\infty)\big{)}-\frac{a-b}{2}\leq{\rm
Var}(f)-\frac{a-b}{2}.$

The same conclusion easily follows when $Mf$ has exactly one substantial local
maximum. Assume therefore that $N\geq 2$ and $x_{1}<\dots<x_{N}$ are all
substantial local maxima of $Mf$. Since $Mf\geq\frac{a+b}{2}$,
$T_{I_{k}}(\pm\infty)=0$, and $Mf$ decreases on $[x_{N},\infty)$, arguing as
in the proof of Lemma 3.2 gives

${\rm
Var}_{[x_{N},\infty)}(Mf)=Mf(x_{N})-\frac{a+b}{2}\leq\sum_{k=1}^{K}\alpha_{k}{\rm
Var}_{[x_{N},\infty)}(T_{I_{k}})-\frac{a+b}{2},$

with the first summand omitted if $l(I_{1})=A$ and $\alpha_{1}\leq a$. If $Mf$
is nondecreasing on $(-\infty,x_{1}]$, then

${\rm Var}_{(-\infty,x_{1}]}(Mf)=Mf(x_{1})-a\leq\sum_{k=1}^{K}\alpha_{k}{\rm
Var}_{(-\infty,x_{1}]}(T_{I_{k}})-a.$

In this case combining the two estimates above with these from Lemma 3.2 gives
(1.2), since

${\rm Var}(Mf)\leq\sum_{k=1}^{K}\alpha_{k}{\rm
Var}(T_{I_{k}})-a-\frac{a+b}{2}=\sum_{k=1}^{K}2\alpha_{k}-a-b-\frac{a-b}{2}\leq{\rm
Var}(f)-\frac{a-b}{2}.$

Otherwise, if $x_{1}$ is the first local maximum of $Mf$ but $Mf$ is not
nondecreasing on $(-\infty,x_{1}]$, then there is a local minimum
$y_{1}\in[A,x_{1})$ such that

${\rm
Var}_{(-\infty,x_{1}]}(Mf)=a-2Mf(y_{1})+Mf(x_{1})\leq\min\Big{\\{}Mf(x_{1})-b,a-\frac{a+b}{2}+\sum_{k=1}^{K}\alpha_{k}{\rm
Var}_{[y_{1},x_{1}]}(T_{I_{k}})\Big{\\}}.$

The above inequality, which splits into two parts, is a consequence of
$(a+b)/2\leq Mf$ (first part), and the argument used in the proof of Lemma 3.2
(second part) with the additional nonnegative term $Mf(y_{1})-(a+b)/2$ added.
Again the first summand is not used if $l(I_{1})=A$ and $\alpha_{1}\leq a$.

We now analyze separately three cases depending on the relation between $A$,
$l(I_{1})$, $a$, and $\alpha_{1}$. If $l(I_{1})>A$, then we choose the second
term from the above minimum and obtain (1.2), since after splitting ${\rm
Var}(Mf)$ with respect to $(-\infty,x_{1}]$, $[x_{n},x_{n+1}]$,
$n=1,\dots,N-1$, and $[x_{N},\infty)$, we obtain

$\displaystyle{\rm Var}(Mf)\leq a-\frac{a+b}{2}+\sum_{k=1}^{K}\alpha_{k}{\rm
Var}(T_{I_{k}})-\frac{a+b}{2}=\sum_{k=1}^{K}2\alpha_{k}-b\leq{\rm Var}(f)-a.$

If $l(I_{1})=A$ and $\alpha_{1}\leq a$, then ${\rm Var}(T_{I_{1}})$ is not
used. Thus, choosing again the second term, we have

${\rm
Var}(Mf)\leq\sum_{k=2}^{K}2\alpha_{k}-b=a-\alpha_{1}+\alpha_{1}+\sum_{k=2}^{K}2\alpha_{k}-b-a\leq{\rm
Var}(f)-a.$

Finally, if $l(I_{1})=A$ and $\alpha_{1}>a$, then we choose the first term
from the relevant minimum. Now, $x_{1}>r(I_{1})$ because otherwise we would
have $Mf(y_{1})>a$. Moreover, $Mf(x_{1})\geq\alpha_{1}$ because $x_{1}$ is the
first local maximum, while $Mf(x_{1})=\alpha_{1}$ cannot happen because then
$Mf(y)=\alpha_{1}$ for all $y\in[c(I_{1}),x_{1}]$ and again $Mf(y_{1})>a$.
Consequently, $l(I_{x_{1}})=l(I_{k^{\prime}})$ for some $k^{\prime}>1$ with
$\alpha_{k^{\prime}}>\alpha_{1}>a$, and we have $x_{1}\geq c(I_{k^{\prime}})$.
Thus, we obtain

${\rm Var}(Mf)\leq\alpha_{k^{\prime}}-b+\sum_{k=1}^{K}\alpha_{k}{\rm
Var}_{[x_{1},\infty)}(T_{I_{k}})-\frac{a+b}{2}\leq(a-\alpha_{1})+{\rm
Var}(f)-\frac{a+b}{2}<{\rm Var}(f)-\frac{a-b}{2},$

since by $x_{1}\geq c(I_{k^{\prime}})\geq c(I_{1})$ the above sum does not
exceed $2(\alpha_{1}+\dots+\alpha_{K})-\alpha_{1}-\alpha_{k^{\prime}}$. ∎

##  4\. Further comments

Here we collect several thoughts that complement our main results. We verify
optimality of the constants in Conjecture $\Delta$, discuss variants of (1.2)
and (1.3) for other operators, comment on the special case of indicator
functions, and point out limitations of our proof method.

First, we note that the constants $1$ and $\frac{1}{2}$ in (1.1) are optimal.
Indeed, for $a,b\in[0,\infty)$ with $a\geq b$ and $N\in\mathbb{N}$, take
$g_{N}\in{\rm BV}_{a}^{b}(\mathbb{R})$ defined by

$g_{N}\coloneqq
a{\mathds{1}_{{(-\infty,-1]}}}+N{\mathds{1}_{{(-1,1)}}}+b{\mathds{1}_{{[1,\infty)}}}.$

Then for $N\geq a$, a simple calculation shows ${\rm Var}(g_{N})=2N-a-b$ and
${\rm Var}(Mg_{N})=2N-a-\frac{a+b}{2}$. Letting $N\to\infty$, we obtain
$c(\mathbb{R})\geq 1$ and $C_{a}^{b}(\mathbb{R})\leq\frac{a-b}{2}$.

Next, we show that certain variants of Conjecture $\Delta$ and its discrete
counterpart hold for other maximal operators. Set

$\displaystyle\overrightarrow{M}g(x)\coloneqq\sup_{r>0}\frac{1}{r}\int_{x}^{x+r}|g|\quad\text{and}\quad\overrightarrow{M}G(n)\coloneqq\sup_{m\geq
0}\frac{1}{m+1}\sum_{y=n}^{n+m}|G(y)|,$

and, similarly,

$\displaystyle\widetilde{M}g(x)\coloneqq\sup_{r_{1},r_{2}>0}\frac{1}{r_{1}+r_{2}}\int_{x-r_{1}}^{x+r_{2}}|g|\quad\text{and}\quad\widetilde{M}G(n)\coloneqq\sup_{m_{1},m_{2}\geq
0}\frac{1}{m_{1}+m_{2}+1}\sum_{y=n-m_{1}}^{n+m_{2}}|G(y)|.$

We call $\overrightarrow{M}$ and $\widetilde{M}$ the one-sided and uncentered
maximal operators, respectively. When $\mathbb{K}=\mathbb{Z}$, one can instead
consider a variant of $\widetilde{M}$ allowing only $m_{1},m_{2}\geq 0$ with
$m_{1}+m_{2}+1\in 2\mathbb{N}-1$ so that the corresponding intervals are balls
in $\mathbb{Z}$. This does not change the conclusion below.

Since the sampling procedure works in the context of $\overrightarrow{M}$ or
$\widetilde{M}$ with only minor adjustments, for all $a,b\in\mathbb{C}$ the
associated constants
$\overrightarrow{c}(\mathbb{R}),\overrightarrow{C_{a}^{b}}(\mathbb{R}),\widetilde{c}(\mathbb{R}),\widetilde{C_{a}^{b}}(\mathbb{R})$
are not worse than their discrete counterparts. Furthermore, when
$\mathbb{K}=\mathbb{Z}$ and $a,b\in[0,\infty)$, it is natural to conjecture
that $\overrightarrow{c}(\mathbb{Z})=\widetilde{c}(\mathbb{Z})=1$,
$\overrightarrow{C_{a}^{b}}(\mathbb{Z})=\max\\{0,b-a\\}$, and
$\widetilde{C_{a}^{b}}(\mathbb{Z})=|b-a|$. Indeed, a suitable variant of (1.3)
follows because for each nonnegative $G\in{\rm BV}_{a}^{b}(\mathbb{Z})$ one
has $\overrightarrow{M}G\geq\max\\{G,b\\}$ and
$\widetilde{M}G\geq\max\\{G,a,b\\}$, while the equality
$\overrightarrow{M}G(n)=G(n)$ or $\widetilde{M}G(n)=G(n)$ holds whenever $n$
is a local maximum of $\overrightarrow{M}G$ or $\widetilde{M}G$. Considering
$G_{N}\in{\rm BV}_{a}^{b}(\mathbb{Z})$ given by $G_{N}\coloneqq
a{\mathds{1}_{{-\mathbb{N}}}}+N{\mathds{1}_{{\\{0\\}}}}+b{\mathds{1}_{{\mathbb{N}}}}$
and $g_{N}\in{\rm BV}_{a}^{b}(\mathbb{R})$ given by
$g_{N}\coloneqq\sum_{n\in\mathbb{Z}}G_{N}(n){\mathds{1}_{{[n-1/2,n+1/2)}}}$,
we verify that the postulated constants are optimal.

######  Corollary 4.1.

For all $a,b\in[0,\infty)$ we have

  1. (1)

$\overrightarrow{c}(\mathbb{R})=\overrightarrow{c}(\mathbb{Z})=1$ and
$\overrightarrow{C_{a}^{b}}(\mathbb{R})=\overrightarrow{C_{a}^{b}}(\mathbb{Z})=\max\\{0,b-a\\}$,

  2. (2)

$\widetilde{c}(\mathbb{R})=\widetilde{c}(\mathbb{Z})=1$ and
$\widetilde{C_{a}^{b}}(\mathbb{R})=\widetilde{C_{a}^{b}}(\mathbb{Z})=|b-a|$.

In the case of indicator functions our proof of (1.2) and (1.3) is simpler.
Indeed, let $f\in{\rm BV}(\mathbb{R})$ be as in Theorem 1.1 with
$a,b,\alpha_{k}\in\\{0,1\\}$. Now, if $x$ is a local maximum of $Mf$, then
either $f(x)=0$ or $x$ can be adjusted to $x_{*}=c(I_{k})$ for some $k$. On
the other hand, if $y$ is a local minimum, then $f(y)=0$. Thus, we can replace
$T_{I_{k}}$ by $M{\mathds{1}_{{I_{k}}}}$, since both functions coincide on
$\\{c(I_{k})\\}\cup(\mathbb{R}\setminus I_{k})$. In particular, for each
closed interval $J$ whose endpoints are neighboring extrema $x,y$ we obtain

${\rm
Var}_{J}(Mf)=Mf(x)-Mf(y)\leq\frac{1}{|I_{x}|}\int_{I_{x}}|f|-\frac{1}{|I_{y}|}\int_{I_{y}}|f|\leq\sum_{k=1}^{K}\alpha_{k}{\rm
Var}_{J}(M{\mathds{1}_{{I_{k}}}}).$

Combining this with the relevant estimates at $\pm\infty$, we obtain (1.2).
The proof of (1.3) follows by the extension procedure.

Finally, notice that the method presented in the proof of Theorem 1.1 has some
natural limitations. Indeed, during the proof we always choose $I_{y}$ to be
the smallest interval centered at $y$ which contains $I_{x}$. This choice is
sometimes very far from optimal. To illustrate this obstacle, let us take
$g\in{\rm BV}_{0}^{0}(\mathbb{R})$ given by
$g\coloneqq{\mathds{1}_{{[-2,-1]\cup[1,2]}}}+C{\mathds{1}_{{[-2,2]}}}$ with
$C=10^{6}$, say. Then $Mg$ has local maxima at $-\frac{3}{2},0,\frac{3}{2}$
with the related values being $C+1,C+\frac{1}{2},C+1$, and local minima at
$-\frac{1}{2},\frac{1}{2}$ with the related values being
$C+\frac{1}{3},C+\frac{1}{3}$. Thus, ${\rm Var}(Mg)=2C+4-\frac{1}{3}\leq
2C+4={\rm Var}(g)$, as desired. However, for $x=0$ we have $I_{x}=(-2,2)$ so
that for $y=\frac{1}{2}$ we should take $I_{y}=(-2,3)$ in Theorem 1.1.
Unfortunately, the difference between the corresponding averages is much
larger than $Mg(0)-Mg(\frac{1}{2})$, therefore ${\rm Var}(Mg)\leq{\rm Var}(g)$
cannot be verified this way.

### Acknowledgments

Paul Hagelstein is partially supported by a grant from the Simons Foundation
(#521719 to Paul Hagelstein) and Dariusz Kosz is partially supported by a
grant from the National Science Centre of Poland (SONATA BIS
2022/46/E/ST1/00036).

## References

  * [1] J.M. Aldaz and J. Pérez Lázaro, _Functions of bounded variation, the derivative of the one dimensional maximal function, and applications to inequalities_ , Trans. Amer. Math. Soc. 359 (2007), 2443–2461.
  * [2] D. Beltran, C. González-Riquelme, J. Madrid, and J. Weigt, _Continuity of the gradient of the fractional maximal operator on $W^{1,1}(\mathbb{R}^{d})$_, Math. Res. Lett. 30 (2023), 689–707.
  * [3] J. Bober, E. Carneiro, K. Hughes, and L.B. Pierce, _On a discrete version of Tanaka’s theorem for maximal functions_ , Proc. Am. Math. Soc. 140 (2012), 1669–1680.
  * [4] C. Bilz and J. Weigt, _The one-dimensional centred maximal function diminishes the variation of indicator functions_ , preprint (2021), arxiv.org/abs/2107.12404.
  * [5] E. Carneiro, C. González-Riquelme, and J. Madrid, _Sunrise strategy for the continuity of maximal operators_ , J. Anal. Math. 148 (2022), 37–84.
  * [6] E. Carneiro and B.F. Svaiter, _On the variation of maximal operators of convolution type_ , J. Funct. Anal. 265 (2013), 837–865.
  * [7] E. Carneiro, J. Madrid, and L.B. Pierce, _Endpoint Sobolev and BV continuity for maximal operators_ , J. Funct. Anal. 273 (2017), 3262–3294.
  * [8] C. González-Riquelme, _Continuity for the one-dimensional centered Hardy-Littlewood maximal operator at the derivative level_ , J. Funct. Anal. 285 (2023), 110097.
  * [9] C. González-Riquelme and D. Kosz, _BV continuity for the uncentered Hardy–Littlewood maximal operator_ , J. Funct. Anal. 281 (2021), 109037.
  * [10] J. Kinnunen, _The Hardy-Littlewood maximal function of a Sobolev function_ , Israel J. Math. 100 (1997), 117–124.
  * [11] J. Kinnunen and P. Lindquist, _The derivative of the maximal function_ , J. Reine Angev. Math. 503 (1998), 161–167.
  * [12] O. Kurka, _On the variation of the Hardy-Littlewood maximal function_ , Ann. Acad. Sci. Fenn. Math. 40 (2015), 109–133.
  * [13] F. Liu, _A remark on the regularity of the discrete maximal operator_ , Bull. Aust. Math. Soc. 95 (2017), 108–120.
  * [14] J. Madrid, _Sharp inequalities for the variation of the discrete maximal function_ , Bull. Aust. Math. Soc. 95 (2017), 94–107.
  * [15] J. Madrid, _Endpoint Sobolev and BV continuity for maximal operators, II_ , Rev. Mat. Iberoam. 35 (2019), 2151–2168.
  * [16] H. Tanaka, _A remark on the derivative of the one-dimensional Hardy-Littlewood maximal function_ , Bull. Austral. Math. Soc. 65 (2002), 253–258.


# Enhancing Gravitational Interaction between Quantum Systems by a Massive
Mediator

Julen S. Pedernales, Kirill Streltsov, and Martin B. Plenio  Institut für
Theoretische Physik und IQST, Albert-Einstein-Allee 11, Universität Ulm,
D-89081 Ulm, Germany

###### Abstract

In 1957 Feynman suggested that the quantum/classical character of gravity may
be assessed by testing the gravitational interaction due to source masses in
superposition. However, in all proposed experimental realisations using
matter-wave interferometry the extreme weakness of this interaction requires
pure initial states with extreme squeezing to achieve measurable effects of
non-classical interaction for reasonable experiment durations. In practice,
the systems that can be prepared in such nonclassical states are limited to
small masses, which in turn limits the strength of their interaction. Here we
address this key challenge—the weakness of gravitational interaction—by using
a massive body as an amplifying mediator of gravitational interaction between
two test-systems. Our analysis shows that this results in an effective
interaction between the two test-systems that grows with the mass of the
mediator, is independent of its initial state and, therefore, its temperature.
This greatly reduces the requirement on the mass and degree of delocalization
of the test systems and, while still highly challenging, brings experiments on
gravitational source masses a step closer to reality.

Introduction.—In a discussion regarding the necessity of gravitational
quantization at the 1957 Chapel Hill Conference on the Role of Gravitation in
Physics Richard Feynman, aiming to clarify a point made by Frederik
Belinfante, presented a Gedanken experiment in which a coherent superposition
of a massive particle in two different spatial locations, generated e.g., by a
particle in a coherent superposition of spin states entering a Stern-Gerlach
apparatus, is allowed to interact gravitationally with another mass Feynman57
. He pointed out that the two possibilities for treating the gravitational
interaction, either via a classical or via a quantum field, result in very
different quantum states and thus experimental outcomes. Notably, the
particles would, respectively, emerge in a classically correlated mixture of
different positions or in a coherent superposition. The latter case is, in
modern quantum information parlance, referred to as an entangled state.

At the time such a Gedanken experiment was extraordinarily far removed from
the experimental technology of the day. After all, it was only in 1952 that
Schrödinger wrote “… we never experiment with just one electron or atom or
(small) molecule. In thought experiments, we sometimes assume that we do; this
invariably entails ridiculous consequences […] we are not experimenting with
single particles, any more than we can raise Ichthyosauria in the zoo”
Schrodinger52 . Owing to this evident technological gap, there has been little
activity by experiment and theory to explore possible routes towards turning
Feynman’s Gedanken experiment into reality.

However, six decades later, the rise of advanced quantum technologies and,
notably, the field of optomechanics is starting to change this perception. The
increasing ability to bring particles of ever growing mass into the quantum
regime and control their dynamics in a manner that leaves their coherences
intact AspelmeyerKM14 ; TeufelDL2011 ; ChanMS2011 ; RiedingerWM2018 ;
OckeloenDP2018 ; MillenMP2020 ; DelicRD2020 ; CatanoSE2020 ; Whittle21 ;
KotlerJT+2021 ; MercierMS+2021  suggests that today such an experiment may be
conceivable albeit still extraordinarily challenging SchmoleDH+16 . Indeed, by
determining experimentally the entanglement gain between two gravitationally
interacting parties one would be able to falsify the assumption of a classical
force carrier and thereby conclude the non-classical nature of the
gravitational field between them KafriT13 ; KrisnandaTP2017 . This led to
further proposals for experiments that probe for gravitationally induced
entanglement Milburn2017 ; MarlettoVV17 ; MiaoMY+20 ; KrisnandaTP+20 ;
PedernalesMP20b ; PedernalesMP20 ; CoscoMP20 ; Weiss2020  and add to other
tests based on superpositions of source masses LindnerP2005 ; BahramiBM+15 ;
CarlessoPU+17 ; CarlessoHU19 ; Haine2021 . While these experiments might
become feasible at some point, it is equally clear that remarkably stringent
requirements on isolation from the environment, the required duration of these
experiments and the large spatial extent of the quantum superpositions that
are required to achieve a measurable effect render such type of experiment
extremely challenging indeed PedernalesMP20 .

Figure 1: Setup A test particle (system $A$) of radius $r$ and mass $m_{a}$ is
subject to a double-well potential with wells separated by a distance $d_{0}$
and behaves as a two-level system with states $\ket{L}$ and $\ket{R}$, which
are stationary for the duration of the experiment provided that $d_{0}$ is
large enough to make any tunnelling negligible. A massive oscillator (system
$C$) with frequency $\omega$, radius $R$ and mass $m_{c}$ has its equilibrium
position at a distance $d$ from the center of the double-well potential and
acts as a mediator between the test mass and an ancillary qubit (system $B$)
that has states $\ket{0}$ and $\ket{1}$ and bare energy splitting
$\omega_{0}$. The mediator is weakly coupled to the test mass through
gravitational interaction with energy $\hat{V}_{a}(\hat{X})$ depending on the
position of the oscillator, and strongly coupled to the ancillary system with
a much stronger interaction energy $\hat{V}_{b}(\hat{X})$ of a nature other
than gravitational, e.g., Casimir force. The direct interaction between
systems $A$ and $B$ is negligible.

In this Letter, we show that by introducing a heavier mediator particle that
interacts gravitationally with a smaller test mass and by some other stronger
force with an ancillary quantum system, an effective interaction between the
test mass and the ancillary system can be engineered which grows with the mass
and degree of delocalization of the mediator. Notably, at suitably chosen
points in time, the mediator decorrelates from the system, leaving only the
test mass and the ancillary system entangled. As a result we find that, a
light test mass can be made to interact with an ancillary system as if it had
the much larger mass of the mediator, with the significant benefit that the
heavier mass of the mediator need not be prepared in a pure state and can,
thus, remain at a finite temperature. Since a key technological challenge
resides in the difficulty of preparing a sufficiently heavy mass in a pure
state with a large enough spatial extension, the setup described here
represents a significant enhancement over existing proposals.

Concept and Setup.—For the calculations in this paper, we will assume a
gravitational interaction strength that is determined by the Newtonian
interaction energy, which for two bodies of mass $m$ with their centers of
mass (c.m.) located at positions $x_{1}$ and $x_{2}$ is given by
$E_{G}=-Gm^{2}/\absolutevalue{x_{1}-x_{2}}$. Expanding this for small
variations of $\absolutevalue{x_{1}-x_{2}}$ around a fixed separation distance
$d$, we find that the lowest-order coupling term is linear in the positions of
the two masses and has the form $Gm^{2}x_{1}x_{2}/d^{3}$. Under such an
interaction the c.m. of the two particles entangle at a rate that grows with
the extent of their spatial delocalization KafriT13 ; Milburn2017 ;
CarlessoPU+17 ; KrisnandaTP+20 ; PedernalesMP20 ; CoscoMP20 ; Weiss2020 .
While this describes gravity as a direct interaction, ignoring any field
degree of freedom that may mediate the force, it allows for the computation of
the attainable amount of entanglement, the presence of which may then allow us
to draw inferences regarding the classical or quantum character of
gravitational interaction and the field that may be mediating it.

For two masses that are trapped in local harmonic potentials and cooled down
to their motional ground states (GS), the amount of entanglement due to their
gravitational interaction, as quantified by the logarithmic negativity
Plenio05 , oscillates in time with its maximum given by
$\eta=2Gm/(\omega^{2}d^{3})$ at time $t=\pi/[(1-\eta)2\omega]$ KrisnandaTP+20
. To ensure that the gravitational interaction dominates over Casimir forces,
the surface-to-surface distance between the interacting bodies must be kept
above a certain threshold determined by the radii of the particles.
Interestingly, for large particles, when the separation distance is dominated
by their size, $\eta$ becomes independent of the particle size. This appears
to be a strong limitation, as the gravitational interaction is naturally
minute, and it seems the amount of entanglement that it can generate cannot be
enhanced above a certain threshold even if we would acquire the ability to
cool down objects of larger size StreltsovMP21 . One way to avoid this
limitation is to increase the spatial extent of the c.m. wavefunctions above
that of their GSs, for example by squeezing them KrisnandaTP+20 ;
PedernalesMP20 ; Weiss2020 ; CoscoMP20  or by placing each system in a
superposition of two spatially separated coherent states Milburn2017 ;
PedernalesMP20 . However, the entanglement generated will be extremely
sensitive to the tiniest decoherence sources of the involved systems
PedernalesMP20 ; vandenKamp2020 ; Torov2020 ; RijavecCM21  and, in general,
this sensitivity will grow with increasing delocalization of the system
PedernalesMP20 ; CoscoMP20 . Therefore, the challenge for the observation of
gravitationally induced entanglement resides in the ability to generate highly
nonlocalized states of massive objects whose purity needs to be maintained
over the duration of the protocol. This is a phenomenal technological
challenge that increases with the size of the objects. In the remainder of
this paper, we introduce and analyse a setup where the requirement of having a
heavy mass in a highly delocalized state is not imposed on the test masses
that we want to entangle but is instead shifted onto a third system that
serves to mediate their interaction. While the test systems require their
preparation in suitable pure states, the mediator can take any pure or mixed
state, and the effective interaction between the test systems can be enhanced
by increasing the size of the mediator instead of that of the test systems
themselves.

Consider the setup depicted in Fig. 1 consisting of three interacting systems,
$A$, $B$ and $C$. We denote system $A$ as a two-level test mass (TLTM), i.e.
it is a particle of mass $m_{a}$ trapped in a double-well potential along
dimension $X$ and behaves as a two-level system with states $\ket{L}$ and
$\ket{R}$, which correspond to the particle being located, respectively, in
the left or in the right well. We assume that the wells are deep and far
enough to make any tunnelling term negligible, and thus, that states $\ket{L}$
and $\ket{R}$ can be treated as stationary states of the double well for the
duration of the protocol. System $B$ is an ancillary qubit (AQ) system, which
may have the same or a different physical origin as system $A$ gieseler2020 ;
martinetz2020 . We stress that the argument that we will put forward is
independent of the precise physical nature of system B. Finally, $C$ is a
mediator particle of mass $m_{c}$ trapped in a harmonic potential
characterised by an oscillation frequency ${\omega}$ in the X direction, and
we assume that its motion in this dimension is uncoupled from its motion in
orthogonal dimensions. A similar setup, albeit without system $B$, has been
considered in Refs. Taylor2020 ; Streltsov2021a . Here, we assume that system
$C$ interacts with both $A$ and $B$, while the interaction between the latter
can be neglected. Under this assumption, the setup is well described by a
Hamiltonian of the form

$\hat{H}=\hbar\omega_{0}\hat{\sigma}_{b}^{z}+\frac{1}{2m_{c}}\hat{P}^{2}+\frac{1}{2}m_{c}\omega^{2}\hat{X}^{2}+\\\
\sum_{\alpha=L,R}\hat{V}_{a,\alpha}(\hat{X})\outerproduct{\alpha}{\alpha}+\sum_{\alpha=0,1}\hat{V}_{b,\alpha}(\hat{X})\outerproduct{\alpha}{\alpha},$
(1)

where $\hat{X}$ and $\hat{P}$ are, respectively, the position and momentum
operators of the mediator, and $\hat{\sigma}_{b}^{z}$ is the Pauli
$z$-operator acting on system $B$, with $\omega_{0}$ giving its bare energy
splitting. The terms $\hat{V}_{i,\alpha}$, with $i=\\{a,b\\}$, represent the
interaction energy between system $C$ and system $i$ when the latter is in
state $\alpha$ and are assumed to be a function of the position of the
mediator. We are interested in the case where $\hat{V}_{a,\alpha}$ is purely
of gravitational origin, while $\hat{V}_{b,\alpha}\gg\hat{V}_{a,\alpha}$ and,
although typically not of gravitational origin, its specific physical origin
is not relevant for the argument. In order to avoid the interaction between
$A$ and $C$ being dominated by Casimir forces, the distance between these
masses needs to be sufficiently large—the precise value depending on their
masses—typically exceeding significantly the splitting $d_{0}$ of the double-
well potential SuppMat . Hence, we can expand the gravitational potential to
second order in the separation distance around the value $d$ to find an
interaction energy

$\hat{V}_{a,\pm}(\hat{X})=-\frac{Gm_{a}m_{c}}{\absolutevalue{d\mp\frac{d_{0}}{2}+\hat{X}}}\\\
\approx-\frac{Gm_{a}m_{c}}{d}\left(1+\frac{d_{0}^{2}}{4d^{2}}\pm\frac{d_{0}}{2d}-(1\pm\frac{d_{0}}{d})\frac{\hat{X}}{d}+\frac{\hat{X}^{2}}{d^{2}}+...\right),$
(2)

where $\hat{V}_{a,+}$ and $\hat{V}_{a,-}$ correspond, respectively, to
$\hat{V}_{a,R}$ and $\hat{V}_{a,L}$, and $G=6.67408\cdot 10^{-11}$ m3 kg-1 s-2
is the gravitational constant. The first two terms in the expansion introduce
a global energy shift, the third gives an energy splitting of the TLTM, while
the fourth term is responsible for a displacement of the oscillator
equilibrium position and as well as for a linear interaction between mediator
and the TLTM. Finally, the fifth term generates a shift in the oscillation
frequency of the oscillator. Thus, putting everything together, Hamiltonian
(1) can be rewritten as

$\hat{H}=\hbar\omega_{a}\hat{\sigma}_{a}^{z}+\hbar\omega_{b}\hat{\sigma}_{b}^{z}+\hbar\tilde{\omega}\hat{a}^{\dagger}\hat{a}+\hbar(g_{a}\hat{\sigma}_{z}^{a}+g_{b}\hat{\sigma}_{z}^{b})(\hat{a}+\hat{a}^{\dagger})$
(3)

provided that the interaction energy between systems $C$ and $B$ admits a
similar expansion, and that $\absolutevalue{\pm d_{0}/2-\Delta_{x}}\ll d$,
with $\Delta_{x}$ denoting the maximum value of the position uncertainty of
the oscillator during its evolution. Here, $\hat{a}^{\dagger}$ and $\hat{a}$
are ladder operators of the harmonic oscillator $C$ with modified frequency
${\tilde{\omega}}^{2}=\omega^{2}-\frac{2Gm_{a}}{d^{3}}+\frac{2}{m_{c}}V^{(2)}_{b}$,
where $V^{(2)}_{b}$ is the coefficient of the term quadratic in $\hat{X}$ in
the interaction between $C$ and $B$. Furthermore,
$\omega_{a}=Gm_{a}m_{c}d_{0}/(2\hbar d^{2})$ and
$g_{a}=-(Gm_{a}d_{0}/d^{3})\sqrt{m_{c}/(2\tilde{\omega}\hbar)}$, upon defining
$\sigma_{z}^{a}=\outerproduct{L}{L}-\outerproduct{R}{R}$; and $\omega_{b}$ and
$g_{b}$ have similar expressions in terms of the specific interaction between
$B$ and $C$.

Dynamics and Entanglement.—The unitary-evolution operator associated to
Hamiltonian (3) can be conveniently expressed in the interaction picture as
SuppMat

$\hat{U}(t)=\exp{(g_{a}\hat{\sigma}_{z}^{a}+g_{b}\hat{\sigma}_{z}^{b})(-\hat{a}\alpha_{t}+\hat{a}^{\dagger}\alpha_{t}^{*})}\\\
\times\exp{-i\frac{2g_{a}g_{b}}{\tilde{\omega}}\hat{\sigma}_{z}^{a}\hat{\sigma}_{z}^{b}(t-\frac{\sin{\tilde{\omega}t}}{\tilde{\omega}})},$
(4)

with $\alpha_{t}=\frac{e^{-i\tilde{\omega}t}-1}{\tilde{\omega}}$. The first
term generates a time-dependent displacement of the mediator in phase space
conditional on the states of the TLTM and the AQ. The second term gives a
second order interaction between the two lateral systems with an effective
coupling $g_{\rm eff}=2g_{a}g_{b}/\tilde{\omega}$. Remarkably, at times
$t_{n}=2\pi n/\tilde{\omega}$ that are a natural period of the mediator
frequency, $\alpha_{t_{n}}=0$ and the first term vanishes, leaving an
effective interaction between the TLTM and the AQ which is independent of the
state of the oscillator, with $\hat{U}(t_{n})=\exp{-ig_{\rm
eff}\hat{\sigma}_{z}^{a}\hat{\sigma}_{z}^{b}t_{n}}$. Therefore, at these
points in time the mediator is decorrelated from the rest of the system, while
entanglement is retained between the TLTM and the AQ. Thus, provided that the
TLTM and the AQ are initialized in suitable states, and that the gravitational
interaction is able to mediate quantum correlations, entanglement will grow
between the TLTM and AQ. This entanglement can then be detected by standard
methods making local measurements on the 2-qubit system Virmani07 ;
HorodeckiKH09 . The principle that gives rise to the interaction is the same
as that of the phase gates employed in trapped-ion platforms to entangle their
internal degrees of freedom mediated by their collective motion MolmerAS99 ;
Solano99 ; Milburn00 ; SackettCM00 . Here, we use it as an amplification
mechanism of the gravitational interaction. Notice, that the interaction
strength between the TLTM and the AQ grows with the mass of the mediator as
$\sqrt{m_{c}}$ and can be enhanced by a factor $g_{b}/\omega$ over the
strength of the gravitational interaction $g_{a}$. The latter occurs because
during the evolution the mediator will be displaced in phase space in opposite
directions conditionally on the states of the TLTM and AQ, with this
displacements reaching values of $(g_{a}+g_{b})/\tilde{\omega}$, see Fig. 2a.
Thus, with increasing coupling of the AQ to the mediator, this grows into
states with larger spatial delocalization, which in turn enhance the
interaction between the TLTM and the mediator.

Figure 2: System dynamics In (a) we show the evolution in phase space of the
four components of the mediator state correlated with each of the four states
of the TLTM and the AQ. Here,
$\\{\expectationvalue{\hat{x}},\expectationvalue{\hat{p}}\\}$ are
dimensionless position and momentum quadratures of the redefined oscillator,
with shifted frequency and displaced equilibrium position. (b) shows the
evolution of the entanglement, as quantified by the logarithmic negativity,
between the TLTM and the AQ in continuous lines and between the TLTM and the
mediator in dashed lines, for different temperatures of the mediator. Here,
$g_{a}=1/48\tilde{\omega}$ and $g_{b}=\tilde{\omega}$. Continuous lines in (c)
display the entanglement between the TLTM and the AQ for different values of
the coupling $g_{b}$ expressed in units of $\tilde{\omega}$. For this
simulation we initialize the mediator in a thermal state with mean phonon
occupation $\expectationvalue{n}_{0}=10$, and set $g_{a}$ as in (b). Dots
indicate the value of the entanglement at the decoupling times $t_{n}$. Dashed
lines correspond to the evolution of entanglement between two generic qubits
governed by
$\hat{H}=\frac{2g_{a}g_{b}}{\tilde{\omega}}\hat{\sigma}_{z}\hat{\sigma}_{z}$,
which at times $t_{n}$ has a unitary-evolution operator equivalent to that of
the full-system Hamiltonian, see Eq. (4).

In practice, the tolerable delocalization of the mediator will be limited by
the distance that preserves the linear approximation in the expansion of the
gravitational potential that we did in Eq. (2), that is
$\Delta_{x}\approx\sqrt{\hbar/(2m\tilde{\omega})}\sqrt{\expectationvalue{\bar{n}}}\ll
d$, where $\Delta_{x}$ and $\expectationvalue{\bar{n}}$ correspond,
respectively, to the maximum values of the position uncertainty and the mean
phonon occupation number of the mediator during the evolution. The time-
dependent phonon occupation number $\expectationvalue{n}_{t}$ can be exactly
calculated for an initial state with the TLTM and the AQ in even
superpositions of the type $(\ket{L/0}+\ket{R/1})/\sqrt{2}$ and the mediator
in a thermal state with mean phonon occupation number $\bar{n}_{0}$. It is
given by

$\expectationvalue{n}_{t}=\bar{n}_{0}+4\frac{g_{a}^{2}+g_{b}^{2}}{{\tilde{\omega}}^{2}}\sin^{2}{\frac{\tilde{\omega}t}{2}}.$
(5)

This sets a limit on the strength of the coupling of the AQ to the mediator

$g_{b}/\tilde{\omega}\approx\frac{1}{2}\sqrt{\frac{2m_{c}\tilde{\omega}\Delta_{x}^{2}}{\hbar}-\bar{n}_{0}}\ll\frac{1}{2}\sqrt{\frac{2m_{c}\tilde{\omega}d^{2}}{\hbar}-\bar{n}_{0}},$
(6)

where we have assumed $g_{b}\gg g_{a}$. We now consider the entanglement
dynamics between the TLTM and the AQ, which we quantify in terms of the
logarithmic negativity
$LN=\max{(0,\log_{2}{{\lVert\rho_{ab}^{T_{b}}}\rVert}_{1})}$, with
${\norm{\cdot}}_{1}$ the trace norm and where $T_{b}$ represents the partial
transpose with respect to subsystem $B$. For a closed system ruled by
Hamiltonian (3) an exact expression can be found at the times when the
mediator is decoupled from the system:

$LN(t_{n})=\max\\{0,\log_{2}[1+\absolutevalue{\sin(\phi_{m})}]\\},$ (7)

with

$\phi_{m}=\frac{4g_{b}g_{a}}{\tilde{\omega}}t_{n}\approx\frac{2Gm_{c}m_{a}}{\hbar
d^{3}}\Delta_{x}d_{0}t_{n},$ (8)

where we have assumed for simplicity that $n_{0}=0$. This expression is upper
bounded due to the constraint $\Delta_{x}\ll d$. In Fig. (2b) we show the
dynamics of entanglement between the different subsystems, for various
temperatures of the mediator. We see that when the mediator starts in the GS
the logarithmic negativity between the TLTM and the mediator oscillates with
the period of the mediator frequency and vanishes completely at times $t_{n}$.
At these times the mediator is decoupled while the entanglement between the
TLTM and the AQ reaches a maximum. While the logarithmic negativity between
the mediator and the TLTM decreases with increasing temperature, the
entanglement between the TLTM and the AQ at the rephasing times $t_{n}$
remains unaffected. This is observed in the form of peaks centered at
positions $t_{n}$, which get narrower with increasing temperature of the
mediator. In Fig. (2c) we illustrate the enhancement of the entanglement
between the TLTM and the AQ as the coupling of the AQ to the mediator is
increased. We observe that with increasing coupling strength the peaks of
entanglement between the TLTM and the AQ become higher and narrower.

To understand the degree of amplification that such a setup can introduce, we
compare it to the case without a mediator. We consider two gravitationally
interacting TLTMs separated by a distance $D$, whose double-well potentials
have a separation $d_{0}$. For the setup featuring a mediator we consider a
TLTM with the same separation distance $d_{0}$, located a distance $d$ away
from the mediator. The distance $d$ will in general be larger than $D$ by an
amount given by the difference between the radii of the mediator, $R$, and the
TLTM, $r$, that is $d=D+\Delta R-d_{0}/2+\Delta_{x}/2$, with $\Delta R=R-r$.
In this way we make sure that the distances between the surfaces of the
gravitationally interacting bodies is the same in both setups, and thus avoid
the appearence of Casimir-Polder forces between the mediator and the TLTM. We
find that in the case of two directly interacting TLTMs the logarithmic
negativity evolves as in Eq. (7) with the argument of the sine given by
SuppMat

$\phi_{d}=\frac{Gm_{a}^{2}}{\hbar D}\frac{(d_{0}/D)^{2}t}{1-(d_{0}/D)^{2}}.$
(9)

Thus, the enhancement of the mediated setup over the setup with directly
interacting masses can be expressed as the ratio

$\phi_{m}/\phi_{d}=2\frac{m_{c}\Delta_{x}}{m_{a}d_{0}}\frac{1}{(1+\frac{\Delta
R}{D})^{3}},$ (10)

where we have assumed $d_{0}/D\ll 1$. To quantitatively illustrate such an
enhancement we examine the following example. Consider a particle of silica
with radius $r=70$ nm (recently, particles of this size have been placed in
their motional GS DelicRD2020 ; magrini2021 ), in a double-well potential with
$d_{0}=500$ nm. If we impose that the gravitational interaction energy has to
exceed the Casimir interaction energy by a factor of $10$, we find that the
minimum distance between their surfaces must be kept above $166\ \mu$m. This
holds for all silica particles with radii below $166\ \mu$m SuppMat ). Thus,
we fix $D=166\ \mu$m and consider a mediator with a radius that is $\alpha$
times lager than that of the TLTM, that is $R=\alpha r$. Assuming a frequency
for the mediator of $\tilde{\omega}=100$ Hz, and that both mediator and TLTM
are silica particles, with mass density $\rho\approx 2400$ Kg/m3, this gives
an enhancement of

$\phi_{m}/\phi_{d}\approx\frac{\sqrt{\alpha^{3}}}{[1+(\alpha-1)4\cdot
10^{-4}]^{3}}10^{-3}\frac{g_{b}}{\tilde{\omega}},$ (11)

Thus, we see that, for example, a mediator particle of radius $R=7\ \mu$m,
corresponding to $\alpha=100$, would provide an enhancement on the order of
$\phi_{m}/\phi_{d}\approx g_{b}/\tilde{\omega}\ll 10^{8}$, where the upper
bound is imposed by the relation in Eq. (6).

Conclusion.—The detection of gravitationally mediated entanglement would
represent a remarkable experimental result with far-reaching consequences for
our understanding of physics. Although this is an outstanding technological
challenge that will require the quantum control of heavier and heavier
systems, rapid developments and recent experimental breakthroughs in the field
of optomechanics suggest that the consideration of this question is pertinent
and timely. In this spirit, we propose an enhancement of the experimental
design w.r.t. existing proposals, which rely on the direct gravitational
interaction between heavy test masses. In our design, we shift the large mass
requirement to a mediator system, while keeping the test systems, where the
entanglement is to be detected, at scales more friendly for their quantum
control. While these smaller test systems would not show detectable amounts of
entanglement were they to interact directly, in the mediated design, they show
an effective interaction that grows with the mass of the mediator. Remarkably,
the required degree of controllability on the heavy mediator mass is
considerably lower than that of the test systems in the directly interacting
case, such that the mediator can remain in a thermal state. This paves the way
for experimental tests of the gravitational interaction between masses that
are significantly larger than those that can be prepared in pure states.

Acknowledgments – This work was supported by the ERC Synergy grant HyperQ
(Grants No. 856432), the EU projects and AsteriQs (Grants No. 820394), the
QuantERA project NanoSpin (Contract No. 13N14811), the BMBF project Q.Link.X
(Contract No. 16KIS0875) and the DFG SFB 1279.

## References

  * (1) D. Rickles and C. M. DeWitt, The Role of Gravitation in Physics: Report from the 1957 Chapel Hill Conference (Max-Planck-Gesellschaft zur Förderung der Wissenschaften, Berlin, Germany, 2011), Chap. 23.
  * (2) E. Schrödinger, Are There Quantum Jumps, British Journal for the Philosophy of Science 3, 233 (1952).
  * (3) M. Aspelmeyer, T. J. Kippenberg, and C. Marquardt, Cavity Optomechanics, Rev. Mod. Phys. 86, 1391 (2014).
  * (4) J. D. Teufel, T. Donner, D. Li, J. W. Harlow, M. S. Allman, K. Cicak, A. J. Sirois, J. D. Whittaker, K. W. Lehnert, and R. W. Simmonds, Sideband cooling of micromechanical motion to the quantum ground state, Nature 475, 359 (2011).
  * (5) J. Chan, T. P. M. Alegre, A. H. Safavi-Naeini, J. T. Hill, A. Krause, S. Gröblacher, M. Aspelmeyer, and O. Painter, Laser cooling of a nanomechanical oscillator into its quantum ground state, Nature 478, 89 (2011).
  * (6) R. Riedinger, A. Wallucks, I. Marinković, C. Löschnauer, M. Aspelmeyer, S. Hong, and S. Gröblacher, Remote quantum entanglement between two micromechanical oscillators, Nature 556, 473 (2018).
  * (7) C. F. Ockeloen-Korppi, E. Damskägg, J.-M. Pirkkalainen, M. Asjad, A. A. Clerk, F. Massel, M. J. Woolley, and M. A. Sillanpää, Stabilized entanglement of massive mechanical oscillators, Nature 556, 478 (2018).
  * (8) J. Millen, T. S. Monteiro, R. Pettit, and A. N. Vamivakas, Optomechanics with Levitated Particles,  Rep. Prog. Phys. 83, 026401 (2020).
  * (9) U. Delić, M. Reisenbauer, K. Dare, D. Grass, V. Vuletić, N. Kiesel, and M. Aspelmeyer, Cooling of a levitated nanoparticle to the motional quantum ground state, Science 367, 892 (2020).
  * (10) S. B. Cataño-Lopez, J. G. Santiago-Condori, K. Edamatsu, and N. Matsumoto, High-Q Milligram-Scale Monolithic Pendulum for Quantum-Limited Gravity Measurements, Phy. Rev. Lett. 124, 221102 (2020).
  * (11) C. Whittle et al., Approaching the motional ground state of a 10 kg object, Science 372, 1333 (2201).
  * (12) S. Kotler, A. Peterson, E. Shojaee, F. Lecocq, K. Cicak, A. Kwiatkowski, S. Geller, S. Glancy, E. Knill, R. W. Simmonds, J. Aumentado, and J. D. Teufel, Direct observation of deterministic macroscopic entanglement, Science 372, 622 (2021).
  * (13) L. Mercier de Lépinay, C. F. Ockeloen-Korppi, M. J. Woolley, M. A. Sillanpää, Quantum mechanics–free subsystem with mechanical oscillators, Science 372, 625 (2021).
  * (14) J. Schmöle, M. Dragosits, H. Hepach, and M. Aspelmeyer, A micromechanical proof-of-principle experiment for measuring the gravitational force of milligram masses, Class. Quantum Grav. 33, 125031 (2016).
  * (15) D. Kafri and J. M. Taylor, A noise inequality for classical forces, arXiv:1311.4558.
  * (16) T. Krisnanda, M. Zuppardo, M. Paternostro, and T. Paterek, Revealing Nonclassicality of Inaccessible Objects, Phys. Rev. Lett. 119, 120402 (2017).
  * (17) S. Bose, A. Mazumdar, G. W. Morley, H. Ulbricht, M. Toroš, M. Paternostro, A. A. Geraci, P. F. Barker, M. S. Kim, and G. Milburn, Spin Entanglement Witness for Quantum Gravity, Phys. Rev. Lett. 119, 240401 (2017).
  * (18) C. Marletto and V. Vedral, Gravitationally Induced Entanglement between Two Massive Particles is Sufficient Evidence of Quantum Effects in Gravity, Phys. Rev. Lett. 119, 240402 (2017).
  * (19) H. Miao, D. Martynov, H. Yang, and A. Datta, Quantum correlation of light mediated by gravity, Phys. Rev. A 101, 063804 (2020).
  * (20) T. Krisnanda, G. Y. Tham, M. Paternostro, and T. Paterek, Observable quantum entanglement due to gravity, npj Quant. Inf. 6, 12 (2020).
  * (21) J. S. Pedernales, F. Cosco, and M. B. Plenio, Decoherence-Free Rotational Degrees of Freedom for Quantum Applications, Phys. Rev. Lett. 125, 090501 (2020).
  * (22) J. S. Pedernales, G. W. Morley, and M. B. Plenio, Motional Dynamical Decoupling for Matter-Wave Interferometry. Phys. Rev. Lett. 125, 023602 (2020); J. S. Pedernales, G. W. Morley, and M. B. Plenio, arXiv:1906.00835.
  * (23) F. Cosco, J. S. Pedernales, and M. B. Plenio, Enhanced force sensitivity and entanglement in periodically driven optomechanics, Phys. Rev. A 103, 061501 (2021).
  * (24) T. Weiss, M. Roda-Llordes, E. Torrontegui, M. Aspelmeyer, and O. Romero-Isart, Large Quantum Delocalization of a Levitated Nanoparticle Using Optimal Control: Applications for Force Sensing and Entangling via Weak Forces, Phys. Rev. Lett. 127, 023601 (2021).
  * (25) N. Lindner and A. Peres, Testing quantum superpositions of the gravitational field with Bose-Einstein condensates, Phys. Rev. A 71, 024101 (2005).
  * (26) M. Bahrami, A. Bassi, S. McMillen, M. Paternostro, H. Ulbricht, Is Gravity Quantum? arXiv:1507.05733.
  * (27) M. Carlesso, M. Paternostro, H. Ulbricht, and A. Bassi, When Cavendish meets Feynman: A quantum torsion balance for testing the quantumness of gravity. arXiv:1710.08695.
  * (28) M. Carlesso, A. Bassi, M. Paternostro, and H. Ulbricht, Testing the gravitational field generated by a quantum superposition, New J. Phys. 21, 093052 (2019)
  * (29) S. A. Haine, Searching for signatures of quantum gravity in quantum gases, New J. Phys. 23, 033020 (2021).
  * (30) M. B. Plenio, The logarithmic negativity: A full entanglement monotone that is not convex, Phys. Rev. Lett. 95, 090503 (2005).
  * (31) K. Streltsov, J. S. Pedernales, and M. B. Plenio, Ground-State Cooling of Levitated Magnets in Low-Frequency Traps, Phys. Rev. Lett. 126, 193602 (2021).
  * (32) T. W. van de Kamp, R. J. Marshman, S. Bose and A. Mazumdar, Quantum Gravity Witness via Entanglement of Masses: Casimir Screening, Phys. Rev. A 102, 062807 (2020).
  * (33) M. Toroš, T. W. Van De Kamp, R. J. Marshman, M. S. Kim, A. Mazumdar, and S. Bose, Relative Acceleration Noise Mitigation for Nanocrystal Matter-wave Interferometry: Application to Entangling Masses via Quantum Gravity, Phys. Rev. Research 3, 023178 (2021).
  * (34) S. Rijavec, M. Carlesso, A. Bassi, V. Vedral, and C. Marletto, Decoherence effects in non-classicality tests of gravity, New J. Physics 23, 043040 (2021).
  * (35) J. Gieseler, A. Kabcenell, E. Rosenfeld, J. D. Schaefer, A. Safira, M. J. A. Schuetz, C. Gonzalez-Ballestero, C. C. Rusconi, O. Romero-Isart, and M. D. Lukin, Single-Spin Magnetomechanics with Levitated Micromagnets, Phys. Rev. Lett. 124, 163604 (2020).
  * (36) L. Martinetz, K. Hornberger, J. Millen, M. S. Kim, and B. A. Stickler, Quantum Electromechanics with Levitated Nanoparticles, Npj Quant. Inf. 6, 101 (2020).
  * (37) D. Carney, H. Müller, and J. M. Taylor, Testing quantum gravity with interactive information sensing, PRX Quantum 2, 030330 (2021).
  * (38) K. Streltsov, J. S. Pedernales, and M. B. Plenio, On the Significance of Interferometric Revivals for the Fundamental Description of Gravity, Universe 8, 58 (2022).
  * (39) See Supplemental Material for a detailed derivation of the magnitudes discussed in the main text.
  * (40) M. B. Plenio and S. Virmani, An introduction to entanglement measures, Quant. Inf. Comp. 7, 1 (2007).
  * (41) R. Horodecki, P. Horodecki, M. Horodecki, and K. Horodecki, Quantum entanglement, Rev. Mod. Phys. 81, 865 (2009).
  * (42) K. Mølmer and Anders Sørensen, Multiparticle Entanglement of Hot Trapped Ions, Phys. Rev. Lett. 82, 1835 (1999).
  * (43) E. Solano, R. L. de Matos Filho, and N. Zagury, Deterministic Bell states and measurement of the motional state of two trapped ions, Phys. Rev. A 59, R2539 (1999).
  * (44) G. J. Milburn, S. Schneider and D. F. V. James, Ion Trap Quantum Computing with Warm Ions, Fortschr. Phys. 48, 801 (2000).
  * (45) C. A. Sackett, D. Kielpinski, B. E. King, C. Langer, V. Meyer, C. J. Myatt, M. Rowe, Q. A. Turchette, W. M. Itano, D. J. Wineland, and C. Monroe, Experimental entanglement of four particles, Nature 404, 256 (2000).
  * (46) L. Magrini, P. Rosenzweig, C. Bach, A. Deutschmann-Olek, S. G. Hofer, S. Hong, N. Kiesel, A. Kugi, and M. Aspelmeyer, Real-time optimal quantum control of mechanical motion at room temperature, Nature 595, 373 (2021).

Supplemental Material:
Enhancing Gravitational Interaction between Quantum Systems by a Massive
Mediator We provide detailed analytical derivations of the time evolution of
several of the magnitudes discussed in the main text. These include the
unitary-evolution operator, the mean phonon number of the mediator, and the
logarithmic negativity. We also describe our treatment of Casimir forces and
propose a pulse sequence to suppress gravitational gradient noise.

##  I Unitary evolution operator

In the following, we show the derivation of the unitary evolution operator in
Eq. (4) of the main text. We start from Hamiltonian (3) and move to the
interaction picture, to find

$\hat{H}_{I}(t)=(g_{a}\hat{\sigma}_{a}^{z}+g_{b}\hat{\sigma}_{b}^{z})(\hat{a}e^{-i\tilde{\omega}t}+\hat{a}^{\dagger}e^{i\tilde{\omega}t}),$
(S1)

which has a commutator at different times given by

$[\hat{H}_{I}(t),\hat{H}_{I}(t^{\prime})]=(g_{a}\hat{\sigma}_{a}^{z}+g_{b}\hat{\sigma}_{b}^{z})^{2}(e^{i\tilde{\omega}(t^{\prime}-t)}-e^{-i\tilde{\omega}(t^{\prime}-t)}),$
(S2)

and all higher-order commutators vanish. Thus, the evolution in the
interaction picture is fully described by the first two orders in the Magnus
expansion $\hat{U}_{I}=\exp{\hat{\Omega}^{(1)}(t)+\hat{\Omega}^{(2)}(t)}$,
with

$\hat{\Omega}^{(1)}(t)=-i\int_{0}^{t}dt^{\prime}\hat{H}(t^{\prime})=-i(g_{a}\hat{\sigma}_{a}^{z}+g_{b}\hat{\sigma}_{b}^{z})(\hat{a}\frac{e^{-i\tilde{\omega}t}-1}{-i\tilde{\omega}}+\hat{a}^{\dagger}\frac{e^{i\tilde{\omega}t}-1}{i\tilde{\omega}})$
(S3)

and

$\hat{\Omega}^{(2)}(t)=-\frac{1}{2}\int_{0}^{t}dt^{\prime}\int_{0}^{t^{\prime}}dt^{\prime\prime}[\hat{H}(t^{\prime}),\hat{H}(t^{\prime\prime})]=i(g_{a}\hat{\sigma}_{a}^{z}+g_{b}\hat{\sigma}_{b}^{z})^{2}(t/\tilde{\omega}-\frac{\sin\tilde{\omega}t}{{\tilde{\omega}}^{2}}).$
(S4)

##  II Time evolution of the mean phonon number of the mediator

In the following we compute the time evolution of the mean phonon number
$\expectationvalue{\hat{n}}_{t}=\expectationvalue{\hat{a}^{\dagger}\hat{a}}_{t}$
of the mediator c.m.as the system evolves under the unitary evolution operator
in Eq. (4) of the main text. We observe that $\hat{n}$ commutes with the
second term in Eq. (4), and thus we only need to care about the first term.
For the Hilbert space of the mediator, this acts as a displacement operator
$\hat{D}(\hat{\beta})=\exp{\hat{\beta}\hat{a}^{\dagger}-\hat{\beta}^{*}\hat{a}}$,
with

$\hat{\beta}=\alpha_{t}^{*}(g_{a}\hat{\sigma}_{z}^{a}+g_{b}\hat{\sigma}_{z}^{b}),$
(S5)

and $\alpha_{t}=(e^{-i\tilde{\omega}t}-1)/\tilde{\omega}$. Thus, the time
evolution of the number operator is given by

$\hat{n}(t)=\hat{D}(\hat{\beta})\hat{n}\hat{D}^{\dagger}(\hat{\beta})=\hat{n}-(\hat{\beta}^{*}\hat{a}+\hat{\beta}\hat{a}^{\dagger})+\absolutevalue{\hat{\beta}}^{2}.$
(S6)

Considering an initial state of the TLTM and the AQ in a separable state with
each system in an even superposition $(\ket{0/L}+\ket{1/R})/\sqrt{2}$, we have
that $\langle\hat{\sigma}_{z}^{a/b}\rangle=0$ and thus
$\langle\hat{\beta}\rangle=0$ and
$\langle\lvert\hat{\beta}\rvert^{2}\rangle=\absolutevalue{\alpha_{t}}^{2}(g_{a}^{2}+g_{b}^{2})$.
Therefore, the time evolution of the mean phonon number is given by

$\expectationvalue{\hat{n}}_{t}=\expectationvalue{\hat{n}}+\frac{g_{a}^{2}+g_{b}^{2}}{\tilde{\omega}^{2}}4\sin^{2}\left(\frac{\tilde{\omega}t}{2}\right).$
(S7)

##  III Logarithmic Negativity for two interacting qubits

Consider a pair of two-level systems, $1$ and $2$, interacting through a
Hamiltonian of the form ($\hbar=1$)
$\hat{H}=\Omega\hat{\sigma}_{z}^{(1)}\hat{\sigma}_{z}^{(2)}$. The system is
initialized in the state

${\ket{\psi}_{0}=(\ket{0}+\ket{1})/\sqrt{2}\otimes(\ket{0}+\ket{1})/\sqrt{2}}.$
(S8)

Its state at time $t$ is then given by

${\ket{\psi(t)}=1/2[e^{-i\Omega t}(\ket{0,0}+\ket{1,1})+e^{i\Omega
t}(\ket{0,1}+\ket{1,0})]}.$ (S9)

Its entanglement can be quantified by the logarithmic negativity

$LN=\max[0,\log_{2}{\norm{\hat{\rho}^{T_{2}}}_{1}}],$ (S10)

where ${}^{T_{2}}$ represents the partial transpose with respect to one of the
two subsystems, and $\norm{\cdot}_{1}$ is the trace norm. Thus, we first need
to find the partial transpose of
$\hat{\rho}(t)=\outerproduct{\psi(t)}{\psi(t)}$,

$\hat{\rho}^{T_{2}}=\frac{1}{4}\left(\begin{array}[]{cccc}1&e^{i2\Omega
t}&e^{-i2\Omega t}&1\\\ e^{-i2\Omega t}&1&1&e^{i2\Omega t}\\\ e^{i2\Omega
t}&1&1&e^{-i2\Omega t}\\\ 1&e^{-i2\Omega t}&e^{i2\Omega
t}&1\end{array}\right),$ (S11)

and then compute its trace norm, which is defined as
$\norm{\hat{\chi}}_{1}=\Tr{\sqrt{\hat{\chi}\hat{\chi}^{\dagger}}}$. To that
end, we first look for the eigenvalues of
$\hat{\rho}^{T_{2}}(\hat{\rho}^{T_{2}})^{\dagger}$, which are given by

$\lambda_{1,2}=\frac{1}{4}\sin^{2}(2\Omega
t),\quad\lambda_{3}=\frac{1}{4}\sin^{4}(t\Omega),\quad\lambda_{4}=\frac{1}{4}\cos^{4}(\Omega
t),$ (S12)

and compute the trace norm as the sum of their positive square roots

$\norm{\hat{\rho}^{T_{2}}}_{1}=1+\absolutevalue{\sin(2\Omega t)}.$ (S13)

Finally, the logarithmic negativity can be written as

$LN(t)=\max\\{0,\log_{2}[1+\absolutevalue{\sin(2\Omega t)}]\\}.$ (S14)

##  IV Two directly interacting TLTMs

Here we compute the evolution of the logarithmic negativity for a pair of
TLTMs, $A$ and $B$, with masses $m_{a}$ and $m_{b}$, that interact directly
(without a mediator) via gravity. We assume that the centers of the double-
well potentials are separated by a distance $D$ and that the distance between
the wells in each system is $d_{0}$. We consider that the interaction
Hamiltonian is diagonal in the basis
$\\{\ket{L}_{A},\ket{R}_{A}\\}\otimes\\{\ket{L}_{B},\ket{R}_{B}\\}$, and its
elements are determined by the Newtonian gravitational interaction energy of
the system in each configuration

$H=\left(\begin{array}[]{cccc}a&0&0&0\\\ 0&b&0&0\\\ 0&0&c&0\\\
0&0&0&d\end{array}\right),$ (S15)

with $a=d=-\frac{Gm_{a}m_{b}}{D}$, $b=-\frac{Gm_{a}m_{b}}{D+d_{0}}$ and
$c=-\frac{Gm_{a}m_{b}}{D-d_{0}}$. This Hamiltonian can be rewritten in the
convenient form

$\hat{H}=(a+\frac{b+c}{2}\mathbf{\hat{I}}_{4})+\frac{b-c}{4}\hat{\sigma}_{z}^{a}\otimes\mathbf{\hat{I}}_{2}+\frac{c-b}{4}\mathbf{\hat{I}}_{2}\otimes\hat{\sigma}_{z}^{b}+\frac{1}{2}(a-\frac{b+c}{2})\hat{\sigma}_{z}^{a}\otimes\hat{\sigma}_{z}^{b},$
(S16)

with
$\hat{\sigma}_{z}^{a/b}=\outerproduct{L}{L}_{A/B}-\outerproduct{R}{R}_{A/B}$.
In this form, we can immediately see that for an initial state
$\ket{+}_{A}\otimes\ket{+}_{B}$, with
$\ket{+}_{i}=(\ket{L}_{i}+\ket{R}_{i})/\sqrt{2}$, the time evolution of the
logarithmic negativity is given by Eq. (S14), with

$2\Omega t=(a-\frac{b+c}{2})/\hbar=-\frac{Gm_{a}m_{b}}{\hbar
D}\frac{t}{(D/d_{0})^{2}-1}.$ (S17)

##  V Casimir forces

In this section we present our treatment of the Casimir forces to compute the
minimum separation distance that favors gravitational interaction over
Casimir. We start with the expression for the Casimir potential between two
spheres of radius $r_{a}$ and $r_{b}$ with a surface to surface distance
$d_{s}$. Under the assumption that $r_{a},r_{b}\ll d_{s}$ this is given by

$V_{c}(d_{s})=\frac{23\hbar cr_{a}^{3}r_{b}^{3}}{4\pi
d_{s}^{7}}\left(\frac{\epsilon_{r}-1}{\epsilon_{r}+2}\right)^{2}$ (S18)

where $\epsilon_{r}$ is the dielectric constant. For the same configuration
the gravitational energy between the two spheres is given by

$V_{g}(d_{s})=-\frac{Gm_{a}m_{b}}{d_{s}+r_{a}+r_{b}}$ (S19)

Thus, the minimum distance that guarantees a ratio of the gravitational to the
Casimir energy above $\beta<V_{g}(d_{s})/V_{c}(d_{s})$ is given by

$d_{s}>\left[\frac{207\hbar
c}{(4\pi)^{3}G\rho_{a}\rho_{b}}\left(\frac{\epsilon_{r}-1}{\epsilon_{r}+2}\right)^{2}\beta\right]^{1/6},$
(S20)

where $\rho_{a/b}$ are the mass densities of particles $A$ and $B$. Using the
parameters for silica, i.e. $\epsilon_{r}\cong 4$ and $\rho_{a/b}\cong 2400$
kg m-3, and imposing $\beta=10$, we find $d_{s}>166\ \mu$m. Thus, for
particles with radii $r_{a/b}\ll 166\ \mu$m, this surface to surface distance
must be kept.

##  VI Noise

In the main text we have discussed the performance of our protocol in the
absence of any sources of noise that could be acting both on the two-level
systems and on the mediator. Naturally, in the presence of these noise
sources, the finite coherence time of the setup will limit the performance of
our protocol. Notice, that such a coherence time would be similar in an
experiment that would not use the big mass as a mediator but look into its
entanglement with one of the two-level systems, albeit in this case the mass
should be prepared in a pure state. While a complete analysis of the noise
would require a detailed discussion of specific implementation platforms and
is out of the scope of this work, here, we will discuss the effect of noise
that originates from the action of a conservative force acting on the system.
This could be for example the action of gravitational or electromagnetic
noise. For noise sources that are far as compared to the spatial extension of
the wave function of any of the subsystems, their impact on each of the
subsystems can be modelled as an interaction with a linearized field of an
intensity that varies stochastically in time. Under these assumptions, the
system Hamiltonian is of the following structure

$H=[\Omega_{0}^{a}+\eta_{a}(t)]\sigma_{z}^{a}+[\Omega_{0}^{b}+\eta_{b}(t)]\sigma_{z}^{b}+\tilde{\omega}a^{\dagger}a+[g_{a}\sigma_{z}^{a}+g_{b}\sigma_{z}^{b}+\eta_{c}(t)](a+a^{\dagger}),$
(S21)

where $\Omega_{0}^{i}$ and $g_{i}$ represent for the two-level system $i$ its
energy splitting and coupling to the mediator, respectively. Here, noise on
each of the three systems is introduced in the form of the three independent
stochastic functions of time $\eta_{i}(t)$, for $i=a,b,c$. The corresponding
unitary-evolution operator can be computed exactly using the Magnus expansion
and following the same recipe as that used for the case without noise in the
main text. The resulting expression reads

$U(t_{n})=e^{-i[\Omega_{0}^{a}t_{n}+\bar{\eta}_{a}(t_{n})-g_{a}\tilde{\tilde{\eta}}_{c}(t_{n})]\sigma^{a}_{z}}e^{-i[\Omega_{0}^{b}t_{n}+\bar{\eta}_{b}(t_{n})-g_{b}\tilde{\tilde{\eta}}_{c}(t_{n})]\sigma^{b}_{z}}e^{-i[\tilde{\eta}_{c}(t_{n})a+\tilde{\eta}_{c}^{*}(t_{n})a^{\dagger}]}e^{i\frac{g_{a}g_{b}}{\tilde{\omega}}t_{n}\sigma_{z}^{a}\sigma_{z}^{b}},$
(S22)

where $\bar{\eta}_{i}(t)=\int_{0}^{t}dt^{\prime}\eta_{i}(t^{\prime})$,
$\tilde{\eta}_{i}(t)=\int_{0}^{t}dt^{\prime}\eta_{i}(t^{\prime})e^{-i\tilde{\omega}t^{\prime}}$
and
$\tilde{\tilde{\eta}}_{i}(t)=\int_{0}^{t}dt^{\prime}\int_{0}^{t^{\prime}}dt^{\prime\prime}[\eta_{i}(t^{\prime})+\eta_{i}(t^{\prime\prime})]\sin[\tilde{\omega}(t^{\prime}-t^{\prime\prime})]$.
Remarkably, in the presence of linear noise, the disentanglement of the two-
level systems and the mediator at the times $t_{n}$ is preserved. This is
because while the presence of the gradient noise stochastically displaces the
mediator in phase space, it does not distort the trajectories, and notably the
relative distances, of the different components of the superposition.
Therefore, these componentes, which are displaced in different directions
depending on the state of the two-level systems, are all affected in the same
way by this additional displacement, and thus still recombine into the same
point, albeit now not at the origin of the phase space but at some
stochastically displaced point, as captured by the displacement operator in
the third exponential of Eq. (S22). If this would not be the case, and the
mediator would not perfectly disentangle from the two-level systems due to the
action of noise, this residual entanglement with the mediator would reduce the
entanglement between the two-level systems in a way dependnet on the
temperature of the mediator. Nevertheless, the noise acting on the position of
the mediator effectively enters as dephasing noise in the two-level system $i$
through the stochastic phase $g_{i}\tilde{\tilde{\eta}}_{c}(t)$. Thus, while
noise acting on the mediator will unavoidably limit the performance of the
protocol, it is remarkable that this does not depend on its state, and
therefore, that the temperature of the mediator does not represent and added
source of noise nor amplify it.

##  VII Dynamical Decoupling

Very much inspired by spin systems, we assume that the equivalent of a
$\pi$-pulse operation is available for our TLTM, that is an operation that
acts on the Hilbert space of the TLTM as a $\sigma_{x}$ operator. Then a
dynamical decoupling sequence can be generated by applying $\pi$-pulses
simultaneously on the TLTM and on the AQ. Such a sequence would be able to
cancel all noise that fluctuates in time scales slower than the inter-pulse
spacing.

We assume that such a flip operation, corresponding to the application of a
$\sigma_{x}$ operation to the state, can be performed in a time scale much
faster than the period of any other frequency in the Hamiltonian. In this
case, the effect of such a pulse can be modeled by an instantaneous sign flip
of the operator $\sigma^{a/b}_{z}\rightarrow-\sigma^{a/b}_{z}$. Thus, in the
presence of such pulse sequences on the TLTM and the AQ, Hamiltonian (3) in
the main text acquires the from

$H=\hbar[\omega_{a}+\eta_{a}(t)]F_{a}(t)\sigma_{a}^{z}+\hbar[\omega_{b}+\eta_{b}(t)]F_{b}(t)\sigma_{b}^{z}+\hbar\tilde{\omega}a^{\dagger}a+\hbar[g_{a}F_{a}(t)\sigma_{z}^{a}+g_{b}F_{b}(t)\sigma_{z}^{b}+\eta_{c}(t)](a+a^{\dagger}),$
(S23)

where $\eta_{i}(t)$ are stochastic functions of time representing
gravitational gradient noise on each of the three systems. Here, $F_{a(b)}(t)$
represents the pulse sequences on system $A$ ($B$) and is a function that
takes only values $1$ and $-1$, such that its sign flips with every pulse that
is applied on the system. We are interested in the time evolution under
Hamiltonian (S23) and the ability of functions $F_{a/b}(t)$ to attenuate the
effects of noise. To that end, we follow the same recipe as for the evolution
in the noiseless case. We first move into the interaction picture

$\hat{H}_{\rm
int}^{I}(t)=\hbar[g_{a}F_{a}(t)\hat{\sigma}_{z}^{a}+g_{b}F_{b}(t)\hat{\sigma}_{z}^{b}+\eta_{c}(t)](\hat{a}e^{-i\tilde{\omega}t}+\hat{a}^{\dagger}e^{i\tilde{\omega}t})$
(S24)

and then find the two-time commutator of the time-dependent Hamiltonian

$[\hat{H}_{\rm int}^{I}(t_{1}),\hat{H}_{\rm
int}^{I}(t_{2})]=\hbar^{2}g_{a}\chi_{a}(t_{1},t_{2})\sigma_{z}^{a}+g_{b}\chi_{b}(t_{1},t_{2})\sigma_{z}^{b}+g_{a}g_{b}\xi(t_{1},t_{2})\sigma_{z}^{a}\sigma_{z}^{b}+{\rm
scalar},$ (S25)

where

$\chi_{a/b}(t_{1},t_{2})=-2i[F_{a/b}(t_{1})\eta_{c}(t_{2})+F_{a/b}(t_{2})\eta_{c}(t_{1})]\sin{[\tilde{\omega}(t_{1}-t_{2})]}$
(S26)

and

$\xi(t_{1},t_{2})=-2i[F_{a}(t_{1})F_{b}(t_{2})+F_{a}(t_{2})F_{b}(t_{1})]\sin{[\tilde{\omega}(t_{1}-t_{2})]}.$
(S27)

Higher-order time commutators vanish and the evolution is again given by the
first two orders of the Magnus expansion
$\hat{U}_{I}=\exp\\{\hat{\Omega}^{(1)}(t)+\hat{\Omega}^{(2)}(t)\\}$, with

$\hat{\Omega}^{(1)}(t)=-i\\{\sum_{i=a,b}g_{i}\hat{\sigma}_{z}^{i}[\hat{a}\bar{F}_{i}(t)+\hat{a}^{\dagger}\bar{F}_{i}^{*}(t)]+[\hat{a}\bar{\eta}_{c}(t)+\hat{a}^{\dagger}\bar{\eta}_{c}^{*}(t)]\\}$
(S28)

and

$\hat{\Omega}^{(2)}(t)=-\frac{1}{2}[g_{a}\tilde{\chi}_{a}(t)\hat{\sigma}_{z}^{a}+g_{b}\tilde{\chi}_{b}(t)\hat{\sigma}_{z}^{b}+g_{a}g_{b}\tilde{\xi}(t)\hat{\sigma}_{z}^{a}\hat{\sigma}_{z}^{b}]$
(S29)

Here, the upper bar indicates the single integral
$\bar{h}(t)=\int_{0}^{t}dt_{1}h(t_{1})e^{-\tilde{\omega}t_{1}}$ and the tilde
indicates the double integral
$\tilde{h}(t)=\int_{0}^{t}dt_{1}\int_{0}^{t_{1}}dt_{2}h(t_{1},t_{2})$. On the
one hand, we are interested in designing pulse sequences $F_{a/b}(t)$ that
preserve the decoupling of the mediator at times $t_{n}$, that is, we want
sequences that satisfy $\bar{F}_{a/b}(t_{n})=0$. On the other hand, we want
that, at the decoupling times, these sequences cancel the effects of noise,
$\tilde{\chi}_{a/b}(t_{n})=0$, while they retain the interaction between
systems $A$ and $B$, that is $\tilde{\xi}(t_{n})\neq 0$. Condition
$\bar{F}_{a/b}(t_{n})=0$ is satisfied provided that the sequence is symmetric
under a displacement in time of half of a period of the mediator, that is
$F_{a/b}(t)=F_{a/b}(t+\pi/\tilde{\omega})$. On the other hand, condition
$\tilde{\chi}_{a/b}(t_{n})=0$ is achieved provided that the noise function
$\eta_{c}(t)$ remains constant over the duration of $2\Delta t$, where $\Delta
t$ is the interpulse spacing, that is to say, if the noise fluctuates slower
than the periodicity of the pulses. Finally, the resonance condition
$\tilde{\xi}(t_{n})\neq 0$ by which the signal survives, is achieved provided
that both of the two-level systems are flipped simultaneously.