# Strategic Code: A Unified Spatio-Temporal Framework for Quantum Error-
Correction

Andrew Tanggara<EMAIL_ADDRESS>Centre for Quantum Technologies,
National University of Singapore, 3 Science Drive 2, Singapore 117543.
Nanyang Quantum Hub, School of Physical and Mathematical Sciences, Nanyang
Technological University, Singapore 639673.  Mile Gu
<EMAIL_ADDRESS>Nanyang Quantum Hub, School of Physical and
Mathematical Sciences, Nanyang Technological University, Singapore 639673.
Centre for Quantum Technologies, National University of Singapore, 3 Science
Drive 2, Singapore 117543.  Kishor Bharti<EMAIL_ADDRESS>A*STAR
Quantum Innovation Centre (Q.InC), Institute of High Performance Computing
(IHPC), Agency for Science, Technology and Research (A*STAR), 1 Fusionopolis
Way, #16-16 Connexis, Singapore, 138632, Republic of Singapore.  Centre for
Quantum Engineering, Research and Education, TCG CREST, Sector V, Salt Lake,
Kolkata 700091, India.

(August 28, 2024)

###### Abstract

Quantum error-correcting code (QECC) is the central ingredient in fault-
tolerant quantum information processing. An emerging paradigm of dynamical
QECC shows that one can robustly encode logical quantum information both
temporally and spatially in a more resource-efficient manner than traditional
QECCs. Nevertheless, an overarching theory of how dynamical QECCs achieve
fault-tolerance is lacking. In this work, we bridge this gap by proposing a
unified spatio-temporal QECC framework called the “strategic code” built
around an “interrogator” device which sequentially measures and evolves the
spatial QECC in an adaptive manner based on the “quantum combs” formalism, a
generalization of the channel-state duality. The strategic code covers all
existing dynamical and static QECC, as well as all physically plausible QECCs
to be discovered in the future, including those that involve adaptivity in its
operational dynamics. Within this framework, we show an algebraic and an
information-theoretic necessary and sufficient error-correction conditions for
a strategic code, which consider spatially and temporally correlated errors.
These conditions include the analogous known static QECC conditions as a
special case. Lastly, we also propose an optimization-theoretic approach to
obtain an approximate strategic code adapting to a correlated error.

The susceptibility of quantum systems to noise has been a major obstacle in
achieving the advantages offered by quantum information processing tasks over
their classical counterparts. A quantum error-correcting code (QECC) overcomes
this problem by redundantly encoding quantum information in a noise-robust
manner. However conventional QECCs involve operations on many-body quantum
system to encode and decode logical information, which are notoriously
resource-intensive. The novel paradigm of dynamical QECC offers a promising
solution by utilizing the temporal dimension to encode and decode logical
information, thus easing this demanding requirement. Many dynamical QECC has
been proposed, with the most popular being the Floquet codes [1, 2, 3, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13] which measurement sequence is performed
periodically, although other non-periodic codes have also been explored [14,
15, 16, 17, 18, 19, 20, 21, 22].

Despite the remarkable progress in dynamical QECC research, an overarching
theory of error-correction for QECCs considering both spatial and temporal
encoding that is analogous to its static counterpart [23, 24, 25, 26, 27, 28,
29], has been largely unexplored. In order to analyze the error-correction
capability of a QECC with respect to resources that it uses, both spatially
and temporally, such theory is imperative. In this work we bridge this gap by
proposing a QECC framework called the “strategic code” which unifies all
existing dynamical and static QECCs, as well as all physically plausible QECCs
to be discovered. The novelty of the strategic code lies in the “interrogator”
device which captures any set of operations performed both spatially and
temporally between the encoding and decoding stage, completing the conceptual
gap operationally between static and dynamical QECC paradigms. The strategic
code framework also generalize existing QECC paradigms by accommodating
temporal operational adaptivity of the code and the effect of the most general
class of noise with both spatial and temporal (non-Markovian) correlations
[30, 31, 32, 33, 34, 35, 36, 37, 38].

Within the strategic code framework for QECCs with an interrogator that
maintains a classical memory and for general error models (which may exhibit
correlations), we show necessary and sufficient error-correction conditions,
as well as formulate a multi-convex optimization problem to obtain an
approximate code. Our conditions are presented in two equivalent forms:
algebraically (Theorem 1) and an information-theoretically (Theorem 2). Due
the generality of our framework, algebraic and information-theoretic necessary
and sufficient conditions for static QECC [23, 25, 24, 26] are included as
special cases. Since strategic code subsumes notable QECC frameworks, such as
the sequential Pauli measurements framework [20], ZX calculus framework [21],
and anyon condensation framework [22], these conditions serve as a guide in a
code construction within these frameworks.

##  I General QECC Scenario

Figure 1:  General QECC Scenario. At round $0$, error $\mathcal{E}^{(0)}$ is
inflicted to code state $|\psi\rangle$ that belongs to the initial code space
$\mathscr{S}_{Q_{0}}$, evolving it to error-inflicted subspace
$\mathscr{S}_{Q_{0}^{\prime}}$. Then an interrogator device $\mathbf{I}$ is
applied to the code, performing quantum operations on the code $l$ times in
sequence. At each round $r\in\\{1,\dots,l\\}$, evolution on the code is
performed by a quantum operation $\mathcal{C}^{(r)}$, giving a new code space
$\mathscr{S}_{Q_{r}}$ followed by error map $\mathcal{E}^{(r)}$ further
evolving the code space $\mathscr{S}_{Q_{r}}$ to error-inflicted subspace
$\mathscr{S}_{Q_{r}^{\prime}}$. The interrogator maintains a classical memory
(illustrated by double-wires) which keeps information about previous events
(e.g. measurement outcome) and determines the choice of quantum operation
performed at each round. At the start of round $r$, if the interrogator’s
memory state is $m_{r-1}$ then it performs quantum operation
$\mathcal{C}_{m_{r-1}}^{(r)}$. After performing the operation, it the updates
the state of the classical memory register $m_{r-1}\mapsto m_{r}$ where
$m_{r}$ is the updated memory state that determines the subsequent operations.
After the final round $l$, decoding $\mathbf{D}$ is performed based on the
final memory state $m_{l}$, where channel $\mathcal{D}_{m_{l}}$ is applied to
the code system to restore the initial code state $|\psi\rangle$.

Error-correcting code scenario can always be described as interactions between
a code and some noise changing the state of a physical system where logical
information is encoded in. Conventionally, the essential two ingredients of a
code are: (1) an operation encoding the logical information into a physical
system and (2) an operation that recovers logical information from any error
caused by noise that occurs in between. In a quantum error-correcting code
(QECC) scenario, further interplay between the code and noise can take place
between encoding and decoding, allowing more interesting implications on the
error-correction process due to inherent quantum-mechanical effects.

In general, a QECC scenario consists of three stages: The first stage being
the encoding stage, the final stage being the decoding stage, and between
them, any set of operations performed by the code, interacting with the noise
(see Fig. 1). We simplify this by starting with an initial codespace
$\mathscr{S}_{Q_{0}}$ instead of an encoding map (as an encoding map uniquely
defines the initial codespace). Then a set of operations $\mathbf{I}$, called
the interrogator, is performed by the code in between encoding and decoding.
The interrogator performs $l\geq 0$ rounds of check operations where the check
operation $\mathcal{C}^{(r)}$ at round $r$ may be chosen (from a set of
allowed operations) adaptively based on events happened in the previous rounds
stored in a classical memory register. When the classical memory register is
in a memory state $m_{r-1}$, then a check operation
$\mathcal{C}_{m_{r-1}}^{(r)}$ is performed. Between encoding and decoding, we
also have errors $\mathbf{E}$ being inflicted on the code right after the
encoding stage and after each round of operation. Errors can generally have
spatial correlations within each round and temporal (non-Markovian)
correlations across rounds. Lastly in the decoding stage, the decoding
procedure $\mathbf{D}$ consists of multiple decoders that the coder can choose
from based on the information stored in the classical memory $m_{l}$ after the
last round of operation. A successful QECC procedure recovers logical
information encoded in the initial codespace as codestate $|\psi\rangle$.

Although here we focus on an interrogator where only classical memory storage
is allowed, one can easily generalize this to an interrogator where quantum
memory is involved. Such interrogator could model a scenario where a small-
size quantum system can be used reliably to store some information about the
code across time alongside classical memory to be used in the decoding stage.
Particularly, this generalization reduces to the entanglement-assisted QECC
(EAQECC) [39, 40, 41] when we set the number of rounds $l=0$, see Appendix B.1
for details.

More formally, the entirety of an $l$-round QECC scenario is defined by the
following objects:

  1. 1.

A sequence of codespaces
$\mathscr{S}_{Q_{0}},\mathscr{S}_{Q_{0}^{\prime}},\dots,\mathscr{S}_{Q_{l}},\mathscr{S}_{Q_{l}^{\prime}}$
which are a subspace of $d$ dimensional complex vector space
${\mathbb{C}}^{d}$ and spaces of bounded linear operators from
${\mathbb{C}}^{d}$ to ${\mathbb{C}}^{d}$,
$\mathscr{H}_{Q_{0}},\mathscr{H}_{Q_{0}^{\prime}},\dots,\mathscr{H}_{Q_{l}},\mathscr{H}_{Q_{l}^{\prime}},\mathscr{H}_{D}$.
The codespaces and operator spaces depends on operations performed in the two
stages defined below, while the initial codespace $\mathscr{S}_{Q_{0}}$ is
defined independent of them.

  2. 2.

An interrogator $\mathbf{I}$ consists of a sequence of check instruments
$\mathcal{C}^{(1)},\,\mathcal{C}^{(2)}:=\\{\mathcal{C}_{m_{1}}^{(2)}\\}_{m_{1}},\,\dots,\,\mathcal{C}^{(l)}:=\\{\mathcal{C}_{m_{l-1}}^{(l)}\\}_{m_{l-1}}$
where
$\mathcal{C}_{m_{r-1}}^{(r)}:=\\{\mathcal{C}_{m_{r}|m_{r-1}}^{(r)}\\}_{m_{r}}$
and $\mathcal{C}^{(1)}:=\\{\mathcal{C}_{m_{1}}^{(1)}\\}_{m_{1}}$ are a check
instrument for round $r>1$ and round $r=1$, respectively. Each
$\mathcal{C}_{m_{r}|m_{r-1}}^{(r)}:\mathscr{H}_{Q_{r-1}^{\prime}}\rightarrow\mathscr{H}_{Q_{r}}$
is a completely-positive (CP) map such that
$\sum_{m_{r}}\mathcal{C}_{m_{r}|m_{r-1}}^{(r)}$ is trace preserving (TP).
Check instrument $\mathcal{C}_{m_{r-1}}^{(r)}$ may perform a deterministic
operation on the code (e.g. a unitary) in which $\mathcal{C}_{m_{r-1}}^{(r)}$
consist of only one element, or a probabilistic operation where each of its
element maps an initial codestate to a post-measurement codestate.

  3. 3.

Decoder $\mathbf{D}=\\{\mathcal{D}_{m_{l}}\\}_{m_{l}}$ where decoding channel
$\mathcal{D}_{m_{l}}:\mathscr{H}_{Q_{l}^{\prime}}\rightarrow\mathscr{H}_{D}$
is a CPTP map that given classical information $m_{l}$ in the classical memory
register recovers the initial code state $|\psi\rangle_{Q_{0}}$ (what this
precisely means will be defined shortly in Definition 2).

  4. 4.

Error $\mathbf{E}$ consists of a sequence of error maps
$\mathcal{E}^{(0)},\mathcal{E}^{(1)},\dots,\mathcal{E}^{(l)}$ where
$\mathcal{E}^{(r)}:\mathscr{H}_{Q_{r}}\otimes\mathscr{H}_{E_{r-1}}\rightarrow\mathscr{H}_{Q_{r}^{\prime}}\otimes\mathscr{H}_{E_{r}}$
is a CP trace non-increasing map defined by
$\mathcal{E}^{(r)}(\rho)=\sum_{e_{r}}E_{e_{r}}\rho E_{e_{r}}^{\dagger}$ where
bounded linear operator
$E_{e_{r}}:\mathscr{S}_{Q_{r}}\otimes\mathscr{S}_{E_{r-1}}\rightarrow\mathscr{S}_{Q_{r}^{\prime}}\otimes\mathscr{S}_{E_{r}}$
being a Kraus operator for $\mathcal{E}^{(r)}$ for $r\geq 1$ and
$E^{(0)}:\mathscr{S}_{Q_{0}}\rightarrow\mathscr{S}_{Q_{0}^{\prime}}\otimes\mathscr{S}_{E_{0}}$.
Spaces labeled by $E_{r-1}$ and $E_{r}$ are the systems storing any temporal
correlations in the noise environment from round $r-1$ to round $r$ and from
round $r$ to round $r+1$, respectively. In the case of uncorrelated error
sequence we simply have
$\mathcal{E}^{(r)}:\mathscr{H}_{Q_{r}}\rightarrow\mathscr{H}_{Q_{r}^{\prime}}$,
with Kraus operators of the form
$E_{e_{r}}:\mathscr{S}_{Q_{r}}\rightarrow\mathscr{S}_{Q_{r}^{\prime}}$.

We remark that in the description above it is assumed that the dimension $d$
of the quantum system where the code lives is always the same at all rounds.
However, this assumption is only for convenience and is not assumed in our
proofs thus can be relaxed to round-dependent dimensions. Namely, code spaces
$\mathscr{S}_{Q_{r}},\mathscr{S}_{Q_{r}^{\prime}}$ being a subspace of
${\mathbb{C}}^{d_{r}}$ and $\mathscr{H}_{Q_{r}},\mathscr{H}_{Q_{r}^{\prime}}$
being spaces of bounded linear operators from ${\mathbb{C}}^{d_{r}}$ to
${\mathbb{C}}^{d_{r}}$.

Completely positive map $\mathcal{C}_{m_{r}|m_{r-1}}^{(r)}$ corresponds to
mapping multiple measurement outcomes arising from measurement setting defined
by memory state $m_{r-1}$. This can be formally described as POVM
$\\{M_{o_{r}|m_{r-1}}\\}_{o_{r}}$ defined by the Kraus operators
$C_{o_{r}|m_{r-1}}^{(r)}$ of CPTP map
$\mathcal{C}_{m_{r-1}}^{(r)}=\sum_{m_{r}}\mathcal{C}_{m_{r}|m_{r-1}}^{(r)}$
defined by the instrument $\\{\mathcal{C}_{m_{r}|m_{r-1}}^{(r)}\\}_{m_{r}}$.
Namely,
$M_{o_{r}|m_{r-1}}=C_{o_{r}|m_{r-1}}^{(r){\dagger}}C_{o_{r}|m_{r-1}}^{(r)}$
and
$\mathcal{C}_{m_{r}|m_{r-1}}^{(r)}(\rho)=\sum_{o_{r}}C_{o_{r}|m_{r-1}}^{(r)}\rho
C_{o_{r}|m_{r-1}}^{(r){\dagger}}$. The memory state $m_{r}$ is defined by some
memory update function $f_{r}$ that maps the measurement outcomes $o_{r}$ and
memory state $m_{r-1}$ to memory state $m_{r}$, namely
$\mathcal{C}_{m_{r-1}}^{(r)}=\sum_{m_{r}}\sum_{o_{r}:f_{r}(o_{r},m_{r-1})=m_{r}}\mathcal{C}_{o_{r}|m_{r-1}}^{(r)}$
where $\mathcal{C}_{o_{r}|m_{r-1}}^{(r)}(\rho)=C_{o_{r}|m_{r-1}}^{(r)}\rho
C_{o_{r}|m_{r-1}}^{(r){\dagger}}$. Thus,
$\mathcal{C}_{m_{r}|m_{r-1}}=\sum_{o_{r}:f_{r}(o_{r},m_{r-1})=m_{r}}\mathcal{C}_{o_{r}|m_{r-1}}^{(r)}$.
Note that here we consider time dependent memory update functions
$f_{1},\dots,f_{l}$, for full generality, but of course one can instead
consider a time-independent function $f$ used in every round. Both measurement
outcome $o_{r}$ and measurement setting $m_{r-1}$ should give spatial and
temporal information about error occurrence. The memory state $m_{r-1}$ at the
start of round $r\in\\{2,\dots,l\\}$ determines the choice of instrument
$\mathcal{C}_{m_{r-1}}^{(r)}$ applied in that round, whereas memory state
$m_{l}$ at final round $l$ is used to choose which decoder
$\\{\mathcal{D}_{m_{l}}\\}_{m_{l}}$ is used to recover the initial codestate.
Each final memory state $m_{l}$ corresponds to a unique set $O_{m_{l}}$
(defined by memory update functions $f_{1},\dots,f_{l}$) containing all check
measurement outcome sequence $o=o_{1},o_{2},\dots,o_{l}$ where there exists a
sequence of memory states $m_{1},\dots,m_{l-1}$ such that
$m_{l}=f_{l}(o_{l},m_{l-1})$ and $m_{l-1}=f_{l-1}(o_{l-1},m_{l-2})$, …,
$m_{1}=f_{1}(o_{1})$. Hence we can define a function $f^{*}$ as
$f_{l}^{*}(o)=f_{l}(o_{l},f_{l-1}(o_{l-1},\dots f(o_{1})\dots))$ which maps an
outcome sequence $o$ to a final memory state. So we can express in symbols,
$O_{m_{l}}=\\{o:f_{l}^{*}(o)=m_{l}\\}$.

Note that codespace $\mathscr{S}_{Q_{r}}$ at round $r$ is determined by the
choice of check instrument $\mathcal{C}_{m_{r-1}}^{(r)}$ and the outcome
$o_{r}$ from the measurement defined by it. Namely,
$\mathcal{C}_{o_{r}|m_{r-1}}^{(r)}$ maps the state of the codespace
$\mathscr{S}_{Q_{r-1}^{\prime}}$ (the codespace after error map
$\mathcal{E}^{(r-1)}$ at the previous round) to codespace
$\mathscr{S}_{Q_{r}}$. Also, both codespaces $\mathscr{S}_{Q_{r}}$ and
$\mathscr{S}_{Q_{r-1}^{\prime}}$ may depend on the check instruments and error
maps in the previous rounds.111For Floquet codes this corresponds to the
instantaneous stabilizer groups, which is a stabilizer group at a particular
round $r$ defined by the check measurement outcome at that round and as well
as the outcomes and errors occurring up to that round.

Interrogator $\mathbf{I}$, error $\mathbf{E}$, and decoder $\mathbf{D}$ in a
QECC scenario can be represented by the quantum combs formalism [42, 43, 31,
44, 45, 46, 47]222Also known as process tensor in [45] or quantum strategy in
[46], and more generally, process matrix in [47] where exotic causal ordering
can be exhibited.. It has the advantage of compactly representing temporally-
correlated sequence of dynamics on a quantum system as a positive semidefinite
operator by generalizing the Choi-Jamiołkowski isomorphism [48, 49, 50] which
holds the complete information about the temporal dynamics. Quantum combs has
found many applications such as quantum causal inference [51, 52], metrology
[53, 54], interactive quantum games [46], open quantum systems [55], quantum
cryptography [56], and quantum communication [57]. However, to our knowledge
no application of quantum combs has been made in the context of QECC before.
In the following we describe the quantum combs representation for the QECC
scenario. More technical details of the quantum combs representation can be
found in Appendix B.

