Coherence requirements for quantum communication from hybrid circuit dynamics
Shane P. Kelly
[Corresponding author<EMAIL_ADDRESS>Institut für Physik, Johannes Gutenberg Universität Mainz, D-55099 Mainz, Germany
Kavli Institute for Theoretical Physics, University of California, Santa Barbara, CA 93106-4030, USA
Ulrich Poschinger
Institut für Physik, Johannes Gutenberg Universität Mainz, D-55099 Mainz, Germany
Ferdinand Schmidt-Kaler
Institut für Physik, Johannes Gutenberg Universität Mainz, D-55099 Mainz, Germany
Matthew P.A. Fisher
Department of Physics, University of California, Santa Barbara, CA 93106-4030, USA
Jamir Marino
Institut für Physik, Johannes Gutenberg Universität Mainz, D-55099 Mainz, Germany
Kavli Institute for Theoretical Physics, University of California, Santa Barbara, CA 93106-4030, USA

The coherent superposition of quantum states is an important resource for quantum information processing which distinguishes quantum dynamics and information from their classical counterparts.
In this article we determine the coherence requirements to communicate quantum information in a broad setting encompassing monitored quantum dynamics and quantum error correction codes.
We determine these requirements by considering hybrid circuits that are generated by a quantum information game played between two opponents, Alice and Eve, who compete by applying unitaries and measurements on a fixed number of qubits.
Alice applies unitaries in an attempt to maintain quantum channel capacity, while Eve applies measurements in an attempt to destroy it.
By limiting the coherence generating or destroying operations available to each opponent, we determine Alice's coherence requirements.
When Alice plays a random strategy aimed at mimicking generic monitored quantum dynamics, we discover a coherence-tuned phase transitions in entanglement and quantum channel capacity.
We then derive a theorem giving the minimum coherence required by Alice in any successful strategy, and conclude by proving that coherence sets an upper bound on the code distance in any stabelizer quantum error correction codes.
Such bounds provide a rigorous quantification of the coherence resource requirements for quantum communication and error correction.

§ INTRODUCTION

Protecting quantum superposition is essential for obtaining quantum advantage in simulation, sensing, communication and computation.
While noisy intermediate-scale quantum devices have advanced this frontier <cit.> by improving the fidelities of quantum gates and qubits, quantum error correction is conjectured to be essential in the long run.
Similar to classical error protection, quantum error correction requires redundancy in the number of qubits and other quantum resources such as entanglement.
Thus, there has been a significant effort towards developing quantum resource theories <cit.>, which rigorously determine the nature and quantity of a given quantum resource such as entanglement <cit.>, non-locality <cit.>, or quantum coherence <cit.> (related to superposition <cit.>).
For example, entanglement and coherence have been demonstrated as essential resources for performing quantum sensing <cit.>.
At the same time, any resource for any given quantum resource theory is useful in some channel discrimination task <cit.>.
Finally, Ref. <cit.> provided an error correction protocol that consumes coherence as it corrects errors.
While this protocol shows that coherence can be used as a resource for error correction, it is not yet known if or how coherence is necessary for quantum communication.

Cartoon hybrid random circuit composed of unitaries (white) and measurements (red), which can be viewed as an information game played between Alice and Eve.
In this game, Alice attempts to store her diary in a set of qubits and Eve attempts to destroy her diary by measuring them (for instance, shining light on the qubits).
To protect her diary, Alice applies a random set of unitaries in an attempt to protect her diary from Eve's measurements, which Eve can apply at a fixed rate relative to the rate at which Alice can apply unitaries.
Alice is allowed to capture the emitted light, record the measurement outcomes, and knows the measurement basis Eve makes a measurement in.
In this way, Alice can keep track of the evolving state of the system, such that she might be able to apply a unitary at the end of the game to recover her diary.
The measurement-induced phase transition occurs when random strategies are played, and corresponds to a transition in the quantum channel capacity between the initial state encoding Alice's diary, and the finial state at the end of the game.
Alice wins the game in the volume-law phase when the quantum channel capacity is finite, while she loses the game in the area-law phase when the channel capacity is zero.

In this article, we determine the coherence resource requirements for quantum communication in a generic setting encapsulating both monitored many body quantum dynamics and error correction protocols involving active feedback.
In the first case, we investigate an ensemble of hybrid circuits modeling a generic class of monitored quantum dynamics, and identify phase transitions in their channel capacity <cit.>.
By controlling the coherence generating capacity of such circuits we are able to control the phase transition and extract the coherence requirements for obtaining a finite channel capacity.

The hybrid circuit channels previously studied <cit.> are composed of a sequence of random local unitaries and measurements which compete to drive the phase transition in the channel capacity and entanglement properties.
While the transition was first observed in the scaling properties of entanglement <cit.>, the manifestation of the transition in terms of channel capacity allows us to investigate the information game shown in Fig. <ref>.
In this game, an agent Alice, having access to a set of qubits and a limited set of local unitary operations, attempts to protect a quantum diary (i.e. an arbitrary quantum state) from Eve who attempts to destroy it with the application of quantum measurements (for which Alice can record the outcomes of).
Alice wins, if at the end of the game there is a finite quantum channel capacity and she is able to recover her diary, while she looses when the channel capacity is zero.

By limiting the coherence generating ability of Alice, we are able to identify the coherence resources required by Alice to protect her quantum diary.
To identify which operations are coherence generating  and which are destroying, we make use of the resource theory of coherence <cit.>, which is a basis specific resource theory, that quantifies the amount of quantum superposition in that basis.
By using the relative entropy of coherence <cit.> as the resource quantifier, and considering its dynamics in the information game played between Alice in Eve, we uncover the coherence resources required by Alice to protect both classical and quantum diaries.

Inspired by these results, we apply the intuition and tools developed studying the information game to quantum error correction and find that the code distance of a stabilizer quantum error correction code is bounded by the relative entropy of coherence in any basis.

§.§ Coherence requirements in communication games and quantum error correction

We first show that in the limit of zero coherence, Alice can only protect classical information.
That is, we show that if Alice can only prepare coherence-free states, and only perform the free operations of the coherence resource theory, then she can only store and protect classical information from a set of errors introduced by Eve.
If instead, Alice is given a state (with coherence) encoding a quantum diary, then she can protect quantum information using coherence non-generating unitaries (the free operations of the coherence resource theory) as long as the measurements Eve performs in her attack are restricted to preserve coherence.
Next, we allow Alice to generate coherence and identify the minimum amount of coherence she must maintain to preserve her quantum diary.

In this setting, we first consider the case in which Alice and Eve take random strategies in order to sample the coherence requirements for a large class of monitored quantum dynamics.
The first set of strategies result in a hybrid circuit composed of random controlled not gates (CNOTs) and projective measurements which can either generate or destroy coherence.
This investigation finds that, even at arbitrarily weak measurements, Alice's ability to protect quantum information can undergo a transition tuned by the relative rate of coherence destroying and generating measurements.
Next, we allow Alice to use a limited rate, $p_R$, of coherence generating unitaries in her random strategy and identify the threshold rate of decohering measurements, $p_m^c$, below which she can protect her quantum diary.
We find that the threshold rate of decohering measurements $p_{m}^c$ increases linearly with $p_R$ (i.e. $p_{m}^c=\alpha p_R$ for some constant $\alpha$), indicating a greater capacity to protect her quantum diary given access to more coherence generating unitaries.
Finally, we identify bounds on the minimum coherence Alice must preserve in her qubits under any strategy taken by her or Eve.
While the phase transition occurring in random circuits demonstrates that coherence is a requirement for quantum communication in monitored many body quantum dynamics, this bound provides a rigorous quantification of that requirement.

This suggests that one could also identify a threshold amount of coherence required for error correction.
Indeed, we find such a relation between the relative entropy of coherence (computed for a specific state in the quantum code space) and the code distance (the number of errors correctable by the stabilizer code).
A weak formulation of this relation is that the relative entropy of coherence of the maximum coherent state in the code space bounds the code distance (Theorem <ref> in Sec. <ref>).
A stronger formulation can be obtained by considering subspaces of the full code space since a bound on the code distance for a subspace is a bound for the full code space.
Using one such stronger constraint on the code distance, we show that our bound reproduces the classical Singleton bounds when applied to Calderbank-Shor-Steane (CSS) codes which are a type of quantum error correction code constructed from two classical error correction codes <cit.>.

Using our bound, we therefore provide a rigorous quantification of the coherence resource requirements for constructing a quantum error correction code.
Intuitively, this bound gives the extra coherent resources required to encode a quantum state.
While it is natural that the coherence of the physical state must be greater than that of the encoded state, our bound shows that the coherence is also constrained by the number of errors that one desires to correct.
Thus, it gives the amount of extra coherence required for error correction than required to simply represent the state.

We begin in section <ref> by reviewing the resource theory of coherence and one of its resource quantifiers, the relative entropy of coherence.
Then, we introduce the information game and monitored quantum dynamics and discuss the unitary limit of such models.
Then, in section <ref>, we discuss the coherence-free limit, and show that Alice can only encode and protect classical information in this limit.
We elaborate on this result in sections <ref> and <ref> by discussing Alice's ability to protect quantum information only using coherence non-generating operations.
In section <ref> we investigate the dynamics of coherence induced by measurements and show that, while Eve can always destroy Alice's diary if she is restricted to using coherence non-generating unitaries, Alice can protect a quantum diary if Eve accidentally generates coherence by performing measurements in the wrong basis.
Finally in section <ref> we discuss the coherence resource requirements for quantum communication: both the requirements for Alice to protect her diary (section <ref>), and the requirements in quantum error correction code design (section <ref>).

§.§ New perspectives on hybrid circuit dynamics

While our work primarily focuses on using hybrid circuit dynamics to understand the coherence resource requirements for quantum communication, it also provides perspectives and results interesting for the reader primarily interested in     hybrid circuits dynamics and their transitions.

Classical circuits The first set of hybrid circuits we consider are similar to the classical dynamics discussed in Refs. <cit.> which show measurement-induced transitions in classical information and chaos quantifiers.
Similarly, we first consider in section <ref>, the dynamics of a circuit composed of random CNOTs occurring at a fixed rate and random bit erasers occurring at a rate, $p_e$, relative to the rate of CNOTs, and find a classical purification transition.
The classical purification transition is investigated by considering the dynamics of an initial classical distribution of classical bit strings and observing that the late time entropy of that distribution undergoes a phase transition similar to the quantum purification transitions discussed in Refs. <cit.>.
Going beyond previous works, we show that this transition in a classical entropy is the coherence-free limit of a more general class of dynamics.
We then show in section <ref> that if the initial state has quantum coherence, and the bit erasers are implemented using a sequence of measurements that preserve coherence, then the transition can also be considered as a quantum purification transition.
We show in section <ref> that the dynamics of the circuit can be described by the dynamics of a classical code space.

Sketch phase diagram for a circuit composed of CNOTs, and vanishing rate of measurements $p_m$. In this circuit, we randomly choose to measure in the $X$, $Y$ or $Z$ measurements with probability $p_x$ $p_y$ and $p_z=1-p_x-p_y$ respectively (we define $\Delta_x=(p_x-p_z)/(1-p_y)$). The phases labeled $Z$-classical and $X$-classical are area-law phases in which superposition is vanishing in the $Z$ and $X$ basis respectively. Typical states in these phases are therefore efficiently represented by a superposition of a limited number of $X$ or $Z$ basis states. This is in contrast to the “quantum” phase which shows volume-law entanglement, and is characterized by a large amount of superposition as quantified by the relative entropy of coherence, both in the $X$ and $Z$ basis.

Coherence controlled entanglement transitions
The second set of hybrid circuits we consider are composed of CNOTs and measurements which occur at a relative rate, $p_m$, to the CNOTs.
We then randomly choose to measure in the $X$, $Y$ or $Z$ bases with probability $p_x$ $p_y$ and $p_z=1-p_x-p_y$ respectively.
For these circuits, the dynamics of the relative entropy of coherence in the $X$ and $Z$ basis are particularly interesting because they constrain the amount of entanglement in the system (see section <ref>).
Furthermore, the dynamics of coherence are analytically accessible both in the measurement-only limit $p_m\rightarrow \infty$ and vanishing measurement rate limit $p_m\rightarrow 1/L^2$.
In the first case, the coherence can be predicted exactly, but the entanglement dynamics are trivial and the steady states are all product states.

In the second limit, of vanishing measurement rate, an entanglement transition can be observed as a function of the relative probabilities of which Pauli operators are measured, $p_y$ and $\Delta_x=(p_x-p_z)/(1-p_y)$.
In this limit, the dynamics of coherence follow a Markov process described by a random walk in the amount of information 'known' about the $X$ and $Z$ basis states (see Fig. <ref>).
By studying this walker we find that the superposition (coherence) in the $X$ basis increases at a rate $p_y+p_z-p_x$.
Thus, if $p_x>p_y+p_z$, the amount of superposition in the $X$ basis vanishes, the state becomes classical in the $X$ basis with no entanglement.
Similarly in the $Z$ basis, if $p_z>p_x+p_y$, the superposition in the $Z$ basis vanishes, the state becomes classical in the $Z$ basis and entanglement is again not allowed to form.
Thus, if we consider the entropy of a state where we first take the infinite time limit and then the vanishing measurement rate limit $\lim_{p_m\rightarrow 0}\lim_{t\rightarrow \infty}S$, we find a transition in the entanglement $S$ at the critical line $\left|p_x-p_z\right|>p_y$.
This is summarized in Fig. <ref>, where we have a phase transition between states classical in the $X$ and $Z$ basis, and quantum states with volume-law entanglement.

The random walk describing the dynamics of coherence is discussed in section <ref> along with the coherence controlled entanglement transition.  Details about the Markovian dynamics of coherence are given in  appendix <ref>.

What is quantum about the volume-law entangled phases?
In the final section <ref> we find that there is a transition in the ability of Alice to protect a quantum code, controlled by the rate at which she can generate coherence.
In that section, Eve makes an attack with coherence preserving bit erasers and a coherence destroying measurement, while Alice defends her diary with CNOTs and a limited rate of phase gates.
While in that section, we only discuss her ability to protect a quantum diary,
we show in section <ref> that there is a transition between a regime where Alice can only protect a classical diary to one where she can protect a quantum diary.
The difference between the two phases provides an answer to what is quantum about the entangling phase of the measurement-induced transitions discussed in Refs. <cit.> in comparison   to the classical transitions discussed in Refs. <cit.>.
Here, the transition between being able to protect a classical diary to being able to protect a quantum diary occurs as the ability to correct both bit and phase errors as apposed to just bit errors.
Thus, this answer to what is quantum about the entangling phase of the measurement-induced phase transitions is equivalent to the answer to what is quantum about quantum error correction codes <cit.>.
While classical error correction and the classical scrambling phases protect information from just bit or just phase errors, the entangling phase and quantum error correction codes are robust to both bit and phase errors.

§ COHERENCE IN MONITORED QUANTUM DYNAMICS

§.§ Resource theory of coherence

In this paper, we determine how quantum error correction requires quantum superposition and quantify exactly how much superposition is required.
We do this using the quantum resource theory of quantum coherence <cit.>, which we will outline   in this section.
We also   discuss in depth the relative entropy of coherence which provides an important and intuitive quantification of coherent superposition.

Resource theories <cit.> provide a formal setting by identifying a set of resource free states (product states for the resource theory of entanglement), a set of free operations (i.e. Local Operations and Classical Communication ), and then asks what operations and tasks are made available with the possession of a resource state (i.e. an entangled state).
The resource theory of coherence aims to quantify the resourcefulness of a state with coherent superposition in a given basis, and thus there is a different resource theory of coherence for each basis $D$.
The free states for the coherence in a basis $D$ are the set of diagonal states satisfying $\rho=\rho_D\equiv\sum_{d \in D} \rho_{dd} \ket{d}\bra{d}$ where $\{\ket{d}\}$ are the basis states of the basis $D$.
Importantly, this set of free states can not contain any pure states with quantum superposition in $D$ since such states would have off diagonal terms.

Similar to the freedom in choosing the free operations of an entanglement resource theory (local unitaries v.s. Local Operations and Classical Communication), the resource theory of coherence also has multiple choices of free operations <cit.>.
In this work, we limit our considerations to the free operations introduced in Ref. <cit.> called “Incoherent Operations”, therein defined as the set of quantum channels where each Krauss operator of the quantum channel takes diagonal states to diagonal states: $E_k \rho_1 E_k=\rho_2$ where it is required that $\rho_2$ is diagonal in the basis $D$ if $\rho_1$ is.
Such a constraint ensures that states with superposition can not be created by the set of Incoherent Operations, while at the same time is loose enough to allow maps between different basis states as required for classical computation.
This is in contrast to other choices of free operations <cit.> such as strictly Incoherent Operations <cit.> which do not allow for classical computations.

§.§.§ Relative entropy of coherence

Similar to how the resource theory of entanglement allows for a multitude of entanglement monotones (i.e. Log-negativity, relative entropy of entanglement, $\dots$), the resource theory of coherence also has a multitude of resource quantifiers <cit.>.
Here, we only consider the relative entropy of coherence because it provides an intuitive quantification for the amount of coherent superposition possessed by a given state.
The relative entropy of coherence $C(\rho,D)$ in a basis, $D$, is defined for a state $\rho$ as:

\begin{eqnarray}\label{eq:cohdef}
\end{eqnarray}

where $S(\rho)=-tr[\rho \log{\rho}]$ is the von Neumann entropy of a mixed state $\rho$ and $\rho_D$ is again the diagonal part of $\rho$ in the basis $D$.
In this work, we will focus on the Hilbert space of $L$ qubits and consider two coherence resource theories: one in the computation basis ($D=X$ basis) with basis states $\ket{x}=\ket{x_1,x_2,\dots x_L}$ and for which the Pauli $X_i$ operators are diagonal, $X_i\ket{x}=(-1)^{x_i}\ket{x}$, and one (the $D=Z$ basis) with basis states $\ket{z}=\ket{z_1,z_2,\dots z_L}$ in which the $Z_i$ Pauli operators are diagonal.
Below, we will refer to the relative entropy of coherence simply as coherence $C(\rho,D)$, and label these coherences in the $D=X$ and $D=Z$ bases as $C_x=C_x(\rho)=C(\rho,X)$ and $C_z=C_z(\rho)=C(\rho,Z)$ where the state is often implied by context.

For pure states, the coherence is equivalent to the Shannon entropy of the probability distribution for the measurement results $P(d)=\bra{d}\rho\ket{d}$ pertaining to the basis $D$.
Explicitly, $C(\rho,D)=H(P(d))$ where $H(P)$ is the Shannon entropy of a distribution $P$.
Thus, the coherence of a pure state is the amount of statistical entropy over which basis states the quantum state $\ket{\psi}$ is a superposition in.
For example, a single qubit polarized in the $+Z$ direction is an equal superposition of two $X$ basis states, and thus has coherence $C_x=1$, while a pure state polarized in the $X$ direction has zero coherence in the $X$ basis $C_x=0$.
For mixed states, consider the example of a product state of $N_x$ bits polarized in the $X$ basis, $N_z$ bits polarized in the $Z$ basis, and $M$ completely mixed bits each in a state $\rho_i=(\ket{0}\bra{0}+\ket{1}\bra{1})/2$.
Such a state has $S(\rho)=M$ due to the $M$ completely mixed bits, and $H(P(x))=N_z+M$ since both the $Z$ polarized bits and the completely mixed bits are completely uncertain about the $X$ basis states.
Thus the coherence in the $X$ basis is $C_x(\rho)=N_z$.

c]@l@Who can apply $X$-coherence
generating operations?     Section     The operation
Neither Alice nor Eve                     <ref>     N/A

