text:
\section{Introduction}
Quantum information aims to process information by means of quantum systems in order to address problems that are hard to tackle for classical processors. It has shown strong connections with various fields like atomic, molecular and optical (AMO) physics \cite{Ladd2010}, condensed matter \cite{Lewenstein2007,Amico2008}, computer science \cite{Nielsen2000}, and also classical statistical mechanics. The connection between quantum information and classical statistical mechanics has proven to be fruitful in both directions \cite{Cuevas2013,Chubb2019,Zarei2019}. On the one hand a connection between measurement-based quantum computation and classical spin models has been used to show that the partition function of the 2D Ising model can generate the partition functions of all classical spin models \cite{Nest2008-04,Cuevas2009,Xu2011,Cuevas2016}. Furthermore, some quantum algorithms have proven to efficiently approximate the partition function of classical spin models \cite{Nest2007,Cuevas2011,Geraci2008,Lidar1997,Somma2007}. On the other hand, problems in quantum information have found a solution through their connection with solvable classical statistical problems, for instance, to determine which quantum circuits can be efficiently simulated classically \cite{Geraci2010}, or to provide the critical loss threshold of topological quantum error correction (QEC) codes.

To date, topological QEC codes represent one of the most promising routes towards fault-tolerant quantum computation~\cite{Browne2014,Terhal2015}. The logical information is encoded in the joint state of multiple qubits, where information can be protected by applying QEC protocols against noise sources that introduce errors. These QEC protocols consist in the extraction of an error syndrome and the consequent application of a correction. Each QEC code has parameter regimes where errors can or can not be corrected and it was shown that the error threshold that separates those phases is related to the critical point of the order/disorder phase-transition of a statistical physics model~\cite{Jahromi2013,Zarei2018}. For instance, the 2D surface code \cite{Kitaev2003} and the color code \cite{Bombin2006,Bombin2007} under computational (single-qubit bit and phase-flip) errors can be mapped to a 2D random-bond Ising model with two-body \cite{Dennis2002} and three-body interactions \cite{Katzgraber2009}, respectively. Under computational errors and faulty stabilizer measurements the surface code maps to a 3D random-plaquette lattice gauge model \cite{Ohno2004}, while the color code maps to a 3D Ising lattice gauge theory \cite{Andrist2011}. In \cite{Chubb2019} the mapping was was recently extended to account for circuit-level noise in the surface code.

Another particularly damaging noise source is the loss of qubits. A qubit is lost when the information encoded in it can no longer be accessed due to the leakage of the qubit population out of the computational space, or due to the actual loss of particles or photons encoding the qubit. From the theoretical point of view, the loss of information carried by the lost qubits is related to the no-cloning theorem \cite{Bennett1997}, and motivated the proposal of holographic QEC codes \cite{Almheiri2015,Pastawski2015}. Here, the correspondence between the AdS and the CFT spacetimes is identified with the encoding of logical qubits into the multipartite state of the physical qubits. Moreover, in the existing experimental platforms for quantum computation, like trapped ions \cite{Brown2016}, photons \cite{Stefanie2015}, cold atoms \cite{Bloch2008}, or superconducting qubits \cite{Clarke2008}, qubit loss comes in various incarnations like leakage from the computational space or the loss of particles hosting qubits from their traps. A number of protocols to remedy the effect of qubit loss have been proposed and put in practice for trapped ions \cite{Sherman2013}, superconducting qubits \cite{Ghosh2013,Galiautdinov2018,Strikis2019,Rol2019}, photons \cite{Ralph2005,Yang2008}, or quantum dots \cite{Mehl2015,Andrews2018,Chan2019}.

At the level of QEC codes, there are protocols \cite{Grassl1997,Suchara2015} to correct for the erasure channel, an error model where the position of the lost qubits is known. Some protocols \cite{Delfosse2017a,Delfosse2017b} correct the erasure channel by reinitializing the lost qubits in their computational space and then measuring the stabilizers, producing computational errors at known locations. Another approach consists of removing the lost qubits from the lattice and redefining the code space without the removed qubits. For the surface code, this protocol, which also extends to computational errors, was proposed in \cite{Stace2009,Stace2010}. By mapping the loss events to a percolation problem, it was shown that the surface code presents a tolerance against qubit loss of up to $ 50\% $ in the absence of other sources of error. The correction of qubit losses in the color code has the additional difficulty, compared to the surface code, that the lattice must preserve its trivalence and face-colorability after the code space redefinition. The determination of loss tolerance is of a practical importance for actual and future quantum processors as qubit loss is one of the noise sources of the existing physical platforms.

In \cite{Vodola2018} some of us proposed a protocol to correct qubit losses in the color code that achieved a tolerance of the $ 46(1)\% $ and we showed that, similarly to the surface code, the tolerance of the color code to qubit loss is directly related to a generalized percolation process on the lattice of the color code. More recently, a protocol that consists of mapping the color code to the surface code was proposed in \cite{Aloshious2018}.

In this work we argue that, given that some logical operators span the three so-called \textit{shrunk lattices}, the critical qubit loss rate $ p_c $ below which the logical information is still protected is directly related to the bond-percolation threshold $ r_c $ of the shrunk lattices of the color code. Here $ p_c $ is the critical value of the qubit loss rate $ p $ at which the average fraction of edges erased $ r(p) $ from a shrunk lattice to correct a fraction $ p $ of lost qubits equals the bond-percolation threshold $ r_c $ of of the corresponding shrunk lattice. Then, by obtaining $ r(p) $ analytically, we are able to obtain $ p_c $ analytically by solving $ r(p_c)=r_c $, as is shown in Fig.~\ref{thresholds}. We apply this prescription to the three regular geometries of the color code and corroborate our results with numerical analysis. We also detail an algebraic technique described in \cite{Vodola2018} and apply it to the three lattices in order to obtain their fundamental qubit loss thresholds $ p_f $. As an additional result, we prove that the logical information is preserved by the loss of qubits if and only if the set of qubits removed from the lattice does not contain the support of any logical operator.

The paper is organized as follows. We start in Sec.~\ref{color_code} by introducing some key concepts about color codes and the notation required for the rest of the paper. Then, in Sec.~\ref{sec_protocol} we review the protocol to correct color codes from qubit losses that was proposed in \cite{Vodola2018}, highlight the connection between the tolerance to qubit loss of the color code with this protocol and the percolation of the color code lattice, and provide detail on the computation of the number of edges erased to correct a qubit loss instance with the protocol. In Sec.~\ref{shrunk_percolation} we analytically derive the relation between the average fraction of edges erased $ r(p) $ and the qubit loss rate $ p $. The Sec.~\ref{sec_results} summarizes the results for the three regular geometries of the color code. In Sec.~\ref{algorithm} we provide an explicit recipe to compute $ r(p) $ up to any order in $ p $. Then, in Sec.~\ref{sec_algebraic} we describe in detail the algebraic technique proposed in \cite{Vodola2018} to obtain the fundamental qubit loss rate $ p_f $, and provide the necessary and sufficient conditions for the existence of the logical information under qubit loss. The values of $ p_c $ and $ p_f $ are summarized in Table \ref{T2}. Finally, we end with the conclusions and outlook in Sec.~\ref{conclusions}.

\section{The color code} \label{color_code}
The color code \cite{Bombin2006} is a topological QEC code that protects the logical quantum information by encoding it into a subspace (the code space) of a multi-qubit system. The $ N $ qubits $ i=1,\ldots,N $ sit on the nodes of a trivalent and face-three-colorable lattice. In these lattices, the faces have an even number of nodes, they share two nodes with the adjacent faces, and can be colored with three colors (red, blue, green) such that any two adjacent faces have different color. Similarly, edges can be colored with these three colors such that edges sharing a node have different color, and the color of every edge is different from the color of the faces that it belongs to. The regular lattices that satisfy those properties can be described in vertex notation as a.b.c that indicates that every node in the bulk is shared by three regular polygons with a, b and c vertices. The original and the shrunk lattices of the three regular geometries of the color code, namely the 4.8.8, the 6.6.6, and the 4.6.12~lattices, are depicted in Fig.~\ref{lattices}.

\begin{figure}[t]
	\centering
	\includegraphics[width=\columnwidth,keepaspectratio]{lattices.pdf}
	\caption{\textbf{Regular geometries of the color code.} Regular trivalent and three-colorable lattices. (a) Lattice 4.8.8 where every node belongs to one square and two octagons. (b) Lattice 6.6.6~(or honeycomb) where every node belongs to three hexagons. (c) Lattice 4.6.12~where every node belongs to one square, one hexagon, and one dodecagon. The red shrunk lattice of the 4.8.8~geometry is (a.1) a square lattice, while the blue (a.2) and green (a.3) shrunk lattices are square lattices with double-bonds. The three shrunk lattices of the 6.6.6~geometry (b.1), (b.2), (b.3) are hexagonal lattices. The red, blue, and green shrunk lattices of the 4.6.12~geometry are (c.1) a kagome lattice, (c.2) a triangular lattice with double-bonds, and (c.3) a hexagonal lattice with double-bonds, respectively.}
	\label{lattices}
\end{figure}

The code space of this stabilizer code~\cite{Gottesman1997} is the common $ +1 $ eigenspace of $ G $ independent and commuting \textit{generators} $ g_{\boldsymbol{f}}^{\sigma} $. A generator is a Pauli operator of type $ \sigma=X,\,Z $ with support on the set of qubits contained by a face of the lattice~$ \boldsymbol{f} $
\begin{equation}
	g_{\boldsymbol{f}}^{\sigma}=\bigotimes_{i\in \boldsymbol{f}}\sigma_i	.
\end{equation}

A code with $ N $ qubits and $ G $ independent generators encodes $ k=N-G $ logical qubits. The $ q $-th logical qubit is defined by two logical generators $ l_{q}^{\sigma} $ for $ \sigma=X,Z $. These operators can be \textit{string operators}, which are defined as
\begin{equation}\label{logical}
l_{q}^{\sigma}=\bigotimes_{i\in \boldsymbol{s}_{q}^{\sigma}}\sigma_i
\end{equation}
on sets of qubits $ \boldsymbol{s}_{q}^{\sigma} $ that take the form of homologically non-trivial strings in the lattice. For example, on the torus, they can be strings wrapping around the ``hole'' and the ``handle''. In a planar code they are strings going from one border to another.

These strings span the three \textit{shrunk lattices} of the color code. The nodes of the, say, red shrunk lattice are centered on the red plaquettes, and the edges connecting these nodes are the red edges of the color code lattice.

\section{The protocol} \label{sec_protocol}

\begin{figure}[t]
	\centering
	\includegraphics[width=\columnwidth,keepaspectratio]{protocol.pdf}
	\caption{\textbf{Protocol to correct qubit losses on the color code.} (i) Detect the lost qubit $ i $ (orange circle). In this work we assume that the positions of the lost qubits are already known. We also show two string operators $ l_q^\sigma $ (continuous line), and $ \tilde{l}_q^\sigma=l_q^\sigma g_{\boldsymbol{c}}^\sigma $ (dashed line) that differ by multiplication with the generator $ g_{\boldsymbol{c}}^\sigma $ defined on the face $ \boldsymbol{c} $. (ii) Choose a neighboring qubit $ i_s $ as the sacrificed qubit (yellow circle), (iii) remove both $ i $ and $ i_s $ and modify the lattice: the faces $ \boldsymbol{a},\boldsymbol{b} $ that contain both qubits are shrunk into $ \boldsymbol{a}',\boldsymbol{b}' $, and the two faces $ \boldsymbol{c},\boldsymbol{d} $ that contain only one of the removed qubits (lost and sacrificed) are merged into one face $ \boldsymbol{c}' $. This correction erases the five edges adjacent to both qubits (dotted lines) and adds two new edges (dashed lines) such that all remaining qubits have an edge of each color. (iv) Check the existence of the logical information by searching for a well-defined logical operator (like  $ \tilde{l}_q^\sigma $ ) that does not have support on the removed qubits. (v) If the logical information exists, measure the redefined generators $ \boldsymbol{a}',\boldsymbol{b}',\boldsymbol{c}' $. The well defined operators, like $ \tilde{l}_q^\sigma $, remain valid logical operators in the redefined code.}
	\label{fig_protocol}