###  I.1 Strategic code and quantum combs representation

In an $l$-round QECC scenario, the entirety of how logical information is
preserved can be described by the initial codespace $\mathscr{S}_{Q_{0}}$ and
the sequence of check instruments
$\mathcal{C}^{(1)},\mathcal{C}^{(2)},\dots,\mathcal{C}^{(l)}$. These two
objects made up the strategic code, defined formally in the following.

######  Definition 1.

An $l$-round strategic code is defined by a tuple
$(\mathscr{S}_{Q_{0}},\mathbf{I})$ where $\mathscr{S}_{Q_{0}}$ is the initial
codespace which is a subspace of ${\mathbb{C}}^{d}$, and
$\mathbf{I}=\\{\mathbf{I}_{m_{l}}\\}_{m_{l}}$ is a collection of positive
semidefinite operators in
$\mathscr{H}_{Q_{0}^{\prime}}\otimes(\bigotimes_{r=1}^{l}\mathscr{H}_{Q_{r-1}^{\prime}}\otimes\mathscr{H}_{Q_{r}})$
called the interrogator. Interrogator $\mathbf{I}$ describes all possible
sequences of check instruments
$\\{\mathcal{C}^{(1)},\mathcal{C}_{m_{1}}^{(2)},\dots,\mathcal{C}_{m_{l-1}}^{(l)}\\}_{m_{1},\dots,m_{l-1}}$
along their with temporal dependence defined by functions $f_{1},\dots,f_{l}$.
An element $\mathbf{I}_{m_{l}}$ of an interrogator is called an interrogator
operator, which is a quantum comb describing the sequences of CP maps
$\mathcal{C}_{m_{1}}^{(1)},\mathcal{C}_{m_{2}|m_{1}}^{(2)},\dots,\mathcal{C}_{m_{l}|m_{l-1}}^{(l)}$
that ends in final memory state $m_{l}$. An interrogator operator
$\mathbf{I}_{m_{l}}$ takes the form of

$\mathbf{I}_{m_{l}}=\sum_{o\in O_{m_{l}}}|C_{m_{l},o}\rrangle\llangle
C_{m_{l},o}|$ (1)

where $O_{m_{l}}$ is the set of check measurement outcome sequences
$o=o_{1},\dots,o_{l}$ resulting in final memory state $m_{l}$. Here
$|C_{m_{l},o}\rrangle=|C_{o_{l}|m_{l-1}}^{(l)}\rrangle\otimes\dots\otimes|C_{o_{1}}^{(1)}\rrangle$
(with $m_{r}=f_{r}(o_{r},m_{r-1})$) is an eigenvector of interrogator operator
$\mathbf{I}_{m_{l}}$, and $|C_{o_{r}|m_{r-1}}^{(r)}\rrangle$ is the vectorized
representation of the Kraus operator $C_{o_{r}|m_{r-1}}^{(r)}$.

Note that
$\mathscr{H}_{Q_{0}^{\prime}}\otimes(\bigotimes_{r=1}^{l}\mathscr{H}_{Q_{r-1}^{\prime}}\otimes\mathscr{H}_{Q_{r}})$
is the tensor product of bounded linear operator space of the inputs and
outputs of the sequence of CP maps of the check instruments. An interrogator
describes all possible “trajectories” of how the code evolves according to the
sequence of check measurement outcomes and operations performed based on
previously obtained outcomes. As an example, if the initial codestate is
$\rho^{Q_{0}}$ (round $r=0$) and in round $r=1$ a measurement is performed, an
outcome $0$ will result in post-measurement codestate $\rho_{0}^{Q_{1}}$ while
an outcome $m_{1}\neq 0$ codestate $\rho_{m_{1}}^{Q_{1}}$ which is generally
is not equal to $\rho_{0}^{Q_{1}}$. Outcome $m_{1}$ also determines which
operation is performed in the next round ($r=2$). So if a measurement at $r=2$
depending on outcome $m_{1}$ gives an outcome $m_{2}$, then we obtain
codestate $\rho_{m_{2}|m_{1}}^{Q_{2}}$, where the label $m_{2}|m_{1}$
describes the “trajectory”. If decoding is performed on
$\rho_{m_{2}|m_{1}}^{Q_{2}}$, then the decoder will use $m_{2}$ to recover the
initial state. For a diagram illustrating the trajectories of the code induced
by the operations performed by the interrogator, see Fig. 2.

Figure 2: Trajectories of the code evolution in an interrogator.

Now we turn to how decoding and errors are described in an $l$-round QECC
scenario. Decoding channel $\mathcal{D}_{m_{l}}$ is described by each of its
Choi-Jamiolkowski representation $\mathbf{D}_{m_{l}}$, which is a positive
semidefinite operator in $\mathscr{H}_{Q_{l}^{\prime}}\otimes\mathscr{H}_{D}$.
Similarly, we can also represent the sequence of error CP maps
$\mathcal{E}^{(0)},\dots,\mathcal{E}^{(l)}$ as positive semidefinite operator

$\mathbf{E}=\sum_{e}|E_{e}\rrangle\llangle E_{e}|$ (2)

where $e=e_{0},e_{1},\dots,e_{l}$ indicates an error sequence. Here
$|E_{e}\rrangle$ is the vectorized representation of the sequence of Kraus
operators $E_{e_{0}},\dots,E_{e_{l}}$ of the error maps.

The entire interaction between an interrogator operator ending in final memory
state $m_{l}$ and the error maps can be described as
$\mathbf{E}\ast\mathbf{I}_{m_{l}}$ where "$\ast$" is an associative dyadic
operation between two linear operators
$A\in\mathscr{H}_{A}\otimes\mathscr{H}_{C}$ and
$B\in\mathscr{H}_{C}\otimes\mathscr{H}_{B}$ known as the link product [42],
which can be thought of as a generalization of the Hilbert-Schmidt inner
product. The link product is defined as $A\ast
B:=\textup{Tr}_{C}((A^{\top_{C}}\otimes I_{B})(I_{A}\otimes B))$ where
$\textup{Tr}_{C}$ is partial trace over operator space $\mathscr{H}_{C}$,
$\cdot^{\top_{C}}$ is the partial transpose over $\mathscr{H}_{C}$, and
$I_{A},I_{B}$ are identity operators of $\mathscr{H}_{A}$ and
$\mathscr{H}_{B}$, respectively. Note that if the operator space
$\mathscr{H}_{C}$ has trivial dimension then $A\ast B=A\otimes B$, and if
$\mathscr{H}_{A},\mathscr{H}_{B}$ have a trivial dimension then $A\ast
B=\textup{Tr}(A^{\top}B)$.

Some of our results are expressed in term of the explicit error sequence $e$
described by $|E_{e}\rrangle\llangle E_{e}|$ instead of $\mathbf{E}$. Hence at
times we will describe the sequence of error maps as the collection of the
rank-1 operators describing the error sequences,
$\mathfrak{E}:=\\{|E_{e}\rrangle\llangle E_{e}|\\}_{e}$. In both the link
product form and the rank-1 vector form, we can express the complete
interaction between the an interrogator operator and an error sequence $e$ as

$\displaystyle\mathbf{E}\ast\mathbf{I}_{m_{l}}$
$\displaystyle=\sum_{e}|E_{e}\rrangle\llangle E_{e}|\ast\mathbf{I}_{m_{l}}$
(3) $\displaystyle=\sum_{e}\sum_{o\in O_{m_{l}}}|K_{e,m_{l},o}\rrangle\llangle
K_{e,m_{l},o}|\;,$

where $|K_{e,m_{l},o}\rrangle$ is the vectorized form of Kraus operator
$K_{e,m_{l},o}$ defined by the Kraus operators of the check instruments and
error maps $E_{e_{l}},C_{o_{l}|m_{l-1}}^{(l)},\dots,C_{o_{1}}^{(1)},E_{e_{0}}$
(where the check instrument $\mathcal{C}_{o_{r}|m_{r-1}}^{(r)}$ in round $r$
implicitly performs an identity map on the environment
$\mathscr{H}_{E_{r-1}}$, for explicit definition see Appendix B).

###  I.2 Interrogator in existing codes

A sequence of quantum operations that temporally evolve the spatial encoding
of logical information while also extracting error syndromes is the central
ingredient in dynamical QECCs such as spacetime codes [14, 15, 16], Floquet
codes [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], and dynamical code [20].
The notion of interrogator captures This sequence of operations in these codes
can be formulated as an interrogator.

In an $n$-qubit spacetime code, generally a round of operation performed by
the interrogator consists of Clifford gates and Pauli measurements on disjoint
subsets of the $n$-qubits. Since the operations are not adapting to events in
preceding rounds (measurements, etc.), here the interrogator simply stores all
measurement outcomes $o$ to be used at the decoding round. For more detailed
discussions on interrogator formulation of spacetime code see Appendix C.

On the other hand in a Floquet code and a dynamical code, generally a round of
operation by the interrogator consists of commuting Pauli measurements.
Similar to the spacetime code, the sequence of operations performed on the
code is predetermined and the interrogator simply stores all measurement
outcomes $o$ to be used at the decoding round. In Floquet code, however, Pauli
measurements are performed in cycles. For example in the Hastings-Haah
honeycomb code [1, 2], one performs a 3-cycle of Pauli $X$, followed by Pauli
$Y$, then Pauli $Z$, which in principle can be performed cyclically
indefinitely. However in the finite time window where measurement syndromes
can be revealed from the measurements, error-correction analysis using an
interrogator consisting of measurements in this time window can be useful. For
more detailed discussion on the Hastings-Haah honeycomb code in the
interrogator form, see Appendix D.

##  II General Error-Correction Conditions

We now formalize the notion of correctability of an error $\mathbf{E}$ by a
strategic code
$(\mathscr{S}_{Q_{0}},\mathbf{I}=\\{\mathbf{I}_{m_{l}}\\}_{m_{l}})$.

######  Definition 2.

Strategic code $(\mathscr{S}_{Q_{0}},\mathbf{I})$ corrects error $\mathbf{E}$
if there exists decoding channels $\\{\mathcal{D}_{m_{l}}\\}_{m_{l}}$ such
that for all $|\psi\rangle\in\mathscr{S}_{Q_{0}}$,

$\displaystyle\mathcal{D}_{m_{l}}(\mathbf{E}\ast\mathbf{I}_{m_{l}}\ast|{\psi}\rangle\mkern-4.0mu\langle{\psi}|)=\lambda_{m_{l}}|{\psi}\rangle\mkern-4.0mu\langle{\psi}|$
(4)

for some constant $\lambda_{m_{l}}\in{\mathbb{R}}$.

We note that how recovery of the initial codestate $|\psi\rangle$ is being
defined to be up to a constant independent of $|\psi\rangle$ is an artifact
from the fact that the error $\mathbf{E}$ and the interrogator operator
$\mathbf{I}_{m_{l}}$ are not necessarily trace preserving. Namely when there
is only one reachable final memory state $m_{l}$ with probability one given
error $\mathbf{E}$ and initial codestate $|\psi\rangle$ then the constant is
independent of $m_{l}$. Additionally when all error maps
$\mathcal{E}^{(0)},\dots,\mathcal{E}^{(l)}$ are trace preserving then we have
$\lambda_{m_{l}}=1$. Now given a precise definition of a successful recovery
for error-correction, in the following we give two equivalent necessary and
sufficient conditions in an algebraic form and in an information-theoretic
form.

###  II.1 Algebraic error-correction condition

Now we state the algebraic necessary and sufficient error-correction condition
for a strategic code. For notational simplicity, below we suppress the
identity operators for operator multiplications to match the dimensions, e.g.
for operators $M\in\mathscr{H}_{A}\otimes\mathscr{H}_{C}$ and
$N\in\mathscr{H}_{C}\otimes\mathscr{H}_{B}$ we write $MN$ when we mean
$(M\otimes I_{B})(I_{A}\otimes N)$.

######  Theorem 1.

A strategic code $(\mathscr{S}_{Q_{0}},\mathbf{I})$ corrects $\mathfrak{E}$ if
and only if

$\begin{gathered}\llangle E_{e^{\prime}}|\big{(}|C_{m_{l}}\rrangle\llangle
C_{m_{l},o}|\otimes|j\rangle\langle
i|\big{)}|E_{e}\rrangle=\lambda_{e^{\prime},e,m_{l},o}\delta_{j,i}\end{gathered}$
(5)

for a constant $\lambda_{e^{\prime},e,m_{l},o}\in{\mathbb{C}}$, and for all
$m_{l}$, all check measurement outcome sequence $o\in O_{m_{l}}$, all pairs of
error sequences $e,e^{\prime}$, and all $i,j$.

Here $|C_{m_{l}}\rrangle=\sum_{o\in O_{m_{l}}}|C_{m_{l},o}\rrangle$ and
$|C_{m_{l},o}\rrangle$ is an eigenvector of interrogator operator
$\mathbf{I}_{m_{l}}$ as defined in eqn. (1). Vectors $|i\rangle,|j\rangle$ are
orthonormal basis vectors of initial codespace $\mathscr{S}_{Q_{0}}$.

###### Proof.

First assume that strategic code $(\mathscr{S}_{Q_{0}},\mathbf{I})$ corrects
$\mathfrak{E}$, hence there is a set of decoding channels
$\\{\mathcal{D}_{m_{l}}\\}_{m_{l}}$ such that (4) is satisfied. First note
that we can express eqn. (4) in Kraus representation and use
$\Pi_{Q_{0}}|\psi\rangle=|\psi\rangle$ where $\Pi_{Q_{0}}$ is a projector to
initial codespace $\mathscr{S}_{Q_{0}}$ to obtain

$\displaystyle\mathcal{D}_{m_{l}}(\mathbf{E}\ast\mathbf{I}_{m_{l}}\ast|{\psi}\rangle\mkern-4.0mu\langle{\psi}|)$
(6)
$\displaystyle=\sum_{e,o}\mathcal{D}_{m_{l}}(K_{e,m_{l},o}\Pi_{Q_{0}}|{\psi}\rangle\mkern-4.0mu\langle{\psi}|\Pi_{Q_{0}}K_{e,m_{l},o}^{\dagger})$
$\displaystyle=\sum_{e,o,k}D_{k|m_{l}}K_{e,m_{l},o}\Pi_{Q_{0}}|{\psi}\rangle\mkern-4.0mu\langle{\psi}|\Pi_{Q_{0}}K_{e,m_{l},o}^{\dagger}D_{k|m_{l}}^{\dagger}$
$\displaystyle=\lambda_{m_{l}}\Pi_{Q_{0}}|{\psi}\rangle\mkern-4.0mu\langle{\psi}|\Pi_{Q_{0}}\;,$

where $\\{D_{k|m_{l}}\\}_{k}$ are the Kraus operators of decoding channel
$\mathcal{D}_{m_{l}}$. By the non-uninqueness of Kraus representation (see
e.g. [58]), both $D_{k|m_{l}}K_{e,m_{l},o}$ and
$\sqrt{\lambda_{m_{l}}}\Pi_{Q_{0}}$ can be thought of as Kraus representations
of the composition of maps
$\mathcal{D}_{m_{l}}\circ(\mathbf{E}\ast\mathbf{I}_{m_{l}}\ast(\cdot))$, where
the latter Kraus representation consists of only one operator. Thus there must
exist some complex number $\gamma_{k,e,o}^{(m_{l})}$ such that
$D_{k|m_{l}}K_{e,m_{l},o}\Pi_{Q_{0}}=\gamma_{k,e,o}^{(m_{l})}\Pi_{Q_{0}}$ for
all $e,o,k$. Thus we have

$\displaystyle\llangle E_{e^{\prime}}|\big{(}|C_{m_{l}}\rrangle\llangle
C_{m_{l},o}|\otimes|j\rangle\langle i|\big{)}|E_{e}\rrangle$ (7)
$\displaystyle=\sum_{o^{\prime},k}(\llangle
K_{e^{\prime},m_{l},o^{\prime}}|j\rangle)D_{k|m_{l}}^{\dagger}D_{k|m_{l}}(\langle
i|K_{e,m_{l},o}\rrangle)$ $\displaystyle=\sum_{o^{\prime},k}\langle
j|\Pi_{Q_{0}}K_{e^{\prime},m_{l},o^{\prime}}^{\dagger}D_{k|m_{l}}^{\dagger}D_{k|m_{l}}K_{e,m_{l},o}\Pi_{Q_{0}}|i\rangle$
$\displaystyle=\sum_{o^{\prime},k}\gamma_{k,e^{\prime},o^{\prime}}^{(m_{l})*}\gamma_{k,e,o}^{(m_{l})}\langle
j|i\rangle$
$\displaystyle=\Big{(}\sum_{k}\big{(}\sum_{o^{\prime}}\gamma_{k,e^{\prime},o^{\prime}}^{(m_{l})*}\big{)}\,\gamma_{k,e,o}^{(m_{l})}\Big{)}\delta_{j,i}$
$\displaystyle=\lambda_{e^{\prime},e,m_{l},o}\delta_{j,i}\;,$

where the second equality is obtained by
$\sum_{k}D_{k|m_{l}}^{\dagger}D_{k|m_{l}}=I_{Q_{l}^{\prime}}$ and by
$|K_{e,m_{l},o}\rrangle=\llangle C_{m_{l},o}|E_{e}\rrangle$, the third
equality by $\langle i|K_{e,m_{l},o}\rrangle=K_{e,m_{l},o}|i\rangle$, and the
fourth equality by the non-unique Kraus representation relation
$D_{k|m_{l}}K_{e,m_{l},o}\Pi_{Q_{0}}=\gamma_{k,e,o}^{(m_{l})}\Pi_{Q_{0}}$.
Thus we show the necessity of condition in Theorem 1.

Now assume that eqn. (5) holds and consider
$\lambda_{e^{\prime},e,m_{l}}=\sum_{o}\lambda_{e^{\prime},e,m_{l},o}$. Note
that $\Lambda_{m_{l}}=[\lambda_{e^{\prime},e,m_{l}}]_{e^{\prime},e}$ is a
Hermitian matrix since by eqn. (5)

$\displaystyle\lambda_{e^{\prime},e,m_{l}}^{*}=\sum_{o}\lambda_{e^{\prime},e,m_{l},o}^{*}$
(8) $\displaystyle=\sum_{o^{\prime},o}(\llangle
E_{e^{\prime}}|(|C_{m_{l},o^{\prime}}\rrangle\llangle
C_{m_{l},o}|\otimes|{i}\rangle\mkern-4.0mu\langle{i}|)|E_{e}\rrangle)^{*}$
$\displaystyle=\sum_{o^{\prime},o}\llangle E_{e}|(|C_{m_{l},o}\rrangle\llangle
C_{m_{l},o^{\prime}}|\otimes|{i}\rangle\mkern-4.0mu\langle{i}|)|E_{e^{\prime}}\rrangle$
$\displaystyle=\sum_{o^{\prime}}\lambda_{e^{\prime},e,m_{l},o^{\prime}}^{*}$
$\displaystyle=\lambda_{e,e^{\prime},m_{l}}\;.$