Eve only                                  <ref>     $Y$ and $Z$ measurements

Alice only                                <ref>     Phase gates

Table showing which agent can apply the listed $X$-coherence generating operations in the various sections of the paper. All other circuit operations occurring in the hybrid circuit considered do not generate coherence in the $X$ basis and are therefore Incoherent Operations in the $X$ basis (free operations of the $X$ basis coherence resource theory).

§.§ Monitored quantum dynamics as an information game

In this work, we investigate an information game (see Fig. <ref>) to determine the coherence resource requirements for quantum communication in monitored quantum dynamics.
This game involves two opponents, Alice and Eve, who compete by applying random unitary and measurements in an attempt to maintain or destroy the quantum channel capacity of the resulting hybrid circuit (see Fig. <ref>).
Alice attempts to store and maintain a diary in the evolving set of qubits by applying random unitaries, and wins when the resulting hybrid circuit has a finite quantum channel capacity.
While Eve attempts to destroy the diary by applying local Pauli measurements and wins when the resulting hybrid circuit has zero quantum channel capacity.
By restricting the coherence resource generating or destroying operations of each opponent, we learn about the coherence requirements for quantum communication by observing who wins the information game.

A sensible study of a resource theory first starts with an investigation to what the resource free states and operations can accomplished, and then studies the additional tasks achievable with the aid of various resource generating operations.
Our investigation follows this approach guided by the coherence resource theory defined with the $X$ Pauli basis:
first in section <ref>, we consider games in which Alice and Eve are restricted to only perform Incoherent Operations;
then in section <ref>, we allow Eve to perform coherence generation operations;
and then in section <ref> we also allow Alice to perform coherence generation operations.

By considering the set of all possible strategies Alice and Eve can take, we consider a large class of monitored quantum dynamics.
These dynamics include Hamiltonian dynamics interspersed with measurements (Alice takes unitaries as the Trotterized evolution of a given Hamiltonian), or a given unraveling of a Lindblad modeling a generic open quantum system <cit.>.
Thus, by identifying the coherence requirements for Alice to win the game, we identify the coherence requirements for communicating quantum information in a large class of dynamics.

We first approach this problem for the hybrid circuits generated by randomly chosen unitaries and measurements, and consider the dynamics resulting from Alice and Eve playing “random strategies” in which they pick the unitaries and measurements they perform from a random distribution.
This is similar to approaches that use tools from random matrix theory to study entanglement dynamics and quantum chaos using random unitary circuits <cit.>.
Here, we also use randomness to derive general statements, and focus our investigation on coherence requirements.
Then in section <ref>, we derive lower bounds for the coherence required for Alice to win regardless of the specific strategy she takes.
In the main body of the paper, we restrict Alice and Eve to apply Clifford operations, to allow for numerical and analytic control over the problem.
In section <ref>, we discuss and speculate on the coherence resource requirements in games played with any choice of unitaries.

§.§.§ Random hybrid circuit model

[slice style=blue]

1 $n=1$      $n=2$     $n=3$     $n=4$         $n=5$   $n=6$   1         $t=2$         $\dots$

x→0                    1        $\dots$

1     -1     Z              Z           X    -1           $\dots$

Y           1                $\dots$

X              1     -1       -1                 -1       $\dots$

Z    -1           $\dots$

An example of the random hybrid circuit studied in the text. Each gate has   an effect on the coherence in either the $X$ or $Z$ basis: preserves coherence in both basis (white), generates coherence in $X$ basis (blue), or destroys coherence in either $X$ or $Z$ basis (red). At each step $n$, a CNOT gate is applied to two neighboring qubits with probability $p_u=1$, a measurement in the $X$, $Y$ and $Z$ basis is performed at a random site with probabilities $p_mp_x, p_mp_y$ and $p_mp_z$ respectively, a phase gate $R_z$ is applied with probability $p_R$, and a bit eraser error occurs with probability $p_e$. Time is measured as $t=n/L$ and since a CNOT is performed at each time step ($p_u=1$), the circuit above shows $t=2$ after $12=2L$ random CNOTs have occurred.

We first assume that Alice and Eve can only apply operations probabilistically, such that the information game can be considered as a random circuit composed of a sequence of $N$ steps, where at each step, $n$, one of the following operations are performed with a given probability:

* CNOT on random site $i$ controlling a neighboring site $j=i\pm1$ with probability $p_u$. Throughout the paper we set $p_u=1$ except in section <ref>. Such gates keep constant the coherence in the $X$ and $Z$ bases, $C_x$ and $C_z$, because they reversibly map $Z$ basis states $\ket{z_i,z_j}$ to $Z$ basis states $\ket{z_i,z_j\oplus z_i}$, and $X$ basis states $\ket{x_i,x_j}$ to $X$ basis
states $\ket{x_i\oplus x_j,x_j}$.

* measurement of a random Pauli operator $A_i$ on a random site with probability $p_m$
With probabilities $p_mp_a$, the Pauli operator $A=(X,Y,Z)$ is chosen for $a=(x,y,z)$ respectively.
The measurement destroys superposition in basis $A$ and reduces the coherence $C_a(\ket{\psi})$. Since the probabilities $p_a$ control the relative rate of measurement, we fix $p_y=1-p_x-p_z$.

* phase gate $R_z=\exp\left(i(Z_i+1)\pi/4\right)$ with probability $p_R$ which can both increase and decrease $C_x$, but keeps constant $C_z$; and

* classical bit erasers defined in section <ref> occurring with probability $p_e$.

After $n=L$ steps, $L$ CNOTs will have been applied ($p_u=1$),   so we measure time in units of $L$ steps, $t=n/L$.
An example random circuit is shown in Fig. <ref>, and which operations are studied in which section is summarized in Table. <ref>.
Since the CNOTs and $X$ measurements don't generate coherence in the $X$ basis, they are free operations for the coherence resource theory in that basis.
While projective measurements of the $Y_i$ or $Z_i$ Pauli operator force the $i^{th}$ site to contribute $1$ bit to the relative entropy of $X$ coherence, possibly increasing coherence, and are therefore not free operations of the $X$ coherence resource theory.
While our approach focuses on the coherence in the $X$ basis, their exists a duality for CNOT gates which allows equal considerations for the coherence in the $Z$ basis: a CNOT gate on site $i$ controlling $j$ in the $Z$ basis is equivalent to a CNOT gate on site $j$ controlling site $i$ in the $X$ basis.
This is particularly useful in section <ref> where we will discuss $C_x$ and leave implicit the dual result for $C_z$.

Finally, we assume that Alice knows the site and Pauli operator of all measurements performed, and records all their outcomes.
In this way, she can keep track of the pure state which evolves in her qubits and potentially decode with a unitary operation at the end of the game.
To identify her capability to decode, we will consider information quantifiers computed on the pure states and averaged over circuit realizations and possibly the measurement outcomes.
For an experiment to observe the information quantifiers for one of the pure state produced (corresponding to a fixed set of measurements) they must repeat the experiment multiple times and wait for the same fixed set of measurement outcomes to occur again.
This procedure, called postselection, requires repeating the experiment a number of times exponentially large in the number of measurements performed and is a known <cit.> obstacle for observing measurement-induced phase transitions.
For the purposes of this work, this obstacle is not particularly relevant, because 1) the circuits we consider can be simulated efficiently on a classical computer, and 2) the goal of our work is to identify the role of coherence in quantum communication as apposed to study quantum complexity.

§.§ Stabilizer state tools

All gate operations discussed in this article, and presented in the section <ref>, are either part of the Clifford unitary group or are measurements of Pauli operators.
This allows <cit.> us to simulate the dynamics of these circuits efficiently using stabilizer states.
Throughout, all numerical results presented are averaged over $O(2\times 10^3)$ circuit realizations and all possible measurement outcomes for each circuit.
The latter is possible because while different measurement outcomes, do result in different states, they do not result in different entanglement entropies for Clifford circuits.
The stabilizer state tools also provides us with a strong analytic method to make predictions about the dynamics of these circuits.
The details of these arguments are presented in the appendices.

§.§ Unitary limit of coherence non-generating dynamics

If Alice is limited in her ability to produce superposition states, then she will generally be limited in what type of information she can encode.
For example, even if Eve is not interfering with her qubits, $p_e=p_m=0$, then Alice is still limited in the amount of entanglement she can generate if she is restricted to performing the free operations of either the $X$ and $Z$ coherence resource theories.
This constraint, previously understood in a general setting <cit.>, takes the following particularly useful form of the following theorem:

Given any local Pauli basis $D$, over $L$ qubits, and a pure state $\ket{\psi}$, the von Neumann entanglement entropy $S(\rho_r)$ for the reduced density matrix $\rho_r=\Tr_{A^c}[\ket{\psi}\bra{\psi}]$ of any subsystem $R$ is bounded by the coherence of the local Pauli basis:

\begin{eqnarray}\label{eq:entrpbound}
S(\rho_r) \leq C(\ket{\psi},D).
\end{eqnarray}

Here a Pauli basis $D$ is any basis diagonal in a set of chosen Pauli operators $\{A_i\}$ with $i\in(1\dots L)$ and $A_i\in (X_i,Y_i, Z_i)$.

Proof The proof is given by the set of inequalities $C(\ket{\psi},D)=H\left(P\left(d\right)\right)\geq H\left(P_r\left(d_r\right)\right)\geq S\left(\rho_r\right)$ where $P_r\left(d_r\right)$ is the marginal distribution of the $P\left( d \right)$ defined on the subsystem $R$, $S(\rho)$ is the von Neumann entropy and $H(P)$ is the Shannon entropy. The first inequality is because the Shannon entropy of a bipartite distribution is greater than any of its marginals, and the second inequality follows from the data processing inequality for the von Neumann entropy <cit.>, which states the von Neumann entropy is constant or increasing under any CPTP map.  Here the CPTP map is taking the diagonals of $\rho_r$ in the Pauli basis $d_r$: $\rho_r\rightarrow \sum_{d_r}\ket{d_r}\bra{d_r} \bra{d_r}\rho_r\ket{d_r}=\rho_{dr}$.  The second inequality then follows from $H(P_r(d_r))=S(\rho_{dr})\geq S(\rho_r)$.