\end{figure}

The protocol proposed in \cite{Vodola2018} to correct the color code from qubit losses consists in choosing, for every lost qubit,  a neighboring \textit{sacrificed} qubit to be removed together with the loss.  The steps of the protocol are depicted in Fig.~\ref{fig_protocol}. (i) Detect the lost qubits. In this work we will assume that the positions of the lost qubits are known. (ii) Choose the order in which the losses are going to be corrected, and for each loss $ i $, select randomly one of the three neighboring qubits to the loss as the sacrificed qubit $ i_s $. (iii) For each loss, remove the lost qubit and the sacrificed qubit and modify the faces so they do not have support on them: shrink the two faces $ \boldsymbol{a},\,\boldsymbol{b} $ that contain both removed qubits into faces $ \boldsymbol{a}' $ and $ \boldsymbol{b}' $ respectively, and merge the two faces $ \boldsymbol{c},\,\boldsymbol{d} $ that have support on only one of the qubits into a face $ \boldsymbol{c}' $. In this redefinition step the five edges connecting the removed qubits have been erased and two new edges have been added to the lattice. At the same time, a face where two generators are defined is also removed. The new code has two physical qubits and two generators less, so the number of encoded qubits is preserved.

(iv) Check whether the logical information exists or not after the removal of the lost and sacrificed qubits. to this end, a key observation is that logical operators are not uniquely defined. Two logical operators $ l_q^\sigma,\,\tilde{l}_q^\sigma $ belong to the same class $ \{q,\sigma\} $, i.e., they have the same effect on the encoded information, if and only if they differ in a multiplication with a subset $ \mathcal{G} $ of generators
\begin{equation}\label{equivalence}
\tilde{l}_q^\sigma = l_q^\sigma \prod_{g_{\boldsymbol{f}}^{\sigma'}\in \mathcal{G}} g_{\boldsymbol{f}}^{\sigma'}	.
\end{equation}
The logical information still exists in the code if for every class $ \{q,\sigma\} $ there is a well defined logical operator $ \tilde{l}_q^\sigma $, meaning that it does not have support on the removed qubits (lost and sacrificed). For example, in Fig.~\ref{fig_protocol} we show two logical operators that belong to the same class $ \{q,\sigma\} $ because they differ in the multiplication by the generator $ g_{\boldsymbol{c}}^\sigma $: one $ \tilde{l}_q^\sigma $ is well defined, while the other $ l_q^\sigma $ is not. We check the existence of well defined logical operators in two different ways:

(1) Searching in the shrunk lattices for the existence of a \textit{percolating string} without support on the removed qubits. If such strings exists, it corresponds to a logical operator that does not have support on the removed qubits, thus, it is a well defined logical operator. For example, in Fig.~\ref{fig_protocol}(iv) the blue operator $ l_q^\sigma $, which is not well defined, can be deformed into the well defined logical operator $ \tilde{l}_q^\sigma $ by multiplying it with a generator $ g_{\boldsymbol{c}}^\sigma $ of the same type $ \sigma $ but defined on a face of a different color (red face).
In the same way, finding a percolating string is equivalent to finding a subset of generators $ \mathcal{G} $ such that the logical operator $ \tilde{l}_q^\sigma $ in Eq.~(\ref{equivalence}) does not have support on the removed qubits, with the restriction that these generators have a color different from the color of $ l_q^\sigma $. This method defines the \textit{critical qubit loss rate} $ p_c $ below which the logical information is preserved. The main result of this paper is the analytical computation of $ p_c $ (see Table \ref{T2} for the values obtained), as described in Section \ref{shrunk_percolation}.

(2) The second method consists of directly checking, without any color restriction, the existence of $ \mathcal{G} $ such that $ \tilde{l}_q^\sigma $ in Eq.~(\ref{equivalence}) does not have support on the removed qubits. As this method includes the most general form of a logical operator, it provides the \textit{fundamental threshold} $ p_f $ of the color code affec\-ted by qubit loss (see Table \ref{T2} for the values of $ p_f $ obtained). The solution provided by this method includes in particular the logical operators $ \tilde{l}_q^\sigma $ generated by multiplication with generators of the same color as $ l_q^\sigma $. These logical operators \textit{branch} from one shrunk lattice into the other two, as illustrated in Fig.~\ref{fig_strings}. There a blue string operator, multiplied by a blue generator, branches into the red and the green shrunk lattices and then recombines back to the blue shrunk lattice, taking the form of a \textit{string-net} operator. Therefore, this method is equivalent to a \textit{generalized percolation} problem where the three shrunk lattices are coupled. Despite the exponential number of possible subsets of generators, a solution can be found efficiently, as discussed in Section \ref{sec_algebraic}. Furthermore, in that section we  prove that \textit{given a set of removed qubits $ \boldsymbol{r} $, the logical information is protected if and only if $ \boldsymbol{r} $ does not contain the support of any logical operator.}

\begin{figure}[t]
	\centering
	\includegraphics[width=4.75cm,keepaspectratio]{strings.pdf}
	\caption{\textbf{Strings and string-nets where logical operators have support.} (a) 6.6.6 color code lattice with a blue string operator $ l_q^\sigma $ on the continuous and discontinuous blue lines, and string-net operator $ \tilde{l}_q^\sigma $. The string-net operator is composed by four paths represented by four continuous lines: (a.1) a red path in the red shrunk lattice, (a.2) two blue paths (the two continuous lines) in the blue shrunk lattice, (a.3) a green path in the green shrunk lattice. Here the blue string operator $ l_q^\sigma $, which is not well defined because it has support on a lost qubit (the orange circle), is multiplied by  the generator $ g_{\boldsymbol{f}}^\sigma $ on the blue face $\boldsymbol{f}$  and transformed into the string-net operator $ \tilde{l}_q^\sigma $ that does not have support on the lost qubit. }	\label{fig_strings}
\end{figure}

(v) If the logical information is preserved, the last step of the protocol consists of projecting the state into the common eigenspace of the redefined generators by generator measurement. As the system is not initially defined in the eigenspace of the redefined generators, excitations may appear when measured, i.e., the system might be projected into the $ -1 $ eigenspace of these generators. These excitations do not need to be removed. Instead, one can define the new code space as determined by the measured eigenvalues of the new generators.

\subsection{Average number of edges erased}\label{corrections}
In order to compute analytically the critical loss rate $ p_c $ at which percolating strings disappear from the shrunk lattices (method (1) of the Sec.~\ref{sec_protocol}), we need to determine the number of edges erased from the original shrunk lattice that we introduce in the following.

\begin{figure}[t]
	\centering
	\includegraphics[width=\columnwidth,keepaspectratio]{one_loss_correction.pdf}
	\caption{\textbf{One loss corrections.} There are three possible corrections $ \boldsymbol{\kappa} $ for an instance of one qubit loss $ \boldsymbol{i}=\{i\} $ (orange dot) depending on the selection of a neighboring qubit to sacrifice: (a) the qubit $ i_{s} $ on the red edge, (b) the qubit $ i_{s}' $ on the blue edge, (c) the qubit $ i_{s}'' $ on the green edge. We choose each correction with a probability $ w_{\boldsymbol{\kappa}}=1/3 $. From left to right the number of red edges erased (red dotted lines) is $ \mathsf{R}_{\boldsymbol{\kappa}} = 1$, $ \mathsf{R}_{\boldsymbol{\kappa}'}  = 2$, and $ \mathsf{R}_{\boldsymbol{\kappa}''} = 2$. Therefore, the average number of edges erased from the red shrunk lattice by a one-loss event is $ R_1=5/3 $. This value is the same for every loss instance of one qubit loss and for every shrunk lattice.}
	\label{one_loss_correction}
\end{figure}

Let us define a qubit \textit{loss instance} $ \boldsymbol{i} $ as a set $ \boldsymbol{i}=\{i_1,i_2,\ldots \} $ containing the positions of the $ |\boldsymbol{i}| $ qubits lost. In step (ii) of the protocol, both the order in which qubit losses are corrected, and the sacrificed qubits must be chosen to correct $ \boldsymbol{i} $. In our protocol these selections are made randomly in order to keep the protocol simple and local. Then, every possible \textit{correction} of a loss instance is represented by an ordered list $ \boldsymbol{\kappa}=[i_{s_1},i_{s_2},\ldots] $, where the order corresponds to the order in which the sacrificed qubits $ i_s $ are selected. If we select with equal probability each of the $ |\boldsymbol{i}|! $ orderings and select with equal probability each of the three neighbors of a loss that is corrected, the probability of a correction $ \boldsymbol{\kappa} $ is $ w_{\boldsymbol{\kappa}}=(|\boldsymbol{i}|!)^{-1}3^{-|\boldsymbol{\kappa}|} $, where $ |\boldsymbol{\kappa}| $ is the size of $ \boldsymbol{\kappa} $.