Since matrix $\Lambda_{m_{l}}$ is Hermitian, it can be diagonalized to a
diagonal matrix $[d_{e^{\prime},e,m_{l}}]_{e^{\prime},e}$ where
$d_{e^{\prime},e,m_{l}}=0$ if $e^{\prime}\neq e$ as

$\displaystyle
d_{e^{\prime},e,m_{l}}=\sum_{\tilde{e},\bar{e}}u_{e^{\prime},\tilde{e}}^{*}u_{\bar{e},e}\lambda_{\tilde{e},\bar{e},m_{l}}$
(9)

where $U=[u_{e^{\prime},e}]_{e^{\prime},e}$ is a unitary matrix.

Now consider $|F_{e}\rrangle=\sum_{\bar{e}}u_{\bar{e},e}|E_{\bar{e}}\rrangle$
so that

$\displaystyle\sum_{e}\langle g|F_{e}\rrangle\llangle F_{e}|g^{\prime}\rangle$
$\displaystyle=\sum_{e,\tilde{e},\bar{e}}u_{e,\tilde{e}}^{*}u_{\bar{e},e}\langle
g|E_{\bar{e}}\rrangle\llangle E_{\tilde{e}}|g^{\prime}\rangle$ (10)
$\displaystyle=\sum_{\tilde{e},\bar{e}}\delta_{\tilde{e},\bar{e}}\langle
g|E_{\bar{e}}\rrangle\llangle E_{\tilde{e}}|g^{\prime}\rangle$
$\displaystyle=\sum_{e}\langle g|E_{e}\rrangle\llangle
E_{e}|g^{\prime}\rangle$

for any
$|g\rangle,|g^{\prime}\rangle\in(\bigotimes_{r=0}^{l-1}\mathscr{S}_{Q_{r}}\otimes\mathscr{S}_{Q_{r}^{\prime}})\otimes\mathscr{S}_{Q_{l}}$.
Therefore

$\displaystyle\mathbf{E}\ast\mathbf{I}_{m_{l}}\ast|i\rangle\langle j|$
$\displaystyle=\sum_{e}|E_{e}\rrangle\llangle
E_{e}|\ast\mathbf{I}_{m_{l}}\ast|i\rangle\langle j|$ (11)
$\displaystyle=\sum_{e}|F_{e}\rrangle\llangle
F_{e}|\ast\mathbf{I}_{m_{l}}\ast|i\rangle\langle j|\;,$

and also

$\displaystyle\llangle F_{e^{\prime}}|\Big{(}|C_{m_{l}}\rrangle\llangle
C_{m_{l},o}|\otimes|j\rangle\langle i|\Big{)}|F_{e}\rrangle$ (12)
$\displaystyle=\sum_{\tilde{e},\bar{e}}u_{e^{\prime},\tilde{e}}^{*}u_{\bar{e},e}\llangle
E_{\tilde{e}}|\Big{(}|C_{m_{l}}\rrangle\llangle
C_{m_{l},o}|\otimes|j\rangle\langle i|\Big{)}|E_{\bar{e}}\rrangle$
$\displaystyle=\sum_{\tilde{e},\bar{e}}u_{e^{\prime},\tilde{e}}^{*}u_{\bar{e},e}\lambda_{\tilde{e},\bar{e},m_{l},o}\delta_{j,i}=:\tilde{\lambda}_{e^{\prime},e,m_{l},o}\delta_{j,i}\;,$

for some constant $\tilde{\lambda}_{e^{\prime},e,m_{l},o}\in{\mathbb{C}}$.

For each error sequence $e^{\prime}$, consider an operator defined by
$D_{e^{\prime}|m_{l}}=\frac{1}{\sqrt{d_{e^{\prime},e^{\prime}}}}\llangle
F_{e^{\prime}}|(|C_{m_{l}}\rrangle|\Pi_{Q_{0}}\rrangle)$. Thus by using eqn.
(5) and eqn. (12) the action of $D_{e^{\prime}|m_{l}}$ on the codestate at the
start of the decoding round is

$\displaystyle D_{e^{\prime}|m_{l}}(\llangle
C_{m_{l},o}|\langle\psi|)|F_{e}\rrangle$ (13)
$\displaystyle=\sum_{i,j}|j\rangle\,\psi_{i}\llangle
F_{e^{\prime}}|(|C_{m_{l}}\rrangle\llangle C_{m_{l},o}|\otimes|j\rangle\langle
i|)|F_{e}\rrangle$
$\displaystyle=\sum_{i,j,}|j\rangle\,\psi_{i}\tilde{\lambda}_{e^{\prime},e,m_{l},o}\delta_{j,i}=\tilde{\lambda}_{e^{\prime},e,m_{l},o}|\psi\rangle\;.$

Therefore the overall action of a linear map
$\mathcal{D}_{m_{l}}(\rho)=\sum_{e}D_{e|m_{l}}\rho D_{e|m_{l}}^{\dagger}$ on
the density operator of the code at the start of the decoding round is

$\displaystyle\sum_{e}\mathcal{D}_{m_{l}}(|F_{e}\rrangle\llangle
F_{e}|\ast\mathbf{I}_{m_{l}}\ast|{\psi}\rangle\mkern-4.0mu\langle{\psi}|)$
(14) $\displaystyle=\sum_{e,e^{\prime},o}D_{e^{\prime}|m_{l}}(\llangle
C_{m_{l},o}|\langle\psi|)|F_{e}\rrangle\llangle
F_{e}|(|C_{m_{l},o}\rrangle|\psi\rangle)D_{e^{\prime}|m_{l}}^{\dagger}$
$\displaystyle=\sum_{e,e^{\prime},o}\tilde{\lambda}_{e^{\prime},e,m_{l},o}\tilde{\lambda}_{e^{\prime},e,m_{l},o}^{*}|{\psi}\rangle\mkern-4.0mu\langle{\psi}|=\lambda_{m_{l}}|{\psi}\rangle\mkern-4.0mu\langle{\psi}|$

which recovers the initial state $|\psi\rangle$ as in (4).

Since $\mathcal{D}_{m_{l}}$ is a completely positive map, we now show that we
can add another operator to make it trace-preserving. Consider polar
decomposition

$\displaystyle(\llangle C_{m_{l}}|\llangle\Pi_{Q_{0}}|)|F_{e}\rrangle$ (15)
$\displaystyle=U_{e,m_{l}}\sqrt{\llangle
F_{e}|\big{(}|C_{m_{l}}\rrangle\llangle
C_{m_{l}}|\otimes|\Pi_{Q_{0}}\rrangle\llangle\Pi_{Q_{0}}|\big{)}|F_{e}\rrangle}$
$\displaystyle=U_{e,m_{l}}\Pi_{Q_{0}}\sqrt{d_{e,e,m_{l}}}$

where the last equality is due to eqn. (9). Then can define projector
$\Pi_{e,m_{l}}=U_{e,{m_{l}}}\Pi_{Q_{0}}U_{e,m_{l}}^{\dagger}=\frac{1}{\sqrt{d_{e,e,m_{l}}}}(\llangle
C_{m_{l}}|\llangle\Pi_{Q_{0}}|)|F_{e}\rrangle U_{e,m_{l}}^{\dagger}$,
satisfying orthogonality

$\displaystyle\Pi_{e^{\prime},m_{l}}^{\dagger}\Pi_{e,m_{l}}$ (16)
$\displaystyle=\frac{U_{e^{\prime},m_{l}}\llangle
F_{e^{\prime}}|(|C_{m_{l}}\rrangle\llangle
C_{m_{l}}|\otimes|\Pi_{Q_{0}}\rrangle\llangle\Pi_{Q_{0}}|)|F_{e}\rrangle
U_{e,m_{l}}^{\dagger}}{\sqrt{d_{e^{\prime},e^{\prime},m_{l}}d_{e,e,m_{l}}}}$
$\displaystyle=\frac{d_{e^{\prime},e,m_{l}}U_{e^{\prime},m_{l}}\Pi_{Q_{0}}U_{e,m_{l}}^{\dagger}}{\sqrt{d_{e^{\prime},e^{\prime},m_{l}}d_{e,e,m_{l}}}}\;,$

since $d_{e^{\prime},e,m_{l}}=0$ for all $e\neq e^{\prime}$. Therefore for
each $e$ we have

$\displaystyle D_{e|m_{l}}^{\dagger}D_{e|m_{l}}=\frac{(\llangle
C_{m_{l}}|\llangle\Pi_{Q_{0}}|)|F_{e}\rrangle\llangle
F_{e}|(|C_{m_{l}}\rrangle|\Pi_{Q_{0}}\rrangle)}{d_{e,e,m_{l}}}$ (17)
$\displaystyle=U_{e,m_{l}}\Pi_{Q_{0}}U_{e,m_{l}}^{\dagger}=\Pi_{e,m_{l}}\;.$

Then by adding projector $\Pi^{\perp}$ onto a space orthogonal to
$\\{\Pi_{e,m_{l}}\\}_{e}$ to the set of operators $\\{D_{e|m_{l}}\\}_{e}$
defining $\mathcal{D}_{m_{l}}$ we have
$\Pi^{\perp}+\sum_{e}D_{e|m_{l}}^{\dagger}D_{e|m_{l}}=I$, hence
$\mathcal{D}_{m_{l}}$ is trace-preserving. ∎

As noted in the proof and by using the Kraus operators in eqn. (3), we can
equivalently express eqn. (5) as

$\displaystyle\llangle E_{e^{\prime}}|\Big{(}|C_{m_{l}}\rrangle\llangle
C_{m_{l},o}|\otimes|j\rangle\langle i|\big{)}|E_{e}\rrangle$ (18)
$\displaystyle=\textup{Tr}(|K_{e^{\prime},m_{l}}\rrangle\llangle
K_{e,m_{l},o}|\ast|j\rangle\langle i|)$ $\displaystyle=\langle
j|K_{e^{\prime},m_{l}}^{\dagger}K_{e,m_{l},o}|i\rangle=\delta_{j,i}\lambda_{e^{\prime},e,m_{l},o}\;,$

where $K_{e^{\prime},m_{l}}=\sum_{o}K_{e^{\prime},m_{l},o}$. This expression
tells us for a final memory state $m_{l}$ of a strategic code correcting
$\mathfrak{E}$, the sequence of check measurement outcomes in $O_{m_{l}}$
forms orthogonal an subspace $\mathscr{V}_{i,m_{l}}$ for each eigenbasis
$\\{|i\rangle_{Q_{0}}\\}_{i}$ spanning initial codestate
$\mathscr{S}_{Q_{0}}$, regardless of sequence of error. Namely subspace
$\mathscr{V}_{i,m_{l}}$ is spanned by $\\{\llangle C_{m_{l},o}|\langle
i|E_{e}\rrangle\\}_{e,o}$. Moreover, the independence of constant
$\lambda_{e^{\prime},e,m_{l},o}$ from the initial codestate also indicates
that the code state at the start of the decoding round is uncorrelated with
the noise environment, although it generally depends on the final memory state
$m_{l}$. Due to this independence between the noise environment and the code
state, it is sufficient for the decoder to have the information about $m_{l}$
to recover the initial state, i.e. to construct a projective measurement
$\\{\Pi_{e,m_{l}}\\}_{e}$ used in the proof to project the noisy codestate
onto subspace $\mathscr{V}_{i,m_{l}}$ and perform recovery unitary operator
$U_{e,m_{l}}$ according to outcome $e$ to obtain the initial codestate.

For the special case when all check measurement outcomes are stored in the
classical memory, i.e. there is a bijection between each memory state $m_{r}$
and sequence of check measurement outcomes $o_{1},\dots,o_{r}$ for all $r$,
the condition in Theorem 1 can be stated in a more symmetric manner as
$\mathbf{I}_{m_{l}}=|C_{m_{l},o}\rrangle\llangle C_{m_{l},o}|$. Since each
final memory state $m_{l}$ and each sequence of check measurement outcomes
$o=o_{1},\dots,o_{l}$ have a one-to-one correspondence, we can simply write
$|C_{m_{l}}\rrangle:=|C_{m_{l},o}\rrangle$.

######  Corollary 1.

A strategic code $(\mathscr{S}_{Q_{0}},\mathbf{I})$ storing all check
measurement outcomes in its memory corrects error $\mathfrak{E}$ if and only
if

$\begin{gathered}\llangle E_{e^{\prime}}|\big{(}|C_{m_{l}}\rrangle\llangle
C_{m_{l}}|\otimes|j\rangle\langle
i|\big{)}|E_{e}\rrangle=\lambda_{e^{\prime},e,m_{l}}\delta_{j,i}\end{gathered}$
(19)

where $\lambda_{e^{\prime},e,m_{l}}\in{\mathbb{C}}$ is some constant for all
final memory state $m_{l}$ and all pairs of error sequences $e,e^{\prime}$.

###  II.2 Static quantum error-correction condition as a special case

From Theorem 1, we can recover the Knill-Laflamme necessary and sufficient
error-correction condition for static QECC [23] (see also Appendix A), which
is

$\langle
j|E_{e^{\prime}}^{\dagger}E_{e}|i\rangle=\lambda_{e^{\prime},e}\delta_{j,i}$
(20)

where $|i\rangle,|j\rangle$ is an arbitrary pair of orthonormal vectors
spanning codespace $\mathscr{S}_{Q}$ and $E_{e},E_{e^{\prime}}$ are a pair of
Kraus operators of error map
$\mathcal{E}(\rho_{Q})=\sum_{e}E_{e}\rho_{Q}E_{e}^{\dagger}$. The static QECC
scenario is obtained by setting the number of rounds to $l=0$ in a general
QECC scenario, i.e. there is no sequence check instruments. The operator
$|C_{m_{l}}\rrangle\llangle C_{m_{l},o}|$ in eqn. (5)simply becomes identity
and vectorized error operators are of the form
$|E_{e}\rrangle=\sum_{j}E_{e}|j\rangle|j\rangle$ and constant is simply
$\lambda_{e^{\prime},e}$ as there is no dependence on the check measurement
outcomes. Thus eqn. (5) becomes

$\displaystyle\lambda_{e^{\prime},e}\delta_{j,i}$ $\displaystyle=\llangle
E_{e^{\prime}}|j\rrangle\llangle i|E_{e}\rrangle=\langle
j|E_{e^{\prime}}^{\dagger}E_{e}|i\rangle$ (21)

giving us the Knill-Laflamme static QECC condition.

Lastly we note that without changing the strategic code framework, how
strategic code error-correction is defined in Definition 2 can be generalized
as follows. Instead of requiring the decoder output to be a state proportional
to the initial codestate, we can instead introduce additional redundancy by
encoding logical information in a subsystem of $\mathscr{S}_{Q_{0}}$ and
requiring the decoder only to recover logical information stored in that
subsystem. Namely, given initial codestate $\rho\otimes\sigma$ we want to
recover $\rho\otimes\sigma_{m_{l}}$ given final memory state $m_{l}$. This is
the generalization of the subsystem code [29, 59, 60, 27] to the strategic
code framework. Corresponding to this definition, however, one needs a
different necessary and sufficient condition than Theorem 1 and Theorem 2,
which is left for future work. For more details on the subsystem code
generalization to strategic code see Appendix B.2.

###  II.3 Information-theoretic error-correction condition

For a static QECC (special case of a strategic code with $l=0$), it was shown
in [25] that a necessary and sufficient condition for a completely-positive,
trace non-decreasing error map
$\mathcal{E}:\mathscr{H}_{Q}\rightarrow\mathscr{H}_{Q^{\prime}}$ to be
correctable by QECC with codespace $\mathscr{S}_{Q}$ is

$\displaystyle
S(\rho^{Q})=S(\rho^{Q^{\prime}})-S(\rho^{E^{\prime}})=S(\rho^{Q^{\prime}})-S(\rho^{R^{\prime}Q^{\prime}})\;.$
(22)

Here a reference system $R$ is introduced, and
$\rho^{Q}=\textup{Tr}_{R}(|{\phi}\rangle\mkern-4.0mu\langle{\phi}|^{RQ})$
where $|{\phi}\rangle\mkern-4.0mu\langle{\phi}|^{RQ}$ is the maximally
entangled state between initial system $Q$ and reference system $R$. So, we
have the density operators after the error
$\rho^{Q^{\prime}}=\mathcal{E}(\rho^{Q})/\textup{Tr}(\mathcal{E}(\rho^{Q}))$
and
$\rho^{R^{\prime}Q^{\prime}}=\mathcal{I}_{R}\otimes\mathcal{E}(|{\phi}\rangle\mkern-4.0mu\langle{\phi}|^{RQ})$
where $\rho^{E^{\prime}}$ the marginal state of the noise environment of
$\mathcal{E}$ when expressed as

$\mathcal{E}(\cdot)=\textup{Tr}_{E^{\prime}}\Big{(}(I_{Q^{\prime}}\otimes\Pi)V\cdot
V^{\dagger}(I_{Q^{\prime}}\otimes\Pi)\Big{)}$ (23)

for some isometry
$V:\mathscr{S}_{Q}\rightarrow\mathscr{S}_{Q^{\prime}}\otimes\mathscr{S}_{E^{\prime}}$
and orthogonal projector $\Pi\in\mathscr{H}_{E^{\prime}}$. Generalization of
information-theoretic condition (22) to subsystem codes is shown in [27]. The
term $S(\rho^{Q^{\prime}})-S(\rho^{R^{\prime}Q^{\prime}})$ is the so-called
“coherent information”, which quantifies the amount of information about
$\rho^{Q}$ contained in $\rho^{Q^{\prime}}$ [24, 25, 27].

In a general QECC scenario, we instead have a sequence of completely positive
map $\mathcal{E}^{(0)},\dots,\mathcal{E}^{(l)}$. In what follows, we omit
normalization for the states and density operators for notational simplicity.
Now consider the density operator in
$\mathscr{H}_{R_{l}^{\prime}}\otimes\mathscr{H}_{Q_{l}^{\prime}}\otimes\mathscr{H}_{M_{l}}\otimes\mathscr{H}_{E_{l}}$
with one-half of a maximally entangled state
$\sum_{i}|i\rangle_{R_{0}}|i\rangle_{Q_{0}}$ as an input initial state in
$\mathscr{S}_{Q_{0}}$ and given final memory state $m_{l}$

$\displaystyle\rho_{m_{l},e,e^{\prime},o,o^{\prime}}^{R_{l}^{\prime}Q_{l}^{\prime}M_{l}E_{l}}$
$\displaystyle=\sum_{i,j}|i\rangle\langle
j|_{R_{0}}\otimes\big{(}K_{e,m_{l},o}|i\rangle\langle
j|_{Q_{0}}K_{e^{\prime},m_{l},o^{\prime}}^{\dagger}\big{)}\otimes|o\rangle\langle
o^{\prime}|_{M_{l}}\otimes|e\rangle\langle e^{\prime}|_{E_{l}}$ (24)