Therefore, if Alice is only able to apply CNOTs (free operations in both the $X$ and $Z$ coherence resource theory), then she will not be able to increase the coherences $C_x$ or $C_z$, and the entanglement of the states she can produce will be limited accordingly (i.e $S(\rho_r)\leq \min(C_x,C_z)$).
This constraint is explicitly revealed in the steady state entanglement of the random circuit containing only CNOTs ($p_m=p_e=p_R=0$).
In this circuit, the coherences $C_x$ and $C_z$ are conserved quantities since the CNOTs neither increase nor decrease the coherence in the $X$ or $Z$ basis.
In conjunction with the above theorem, the conservation of $C_x$ and $C_z$ implies that the von Neumann entropy of any subsystem is bound by the coherence $C_x$ and $C_z$ in the initial state.
If we consider an initial product state with $N_x$ qubits polarized in the $X$ direction and $N_z=L-N_x$ qubits polarized in the $Z$ direction, we find that the coherences at all times is $C_x=N_z$ and $C_z=N_x$.
At late times, the CNOTs gates drive the system through an exponentially large in $L$ number of states, most of which are maximally entangled subject to the bound in Theorem <ref>.
In addition to this bound, the entanglement entropy of any given subregion $A$ of the system is limited by the size of that subregion: $S(\rho_r)\leq |A|$.
Combining these two bounds, we predict that the entanglement entropy of a region between sites $1$ and $x$ is

\begin{eqnarray}\label{eq:maxentg}
\end{eqnarray}

This is confirmed in Fig. <ref>, where we show that the late time entanglement entropy, $S(x)$ for $L=64$ site system with $C_x\leq C_z$ and demonstrate that the bound $C_x\geq S(\rho_r)$ is saturated for any subsystem with size $|A|\geq C_x$.

Late time entanglement distribution for the random CNOT circuit ($p_m=0$, $p_R=0$ and $p_e=0$). For such a CNOT circuit, the coherence $C_x$ is conserved, and the coherence of the initial state is shown in the legend. At late times, the above entanglement distribution can be predicted under the assumption that the entanglement in a region is maximized subject to the constraint given by Theorem <ref>.

§ COMMUNICATION IN COHERENCE LIMITED RANDOM CIRCUITS

§.§ Alice protects a classical diary

We begin our investigation by considering what type of information Alice can protect if she only has access to $X$ coherence-free states, with $C_x=0$, and is only able to apply Incoherent Operations in the $X$ basis.
From Theorem <ref>, she is unable to produce entangled states from pure states (and more generally from mixed <cit.>), and is therefore unable to encode information non-locally.
Furthermore she cannot even create superposition in the $X$ basis and so cannot encode quantum information locally.
In this section, we will show that while she cannot protect quantum information, she is able to encode and protect classical information given that Eve is limited in the rate at which she can induce errors in Alice's qubits.

First imagine that Alice prepares an X-basis state, $\ket{x}$, encoding some classical information in a classical bit string $x=(\mathit{x_1,x_2,\dots x_L})$ with bits $\mathit{x_i}\in(0,1)$.
Eve then begins an attack by applying bit erasers at random sites, such that Alice's $i^{th}$ bit evolves as $\mathit{x_i}\rightarrow 0$ when the bit eraser is applied there.
In this section, we model this attack using a local quantum channel with Kraus operators $E_{1,i}=\ket{0}_i\bra{0}_i$ and $E_{2,i}=\ket{0}_i\bra{1}_i$ where $\ket{0}_i$ and $\ket{1}_i$ are the eigenstates of $X_i$.
In the next section we describe how this channel can be implemented using measurements.
Since this channel can only destroy coherence, it is a free operation of the $X$ coherence resource theory, and the coherence in the $X$ basis will remain $0$ after the random sequence of CNOTs and bit erasers.
Furthermore, these operations map $X$ basis state to $X$ basis state, and the evolution of the qubits is described by a sequence of classical maps between $X$ bit strings $x_n\rightarrow x_{n+1}$.
Accordingly, these dynamics can be considered a classical limit of the hybrid quantum circuits previously discussed.

We now consider the dynamics when random strategies are played, and identify the maximum rate at which Eve can create errors such that Alice is able to protect her classical diary by applying the sequence of random CNOTs.
We will use the classical mutual information, which is the unique quantifier of classical channel capacity <cit.>, in order to quantify the number of classical bits she can protect.
Such a channel capacity will vary in each random realization of the random circuit, and for a specific realization, we can define a classical map $x_0\rightarrow x_n=f_n(x_0)$ on the bit strings $x_0$ which gives how an initial basis state $\ket{x_0}$ maps to the basis state $\ket{x_n}$ at time $n$. Then, given a distribution of initial state bit strings $P_0(x)$, the classical mutual information is defined using the joint distribution $P_{0,n}(x_0,x_n)=P_0(x_0)\delta\left(x_n-f_n\left(x_0\right)\right)$ and the final distribution $P_n(x_n)=\sum_{x_0}P(x_0,x_n)$:

\begin{eqnarray}
\end{eqnarray}

where $H(P)$ is the Shannon entropy of the distribution $P$.
Due to the noisy-channel coding theorem <cit.>, the mutual information, maximized over all distributions $P_0$, provides an upper bound on the average number of bit in the initial state $x_0$ that can be reliably recovered from the final state $x_n$.
In Fig. <ref> we show the classical channel capacity for the $C_x=0$ hybrid circuit and demonstrate that Alice can indeed protect classical information at long times, so long as the rate at which Eve can attack her qubits is limited (i.e. $p_e<0.1$).
At $p_e\approx 0.1$, the circuit undergoes a phase transition from a finite channel capacity to vanishing channel capacity.
Such a result was computed by studying the purification of an initially mixed state similar to results for quantum channel capacity <cit.>.

Classical, $I_x$, and quantum, $\mathcal{C}$, channel capacities of a random hybrid circuit composed of CNOTs and coherence-maintaining bit erasers as a function of $p_e$ for different lengths $L$ shown in the legend.
The random hybrid circuit is composed of first a set of $t=40L$ CNOT gates followed by the hybrid circuit ($p_m=p_R=0$) for a time $t=10L$.
The channel capacities were computed via purification dynamics with $A=10$ ancillas.
Depending on if the initial state has classical or quantum correlations, the dynamics of the purity determine the classical channel capacity $I_x$ or the quantum channel capacity $\mathcal{C}$.
As discussed in the text, they are the same, $I_x=\mathcal{C}$,  when we consider a channel composed of CNOTs and coherence-maintaining bit erasers.

§.§.§ Purification transition for classical circuits

In Refs. <cit.>, the measurement-induced phase transition in the quantum channel capacity of a given circuit was related to the purification dynamics of an initial mixed state evolved under that same circuit.
In the coherence-free circuits, a similar relation also holds for the classical channel capacity.
We derive this relation by introducing a set of ancilla bits, $A$, used to store $\left|A\right|$ classical bits of the initial state of the system and which do not undergo any dynamics as the system, $S$, evolves under the random hybrid circuit.
For studying the classical channel capacity this classical memory is archived by initializing the system in the correlated state:

\begin{eqnarray}\label{eq:classpurinit}
\rho_{SA}(n=0)= \frac{1}{2^A}\sum_{x\in S_a}\ket{x,x,0}\bra{x,x,0}
\end{eqnarray}

where $S_a$ is all $2^A$ bit strings of length $\left|A\right|$, and $\ket{a,s_1,s_2}$ (equivalently $\bra{a,s_1,s_2}$) is an $X$ basis state of the system and ancilla with the ancilla bit string, $a$, the first $\left|A\right|$ bits of the system $s_1$, and the last $L-\left|A\right|$ bits of the system $s_2$.
Such a mixed state has system $S$, ancilla $A$ and the joint system and ancilla $A\cup S$ in a mixed state with von Neumann entropy $S(\rho_S)=S(\rho_A)=S(\rho_{AS})=\left|A\right|$.
Since the density matrix is diagonal in the $X$ basis, the Shannon entropy for the $X$ basis states is equivalent to the von Neumann entropy, and the  mutual information between system and ancilla is therefore $I_x=\left|A\right|$, reflecting the fact the ancilla remembers perfectly the initial state of the system.
After evolution of the random hybrid circuit, the system-ancilla state evolves to

\begin{eqnarray}\label{eq:classev}
&\frac{1}{2^A}\sum_{x\in S_a}\ket{x,f_n\left(\left(x,0\right)\right)}\bra{x,f_n\left((x,0)\right)}
\end{eqnarray}

where $\ket{x,f_n((x,0))}$ is an $x$ basis state with the ancilla in state $a=x$ and the system is in state $(s_1,s_1)=f_n((x,0))$.
Such a state still has ancilla and joint entropy $S(\rho_A)=S(\rho_{SA})=\left|A\right|$, but with classical mutual information $I_x=S(\rho_S)$ that depends on the channel capacity of the classical evolution $f_n((x,0))$.
If the channel capacity (classical mutual information) goes to $0$, then the entropy of the system $S(\rho_S)=I_x$ also goes to $0$ and the system purifies.
While instead, in the error protecting phase, the system remains mixed with $S(\rho_S)=I_x>0$.
The transition between the two phase has been argued to be within the directed percolation universality class <cit.>.

§.§ Alice protects a quantum diary against coherence preserving errors

While in the last section, we concluded that Alice can not encode quantum information without being able to generate $X$ coherence, we can still ask if she can protect a state that already is encoding quantum information.
Specifically, we now investigate the restrictions that must be placed on Eve's bit eraser procedure such that Alice, given a quantum state with coherence $C_x>0$, can protect quantum information encoded in that state.
While above we determined that the random CNOTs allow memory of an initial $X$ basis state, we are now interested if they can also remember an arbitrary superposition of a set of the $X$ basis states at late times.
As we will see below, this extra requirement translates to an extra requirement on how the bit erasers are implemented.

If we take the quantum bit eraser with Kraus operators $E_{1,i}$ and $E_{2,i}$, then they will destroy coherence and quickly erase any superposition in the initial state.
This is seen by the following measurement implementation of these Kraus operators:

* measure $X_i$;

* flip $X_i$ if $\mathit{x_i}=1$;