\begin{figure}[t]
	\centering
	\includegraphics[width=\columnwidth,keepaspectratio]{two_losses.pdf}
	\caption{\textbf{Corrections of a loss instance with two qubit losses.} To correct a loss instance $ \boldsymbol{i}=\{i_1,i_2\} $ like the one in (a) composed by two losses indicated with orange dots, the protocol first chooses the order in which the losses are going to be corrected. In this case, the order $ i_1,\,i_2  $ is chosen with a probability of $ 1/2 $. To correct the first loss $ i_1 $, any of the three neighboring qubits can be chosen with a probability $ 1/3 $ as the sacrificed qubit $ i_{s_1} $. In (b.1) the loss $ i_2 $ has been chosen as the sacrificed qubit, so there is no need to correct the loss $ i_2 $. The correction is $ \boldsymbol{\kappa}=[i_{s_1}] $. The probability of this correction is $ w_{\boldsymbol{\kappa}}=(1/2)(1/3)=1/6 $ and $ \mathsf{R}_{\boldsymbol{\kappa}}=1 $ red edges are erased (red dotted lines). In (b.2) a qubit different from the loss $ i_2 $ has been chosen as the sacrificed qubit $ i_{s_1}' $ (yellow dot), and the lattice has been modified accordingly. Then, in (b.2.1) a sacrificed qubit $ i_{s_2}' $ has been chosen to correct the loss $ i_2 $ producing the final erasure of $ \mathsf{R}_{\boldsymbol{\kappa}'}=3 $ red edges with a probability $ w_{\boldsymbol{\kappa}'}=(1/2)(1/3)^2=1/18 $, where the correction is $ \boldsymbol{\kappa}'=[i_{s_1}',i_{s_2}'] $. Note that the new red edge added in (b.2) has not been counted as an erased edge in (b.2.1), because in $ \mathsf{R}_{\boldsymbol{\kappa}} $ we count only those edges erased from the original lattice.}
	\label{two_losses}
\end{figure}

In step (iii) the lattice is modified according to the loss instance $ \boldsymbol{i} $ that occurred and the correction $ \boldsymbol{\kappa} $ selected. In this correction the number of edges erased from the original shrunk lattice is $ \mathsf{R}_{\boldsymbol{\kappa}} $, and the number of edges erased averaged over the set $ \mathcal{K}_{\boldsymbol{i}} $ of all possible corrections of $ \boldsymbol{i} $ is:
\begin{equation}	\label{correction_average}
R_{\boldsymbol{i}} = \sum_{\boldsymbol{\kappa}\in \mathcal{K}_{\boldsymbol{i}}} w_{\boldsymbol{\kappa}} \mathsf{R}_{\boldsymbol{\kappa}}	.
\end{equation}
We notice that, as we are interested in the percolation of the original lattice, in Eq.~\eqref{correction_average} only the links belonging to the original shrunk lattice will be counted.

As we show in Fig.~\ref{one_loss_correction}, for a loss instance with only one qubit lost $ \boldsymbol{i}=\{i_1\} $, there are three possible corrections $ \boldsymbol{\kappa} $ happening with a probability $ w_{\boldsymbol{\kappa}}=1/3 $, one for every selection of a sacrificed qubit $ i_{s_1} $. The corrections erase $ \mathsf{R}_{\boldsymbol{\kappa}}=1 $, $ \mathsf{R}_{\boldsymbol{\kappa}'}=2 $, and $ \mathsf{R}_{\boldsymbol{\kappa}''}=2 $ red edges, so the average number of edges erased from the original red shrunk lattice to correct $ \{i_1\} $ is:
\begin{equation}
R_1=\frac{5}{3}	.
\end{equation}
$ R_1 $ is the same for every loss instance containing only one loss and it is also the same for every shrunk lattice. Moreover, since every color code is trivalent, $ R_1 $ will be the same for every (also irregular) geometry.

In Fig.~\ref{two_losses} we show two possible corrections of a two-qubit loss instance $ \boldsymbol{i}=\{i_1,i_2\} $. In the correction depicted in (b.1), the qubit sacrificed $ i_{s_1} $ to correct the loss $ i_1 $ coincides with the second loss $ i_2 $, so no second qubit needs to be sacrificed in order to correct $ i_2 $. The probability of this correction is then $ w_{\boldsymbol{\kappa}}=1/6 $. This correction shows that the set of lost and sacrificed qubits can overlap. In the correction depicted in (b.2.1) two qubits  $ i_{s_1}' $ and $ i_{s_2}' $ have been sacrificed, so the probability is $ w_{\boldsymbol{\kappa}'}=1/18 $. Note that the $ \mathsf{R}_{\boldsymbol{\kappa}'}=3 $ edges erased are counted only from the original shrunk lattice.

\section{Analytical results for percolating strings}\label{shrunk_percolation}
The main result of this paper is the analytical computation of the critical loss rate $ p_c $ below which there are well defined string operators that percolate through a shrunk lattice. This critical point corresponds to the qubit loss rate $ p $ at which the shrunk lattice does no longer percolate. This happens when the \textit{average fraction of edges erased} $ r(p) $ from the original lattice equals the \textit{bond-percolation threshold} $ r_c $ \cite{Stauffer1985} of the shrunk lattice
\begin{equation} \label{critical}
r(p_c)=r_c	.
\end{equation}
Therefore, $ p_c $ can be obtained analytically from the knowledge of $ r(p) $ and $ r_c $ as shown in Fig.~\ref{thresholds} where we plot the curve $ r(p) $ and the critical loss rates $ p_c $ obtained from the intersection of $ r(p) $ with the values of $ r_c $ for the three shrunk lattices of the 4.6.12 geometry of the color code. In Table \ref{T2} we summarize the values of $ r_c $ and $ p_c $ also for the other geometries.

Note that strings live only on one shrunk lattice, so we can treat the percolation of the three shrunk lattices independently. A value of $ p_c $ is then obtained for each of the three shrunk lattices in each of the three regular geometries of the color code depicted in Fig.~\ref{lattices}.

We study the bond-percolation problem of the shrunk lattice instead of the site-percolation problem because the erased edges of the lattice of the color code coincide with the erased edges of the shrunk lattices, while the removed qubits do not sit on the nodes of the shrunk lattice (recall that the nodes of the shrunk lattices are centered on the plaquettes).

\begin{figure}[t]
	\centering
	\includegraphics[width=\columnwidth,keepaspectratio]{thresholds.pdf}
	\caption{\textbf{Fraction of edges erased} $ r(p) $ as a function of the qubit loss rate $ p $. The points correspond to the numerical estimation, while curves are the analytical estimation. The analytical results with the first three coefficients: $ r(p)\simeq \alpha_1p+\alpha_2p^2+\alpha_3p^3 $ for the red, blue, and green shrunk lattices are represented by the red, blue, and green points and curves respectively. By comparing the analytical curves with the bond-percolation thresholds $ r_c $ taken from Table \ref{T2} we obtain the loss thresholds $ p_c $ of the shrunk lattices. The numerical data is obtained by a Monte-Carlo sampling of losses at various values of the qubit loss rate $ p $.}
	\label{thresholds}
\end{figure}

\begin{figure}[t]
	\centering
	\includegraphics[width=\columnwidth,keepaspectratio]{all.pdf}
	\caption{\textbf{Fraction of edges erased} $ r(p) $ as a function of the qubit loss rate $ p $ for every shrunk lattice of the three regular geometries of the color code. The continuous line correspond to the first three orders in the expansion  of $ r(p) $ in powers of $ p $ (Eq.~(\ref{alpha_expansion})). The coefficients of this curve were obtained analytically without performing any approximation. The numerical data (dots) is obtained by a Monte-Carlo sampling of losses at various values of the qubit loss rate $ p $.}
	\label{all}
\end{figure}

We would like to point out that in the bond-percolation problem the edges erased are uniformly distributed in the graph.  However, this is not the case in the color code, given that the edges removed to correct a qubit loss are generally erased in groups, like in Fig.~\ref{one_loss_correction}, where in the last two corrections the two red edges erased are close to each other. However, we assume a uniform distribution of qubit losses without any spatial correlation, so the edges erased will be approximately uniformly distributed, and therefore, we can safely identify $ r_c $ with $ r(p_c) $.

\subsection{Average fraction of edges erased $ r(p) $}\label{power}
The average fraction of edges erased $ r(p) $ is the average number of edges erased divided by the total number of edges $ e=N/2 $ in the shrunk lattice that is being studied, where $ N $ is the total number of qubits. In the following, the error model we consider is the \textit{erasure channel} which assumes local and uncorrelated losses, each of them happening with probability~$ p $. In this noise model $ p $ is also the loss density, so the average number of qubits lost is $ pN $. If the density is low, qubit losses predominantly occur far apart from each other, so they can be treated independently, and therefore, the average number of edges erased by each loss is $ R_1=5/3 $, giving an average fraction of edges erased of $ R_1pN/e=2R_1p $. Then, the average fraction of edges erased grows linearly with $ p $ for low densities:
\begin{equation}	\label{alpha_expansion}
	r(p)=2R_1\,p+\sum_{\ell\geq2}\alpha_\ell\,p^\ell	.
\end{equation}
Our goal is to systematically compute the coefficients $ \alpha_{\ell} $ up to a given desired order $ \ell $. These coefficients are corrections to the linear behavior and they are determined by the \textit{interaction} that takes place between losses that are close to each other. We say that $ \ell $ losses \textit{interact} if the number of edges erased from the original lattice to correct those losses is less than~$ \ell R_1 $, which is the number of edges erased if these losses are far apart from each other. Given that the interaction between losses reduces the number of edges erased, and that the number of interacting instances increases with the density $ p $ of losses, the erasure of edges slows down as $ p $ increases.
\\

The interaction may come in different fashions as depicted in Fig.~\ref{two_losses}. For example, in the correction (b.1) when the sacrificed qubit coincides with a lost qubit, or in the correction (b.2.1), where one of the edges erased to correct the qubit loss $ i_2 $ is not an edge from the original shrunk lattice but a new edge added from the correction of the first loss $ i_1 $, and therefore, it is not counted in $ r(p) $. If we compute the number of edges erased $ R_{\{i_1,i_2\}} $ for this loss instance as specified by Eq.~(\ref{correction_average}) we will obtain that $ R_{\{i_1,i_2\}} < 2R_1 $.

The interaction between losses can be understood by thinking about the number of edges erased as a sum of \textit{energies}. An instance $ \{i\} $ containing a single loss $ i $ erases an average of $ R_1 $ edges as explained in Fig.~\ref{one_loss_correction}, so let us define $ E_{\{i\}}=R_1 $ as the \textit{internal energy} of every single loss. As mentioned, an instance $ \{i_1,i_2\} $ with two losses erases a number $ R_{\{i_1,i_2\}} $ of edges that might be smaller than $ 2R_1 $, so in this case, there is a non-vanishing interaction energy $ E_{\{i_1,i_2\}} $ that makes $ R_{\{i_1,i_2\}} $ smaller than $ 2R_1 $. We define this two-body interaction energy from the energy sum $ R_{\{i_1,i_2\}}=E_{\{i_1\}}+E_{\{i_2\}}+E_{\{i_1,i_2\}} $. Note that $ E_{\{i_1,i_2\}}=0 $ if the losses do not interact. Analogously, an instance $ \{i_1,i_2,i_3\} $ of three losses erases a number of edges that can be expressed as:
\begin{equation}\label{three_losses_energies}
\begin{split}
	R_{\{i_1,i_2,i_3\}} &= E_{\{i_1\}} +E_{\{i_2\}} +E_{\{i_3\}} + E_{\{i_1,i_2\}} \\
	&+E_{\{i_1,i_3\}}+E_{\{i_2,i_3\}}+E_{\{i_1,i_2,i_3\}}
\end{split}
\end{equation}
where $ \{i_1,i_2\},\,\{i_1,i_3\},\, \{i_2,i_3\} $ are the two-body instances contained in $ \{i_1,i_2,i_3\} $.

Following this idea, one can write the number of edges erased by any instance as a sum of energies:
\begin{equation}\label{R(E)}
	R_{\boldsymbol{i}} = \sum_{\boldsymbol{j}\subset\boldsymbol{i}} E_{\boldsymbol{j}}
\end{equation}
where the sum is performed over all subsets of the set $ \boldsymbol{i} $. For the empty set $ \emptyset\subset\boldsymbol{i} $ we define the interaction energy $ E_\emptyset=0 $ as zero, while for all the subsets with $ \boldsymbol{j}=\{j\} $ one loss $ j $ the energies are equal: $ E_{\{j\}}=R_1 $. Eq.~\eqref{R(E)} can be represented by a full-rank linear system between $ \{R_{\boldsymbol{i}}\} $ and $ \{E_{\boldsymbol{i}}\} $. By inverting it, we obtain the energies defined by the number of edges erased:
\begin{equation}\label{E(R)}
	E_{\boldsymbol{i}} = (-1)^{|\boldsymbol{i}|}\sum_{\boldsymbol{j}\subset\boldsymbol{i}}(-1)^{|\boldsymbol{j}|}R_{\boldsymbol{j}}
\end{equation}
where $ R_\emptyset=0 $ and $ R_{\boldsymbol{j}}=R_1 $ for all $ \boldsymbol{j} $ with $ |\boldsymbol{j}|=1 $. See Appendix \ref{proof_E(R)} for the proof of this relation.
\\

Now we can show that the coefficients $ \alpha_{\ell} $ are given by the fully-interacting energies. In our model every loss happens with probability $ p $, so the probability of a loss instance $ \boldsymbol{i} $ is $ p^{|\boldsymbol{i}|}(1-p)^{N-|\boldsymbol{i}|}$. If the average number of edges erased to correct $ \boldsymbol{i} $ is $ R_{\boldsymbol{i}} $, the average fraction of edges erased can be written as:
\begin{equation}\label{fraction_edges_erased}
r(p) = e^{-1}\sum_{\boldsymbol{i}\in\mathcal{I}} p^{|\boldsymbol{i}|}(1-p)^{N-|\boldsymbol{i}|}R_{\boldsymbol{i}}
\end{equation}
where $ \mathcal{I} $ is the set of all possible loss instances. By expanding in powers of $ p $ as done in Appendix \ref{proof_expansion} and using Eq.~(\ref{E(R)}) we can identify the coefficients $ \alpha_{\ell} $ of Eq.~(\ref{alpha_expansion}) with the energies:
\begin{equation}\label{coefficients}
\alpha_\ell = e^{-1}\sum_{\boldsymbol{i}\in\mathcal{I},\;|\boldsymbol{i}|=\ell}E_{\boldsymbol{i}}	.
\end{equation}

However, many energies are zero. For example, as mentioned earlier, the interaction energy of two losses that are far apart from each other vanishes. Analogously, if an instance $ \boldsymbol{i} $ can be split into two disjoint, non-empty subsets $ \boldsymbol{i}^{(A)}\cup \boldsymbol{i}^{(B)}=\boldsymbol{i} $ such that $ R_{\boldsymbol{i}} = R_{\boldsymbol{i}^{(A)}}+R_{\boldsymbol{i}^{(B)}} $ the interaction energy $ E_{\boldsymbol{i}}=0 $ vanishes (proof in Appendix \ref{interacting}), and we call $ \boldsymbol{i} $ a \textit{separable instance}. This happens because the parts $\boldsymbol{i}^{(A)},\boldsymbol{i}^{(B)} $ are too far from each other to interact. On the contrary, the instances that can not be divided in this way are called \textit{fully-interacting} instances, and their energy is non-zero. Therefore the sum over $ \mathcal{I} $ in Eq.~(\ref{coefficients}) can be reduced to the sum over the fully-interacting instances $ \mathcal{I}^{\text{(f-i)}} $.

We also observe that the values of many energies are repeated given that in $ \mathcal{I}^{\text{(f-i)}} $ there are loss instances that are equal up to the symmetries of the lattice of the color code. In the regular geometries of the color code, every node is indistinguishable under the symmetries of the lattice, so we can represent the set of all fully-interacting instances $ \mathcal{I}^{\text{(f-i)}} $ by the set of all fully-interacting instances $ \mathcal{I}^{\text{(f-i)}}_{i_1} $ that have the qubit loss $ i_1 $ in common. Then, every instance $ \boldsymbol{i}\in\mathcal{I}^{\text{(f-i)}}_{i_1} $ is repeated $ N/|\boldsymbol{i}| $ times in $ \mathcal{I}^{\text{(f-i)}} $. Therefore, Eq.~(\ref{coefficients}) can be reduced to:
\begin{equation}\label{coefficients2}
\alpha_\ell = 2\ell^{-1}\sum_{\boldsymbol{i}\in\mathcal{I}^{(\text{f-i})}_{i_1}, \; |\boldsymbol{i}|=\ell}E_{\boldsymbol{i}}
\end{equation}
where we used that $ e=N/2 $ in the thermodynamic limit.

For a concrete example, in Fig.~\ref{EvsF}, on the horizontal axis we show the values of the energies $ E_{\boldsymbol{i}} $ of the interacting instances $ \boldsymbol{i} = \{i_1, i_2\} \in\mathcal{I}^{(\text{f-i})}_{i_1} $ and, on the vertical axis, the number of instances that have the same energy. These energies $ E_{\boldsymbol{i}} $ are the ones that appear in Eq.~\eqref{coefficients2}. By recalling that, from Eq.~\eqref{E(R)}, the energy $ E_{\boldsymbol{i}} $ is given by the difference between the number of edges erased by the two-loss instance $\{i_1, i_2\} $ and the number of edges erased separately by each of the single loss $\{i_1\}, \{i_2\} $, it is clear that  the instance that has the biggest energy (in absolute value) corresponds to the couple of qubits residing at the smallest possible distance, as depicted in panel (a). Likewise, the instance that has the smallest energy  (in absolute value) is the one where the qubits have a larger distance that still allows for some corrections to erase a common link (panel (b)).

\begin{figure}[t]
	\centering
	\includegraphics[width=\columnwidth,keepaspectratio]{EvsF.pdf}
	\caption{\textbf{Energies $ E_{\boldsymbol{i}} $ of instances} $ \boldsymbol{i}\in\mathcal{I}_{i_1}^{\text{(f-i)}} $ of two losses $ i_1 $, $ i_2 $ for the red shrunk lattice of the 6.6.6~geometry of the color code. In the horizontal axis we indicate the value of the interacting energies computed from the averaged number of edge erased (Eq.~\eqref{E(R)}). These energies are rescaled by a factor of  $ 2! \cdot 3^2=18 $ that represents the number of all possible corrections for each of the two-loss instance. In the vertical axis we indicate the occurrence of each energy, i.e., the number of instances $ \boldsymbol{i}\in\mathcal{I}_{i_1}^{\text{(f-i)}} $ that have the same energy $ E_{\boldsymbol{i}} $. The unique instance that has the biggest energy (in absolute value) is depicted in (a), while one of the four instances with the smallest energy (in absolute value) is depicted in (b). The other three instances with the same energy as (b) can be found by lattice symmetries. The instance in (b) corresponds to an interacting instance since the red link between the two sacrificed qubits (yellow circles) is erased to correct both qubit losses.
	}
	\label{EvsF}
\end{figure}

Note that to be fully-interacting, all the losses in an instance $ \boldsymbol{i}\in\mathcal{I}^{\text{(f-i)}}_{i_1} $ must be within a finite distance from $ i_1 $. Then, the number of instances in $ \mathcal{I}^{\text{(f-i)}}_{i_1} $ that have up to a certain number of losses $ \ell $ does not depend on the lattice size $ N $. From the number $ I_\ell $ of instances in $ \mathcal{I}^{\text{(f-i)}}_{i_1} $ with $ \ell $ losses we can compute the following averages, that are independent of the system size~$ N $:
\begin{eqnarray}\label{averages}
\bar{R}_\ell &&= I_\ell^{-1}\sum_{\boldsymbol{i}\in\mathcal{I}^{(\text{f-i})}_{i_1}, \; |\boldsymbol{i}|=\ell} R_{\boldsymbol{i}}\\
\bar{E}_\ell &&= I_\ell^{-1}\sum_{\boldsymbol{i}\in\mathcal{I}^{(\text{f-i})}_{i_1}, \; |\boldsymbol{i}|=\ell} E_{\boldsymbol{i}}
\end{eqnarray}
Note that there is only one instance of one loss, so $ \bar{R}_1=\bar{E}_1=R_1 $. Given that interaction does not increase the number of edges erased, the following hierarchy of inequalities is expected:
\begin{equation}
R_1 \geq \frac{\bar{R}_2}{2} \geq \frac{\bar{R}_3}{3} \geq \cdots \geq \frac{\bar{R}_\ell}{\ell} \geq \cdots \geq \frac{1}{2}	.
\end{equation}

By using these definitions we finally obtain that the coefficients in the power expansion of $ r(p) $ in Eq.~(\ref{alpha_expansion})
\begin{equation}
	\alpha_{\ell}= 2I_\ell\frac{\bar{E}_\ell}{\ell}
\end{equation}
can be seen as the total energy per loss inside the fully-interacting instances. Clearly, given that $ I_\ell $ and $ \bar{E}_\ell $ do not depend on the system size $ N $, the coefficients $ \alpha_{\ell} $ are also independent of the system size. This confirms that the average fraction $ r(p) $ of edges erased from a shrunk lattice depends only on the density of losses $ p $, which is a clear signature of the connection with the percolation theory.

The algorithm that we used to obtain $ I_\ell,\,\bar{R}_\ell,\,\bar{E}_\ell,\,\alpha_\ell $ is described in Section \ref{algorithm}, and the values obtained are summarized in Table \ref{T1}.

\section{Summary of results} \label{sec_results}

We compute the tolerance of the color code under qubit loss in two different ways: (1) searching for percolating strings in the shrunk lattices, and (2) searching for a subset $ \mathcal{G} $ such that the logical operator $ \tilde{l}_q^\sigma $ in Eq.~(\ref{equivalence}) does not have support on the removed qubits.

Regarding (1) we present the main results of this paper: (1.a) we obtain analytically the average fraction of edges erased $ r(p) $ as a function of the qubit loss rate $ p $, and (1.b) from $ r(p) $ we compute analytically the critical loss rate $ p_c $ below which the logical information is protected. (1.c) We also compare $ r(p) $ with numerical simulations. (1.d) Moreover, $ p_c $ is also computed numerically by an scaling analysis.

\begin{figure}[t]
	\centering
	\includegraphics[width=\columnwidth,keepaspectratio]{convergence.pdf}
	\caption{\textbf{Convergence of the first three orders} in the power expansion of the average fraction of edges erased $ r(p) $ for the red shrunk lattice of the 4.8.8~geometry of the color code. We compute analytically the first three coefficients $ \alpha_1,\,\alpha_2,\,\alpha_3 $ in Eq.~(\ref{alpha_expansion}). The dotted line is the first order of the power expansion, the dashed line contains up to the second order, and the continuous line up to the third order. The lines approach the numerical data (red dots) as more orders are added. The numerical data is obtained by a Monte-Carlo sampling of losses at various values of the qubit loss rate $ p $ and a posterior scaling analysis.}
	\label{convergence}
\end{figure}

\begin{figure}[h]
	\centering
	\includegraphics[width=\columnwidth,keepaspectratio]{all_scalings.pdf}
	\caption{\textbf{Critical qubit loss rate $ p_c $ and fundamental qubit loss rate $ p_f $ obtained numerically.} By sampling loss instances with a Monte Carlo method, we compute the values of $ p_c $ (percolation), and $ p_f $ (fundamental) for various code distances $ L $ of the three regular geometries of the color code. The thresholds are plotted as a function of $1/L^{1/\nu}$ with a critical exponent $\nu = 4/3$ as expected from the percolation theory. Red circles, blue squares and green triangles represent the numerical data for the red, blue and green shrunk lattices, respectively. The continuous lines  fit the points and their intercepts (marked with the same symbols as the data) give the critical threshold in the limit $L\to\infty$. In the graphs (a), (b) for the 4.8.8~lattice, the green shrunk lattice is not represented because it has the same geometry as the blue. In (c), (d) the blue and the green shrunk lattices of the 6.6.6~lattice have the same geometry as the red, so only the red is represented. In (e), (f) for the 4.6.12~lattice, the three shrunk lattices are represented.}
	\label{all_scalings}
\end{figure}

In relation to (2), we provide in Section \ref{sec_algebraic} an algebraic technique that efficiently finds a solution $ \mathcal{G} $. (2.a) This technique is used in a scaling analysis to obtain numerically the fundamental qubit loss threshold $ p_f $ of the color code. (2.b) Finally we compare the values of $ p_c $ and $ p_f $ obtained.
\\

(1.a) Using the analysis in Section \ref{shrunk_percolation} and the algorithm in Section \ref{algorithm} we compute the first three expansion coefficients $ \alpha_1,\,\alpha_2,\,\alpha_3 $ of $ r(p) $ in Eq.~(\ref{alpha_expansion}) for the three shrunk lattices of the three regular geometries of the color code (values are summarized in Table ~\ref{T1}). Then (1.b), using the bond-percolation thresholds $ r_c $, we obtain $ p_c $ analytically by solving Eq.~(\ref{critical}) up to third order:
\begin{equation}
r_c=\alpha_1p_c+\alpha_2p_c^2+\alpha_3p_c^3	.
\end{equation}
The values of $ r_c $ and $ p_c $ are summarized in Table \ref{T2}. At the critical point $ r(p)\simeq\alpha_1 p+\alpha_2 p^2 +\alpha_3 p^3 $ crosses the value of the bond-percolation threshold $ r_c $ as we show in Figs.~\ref{thresholds} for the 4.6.12~lattice, and in Fig.~\ref{all} for each of the three shrunk lattices of the three regular geometries of the color code. As one can see in Fig.~\ref{thresholds}, the curves $ r(p) $ for the three shrunk lattices of the 4.6.12~color code lattice are almost superposed. Indeed, the curves of all shrunk lattices of all the geometries of the color code depicted in Fig.~\ref{all} are almost superposed (not shown). This indicates that $ r(p) $ does not depend strongly on the geometry of the shrunk lattice. Therefore, the differences between the values of $ p_c $ in the shrunk lattices depend mostly on their bond-percolation threshold $ r_c $. This shows the strong connection between percolation theory and the tolerance of the color code to qubit loss.

\begin{table*}[t]
	\centering
	\renewcommand{\arraystretch}{2}
	\begin{tabular}{C{5em} | C{4em} C{7em} C{5em} C{6em} || >{\columncolor[HTML]{DCDEFD}}C{6em} >{\columncolor[HTML]{DCDEFD}}C{6em} |>{\columncolor[HTML]{DCDEFD}}C{6em}}
		Geometry& Shrunk	&Geometry			&\multicolumn{2}{c||}{$ r_c  $}					&$ p_c $ an. 	&$ p_c $ num. & $ p_f $	\\
		\hline \hline
		&  Red  	& square 			& $ \frac{1}{2} $	& $ =0.5 $				&$ 0.1877$	& $ 0.2028(7) $ & $ 0.46(1) $			\\
		4.8.8	&  Blue 	& d.b. square 		& $ \sqrt{\frac{1}{2}} $ & $ \simeq0.7071 $		&$ 0.3093$	& $ 0.292(2) $ & $ 0.48(3) $			\\
		&  Green	& d.b. square 		& $ \sqrt{\frac{1}{2}} $ & $ \simeq0.7071 $		&$ 0.3093$	& $ 0.292(2) $ & $ 0.48(3) $			\\

		\hline
		&  Red  	& triangular 		& $ 1-2\sin\frac{\pi}{18} $	& $ \simeq 0.6527 $	&$ 0.2752$	& $ 0.290(2) $ & $ 0.33(1) $			\\
		6.6.6	&  Blue 	& triangular 		& $ 1-2\sin\frac{\pi}{18} $	& $ \simeq 0.6527 $	&$ 0.2752$ &	$ 0.290(2) $ & $ 0.33(1) $			\\
		&  Green	& triangular 		& $ 1-2\sin\frac{\pi}{18} $	& $ \simeq 0.6527 $	&$ 0.2752$	& $ 0.290(2) $ & $ 0.33(1) $			\\

		\hline
		&  Red  	& kagome 			& \multicolumn{2}{c||}{$ 0.4756 $}				& $ 0.1764$	& $ 0.165(1) $ & $ 0.198(2) $			\\
		4.6.12	&Blue		& d.b. triangular  	& $\sqrt{1-2\sin\frac{\pi}{18}}$ & $ \simeq 0.8079 $ &$ 0.3925$	& $ 0.390(5) $ & $ 0.438(9) $			\\
		&  Green	& d.b. hexagonal 	& $ \sqrt{2\sin\frac{\pi}{18}} $ & $ \simeq 0.5893 $& $ 0.2364$	& $ 0.2012(8) $ & $ 0.202(1) $
	\end{tabular}
	\caption{\textbf{Tolerance of the color code.} First column: the three regular color code lattices as depicted in Fig.~\ref{lattices}. Second column: their respective shrunk lattices. Third column: geometry of the shrunk lattices (d.b.~stands for double-bonds). Fourth column: analytical and numerical values of the bond-percolation threshold $ r_c $ of the shrunk lattices. In the shrunk lattices with double-bonds, two bonds need to be erased in order to disconnect two nodes. If we call $ r $ the probability of erasure of a bond connecting two nodes, the probability of disconnecting two nodes that are linked via a double bond is $ r^2 $. Therefore, the bond-percolation threshold $ r_c $ (critical probability of disconnecting two nodes) of a shrunk lattice with double-bonds is the square root of the bond-percolation threshold $ \tilde{r}_c $ \cite{Feng2008} of the lattice with simple bonds $ r_c=\sqrt{\tilde{r}_c} $. For shrunk lattices with single bonds $ r_c=\tilde{r}_c $. Fifth column: critical loss threshold $ p_c $ obtained analytically. Sixth column: critical qubit loss rate $ p_c $ obtained by a numerical scaling analysis. Seventh column: fundamental loss threshold $ p_f $ by a numerical scaling analysis. The number between brackets is the error of the last decimal position.}
	\label{T2}
\end{table*}

(1.c) We also estimate $ r(p) $ numerically by performing a Monte Carlo sampling of qubit loss instances for various values of the qubit loss rate $ p $, and estimate the average number of edges erased to correct every instance with a randomly chosen correction. We consider lattices with the three geometries and with a number of qubits close to $ 4000 $. The numerical points obtained are compared with the analytical $ r(p) $  in Figs.~\ref{thresholds} and~\ref{all}. The error bars are comparable with the point size. In the range $ p\in[0.1,0.4] $ that is relevant to obtain $ p_c $ the maximum difference between the analytical (up to third order) and the numerical values of $ r(p) $ is below $ 6\% $. In Fig.~\ref{convergence} we compare the numerical data with the first three orders of $ r(p) $ to show how the curves approximate the numerical data as more expansion terms are added. Limitations of the numerical analysis like the finite-size effects, or the difficulty of sampling instances with a low number of qubits lost are the main sources of discrepancy between the analytical and the numerical analyses.

(1.d) We also obtain $ p_c $ by means of the scaling analysis depicted in the first column of Fig.~\ref{all_scalings} in the following way: In a code of distance $L$, we compute the critical fraction of losses $p_c(L)$ at which, for the first time, a percolating string ceases to exist. It is known that percolation theory predicts \cite{Stauffer1985} the scaling of $ p_c $ as $ L\rightarrow \infty $ to be $ p_c(L)-p_c(\infty)\propto L^{-1/\nu} $, with the scaling exponent $ \nu=4/3 $. This scaling law is followed also by our data. From it, we obtain numerically the value of the critical qubit loss rate $ p_c $ in the thermodynamic limit (when $ L^{-1/\nu}\rightarrow0 $). The values of $ p_c $ obtained numerically by this scaling method are in great accordance with the values obtained by the analytical analysis as can be seen in Table \ref{T2}: the maximum difference is below $ 8\% $.

(2.a) The same scaling analysis is performed in order to obtain the fundamental loss threshold $ p_f $ (second column of Fig.~\ref{all_scalings}). The only difference is that the percolation check is replaced by checking the existence of subset of generators $ \mathcal{G} $ that are a solution of Eq.~(\ref{equivalence}). This subset $ \mathcal{G} $ transforms the original logical operator into a well-defined new logical operator $ \tilde{l}_q^\sigma $ as described in Section \ref{sec_algebraic}. The resulting values of $ p_f $ show the robustness of color codes under qubit loss: for example, the 4.8.8~geometry can tolerate the loss of the $ 46(1)\% $ of the qubits before the first class of logical operators becomes ill defined, which is close to the $ 50 \% $ limit imposed by the non-cloning theorem.

(2.b) The differences between the values of $ p_c $ and $ p_f $, which are easy to visualize in Fig.~\ref{all_scalings}, can be understood by the relation between the two percolation problems that we consider: the percolation of the three decoupled shrunk lattices (provides $ p_c $), and the generalized percolation of the coupled shrunk lattices (provides $ p_f $). Intuitively, $ p_f $ is higher than $ p_c $ because the shrunk lattices with a low bond-percolation threshold $ r_c $ can branch into the other shrunk lattices to increase their tolerance to the erase of edges. For example in the 4.8.8~lattice the red shrunk lattice has a bond-percolation threshold of $ 1/2 $  while the bond-percolation threshold of the blue and the green shrunk lattices is higher: $ 1/\sqrt{2} $. Then, the possibility of branching increases the critical qubit loss rate of the red shrunk lattice of the 4.8.8~geometry from $ p_c\simeq 0.19 $ to the fundamental threshold $ p_f\simeq 0.46 $. On the other hand, given that a shrunk lattice needs the two other lattices to branch, the maximum that $p_f$ can reach is given by the smallest threshold of the other two shrunk lattices. For example, the red shrunk lattice of the 4.6.12~geometry does not improve its tolerance by much (from $ p_c\simeq0.17 $ to $ p_f\simeq0.20 $) by branching into the blue and the green shrunk lattices (despite that the bond-percolation threshold of the blue shrunk lattice is high: $ r_c\simeq0.81 $ and $p_c \simeq 0.39$) because the green shrunk lattice has a low bond-percolation threshold: $ r_c\simeq0.59 $ and $p_c \simeq 0.24$. The relations between $ p_c $ and $ p_f $ for the different shrunk lattices can be easily visualized in Fig.~\ref{all_scalings}.

\begin{table}
	\begin{flushleft}
		\textbf{Input:} Lattice of the color code, a number $ \ell $.\\
		\textbf{Outputs:} Set $ \mathcal{I}^{(\text{f-i})}_{i_1} $ containing all fully-interacting instances $ \boldsymbol{i} $ that have a loss $ i_1 $ in common and contain from $ 2 $ to $ \ell $ losses, the average number of edges erased $ R_{\boldsymbol{i}} $, and the energy $ E_{\boldsymbol{i}} $.
		\begin{enumerate}[label*=\arabic*.]
			\item Place the central loss $ i_1 $ on a qubit of the lattice. Extract the patch $ \boldsymbol{P} $ of qubits at a distance $ 3(\ell-1) $ from $ i_1 $.
			\item Initialize an empty list $ \mathcal{I}=\{\} $.

			\item For every instance $ \boldsymbol{i}=\{i,i',\ldots\}\subset\boldsymbol{P} $ containing from $ 2 $ to $ \ell-1 $ losses do:
			\begin{enumerate}[label*=\arabic*.]
				\item Compute $ R_{\boldsymbol{i}} $ with Eq.~(\ref{correction_average}).
				\item Compute $ E_{\boldsymbol{i}} $ with Eq.~(\ref{E(R)}), that requires the value of $ R_{\boldsymbol{i}}$ and the values of $ R_{\boldsymbol{j}} $ with $ j\subset i $ that are stored in $ \mathcal{I} $. Recall that for all instances $ \{i\} $ with only one loss, $ R_{\{i\}}=R_1 $ as explained in Section \ref{corrections}.
				\item Append $ \left[\boldsymbol{i},R_{\boldsymbol{i}},E_{\boldsymbol{i}}\right] $ to $ \mathcal{I}$.
			\end{enumerate}
			\item For every instance $ \boldsymbol{i}=\{i_1,i,i',\ldots\}\subset\boldsymbol{P} $ containing $ \ell $ losses (one of them the central loss $ i_1 $) do:
			\begin{enumerate}[label*=\arabic*.]
				\item Compute $ R_{\boldsymbol{i}} $ with Eq.~(\ref{correction_average}).
				\item Compute $ E_{\boldsymbol{i}} $ with Eq.~(\ref{E(R)}), that requires the value of $ R_{\boldsymbol{i}}$ and the values of $ R_{\boldsymbol{j}} $ with $ j\subset i $ that are stored in $ \mathcal{I} $. Recall that for all instances $ \{i\} $ with only one loss, $ R_{\{i\}}=R_1 $ as explained in Section \ref{corrections}.
				\item Append $ \left[\boldsymbol{i},R_{\boldsymbol{i}},E_{\boldsymbol{i}}\right] $ to $ \mathcal{I}$.
			\end{enumerate}
			\item Initialize the output list $ \mathcal{I}^{(\text{f-i})}_{i_1}=\{\} $.
			\item For $ \boldsymbol{i} $ in $ \mathcal{I} $, if $ E_{\boldsymbol{i}}\neq0 $ and $ i_1\in \boldsymbol{i} $, append $ \left[\boldsymbol{i},R_{\boldsymbol{i}},E_{\boldsymbol{i}}\right] $ to $ \mathcal{I}^{(\text{f-i})}_{i_1} $.
			\item Return $ \mathcal{I}^{(\text{f-i})}_{i_1} $.
		\end{enumerate}
	\end{flushleft}
	\caption{Pseudo-code summarizing the main steps to generate all fully-interacting instances $ \boldsymbol{i}\in\mathcal{I}^{(\text{f-i})}_{i_1} $ that contain $ \ell $ losses or less, the average number of edges erased $ R_{\boldsymbol{i}} $, and their energy $ E_{\boldsymbol{i}} $. The coefficients $ \alpha_{\ell} $ in Eq.~(\ref{alpha_expansion}) can be computed from these values with Eq.~(\ref{coefficients2}).}	\label{iterative}
\end{table}

\begin{table*}[t]
	\centering
	\renewcommand{\arraystretch}{2}
	\begin{tabular}{C{4em} C{3em}|C{2em}C{2em}C{2em}>{\columncolor[HTML]{DCDEFD}}C{2em}|C{2em}C{2em}C{2em}>{\columncolor[HTML]{DCDEFD}}C{2em}|C{2em}C{3em}C{2em}>{\columncolor[HTML]{DCDEFD}}C{2em}}
		Geometry& Shrunk	&$I_1$	&$R_1$	&$E_1$	&$ \alpha_1 $	&	$ I_2 $& $ \bar{R}_2 $		& $ \bar{E}_2 $		&$\alpha_2$		&$ I_3 $& $ \bar{R}_3 $		 & $ \bar{E}_3 $		 & $ \alpha_3 $\\
		\hline \hline
		&  Red  &$ 1 $	&$ \frac{5}{3} $	&$ \frac{5}{3} $	&$ \frac{10}{3} $	& $ 11 $&$ \frac{295}{99} $ &$ -\frac{35}{99} $ &$-\frac{35}{9}$&$ 72 $ &$ \frac{3995}{972}$ &$\frac{35}{972}$ & $ \frac{140}{81} $\\
		4.8.8	&  Blue &$ 1 $	&$ \frac{5}{3} $	&$ \frac{5}{3} $	&$ \frac{10}{3} $	& $ 9 $ &$ \frac{233}{81} $ &$ -\frac{37}{81} $ &$-\frac{37}{9}$&$ 102 $&$\frac{5749}{1377}$ &$\frac{95}{2754}$ & $ \frac{190}{81} $\\
		&  Green&$ 1 $	&$ \frac{5}{3} $	&$ \frac{5}{3} $	&$ \frac{10}{3} $	& $ 9 $	&$ \frac{233}{81} $ &$ -\frac{37}{81} $ &$-\frac{37}{9}$&$ 102 $&$\frac{5749}{1377}$ &$\frac{95}{2754}$ & $ \frac{190}{81} $\\

		\hline
		&  Red  &$ 1 $	&$ \frac{5}{3} $	&$ \frac{5}{3} $	&$ \frac{10}{3} $	& $ 11 $&$ \frac{295}{99} $ &$ -\frac{35}{99} $ &$-\frac{35}{9}$& $122 $&$\frac{14161}{3294}$&$\frac{29}{1647}$	& $ \frac{116}{81} $\\
		6.6.6	&  Blue &$ 1 $	&$ \frac{5}{3} $	&$ \frac{5}{3} $	&$ \frac{10}{3} $	& $ 11 $&$ \frac{295}{99} $ &$ -\frac{35}{99} $ &$-\frac{35}{9}$& $122 $&$\frac{14161}{3294}$&$\frac{29}{1647}$	& $ \frac{116}{81} $\\
		&  Green&$ 1 $	&$ \frac{5}{3} $	&$ \frac{5}{3} $	&$ \frac{10}{3} $	& $ 11 $&$ \frac{295}{99} $ &$ -\frac{35}{99} $ &$-\frac{35}{9}$& $122 $&$\frac{14161}{3294}$&$\frac{29}{1647}$	& $ \frac{116}{81} $\\

		\hline
		&  Red  &$ 1 $	&$ \frac{5}{3} $	&$ \frac{5}{3} $	&$ \frac{10}{3} $	& $ 11 $&$ \frac{295}{99} $ &$ -\frac{35}{99} $ &$-\frac{35}{9}$&$ 64 $&$ \frac{7057}{1728} $	&$ \frac{1}{27} $ 	 &$ \frac{128}{81} $ \\
		4.6.12	&  Blue &$ 1 $	&$ \frac{5}{3} $	&$ \frac{5}{3} $	&$ \frac{10}{3} $	& $ 9 $ &$ \frac{233}{81} $ &$ -\frac{37}{81} $&$-\frac{37}{9}$ &$ 91 $& $ \frac{10214}{2457} $&$ \frac{89}{2457} $  &$\frac{178}{81}$\\
		&  Green&$ 1 $	&$ \frac{5}{3} $	&$ \frac{5}{3} $	&$ \frac{10}{3} $	& $ 9 $ &$ \frac{233}{81} $ &$ -\frac{37}{81} $ &$-\frac{37}{9}$&$ 102 $ &$ \frac{5749}{1377} $ &$ \frac{95}{2754} $&$\frac{190}{81}$
	\end{tabular}
	\caption{\textbf{Results for the analytical expansion of $r(p)$}. Representative factors for $ \ell=1,2,3 $ losses for the three shrunk lattices in three regular geometries of the color code. The number of fully-interacting instances is $ I_\ell $, the average number of edges erased by them is $ \bar{R}_\ell $, and the average energy associated is $ \bar{E}_\ell $. The coefficients of the power expansion in Eq.~(\ref{alpha_expansion}) are $ \alpha_\ell $. All these quantities have been obtained analytically without perfoming any approximation.}
	\label{T1}
\end{table*}

\section{Computation of the coefficients $ \alpha_\ell $}	\label{algorithm}
In this Section we provide an algorithm to compute the expansion coefficients $ \alpha_{\ell} $ of $ r(p) $ in Eq.~(\ref{alpha_expansion}). The computation of the first $ \ell $ coefficients as in Eq.~(\ref{coefficients2}) requires the energies $ E_{\boldsymbol{i}} $ of all the fully-interacting loss instances $ \boldsymbol{i}\in\mathcal{I}^{(\text{f-i})}_{i_1} $ that have the loss $ i_1 $ in common and that contain from $ 2 $ to $ \ell $ losses. We explain the algorithm for the case of $ \ell=3 $ losses, and provide the pseudo-code in Table \ref{iterative} for any $ \ell $. The steps of the algorithm are the following:

$ 1. $ Place the central loss $ i_1 $  on a qubit in the lattice and extract a set of qubits  $ \boldsymbol{P} $ (we call it a patch) at a finite distance from $ i_1 $. By the \textit{distance} between two nodes we mean the number of edges in the shortest path that connects these nodes. In order to consider all fully-interacting instances in $ \mathcal{I}^{(\text{f-i})}_{i_1} $ that contain up to $ \ell $ losses it is enough to set a maximum distance of $ 3(\ell-1) $ from $ i_1 $. For $ \ell=3 $, the patch $ \boldsymbol{P} $ contains the qubits that are at a distance $ 6 $ or less from $ i_1 $.

$ 2. $ Initialize an empty list $ \mathcal{I}  $ that will contain the instances from the patch, the number of edges that they erase and the associated energies.

$ 3. $ For every instance $ \{i,i'\}\subset\boldsymbol{P} $ with two different losses one has to compute $ R_{\{i,i'\}} $ from Eq.~(\ref{correction_average}) by averaging the number of edges erased over all possible corrections. Then, with the obtained $ R_{\{i,i'\}} $, one has to compute the energy of the instance $ \{i,i'\}$ that from Eq.~(\ref{E(R)}) takes the form:
\begin{equation}
	E_{\{i,i'\}}=R_{\{i,i'\}}-2R_1.
\end{equation}
Recall that for all instances $ \{i\} $ with only one loss, $ R_{\{i\}}=R_1 $ as explained in Section \ref{corrections}. Append the element $ \left[\{i,i'\},R_{\{i,i'\}},E_{\{i,i'\}}\right] $ to the list $ \mathcal{I}  $.

$ 4. $ For every instance $ \{i_1,i,i'\}\subset\boldsymbol{P} $ with three different losses (one of them the central loss $ i_1 $) one has to compute $ R_{\{i_1,i,i'\}} $ from Eq.~(\ref{correction_average}), then compute the energy of the instance from Eq.~(\ref{E(R)}), that takes the form:
\begin{equation}
E_{\{i_1,i,i'\}}=R_{\{i_1,i,i'\}}-R_{\{i_1,i\}}-R_{\{i_1,i'\}}-R_{\{i,i'\}}+3R_1
\end{equation}
where we used again that for all instances $ \{i\} $ with only one loss, $ R_{\{i\}}=R_1 $. Note that the values of $ R_{\{i_1,i\}}$, $R_{\{i_1,i'\}}$, $R_{\{i,i'\}} $ are stored in $ \mathcal{I} $ for every $ i,i'\in\boldsymbol{P} $. Append the element $ \left[\{i_1,i,i'\},R_{\{i,i'\}},E_{\{i,i'\}}\right] $ to the list $ \mathcal{I}  $.

Finally, from the list $ \mathcal{I}  $, extract only those instances that contain the central loss $ i_1 $ and have non-zero energy. These constitute the set $ \mathcal{I}^{(\text{f-i})}_{i_1} $ that can be used to compute the coefficients $ \alpha_2 $ and $ \alpha_{3} $ with Eq.~(\ref{coefficients2}).

\section{Fundamental threshold for qubit loss}\label{sec_algebraic}
In this section we describe the algebraic technique employed to determine the existence of well-defined logical operators that do not have support on the set of removed qubits. This technique, which can be used to compute the fundamental qubit loss threshold $ p_f $,  determines efficiently if there exists a subset $ \mathcal{G} $ of generators such that the logical operator $ \tilde{l}_q^\sigma $ in Eq.~(\ref{equivalence}) does not have support on the set of removed qubits $ \boldsymbol{r} $ by mapping this problem to a system of linear binary equations. Furthermore, we prove the following statement: \textit{given a set of removed qubits $ \boldsymbol{r} $, the logical information is protected if and only if $ \boldsymbol{r} $ does not contain the support of any logical operator.}

\subsection{Algebraic technique}
Here we map the problem of finding $ \mathcal{G} $ to a system of linear binary equations. Without loss of generality we can choose the logical operator $ l_q^\sigma $ in Eq.~(\ref{equivalence}) as composed of Pauli operators of just one type $ \sigma $, like in Eq.~(\ref{logical}), where $ \boldsymbol{s}_q^\sigma $ is the set of qubits where $ l_q^\sigma $ has support. When a logical operator $ l_q^\sigma $ composed by Pauli operators of just one type $ \sigma $ is multiplied by generators of another type $ \sigma'\neq\sigma $, the support $ \boldsymbol{s}_q^\sigma $ of the new operator $ \tilde{l}_q^\sigma $ contains the support of $ l_q^\sigma $: $ \tilde{\boldsymbol{s}}_q^\sigma\supset\boldsymbol{s}_q^\sigma $, so if a removed qubit is in $ \boldsymbol{s}_q^\sigma $ it will also be in $ \tilde{\boldsymbol{s}}_q^\sigma $ and the multiplication with generators of other type $ \sigma' $ will be ineffective.

As a consequence, we can restrict the subsets $ \mathcal{G} $ that multiply $ l_q^\sigma $ in Eq.~(\ref{equivalence}) to those subsets that only contain generators of the same type $ \sigma $. If the subset of faces where the generators of $ \mathcal{G} $ are defined is $ \mathcal{X} $, the support of $ \tilde{l}_q^\sigma $ is then given by:
\begin{equation}	\label{equivalence_sets}
\tilde{\boldsymbol{s}}_q^\sigma=\boldsymbol{s}_q^\sigma\bigoplus_{\boldsymbol{f}\in\mathcal{X}}\boldsymbol{f}
\end{equation}
where the symbol $ \oplus $ indicates the symmetric difference between sets: $ \boldsymbol{a}\oplus \boldsymbol{b}=(\boldsymbol{a}\cup \boldsymbol{b})\setminus(\boldsymbol{a}\cap \boldsymbol{b}) $. The symmetric difference comes from the fact that $ \sigma^n=\sigma $ for odd $ n $ and $ \sigma^n=I $ (the identity operator) for even $ n $. For simplicity, from now on we drop the indices $ q,\sigma $.

Given a set of removed qubits $ \boldsymbol{r} $, a logical operator $ \tilde{l}_q^\sigma $, defined on the string $ \tilde{\boldsymbol{s}} $, has non-empty support on $ \boldsymbol{r} $ if $ \tilde{\boldsymbol{s}} $ intersects $ \boldsymbol{r} $, i.e., if $ \boldsymbol{r}\cap\tilde{\boldsymbol{s}}\neq\emptyset $. Therefore, the logical information still exists if there is a subset of faces $ \mathcal{X} $ for which:
\begin{equation}\label{sets_system}
	\boldsymbol{r}\cap\left( \boldsymbol{s}\bigoplus_{\boldsymbol{f}\in\mathcal{X}}\boldsymbol{f}\right) =\emptyset	.
\end{equation}

In order to map Eq.~(\ref{sets_system}) to a system of linear equations let us first define the binary vectors and matrices that represent the sets appearing in the equation. Recall that $ N $ is the number of qubits and $ F $ the number of faces. Then:
\begin{itemize}

	\item The set of all faces is represented by a $ N\times F $ matrix $ \mathbb{F} $ whose elements are $ \mathbb{F}_{i\boldsymbol{f}}=1$ if the qubit $ i $ is in the face $ \boldsymbol{f} $ and $0$  otherwise.
	\item A string $ \boldsymbol{s} $ is represented by a $ N\times 1 $ column vector $ \mathbb{s} $ whose elements are $ \mathbb{s}_{i}=1$ if the qubit $ i $ is in $ \boldsymbol{s} $ and $0$  otherwise.
	\item The subset $ \mathcal{X} $ of faces is represented by a $ F\times 1 $ column matrix $ x $ whose elements are $ x_{\boldsymbol{f}}=1 $ if the face $ \boldsymbol{f} $ is in $ \mathcal{X} $ and  $0$  otherwise.

\end{itemize}

The symmetric difference between sets is mapped to the summation modulo 2 of binary vectors and matrices. Then, Eq.~(\ref{equivalence_sets}) is mapped to the following binary matrix operations:
\begin{equation}
	\tilde{\mathbb{s}} = \mathbb{s} + \mathbb{F}x
\end{equation}
where $ \mathbb{F}x $ is the usual matrix product performed modulo 2.

The intersection between sets is mapped to the element-wise product $ \mathbb{r}\circ\tilde{\mathbb{s}} $ of binary vectors, i.e., another $ N\times 1 $ column vector where the $ i $-th element is the product $ \mathbb{r}_i\tilde{\mathbb{s}}_{i} $. Then, Eq.~(\ref{sets_system}) is mapped to
\begin{equation}
	\mathbb{r}\circ\left( \mathbb{s} + \mathbb{F}x\right) =0	,
\end{equation}
which can be written in the standard form of a system of linear equations as:
\begin{equation}\label{system}
	\left( \mathbb{r}\circ\mathbb{F}\right)x = \mathbb{r}\circ\mathbb{s}	.
\end{equation}
Here $ \mathbb{r}\circ\mathbb{F} $ is a $ N\times F $ matrix whose elements are the product $ \left[\mathbb{r}\circ\mathbb{F}\right]_{i\boldsymbol{f}}=\mathbb{r}_i\mathbb{F}_{i\boldsymbol{f}} $.

Finally, the search of a logical operator without support on the removed qubits is equivalent to finding a solution $ x $ of the linear system in Eq.~(\ref{system}). This system can be efficiently solved by Gauss elimination, in a time that scales as $ \sim N^3 $ or better.

\subsection{Necessary and sufficient condition for the existence of the logical information}
Here we prove that \textit{given a set of removed qubits  $ \boldsymbol{r} $, there exists a logical operator for every class $\{q,\sigma\}$ without support on the removed qubits if and only if $ \boldsymbol{r} $ does not contain the support of a logical operator}. We use the notation defined after Eq.~(\ref{sets_system}).

Let us start by assuming that $ \boldsymbol{r} $ includes the support of a logical operator $ l_q^\sigma $ and prove that all the logical operators $ l_q^{\sigma'} $ of other type $ \sigma'\neq \sigma $ have non-empty support on $ \boldsymbol{r} $. The logical operator $  l_q^{\sigma} $ anticommutes with all logical operators $ l_q^{\sigma'} $ of the class $ \{q,\sigma'\} $. Consequently the support of $  l_q^{\sigma} $ and the support of every logical operator $ l_q^{\sigma'} $ have some qubits in common. As a consequence, all logical operators $ l_q^{\sigma'} $ have non-empty support on the set of removed qubits, and therefore, the class $ \{q,\sigma'\} $ is not well defined.

Now we assume that the logical information does no longer exist, i.e., the system of Eq.~(\ref{system}) does not have a solution, and prove that the set of removed qubits represented by $ \mathbb{r} $ includes a logical operator. If the system has no solution, the rank of the augmented matrix is bigger than the rank of the matrix $ \mathbb{r}\circ\mathbb{F} $:
\begin{equation}\label{rank_inequality}
	\text{rank}\left( \mathbb{r}\circ\left[ \mathbb{F}\;\;\mathbb{s}\right] \right) > \text{rank}\left( \mathbb{r}\circ\mathbb{F} \right)	.
\end{equation}

By the rank-nullity theorem, the rank of any matrix $ A $ is the number of rows $ m $ minus the number of linearly independent column vectors $ \mathbb{v} $ that cancel it from the left: $ \mathbb{v}^TA=0 $. From Eq.~(\ref{rank_inequality}) this means that the matrix $ \mathbb{r}\circ\mathbb{F} $ has at least one more vector $ \mathbb{v} $ that cancels it from the left than the matrix $ \mathbb{r}\circ\left[ \mathbb{F}\;\;\mathbb{s}\right] $. Note that every vector that cancels $ \left[ \mathbb{F}\;\;\mathbb{s}\right] $ from the left also cancels $ \mathbb{F} $ from the left. Then, this vector satisfies that:
\begin{eqnarray}
	\mathbb{v}^T \left( \mathbb{r}\circ\mathbb{F} \right) = 0 \\
	\mathbb{v}^T\left( \mathbb{r}\circ\left[ \mathbb{F}\;\;\mathbb{s}\right] \right)\neq 0
\end{eqnarray}
or equivalently:
\begin{eqnarray}
	\mathbb{v}^T \left( \mathbb{r}\circ\mathbb{F} \right) = 0 \\
	\mathbb{v}^T\left( \mathbb{r}\circ\mathbb{s} \right)\neq 0
\end{eqnarray}
By using the commutation of the element-wise product $ \circ $ with the usual matrix product, we get that:
\begin{eqnarray}
\left( \mathbb{v} \circ\mathbb{r}\right)^T\mathbb{F}  = 0 \\
\left(\mathbb{v}\circ \mathbb{r}\right)^T\mathbb{s} \neq 0
\end{eqnarray}
which means that the vector $ \mathbb{v} \circ\mathbb{r} $ has an even number of qubits in common with the support of all generators represented by $ \mathbb{F} $, but an odd number in common with the support of the logical operator $ l_q^\sigma $ represented by $ \mathbb{s} $. The only possibility is that $ \mathbb{v} \circ\mathbb{r} $ is the support of a logical operator $ l_q^{\sigma'} $ of the class $ \{q,\sigma'\} $.

Given that if $ (\mathbb{v} \circ\mathbb{r})_i=1 $, then $ \mathbb{r}_i=1 $, the column vector $ \mathbb{r} $ represents a set of qubits $ \boldsymbol{r} $ that contains the support of the logical operator $ l_q^{\sigma'} $. Hence, we prove the statement in both logical directions.

\section{Conclusions and outlook} \label{conclusions}

In this work we have explored a connection between statistical mechanics and QEC arising from the study of qubit loss in the topological color code. Here the problem of determining the robustness of the code to qubit loss is mapped to a novel classical percolation problem on coupled lattices as recently proposed in \cite{Vodola2018}. By exploring this connection we have determined analytically the tolerance of the color code to qubit loss.

The main goal of this paper is to obtain analytically the critical qubit loss rate $ p_c $ below which the logical information in the color code is still protected. We have shown that $ p_c $ is related to the bond-percolation threshold $ r_c $ of the shrunk lattices of the color code through the equation $ r(p_c)=r_c $, where $ r(p) $ is the average fraction of edges erased at a qubit loss rate $ p $. We have developed a technique to systematically obtain the expansion coefficients of $ r(p) $, and we have presented an algorithm to calculate the values of these coefficients. We have computed the first three of these coefficients and found agreement with the numerical estimations.

Moreover, the fundamental loss threshold $ p_f $ of the three regular geometries of the color code has been computed numerically. Our results confirm the high robustness to qubit loss of the color code together with the protocol to correct qubit losses \cite{Vodola2018}, which is of practical relevance for actual and future quantum processors. Furthermore, in this paper we have proven that the logical information still exists after correcting the qubit losses if and only if the set of lost and sacrificed qubits together does not include the support of a logical operator.

Our work establishes the theoretical framework that might serve as a basis for future extensions of the protocol to correct losses. For example, the sacrificed qubits could be selected following global criteria that take into account the positions of all losses. Other extensions of the protocol could involve addressing more complex error models, e.g. taking into account possible (spatial) correlations between loss events, the imperfect identification of their positions, and the combined presence of qubit loss, computational, and measurement errors.

\begin{acknowledgments}
	We acknowledge support by U.S. A.R.O. through Grant No. W911NF-14-1-010. The research is also based upon work supported by the Office of the Director of National Intelligence (ODNI), Intelligence Advanced Research Projects Activity (IARPA), via the U.S. Army Research Office Grant No. W911NF-16-1-0070. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the ODNI, IARPA, or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright annotation thereon. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the view of the U.S. Army Research Office. We acknowledge the resources and support of High Performance Computing Wales, where all the simulations were performed.
\end{acknowledgments}

redpajama_set_name: RedPajamaArXiv


text:
Polska wersja
Honorary Consulate of the Republic of Iceland in Warsaw
www.iceland.is
Skógafoss
Svartsengi
Ambassador of Iceland in Poland Mr Martin Eyjólfsson presented his credentials to President of Poland.
On Thursday, October 6 Ambassador of Iceland in Poland Mr Martin Eyjólfsson presented his credentials to President of Poland Mr Andrzej Duda during a formal ceremony at the Presidential Palace.
Ambassador of Iceland meets with Deputy Minister of Foreign Affairs Jan Dziedziczak
Secretary of State Jan Dziedziczak received Martin Eyjólfsson, the new Ambassador of the Republic of Iceland to Poland on 6 September.
Ambassador of Iceland meets with Deputy Minister of Maritime Economy and Inland Navigation Paweł Brzezicki
Undersecretary of State Paweł Brzezicki received Martin Eyjólfsson, the new Ambassador of the Republic of Iceland to Poland on 6 September.
Honorary Consulate of the Republic of Iceland
Ul. Parkowa 13/17/123
szemioth@ihc.waw.pl
By using our website you consent to our use of cookies, some of which may have already been set on your device. To learn more check out our Privacy Policy.

redpajama_set_name: RedPajamaCommonCrawl


SharePoint online search is showing the name of the person who modified the document rather then who created it when I use the CreatedBy managed property.
how can I show only the created by value and not modified by in search?
what does Office:4 mean as a crawled property?
Not the answer you're looking for? Browse other questions tagged sharepoint-online managed-property sharepoint-search or ask your own question.
Which crawled property for last modifiers account name or email address?


As a young girl who grew up under magnanimous care and freedom, Bizuhan Endale enjoyed having her family around. She cherished the time she had with them and the warmth they gave her, until she reached a point where she came head to head with societal values and accepted norms.
Bizuhan was not your typical girl. Her heart was in another place; she was made to run off with the boys in her neighborhood, to the football fields with the boys in her neighborhood and play all day long. Soon she was to be immersed in her football obsession, a game that is believed to have driven millions crazy. She was smacked in the head, pinched, and scolded many times for her love of the game but never once thought about quitting, which created a serious dispute with her parents.
"Thanks to my older brother who supported me, after the sudden death of my father, my mom started to see and then accepted my passion for soccer," she says.
Cutting your hair in a short, matuta style, wearing fashionably shredded pants, and looking like a body builder is what has been long thought revealing of sportswomen, particularly that of women footballers in Ethiopia. For deviating from what is considered to be normal behavior for young girls in Ethiopia, women football players face social problems in their day-to-day lives. Men, elder members of society, and parents in all social strata were vehemently disrespectful to young women footballers for various reasons. Traditional thinking, lack of awareness and poor sporting facilities remain the most critical challenges to women football players in Ethiopia. These factors impacted the sport for years, to some extent this very sport remains one of the classical sectors where gender inequality is stifled in the country.
Despite various historical accounts revealing the country's ancient civilization in art, architecture, trade and governance, attaching the right value to women and their role in all of these was lagging far behind. Although the country had woman parliamentarians, artists, patriots and others in the past, the sport sector did not witness a female heroine until the likes of Derartu Tulu, who stood out at the Barcelona Olympics in 1992, winning a gold medal in the 10000m. race. This historic victory, although she was not the first woman to participate in the Olympic games, made her the first black African woman to win an Olympic gold medal in a long distance race. Her immense contribution in inspiring women to participate in sports also makes her a symbolic figure in the country. This huge impact has long taken root in her winning cousins, the Dibaba sisters, Terunesh Dibaba and Genzebe Dibaba.
Nonetheless, Ethiopia's football is nowhere near the achievements of its athletics, both in the men and women categories. A country that founded the African Cup of Nations (CAF) along with Egypt and Sudan in 1957 is still struggling to find a top-ten spot in continental tournaments. Nevertheless, the recent triumph that saw the country back in its place in the African Cup of Nations, after thirty-one years of absence, enormously motivated the general public. As a result, the Ethiopian Football Federation took an aggressive step to develop both men's and women's football in the country. Part of this was to commission a stronger female national football league known as the Women's Premier League. "This is the time that proudly witnesses our struggle," Bizuhan reflects.
Being a captain of the National Women Football Team, nicknamed "Lucy" in reference to the Australopithecus fossil discovered in the Afar regional State in 1974 by Donald C. Johnson, the national team gave Bizuhan the opportunity to live her childhood dream; the dream of being a famous woman footballer. Captain of her club side, Commercial Bank Women Football Club, and still maintaining her position in the national team, she plays an important role in mentoring youngsters. In fact, the history of women's soccer in Ethiopia dates back to the seventies as there were several amateur clubs playing at the time. Including the then most popular, Etu mela michi, roughly translated as a woman of solutions, few governmental and public organizations had women's football teams in the capital championship.


I was 15 when I got pregnant. I didn't even know how to change a diaper and now here I was having a baby. I was scared and confused out of my mind: what would become of me? I had a rough pregnancy; I was always sick and depressed. My baby was born premature and only weighed 4lbs. 11oz. I cried every time I had to enter the NICU. It made matters worse for me to hear things such as 'What is this little girl doing having a baby?' You just learn to ignore people.


text:
Person in custody dies in public hospital
A person in custody in Lai Chi Kok Reception Centre died in a public hospital today (February 9).
At about 5.01pm yesterday, the 52-year-old newly admitted male person in custody suddenly collapsed with convulsion while undergoing the admission procedure in the reception office.
Officers at scene immediately sent him to the centre hospital for first aid treatment, and subsequently sent him to a public hospital for medical treatment. He was found semi-unconscious at the time with symptom of intra-cranial haemorrhage and was certified dead at 00.04am today.
The case has been reported to the Police. A death inquest will be held by the Coroner's Court.
The person in custody was sentenced to imprisonment for two months for an offence of theft.
Ends/Sunday, February 9, 2014


Mary S. Roberts Pet Adoption Center is participating in "Clear the Shelters," a day-long adoption event promoted by NBC 4 Los Angeles and Telemundo 52 Los Angeles.
On Saturday, August 18th, the adoption fee for dogs and cats will be reduced to $20.00! Check out our adoption procedures to learn more info on what to bring, what to expect, what to consider.
For more questions please reach out to Katie Pickett at 951-688-4340 Ext. 305.


text:
The Children's Partnership Applauds Governor Newsom for Prioritizing Children and Positioning California for a Healthier Generation in Proposed Budget
Los Angeles – Governor Gavin Newsom's proposed budget for FY 2019-20 makes significant strides in prioritizing children and the health of California families. In his first budget, Governor Newsom makes clear his commitment to a stronger California that is inclusive, affordable and that will create a healthier generation of Californians.
"Our shared priority across the state must be the wellbeing of our children. Smart and concrete upfront investments in children's healthcare can demonstrably move the needle on the long-term health of children and families and that of the State," said Mayra E. Alvarez, President of The Children's Partnership, a statewide advocacy organization that focuses on children's health and wellbeing. "We thank Governor Newsom for prioritizing the programs and services that support children, and applaud his bold commitment to strengthening health services and coverage for all California families."
The January budget takes critical steps toward addressing the early needs of children through investments in child care, home visiting, parental leave, and promotion of important early developmental screenings for young children. Further, the Budget proposes to build on the progress made through the Affordable Care Act by making insurance more affordable, expanding health coverage for young undocumented immigrant adults, and increasing the negotiation powers of the state when it comes to drug prices. In doing so, the Governor positions California for making leaps in improving the health of California's children and families.
"California's children—half of whom are part of an immigrant family—are direct beneficiaries of the state's commitment to its diverse constituency. From leading efforts to implement the Affordable Care Act to securing important program investments for immigrant communities, California can provide an example of the critical importance of state and local action to continue to advance as a nation," Alvarez continued. "We look forward to working with the Governor, his Administration, and the new Legislature to elevate the needs of children, particularly those who have been historically marginalized. Together, we can ensure every child is healthy, safe, and ready to learn and prove once again that California is leading the nation."
The Children's Partnership will continue to advocate to protect and advance the gains of the Affordable Care Act and seek opportunities to build on the Governor's first budget by advocating for advanced quality and access solutions, which include smart and expedited pathways to enrollment such as express enrollment from nutrition programs like WIC to Medi-Cal for pregnant women and young children; telehealth and strengthening Medicaid to incentivize early childhood development; and support for integration of health services in community settings. The health care system is the first point of contact in most children's lives, and healthy early development can have the most profound impact on children, today and in the future. As we reflect on the two decades of progress made toward inclusion and equity – from Proposition 187 to Health4All Kids to Governor's Newsom's first budget – we remain hopeful in our shared commitment to the future of all our children and look forward to working together to put our values into action.
hakop


text:
Q: Php form validation is not working I've a html registration form where I set validation with php. It's doesn't work. If I put this function in my signup.php form then it's not working. But when i remove this function inputvalid() then it's working.
Function.php page
function inputvalid($para){
mysql_real_escape_string(htmlspecialchars(trim($para)));
return;
}

Signup.php page
$fname = inputvalid($_POST['fname']);
$lname = inputvalid($_POST['lname']);

If it's
$fname = $_POST['fname'];

then it's working. Why this happened?

A: add return keyword to return some value from your function
function inputvalid($para){
    return mysql_real_escape_string(htmlspecialchars(trim($para)));
}

A: You are not returning anything from your function, use like this,
function inputvalid($para){
  return mysql_real_escape_string(htmlspecialchars(trim($para)));
}

redpajama_set_name: RedPajamaStackExchange


Grace Baptist Fellowship is led and cared for by our pastors, elders, and deacons.
Although Delaine was born in Chicago, he grew up in the San Francisco Bay Area. He was raised in a Christian home where God's Word was taught and honored. At the age of five, in a family quiet time, he asked Jesus to come into his heart and life. Even in those early years he felt called to a full-time ministry. Delaine met Emily Rathbun in their sophomore year of high school and continued to date until they both graduated from Los Angeles Baptist College in 1975. A few weeks later they were married and in 1980 Delaine graduated with a MDiv from Talbot Seminary. With a new son, Emily and Delaine began their first ministry in Port Angeles, Washington. In 1987, the Baileys felt called to come and minister at Grace Baptist. By then they had added a daughter and a few years later, another son came along. Since then, the Baileys have watched the emergence of another generation which includes seven grandchildren. Delaine is committed to sharing the Word in a clear, practical way.
Grace Baptist Fellowship is a healthy, established, and blessed church looking for a pastor to join our team and shepherd our people in worship.
desire to use your gifts to serve the local church?
love leading people in worship?
have a strong voice and musical instrument skills?
Then we would love for you to apply for the Pastor of Worship and Media position at Grace Baptist Fellowship in Lynden WA.
Job description: This is a full time position (minimum of 40 hours a week) with the following responsibilities: Lead worship portion of all services, prepare music for all worship services, prepare worship teams for services, plan special musical events, organize accompanist and special music schedules and assist in other areas of ministry as needed. Media responsibilities will include the oversight of hardware and software acquisition, installation, training and maintenance, as well as applying graphic design and editorial skills to both our print and web-based media.
This position requires a commitment (subscribe unreservedly) to Grace's doctrinal position and philosophy of ministry. It also requires a commitment to work closely with the Senior Pastor and submit to the leadership of the church board.
Education: Must be able to demonstrate a thorough knowledge of the Scriptures as they apply to today's world with a Bachelor's level degree focused on Biblical studies and ministry from a Biblical and theological sound institution of higher learning preferred. Formal training in both vocal and instrumental music is also preferred. Must have a level of music knowledge that enables him to communicate with a variety of instrumentalists including piano, keyboard, violin, drums and guitar.
Music philosophy: Must have an appreciation for great Christian music from all eras which naturally leads to a blended music style where all members of the family (young and old) are honored. Songs sung should be theologically accurate and direct hearts toward Biblical truth and the one true God.
Should have a clear music sense and passion for God that draws people to join him in genuine worship. Should be warm, comfortable, and musically gifted in up front leadership. Also should be committed to recruiting, disciplining, developing and utilizing singers and accompanists from members of the fellowship.
Experience: Should have a minimum of three years of significant worship leadership experience. Experience in a variety of worship style environments is a big plus. A demonstration video will be required.
Should have significant skill and gifting in both singing and in playing at least one primary instrument that can be utilized in leading worship. An understanding of how different instrumentalists work together effectively is required. Some preference will be given to candidates who have skills in playing a variety of instruments and leading choral music.
Should have technical skills (or the ability to learn how) to utilize a wide variety of equipment including computers, sound systems, video projection equipment and software, digital audio recording, networking, etc. in both macOS and Windows environments.
Should be proficient in the following programs: Microsoft Office (Word, Powerpoint, Publisher, Excel), Proclaim presentation software, Finale (or equivalent) music notation software, Adobe Photoshop and Premiere or equivalent software. Should also be familiar with CCLI Songselect.
Personal qualities: Should emphasize a warm, consistent quiet time with God. Make the study of God's Word a priority. Maintain a loving, shepherd's heart, if married, be a loving husband and leader who makes marriage and family a priority and live a life of integrity and high moral standards in the community.
Born in Florida and attending his first mission trip at the age of 9 months, Brian was involved in ministry at a young age. At the age of three Brian gave his life to the Lord and has grown up around the church and missions his whole life. After Brian's family moved to Lynden, WA when he was nine, he eventually met Jessica Verbree in the 8th grade at Lynden Middle School in band class. He had a crush on her from the first time she spoke to him. Brian and Jessica both attended Moody Bible Institute in Chicago and were married in the summer of 2004. Their first daughter was born one day before Brian officially graduated from Moody Bible Institute, July 28th, 2005. Brian graduated with a Bachelor of Arts in Youth Ministry and a minor in Bible. Brian began serving as the intern at Grace Baptist in June of 2005 and in October of the same year the church voted him in as new youth pastor. Brian and Jessica were so delighted because they had always wanted to minister in a church where they grew up and desired to be close to their family. Speaking of family, the Stuarts have five daughters. Brian and Jessica love it at Grace and are excited with what God is doing.
When in high school, Bill sensed that the Lord was directing him into full-time Christian ministry. After he graduated, he got his Bachelor of Arts in Theology at Multnomah School of the Bible in May of 1987. On June 1, 1987, Bill began his ministry at Grace Baptist Fellowship as a youth intern. That October, having just hired a senior pastor, the church voted to make his position a full-time, permanent position. He served at Grace for over twelve years. In 1992, the chairman of the elder board at the time, contacted Bill and told him about a young lady who was starting a business in one of his rental buildings. At the same time, he contacted her suggesting she meet Bill. Not wanting to let him down, Adria agreed to meet Bill. They were married on July 25, 1992. Bill and Adria's family began growing the next year with the birth of their first daughter, later followed by another daughter and a son. Starting in 1993, Bill began pursuing his Master of Theological Studies degree and graduated with that degree in 1998. At the turn of the millennium, Bill and Adria accepted a position as the Senior Pastor in Brownsville, Oregon. God graciously answered their request to be near family and allowed them to return to Whatcom County and minister in Bellingham for over four years. In December of 2006, Bill accepted the position of Pastor of Adult Ministries at Grace for "Grace Baptist Fellowship: Round Two". Both Bill and Adria are excited about the possibility of the church making a significant impact in this community and desire to do everything they can to make it happen. Bill loves teaching, leading, discipleship and the opportunity to be a part of the lives of men in the church.


text:
France to close Havre power plant by April 2021
Date posted: 20th Jan 2020
Patrick Lavery
Combustion Industry News Editor
France's energy ministry has announced that the Havre coal-fired power plant is to close on 1 April next year, in line with the government's plan to end coal firing in the country by the close of 2022. Only 2.94 GW of capacity remains operating in France, the Havre plant constituting 580 MW of it; two other 580 MW units at Cordemais are planned to be converted to fire biomass, while the Emile Huchet 6 and Provence 5 plants, constituting 1200 MW together, seem destined for closure by the end of 2022. The end of coal firing in France has not met with as much attention as the planned ends in the UK or in Germany, mostly because it has long comprised only a small fraction of France's total capacity, most being nuclear.
Kenyan court revokes environmental approval for coal-fired plant amid protests
North Korea to focus on coal in push to develop economy
C-Capture appoints Tom White new CEO