where $o,o^{\prime}\in O_{m_{l}}$ is a pair of sequences of check measurement
outcomes resulting in final memory state $m_{l}$ and $K_{e,m_{l},o}$ is an
operator defined by $|K_{e,m_{l},o}\rrangle=\llangle
C_{m_{l},o}|E_{e}\rrangle$ (see eqn. (3). This scenario is illustrated in Fig.
3.

Figure 3: QECC scenario where the initial code state is one-half of maximally
entangled state $|\phi\rangle=\sum_{i}|i\rangle_{R_{0}}|i\rangle_{Q_{0}}$
between a reference $R_{0}$ system and the initial code space $Q_{0}$. After
$l$ rounds of errors and check measurements ending in final memory state
$m_{l}$, we obtain the global density oeprator
$\rho_{m_{l}}^{R_{l}^{\prime}Q_{l}^{\prime}M_{l}E_{l}}$ of the reference
system, code system, check measurement outcome sequence, and noise
environment.

Now consider density operator

$\displaystyle\rho_{m_{l}}^{R_{l}^{\prime}Q_{l}^{\prime}M_{l}E_{l}}$
$\displaystyle:=\sum_{e,e^{\prime},o,o^{\prime}}\rho_{m_{l},e,e^{\prime},o,o^{\prime}}^{R_{l}^{\prime}Q_{l}^{\prime}M_{l}E_{l}}\;.$
(25)

We also define the marginal density operators as
$\rho_{m_{l}}^{R_{l}^{\prime}}:=\textup{Tr}_{Q_{l}^{\prime}M_{l}E_{l}}(\rho_{m_{l}}^{R_{l}^{\prime}Q_{l}^{\prime}M_{l}E_{l}})$
and
$\rho_{m_{l}}^{M_{l}E_{l}}:=\textup{Tr}_{R_{l}^{\prime}Q_{l}^{\prime}}(\rho_{m_{l}}^{R_{l}^{\prime}Q_{l}^{\prime}M_{l}E_{l}})$.
We also denote the density operator over all possible final memory state
$m_{l}$ as

$\displaystyle\rho^{R_{l}^{\prime}Q_{l}^{\prime}M_{l}E_{l}}$
$\displaystyle=\sum_{m_{l}}P_{M_{l}}(m_{l})\tilde{\rho}_{m_{l}}^{R_{l}^{\prime}Q_{l}^{\prime}M_{l}E_{l}}$
(26)

for
$P_{M_{l}}(m_{l})=\textup{Tr}(\rho_{m_{l}}^{R_{l}^{\prime}Q_{l}^{\prime}M_{l}E_{l}})$
and density operator
$\tilde{\rho}_{m_{l}}^{R_{l}^{\prime}Q_{l}^{\prime}M_{l}E_{l}}=\rho_{m_{l}}^{R_{l}^{\prime}Q_{l}^{\prime}M_{l}E_{l}}/P_{M_{l}}(m_{l})$.
Here, $P_{M_{l}}(m_{l})$ can be interpreted as the probability of the final
memory state being $m_{l}$. Hence
$\tilde{\rho}_{m_{l}}^{R_{l}^{\prime}Q_{l}^{\prime}M_{l}E_{l}}$ is the density
operator at the start of the decoding round, given that the memory storing
information about the check measurement outcomes is $m_{l}$.

Now we show a necessary and sufficient information-theoretic conditions for
strategic code to correct error $\mathfrak{E}=\\{|E_{e}\rrangle\llangle
E_{e}|\\}_{e}$.

######  Theorem 2.

The following are equivalent:

  1. 1.

A strategic code $(\mathscr{S}_{Q_{0}},\mathbf{I})$ corrects error
$\mathfrak{E}$.

  2. 2.

$S(\rho_{m_{l}}^{R_{l}^{\prime}M_{l}E_{l}})=S(\rho_{m_{l}}^{R_{l}^{\prime}})+S(\rho_{m_{l}}^{M_{l}E_{l}})$
for all final memory state $m_{l}$ such that $P_{M_{l}}(m_{l})>0$.

  3. 3.

$I_{\rho_{m_{l}}^{R_{l}^{\prime}M_{l}E_{l}}}(R_{l}^{\prime}:M_{l}E_{l})=0$ for
all final memory state $m_{l}$ such that $P_{M_{l}}(m_{l})>0$.

###### Proof.

First we use Theorem 1 to show that eqn. (5) implies
$S(\rho_{m_{l}}^{R_{l}^{\prime}M_{l}E_{l}})=S(\rho_{m_{l}}^{R_{l}^{\prime}})+S(\rho_{m_{l}}^{M_{l}E_{l}})$.
The merginal density operator in
$\mathscr{H}_{R_{l}^{\prime}}\otimes\mathscr{H}_{M_{l}}\otimes\mathscr{H}_{E_{l}}$
can be expressed as

$\displaystyle\rho_{m_{l}}^{R_{l}^{\prime}M_{l}E_{l}}:=\sum_{e,e^{\prime},o,o^{\prime}}\textup{Tr}_{Q_{l}^{\prime}}\big{(}\rho_{m_{l},e,e^{\prime},o,o^{\prime}}^{R_{l}^{\prime}Q_{l}^{\prime}M_{l}E_{l}}\big{)}$
(27) $\displaystyle=\sum_{e,e^{\prime},o,o^{\prime},i,j}|i\rangle\langle
j|_{R_{l}^{\prime}}\langle
j|K_{e^{\prime},m_{l},o^{\prime}}^{\dagger}K_{e,m_{l},o}|i\rangle$
$\displaystyle\quad\otimes|o\rangle\langle
o^{\prime}|_{M_{l}}\otimes|e\rangle\langle e^{\prime}|_{E_{l}}\;.$

Now consider a unitary $[u_{\bar{e},e}]_{\bar{e},e}$ as defined in the
sufficiency of eqn. (5) which performs the transformation
$|F_{e}\rrangle=\sum_{\bar{e}}u_{\bar{e},e}|E_{\bar{e}}\rrangle$. Applying
this to eqn. (27) transforms the Kraus operator $K_{e,m_{l},o}\mapsto
F_{e,m_{l},o}$ and the noise environment basis
$|e\rangle\mapsto|v_{e}^{(m_{l})}\rangle=\sum_{\bar{e}}u_{\bar{e},e}|\bar{e}\rangle$.
Also consider the decoding channel $\mathcal{D}_{m_{l}}$ with Kraus operators
$\\{D_{e|m_{l}}\\}_{e}$ constructed in proof of the sufficiency of eqn. (5) to
correct $\mathfrak{E}$. As $\sum_{e}D_{e|m_{l}}^{\dagger}D_{e|m_{l}}=I$, we
obtain

$\displaystyle\rho_{m_{l}}^{R_{l}^{\prime}M_{l}E_{l}}$ (28)
$\displaystyle=\sum_{e,e^{\prime},o,o^{\prime},i,j,\tilde{e}}|i\rangle\langle
j|_{R_{l}^{\prime}}\langle
j|F_{e^{\prime},m_{l},o^{\prime}}^{\dagger}D_{\tilde{e}|m_{l}}^{\dagger}D_{\tilde{e}|m_{l}}F_{e,m_{l},o}|i\rangle$
$\displaystyle\quad\otimes|o\rangle\langle
o^{\prime}|_{M_{l}}\otimes|v_{e}^{(m_{l})}\rangle\langle
v_{e^{\prime}}^{(m_{l})}|_{E_{l}}$
$\displaystyle=\Pi_{Q_{0}}\otimes\Big{(}\sum_{e,e^{\prime},o,o^{\prime},\tilde{e}}\tilde{\lambda}_{\tilde{e},e^{\prime},m_{l},o^{\prime}}^{*}\tilde{\lambda}_{\tilde{e},e,m_{l},o}|o\rangle\langle
o^{\prime}|_{M_{l}}$ $\displaystyle\quad\otimes|v_{e}^{(m_{l})}\rangle\langle
v_{e^{\prime}}^{(m_{l})}|_{E_{l}}\Big{)}$

since
$D_{\tilde{e}|m_{l}}F_{e,m_{l},o}|i\rangle=\tilde{\lambda}_{\tilde{e},e,m_{l},o}|i\rangle$
for some constant $\tilde{\lambda}_{\tilde{e},e,m_{l},o}\in{\mathbb{C}}$. Thus
$\rho_{m_{l}}^{R_{l}^{\prime}M_{l}E_{l}}=\rho_{m_{l}}^{R_{l}^{\prime}}\otimes\rho_{m_{l}}^{M_{l}E_{l}}$,
which is equivalent to
$S(\rho_{m_{l}}^{R_{l}^{\prime}M_{l}E_{l}})=S(\rho_{m_{l}}^{R_{l}^{\prime}})+S(\rho_{m_{l}}^{M_{l}E_{l}})$.

Now we show that
$S(\rho_{m_{l}}^{R_{l}^{\prime}M_{l}E_{l}})=S(\rho_{m_{l}}^{R_{l}^{\prime}})+S(\rho_{m_{l}}^{M_{l}E_{l}})$
implies eqn. (4) by constructing a decoding channel recovering the initial
code state. Now we consider a Schmidt decomposition on bipartition between
codespace $Q_{l}^{\prime}$ and joint system $R_{l}^{\prime}M_{l}E_{l}$ of
$|\varphi_{m_{l}}\rangle=\sum_{i,e,o}|i\rangle_{R_{0}}(K_{m_{l},o,e}|i\rangle_{Q_{0}})|o\rangle_{M_{l}}|e\rangle_{E_{l}}$
for each $o$, which gives

$\displaystyle|\varphi_{m_{l}}\rangle=\sum_{i,\alpha}\sqrt{q_{\alpha}^{(m_{l})}}|i\rangle_{R_{l}^{\prime}}|u_{\alpha}^{(m_{l})}\rangle_{M_{l}E_{l}}|v_{i,\alpha}^{(m_{l})}\rangle_{Q_{l}^{\prime}}$
(29)

where $\\{|u_{\alpha}^{(m_{l})}\rangle_{M_{l}E_{l}}\\}_{\alpha}$ is an
eigenvector of $\rho_{m_{l}}^{M_{l}E_{l}}$ with corresponding eigenvalue
$q_{\alpha}^{(m_{l})}$ and $\\{|v_{i,\alpha}^{(m_{l})}\rangle\\}_{i,\alpha}$
is a set of orthonormal vectors in code space $\mathscr{S}_{Q_{l}^{\prime}}$.

Now consider decoding channel $\mathcal{D}_{m_{l}}$ with Kraus operators
$\\{D_{\alpha|m_{l}}\\}_{\alpha}\cup\\{\Pi^{\perp}\\}$ defined by

$D_{\alpha|m_{l}}=V_{m_{l},\alpha}\sum_{i}|{v_{i,\alpha}^{(m_{l})}}\rangle\mkern-4.0mu\langle{v_{i,\alpha}^{(m_{l})}}|_{Q_{l}^{\prime}}\;,$
(30)

for unitary
$V_{m_{l},\alpha}:\mathscr{S}_{Q_{l}^{\prime}}\rightarrow\mathscr{S}_{Q_{0}}$
such that
$V_{m_{l},\alpha}|v_{i,\alpha}^{(m_{l})}\rangle_{Q_{l}^{\prime}}=|i\rangle_{Q_{0}}$
for all $i$. Operator $\Pi^{\perp}$ is a projector onto subspace
$\mathscr{V}^{\perp}$ orthogonal to
$\textrm{Span}\\{|v_{i,\alpha}^{(m_{l})}\rangle\\}_{\alpha}$ to obtain
normalization
$\Pi^{\perp}+\sum_{\alpha}D_{\alpha|m_{l}}^{\dagger}D_{\alpha|m_{l}}=I$. Hence

$\displaystyle D_{\alpha|m_{l}}|\varphi_{m_{l}}\rangle$
$\displaystyle=\sum_{i}\sqrt{q_{\alpha}^{(m_{l})}}|i\rangle_{R_{l}^{\prime}}|u_{\alpha}^{(m_{l})}\rangle_{M_{l}E_{l}}|i\rangle_{Q_{0}}$
(31)
$\displaystyle=|\phi\rangle_{R_{l}^{\prime}Q_{l}^{\prime}}\sqrt{q_{\alpha}^{(m_{l})}}|u_{\alpha}^{(m_{l})}\rangle_{M_{l}E_{l}}$

showing that the initial maximally entangled state is recovered. Thus the
overall action of decoding channel $\mathcal{D}_{m_{l}}$ to the density
operator $|E_{e}\rrangle\llangle
E_{e}|\ast\mathbf{I}_{m_{l}}\ast|{\psi}\rangle\mkern-4.0mu\langle{\psi}|_{Q_{0}}$
of system $Q_{l}^{\prime}$ at the start of the decoding round is

$\displaystyle\mathcal{D}_{m_{l}}(\mathbf{E}\ast\mathbf{I}_{m_{l}}\ast|{\psi}\rangle\mkern-4.0mu\langle{\psi}|_{Q_{0}})$
(32)
$\displaystyle=\sum_{i,j,e}\psi_{i}\psi_{j}^{*}\mathcal{D}_{m_{l}}(|E_{e}\rrangle\llangle
E_{e}|\ast\mathbf{I}_{m_{l}}\ast|i\rangle\langle j|_{Q_{0}})$
$\displaystyle=\sum_{i,j,e^{\prime},e,o^{\prime},o}\psi_{i}\psi_{j}^{*}\mathcal{D}_{m_{l}}(K_{e,m_{l},o}|i\rangle\langle
j|K_{e^{\prime},m_{l},o^{\prime}}^{\dagger})\langle e^{\prime}|e\rangle\langle
o^{\prime}|o\rangle$
$\displaystyle=\sum_{i,j,\alpha^{\prime},\alpha}\psi_{i}\psi_{j}^{*}\sqrt{q_{\alpha}^{(m_{l})}q_{\alpha^{\prime}}^{(m_{l})}}\mathcal{D}_{m_{l}}(|v_{i,\alpha}^{(m_{l})}\rangle\langle
v_{j,\alpha^{\prime}}^{(m_{l})}|)$ $\displaystyle\quad\times\langle
u_{\alpha^{\prime}}^{(m_{l})}|u_{\alpha}^{(m_{l})}\rangle$
$\displaystyle=\sum_{i,j,\alpha}\psi_{i}\psi_{j}^{*}q_{\alpha}^{(m_{l})}\mathcal{D}_{m_{l}}(|v_{i,\alpha}^{(m_{l})}\rangle\langle
v_{j,\alpha}^{(m_{l})}|)$
$\displaystyle=\sum_{i,j,\alpha}\psi_{i}\psi_{j}^{*}q_{\alpha}^{(m_{l})}|i\rangle\langle
j|_{Q_{0}}$
$\displaystyle=\lambda_{m_{l}}|{\psi}\rangle\mkern-4.0mu\langle{\psi}|_{Q_{0}}$

where $\lambda_{m_{l}}=\sum_{\alpha}q_{\alpha}^{(m_{l})}$. To obtain the third
equality, we use the change of basis on the joint memory - noise environment
system $M_{l}E_{l}$ to
$|u_{\alpha}^{(m_{l})}\rangle_{M_{l}E_{l}}=\sum_{o,e}\eta_{(o,e),\alpha}^{(m_{l})}|o\rangle_{M_{l}}|e\rangle_{E_{l}}$
for some complex numbers $\\{\eta_{(o,e),\alpha}^{(m_{l})}\\}_{o,e,\alpha}$
which also gives
$K_{e,m_{l},o}|i\rangle\mapsto\sqrt{q_{\alpha}^{(m_{l})}}|u_{\alpha,i}^{(m_{l})}\rangle=\sum_{o,e}\eta_{(o,e),\alpha}^{(m_{l})}K_{e,m_{l},o}|i\rangle$.
Whereas the fourth equality is obtained by using eqn. (31). Thus decoding
channel $\mathcal{D}_{m_{l}}$ recovers all initial codestate
$|\psi\rangle_{Q_{0}}$ for any error sequence $e$.

Lastly, we show that
$I_{\rho_{m_{l}}^{R_{l}^{\prime}M_{l}E_{l}}}(R_{l}^{\prime}:M_{l}E_{l})=0$ if
and only if
$S(\rho_{m_{l}}^{R_{l}^{\prime}M_{l}E_{l}})=S(\rho_{m_{l}}^{R_{l}^{\prime}})+S(\rho_{m_{l}}^{M_{l}E_{l}})$.
This simply follows from the definition of von Neumann mutual information

$\displaystyle
I_{\rho_{m_{l}}^{R_{l}^{\prime}M_{l}E_{l}}}(R_{l}^{\prime}:M_{l}E_{l})=S(\rho_{m_{l}}^{R_{l}^{\prime}})+S(\rho_{m_{l}}^{M_{l}E_{l}})-S(\rho_{m_{l}}^{R_{l}^{\prime}M_{l}E_{l}})\;,$
(33)

which is equal to $0$ if and only if
$S(\rho_{m_{l}}^{R_{l}^{\prime}M_{l}E_{l}})=S(\rho_{m_{l}}^{R_{l}^{\prime}})+S(\rho_{m_{l}}^{M_{l}E_{l}})$.
∎

Statement 2 of Theorem 2 reduces to the information-theoretic necessary and
sufficient condition for static QECC in [24, 25] stating that the reduced
density operator of the reference system and the environment after the error
operation $\rho^{R^{\prime}E^{\prime}}$ is separable. Stated equivalently in
terms of the von Neumann entropy,
$S(\rho^{R^{\prime}E^{\prime}})=S(\rho^{R^{\prime}})+S(\rho^{E^{\prime}})$. On
the other hand, statement 3 of Theorem 2 reduces to the necessary and
sufficient condition in [26] for static error correction, stating that it must
hold that the mutual information between the noise environment $E^{\prime}$
and the reference system $R^{\prime}$ after error operation is
$I_{\rho^{R^{\prime}E^{\prime}}}(E^{\prime}:R^{\prime})=0$. Namely, there is
no correlation between $E^{\prime}$ and $R^{\prime}$. In the general QECC
case, the condition
$S(\rho_{m_{l}}^{R_{l}^{\prime}M_{l}E_{l}})=S(\rho_{m_{l}}^{R_{l}^{\prime}})+S(\rho_{m_{l}}^{M_{l}E_{l}})$
and $I_{\rho_{m_{l}}^{R_{l}^{\prime}M_{l}E_{l}}}(R_{l}^{\prime}:M_{l}E_{l})=0$
indicates that the reference system $R_{l}^{\prime}$ and the joint check
measurement outcome - noise environment system $M_{l}E_{l}$ at the start of
the decoding round are uncorrelated for each final memory state $m_{l}$.
However in general, the check measurement outcome system $M_{l}$ and the noise
environment $E_{l}$ exhibit some correlation.

##  III Error-adapted Approximate Strategic Code

So far we have been focusing on strategic codes which recovers logical
information exactly by showing necessary and sufficient conditions of how to
achieve this (Theorem 1 and Theorem 2). However in practice, resource
limitations and some knowledge about characteristic of the relevant noise
often allow us to relax the requirements on how well logical information
should be recovered in exchange for a less resource-intensive code. These
practical considerations gives rise to approximate (static) QECCs, which have
been known to achieve a performance comparable to generic exact QECC in
dealing with a particular error model in a more resource-efficient manner (see
e.g. [61, 62, 63, 64, 65, 66]).

To address this practical considerations we turn to approximate strategic
code, namely one where we demand that logical information is recovered only up
to a certain fidelity by a decoding channel after the $l$ rounds of operation
by the interrogator. To obtain this approximate code, we propose an
optimization problem that given an ensemble of $d^{\prime}$-dimensional
quantum states, an $l$-rounds of error $\mathbf{E}$, and positive integer
$d>d^{\prime}$ and returns: (1) an encoding channel $\mathcal{C}^{(0)}$
mapping bounded linear operators on ${\mathbb{C}}^{d^{\prime}}$ to bounded
linear operators on subspace $\mathscr{S}_{Q_{0}}$ of ${\mathbb{C}}^{d}$, (2)
an $l$-round interrogator $\mathbf{I}$, and (3) set of decoders $\mathbf{D}$
corresponding to each final memory state of interrogator $\mathbf{I}$. Note
that as opposed to the previously considered QECC scenario where we start with
the codespace $\mathscr{S}_{Q_{0}}$, here we start with a channel
$\mathcal{C}^{(0)}$ that maps $d^{\prime}$-dimensional density operators on
${\mathbb{C}}^{d^{\prime}}$ to density operators with support on
$\mathscr{S}_{Q_{0}}\subseteq{\mathbb{C}}^{d}$. Also, the decoding channel
$\mathcal{D}_{m_{l}}$ for final memory state $m_{l}$ maps density operators
with support on $\mathscr{S}_{Q_{l}^{\prime}}\subseteq{\mathbb{C}}^{d}$ (the
codespace after the final error map) to density operators on
${\mathbb{C}}^{d^{\prime}}$. Let us denote the space of operators on
${\mathbb{C}}^{d^{\prime}}$ at the input of the encoding channel by
$\mathscr{H}_{L}$ and those at the output of the decoding channel by
$\mathscr{H}_{L^{\prime}}$.

We can describe the encoding, interrogator, and decoding as one single quantum
comb

$\displaystyle\mathbf{Q}=\sum_{m_{0:l}}\mathbf{D}_{m_{l}}\otimes\mathbf{C}_{m_{l}|m_{l-1}}^{(l)}\otimes\dots\otimes\mathbf{C}_{m_{1}}^{(1)}\otimes\mathbf{C}^{(0)}\;.$
(34)

Operator $\mathbf{Q}$ is positive semidefinite as a consequence of each
$\mathbf{D}_{m_{l}},\mathbf{C}_{m_{l}|m_{l-1}}^{(l)},\dots,\mathbf{C}_{m_{1}}^{(1)},\mathbf{C}^{(0)}$
(Choi operators of CP maps
$\mathcal{D}_{m_{l}},\mathcal{C}_{m_{l}|m_{l-1}}^{(l)},\dots,\mathcal{C}_{m_{1}}^{(1)},\mathcal{C}^{(0)}$)
being positive semidefinite operator in
$\mathscr{H}_{L^{\prime}}\otimes\mathscr{H}_{Q_{l}^{\prime}}\,,\,\mathscr{H}_{Q_{l}}\otimes\mathscr{H}_{Q_{l-1}^{\prime}}\,,\dots,\,\mathscr{H}_{Q_{1}}\otimes\mathscr{H}_{Q_{0}^{\prime}}\,,\,\mathscr{H}_{Q_{0}}\otimes\mathscr{H}_{L}$,
respectively. The sequence of errors described similarly as
$\mathbf{E}=\sum_{e}|E_{e}\rrangle\llangle E_{e}|$, which is also positive
semidefinite.

Let $Q=\\{L,Q_{0},Q_{0}^{\prime},\dots,Q_{l},Q_{l}^{\prime},L^{\prime}\\}$ be
the set of labels of the code spaces in the dynamical code and for
$\tilde{Q}\subseteq Q$ denote $(\cdot)^{\top_{\tilde{Q}}}$ as partial
transpose over spaces with labels in $\tilde{Q}$ and $\textup{Tr}_{\tilde{Q}}$
as partial trace over spaces with labels in $\tilde{Q}$ and
$I_{\tilde{Q}}=\bigotimes_{Q^{\prime}\in\tilde{Q}}I_{Q^{\prime}}$. Consider a
channel $\mathcal{T}:\mathscr{H}_{L}\rightarrow\mathscr{H}_{L^{\prime}}$
composed of the sequence of the check instruments
$\\{\mathcal{C}_{m_{l}|m_{l-1}}^{(l)},\dots,\mathcal{C}_{m_{1}}^{(1)},\mathcal{C}^{(0)}\\}_{m}$
for sequence of memory state $m=m_{1},\dots,m_{l}$, error maps
$\mathcal{E}^{(l)},\dots,\mathcal{E}^{(0)}$ and the final decoding channels
$\\{\mathcal{D}_{m_{l}}\\}_{m_{l}}$. We use the entanglement fidelity of
channel $\mathcal{T}$ on state $\rho$ as our performance metric, which is
defined as

$\displaystyle F(\rho,\mathcal{T})$
$\displaystyle=\textup{Tr}\big{(}\mathbf{E}\ast\mathbf{Q}\,|\rho\rrangle\llangle\rho|\big{)}$
(35) $\displaystyle=\textup{Tr}\big{(}(\mathbf{E}^{\top}\otimes
I_{L^{\prime},L})\,\mathbf{Q}\,(|\rho\rrangle\llangle\rho|\otimes
I_{Q\backslash L,L^{\prime}})\big{)}\;,$

where $|\rho\rrangle=\sum_{j}\rho|j\rangle|j\rangle$ is the vectorized form of
density operator $\rho$.

For $r\in\\{1,\dots,l\\}$, it holds that
$\textup{Tr}_{Q_{r}}(\sum_{m_{r}}\mathbf{C}_{m_{r}|m_{r-1}}^{(r)})=I_{Q_{r-1}^{\prime}}$
since $\sum_{m_{r}}\mathcal{C}_{m_{r}|m_{r-1}}^{(r)}$ is a CPTP map. Similarly
it also holds that $\textup{Tr}_{Q_{0}}(\mathbf{C}^{(0)})=I_{L}$ and
$\textup{Tr}_{L^{\prime}}(\mathbf{D}_{m_{l}})=I_{Q_{l}^{\prime}}$ for each
$m_{l}$. Thus for a given error operator $\mathbf{E}$ and initial state
$\rho$, we can maximize entanglement fidelity (35) over $\mathbf{Q}$ as

$\begin{gathered}\max_{\mathbf{Q}}\textup{Tr}\big{(}(\mathbf{E}^{\top}\otimes
I_{L^{\prime},L})\,\mathbf{Q}\,(|\rho\rrangle\llangle\rho|\otimes
I_{Q\backslash L,L^{\prime}})\big{)}\\\ \textup{such that}\\\
\mathbf{Q}=\sum_{m_{0:l}}\mathbf{D}_{m_{l}}\otimes\mathbf{C}_{m_{l}|m_{l-1}}^{(l)}\otimes\dots\otimes\mathbf{C}_{m_{0}}^{(0)}\\\
\mathbf{D}_{m_{l}}\geq
0\;,\quad\textup{Tr}_{L^{\prime}}(\mathbf{D}_{m_{l}})=I_{Q_{l}^{\prime}}\\\
\mathbf{C}^{(0)}\geq
0\;,\quad\textup{Tr}_{Q_{0}}\big{(}\mathbf{C}^{(0)}\big{)}=I_{L}\\\
\mathbf{C}_{m_{r}|m_{r-1}}^{(r)}\geq
0\;,\;\textup{Tr}_{Q_{r}}\big{(}\sum_{m_{r}}\mathbf{C}_{m_{r}|m_{r-1}}^{(r)}\big{)}=I_{Q_{r-1}^{\prime}}\;,\;\forall
r\geq 1\;.\end{gathered}$ (36)

We can also impose this normalization condition to operator $\mathbf{Q}$ as
follows. Let
$\mathbf{Q}_{m_{l}}=\sum_{m_{0:l-1}}\mathbf{D}_{m_{l}}\otimes\mathbf{C}_{m_{l}|m_{l-1}}^{(l)}\otimes\dots\otimes\mathbf{C}_{m_{1}}^{(1)}\otimes\mathbf{C}^{(0)}$
(hence $\mathbf{Q}=\sum_{m_{l}}\mathbf{Q}_{m_{l}}$) and for
$r\in\\{0,\dots,l\\}$ let
$\mathbf{Q}_{m_{r}}^{(r)}=\sum_{m_{0:r-1}}\mathbf{C}_{m_{r}|m_{r-1}}^{(r)}\otimes\dots\otimes\mathbf{C}_{m_{1}}^{(1)}\otimes\mathbf{C}^{(0)}$
(hence
$\mathbf{Q}_{m_{1}}^{(1)}=\mathbf{C}_{m_{1}}^{(1)}\otimes\mathbf{C}^{(0)}$ and
$\mathbf{Q}^{(0)}=\mathbf{C}^{(0)}$). Thus we can rewrite the conditions in
(36) in this notation as

$\begin{gathered}\max_{\mathbf{Q}}\textup{Tr}\big{(}(\mathbf{E}^{\top}\otimes
I_{L^{\prime},L})\,\mathbf{Q}\,(|\rho\rrangle\llangle\rho|\otimes
I_{Q\backslash L,L^{\prime}})\big{)}\\\ \textup{such that}\\\ \mathbf{Q}\geq
0\;,\quad\textup{Tr}_{L^{\prime}}(\mathbf{Q})=\sum_{m_{l}}I_{Q_{l}^{\prime}}\otimes\mathbf{Q}_{m_{l}}^{(l)}\\\
\textup{Tr}_{Q_{r}}\Big{(}\sum_{m_{r}}\mathbf{Q}_{m_{r}}^{(r)}\Big{)}=\sum_{m_{r-1}}I_{Q_{r-1}^{\prime}}\otimes\mathbf{Q}_{m_{r-1}|m_{r-2}}^{(r-1)}\;,\,\forall
r\geq 1\\\ \mathbf{Q}^{(0)}\geq
0\;,\quad\textup{Tr}_{Q_{0}}(\mathbf{Q}^{(0)})=I_{L}\\\
\mathbf{Q}_{m_{r}|m_{r-1}}^{(r)}\geq 0\;,\quad\forall r\geq
1\;.\end{gathered}$ (37)

The optimization problem in (37) is an instance of conic programming [67, 68],
where the cone characterized by $\mathbf{Q}$ is a separable cone. The
aforementioned conic programming can be solved using see-saw algorithm, where
every iteration of the see-saw is a semidefinite program (SDP) [67]. In the
special case of static QECC, our conic program in (37) reduces to the bi-
convex optimization structure from Ref. [64] and can be solved using two SDPs
running one after another, until convergence within a fixed tolerance is
attained.

##  IV Discussions

In this work, we propose a unified framework for quantum error-correcting
codes (QECC) called the strategic code. It encompasses all existing QECCs and
all physically plausible QECCs to be discovered, including codes involving
operational adaptivity and also considering effects of spatially and
temporally (non-Markovian) correlated error models. The strategic code
introduces a device called an interrogator which represents all operations
performed by the coder in between encoding and decoding stages. The
interrogator is general, in that it may contain any set of operations
performed both spatially or temporally (in sequence) with classical or quantum
memory. Within this framework we show an algebraic (Theorem 1 and an
information-theoretic (Theorem 2) necessary and sufficient error-correction
conditions. These conditions apply to all known variants of dynamical QECC
(and all physically-allowed generalizations) and include the error-correction
conditions for static QECC [23, 25, 26] as a special case. The generality of
the results partly owes to the quantum combs formalism, which gives a natural
spatio-temporal representation for a QECC, as it has been for many sequential
tasks in quantum information and computation. In this formalism, we also
propose an optimization problem that gives an approximate QECC that recovers
logical information up to desired level of fidelity for a given error model,
which again may exhibit non-Markovian correlations.

As mentioned in the main text, although we focus on the scenario where the
interrogator only maintains classical memory, the strategic code also
accommodates an interrogator with quantum memory (as discussed in detail in
Appendix B.1). This leads to many questions including: How does the size
(dimension) quantum quantum memory affects error-correction? What are the
necessary and sufficient conditions for error correction given a fixed size
quantum memory? Moreover, as this generalization includes the entanglement-
assisted QECC (EAQECC) [39, 40, 41] as a special case, one could investigate
into relationships between error-correction conditions for EAQECC (e.g. [69])
to analogous conditions for strategic code. Also, another generalization
mentioned in the main text to allow encoding of logical information in a
susbsystem of the codespace, analogous to subsystem codes (as discussed in
detail in Appendix B.2). As subsystem codes has a different error-correction
conditions [60, 29, 27] compared to traditional static codes [23, 25, 26], it
is an interesting future work to show necessary and sufficient error-
correction condition of subsystem strategic code. Another interesting future
work is to use the concept of quantum combs virtualization [70, 71] to the
strategic code. This is essentially a method of approximating some operator
$\mathbf{\Phi}$ which involves randomly choosing from a set of “allowed”
$l$-rounds strategic codes $\\{\mathbf{I}^{(k)}\\}_{k}$ followed by a post-
processing. The sampling procedure and post-processing are constructed based
on a linear expansion of some operator $\mathbf{\Phi}$ in terms of
$\\{\mathbf{I}^{(k)}\\}_{k}$. Here operator $\mathbf{\Phi}$ have the same
dimension as $\mathbf{I}^{(k)}$, but it may correspond to a non-physical
process, such as those involving indefinite causal order or causally
inseparable [47, 72, 73, 52, 74, 75, 76, 77, 78]. One could also explore how a
strategic code equipped with such exotic causal structure performs. For more
detailed discussion on strategic code virtualization and strategic code with
more exotic causal structures, see Appendix B.3.

Further work could be done on an explicit construction of dynamical QECCs such
as a Floquet code, that corrects a sequence of error maps by using the
strategic code framework and conditions in Theorem 1 and Theorem 2. It would
also be an interesting to explore further whether adaptive strategic code can
provide any advantage over codes with fixed sequence of operations. Such
advantage could take the form of larger code distance or capability of storing
more logical information. A notion of approximate strategic code can also be
explored further and optimized using our optimization method. Particularly,
one could perhaps show an approximate error-correction condition for strategic
code with respect to logical information recovery up to a certain fidelity,
analogous to approximate static QECC conditions in [79]. It is also
interesting to understand further the relationship between our conditions and
the operator algebraic condition in [15, 20] which is formulated in terms of
non-Abelian gauge group defined by the sequence of Clifford gates and Pauli
measurements, as well as relationship between the strategic code and other
QECC frameworks [21, 22, 19, 20].

## Acknowledgements

This work is supported by the NRF2021-QEP2-02-P06 from the Singapore Research
Foundation, the Singapore Ministry of Education Tier 1 Grant RG77/22 (S), the
FQXi R-710-000-146-720 Grant “Are quantum agents more energetically efficient
at making predictions?” from the Foundational Questions Institute, Fetzer
Franklin Fund (a donor-advised fund of Silicon Valley Community Foundation)
and A*STAR C230917003. AT is supported by CQT PhD scholarship. The authors
thank Tobias Haug, Varun Narsimhachar and Yunlong Xiao for interesting
discussions.

## References

  * [1] Matthew B Hastings and Jeongwan Haah.  Dynamically generated logical qubits.  Quantum, 5:564, 2021.
  * [2] Craig Gidney, Michael Newman, Austin Fowler, and Michael Broughton.  A fault-tolerant honeycomb memory.  Quantum, 5:605, 2021.
  * [3] Christophe Vuillot.  Planar floquet codes.  arXiv preprint arXiv:2110.05348, 2021.
  * [4] Jeongwan Haah and Matthew B Hastings.  Boundaries for the honeycomb code.  Quantum, 6:693, 2022.
  * [5] Craig Gidney, Michael Newman, and Matt McEwen.  Benchmarking the planar honeycomb code.  Quantum, 6:813, 2022.
  * [6] Margarita Davydova, Nathanan Tantivasadakarn, and Shankar Balasubramanian.  Floquet codes without parent subsystem codes.  PRX Quantum, 4(2):020341, 2023.
  * [7] James R Wootton.  Measurements of floquet code plaquette stabilizers.  arXiv preprint arXiv:2210.13154, 2022.
  * [8] Oscar Higgott and Nikolas P Breuckmann.  Constructions and performance of hyperbolic and semi-hyperbolic floquet codes.  arXiv preprint arXiv:2308.03750, 2023.
  * [9] Zhehao Zhang, David Aasen, and Sagar Vijay.  X-cube floquet code: A dynamical quantum error correcting code with a subextensive number of logical qubits.  Physical Review B, 108(20):205116, 2023.
  * [10] David Aasen, Jeongwan Haah, Zhi Li, and Roger S. K. Mong.  Measurement quantum cellular automata and anomalies in floquet codes, 2023.
  * [11] Adam Paetznick, Christina Knapp, Nicolas Delfosse, Bela Bauer, Jeongwan Haah, Matthew B Hastings, and Marcus P da Silva.  Performance of planar floquet codes with majorana-based qubits.  PRX Quantum, 4(1):010310, 2023.
  * [12] Ali Fahimniya, Sheryl Mathew, Hossein Dehghani, Kishor Bharti, Alicia Kollar, Alexey Gorshkov, and Michael Gullans.  Hyperbolic floquet quantum error correcting codes.  In APS March Meeting Abstracts, volume 2023, pages N64–009, 2023.
  * [13] Arpit Dua, Nathanan Tantivasadakarn, Joseph Sullivan, and Tyler D Ellison.  Engineering 3d floquet codes by rewinding.  P R X Quantum, 5:020305, 2024.
  * [14] Dave Bacon, Steven T Flammia, Aram W Harrow, and Jonathan Shi.  Sparse quantum codes from quantum circuits.  IEEE Transactions on Information Theory, 63(4):2464–2479, 2017.
  * [15] Daniel Gottesman.  Opportunities and challenges in fault-tolerant quantum computation.  arXiv preprint arXiv:2210.15844, 2022.
  * [16] Nicolas Delfosse and Adam Paetznick.  Spacetime codes of clifford circuits, 2023.
  * [17] Matt McEwen, Dave Bacon, and Craig Gidney.  Relaxing hardware requirements for surface code circuits using time-dynamics.  Quantum, 7:1172, 2023.
  * [18] Noah Berthusen and Daniel Gottesman.  Partial syndrome measurement for hypergraph product codes.  arXiv preprint arXiv:2306.17122, 2023.
  * [19] Margarita Davydova, Nathanan Tantivasadakarn, Shankar Balasubramanian, and David Aasen.  Quantum computation from dynamic automorphism codes.  arXiv preprint arXiv:2307.10353, 2023.
  * [20] Xiaozhen Fu and Daniel Gottesman.  Error correction in dynamical codes.  arXiv preprint arXiv:2403.04163, 2024.
  * [21] Hector Bombin, Daniel Litinski, Naomi Nickerson, Fernando Pastawski, and Sam Roberts.  Unifying flavors of fault tolerance with the zx calculus.  arXiv preprint arXiv:2303.08829, 2023.
  * [22] Markus S Kesselring, Julio C Magdalena de la Fuente, Felix Thomsen, Jens Eisert, Stephen D Bartlett, and Benjamin J Brown.  Anyon condensation and the color code.  PRX Quantum, 5(1):010342, 2024.
  * [23] Emanuel Knill and Raymond Laflamme.  Theory of quantum error-correcting codes.  Physical Review A, 55(2):900, 1997.
  * [24] Benjamin Schumacher and Michael A Nielsen.  Quantum data processing and error correction.  Physical Review A, 54(4):2629, 1996.
  * [25] Michael A Nielsen, Carlton M Caves, Benjamin Schumacher, and Howard Barnum.  Information-theoretic approach to quantum error correction and reversible measurement.  Proceedings of the Royal Society of London. Series A: Mathematical, Physical and Engineering Sciences, 454(1969):277–304, 1998.
  * [26] Nicolas J Cerf and Richard Cleve.  Information-theoretic interpretation of quantum error-correcting codes.  Physical Review A, 56(3):1721, 1997.
  * [27] Michael A Nielsen and David Poulin.  Algebraic and information-theoretic conditions for operator quantum error correction.  Physical Review A, 75(6):064304, 2007.
  * [28] Daniel Gottesman.  Stabilizer codes and quantum error correction.  California Institute of Technology, 1997.
  * [29] David Kribs, Raymond Laflamme, and David Poulin.  Unified and generalized approach to quantum error correction.  Physical review letters, 94(18):180501, 2005.
  * [30] Gregory AL White, Charles D Hill, Felix A Pollock, Lloyd CL Hollenberg, and Kavan Modi.  Demonstration of non-markovian process characterisation and control on a quantum processor.  Nature Communications, 11(1):6301, 2020.
  * [31] Simon Milz and Kavan Modi.  Quantum stochastic processes and quantum non-markovian phenomena.  PRX Quantum, 2(3):030201, 2021.
  * [32] Ángel Rivas, Susana F Huelga, and Martin B Plenio.  Quantum non-markovianity: characterization, quantification and detection.  Reports on Progress in Physics, 77(9):094001, 2014.
  * [33] Li Li, Michael JW Hall, and Howard M Wiseman.  Concepts of quantum non-markovianity: A hierarchy.  Physics Reports, 759:1–51, 2018.
  * [34] Fattah Sakuldee, Simon Milz, Felix A Pollock, and Kavan Modi.  Non-markovian quantum control as coherent stochastic trajectories.  Journal of Physics A: Mathematical and Theoretical, 51(41):414014, 2018.
  * [35] Dorit Aharonov, Alexei Kitaev, and John Preskill.  Fault-tolerant quantum computation with long-range correlated noise.  Physical review letters, 96(5):050504, 2006.
  * [36] Naomi H Nickerson and Benjamin J Brown.  Analysing correlated noise on the surface code using adaptive decoding algorithms.  Quantum, 3:131, 2019.
  * [37] Hui Khoon Ng and John Preskill.  Fault-tolerant quantum computation versus gaussian noise.  Physical Review A, 79(3):032318, 2009.
  * [38] John Preskill.  Sufficient condition on noise correlations for scalable quantum computing.  arXiv preprint arXiv:1207.6131, 2012.
  * [39] Todd Brun, Igor Devetak, and Min-Hsiu Hsieh.  Correcting quantum errors with entanglement.  science, 314(5798):436–439, 2006.
  * [40] Min-Hsiu Hsieh, Igor Devetak, and Todd Brun.  General entanglement-assisted quantum error-correcting codes.  Physical Review A, 76(6):062313, 2007.
  * [41] Todd A Brun, Igor Devetak, and Min-Hsiu Hsieh.  Catalytic quantum error correction.  IEEE Transactions on Information Theory, 60(6):3073–3089, 2014.
  * [42] Giulio Chiribella, Giacomo Mauro D’Ariano, and Paolo Perinotti.  Theoretical framework for quantum networks.  Physical Review A, 80(2):022339, 2009.
  * [43] Giulio Chiribella, G Mauro D’Ariano, and Paolo Perinotti.  Quantum circuit architecture.  Physical review letters, 101(6):060401, 2008.
  * [44] Christina Giarmatzi and Fabio Costa.  Witnessing quantum memory in non-markovian processes.  Quantum, 5:440, 2021.
  * [45] Felix A Pollock, César Rodríguez-Rosario, Thomas Frauenheim, Mauro Paternostro, and Kavan Modi.  Non-markovian quantum processes: Complete framework and efficient characterization.  Physical Review A, 97(1):012127, 2018.
  * [46] Gus Gutoski and John Watrous.  Toward a general theory of quantum games.  In Proceedings of the thirty-ninth annual ACM symposium on Theory of computing, pages 565–574, 2007.
  * [47] Ognyan Oreshkov, Fabio Costa, and Časlav Brukner.  Quantum correlations with no causal order.  Nature communications, 3(1):1092, 2012.
  * [48] Man-Duen Choi.  Completely positive linear maps on complex matrices.  Linear algebra and its applications, 10(3):285–290, 1975.
  * [49] Andrzej Jamiołkowski.  Linear transformations which preserve trace and positive semidefiniteness of operators.  Reports on Mathematical Physics, 3(4):275–278, 1972.
  * [50] Min Jiang, Shunlong Luo, and Shuangshuang Fu.  Channel-state duality.  Physical Review A, 87(2):022310, 2013.
  * [51] Ge Bai, Ya-Dong Wu, Yan Zhu, Masahito Hayashi, and Giulio Chiribella.  Efficient algorithms for causal order discovery in quantum networks.  arXiv preprint arXiv:2012.01731, 2020.
  * [52] Fabio Costa and Sally Shrapnel.  Quantum causal modelling.  New Journal of Physics, 18(6):063032, 2016.
  * [53] Giulio Chiribella.  Optimal networks for quantum metrology: semidefinite programs and product rules.  New Journal of Physics, 14(12):125008, 2012.
  * [54] Qiushi Liu, Zihao Hu, Haidong Yuan, and Yuxiang Yang.  Optimal strategies of quantum metrology with a strict hierarchy.  Physical Review Letters, 130(7):070803, 2023.
  * [55] IA Luchnikov, SV Vintskevich, H Ouerdane, and SN Filippov.  Simulation complexity of open quantum dynamics: Connection with tensor networks.  Physical review letters, 122(16):160401, 2019.
  * [56] Gus Gutoski, Ansis Rosmanis, and Jamie Sikora.  Fidelity of quantum strategies with applications to cryptography.  Quantum, 2:89, 2018.
  * [57] Hlér Kristjánsson, Giulio Chiribella, Sina Salek, Daniel Ebler, and Matthew Wilson.  Resource theories of communication.  New Journal of Physics, 22(7):073014, 2020.
  * [58] Michael A Nielsen and Isaac L Chuang.  Quantum computation and quantum information.  Cambridge university press, 2010.
  * [59] David W Kribs, Raymond Laflamme, David Poulin, and Maia Lesosky.  Operator quantum error correction.  arXiv preprint quant-ph/0504189, 2005.
  * [60] David Poulin.  Stabilizer formalism for operator quantum error correction.  Physical review letters, 95(23):230504, 2005.
  * [61] Debbie W Leung, Michael A Nielsen, Isaac L Chuang, and Yoshihisa Yamamoto.  Approximate quantum error correction can lead to better codes.  Physical Review A, 56(4):2567, 1997.
  * [62] Daniel A Lidar and Todd A Brun.  Quantum error correction.  Cambridge university press, 2013.
  * [63] Claude Crépeau, Daniel Gottesman, and Adam Smith.  Approximate quantum error-correcting codes and secret sharing schemes.  In Annual International Conference on the Theory and Applications of Cryptographic Techniques, pages 285–301. Springer, 2005.
  * [64] Andrew S Fletcher, Peter W Shor, and Moe Z Win.  Optimum quantum error recovery using semidefinite programming.  Physical Review A, 75(1):012338, 2007.
  * [65] Hui Khoon Ng and Prabha Mandayam.  Simple approach to approximate quantum error correction based on the transpose channel.  Physical Review A, 81(6):062342, 2010.
  * [66] Carlo Cafaro and Peter van Loock.  Approximate quantum error correction for generalized amplitude-damping errors.  Physical Review A, 89(2):022316, 2014.
  * [67] Stephen P Boyd and Lieven Vandenberghe.  Convex optimization.  Cambridge university press, 2004.
  * [68] Arkadi Nemirovski.  Advances in convex optimization: conic programming.  In International Congress of Mathematicians, volume 1, pages 413–444, 2006.
  * [69] Markus Grassl, Felix Huber, and Andreas Winter.  Entropic proofs of singleton bounds for quantum error-correcting codes.  IEEE Transactions on Information Theory, 68(6):3942–3950, 2022.
  * [70] Ryuji Takagi, Xiao Yuan, Bartosz Regula, and Mile Gu.  Virtual quantum resource distillation: General framework and applications.  Physical Review A, 109(2):022403, 2024.
  * [71] Xiao Yuan, Bartosz Regula, Ryuji Takagi, and Mile Gu.  Virtual quantum resource distillation.  Physical Review Letters, 132(5):050203, 2024.
  * [72] Giulio Chiribella, Giacomo Mauro D’Ariano, Paolo Perinotti, and Benoit Valiron.  Quantum computations without definite causal structure.  Physical Review A, 88(2):022318, 2013.
  * [73] Lorenzo M Procopio, Amir Moqanaki, Mateus Araújo, Fabio Costa, Irati Alonso Calafell, Emma G Dowd, Deny R Hamel, Lee A Rozema, Časlav Brukner, and Philip Walther.  Experimental superposition of orders of quantum gates.  Nature communications, 6(1):7913, 2015.
  * [74] Simon Milz, Felix A Pollock, Thao P Le, Giulio Chiribella, and Kavan Modi.  Entanglement, non-markovianity, and causal non-separability.  New Journal of Physics, 20(3):033033, 2018.
  * [75] Giulia Rubino, Lee A Rozema, Adrien Feix, Mateus Araújo, Jonas M Zeuner, Lorenzo M Procopio, Časlav Brukner, and Philip Walther.  Experimental verification of an indefinite causal order.  Science advances, 3(3):e1602589, 2017.
  * [76] Kaumudibikash Goswami, Christina Giarmatzi, Michael Kewming, Fabio Costa, Cyril Branciard, Jacquiline Romero, and Andrew G White.  Indefinite causal order in a quantum switch.  Physical review letters, 121(9):090503, 2018.
  * [77] Nicolas Loizeau and Alexei Grinbaum.  Channel capacity enhancement with indefinite causal order.  Physical Review A, 101(1):012340, 2020.
  * [78] Daniel Ebler, Sina Salek, and Giulio Chiribella.  Enhanced communication with the assistance of indefinite causal order.  Physical review letters, 120(12):120502, 2018.
  * [79] Cédric Bény and Ognyan Oreshkov.  General conditions for approximate quantum error correction and near-optimal recovery channels.  arXiv preprint arXiv:0907.5391, 2009.
  * [80] Ognyan Oreshkov and Christina Giarmatzi.  Causal and causally separable processes.  New Journal of Physics, 18(9):093020, 2016.

##  Appendix A Necessary and sufficient algebraic conditions for static QECC

Knill-Laflamme’s necessary and sufficient condition for exact QECC [23] states
that for a given basis $\\{|i\rangle_{Q}\\}_{i}$ of code space
$\mathscr{S}_{Q}$ and any distinct pair of code space basis
$\left|i\right\rangle_{Q},\left|j\right\rangle_{Q}\in\mathscr{S}_{Q}$, it
holds that

$\begin{gathered}\langle i|_{Q}E_{a}^{\dagger}E_{b}|i\rangle_{Q}=\langle
j|_{Q}E_{a}^{\dagger}E_{b}|j\rangle_{Q}=\lambda_{a,b}\\\
\quad\textup{and}\quad\\\ \langle
i|_{Q}E_{a}^{\dagger}E_{b}|j\rangle_{Q}=0\;,\end{gathered}$ (38)

for some constant $\lambda_{a,b}\in{\mathbb{C}}$. Equivalently for a projector
$\Pi_{Q}=\sum_{i}|{i}\rangle\mkern-4.0mu\langle{i}|_{Q}$ onto codespace
$\mathscr{S}_{Q}$, it holds that

$\Pi_{Q}E_{a}^{\dagger}E_{b}\Pi_{Q}=\lambda_{a,b}\Pi_{Q}\;.$ (39)

For subsystem QECC with code space
$\mathscr{S}_{Q}=\mathscr{S}_{C}\otimes\mathscr{S}_{G}$, where
$\mathscr{S}_{C}$ is the code subsystem and $\mathscr{S}_{G}$ is the gauge
subsystem, Nielsen-Poulin’s necessary and sufficient condition for exact QECC
[27] is

$\Pi_{Q}E_{a}^{\dagger}E_{b}\Pi_{Q}=I_{C}\otimes g_{a,b}$ (40)

where $g_{a,b}$ is an operator on $\mathscr{S}_{G}$ and $\Pi_{Q}$ projection
onto code space $\mathscr{S}_{Q}$ defined as $\Pi=VV^{\dagger}$ where
$V:\mathscr{S}_{L}\rightarrow\mathscr{S}_{Q}$ is an isometry that encodes
logical states into code states.

##  Appendix B Quantum combs representation of strategic code

Since $\mathcal{E}^{(r)}$ is a CP map and
$\sum_{m_{r}}\mathcal{C}_{m_{r}|m_{r-1}}^{(r)}$ is a CPTP map their Choi
operators $\mathbf{E}^{(r)}$ and $\mathbf{C}_{m_{r}|m_{r-1}}^{(r)}$ are
positive definite. Hence $\mathbf{E}^{(r)}$ and
$\mathbf{C}_{m_{r}|m_{r-1}}^{(r)}$ admits decomposition

$\begin{gathered}\mathbf{E}^{(r)}=\sum_{e_{r}}|E_{e_{r}}\rrangle\llangle
E_{e_{r}}|\\\
\mathbf{C}_{m_{r}|m_{r-1}}^{(r)}=\sum_{o_{r}:f(o_{r},m_{r-1})=m_{r}}|C_{o_{r}|m_{r-1}}\rrangle\llangle
C_{o_{r}|m_{r-1}}|\end{gathered}$ (41)

where $|E_{e_{r}}\rrangle=\sum_{i,j}\langle
i|E_{e_{r}}|j\rangle|i\rangle|j\rangle$ and
$|C_{o_{r}|m_{r-1}}\rrangle=\sum_{i,j}\langle
i|C_{o_{r}|m_{r-1}}|j\rangle|i\rangle|j\rangle$ are the (unnormalized)
eigenvectors of $\mathbf{E}^{(r)}$ and
$\sum_{m_{r}}\mathbf{C}_{m_{r}|m_{r-1}}^{(r)}$, which are the vectorized
canonical Kraus operators of CP maps $\mathcal{E}^{(r)}$ and
$\sum_{m_{r}}\mathcal{C}_{m_{r}|m_{r-1}}^{(r)}$, respectively. Hence we can
express $\mathbf{E}_{e}$ (for $e=e_{0},\dots,e_{l}$) and $\mathbf{I}_{m_{l}}$
as

$\begin{gathered}\mathbf{E}_{e}=|E_{e}\rrangle\llangle E_{e}|\\\
\mathbf{I}_{m_{l}}=\sum_{o\in O_{m_{l}}}|C_{m_{l},o}\rrangle\llangle
C_{m_{l},o}|\;.\end{gathered}$ (42)

Here, $o=o_{1},\dots,o_{l}$ is a sequence of check measurement outcomes and
$O_{m_{l}}$ is the set of all check measurement outcome sequence $o$ resulting
in final memory state $m_{l}$, i.e. $o\in O_{m_{l}}$ if and only if there
exists $m_{1},\dots,m_{l-1}$ such that $o=o_{1},\dots,o_{l}$ satisfies
$f_{1}(o_{1})=m_{1},\;f_{2}(o_{2},m_{1})=m_{2},\,\dots,\,f_{l}(o_{l},m_{l-1})=m_{l}$.
The vectors $|E_{e}\rrangle$ and $|C_{m_{l},o}\rrangle$ are defined by

$\displaystyle|C_{m_{l},o}\rrangle$
$\displaystyle=|C_{o_{l}|m_{l-1}}^{(l)}\rrangle\otimes\dots\otimes|C_{o_{1}}^{(1)}\rrangle$
(43) $\displaystyle|E_{e}\rrangle$
$\displaystyle=\sum_{i_{0:l-1},j_{0:l-1}}\Big{(}\langle
i_{l-1}|_{E_{l-1}}E_{e_{l-1}}|j_{l-1},i_{l-2}\rangle_{Q_{l-1}E_{l-2}}\otimes\dots\otimes\langle
i_{1}|_{E_{1}}E_{e_{1}}|j_{1},i_{0}\rangle_{Q_{1}E_{0}}\otimes\langle
i_{0}|_{E_{0}}E_{e_{0}}|j_{0}\rangle_{Q_{0}}\Big{)}$
$\displaystyle\quad\otimes
E_{e_{l}}|j_{l},i_{l-1}\rangle_{Q_{l}E_{l-1}}\otimes|j_{0:l}\rangle_{Q_{0}\dots
Q_{l}}$

where $|j_{0:l}\rangle_{Q_{0}\dots
Q_{l}}=\bigotimes_{r=0}^{l-1}|j_{r}\rangle_{Q_{r}}$ and for some orthonormal
bases $\\{|i_{r}\rangle\\}_{i_{r}}$ and $\\{|j_{r}\rangle\\}_{j_{r}}$ of the
noise environment $\mathscr{S}_{E_{r}}$ and codespace $\mathscr{S}_{Q_{r}}$,
respectively. Note that
$|C_{m_{l},o}\rrangle\in\mathscr{S}_{Q_{0}^{\prime}}\otimes\mathscr{S}_{Q_{1}}\otimes\dots\otimes\mathscr{S}_{Q_{l-1}}\otimes\mathscr{S}_{Q_{l}}$
and
$|E_{e}\rrangle\in\mathscr{S}_{Q_{0}}\otimes\mathscr{S}_{Q_{0}^{\prime}}\otimes\dots\otimes\mathscr{S}_{Q_{l}}\otimes\mathscr{S}_{Q_{l}^{\prime}}$.
Using these formulas, we can now express complete interaction between the
sequence of check instruments $\mathbf{I}_{m_{l}}$ and error maps
$\mathbf{E}_{e}$ as

$\begin{gathered}\mathbf{E}_{e}\ast\mathbf{I}_{m_{l}}=\sum_{o\in
O_{m_{l}}}|K_{e,m_{l},o}\rrangle\llangle K_{e,m_{l},o}|\end{gathered}$ (44)

where

$\displaystyle|K_{e,m_{l},o}\rrangle=E_{e_{l}}(C_{o_{l}|m_{l-1}}^{(l)}\otimes
I_{E_{l-1}})E_{e_{l-1}}\dots E_{e_{1}}(C_{o_{1}}^{(1)}\otimes
I_{E_{0}})E_{e_{0}}|j_{0}\rangle_{Q_{0}}\otimes|j_{0}\rangle_{Q_{0}}$ (45)
$\displaystyle=\sum_{i_{0:l},j_{1:l},k_{1:l}}\Big{(}\langle
j_{l}|_{Q_{l}}C_{o_{l}|m_{l-1}}^{(l)}|k_{l}\rangle_{Q_{l-1}^{\prime}}\langle
k_{l},i_{l-1}|_{Q_{l-1}^{\prime}E_{l-1}}E_{e_{l-1}}|j_{l-1},i_{l-2}\rangle_{Q_{l-1}E_{l-2}}\dots\langle
k_{2},i_{1}|_{Q_{1}^{\prime}E_{1}}E_{e_{1}}|j_{1},i_{0}\rangle_{Q_{1}E_{0}}\langle
j_{1}|_{Q_{1}}C_{o_{1}}^{(1)}|k_{1}\rangle_{Q_{0}^{\prime}}$
$\displaystyle\quad\langle
k_{1},i_{0}|_{Q_{0}^{\prime},E_{0}}E_{e_{0}}|j_{0}\rangle_{Q_{0}}\Big{)}E_{e_{l}}|j_{l},i_{l-1}\rangle_{Q_{l}E_{l-1}}\otimes|j_{0}\rangle_{Q_{0}}\;,$

which is an vector in
$\mathscr{S}_{Q_{l}^{\prime}}\otimes\mathscr{S}_{Q_{0}}$.

We give a more explicit derivation of the operator representing the entire
interaction between the errors and the check instruments and the decoding
procedure. Consider operators
$\mathbf{D}_{m_{l}}\in\mathscr{H}_{D}\otimes\mathscr{H}_{Q_{l}^{\prime}}$ and
$\mathbf{E}_{e}\in\bigotimes_{r=0}^{l}\mathscr{H}_{Q_{r}^{\prime}}\otimes\mathscr{H}_{Q_{r}}$
and
$\mathbf{C}_{m_{r}|m_{r-1}}^{(r)}\in\mathscr{H}_{Q_{r}}\otimes\mathscr{H}_{Q_{r-1}^{\prime}}$.
Let $Q=\\{Q_{0},Q_{0}^{\prime},\dots,Q_{l},Q_{l}^{\prime},D\\}$ be the set of
labels of the code spaces in the dynamical code and for $\tilde{Q}\subseteq Q$
denote $(\cdot)^{\top_{\tilde{Q}}}$ as partial transpose over spaces with
labels in $\tilde{Q}$ and $\textup{Tr}_{\tilde{Q}}$ as partial trace over
spaces with labels in $\tilde{Q}$ and
$I_{\tilde{Q}}=\bigotimes_{Q^{\prime}\in\tilde{Q}}I_{Q^{\prime}}$. The entire
dynamical encoding, error sequence, and decoding can be expressed as

$\displaystyle\sum_{m_{0:l}}\mathbf{D}_{m_{l}}\ast\mathbf{E}_{e_{l}}\ast\mathbf{C}_{m_{l}|m_{l-1}}^{(l)}\ast\dots\ast\mathbf{E}_{e_{1}}\ast\mathbf{C}_{m_{1}}^{(1)}\ast\mathbf{E}_{e_{0}}$
(46) $\displaystyle=\sum_{m_{0:l}}\textup{Tr}_{Q\backslash
DQ_{0}}\Big{(}(\mathbf{D}_{m_{l}}\otimes I_{Q\backslash
Q_{l}^{\prime}})\,\prod_{r=1}^{l}(\mathbf{E}_{e_{r}}^{\top_{Q_{r}^{\prime},Q_{r}}}\otimes
I_{Q\backslash
Q_{r}^{\prime},Q_{r}})\,(\mathbf{C}_{m_{r}|m_{r-1}}^{(r)}\otimes
I_{Q\backslash
Q_{r},Q_{r-1}^{\prime}})\,(\mathbf{E}_{e_{0}}^{\top_{Q_{0}^{\prime},Q_{0}}}\otimes
I_{Q\backslash Q_{0}^{\prime},Q_{0}})\Big{)}$
$\displaystyle=\sum_{m_{0:l}}\textup{Tr}_{Q\backslash
DQ_{0}}\Big{(}(\mathbf{D}_{m_{l}}\otimes I_{Q\backslash
Q_{l}^{\prime}})\,(\mathbf{E}_{e}^{\top}\otimes
I_{D})\,\big{(}\prod_{r=1}^{l}\mathbf{C}_{m_{r}|m_{r-1}}^{(r)}\otimes
I_{Q\backslash Q_{r},Q_{r-1}^{\prime}}\big{)}\Big{)}$
$\displaystyle=\textup{Tr}_{Q\backslash
DQ_{0}}\bigg{(}(\mathbf{E}_{e}^{\top}\otimes
I_{D})\,\underbrace{\Big{(}\sum_{m_{0:l}}\mathbf{D}_{m_{l}}\bigotimes_{r=1}^{l}\mathbf{C}_{m_{r}|m_{r-1}}^{(r)}\Big{)}}_{\mathbf{Q}=\sum_{m_{l}}\mathbf{D}_{m_{l}}\ast\mathbf{I}_{m_{l}}}\bigg{)}$
$\displaystyle=\textup{Tr}_{Q\backslash
DQ_{0}}\Big{(}(\mathbf{E}_{e}^{\top}\otimes I_{D})\,\mathbf{Q}\Big{)}$
$\displaystyle=\mathbf{E}_{e}\ast\mathbf{Q}$

Note that
$\mathbf{E}_{e}\ast\mathbf{Q}\in\mathscr{H}_{D}\otimes\mathscr{H}_{Q_{0}}$.

###  B.1 Strategic code with quantum memory

Figure 4: Strategic code with quantum memory.

The strategic code in Definition 2 can be generalized further to the case
where retention of some quantum information can be performed between rounds.
In this case, the strategic code is equipped with a quantum memory represented
by a sequence of quantum systems
$\mathscr{S}_{B_{0}},\mathscr{S}_{B_{1}},\dots,\mathscr{S}_{B_{l}}$ where
system $\mathscr{S}_{B_{r}}$ is the quantum system being passed from check
instrument in round $r$ to the check instrument in round $r+1$ for $r\geq 1$.
This is illustrated in Fig. 4. At round $r=0$, without loss of generality we
can think of the logical information being initially encoded in an entangled
codestate $|\psi\rangle_{B_{0}Q_{0}}$ between the codespace
$\mathscr{S}_{Q_{0}}$ and the quantum memory system $\mathscr{S}_{B_{0}}$ of
the strategic code. The $\mathscr{S}_{B_{0}}$ part of the entangled codestate
serves as an input to check instrument $\mathscr{C}^{(1)}$ in round $1$. In
this case the check instrument in round $r$ has the form
$\mathcal{C}^{(r)}:\mathscr{H}_{B_{r-1}}\otimes\mathscr{H}_{Q_{r-1}^{\prime}}\rightarrow\mathscr{H}_{B_{r}}\otimes\mathscr{H}_{Q_{r}}$
since it receives the quantum system $\mathscr{S}_{B_{r-1}}$ from the
preceding check instrument $\mathcal{C}^{(r-1)}$, whereas $\mathcal{C}^{(0)}$
receives the $\mathscr{S}_{B_{0}}$ part of the initial entangled codestate
$|\psi\rangle_{B_{0}Q_{0}}$.

In the quantum combs representation of the interrogator $\mathbf{I}$, the
eigenvectors of the interrogator operator $\mathbf{I}_{m_{l}}$ no longer has
the tensor product structure as in the case when only classical memory is
allowed in eqn. (43). Namely in general we have
$|C_{m_{l},o}\rrangle\neq|C_{o_{l}|m_{l-1}}^{(l)}\rrangle\otimes\dots\otimes|C_{o_{1}}^{(1)}\rrangle$.
Here $|C_{m_{l},o}\rrangle$ instead takes the more general form of

$\displaystyle|C_{m_{l},o}\rrangle$
$\displaystyle=\sum_{k_{0:l-1},j_{0:l-1}}C_{o_{l},m_{l-1}}|k_{l-1},j_{l-1}\rangle_{B_{l-1}Q_{l-1}^{\prime}}\otimes\dots\otimes\langle
k_{2}|_{B_{2}}C_{o_{2}|m_{1}}|k_{1},j_{1}\rangle_{B_{1}Q_{1}^{\prime}}\otimes\langle
k_{1}|_{B_{1}}C_{o_{1}}|k_{0},j_{0}\rangle_{B_{0}Q_{0}^{\prime}}$ (47)
$\displaystyle\quad\otimes|k_{0}\rangle_{B_{0}}\otimes|j_{0:l-1}\rangle_{Q_{0}^{\prime}\dots
Q_{l}^{\prime}}$

where $|j_{0:l-1}\rangle_{Q_{0}^{\prime}\dots
Q_{l}^{\prime}}=\bigotimes_{r=0}^{l-1}|j_{r}\rangle_{Q_{r}^{\prime}}$ and for
some orthonormal bases $\\{|k_{r}\rangle\\}_{k_{r}}$ and
$\\{|j_{r}\rangle\\}_{j_{r}}$ of the quantum memory system
$\mathscr{S}_{B_{r}}$ and codespace $\mathscr{S}_{Q_{r}^{\prime}}$,
respectively. Also as before $m_{r}=f_{r}(o_{r},m_{r-1})$ for all $r>1$ and
$m_{1}=f_{1}(o_{1})$.

Note that when we set the number of rounds of the strategic code to $l=0$, we
recover the entanglement-assisted QECC (EAQECC) [39, 40, 41]. In this case we
simply have the initial entangled codestate $|\psi\rangle_{B_{0}Q_{0}}$
followed by error map $\mathcal{E}^{(0)}$ then a decoder channel
$\mathcal{D}$, which makes up an EAQECC.

It is an interesting future work to establish a necessary and sufficient
error-correction conditions for a strategic code with quantum memory analogous
to Theorem 1 and Theorem 2. In doing this one needs to restrict the dimension
of the quantum memory of the interrogator, as otherwise one can always store
the entire code in the quantum memory, bypassing the error maps. Also, one
might also consider where the decoder also outputs a “residue” entangled state
alongside the recovered initial codestate as in [69].

###  B.2 Subsystem strategic code

Another generalization of the strategic code in Definition 2 is to introduce
additional system in the codespace in each round, i.e.
$\mathscr{S}_{Q_{r}}=\mathscr{S}_{A_{r}}\otimes\mathscr{S}_{C_{r}}$ where
logical information is stored in subsystem $\mathscr{S}_{A_{r}}$. This is
analogous to subsystem QECC [29, 59, 60, 27] where the codespace is of the
form $\mathscr{S}_{Q}=\mathscr{S}_{A}\otimes\mathscr{S}_{C}$. In this
generalization, which we call a subsystem strategic code, we still retain the
form of the interrogator operator $\mathbf{I}_{m_{l}}=\sum_{o\in
O_{m_{l}}}|C_{m_{l},o}\rrangle\llangle C_{m_{l},o}|$. Namely,
$|C_{m_{l},o}\rrangle$ has the same expression as eqn. (43), or as eqn. (47)
in the case where quantum memory is available Hence we can modify Definition 2
so that we say a subsystem strategic code $(\mathscr{S}_{Q_{0}},\mathbf{I})$
corrects $\mathfrak{E}$ if

$\mathcal{D}_{m_{l}}(\mathbf{E}\ast\mathbf{I}_{m_{l}}\ast(\rho\otimes\sigma))=\rho\otimes\sigma_{m_{l}}$
(48)

for all density operators $\rho$ in $\mathscr{H}_{A_{0}}$ and
$\sigma,\sigma_{m_{l}}$ operators in $\mathscr{H}_{C_{0}})$. Lastly, necessary
and sufficient conditions in Theorem 1 generalized to the subsystem strategic
codes should also reduce to the necessary and sufficient condition for
subsystem codes [27] when we set the number of rounds $l=0$,

$\Pi_{Q}E_{e^{\prime}}^{\dagger}E_{e}\Pi_{Q}=\Pi_{A}\otimes g_{e^{\prime},e}$
(49)

where $g_{e^{\prime},e}$ is an operator in $\mathscr{H}_{C}$. This generalized
condition for subsystem strategic code, however, is left for future work.

###  B.3 Virtual strategic code and strategic codes with exotic causal
structure

A recently proposed virtual quantum resource theory [71, 70] offers a
framework of approximating a process $\Phi$ by performing sampling process
from a set of allowed process $\mathscr{F}$ where $\Phi\notin\mathscr{F}$,
followed by a post-processing, to achieve a certain task. As it is shown in
[70] on how this framework can be applied to quantum combs, here we show how
one can “virtualize” a strategic code, including those with more exotic causal
structure such as an indefinite causal order or causal inseparability [47, 72,
73, 80, 52, 74, 75, 76, 77, 78].

First we can consider a set of $l$-rounds allowed strategic codes
$\\{\mathbf{I}^{(k)}\\}_{k}$ (e.g. those that only maintains classical
memory), where we include an encoding channel
$\mathcal{G}^{(k)}:\mathscr{L}({\mathbb{C}}^{d^{\prime}})\rightarrow\mathscr{H}_{Q_{0}}^{(k)}$
mapping linear operators on $d^{\prime}$ dimensional complex vector space to
linear operators on an initial codespace $\mathscr{S}_{Q_{0}}^{(k)}$ in the
strategic code $\mathbf{I}^{(k)}$. So a $d^{\prime}$ dimensional state
$|\psi\rangle$ encoded with strategic code $\mathbf{I}^{(k)}$ with error
$\mathbf{E}$ gives a state

$\mathbf{E}\ast\mathbf{I}_{m_{l}}^{(k)}\ast|{\psi}\rangle\mkern-4.0mu\langle{\psi}|$
(50)

at the start of the decoding round for a final memory state $m_{l}$.

The sampling and post-processing processes are based on linear expansion of
operator $\mathbf{\Phi}=\sum_{k}\beta_{k}\mathbf{I}^{(k)}$ where
$\beta_{k}\in{\mathbb{R}}$ where $\mathbf{\Phi}$ represents some black-box
process that allows input of initial state
$|{\psi}\rangle\mkern-4.0mu\langle{\psi}|$ and interaction with error
$\mathbf{E}$ as $\mathbf{I}^{(k)}$ do. Operator $\mathbf{\Phi}$ have the same
dimension as $\mathbf{I}^{(k)}$, but it may not correspond to a quantum comb.
Namely it may correspond to a process involving indefinite causal order or
causally inseparable, e.g. where the effect of errors between round $r$ and
$r^{\prime}\neq r$ may not have a definite causal relation (as opposed to the
strategic code where interaction between the investigator’s operation and the
error map at round $r=1$ influences the interaction at round $r=3$, but not
the other way around). Here, operator $\mathbf{\Phi}$ is represented by a
process matrix [47, 80, 52], which is more general object than a quantum comb.

To perform sampling, one constructs a probability distribution over $k$ with
probabilities $\gamma_{k}=\frac{|\beta_{k}|}{\tau}$ for
$\tau=\sum_{k}|\beta_{k}|$ so that

$\mathbf{\Phi}=\sum_{k}(\mathrm{sign}(\beta_{k})\tau)\gamma_{k}\mathbf{I}^{(k)}\;.$
(51)

Using this relation, one can sample from distribution $\\{\gamma_{k}\\}_{k}$
and upon obtaining outcome $k$, use strategy code $\mathbf{I}^{(k)}$ to encode
some fixed state $|\psi\rangle$ and after applying noise $\mathbf{E}$ obtain
the output state
$\mathbf{E}\ast\mathbf{I}_{m_{l}}^{(k)}\ast|{\psi}\rangle\mkern-4.0mu\langle{\psi}|$
then apply “post-processing” by a multiplication by
$(\mathrm{sign}(\beta_{k})\tau)$. As shown in [71, 70], by performing this
sampling and post-processing multiple times we can obtain an approximation of

$\textup{Tr}\Big{(}(\mathbf{E}\ast\mathbf{\Phi}\ast|{\psi}\rangle\mkern-4.0mu\langle{\psi}|)A\Big{)}$
(52)

for some bounded linear operator $A$. Lastly, we note that decoder may be
included in $\mathbf{I}^{(k)}$ as well to have the entire QECC process where
the output
$\mathbf{E}\ast\mathbf{I}_{m_{l}}^{(k)}\ast|{\psi}\rangle\mkern-4.0mu\langle{\psi}|$
is the output of a decoder. It would be interesting to investigate into the
performance of strategic code virtualization and how strategic codes with
exotic causal structures can or cannot improve code performance. However, this
is left for future work.

##  Appendix C Spacetime Code in the Quantum Combs Formalism

Now we describe the spacetime code [14, 15, 16] in our dynamical QECC quantum
combs framework. The spacetime code is first proposed by Bacon,et.al. for a
circuit consisting of a subset of Clifford gates in [14], then a
generalization to circuits consisting of any Clifford gates is done by
Gottesman in [15]. In these two spacetime codes, Pauli measurements for
syndrome extraction is performed after the last layer of Clifford gates is
applied. This is later generalized by Delfosse,et.al. in [16] where Pauli
measurements can be performed anywhere in the circuit. Here we consider the
most general spacetime code defined in [16] in demonstrating how spacetime
code fits in our framework.

A spacetime code is defined by a circuit that takes $n$ qubits as input,
followed by $l$ layers of Clifford operations, where each layer consists of
Clifford gates and Pauli measurements on disjoint qubits. In Gottesman’s and
Bacon,et.al.’s spacetime code [15] where measurements are restricted to the
end of the circuit, the circuit takes $q$ qubit input along with preparation
of $a$ ancilla qubits at the beginning of the circuit and $q^{\prime}$ output
qubits with $\\{|0\rangle,|1\rangle\\}$ basis measurements on $b$ qubits at
the end of the circuit. In this circuit $q,a,q^{\prime},b$ must satisfy
$n=q+a=q^{\prime}+b$, where $n$ is the width of the circuit and thus each
layer consists only of Clifford gates.

We note that our dynamical QECC framework can also describe a sequence of such
circuits $\mathbf{C}^{(1)},\mathbf{C}^{(2)},\dots,\mathbf{C}^{(l)}$ where
error syndromes from one circuit determines the structure of the subsequent
circuit, hence induces adaptivity. This temporal dependence across circuits
has been mentioned in [15] although was not explored further. The quantum
combs formalism for dynamical QECC applied to spacetime code presented here
allows such exploration with the natural temporal-dependence representation.

Figure 5:  Spacetime code Clifford circuit. Circuit $\mathbf{C}_{o}$ takes $n$
qubits as input at the start of the circuit and outputs $n$ qubits along with
measurement outcomes $o=o_{1},\dots,o_{l}$ peformed throughout the circuit.
Between the input and the output, the circuit contains $l$ layers of Clifford
operations $C_{1},\dots,C_{l}$, each layer $C_{r}$ consist of Clifford gates
and Pauli measurements with acting on disjoint subsets of the $n$ qubits.
Outcomes from Pauli measurements at layer $r$ is denoted by $o_{r}$. Error
operations are modelled to occur after the input ($E_{e_{0}}$) and after each
layer ($E_{e_{1}},\dots,E_{e_{l}}$). Error $E_{e_{0}}$ represents the noise on
input qubits and error $E_{e_{r}}$ for $r\geq 1$ represent noise from the
Clifford gates and Pauli measurements in layer $C_{r}$. A spacetime code for
circuit $\mathbf{C}$ is defined by $n(l+1)$-qubit stabilizer group, which in
turn is defined by the circuit components. Each qubit (illustrated as black
dots) is labeled by $(i,r)$: for $r\geq 1$ it correspond to the $i$-th qubit
output of $C_{r}$ and for $r=0$ it correspond to the $i$-th qubit of the
input. Error $E_{e_{r}}$ in round $r$ is applied to qubits $\\{(i,r)\\}_{i}$.

###  C.1 Dynamical QECC quantum combs representation of spacetime code

Now we describe the quantum combs dynamical QECC of a spacetime code with
respect to a circuit with $l$ layers (see Fig. 5). In our dynamical QECC
framework, this spacetime code has $l$ rounds. At round $r=0$, error
$E_{e_{0}}$ is inflicted at the $n$ qubit input. At round $r\geq 1$, Clifford
operation $C_{r}$ is applied to the $n$ qubits, followed by error $E_{e_{r}}$.
The Clifford operation consisting of Clifford gates and Pauli measurements
performed on disjoint set of qubits is described by
$C_{r}=\\{C_{r,o_{r}}\\}_{o_{r}\in O_{r}}$ where $C_{r,o_{r}}$ is a bounded
linear operator from ${\mathbb{C}}^{2^{n}}$ to ${\mathbb{C}}^{2^{n}}$ and
$o_{r}\in O_{r}$ is a measurement outcome from the Pauli measurements with
$O_{r}$ being the set of all possible measurement outcomes. If there are $k$
Pauli measurements in $C_{r}$ then the outcome is in the form of a $k$-tuple
$o_{r}=(o_{r_{1}},\dots,o_{r_{k}})$. If no Pauli measurement is performed at
round $r$, then we set a constant outcome for this round, i.e.
$O_{r}=\\{o_{r}\\}$ is a singleton set and $C_{r,o_{r}}$ is a Clifford
unitary. Clifford operation $C_{r}$ at each round then defines a quantum
instrument $\mathcal{C}_{r}=\\{\mathcal{C}_{r,o_{r}}\\}_{o_{r}}$ where
$\mathcal{C}_{r,o_{r}}(\rho)=C_{r,o_{r}}\rho C_{r,o_{r}}^{\dagger}$ is a CP
map such that $\sum_{o_{r}}\mathcal{C}_{r,o_{r}}$ is a CPTP map. When
measurement outcome $o=o_{1},\dots,o_{l}$ is obtained, the quantum combs
representation of the circuit is

$\displaystyle\mathbf{C}_{o}=|C_{o}\rrangle\llangle
C_{o}|=\bigotimes_{r=1}^{l}|C_{r,o_{r}}\rrangle\llangle C_{r,o_{r}}|$ (53)

where $|C_{r,o_{r}}\rrangle$ is the vectorized form of operator $C_{r,o_{r}}$.

Errors occurring throughout the circuit is described by a sequence of bounded
linear operators $E_{e_{0}},\dots,E_{e_{l}}$ mapping vectors in
${\mathbb{C}}^{2^{n}}$ to ${\mathbb{C}}^{2^{n}}$. An error operator
$E_{e_{r}}$ takes the form of a tensor product of Paulis on qubits labeled by
$\\{(i,r)\\}_{i\in[n]}$. Explicitly this can be expressed as
$E_{e_{r}}=E_{1,e_{r}}\otimes\dots\otimes E_{n,e_{r}}$ where
$E_{i,e_{r}}\in\\{I,X,Y,Z\\}$ is a qubit Pauli operator where identity
$E_{i,e_{r}}=I$ indicates no error is inflicted on qubit $i$ at round $r$. In
the quantum combs representation, we can express the error sequence
$e=e_{0},\dots,e_{l}$ as a positive semidefinite operator
$|E_{e}\rrangle\llangle E_{e}|=\bigotimes_{r=0}^{l}|E_{e_{r}}\rrangle\llangle
E_{e_{r}}|$ where
$|E_{e_{r}}\rrangle=\bigotimes_{i=1}^{n}|E_{i,e_{r}}\rrangle$ and
$|E_{i,e_{r}}\rrangle=\sum_{j^{\prime},j}\langle
j^{\prime}|E_{i,e_{r}}|j\rangle|j^{\prime}\rangle_{r,i}|j\rangle_{r,i}$. Hence
the combs representation of the an error sequence can be expressed
conveniently as a tensor product of Choi operator of error operators for each
coordinate $(i,r)$ in the spacetime grid

$\displaystyle|E_{e}\rrangle\llangle
E_{e}|=\bigotimes_{r=0}^{l}\bigotimes_{i=1}^{n}|E_{i,e_{r}}\rrangle\llangle
E_{i.e_{r}}|\;,$ (54)

which closely resembles how errors are represented in spacetime code as a
tensor product of the error operators
$F_{e}=\bigotimes_{r=0}^{l}\bigotimes_{i=1}^{n}E_{i,e_{r}}$. Using both the
quantum combs representation of the circuit (eqn.(53)) and the error sequence,
the interaction between then can be expressed using the link product as

$\displaystyle|E_{e}\rrangle\llangle E_{e}|\ast\mathbf{C}_{o}$ (55)

which is a positive semidefinite operator from ${\mathbb{C}}^{2^{2n}}$ to
${\mathbb{C}}^{2^{2n}}$ corresponding to a CP map from the $n$-qubit input to
the $n$-qubit output.

Spacetime code is then defined by $n(l+1)$ qubit stabilizer group
$\mathscr{S}_{\mathrm{st}}$ where the qubits are placed in a grid and labeled
by a tuple $(i,r)$ where $i\in\\{1,\dots,n\\}$ corresponds to a qubit register
and $r\in\\{0,\dots,l\\}$ corresponds to a layer in the circuit. So, qubits
labeled by $\\{(i,0)\\}_{i}$ are input qubits which error $E_{e_{0}}$ are
inflicted upon. Whereas for $r\geq 1$, qubits $\\{(i,r)\\}_{i}$ are the qubits
placed at the output of Clifford operation $C_{r}$ which error $E_{e_{r}}$
occurs. If there are $s$ Pauli measurements across the circuit with
observables $S_{1},\dots,S_{s}$, then we can write the collection of the
outcomes as a bit string $o=o_{1},\dots,o_{s}$ which is then being put through
a function $f(o)=m$ which maps measurement outcomes to error syndromes. Error
syndrome $m$ is then used to choose which of the decoding channel
$\\{\mathcal{D}_{m}\\}_{m}$ should be used at the circuit output.

In Delfosse,et.al.’s spacetime code [16] decoding is done in three steps. The
first step is by using check bitstrings
$\\{u_{1},\dots,u_{q}\\}\subseteq\\{0,1\\}^{s}$ to define the function $f$
mapping the measurement outcome bitstring $o$ to syndrome bitstring
$m=m_{1}\dots m_{q}\in\\{0,1\\}^{q}$. This is done by taking the inner product
between $u_{j}$ and $o$ as the $j$-th bit of $f(o)=m$, i.e. $m_{j}=\langle
u_{j},o\rangle=u_{j,1}o_{1}+\dots+u_{j,s}o_{s}$, which is to be understood as
the $j$-th syndrome of measurement outcome $o$. The second step is to identify
the circuit error $F_{e}=\bigotimes_{r=0}^{l}\bigotimes_{i=1}^{n}E_{i,e_{r}}$
(or $|E_{e}\rrangle\llangle E_{e}|$ in the quantum combs form) using syndrome
$m$. In [16], this is done by using a “most likely effect” (MLE) decoder on
the $nl$-qubit spacetime stabilizer code. This stabilizer code is defined by
circuit $\\{\mathbf{C}_{o}\\}_{o}$ and check bitstrings
$\\{u_{1},\dots,u_{q}\\}$ (or equivalently, function $f$). Given syndrome $m$,
the MLE decoder outputs an $nl$-qubit Pauli $g(m)$ which is its guess of the
true circuit error $F_{e}$. Now the third step is to propagate $g(m)$, denoted
by $\overrightarrow{g(m)}$, and take its $n$-qubit Pauli corresponding to the
last layer $l$ of the circuit, denoted by $[\overrightarrow{g(m)}]_{l}$.
Propagation of (a subset of) an $n(l+1)$-qubit Pauli $P$ placed on the grid of
the circuit is introduced as the spackle operation in [14]. Then we compute
commutation relation between $\overrightarrow{g(m)}$ and observables
$S_{1},\dots,S_{s}$ corresponding to each measurement, to obtain bitstring
$\gamma=\gamma_{1},\dots,\gamma_{s}$ where
$\gamma_{j}=[S_{j},\overrightarrow{g(m)}]$. Then we can unflip measurement
outcome string $o$ by $o+\gamma$. Using $[\overrightarrow{g(m)}]_{l}$ and
$\gamma$ we can correct the output state from the circuit.

###  C.2 Spacetime code generalization in the strategic code framework

In the strategic code framework a generalization of the spacetime code can be
constructed using adaptivity on the Clifford operations. Following the
notation of the strategic code, we can denote the set of allowed Clifford
operations in round $r$ as $\\{\mathcal{C}_{m_{r-1}}^{(r)}\\}_{m_{r-1}}$,
where $\mathcal{C}_{m_{r-1}}^{(r)}$ is a CP map defined by its action
$\mathcal{C}_{m_{r-1}}^{(r)}(\rho)=\sum_{o_{r}}C_{o_{r}|m_{r-1}}^{(r)}\rho
C_{o_{r}|m_{r-1}}^{(r){\dagger}}$. As before, $C_{o_{r}|m_{r-1}}^{(r)}$
consists of Clifford gates and Pauli measurements on disjoint set of qubits.
For simplicity, we assume that $m_{r}$ has a one-to-one correspondence with
the sequence of measurement outcomes $o_{1},\dots,o_{r}$ hence we can still
describe the circuit as $\mathbf{C}=\\{\mathbf{C}_{o}\\}_{o}$ as a sequence of
outcomes $o=o_{1},\dots,o_{l}$ is maintained in the classical memory of the
code until the decoding round. For example, when a Pauli measurement $S_{1}$
in round $1$ gives an outcome $o_{1}=+1$, we apply Clifford operation
$\mathcal{C}_{+1}^{(2)}(\cdot)=\sum_{o_{2}}C_{o_{2}|+1}^{(2)}\cdot
C_{o_{2}|+1}^{(2){\dagger}}$ in round $2$, otherwise we apply Clifford
operation $\mathcal{C}_{-1}^{(2)}(\cdot)=\sum_{o_{2}}C_{o_{2}|-1}^{(2)}\cdot
C_{o_{2}|-1}^{(2){\dagger}}$ where Clifford gates and Pauli measurements in
$C_{o_{2}|+1}^{(2)}$ and $C_{o_{2}|-1}^{(2)}$ may differ.

In this case we have a family of spacetime codes, one for each trajectory
defined by a sequence of measurement outcomes $o$. Using the same method in
obtaining the stabilizer group of the spacetime code (i.e. from the
backpropagated measurement observables), we obtain a stabilizer group for each
outcome sequence $o$. A simple case where this may happen can be seen using
the example mentioned at the end of the previous paragraph. Suppose
$C_{+1|+1}^{(2)}=U_{2}\otimes|{0}\rangle\mkern-4.0mu\langle{0}|$ and
$C_{+1|-1}^{(2)}=U_{2}\otimes|{+}\rangle\mkern-4.0mu\langle{+}|$, then their
corresponding measurement observables are $Z$ and $X$.

##  Appendix D Hastings-Haah honeycomb Floquet code as a strategic code

Figure 6:  Hastings-Haah honeycomb code interrogator.

Here we look into how the strategic code framework can be used in determining
correctable error in the Hastings-Haah honeycomb Floquet code. For simplicity,
we consider a single hexagon in the honeycomb code with corresponding
stabilizer $ZZZZZZ$. Measurement observables in round 1 and 2 are

$\displaystyle XXIIII,IIXXII,IIIIXX$ (56) $\displaystyle
IYYIII,IIIYYI,YIIIIY\;,$

respectively, and the outcomes are $o_{1},o_{2}\in\\{+1,-1\\}^{3}$, where
$\\{+1,-1\\}$ are the corresponding eigenvalues of the two eigenstates for
each observable. Hence the check instruments $\mathcal{C}_{X}^{(1)}$ and
$\mathcal{C}_{Y}^{(2)}$ at these two rounds have Kraus operators

$\begin{gathered}C_{+1,+1,+1|X}^{(1)}=\big{(}|{++}\rangle\mkern-4.0mu\langle{++}|+|{--}\rangle\mkern-4.0mu\langle{--}|\big{)}_{1,2}\otimes\big{(}|{++}\rangle\mkern-4.0mu\langle{++}|+|{--}\rangle\mkern-4.0mu\langle{--}|\big{)}_{3,4}\otimes\big{(}|{++}\rangle\mkern-4.0mu\langle{++}|+|{--}\rangle\mkern-4.0mu\langle{--}|\big{)}_{5,6}\\\
\vdots\\\
C_{-1,-1,-1|X}^{(1)}=\big{(}|{+-}\rangle\mkern-4.0mu\langle{+-}|+|{-+}\rangle\mkern-4.0mu\langle{-+}|\big{)}_{1,2}\otimes\big{(}|{+-}\rangle\mkern-4.0mu\langle{+-}|+|{-+}\rangle\mkern-4.0mu\langle{-+}|\big{)}_{3,4}\otimes\big{(}|{+-}\rangle\mkern-4.0mu\langle{+-}|+|{-+}\rangle\mkern-4.0mu\langle{-+}|\big{)}_{5,6}\\\
C_{+1,+1,+1|Y}^{(2)}=\big{(}|{+i,+i}\rangle\mkern-4.0mu\langle{+i,+i}|+|{-i,-i}\rangle\mkern-4.0mu\langle{-i,-i}|\big{)}_{2,3}\otimes\big{(}|{+i,+i}\rangle\mkern-4.0mu\langle{+i,+i}|+|{-i,-i}\rangle\mkern-4.0mu\langle{-i,-i}|\big{)}_{4,5}\otimes\big{(}|{+i,+i}\rangle\mkern-4.0mu\langle{+i,+i}|+|{-i,-i}\rangle\mkern-4.0mu\langle{-i,-i}|\big{)}_{6,1}\\\
\vdots\\\
C_{-1,-1,-1|Y}^{(2)}=\big{(}|{+i,-i}\rangle\mkern-4.0mu\langle{+i,-i}|+|{-i,+i}\rangle\mkern-4.0mu\langle{-i,+i}|\big{)}_{2,3}\otimes\big{(}|{+i,-i}\rangle\mkern-4.0mu\langle{+i,-i}|+|{-i,+i}\rangle\mkern-4.0mu\langle{-i,+i}|\big{)}_{4,5}\otimes\big{(}|{+i,-i}\rangle\mkern-4.0mu\langle{+i,-i}|+|{-i,+i}\rangle\mkern-4.0mu\langle{-i,+i}|\big{)}_{6,1}\end{gathered}$
(57)

where subscripts indicates which qubits the projector is acting on and
$|\pm\pm\rangle=|\pm\rangle\otimes|\pm\rangle$ and $|\pm i,\pm i\rangle=|\pm
i\rangle\otimes|\pm i\rangle$ and $|\pm\rangle,|\pm i\rangle$ are $\pm 1$
eigenstates of Pauli $X$ and $Y$, respectively.

Consider two errors $E_{e_{0}}=ZIIIII$ and $E_{e_{0}^{\prime}}=IZIIII$ at
round $0$ (recall that round $r$ error occurs after round $r$ operation and
before round $r+1$ operation), and no further errors occur in round 1 and 2
i.e. $E_{e_{1}}=E_{e_{2}}=IIIIII$. Both of these errors are correctable by the
honeycomb code as both errors $E_{e_{0}}=ZIIIII$ and
$E_{e_{0}^{\prime}}=IZIIII$ flips the outcome of both round 1 and round 2
measurements, allowing the decoder to detect the error. In the strategic code
framework, we have a pair of error sequences $e=e_{0},e_{1},e_{2}$ and
$e^{\prime}=e_{0}^{\prime},e_{1},e_{2}$ with corresponding vectorized error
operators

$\begin{gathered}|E_{e}\rrangle=|ZIIIII\rrangle\otimes|IIIIII\rrangle\otimes|IIIIII\rrangle\\\
|E_{e}^{\prime}\rrangle=|IZIIII\rrangle\otimes|IIIIII\rrangle\otimes|IIIIII\rrangle\;.\end{gathered}$
(58)

Consider orthogonal states $|j\rangle,|k\rangle$ in the initial codespace
$\mathscr{S}_{Q_{0}}$. Then since all check outcomes are stored in the memory
of the honeycomb code interrogator, by Corollary 1 it holds that

$\displaystyle\llangle E_{e^{\prime}}|(|C_{o}\rrangle\llangle
C_{o}|\otimes|k\rangle\langle
j|)|E_{e}\rrangle=\delta_{k,j}\lambda_{e,e^{\prime},o}$ (59)

for some constant $\lambda_{e,e^{\prime},o}$. Since the $Z$ pauli flips the
$|\pm\rangle$ to $|\mp\rangle$ and $|\pm i\rangle$ to $|\mp i\rangle$, we
obtain outcomes $o_{1}=(-1,+1,+1)$ and $o_{2}=(+1,+1,-1)$ for $E_{e}$ and
$o_{1}=(-1,+1,+1)$ and $o_{2}=(-1,+1,+1)$ for $E_{e^{\prime}}$ (since without
error both initial codestate $|j\rangle$ and $|k\rangle$ gives all $+$
outcomes for both $o_{1}$ and $o_{2}$)

We can verify that this condition holds for error sequences $e,e^{\prime}$ as

$\displaystyle\llangle E_{e^{\prime}}|(|C_{o}\rrangle\llangle
C_{o}|\otimes|k\rangle\langle j|)|E_{e}\rrangle$ $\displaystyle=\langle
k|E_{e_{0}^{\prime}}C_{o_{1}}^{(1){\dagger}}C_{o_{2}}^{(2){\dagger}}C_{o_{2}}^{(2)}C_{o_{1}}^{(1)}E_{e_{0}}|j\rangle=0$
(60)

for all $o=o_{1},o_{2}$. One can see this by noting that
$C_{o_{2}}^{(2){\dagger}}C_{o_{2}}^{(2)}C_{o_{1}}^{(1)}E_{e_{0}}|j\rangle=0$
for all $o_{1}\neq(-1,+1,+1)$ and $o_{2}\neq(+1,+1,-1)$ while $\langle
k|E_{e_{0}^{\prime}}C_{o_{1}}^{(1){\dagger}}C_{o_{2}}^{(2){\dagger}}=0$ for
all $o_{1}\neq(-1,+1,+1)$ and $o_{2}\neq(-1,+1,+1)$. Namely, the sequence of
check measurement outcomes maps $E_{e_{0}}|j\rangle$ and
$E_{e_{0}^{\prime}}|k\rangle$ to different subspaces (even with $j=k$), which
allows one to construct a decoder detecting and distinguishing these errors.