* forget measurement outcome $\mathit{x_i}$ (don't perform postselection);

which acts on the state $\ket{\psi_c}=\psi_1\ket{\phi_1,1}+\psi_0\ket{\phi_0,0}$ as:

\begin{eqnarray}
\ket{\psi_c}\bra{\psi_c}\rightarrow \left|\psi_1\right|^2 \ket{\phi_1,0}\bra{\phi_1,0}+\left|\psi_0\right|^2 \ket{\phi_0,0}\bra{\phi_0,0}
\end{eqnarray}

Notice, that while forgetting the measurement outcome is required to implement the Kraus operators, the coherence is still destroyed if the measurement outcome is recorded and postselected.
We will refer to the channel without postselection as the quantum bit eraser, and the channel with postselection as the coherence-destroying bit eraser.

Difference in quantum channel capacity $\mathcal{C}$ between the coherence-maintaining bit eraser and coherence-destroying bit eraser for a system of $L=128$ bits for $p_e=0.02$. After $t=\left|A\right|=10$ coherence-destroying bit erasers are applied, the coherence and quantum channel capacity approaches zero. For $p_e=0.02$ this occurs at times $t=10/p_e/L\approx 4$ as shown in the plot.

This is in contrast to the coherence-maintaining bit eraser which is implemented by the following sequence of measurements and unitaries:

* measure $Z_i$;

* post select the outcome $z_i=1$;

* measure $X_i$;

* flip $X_i$ if measurement outcome was $\mathit{x_i}=1$;

which has an action on the state $\ket{\psi_c}$ as:

\begin{eqnarray}
\ket{\psi_c}\rightarrow \left(\psi_1\ket{\phi_1}+\psi_0\ket{\phi_0}\right)\otimes\ket{0}
\end{eqnarray}

and preserves coherence so long as  $\braket{\phi_1}{\phi_0}=0$.
For example, take $\ket{\psi_c}$ as the Bell state $\ket{\psi_c}=(\ket{00}+\ket{11})/\sqrt{2}$ which has one bit of coherence in the $X$ basis when $\ket{00}$ and $\ket{11}$ are $X$ basis states.
After performing the coherence-maintaining bit eraser on the first site, the state $\ket{\psi_c}$ becomes $(\ket{00}+\ket{01})/\sqrt{2}$ which still has $C_x=1$.
This is contrast to the coherence-destroying bit eraser, for which the $X_1$ measurements learns the $X_2$ state of the first qubit and reduces the coherence to $C_x=0$.

The difference is revealed by considering the quantum purification transition which is directly related to a transition in the quantum channel capacity, and will allow us to identify which bit eraser efficiently destroys quantum information.
In the quantum purification transition, instead of initializing the system and ancilla with the classically correlated mixed state in Eq. <ref>, the system is initialized in the entangled state:

\begin{eqnarray}~\label{eq:entangled}
\ket{\psi_{SA}}(n=0)=\frac{1}{2^{\left|A\right|}}\sum_{x\in S_a}\ket{a=x,s_1=x,s_2=0}
\end{eqnarray}

such that the ancilla is now remembering the initial quantum state of the first $\left|A\right|$ system bits.
Note that as in the classical case, the purpose of the ancilla is only to encode the initial state and accordingly, no gates or measurements are applied to it as the hybrid circuit evoles.
While the system reduced density matrix still has no coherence, the system and ancilla together have coherence $C_x=\left|A\right|$ reflecting the encoding of quantum information; this is contrast to the state encoding of classical information in Eq. <ref>, which has $C_x=0$.
The quantum channel capacity is then quantified by the coherent information <cit.>,  $\mathcal{C}=S(\rho_S)-S(\rho_{SA})$, and so long as the system-ancilla remains pure (as is the case for the coherence preserving and destroying bit erasers) then $S(\rho_{SA})=0$ at all time such that the coherent information is $\mathcal{C}=S(\rho_S)=S(\rho_A)$.
Such a quantum channel capacity gives
an upper bound on the number of qubits of the initial quantum state recoverable from the final quantum state of the system <cit.>.

For the coherence preserving bit eraser, the dynamics of the system reduced density matrix is equivalent to that discussed in section <ref> and thus give $S(\rho_S)=I_x$ as before, but now $S(\rho_{SA})=0$ such that $\mathcal{C}=S(\rho_S)=I_x$.
Thus, for the coherence preserving bit erasers, the system protects quantum information as long as it protects classical information.
In contrast, for the coherence destroying bit eraser, the state $\rho_{SA}$ loses $X$ coherence after $O(\left|A\right|)$ bit erasers, and becomes an $X$ basis state with zero entanglement between system and ancilla.
Thus, the system and ancilla purify, coherent information is lost $\mathcal{C}\rightarrow 0$, and Alice is unable to recover her quantum diary.
This distinction in the dynamics of the coherent information between the two types of errors is shown in Fig. <ref>.

§.§ Dynamically evolving classical codes

Before continuing our discussion on the information game played between Alice and Eve, we will first discuss how the above results in section <ref> and section <ref> are directly related to error correction codes.
We will first make the connection explicit by showing the dynamics above can be interpreted as the dynamics of a classical code space and by describing how this code space evolves.
Then, we will argue that Alice's classical diary is encoded in this space, while her quantum diary would be a superposition over states in this space similar to the design of the repetition code.
This connection between the coherence-free hybrid circuits and repetition codes, which can only correct bit errors, hints at the first connection between coherence and the type of errors a code can correct.
We will then continue discussing the information game in section <ref> where we allow Eve to apply coherence generating measurements.

The connection between error correction codes and the dynamics in the above section is because the purification dynamics of the mixed state on Alice's system $\rho_S=\Tr_A{\rho_{SA}}=\Tr_A{\ket{\psi_{SA}}\bra{\psi_{SA}}}$ map directly to the evolution of a classical linear code space.
In particular, we show that the reduced state of the system, $\rho_{S}(n)$,  discussed in section <ref> and section <ref>, can be written in the following form (See Appendix <ref> for proof):

\begin{eqnarray*}
\rho_S(n)=\frac{1}{2^{k_n}}\sum_{x}\ket{x}\bra{x}\prod_{i=1}^{L-k_n}\delta\left(\sum_j H^x_{ij}(n)x_j\right)
\end{eqnarray*}

where $H^x_{ij}(n)$ is an $L-k_n$ by $L$ matrix describing the allowed $x$ basis states in $\rho_S(n)$, and $k_n=S(\rho_S(n))$.
This expression shows that only basis states that satisfy the constraint $\sum_j H^x_{ij}(n)x_j=0$ are allowed to occur in the evolving mixed state, and that these basis states all have equal probability of occurring.
Since this constraint has the same form as the parity check matrix determining the code words in a classical linear code space <cit.>, we can consider the dynamics of the state $\rho_S(n)$ as the dynamics of a classical linear code space, $\mathcal{K}^{x}(n)$, composed of those code words.
Remember here that a code space is defined as the set of bit strings, $\mathcal{K}^x(n)$, that can be used to encode a message, and that the code space can be defined by a check matrix, $H^x$, as the set of bit strings satisfying the above constraint: $x\in\mathcal{K}^x(n)$ if and only if $\sum_j H^x_{ij}(n)x_j=0$ for all $i$.

When a random sequence of CNOTs is applied to the state, the different code words evolve under the same random sequence of CNOT gates, and the difference between the code words, measured by the Hamming distance $d(x_1,x_2)=\sum_i\left|x_{1,i}-x_{2,i}\right|$ generically increases.
On the other hand, a bit eraser on the $i^{th}$ bit will decrease the Hamming distance between two code words with $x_{1,i}\neq x_{2,i}$.
If there are too many bit erasers, the Hamming distance between two different code words will shrink to zero, and those two code words will become the same bit string.
When this occurs, the number of distinct code words, $S(\rho_S)$, will decrease resulting in the system purifying and a loss of channel capacity $I_x=S(\rho_S)$.
Thus, the loss of channel capacity is equivalent to the shrinking of the evolving classical code space.

Finally, by considering the full ancilla and system state, we can see that Alice's diary is encoded in this classical code space.
That is, any $k$ bit classical message she wishes to encode can be represented in her system by one of the classical code words in the evolving code space.
By considering the system and ancilla state in Eq. <ref>, we find that the initial basis state of the system $\ket{(x,0)}$ is mapped to the basis state $\ket{f_n\left( \left(x,0\right) \right)}$ at a later time.
Upon tracing out the ancilla, we find $\ket{f_n\left(\left(x,0\right)\right)}$ must be an allowed basis state and lives in the classical code space $\mathcal{K}^x(n)$.
Thus, if Alice encodes a $k$ bit message in initial state $\ket{(x,0)}$, then that message will become encoded in the evolving code space $\mathcal{K}^x(n)$.
Similarly, Alice's quantum diary would be encoded on some superposition of code words in the evolving code space.

This is similar to how a quantum bit in the repetition code is encoded in the classical code space with code words $x_1=(111\dots)$ and $x_0=(000\dots)$.
Notice that in both the information game and in the repetition code, bit flip errors can be corrected but only if they don't include a phase or decoherence error.
In the information game, we showed the issue was Alice's inability to maintain and regenerate coherence, and by analogy we should expect coherence can also provide a more general context for why the repetition code can't correct phase errors.
Below, in section <ref>, we show that this more general context is the Theorem <ref> which gives how coherence bounds the code distance of a quantum error correction code.

§ MEASUREMENT INDUCED DYNAMICS OF COHERENCE

In the previous section, both Alice and Eve were restricted to applying Incoherent Operations in the $X$ basis, and depending on whether Eve performed a coherence-destroying or coherence-maintaining bit eraser, Alice was able to protect a quantum diary.
In this section, we will allow Eve to make $Y$ and $Z$ measurements which are not Incoherent Operations in the $X$ basis and can potentially increase the coherence in Alice's system.
While this would not be an optimum strategy for Eve, she may not have control over which basis she measures in and we can therefore investigate if Alice can take advantage of coherence generating measurements.
Below, we find that this is the case, and show that Alice can protect a quantum diary when Eve performs $Y$ measurements at a sufficiently high rate $p_y>\left|p_x-p_z\right|$.

We start by investigating how the coherence of a pure state evolves under such a random hybrid circuit generated by Alice and Eve playing random strategies.
For Alice to be able to take advantage of the coherence generated by the measurements, then the steady state coherence in the $X$ and $Z$ basis, $C_x$ and $C_z$, must scale with system size.
Otherwise, the entanglement will be constrained, via Eq. <ref>, to be sub-extensive, Alice will only be able to encode information locally, and her diary will be susceptible to local errors.

§.§ Measurement only limit

We begin by considering the dynamics in the measurement-only limit ($p_u=p_R=p_e=0$ and $p_m=1$) for an initial product state with $N_x$, $N_z$ and $N_y=L-N_x-N_z$ qubits polarized in either the $X$, $Z$ or $Y$ directions respectively.
In this limit, the evolving state remains a product state, but with a different number of qubits polarized in a given direction.
States of this form have $N_y+N_z$ qubits uncertain in the $X$ direction and therefore have $C_x=N_y+N_z=L-N_x$ qubits of $X$ coherence.
Similarly for the coherences in the $Z$ and $Y$ directions: $C_z=L-N_z$ and $C_y=L-N_y=L-C_x-C_z$.

The coherences then evolve according to how the number of qubits polarized in a given direction is randomly updated after a given measurement.
At each step, $n$, a random measurement is made and the number of qubits polarized in a given direction, $N_\alpha$, can change by at most one.
Whether they change or not depends on the type of measurement made and the probability that measurement is made on a site polarized in a direction different from the measurement basis.
That probability depends only on the value of $N_\alpha$ before the measurement and so the stochastic process for which $N_{\alpha}$ are updated is Markovian.
The conditional probabilities of this process are derived in Appendix <ref> and lead to the following rate equation:

\begin{eqnarray}\label{eq:rateeq}
\partial_m \overline{N}_x(m)=p_x \frac{L-\overline{N}_x}{L} - \left(p_z+p_y\right)\frac{\overline{N}_x}{L},
\end{eqnarray}

with similar equations for $\overline{N}_y$ and $\overline{N}_z$, and where the overlie in $\overline{N}_\alpha$ refers to averaging over circuit realizations.
Importantly, the rate at which $\overline{N}_x$ increases or decreases depends on the number of qubits already polarized in the $X$ direction.
This follows from the fact that the effect of a measurement depends on the polarization of the bit it is applied to: $X$ measurements only increase $N_x$ if they are applied to a $Y$ or $Z$ polarized bit.
The steady state solution to these dynamics predicts the average steady state density of $\alpha$ polarized qubits is equal to $p_\alpha$ as intuitively expected: $\overline{N}_\alpha=p_\alpha L$ or equivalently for the coherences $C_{\alpha}=\left(1-p_{\alpha}\right)L$.
Thus, if the dynamics of coherence in the measurement-only limit were robust to the addition of unitary gates, Alice may be able to make use of the volume-law coherence to encode states non-locally.

§.§ Random walk of coherence in weak measurement limit

Cartoon of the random walk in the information known about the $X$ and $Z$ basis: $N_x=L-C_x$ and $N_z=L-C_z$ respectively. A measurement in the $X,Y$ or $Z$ direction occurs with probability $p_x$, $p_y$, and $p_z$, creating jumps in information known about each basis $N_x$ and $N_z$ as shown. The walker can not go above the line $N_x+N_z=L$ because the incompatibility between the $X$ and $Z$ observables restrict the total amount of information known about the $X$ and $Z$ bases. The walker localizes in one of the corners of the plane depending on which which measurement rate dominates (shown in red, yellow and blue).  When $Y$ measurements dominate, information about the $X$ basis and $Z$ basis is lost and the walker localizes in the $(N_x,N_z)=(0,0)$ corner.  While when $Z$ or $X$ measurements dominate, information about the $X$ or $Z$ basis becomes maximum and the walker localizes in the respective corners.

Unfortunately for Alice, this is not the case as shown by studying the weak measurement limit where the measurement rate $p_m$ is so small that the system maximizes entanglement with respect to the bounds given by coherence (c.f. Eq. <ref>).
In this limit, the coherence dynamics again becomes Markovian because, as we show in Appendix <ref>, every measurement changes the coherence in the $X$, $Y$ or $Z$ basis independently from the current coherence in the system.
Roughly, this can be expected because any time a measurement occurs in this limit, each qubit will be in a maximally mixed state (as long as $\min(C_x,C_z)>1$) and a measurement on any qubit is guaranteed to have an uncertain outcome and change the state and coherence.
This is in contrast to the measurement-only limit where the effect of a measurement strongly depends on the current coherences in the system.
This limit occurs when, between measurements, there are enough CNOTs performed to guarantee that a sequence of CNOTs can entangle any two distinct qubits within the system. This will occur after $n=O(L^2)$ CNOT gates and thus we require that $p_m<1/L^2$.

In Appendix <ref>, we derive the Markov stochastic process for $N_x$ and $N_z$, where instead of being the number of qubits polarized in the $X$ or $Z$ direction, $N_x=L-C_x$ and $N_z=L-C_z$ are now, more generally, the number of bits of information that can be specified about the $X$ or $Z$ basis states.
Where as $C_{x(z)}$ gives the entropy, or the number of uncertain bits, of a given state's distribution in the over the $X(Z)$ basis, $N_x=L-C_x$ give the lack of entropy, or the number of bits known about the basis states.
We find that the stochastic process is a biased random walk in the $(N_x,N_z)$ plane, subject to the bounds $0\leq N_{x(z)} \leq L$ and $N_x+N_z\leq L$ and is described in Fig. <ref>.
The direction of the drift velocity of the walker is determined by the relative rates of the measurements and yields the rate equations:

\begin{eqnarray}\label{eq:rateeq2}
\partial_m \overline{N}_x(m)\sim p_x  - p_z - p_y, \\ \nonumber
\partial_m \overline{N}_z(m)\sim p_z  - p_x - p_y.
\end{eqnarray}

These rate equations predict that when $p_x>p_z+p_y$, the probability distribution for the walker localizes around the point $(N_x,N_z)=(L,0)$ with a localization length  proportional to $\lambda\sim1/(p_x-p_z-p_y)$.
Since the rates of the Markov process are constants, the localization length does not depend on system size such that $\overline{N}_x=L-c\lambda$ and so the average coherence $\overline{C}_x=c\lambda$ becomes an area-law, where the constant $c$ depends on the detailed features of the walker distribution.
In this limit the evolving quantum state is mostly classical in the $X$ basis and, by Theorem. <ref>, can only support area-law scaling of entanglement.
Thus, Alice will not be able to encode quantum information non-locally and her diary will be susceptible to local errors.
Similarly, when $p_z>p_x+p_y$, the walker localizes around the point $(N_x,N_z)=(0,L)$; the coherence $C_z\rightarrow 0$; states become classical in the $Z$ basis; and volume-law states are again forbidden.
Again, Alice will not be able to protect a quantum diary.

In the region $p_x>p_z+p_y$, the walker becomes less localized as $p_x$ is decreased, until the point $p_x=p_z+p_y$ at which the localization length diverges and the walker distribution becomes uniformly distributed along the $N_z=0$ axis.
At this critical point of the random walk, the coherence in the $Z$ direction remains maximal $\overline{C}_z\sim L$, while the average coherence in the $X$ direction becomes $\overline{C}_x=\overline{N}_x=L/2$ giving rise to the possibility of volume states and the ability of Alice to protect quantum information.
Decreasing $p_x$ further, the walker becomes localized around the point $(N_x,N_z)=(0,0)$ where both coherences are scaling with volume and volume-law entangled states will be allowed.
In this limit, $p_y>\left|p_x-p_z\right|$, Alice has access to volume-law coherence and can potentially use it to protect a quantum diary.

These three limits are summarized in Fig. <ref>, where we describe the regions of the $\left(p_y,\Delta_x=(p_x-p_z)/(1-p_y)\right)$ plane where $C_x\rightarrow0$ (X-classical states appear), $C_z\rightarrow0$ (Z-classical states appear) and where both coherences scale with the volume of the system (region labeled “Quantum”).
In this “Quantum” region, volume-law entangled states are possible and, as we show in the next section, Alice is able to protect quantum information.

§.§ Entanglement criticality at finite measurement rate

(a) Steady state half cut entanglement, $S(x=L/2)$, and (b) coherence, $C_x$, for the hybrid circuits with a sequence of random CNOTs and $X$, $Y$ and $Z$ measurements for the small measurement rate of $p_m=0.01$ ($p_R=0$ and $p_e=0$). In these figures $\Delta_x$ parameterizes the imbalance between $X$ and $Z$ measurements $\Delta_x=(p_x-p_z)/(1-p_y)$. These figures show the critical line (white), $\left|\Delta_x\right|=p_y/(1-p_y)$, which is predicted by the competition between coherence loss and growth rates as discussed in the text.  Due to the duality between the $X$ and $Z$ bases, dynamics are the same for $\Delta_x\rightarrow -\Delta_x$.  For the $\Delta_x>0$ side of the duality, the coherence in the $Z$ basis, $C_z$, is greater than $C_x$ and does not constrain the entanglement. These figures were computed with $L=128$ and averaging over $2000$ circuit realizations.

While the above discussion relies on assumptions valid only when $p_m<1/L^2$, it appears to qualitatively capture numerical simulations for finite $p_m=0.01$.
In Fig. <ref>, we plot the $X$ coherence, $C_x$, and half cut entanglement entropy, $S(L/2)$, in the $(p_y, \Delta_x)$ plane and find both have a sharp change at $p_x=p_y+p_z$.
When $p_y>\left|p_x-p_z\right|$, we observe both $C_x>L/2$ and $C_z>L/2$, while instead when $p_y < \left|p_x-p_z\right|$, one of the coherences drops below $L/2$ consistent with the above predictions for $p_m<1/L^2$.
This sharp change in coherence is accompanied by a transition from volume-law entanglement, $S(L/2)\sim L$, in the region $p_y>\left|p_x-p_z\right|$ to area-law entanglement in the region $p_y < \left|p_x-p_z\right|$.
Furthermore, we observe in Fig. <ref>, and discuss further in section <ref>, that in the quantum phase, $p_y>\left|p_x-p_z\right|$, Alice is able to protect a quantum diary with a number of qubits scaling with system size.
The main difference from the weak measurement limit, where $p_m$ vanishes in the infinite size limit (i.e. $p_m\rightarrow 1/L^2$), is that the coherences remain volume-law throughout the phase diagram.
We explain this discrepancy by deriving, in appendix <ref>,  a phenomenological rate equation for the finite measurement rate $p_m$ that interpolates between the measurement-only limit and vanishing measurement limit.

This rate equation is constructed by introducing  a length scale $\xi$, associated to the typical distance at which two qubits might be entangled.
More precisely, it is the typical length <cit.> of a stabilizer (see appendix <ref>), and scales with the half cut entanglement entropy $S(L/2)\sim \xi$.
Under this assumption, we derive a rate equation for the dynamics of the coherence:

\begin{eqnarray}\label{eq:ratexi}
\partial_m\overline{N}_x=p_x\left(1-\left(\frac{\overline{N}_x}{L}\right)^\xi\right)-p_z\left(1-\left(\frac{\overline{N}_z}{L}\right)^\xi\right)\\ \nonumber
-p_y\left(1-\left(\frac{L-\overline{N}_x+\overline{N}_z}{L}\right)^{\xi}\right) .
\end{eqnarray}

In a volume-law phase, this length diverges with system size, $S(L/2)\sim \xi \sim L$, such that the phenomenological rate equation is equivalent to Eq. <ref> as $L\rightarrow \infty$.
If $p_y>\left|p_x-p_z\right|$ then the steady state of this rate equation is consistent with the assumption of a volume-law phase.
Instead, if $p_y<\left|p_x-p_z\right|$, then Eq. <ref> predicts the coherence and entanglement entropy becomes area-law, such that $\xi\sim S(L/2)$ must scale as constant with system size.
Thus, when $p_y<\left|p_x-p_z\right|$ only area-law entanglement is consistent, and the predictions for the entangling phases at $p_m\rightarrow 1/L^2$ hold at finite $p_m$.
The main difference is that $\xi$ is now finite when $p_y<\left|p_x-p_z\right|$, such that the rate Eq. <ref> predicts volume-law coherence consistent with numerical simulation.

a) Half cut entanglement entropy $S(L/2)$ v.s. imbalance between $X$ and $Z$ measurements $\Delta_x=(p_x-p_z)/(1-p_y)$.  The $\Delta_x=1/3$ critical point predicted by $p_y=\left|p_x-p_z\right|$ is confirmed by the b) Anti-podal mutual information $I_2$  and b) triparitite mutual info $I_3$ as discussed in the text. Different lines correspond to the system sizes shown in the legend. In this figure $p_m=0.01$, $p_y=1/4$ and $p_R=p_e=0$.

In Fig. <ref>, we confirm precisely the prediction for the critical point $p_y=\left|p_x-p_z\right|$ when measurements in the $Y$ direction are fixed at a rate $p_y=1/4$.
There, we observe a transition between area-law and volume-law entanglement at the critical point $\left|\Delta_x\right|=\left|p_x-p_z\right|/(1-p_y)=1/3$ as predicted.
Near the critical point, $\Delta_x\approx 1/3$, we find entanglement scaling logarithmically with system size which creates finite sizes obstacles <cit.> to an accurate determination of the critical point.
Accordingly, we consider the anti-podal mutual information, $I_2$, and the tripartite mutual information, $I_3$, to obtain circumvent these finite size effects as done in Refs. <cit.>.
The anti-podal mutual information is computed as $I_2=S\left(\rho_{R_1}\right)+S\left(\rho_{R_3}\right)-S\left(\rho_{R_1\cup R_3}\right)$, where the regions $R_n$ contain the sites from $(n-1)L/4$ to $nL/4$.
This quantity is a constant when the entropies follow either volume or area-law, but scales logarithmically with $L$ if the entropies of the different subregions scale logarithmically.
Thus, it is highly sensitive to the logarithmic scaling of entanglement at the critical point, and a sharp peak identifies the $\Delta_x=1/3$ critical point in Fig. <ref>.
Interestingly, it also suggests the volume-law phase has a logarithmic correction to the entanglement scaling; we leave for future work the task of identifying the origins of this correction.

The tripartite mutual information also shows the $\Delta_x=1/3$ critical point and is computed as $I_3 = 4S\left(R_1\right)-2S\left(R_1 \bigcup R_2\right)-S\left(R_1\bigcup R_3\right)$, which is equivalent to the form in Ref. <cit.> due to translational invariance.
The triparitite mutual information goes to $0$ in the area-law phase, follows a volume-law in the volume-law phase, and it goes to a constant independent of system size at the critical point.
Fig. <ref> shows this behaviour with different curves for different system sizes $L$ crossing at the critical point, $\Delta_x=1/3$.

a) This figure shows the quantum channel capacity $\mathcal{C}$, computed by the purification dynamics, at a time $t=5L$, for the same circuits studied in Fig. <ref>.
It shows a transition at $\Delta_x\approx 1/3$ (marked by a black vertical dashed line), the location of the critical point determined by the competition of coherence generating and coherence destroying measurements $p_y>\left|p_x-p_z\right|$.
b)  Coherence for the same circuit but with an initial pure state. The coherence crosses $C_x=L/2$ at the critical point $\Delta_x=1/3$ as predicted by the rate Eq. <ref>.

§.§ Transition in channel capacity

We have shown that when Eve applies a sufficiently high rate of $Y$ measurements, Alice is able to produce and maintain volume-law entangled states at late times.
We now investigate if this ability also allows her to protect a quantum diary.
As in section <ref>, we investigate Alice's ability to protect a quantum diary of $\left|A\right|=L$ qubits using the purification dynamics of an initial mixed state with with entropy $S(\rho_0)=L$.
At late times, the entropy of the system is again equivalent to the coherent information between the initial and final system states, $S(L)=\mathcal{C}$.
Thus, when the system purifies, Alice looses her diary, while when it remains mixed, Alice can recover $S(L)=\mathcal{C}$ qubits of her diary.
We consider a circuit with $p_m=0.03$ and $p_y=1/4$ fixed, and study its purification dynamics as a function of $\Delta_x$.
In Fig. <ref>, we observe a transition between the protection and loss of the quantum diary occurring at a critical point $\Delta_x\approx 1/3$, the point at which Alice gains access to volume coherence in the $p_m\rightarrow 1/L^2$ limit.
Thus, the ability of Alice to protect a quantum diary, is accurately predicted from the condition that Eve's measurements give Alice access to large coherence, $C_x>L/2$.
This provides evidence for a connection between quantum communication and coherence.
In Appendix <ref>, we give a first numerical analysis of the critical behaviour of the transition presented in this section, but leave for future work a detailed investigation into the critical dynamics induced by the complex interplay between coherence and entanglement.

§ COHERENCE REQUIREMENTS FOR QUANTUM COMMUNICATION

§.§ Alice's coherence generating requirements

In sections <ref> and <ref> we found that if Alice is constrained in her ability to generate coherence, then she can only protect quantum information if Eve is restricted in her ability to destroy coherence.
In section <ref>, we found that Eve must not apply coherence-destroying bit erasers, while in section <ref> she must apply a sufficient ratio of $Y$ measurements to $X$ and $Z$ measurements $p_y>\left|p_x-p_z\right|$.
Thus, if Eve is able control which operator she makes a measurement of, she could choose to always measure the $X$ basis ($p_x=1$) and quickly destroy $X$ coherence and Alice's quantum diary.
Alice is therefore required to dynamically regenerate coherence in the system as it evolves.
A simple way of doing this is by adding a finite rate of phase gates $R_z$ which can generate coherence in the $X$ basis.
We now show that this solution works when random strategies are played and allows Alice to protect against the coherence-maintaining bit flip errors and coherence destroying $X$ measurements.

The dynamics for a fixed error rate $p_m+p_e=0.05$, with $p_y=p_z=0$ and $p_x=1$, are displayed in Fig. <ref>, and show that for a sufficient rate of phase gates $p_R>0.1$ the system can protect any ratio $p_m/p_e=r_d/(1-r_d)$ of $X$-measurements (dephasing errors) to bit erasers.
For $p_R<0.1$, the system can protect only a fixed fraction of bit flip errors and this fraction is related to when the steady state coherence reaches $C_x\approx L/2$ (also shown in Fig. <ref>).
This correspondence demonstrates the necessity of quantum coherence to maintain a finite quantum channel capacity.
Furthermore, this demonstrates that coherence can be preserved simply by the addition of a sufficient rate of single qubit coherence generating gates.

Quantum channel capacity $\mathcal{C}$ for a diary encoding $\left|A\right|=10$ qubits (panel a) and $X$ basis coherence $C_x$ (panel b) at time $t=10$ for a circuit composed of CNOTs, single bit phase gates occurring at a rate $p_R$, and two types of attack operations occurring at a rate $p_m+p_e=0.05$: $X$ measurements occur at a rate $p_m=0.05*r_d$ (i.e. $p_x=1$ and $p_y=p_z=0$) while coherence-maintaining bit erasers occur at a rate $p_e=0.05(1-r_d)$. Panel a) demonstrates a transition between zero and finite quantum channel capacity for sufficiently large rate of coherence generating phase gates. Panel b) shows that this transition is associated with a sharp change in coherence $C_x$. The color scheme in the panel b) is chosen such that $C_x=L/2=64$ is black.

§.§.§ Coherence requirements for any of Alice's strategies

We now consider the setting in which Alice does not take a random strategy, but instead can make any specific choice of unitaries from the Clifford group.
We will also assume that Alice takes turns with Eve in applying their choice of operations, and that Eve is allowed to apply at most an integer number, $M$, of local Pauli measurements in her turn.
Again, we assume Alice knows the basis Eve makes measurements and also the outcome of those measurements.

The coherence requirements on Alice are different depending on whether Eve declares where she will make measurements at the beginning of her turn or not.
When Eve does declare this, Alice can encode a diary of $L-M$ bits with only swap operations (incoherent operations in any local basis).
She achieves this by encoding her state on $L-M$ of the bits and during her turn swapping the remaining $M$ bits to the locations Eve will measure.
If Eve does not announce where she will measure, Alice will have to ensure a measurement on any qubit won't measure her encoded state and reduce her channel capacity.
Equivalently in the purification picture <cit.>,  Alice must ensure that Eve can not reduce the evolved purity below her desired channel capacity $S(\rho_n)\geq\mathcal{C}$.
For $\rho_n$ taken as a stabilizer state, the condition for a Pauli measurement to reduce the entropy of a state $\rho_n$ translates to a condition on the coherence of the evolving density matrix $\rho_n$.
In Appendix <ref>, we derive this condition as the following theorem:

Given a local Pauli basis D, any stabilizer mixed state $\rho$ with entropy $S(\rho)$ and relative entropy of coherence $C_D(\rho)$, there exists a sequence of $M>C_D(\rho)$ local Pauli measurements that reduce the entropy of $\rho$ (the state after measurement, $\rho'$, has entropy $S(\rho')<S(\rho)$).
Thus, if Alice is unable to maintain a coherence of $C_x(\rho_n)\geq M_x$ in her circuit, then Eve can use the $M_x$ measurements guaranteed by Theorem. <ref>, to reduce the entropy $S$ of Alice's mixed state.
If Alice is limited in this way, then Eve can, in at most $L$ steps purify Alice's state and reduce the quantum channel capacity to zero.
Since Eve could make a measurements in any local Pauli basis, then Alice must maintain a coherence $C_D>M$ in all local Pauli bases $D$.
This holds for any strategy Alice might take, not knowing where Eve will apply her measurements.

§.§ Coherence requirements for stabilizer error correction codes

In the previous sections we observed that on the one hand, Alice can protect classical information by maintaining a classical code space with a large Hamming distance between the code words of the classical code space.
On the other hand, we observed that for Alice to protect quantum information, she was required to maintain a large amount of superposition between different basis states (i.e. a large volume-law coherence).
In classical error correction codes, the Hamming distance between any two code words is related the number of bit flip errors that can be corrected (i.e. the code distance) <cit.>.
This, along with previous results studying the role of quantum coherence in channel discrimination tasks <cit.>, suggests quantum coherence is related to the code distance of quantum codes.
In this section, we formalize these expectations by presenting Theorem <ref> that states the code distance of any stabilizer quantum error correction code is bounded by the coherence of its maximally coherent state for any local Pauli basis.
We then explain how this bound can be made tighter by considering different sub-codes, and discuss the relevance of this bound to the information game discussed in the previous section.
Finally, we conclude this section with an application of the bound to CSS codes.

The theorem applies to $[[N,k,d]]$ stabilizer codes that use $N$ qubits to detect up to $d$ errors on a quantum code space of dimension $2^k$.
The code space, $P$, is defined by a set of $N-k$ Pauli check operators $\{g_i\}$ that constrain the states that can live in the code space, $\ket{\psi}\in P$, by the constraint $g_i\ket{\psi}=\ket{\psi}$ for all $i\in(1\dots N-k)$.

Given a local Pauli basis $D$, the code distance $d$ of a $[[N,k,d]]$ stabilizer code, $P$, is bounded by the coherence of the maximally coherent stabilizer state in the code space:

\begin{eqnarray}
d\leq \max_{\psi\in P}C(\ket{\psi},D)\equiv C_{PD}.
\end{eqnarray}

Here, a local Pauli basis $D$ is any basis that, on each site $i$, one of the Pauli operators $A_i\in (X_i,Y_i,Z_i)$ is diagonal.
A proof of this theorem is given in Appendix <ref> and is constructed by identifying an undetectable error composed of $d=C_{PD}$ measurements of a subset of the Pauli operators $A_i$ defining the Pauli basis $D$.
Intuitively, such an error can be constructed because any state in the code space has at most $C_{PD}$ coherence.
Therefore, the coherence of such a state can be reduced to $0$ in at most $C_{PD}$ dephasing errors (measurements), thus destroying all phase information the state might have encoded in the basis states of the Pauli basis $D$.

Notice that, while this bound is expressed in terms of the maximum coherent stabilizer state of the code space, it is actually tighter.
The tighter bound can be obtained by applying the theorem to any subspace of the code space.
Then, since an error for any subspace of the code space is an error for the whole code space, the coherence of the maximum coherent state of the subspace bounds the code distance.
This way the bound is actually closer to the coherence of the second least coherent stabilizer code state.
This is seen by constructing a basis of stabilizer states which span the full code space and ordering them by the coherence.
The tightest bound comes from the subspace formed from the two least coherent stabilizer basis states.
Within this subspace, the maximum coherence is at most $1$ bit more than the second least coherent basis state, and thus the tightest bound is obtained using that basis state.

§.§.§ Application to Alice-Eve information game

Applying such a bound to the game played between Alice and Eve is difficult because there is no static code space that we can apply the bound to.
Nonetheless, we can use the intuition from $C_{PD}\geq d$ to understand why the transition line in Fig. <ref> is linear.
Our approach will first identify an effective code distance, $d_{eff}$; then it will provide an estimate on the relevant coherence, $C_{PD}$, limiting Alice's ability to protect her diary; and finally use $C_{PD}=d_{eff}$ to identify the critical line.
Thus, we first note that the error rate, $p_m+p_e$, generated by Eve is fixed in the $p_m$ versus $p_R$ plane of Fig. <ref>.
This allows us to assume the maximum number of errors that might need to be corrected is some constant $d_{eff}=K$ that does not depend on $p_m$ or $p_R$.
Then, as argued in the previous section, the coherence in the $X$ basis was limiting Alice's quantum channel capacity and so we derive the $p_m$ v.s. $p_R$ phase boundary using $C_{PD}=C_x(p_m,p_R)=K$: when the steady state coherence in the $X$ basis $C_x(p_m,p_R)$ is sufficiently large, $C_x(p_m,p_R)\geq d_{eff}=K$, then Alice can protect her quantum diary, otherwise, she can't and her channel capacity drops to zero.
Following similar arguments as in Appendix <ref>, we propose the following rate equation for $C_x$:

\begin{eqnarray}
\partial_m C_x = p_R-p_x\left(1-\left(\frac{N_x}{L}\right)^{\xi}\right).
\end{eqnarray}

Solving for the steady state, we find that the critical phase gate rate is given by $p_R=p_x\left[1-(1-K/L)^{\xi}\right]$, and for a fixed $L$ we find the critical phase gate rate scales linearly with $p_x$ as observed in Fig. <ref>.
For increasing $L$, the number of errors per time step increases linearly with $L$ such that the effective code distance, $K$, should also scale linearly with $L$.
Thus, the proportionality of the critical line $p_R\sim p_x$  does not change with increase $L$ as we have confirmed numerically.

§.§.§ Application to the $L$-bit repetition code

The application to such a bound for a stabilizer error correction code is much simpler than for the information game since the theorem now applies directly.
We first consider the simplest quantum error correction code, the repetition code <cit.> which is the quantum generalization of the simple classical coding procedure of repeating a message multiple times.
The code space for the $L$-bit repetition code is spanned by the $X$-basis states $\ket{00\cdots0}$ and $\ket{11\cdots1}$, and can correct up to $(L-1)/2$ bit flip errors but zero $X$-dephasing errors.
The application of the theorem is done by considering the state $\left(\ket{00\cdots0} +\ket{11 \cdots1}\right)/\sqrt{2}$ which has maximum $X$ coherence of $C_x=1$ in the code space.
Thus $d\leq 1$ and the repetition code can correct up to $(d-1)/2=0$ $X$-dephasing errors.
While the fact the repetition code can not correct phase errors is obvious, the application of Theorem <ref> shows that this inability is because the code lacks the ability to produce states with coherence in the $X$ basis.

§.§.§ Application to CSS codes

While the above examples are rather simple, they show coherence provides a unifying and general view for certain requirements when designing quantum error correction codes.
In this section, we show that this general context provided by the coherence bound is related to the generality of the singleton bound for classical error correction codes.
The classical Singleton bound <cit.> is a bound $d\leq L-k+1$ on the code distance, $d$, for any classical code determined strictly from the size of the code space $2^k$ and the number of physical bits used in the code, $L$.
The relation to the coherence bound comes from applying Theorem <ref> to the CSS quantum error correction codes which are codes constructed using two classical codes $\mathcal{K}^x$ with an $k_x$ bit code space, and $\mathcal{K}^z$ with a $k_z$ bit code space defined on $L$ physical bits.
These codes compose a large class of stabilizer error correction codes <cit.>, and are useful for constructing codes will good asymptotic properties <cit.>.

To apply the coherence bound, we recall that a basis for the CSS quantum code space can be constructed by using the dual code $\mathcal{K}^z_\perp$ with code space of size $L-k_z$.
The code words, $x$, of the dual code are the bit strings of length $L$ generated by the transpose of parity check matrix $H^z_{ij}$ of the code $\mathcal{K}^z$:

\begin{eqnarray}
\end{eqnarray}

for all bit strings $z$ of length $k^z$.
Using these code words of the dual code, $\mathcal{K}^z_\perp$, the $2^{k}=2^{k_x-(L-k_z)}$ distinct stabilizer basis states for the CSS code can be easily written <cit.> in the $X$ basis as:

\begin{eqnarray}
\ket{x+\mathcal{K}^z_\perp}&= \frac{1}{\sqrt{\left|\mathcal{K}^z_\perp\right|}}\sum_{y\in \mathcal{K}^z_\perp}\ket{x+y}.
\end{eqnarray}

for all distinct $x\in \mathcal{K}^x/\mathcal{K}^z_{\perp}$.
This shows immediately that the coherence of each basis state is $C_x=\log_2(\left|\mathcal{K}^z_\perp\right|)=L-k_z$.
We can then bound the code distance by considering the maximal coherent state for a single bit logical subspace spanned by states $\ket{x+\mathcal{K}^z_\perp}$ and $\ket{x'+\mathcal{K}^z_\perp}$ such that $x+y\neq x'$ for all $y$ in $\mathcal{K}^z_\perp$.
The maximum coherent state of this subspace is the superposition $\ket{\psi}=(\ket{x+\mathcal{K}^z_\perp}+\ket{x'+\mathcal{K}^z_\perp})/\sqrt{2}$ which has coherence $C_x=L-k_z+1$.
Thus the coherence bound for the code distance is $L-k_z+1>d$ which retrieves the classical Singleton bound of $\mathcal{K}^z$ which is used to correct phase errors <cit.>.
A similar analysis in the $Z$ basis will retrieve the classical Singleton bound for the $\mathcal{K}^x$ code space with $L-k_x+1>d$.

§ DISCUSSION AND OUTLOOK

In this work, we have determined the coherence resource requirements for quantum communication, both for stabilizer error correction codes and for monitored quantum dynamics modeled by an information game.
The game involved Eve applying measurements in an attempt to destroy Alice's quantum diary, and Alice recording the measurements (their location, polarization and outcome) and applying unitaries in an attempt to protect her diary.
By considering the purification dynamics of the associated circuits, we determined Alice's ability to protect her diary and found that her access to coherence or coherence generating operations allowed her to protect either classical information or quantum information.
When Alice is limited in her access to coherence, she can only protect classical information, while if she has access to coherence or coherence generating operations she can protect quantum information.

This is summarized in Fig. <ref>, which shows a figure similar to Fig. <ref> in which a purification transition in Alice's quantum channel capacity depicted.
In contrast to Fig. <ref>, we show what type of information she is capable of protecting given a certain type of attack by Eve and a maximum rate, $p_R$, at which she can apply a coherence generating operations.
The main difference is that, in Fig. <ref>, we treat $p_R$ as a limit on her ability to generate coherence,  rather then the rate she actually applies the coherence generating operation (for instance, a phase gate).
This is relevant because when Alice applies a phase gates, she generate quantum noise in the $X$ basis states, which looks like an error from the perspective of the classical channel.
Specifically, the classical channel capacity is the mutual information between an initial distribution of $X$ basis states and the final distribution of $X$ basis states.
Thus, a phase gate is a quantum error because it generates quantum uncertainty (i.e. coherence) in the $X$ basis states.
As a trivial example, if Alice first prepares a $X$ basis state on a qubit, then applies first a phase gate, and finally makes a measurement in the $X$ basis, the final state of the qubit will be uncorrelated with the initial state.
The effect on classical channel capacity due to the application of phase gates was more deeply investigated in Ref. <cit.>.

Thus, the circuits in Fig. <ref> have zero classical channel capacity in the whole phase diagram, because Alice is applying phase gates.
If instead, she were to not apply the phase gate and attempt to encode classical information, she could protect a classical diary.
Therefore, in Fig. <ref>, we imagine $p_R$ as the rate at which she could apply phase gates, and we observe the transition is from an ability to protect classical information to an ability to protect quantum information.

Alice's coding capabilities in various regions of parameter space with $p_z=p_y=0$ and $p_x=1$. In all figures, we consider Eve's attacks to be coherence-maintaining bit erasers (at a rate $p_e$) and $X$ measurements (at a rate $p_m=p_er_d/(1-r_d)$, and we give Alice the option to apply phase gates up to a rate $p_R$. a) For $p_R=0$,  Alice can only encode a quantum diary if Eve does not apply coherence destroying measurements (red line at $r_d=0$), otherwise Alice can protect a classical diary as long as $p_e$ is sufficiently small. b) In this figure $p_m=0$ and so Alice can always protect a quantum diary as long as she can protect a classical diary. When $p_R=0$, we retrieve the limit discussed in section <ref> where only coherence-maintaining bit erasers are applied. c) In this figure $p_e=0.05-p_m$ as in Fig. <ref>, but now Alice has the choice to apply phase gates or not. The figure shows the transition to quantum error correction as in Fig. <ref>, but now if she chooses not to apply phase gates she can protect classical information so long as $p_e<0.1$.

§.§ Generality

While here we have considered circuits composed only of Clifford circuits, we expect our results to hold also for gates taken from a universal get set.
While above, we only considered a phase gate as the coherence generating gate, many other gates can play a similar role.
In fact, a two-qubit gate, chosen randomly using the Haar measure, produced, on average, $\sum_{k=2}^41/k\approx 1.08$ bits of relative entropy of coherence in any basis when acting on a pure state <cit.>.
Similarly, phase gates produce $1$ bit of relative entropy of coherence in the $X$ basis when acting on a $X$ polarized bit, and thus a similar transition to that discussed in section <ref>, would occur if phase gates are replaced by randomly chosen two-qubit gates.
The main difference will be the fluctuations of coherence will be different, and the critical properties of the phase transition will change similar to previously studied random circuits <cit.>.
Future research might find it interesting to study the coherence requirements of Alice in the setting in which she can apply non Clifford gates.
We suspect a similar bound as in Theorem <ref> to hold.
The only alternative is that magic <cit.>, a resource quantifying how much a state is not a stabilizer state, can substitute the resource of coherence in this setting.
This would be surprising as, to the authors knowledge, no such substitution holds in other settings.

It could also be interesting studying the role of coherence in bases specified by a symmetry relevant to the unitary dynamics.
In this case, it could be interesting to consider hybrid circuits in a broader setting than in Refs. <cit.>, which studied dynamics that preserved a global symmetry. One could instead include unitaries that break the symmetry but that are still incoherent operations in a basis labeled by the conserved charges.  In this case coherence between different charge sectors would remain suppressed, but the dynamics would allow for classical fluctuations of the conserved charge.

§.§.§ Possible speed up for classical simulations

Another interesting setting, is to consider circuits that simulate a given Lindblad unraveling of a specific open system dynamics.
In this case, there could also be an entanglement transition tuned by the relative rate at which the unitary part of the dynamics generates coherence and the dissipative part destroys coherence.
In this case the channel capacity of the specific unraveling won't be particularly interesting, but the entanglement transition from area law to volume law entangled states would be a transition in the ability of classical computers to simulate the open system dynamics <cit.>.
In this setting, our results suggest a heuristic for simulating Lindblad dynamics: use an unraveling which minimize the coherence in a given local Pauli basis.
By doing this, entanglement growth will be suppressed possibly allowing for longer classical simulations using matrix product states (MPS).
As shown in Section <ref>, certain dynamics can show a transition to area law entanglement for arbitrarily weak coupling to an environment (measurement rate).
If such a transition occurred by choosing between two different unravelings of the Lindblad, then this heuristic would lead to an exponential speed up by choosing the right unraveling:
In one unraveling, entanglement would growth linearly in time, and classical representations of the late time states would require memory growing exponentially in system size. While in another unraveling, suppression of coherence would ensure late time area law entanglement, such that memory requirements would only grow linearly in system size.

§.§ Perspective on the entangling phase

From a different perspective, this transition in the capacity to protect either quantum or classical information provides an answer to what is quantum about the entangling phase of the measurement-induced entanglement transitions.
This question is raised by transitions in classical information quantifiers observed in the classical circuits of section <ref>, and Refs. <cit.>.
One answer was given in Ref. <cit.>, which showed quantum gates (i.e. quantum noise), such as the phase gate, are an instability to the ordered classical phases.
Another answer is given by Fig. <ref>, which shows that in the quantum phase, quantum information is protected from both bit and phase errors (coherence destroying errors).

Thus, the answer to what is quantum about the measurement-induced entanglement transitions is equivalent to the question, what is quantum about quantum error correction codes.
In both cases, it is a stability to both bit and phase errors.
Also, in both cases, the extent to which both are stable to $X$ or $Z$ errors corresponds to the amount of $X$ or $Z$ coherence respectively.
It is only when the phase, or quantum code space, contains states with both $X$ or $Z$ coherence will they be stable to $X$ or $Z$ errors.
In the case of measurement-induced phase transitions,   this fact is reflected  in a volume-law to area-law phase transition corresponding to a critical loss of either $X$ or $Z$ coherence (cf.  Section <ref>).
While in the case of quantum error correction codes, the Singleton bound on the code distance for $X$ or $Z$ bit errors in a CSS code corresponds to the coherence bound on the code distance applied to either the $X$ or $Z$ basis.

§.§ Future directions

The coherence bound may also provide a useful design principle for quantum error codes targeting a given experiment.
For example, while generating coherence in any given basis can be achieved by single qubit operations, generating it for all local Pauli basis requires entangling gates and is therefore more difficult.
Thus experiments will generally be limited in the amount of coherence they generate in some basis.
By identifying this limit on coherence, one could identify a maximum code distance the experiment could produce, and focus on constructing codes with a code distance less than that.

Our work therefore provides interesting directions in both the design of systems protecting quantum information and the relation between classical and quantum information dynamics.
While here, we have studied the classical limit of quantum gate operations, it could also be interesting to study   how coherence brings one away from the classical limit of chaotic dynamics of continuous systems.
In the present work, spreading and scrambling of quantum information was done by controlled gate operations, but one may also be interested in the natural scrambling of information present in both classical and quantum chaotic systems <cit.>.
Since here coherence distinguished between classical and quantum dynamics, it might also be possible that it can elucidate results connecting classical to quantum chaos <cit.>.
Finally, one may also think to use random circuits to investigate how resources quantified by other resource theories <cit.>, like asymmetry, non-gaussianity, contextuality or incompatability are required for quantum or classical communication.
A similar procedure taken here might be useful but where Alice and Eve are instead constrained to use the free operations of a different resource theory.
In conclusion, our results can provide a new perspective on the connection between classical and quantum information scrambling, and their relation to communication technologies.

This work has been funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) - TRR 288 - 422213477 (project B09), TRR 306 QuCoLiMa (”Quantum Cooperativity of Light and Matter”), Project-ID 429529648 (project D04) and in part by the National Science Foundation under Grant No. NSF PHY-1748958 (KITP program ‘Non-Equilibrium Universality: From Classical to Quantum and Back’), and by the Dynamics and Topology Centre funded by the State of Rhineland Palatinate and Topology Centre funded by the State of Rhineland Palatinate.   M.P.A.F was supported by the Heising-Simons Foundation and by the Simons Collaboration on Ultra-Quantum Matter, which is a grant from the Simons Foundation (651457).
The authors gratefully acknowledge the computing time granted on the supercomputer MOGON 2 at Johannes Gutenberg-University Mainz (hpc.uni-mainz.de).

§ APPENDIX

§ PROPERTIES OF STABILIZER STATES

A stabilizer mixed state, $\rho$ on $L$ qubits, with von Neumann entropy $S(\rho)$ is defined using a group $S$ generated by a set of $N_s =L-S(\rho)$ operators which are strings of single site Pauli operators $\{g_i\}$:

\begin{eqnarray}\label{eq:stabmixedstate}
\rho = \prod_{i=1}^{L-S(\rho)}\frac{1+g_i}{2}
\end{eqnarray}

We use the stabilizer check matrix, $C_{ij}$ which is a $L-S(\rho)$ by $2L+1$ matrix, where the rows index the generators and the columns specify the form of the generator:

\begin{eqnarray}
\end{eqnarray}

The stabilizer check matrix has entries from the field $\mathcal{F}_2=(0,1)$, and act in a vector space defined over that field, where multiplication and addition are performed modulo $2$.
The set of all Pauli string operators that commute with the elements of $S$ are called the centralizer of $S$.
This set forms a group $C(S)$ where $p\in C(S)$ if $pg_i=g_ip$ for all $g_i\in S$.
It will be important to consider the set, $C-S$, of Pauli strings operators contained in the centralizer but not contained in the stabilizer group.

§.§ Representations of stabilizer states

A stabilizer mixed state is defined by its stabilizer group, $S$, and can have different representations based on the different choices of generators $g_i$ of that group <cit.>.
Changes between representations, often called gauges, can be made by changing a generator, $g_i$ by group multiplication

\begin{eqnarray}
g_i\rightarrow g_i'=Rg_i,
\end{eqnarray}

where the group element $R\in S/g_i$ is taken from the group, $S/g_i$, generated by all the generators of $S$ not including $g_i$.
If we write $R=(-1)^{r_{2L+1}}\prod_{j=1}^{L}X_j^{r_{j}}\prod_{j=L+1}^{2L}Z_j^{r_{j}}$, then such a procedure changes the stabilizer check matrix, by adding the vector $r$ to the $i^{th}$ row of the stabilizer check matrix $C_{ij}$ (again all operations performed modulo 2) <cit.>.
Thus different representations of the stabilizer state correspond to different stabilizer check matrices all related to each other by row operations.
Gaussian elimination will be a useful tool to find convenient representations of the stabilizer state when proving lemma <ref>.

§.§ Measurements on stabilizer states

The measurement of a Pauli string, $O$ on a stabilizer mixed state, can have three possible effects:

* No effect: Occurs when $\pm O\in S$, since the stabilizer state is already an eigenstate of the measurement operator $O$.

* $O$ changes the state and reduces the entropy. In this case, $O$ is added to the generators of the stabilizer state, and occurs when $O$ in the centralizer of $S$ but not in $S$: $O\in C(S)$ and $ O\notin S$.

* $O$ changes the state, but not the entropy. This case occurs when $[O,g_i]\neq 0$ for at least one of the generators $g_i$ and it requires a non trivial update to the stabilizers state.

In the last case, updating the state is performed <cit.> by:

* Changing the representation of the stabilizer state to one in which only one generator $g_1'$ does not commute with $O$.

* Replacing the generator $g_1'$ with the new generator $O$.

§.§ Coherence of stabilizer states

We now prove the lemmas and theorem discussed in the text, and in particular, we prove Theorem <ref> which gives an expression for the relative entropy of coherence for a stabilizer state.
To be as general as possible, it is useful for us to define

A local Pauli basis is as any basis that, on each site $i$, one of the Pauli operators $A_i\in (X_i,Y_i,Z_i)$ is diagonal.

The basis states, $\{\ket{s}\}$, of a local Pauli basis are defined by a given bit string $s=\{\alpha_1,\alpha_2\cdots \alpha_L\}$ obtained after performing a projective measurement on $L$ Pauli operators $\{A_i\}$:

\begin{eqnarray}
\end{eqnarray}

where $\alpha_i\in (0,1)$.
We will also define $H(p(x))=-\sum_xp(x)\log(p(x))$ to be the Shannon entropy of a distribution $p(x)$.

We will often find it useful to use a generalization of the following property of measuring a stabilizer states discussed in appendix <ref>: the outcome of measuring a Pauli operator, $A_i\in (X_i,Y_i,Z_i)$ is either certain ($P(\alpha_i=0)=1$ or $P(\alpha_i=1)=1$), or uncertain with probability $P(\alpha_i)=1/2$, where $\alpha_i\in(0,1)$ defines an eigenvalue, $(-)^{\alpha_i}$, of $A_i$.
When applied to a sequence of measurements on the Pauli operators $\{A_i\}$ defining a Pauli basis, we obtain the following theorem:

Given a stabilizer mixed state $\rho$, the probability, $P(s)$ for the bit string, $s$, resulting from a measurement on a local Pauli basis $A$, is uniform over $2^{n_u}$ bit strings where $n_u=H(P(s))$ is the number of uncertain measurement outcomes in a sequence of measurements $A_1, A_2 \dots A_L$. i.e. $P(s)=2^{-n_u}$ if the bit string is one of the $2^{n_u}$ allowed bit strings or $P(s)=0$ if not.

From Born rule, the probability:

\begin{eqnarray*}
\end{eqnarray*}

where $A_i$ is the single site Pauli operator on the $i^{th}$ site defining the local Pauli basis $A$, and $\prod_iD(A_i=\alpha_i)$ is the projector to the basis state $\ket{s}$.
We can compute this probability $P(s)$ sequentially by performing a sequence of projective measurements on the $i^{th}$ site:

\begin{eqnarray}
\rho_i=D(A_i=\alpha_i)\rho_{i-1}D(A_i=\alpha_i)
\end{eqnarray}

where $\rho_0=\rho$ and $\rho_L=P(s)\ket{s}\bra{s}$ is the projected Pauli basis state with normalization $P(s)=\Tr(\rho_L)$.

The probability distribution $P(s)$ will depend on whether the probability distribution of the individual measurements

\begin{eqnarray}
\end{eqnarray}

are certain or uncertain.
There are four options for the outcome of the $i^{th}$ projection on the $i^{th}$ stabilizer state with stabilizer group $S_i$:

* $A_i \in S_i$; $p_i(\alpha_i)\in(1,0)$ and the measurement outcome is certain. In this case $\rho_i=\rho_{i-1}$ or $\rho_i=0$ depending on $\alpha_i=0$ or $1$ respectively, and the measurement outcome of $A_i$ is certain.

* $-A_i \in S_i$; $p_i(\alpha_i)\in(1,0)$ and the measurement outcome is certain. This is the same case as 1) but projection onto a different outcome $\rho_i=\rho_{i-1}$ if $\alpha_i=1$ and $\rho_i=0$ if $\alpha_i=0$.

* Both $A_i \in C(S_i)-S_i$ and $-A_i \in C(S_i)-S_i$; $p_i(\alpha_i)=1/2$ and the measurement outcome is uncertain: in this case $\rho_i=D(A_i=\alpha_i)\rho_{i-1}D(A_i=\alpha_i)=D^2\rho_{i-1}=D\rho_{i-1}$ independent of $\alpha_i$. Here $D(A_i=\alpha_i)\equiv D$.

* $A_i \notin C(S_i)$; $p_i(\alpha_i)=1/2$ and the measurement outcome is uncertain.
In this case, we can choose a representation of $S_i$ such that only one generator $g_j$ does not commute, $[g_j,A_i]\neq0$ . Furthermore, since $g_j$ and $A_i$ are non commuting Pauli operators we have $g_jA_i=-A_ig_j$, and can compute:

\begin{gather}
\frac{\left(\left(-1\right)^{\alpha_i}A_i+1\right)\left(1+g_j\right)\left(\left(-1\right)^{\alpha_i}A_i+1\right)}{8}\\ \nonumber
\end{gather}

such that the state $\rho_i$ is the stabilizer state with the $j^{th}$ term in the product of Eq. <ref> replaced by $(1+(-1)^{\alpha_i}A_i)/2$ and normalization such that $p_i(\alpha_i)=1/2$.

We can then find the probability of a measurement outcome $P(s)$ from the probability of the $i^{th}$ measurement outcome $p_i(\alpha_i)$:

\begin{eqnarray}
\end{eqnarray}

which is either $2^{-n_u}$ or $0$ where $n_u$ is the number of uncertain measurement outcomes in the sequence.
Furthermore, whether a measurement outcome is certain (case 1 and 2) or uncertain (case 2 or 3) depends only on the measurement being performed, $A_i$, and not the previous measurement outcome, $\alpha_j$ for $j\leq i$.
Thus we find that regardless of the bit string being projected $s$, the number of uncertain outcomes is the same.
We conclude that $P(s)$ is a uniform distribution (for all $P(s)\neq 0$ we have $P(s)=2^{-n_u}$) with entropy $H\left(P\left(s\right)\right)=n_u$ $\square$.

Notice that since this gives us the entropy of $P(s)$ such that we can easily compute the relative entropy of coherence in the basis $A$ as:

\begin{eqnarray}
C(\rho,A)=H\left(P\left(s\right)\right)-S(\rho)=n_u+N_s - L
\end{eqnarray}

where $N_s$ is the number of independent generators in the stabilizer group $S$.

To easily obtain the number $n_u$ of uncertain outcomes, we find the following stabilizer representation useful:

The CSS “gauge” For a given stabilizer mixed state, there exists a representation, called the CSS gauge, in which the stabilizer check matrix takes the following form:

\begin{eqnarray}\label{eq:CSSgauge2}
\begin{bmatrix}
G^x_x & 0     & s^x \\
0     & G^z_z & s^z \\
G^x_y & G^z_y & s^y
\end{bmatrix}
\end{eqnarray}

where the rows of $G^x_y$ are linearly independent, and where the rows of $G^z_y$ are also linearly independent.
In Eq. <ref>, $G^x_x$ is a $N_x$ by $L$ matrix defining, along with the column $s^x$, a set of generators $\{g^x_i\}$ composed solely of $X_i$ operators; $G^z_z$ is a $N_z$ by $L$ matrix defining, along with the column $s^z$, a set of generators $\{g^z_i\}$ composed solely of $Z_i$ operators; while $G^x_y$ and $G^z_y$ are $L-S(\rho)-N_x-N_z$ by $L$ matrices that together with the column $s^y$ define a set of generators $\{g^y_i\}$.

In this gauge, there are a set of $N_x$ generators $\{g_i^x\}$ defined via the matrix $G^x_x$ composing only $X$ Pauli strings: $g_i^x=(-1)^{s_i^x}\prod_jX_j^{(G^x_x)_{i,j}}$.
Similarly there are a set of $N_y$ generators $\{g_i^z\}$ defined via the matrix $G^z_z$ composed only of $Z$ Pauli strings, while the remaining $L-S(\rho)-N_x-N_z$ generators are products of both $X$ and $Z$ Pauli operators.

We first note that, as discussed in appendix <ref>, row operations applied to the stabilizer check matrix correspond to multiplication of the generators $g_i$ by elements of $S/g_i$, such that different representations of the stabilizer group $S$ are related by row operations applied to the stabilizer check matrix.
The proof then proceeds by construction.
First start with a generic stabilizer check matrix

\begin{eqnarray}
\begin{bmatrix}
g^x_1 & g^z_1 & s^1
\end{bmatrix}
\end{eqnarray}

Where $g^x_1$ and $g^z_1$ are $L-S$ by $L$ matrices.  If $g^z_1$ has $M_z<L-S(\rho)$ linearly independent rows, then by Gaussian elimination on the columns $j=L+1\dots 2L$, will obtain a new matrix with

\begin{eqnarray}\label{eq:CSSgaugeX}
\begin{bmatrix}
g^x_x & 0     & s^x \\
g^x_2 & g^z_2 & s^2
\end{bmatrix}
\end{eqnarray}

where $g^z_2$ has $M_z$ linearly independent rows and $g^x_x$ has $N_x=L-S(\rho)-M_z$ rows.
Furthermore  since the generators are independent and do not contain $I$ or $-I$, the rows of $g^x_x$ must be linearly independent such that the check matrix can not contain a row with all $0$s in the columns $1\dots2L$.
Now the combined set of rows from both $g^x_x$ and $g^x_2$ may also have only $M_x<L-S(\rho)$ linearly independent rows, such that Gaussian elimination can eliminate $N_z=L-M_x$ rows of $g^x_2$.
Applying that Gaussian elimination on Eq. <ref> we obtain the CSS gauge Eq. <ref> $\square$.

We can now derive the relative entropy of coherence of Stabilizer states for the coherence in the $X$ and $Z$ basis's:

The coherences in the $X$ and $Z$ basis of a stabilizer state are determined by number the of rows $N_x$, $N_z$ and $N_y$ of the matrices $g^x_x$, $g^z_z$ and $g^x_y$ of the CSS gauge:

\begin{eqnarray}
C_x=N_y+N_z \\ \nonumber
\end{eqnarray}

Proof: The coherences are given as $C_x=H(P(x))-S(\rho)$ and $C_z=H(P(z))-S(\rho)$, where in the CSS gauge the von Neumann
entropy is easily given as $S(\rho)=L-N_x-N_y-N_z$.
Without loss of generality we focus finding the Shannon entropy $H_x=H(P(x))$ using the above Lemma <ref>, and counting the number of uncertain measurements for a sequence of measurements $A_i=X_i$.
To do this, we prove there exists a permutation of the sequence of measurements, $\{X_i\}\rightarrow \{X_{J(i)}\}$ such that measurements of the $J(i)= 1\dots (N_z+N_y)$ bits fall into case 4) in the proof for Lemma <ref>; the measurements of the $J(i)=N_z+N_y+1 \dots L-N_x$ bits fall into case 3); and the rest have zero uncertainty in the measurement outcome (case 1 or 2).
Given such a result, we have $n_u=L-N_x=H_x$ and $C_x=N_y+N_z$.

Such a sequence can be found by Gaussian eliminating the columns $L+1\dots2L$ of the rows $N_x+1\dots L-S(\rho)$ of the stabilizer check matrix in the CSS gauge, such that the check matrix has the from in Eq. <ref>, but with $g^z_2$ in upper triangular form.
If we take $J(i)$, for $i= 1\dots N_z+N_y$ to be the left most site for which the generator $i+N_x$ has a $Z_{J(i)}$ Pauli operator in it ( min $J(i)$ such that $(g^z_2)_{i,J}=1$), we will ensure that $[X_{J(i)},Z_{J(i)}]\neq 0$ for the measurements $i = 1\dots N_z+N_y$, and that they of case 4) above.

After this first sequence $N_z+N_y$ measurements, the stabilizer group $S_{i=N_z+N_y}$ will only contain operators that contains $X$ Pauli operators, and since the previous case 4) measurements don't change the number of independent generators we have $S(\rho_{i=N_z+N_y})=S(\rho_{i=0})$.
Thus, the remaining measurements fall into case 1, 2 and 3 outlined in the proof of Lemma <ref>.
The measurements that fall into case 1 and 2 don't change the state or the entropy, and so we can choose the measurements $J(i)$ for $i= (N_z+N_y) \dots N_z+N_y+S(\rho)$ to be the measurement that falls into case 3, such that the state loses one bit of entropy after each measurement $S(\rho_{i+1})=S(\rho_i)-1$.
After this set of $S(\rho)$ measurements we will then have $S(\rho_{i})=0$, and the state as an $X$ basis state such that all subsequent measurement will have zero uncertainty in the outcome.
Thus we have found the sequence $J(i)$ we set out to.
In the case of pure states, we have $C_x=N_y+N_z=L-N_x$ and $C_z=N_y+N_x=L-N_z$. $\square$

§.§ Coherence free stabilizer states

In section <ref>, we claimed that a stabilizer state with zero coherence in the $X$ basis has the form

\begin{eqnarray*}
\rho_S(n)=\frac{1}{2^{k_n}}\sum_{x}\ket{x}\bra{x}\prod_{i=1}^{L-k_n}\delta\left(\sum_j H^x_{ij}\left(n\right)x_j\right)
\end{eqnarray*}

where $k_n=S(\rho)$ and $H^x_{ij}$ is the $k_n$ by $L$ matrix defining the generators of the stabilizer state $g_i^x=\prod_jX_j^{H^x_{ij}}$.
This equality follows first from Theorem <ref>, which shows that such a state, which has $N_y=N_z=0$ has zero coherence in the $X$ basis, $C_x=0$.
This implies that the density matrix $\rho_S(n)$ is diagonal $X$ basis such that it can be written as

\begin{eqnarray}
\rho_S(n)=\sum_{x}\ket{x}\bra{x}P(x)
\end{eqnarray}

Finally, we have that

\begin{eqnarray}
P(x)&= &\bra{x}\rho_{S}(n)\ket{x} \\ \nonumber
&= &\prod_{i=1}^{L-S(\rho)}\frac{1+\bra{x}g_i\ket{x}}{2} \\ \nonumber
&= &\prod_{i=1}^{L-S(\rho)}\frac{1+(-1)^{\sum_jH^{x}_{ij}x_j}}{2} \\ \nonumber
&= &2^{S(\rho)-L}\prod_{i=1}^{L-S(\rho)}\delta\left(\sum_jH^{x}_{ij}x_j\right)
\end{eqnarray}

§ COHERENCE REQUIREMENT FOR ALICE

In this section we prove Theorem <ref> used in the main text to describe Alice's coherence requirements to maintain a finite channel capacity.
Given a local Pauli basis D, any stabilizer mixed state $\rho$ with entropy $S(\rho)$ and relative entropy of coherence $C_D(\rho)$, there exists a sequence of $M>C_D(\rho)$ local Pauli measurements that reduce the entropy of $\rho$ (the state after measurement, $\rho'$, has entropy $S(\rho')<S(\rho)$).
Without loss of generality, take the local Pauli basis $D$, to be the logical basis for the logical operators $X_i$.
The proof proceeds by construction, and uses both the rules for stabilizer measurement given in section <ref>, and the state represented in the CSS gauge given by Lemma <ref>, to identify the $M$ measurements that reduce the entropy of state $\rho$.
By Theorem <ref>, the CSS gauge for the state $\rho$ has $N_y+N_z=C_x(\rho)$ and $N_x=L-S(\rho)-C_x(\rho)$.
Preforming Gaussian elimination on the matrix

\begin{eqnarray}\label{eq:CSSgauge2}
\begin{bmatrix}
G^z_z \\
\end{bmatrix}
\end{eqnarray}

will give the row operations to transform the $N_y+N_z$ generators, $\{g^z_i\}\cup\{g^y_i\}$ to have a unique left most site $k_i$ such that only one of the generators in this set has a Pauli operator $Z_{k_i}$ at site $k_i$ ($[g_i,X_{k_i}]\neq0$).
To guarantee some of the $M-C_x(\rho)$ measurements reduce the entropy of $\rho$, choose $C_x=N_y+N_z$ of the measurements to be of the operator $X_{k_i}$ on these unique left most sites.
According to the rules in section <ref>, the entropy of the state will remained the same after these measurements, but those $N_y+N_z$ generators will be replaced with the $X_{k_i}$ operators, such that state following those measurements will have $N_x'=L-S(\rho)$.
If $M-C_x<S(\rho)$, then the remaining measurements, can be chosen to be a set of $\{X_i\}$ that can not be represented by the $N_x'$ generators ($X_i\in C(S)$ and $X_i\notin S$).
According to the rules in section <ref>, the entropy of state will be reduced by $M-C_x$.
In the case $S(\rho)\leq M-C_x$, $S(\rho)$ of the measurements can be chosen in the same way, but now result in a purified state such that the remaining $M-C_x-S(\rho)$ of the measurements don't change the purity of the state $\square$.

§ PROOF OF THE COHERENCE BOUND ON THE CODE DISTANCE

The coherence bound on the code distance for stabilizer codes is proven by making use of two properties of stabilizer states.
The first is the lemma <ref>, which states the distribution of bit strings, $P(s)$ for given Pauli basis is uniform over $2^{H\left(P\left(s\right)\right)}$ allowed bit strings ($P(s)=1/2^{H\left(P\left(s\right)\right)}$ if $s$ is allowed or $P(s)=0$).
The second useful property of stabilizer states is

Given a local Pauli basis $D$, any Pauli stabilizer state $\left|\psi\right>$ can be reduced to a product state in $M=C(\ket{\psi},D)$ measurements.

Proof: Without loss of generality, take the local Pauli basis $D$, to be the logical basis for the logical operators $X_i$.
Now imagine applying each measurement operator $X_i$ in order from $i=1$ to $i=L$.
Since the state $\left|\psi_i\right>$ after measurement of $X_{i-1}$ is a stabilizer state, either $X_i\left|\psi_i\right>=\pm \left|\psi_i\right>$ and the measurement outcome is certain, or the measurement outcome is $\pm1$ with probability $1/2$ and the measurement is completely uncertain.
After all measurements are performed the state is in a product state, but the measurements whose outcomes were certain, did not need to be made as they didn't affect the state.
Thus only the number of uncertain measurements $n_u(s)=M$ are needed to reduce the state to a product state.
From Lemma <ref>, $n_u=H(P(s))$, and since the state $\ket{\psi}$ is a pure state, we have $n_u=C(\ket{\psi}, D)$ $\square$.

Treating such a sequence of $M$ measurements as an error on a state $\ket{\psi}$ encoding a set of logical qubits, we can then prove the desired theorem:

Given a local Pauli basis $D$, the code distance $d$ of a $[[N,k,d]]$ stabilizer code, $P$, is bounded by the coherence of the maximally coherent stabilizer state in the code space:

\begin{eqnarray}
d\leq \max_{\psi\in P}C(\ket{\psi},D)\equiv C_{PD}
\end{eqnarray}

Proof: Without loss of generality choose $D=X$ as the basis diagonal with respect to the Pauli $\{X_i\}$ operators.
Then choose a complete set of logical Pauli operators $\tilde{Z}_n$ and $\tilde{X}_n$ acting on the code space, such that the basis states of the code, $\left|\psi_n\right>$, diagonal with the logical $\tilde{Z}_n$ operators, contain the maximally coherent stabilizer state $\ket{\psi_1}$ (i.e. $C(\ket{\psi_1},X)\geq C(\ket{\psi},X)$ for all stabilizer states $\ket{\psi}$ in the code space).
From lemma <ref>,  the states $\left|\psi_n\right>$ can be reduced to a product state in the computational basis with at most $C_{PD}$ measurements.
Thus, there exists a projector $P_{s_n}$, for each basis state $\ket{\psi_n}$, with weight $C_{x,n}=C_x(\ket{\psi_n})\leq C_{PD}$, that reduces that basis state $\left|\psi_n\right>$ to a $X$ basis state in $C_{x,n}$ measurements: $P_{s_n}\left|\psi_n\right>=2^{-C_{x,n}/2}\left|x_n,s_n\right>$ where $x_n$ are the value of the bits not projected by $P_{s_n}$ and $s_n$ are the values of the $C_{x,n}$ bits specified by the projector.

We now prove that one of the $P_{s_n}$, which has weight $M\leq C_{PD}$, must be an error and thus $d=M\leq C(P,D)$.
We use proof by contradiction and assume all $P_{s_n}$ are correctable.
This implies the error correction condition <cit.> for all $P_{s_n}\equiv P_n$:

\begin{eqnarray}
\left<\psi_i\right|P_nP_m\left|\psi_j\right>=\alpha_{nm}\delta_{ij}.
\end{eqnarray}

This condition for $n=m=1$, such that $P_1$ is the $X$ basis projector associated to the maximum coherent stabilizer state $\ket{\psi_1}$, implies that all basis states must have the same coherence $C_{PD}$.
First choosing $i=1$, the condition implies $\alpha_{11}=\bra{\psi_1}P_1^2\ket{\psi_1}=\bra{\psi_1}P_1\ket{\psi_1}=P(s_1)=2^{-C_{PD}}$ from lemma <ref>.
For $i\neq 1$ the condition $2^{-C_{PD}}=\bra{\psi_i}P_1P_1\ket{\psi_i}$ implies $P_1\ket{\psi_i}=2^{-C_{PD}/2}\ket{\psi_i'}$ where $\ket{\psi_i'}$ is a stabilizer state normalized to $1$.
Then from lemma <ref>, either $\ket{\psi_i'}$ is an $X$ basis state and $\ket{\psi_i}$ has coherence $C_{PD}$, or $\ket{\psi_i'}$ has some finite coherence $C'>0$ such that $C_{x,i}=C_{PD}+C'>C_{PD}$.
The second option is not valid from the assumption that $C_{PD}$ is the coherence of the maximal coherent stabilizer state, and so all basis states $\ket{\psi_i}$ must have coherence $C_{x,i}=C_{PD}$.
Since $\ket{\psi_i'}$ must have zero coherence, the projector $P_1\equiv P_{s_1}$, projects all basis states $\ket{\psi_n}$ to a product state $\ket{x_n,s_1}$.

Furthermore, from the error correction condition at $n=m=1$ we have $\braket{x_i,s_1}{x_j,s_2}=\delta_{ij}$ such that the states $P_1\ket{\psi_i}$ are all orthogonal to each other.
Now choose $\ket{\psi_2}$ to be the state obtained by flipping $\tilde{Z}_1$ of the first logical bit for the state $\ket{\psi_1}$, and consider the stabilizer state state $\ket{+}=(\ket{\psi_1}+\ket{\psi_2})/\sqrt{2}$ obtained by applying a logical Hadamard gate to the first logical bit.
Projecting $\ket{+}$ by $P_1$ gives us a stabilizer state $P_1\ket{+}=(\ket{x_1,s_1}+\ket{x_2,s_1})/2^{(C_{PD}+1)/2}$ which has coherence $1$ because of the required orthogonality between $\ket{x_1,s_1}$ and $\ket{x_2,s_1}$.
But this implies $\ket{+}$ has coherence $C_{PD}+1$ which is a contradiction with the assumption $\ket{\psi_1}$ is the maximally coherent stabilizer state. Thus the error correction condition can not hold for all $P_n$ and the code distance $d=C_{x,m}\leq C_{PD}$. $\square$

§ MEASUREMENT INDUCED MARKOVIAN DYNAMICS OF COHERENCE

§.§ Markovian dynamics of coherence in measurement-only circuits

In the main text, we discussed that the dynamics of coherence in the measurement-only limit are Markovian, and that they are described by the number of qubits polarized in the $X$, $Z$, and $Y$ directions, $N_x$, $N_z$, and $N_y=L-N_x-N_z$ respectively.
The Markov chain is defined by the conditional probabilities $P(N_x(n), N_z(n)|N_x(n-1), N_z(n-1))$ for $N_x$ and $N_z$ at step $n$ given them at step $n-1$.
To determine the conditional probabilities, first consider the event of an $X_i$ measurement.
If the measurement is made on a site polarized in the $X$ direction, the state does not change, but if it is made on a site polarized in $Y$ direction, the $X$ direction is learned and $Y$ direction is forgotten: $N_x\rightarrow N_x+1$ and $N_y\rightarrow N_y-1$.  Given that a $X_i$ measurement is made, the probability this occurs is $N_y/L$. A similar thing happens if a $Z$ polarized bit is measured, which occurs with a probability $N_z/L$, thus we have:

\begin{eqnarray}
P\left(N_x+1,N_z  |N_x,N_z\right) =p_x \frac{N_y}{L} \\ \nonumber
P\left(N_x+1,N_z-1|N_x,N_z\right) =p_x \frac{N_z}{L} \\ \nonumber
P\left(N_x,N_z+1  |N_x,N_z\right) =p_z \frac{N_y}{L} \\ \nonumber
P\left(N_x-1,N_z+1|N_x,N_z\right) =p_z \frac{N_x}{L} \\ \nonumber
P\left(N_x-1,N_z  |N_x,N_z\right) =p_y \frac{N_x}{L} \\ \nonumber
P\left(N_x,  N_z-1|N_x,N_z\right) =p_y \frac{N_z}{L} .
\end{eqnarray}

for the non-zero conditional probabilities.
Using these conditional probabilities, a rate equation can then be derived for the average density of $X$ polarized qubits after $m$ measurements $\overline{N}_x(m)=\sum_{N_x}N_x P(N_x(m))$ as

\begin{eqnarray}\label{eq:rateeq}
\partial_m \overline{N}_x(m)=p_x \frac{L-\overline{N}_x}{L} - (p_z+p_y)\frac{\overline{N}_x}{L},
\end{eqnarray}

with similar equations for $\overline{N}_y$ and $\overline{N}_z$.
The steady state solution to these dynamics predicts the average steady state density of $\alpha$ polarized qubits is equal to $p_\alpha$ as intuitively expected: $\overline{N}_\alpha=p_\alpha L$ or equivalently for the coherences $C_{\alpha}=(1-p_{\alpha})L$.

§.§ Coherence dynamics in weak measurement limit

In this section we derive the conditional probabilities for the Markov process in the weak measurement limit $p_m\sim O(1/L^2)$, arguing why, in this limit, each measurement has an uncertain outcome and changes the state.
We again make use of stabilizer state tools, and in particular the CSS gauge of a stabilizer state discussed in appendix <ref>.
As discussed there, this representation of the stabilizer state has two parity check matrices $G^x_x$ and $G^z_z$ with $N^x$ and $N^z$ rows respectively.
The generators specified by these check matrices, are all strings of all $X(Z)$ Pauli operators and therefore constrain $N^{x(z)}$ bits of information about the $X(Z)$ basis states that make up the stabilizer state.
Theorem <ref> then shows that the $X(Z)$ coherence of a stabilizer pure state is equal to the number of bits not known about the $X(Z)$ basis ($C_{x(z)}=L-N_{x(z)}$).
Using this theorem, we can therefore focus on the conditional probabilities for the number of bits of information specified about the $X$ and $Z$ basis ($N_x$ and $N_z$) instead of the coherences directly.
Notice that this is a generalization of the procedure for the measurement-only limit where the number of bits known about the $X(Z)$ basis states is equal to the number of physical qubits polarized in the $X(Z)$ basis.

We are therefore interested in obtaining the conditional probabilities $P(N_x(n), N_z(n)|N_x(n-1), N_z(n-1))$, and can determine them by determining the effect of an $X_i$ measurement on site $i$.
The measurement can either act trivially on the state, if $\ket{\psi}$ is an eigenstate of $X_i$ (i.e. $[X_i,g_j]=0$ for all generators $g_j$), or it can change the state (i.e. $[X_i,g_j]\neq 0$ for  at least one $g_j$).
To determine the probability that a measurement of $X_i$ acts trivially on the state, we first note that after $n=O(L^2)$ random CNOTs, each generator $g_j$ will have Pauli operators randomly distributed across the whole system.
In the CSS gauge, the $g^x$ generators all commute with $X_i$, while the $g^z$ and $g^y$ generators have, after $n=O(L^2)$ random CNOTs, an equal probability of containing the $Z_i$ Pauli operator.
Therefore we estimate the probability that the measurement of $X_i$ changes the state is $\approx 1-(1/2)^{L-N_x}$, and approaches $1$ in the thermodynamic limit as long as the coherence $C_x=L-N_x$ is $O(L)$.

When $[X_i,g_j]\neq0$ for some $g_j$, the measurement of $X_i$ changes the stabilizer state and we must identify how the stabilizer state is updated.