Efficient and robust certification of genuine multipartite entanglement in noisy quantum error correction circuits

Ensuring the correct functioning of quantum error correction (QEC) circuits is crucial to achieve fault tolerance in realistic quantum processors subjected to noise. The first checkpoint for a fully operational QEC circuit is to create genuine multipartite entanglement across all subsystems of physical qubits. We introduce a conditional witnessing technique to certify genuine multipartite entanglement (GME) that is efficient in the number of subsystems and, importantly, robust against experimental noise and imperfections. Specifically, we prove that the detection of entanglement in a linear number of bipartitions by a number of measurements that also scales linearly, suffices to certify GME. Moreover, our method goes beyond the standard procedure of separating the state from the convex hull of biseparable states, yielding an improved finesse and robustness compared to previous techniques. We apply our method to the noisy readout of stabilizer operators of the distance-three topological color code and its flag-based fault-tolerant version. In particular, we subject the circuits to combinations of three types of noise, namely, uniform depolarizing noise, two-qubit gate depolarizing noise, and bit-flip measurement noise. We numerically compare our method with the standard, yet generally inefficient, fidelity test and to a pair of efficient witnesses, verifying the increased robustness of our method. Last but not least, we provide the full translation of our analysis to a trapped-ion native gate set that makes it suitable for experimental applications.


I. INTRODUCTION
The continued effort to control quantum systems with ever increasing accuracy has led to various quantum processors [1], comprising tens of qubits and, more recently, to the demonstration of quantum supremacy [2]. However, in the mid-and long-term, an important goal towards real-world applications of quantum computation is to demonstrate faulttolerance (FT) with low resources [3,4]. Quantum error correction (QEC) [5][6][7] is a building block of the FT theory [8,9] the purpose of which is to protect the encoded information from the detrimental accumulation of errors by detecting and correcting them along with the computation. A current goal in this direction is to reach the break-even point where FT-QEC demonstrates advantage over computations with bare physical qubits. An initial proposal to attest this benchmark in nearterm devices was to compare the performance of a family of QEC circuits acting on logical qubits with the best-possible counterparts using unencoded physical qubits [3]. We note, however, that any attempt towards the rigorous demonstration of FT must first ensure that QEC circuits function correctly.
While physical qubits and gates can be characterized using different techniques, e.g. spectroscopic and interferometric methods extracting the coherence times [10], and randomized benchmarking or process tomography characterizing gate performances [11,12], an efficient characterization for mediumsized registers and circuits that implement QEC protocols is still lacking. Simulating such circuits for general noise and nontrivial-size encondings to demonstrate this break-even * Electronic address: andrer22@ucm.es point is computationally very demanding, even in the light of the recent result by Beale and Wallman [13] wherein the computational cost of effective-logical-noise simulation is significantly reduced. Alternative milder criteria for a quantitative evaluation of the performance of QEC circuits show that the requirements to demonstrate beneficial QEC are at reach of near-future quantum platforms, e.g. using trapped ion quantum processors [4,14,15]. Nonetheless, prior to the development of such optimal full codes for QEC, which must function in the vicinity of FT thresholds, it would be desirable to leverage the currently available noisier devices, e.g. by analysing the performance of building blocks of QEC codes.
To achieve this goal, we note that the capacity to generate entanglement lies at the very heart of QEC protocols, since preparation circuits of encoded logical states [16,17], and syndrome readout schemes [14,18,19], generate genuinely multipartite entangled (GME) states. On the same note, the necessity of unbounded GME to obtain an advantage in any quantum computation algorithm was noted by Jozsa and Linden [20]. As a result, certifying GME serves as a fundamental benchmark in the progress towards FT quantum computation with noisy quantum processors.
In general, verifying GME is a daunting task, which can be understood from the following four points. Theoretically, GME detection requires certifying entanglement within all possible bipartitions of a multipartite system. The number of bipartitions, however, grows exponentially with the number of subsystems. This implies that, in general, the required number of bipartite entanglement tests increases exponentially with the addition of every subsystem. Furthermore, certifying bipartite entanglement in its own is known to be NPhard [21,22]. From an experimental perspective, not every theoretically-conceived measurement can be implemented in practice, calling for the compliance of entanglement certification methods with such limitations. In addition, experiments suffer from imperfections that may reduce the capabilities of naive theoretical schemes of entanglement detection considerably. It is thus necessary to devise and continuously improve efficient GME certification methods.
An elegant approach that addresses these four challenges to a reasonable extent is entanglement witnessing [23][24][25][26][27]. An entanglement witness is an observable for which a negative expectation value in a given state indicates that the state is necessarily entangled. Interestingly, entanglement witnesses can be constructed from local and experimentally-friendly observables [28], and further optimized to show some degree of noise resilience [25,29,30]. In particular, the guaranteed existence of a witness for each entangled state makes witnesses extremely useful in experiments [23]. Nevertheless, in multipartite scenarios, there seems to be a trade-off between the finesse of entanglement witnesses and the number of measurements needed to carry them out. Specifically, as will be discussed in detail below, the standard method of GME certification using a single witness [26,28], reduces the exponential growth of the required number of bipartitions and measurements to a linear one by trading the individual bipartitions for the convex hull of all biseparable states, and detecting those states outside this convex hull. This advantage comes at a price, namely, a significant reduction in the robustness of the witness against experimental imperfections.
In this work, we introduce conditional entanglement witnessing, a witnessing technique that combines ideas from localizable entanglement [31] with entanglement witnessing, in order to reduce the exponential complexity of the GME detection to a linear number of tests while, at the same time, achieving a remarkable robustness against noise and errors. Our approach facilitates the detection of GME in quantum states that, although lying within the convex hull of biseparable states, remain masked to the single-witness approach.
We prove that the separation between any quantum state and only a linear number of conditional biseparable sets suffices for the purpose of certifying GME in that particular state. Due to the fact that for each individual bipartition the corresponding set of biseparable states is delimited closely by the convex set of conditional biseparable states, our conditional witnesses allow for a finer state discrimination between GME and biseparable states even in presence of noise and experimental imperfections. We show the efficiency and robustness of conditional witnessing by applying it to the output of non-FT and FT stabilizer measurement circuits of a d = 3 topological QEC color code [32] subjected to phenomenological, circuit-level, and measurement noise models. We then numerically compare the performance of our method against the standard witnessing methods. Our results demonstrate that conditional witnessing is simultaneously more efficient and more robust in proving GME in noisy quantum systems.
The manuscript is organized as follows. In Sec. II, we give an overview of the stabilizer formalism for the topological QEC color code, together with the flag-based FT QEC scheme. Section III discusses ideal non-FT and FT QEC cir-cuits. In Sec. IV, multipartite entanglement and its standard witnessing are reviewed. We then introduce our method of conditional entanglement witnessing. Section V is devoted to the compilation of the QEC circuits into the native trappedion gates. Next, phenomenological, circuit-level and measurement error models used in the simulations are introduced. In Sec. VI we present our numerical results for our conditional witnessing technique and some of the best standard witnessing methods available applied to noisy trapped-ion platforms. We discuss the robustness of the methods based on results obtained for different noise channels applied to non-FT and flagbased FT trapped ion circuits. Finally, in Sec. VII we provide the conclusions and outlook of our work.

II. FLAG-QUBIT-BASED PROTOCOL FOR FAULT-TOLERANT QEC
Quantum error correction (QEC) promises to battle environmental decoherence and experimental imperfections during a quantum computation by redundantly encoding quantum information in multipartite logical states [33]. In order to protect the information that is stored redundantly, active QEC considers performing certain type of measurements frequently to detect and correct the error that has corrupted the state without affecting the encoded information [5][6][7]. Many leading QEC codes can be described within the stabilizer formalism [34].
An [[n, k, d]] stabilizer quantum code which encodes k logical qubits into n physical qubits with a code distance d can correct up to t = (d − 1)/2 errors. The stabilizers S i form an Abelian subgroup S of size |S| = 2 G of the n-qubit Pauli group P n = {±1, ±i}×{I, X, Y, Z} ⊗n where I, X, Y, Z are the single-qubit Pauli matrices. Such a subgroup is typically specified via a generating subset of G linearly-independent and mutually commuting Pauli operators, g := {g i } G i=1 , that are known as parity checks-or subgroup generators-so that S = g 1 , ..., g G . The latter means that any element of the stabilizer subgroup S ∈ S can be obtained as a specific product of the generators of the form The measurement of a single stabilizer yields one of its two possible eigenvalues λ = ±1 which is 2 n−1 -fold degenerate. Since the parity checks form a set of compatible observables, it is possible to unambiguously specify a 2 n−G -dimensional subspace of the n-qubit state space through their common eigenspace with eigenvalue +1, The subspace L is known as the code space which can be used to embed (codify) the k = n − G logical qubits. The logical generators {X L , Z L } k =1 are then elements of the Pauli group P n that commute with all stabilizers S ∈ S, but which are not stabilizers themselves. Defining the centralizer of S in P n as C(S) = {P ∈ P n : P S = SP, ∀S ∈ S}, logical FIG. 1. The 7-qubit color code arranged in a three-colorable planar lattice with qubits lying on the vertices, and two types of parity checks per plaquette, hence G = 6. This code yields a single logical qubit, k = 1, encoded in n = 7 data qubits, distance d = 3, and can correct for t = 1 error.
operators lie within C(S) \ S. The key idea here is that the logical operators transform the logical state within the code space while leaving the code space as a whole invariant.
It is central to the construction of a QEC code using the stabilizer formalism that the measurements of parity checks allow us to extract the so-called error syndrome without altering the stored quantum information. This typically requires the use of ancillary qubits into which the error syndrome is mapped through a sequence of entangling gates followed by a projective measurement on them. In practice, however, the syndrome measurements will also be affected by decoherence and noise, thus introducing further errors. This raises a crucial aspect of QEC, namely, the notion of fault-tolerance (FT) [35]-the circuits used for the syndrome readout and other operations must be designed in such a way that errors do not proliferate in an uncontrolled manner, cascading into multiple errors that would affect larger parts of the quantum register. In other words, the QEC code should cope with errors stemming from both the quantum computation and the syndrome extraction even if the measurement process is faulty. Such FT circuit constructions are essential to harness the full potential correcting power of the QEC code under consideration.
One of the most attractive strategies for active QEC is based on topological codes where the physical qubits are arranged on planar lattices and the stabilizers have a local support, i.e. they only involve neighboring qubits in the planar lattice [33]. In contrast to QEC codes based on concatenation [7], the syndrome extraction for topological codes only requires local measurements simplifying in this way the experimental implementation of rounds of QEC, i.e. syndrome extraction followed by the correction of the most-likely error. For instance, for topological color codes [32], physical qubits are arranged on the vertices of a trivalent three-colorable planar lattice (see Fig. 1). The parity check operators are the following pair of operators (X-and Z-type parity checks) per plaquette q of the lattice, and have a local support on the qubits located at the vertices of such plaquette where v(q) is the set of vertices that belong to plaquette q. Accordingly, there are G = 6 parity checks for the smallest color code with n = 7 physical qubits each acting locally on only 4 qubits so that the code space is two-dimensional encoding k = n − G = 1 logical qubit.
To detect the errors that may have corrupted the logical qubit, one must measure all 4-qubit parity checks using a FT scheme and infer the location of the most likely error from the classical information obtained from the sequence of ±1 parity check outcomes known as the error syndrome. In this particular example, the parity-check information is extracted via projective measurements on an ancillary syndrome qubit. In Fig. 2. a, we show a circuit for the readout of an X-type parity check of a single plaquette of the 7-qubit color code. We note, however, that since all four plaquette qubits are coupled to the same ancillary qubit through the sequential two-qubit gates, single-qubit errors can proliferate and create errors with a larger support. Following the syndrome measurement approach using a single ancilla, any such error will result in a logical error, thereby violating the FT design principle.
A recent proposal for an efficient recovery of FT during the syndrome extraction is the flag-based stabilizer readout [36][37][38]. As shown in Fig. 2 b, this technique uses a single additional ancillary qubit, the flag qubit, which is coupled to the syndrome qubit. We note that, in general, even if more flag qubits are required for larger-distance codes [37], these are not required to be initially prepared in a multipartite entangled Greenberger-Horne-Zeilinger (GHZ) [39] state which must also be verified to avoid a non-FT proliferation of errors [40,41]. This brings about significant advantage compared to cat-state ancillary methods [40,41]. In the case of the 7-qubit color code, as shown in Fig. 2 b, the flag qubit is coupled to the syndrome qubit to detect whether or not multiple errors might have cascaded onto the data qubits. We note that that the flag qubit by itself does not suffice to correct for such higher-weight errors. However, when combined with the subsequent parity check measurements using the syndrome qubit, it can be used to unequivocally identify and correct these dangerous errors achieving the desired fault tolerance [36,42].

III. IDEAL PLAQUETTE CIRCUIT
We are interested in evaluating the correct functioning of the plaquette readout circuits, as they are the smallest building blocks of the circuitry for the topological color code [32]. To do that, it is useful to first work out the details of the ideal circuits shown in Fig. 2. Here, by ideal we mean circuits that are free from state preparation and measurement (SPAM) and gate errors. This is done in the following section. We emphasize that, here, we only focus on the g x generator. Nevertheless, a similar procedure can be implemented using the g z generator as presented in Appendix A.
A. Ideal non-FT plaquette circuit Let us start our analysis with the simplest example of the ideal plaquette circuit in Fig. 2. a. In a full QEC code, the syndrome qubit can be prepared in |+ s = (|0 s + |1 s )/ √ 2, x in Eq. (3) of any plaquette q in Fig. 1. The physical/data qubits correspond to the corresponding four physical qubits of this plaquette with indexes i1, i2, i3, i4 ∈ {d1, d2, d3, d4, d5, d6, d7}. These qubits are sequentially coupled via CNOT entangling gates to the syndrome qubit, which must be initialized in a specific state, and then measured in the corresponding basis. In the flag-based scheme, an additional ancillary qubit is appropriately initialized, coupled, and measured to reveal crucial information to attain FT. while the data qubits {i 1 , i 2 , i 3 , i 4 } are, in general, part of a larger logical state. After applying the circuit, the syndrome qubit would contain the Z-type error information. This information could then be extracted via a projective measurement of the syndrome qubit. In order to evaluate the performance of the color code blocks, however, we do not need to read out the syndrome. In this case, our interest lies in the characterization of the corresponding circuit from the perspective of GME. To do so, it turns out to be sufficient to assume that data qubits are initialized in |0 ⊗4 . Next, four CNOT gates are sequentially applied with the syndrome as the common control qubit while the data qubits play the role of the corresponding targets. Recall that a CNOT gate between the control and the target qubits, c and t, respectively, can be written in terms of Pauli operators as CNOT c,t = 1 2 {(I c +Z c )I t +(I c −Z c )X t }. After some algebra, the output state obtained is The resulting 5-qubit GHZ state of Eq. (4) can be understood as the one-dimensional code space of the stabilizer subgroup and thus, it can be recast as the product of the projections onto the common +1 eigenspace of S 5q , namely (6) Let us now briefly analyze the effect of a dangerous error in the syndrome qubit. Consider, for example, the case wherein the syndrome suffers from a Pauli-X error between the second and third CNOT gates; see Fig. 3. a. Using the standard propagation of errors across CNOT gates [8], it is easy to calculate the output state as It is evident from Eq. (7) that the syndrome qubit carries no information about the error and that the single-qubit error has turned into a weight-2 error showcasing the non-FT aspect of this circuit. Importantly, even in the case of a coherent rotation error exp (iφX) of the syndrome qubit, as depicted in Fig. 3. b, a simple calculation results in the output state |ψ out = cos φ|GHZ ⊗5 which again represents the fact that a projective X measurement of the syndrome qubit does not reveal the error. This brings us to the FT scheme of the next section.

B. Ideal flag-based plaquette circuit
We now consider the FT flag-based circuit presented in Fig 2. b. Similar to the noiseless non-FT plaquette circuit of Sec. III A, we assume the syndrome qubit is initialized in the state |+ s and the data qubits {i 1 , i 2 , i 3 , i 4 } in the product state |0 ⊗4 . The flag qubit, on the other hand, is prepared in |0 f . The main difference between the flag-based and the non-FT circuits is that the two additional CNOT gates between the syndrome and the flag propagate the potential error in the syndrome qubit to the flag qubit while this does not corrupt the resulting state in the event of an ideal error-free realization. This enables one to infer about the error in the syndrome qubit that propagates to multiple errors on the data by a projective measurement of the flag qubit. When there are no errors in the syndrome, it is expected from the ideal circuit to yield the output state However, if the syndrome qubit suffers from a single Pauli-X error happening between the two CNOTs, as shown in Fig. 3. c, it will propagate to the flag qubit as a bit flip. This is reflected in the output state data. Note that there are other events in a noisy experimental realization of the circuit, for example a measurement error on the flag qubit, which could also trigger the flag. Therefore, to construct one FT QEC cycle, further measurements of the stabilizers would be required to discriminate between these cases [42].
Finally, if the syndrome qubit suffers from the coherentrotation error exp (iφX) between the second and third syndrome-data CNOT gates shown in Fig. 3. d, then the output state of the ideal circuit becomes |ψ out = cos φ|0 f |GHZ ⊗5 Here again, the flag unveils a cascaded error in the syndrome and data qubits.
Having understood the working principles and the ideal outputs of each plaquette in both non-FT and flag-based FT scenarios, we are ready to introduce our main tool for characterizing the performance of these circuits, namely, the conditional entanglement witnessing.

A. Multipartite entanglement and its witnesses
In this section we review the well-established theory of multipartite entanglement witnessing [26,43]. The readers familiar with these details might skip this section and move on to Sec. IV B. We identify the subsystems of an n-partite system using an index set I := {1, 2, . . . , n} so that, given the Hilbert space H i associated with each subsystem, the Hilbert space of the total system is given by H I = ⊗ i∈I H i . Evidently, it is possible to group the subsystems in many different ways. Calling each possible grouping a partitioning, they correspond to partitionings of the index set I. An m-partitioning (I 1 |I 2 | · · · |I m ) is thus a specific grouping of subsystems such that ∪ x I x = I and I x ∩ I y = ∅ for any x = y. It is customary to call 2-partitionings bipartitions. We also denote the Hilbert space associated with each party by H Ij = ⊗ x∈Ij H x .
Recall that each quantum system is described by a density operator , which is a unit-trace positive member of the set of all bounded linear transformations Lin(H) on the Hilbert space H assigned to the system. The set of all quantum states of a system is denoted by St ⊂ Lin(H), which is a compact convex set. Applying these rules to the multipartite scenario for a presumed m-partitioning (I 1 | · · · |I m ), the state space of each party I j is denoted by St Ij ⊂ Lin(H Ij ), while the state space of the total system is identified as St I ⊂ Lin(H I ). Now, imagine that parties in (I 1 | · · · |I m ) were spatially separated and all they could do was to perform local operations on their possessed quantum systems and possibly communicate classical messages, known as the local operation and classical communication (LOCC) paradigm, and ask what quantum states of the total system can the parties prepare. It can be shown that the quantum states that the parties can achieve in this setting are of the form [44] = i p i I1;i ⊗ · · · ⊗ Im;i , wherein Ix;i ∈ St Ix for any x ∈ {1, . . . , m} and {p i } is a probability distribution. The quantum states of this form are called m-separable states with respect to the partitioning (I 1 | · · · |I m ) and their collection forms a closed convex set denoted by Sep I1|···|Im . The set of m-separable states for any given partitioning is also dense and convex. Most importantly, however, is that Sep I1|···|Im St I , i.e. there are quantum states of the total system that cannot be prepared by the m parties using LOCC. Such states are called entangled with respect to the m-partitioning (I 1 | · · · |I m ).
Entanglement in an n-partite system has a complex structure because the possibilities of choosing the partitioning grow exponentially with the number of subsystems [26,45]. A particularly interesting class of multipartite entangled states, however, is the one formed by states that are entangled within all possible bipartitions. These states are called genuinely multipartite entangled (GME), or-sometimes-fully inseparable [43] 1 . Henceforth we use the former name for such states. This is the strongest form of multipartite entanglement as it can be shown to imply entanglement within all possible k-partitionings of the system [26,45].
Let us remark that the certification of GME in an npartite system requires verification of entanglement in showing the exponential increase in both analytical and practical complexity of this task. Certifying entanglement of an arbitrary quantum state, be it bipartite or multipartite, is also known to be very hard from the perspective of complexity theory [21,22]. This is because determining whether a given quantum state is entangled or not is equivalent to deciding whether it is inside or outside of a suitable convex set of separable states. However, any such set is not a simplex, meaning that it does not have a finite number of "straight border lines" to be checked for the separation of the state under consideration [48]. Nevertheless, it is possible to obtain many sufficient (but maybe not necessary) conditions for entanglement of quantum states [27], a very large class of which are entanglement witnesses [23][24][25]49].
Simply speaking, an entanglement witness is a quantum observable whose expectation value is bounded for all separable states. This bound, however, can be violated by suitable entangled states. More precisely, for every entangled state with respect to a specific m-partitioning (I 1 | · · · |I m ), / ∈ Sep I1|···|Im , there exists a bounded Hermitian operator W I1|···|Im such that Importantly, the existence of the witness operator W I1|···|Im is guaranteed by the Hahn-Banach separation theorem [49]. Finding a witness operator with properties in Eq. (13) may seem to be difficult. Thankfully, using the affine properties of the space of bounded linear operators on Hilbert spaces, it was shown [25,26,49,50] that every entanglement witness can be constructed from a bounded linear test operator, henceforth denoted by L, so that in which the so-called separability bound is While the optimization in Eq. (15) seems demanding, it is known that entanglement witnessing is efficiently decidable [51,52]. Now, according to Eq. (13), any state for which Tr L I1|···|Im > l I1|···|Im is entangled with respect to the partitioning (I 1 | · · · |I m ).
The program of entanglement witnessing thus proceeds as follows. It is assumed that some information about the entangled state to be detected is available a priori, e.g. the quantum state that results from an ideal noiseless circuit is known. The goal is to devise an experimentally-friendly observable, i.e. one that can be measured with relatively low cost, for instance, in the number of settings, based on the given information which is also resilient against the state preparation and measurement imperfections. We note that, in general, different witnesses are required for different partitionings [26,45]. In this paper, however, we are interested in GME witnessing and shall thus focus on bipartitions.
Let us give a simple example of how the standard GME witnessing can be performed. Consider the circuit shown in the top panel of Fig. 2. We showed in Sec. III A that the ideal output of this circuit is the 5-qubit GHZ state, To show that this state is genuinely multipartite entangled, we have to check the entanglement in all N b = 15 possible bipartitions. Let us focus on one of them, say (s|1, 2, 3, 4) where we used the symbol s for the the syndrome qubit. It is easy to see that, with respect to this bipartition, the GHZ state is equivalent to a bipartite Bell state, i.e., where |0 = |0 ⊗4 and |1 = |1 ⊗4 . Consider now the test operator FIG. 4. Heuristic comparison between standard GME witnessing and conditional GME witnessing technique of Sec. IV C. The light-blue dashed ovals, say O0, represent separable states with respect to a specific individual bipartition, aka biseparable sets. Given n subsystems there exist an exponential number, i.e. N b = 2 n−1 − 1, of biseparable sets. The closed convex hull of all biseparable sets is denoted as conv. The inner circle C0 is the set of fully separable states. The dark-blue ovals, say O1, represent the conditional biseparable states with respect to individual bipartitions, i.e. states for which entanglement cannot be localized between any two subsystems from parties of the bipartition. Evidently, O0 O1. The circle C1 represents the intersection of all conditional biseparable sets. The black dashed line represents a standard GME witness. It is clear that there exist quantum states, e.g. the red dot, that are GME and yet lie within the convex hull conv. Using Theorem 1 or Theorem 2 of Sec. IV B, it is enough to certify the entanglement of states with respect to only a linear number, i.e. n − 1, of conditional bipartitions. We use n − 1 witnesses (green solid lines) for this purpose. The intersection of detected states using such witnesses are also GME entangled states. Thus, the shaded yellow area highlights the advantage obtained using our conditional GME witnessing as discussed in Sec. IV C.
Consequently, one can define an entanglement witness with respect to this bipartition as so that Tr W s|1,2,3,4 σ ≥ 0 for all biseparable states σ ∈ Sep s|1,2,3,4 , while there exist quantum states for which Tr W s|1,2,3,4 < 0. Clearly, the 5-qubit GHZ state itself is an example of the latter. It then follows that |GHZ ⊗5 3,4 which must be read as "the 5-qubit GHZ state is entangled with respect to the bipartition (s|1, 2, 3, 4)". For this example, due to the symmetries of the test operator L in Eq. (18) with respect to different bipartitions, it is easy to show that the maximum expectation value of the test operator for all bipartitions is indeed the same and equal to 1 2 . As a result, we find that the witness operator of Eq. (20) is in fact capable of detecting the entanglement of the 5-qubit GHZ state within all possible bipartitions and thus serves as a faithful witness of GME.
We emphasize, however, that this is not generally the case for arbitrary quantum states, generic test operators, and arbi-trary bipartitions. In the most general case of certifying entanglement using a single test operator, a given quantum state is GME if the expectation value of the test operator for that state is larger than the maximum of the separability bounds Eq. (15) for all bipartitions [26], i.e.
where the maximum is taken over the set of all bipartitions B which has |B| = N b elements. Now, suppose that and σ are two biseparable states with respect to two bipartitions B 1 and B 2 , respectively. Thus, we have Tr (L ) ≤ max B∈B l B and Tr (Lσ) ≤ max B∈B l B , which implies 1]. As this holds for any choice of B 1 and B 2 , we conclude that the inequality L > max B∈B l B can be geometrically interpreted as a test that serves to identify points that lie outside the closed convex hull of all biseparable states. In other words, any standard GME witness using a single witness is only capable of detecting GME states that lie outside the closed convex hull of all biseparable states; see Fig. 4. Nevertheless, an important aspect of the above construction is its potential experimental feasibility, depending on our choice of the test operator. First, to obtain the expectation value of the witness, it is enough to only measure the expectation value of the test operator. Second, the expectation value of the test operator of Eq. (18) can, in our particular case, be obtained by local measurements of the 32 stabilizers of the 5qubit GHZ state as given in Eq. (6). Hence, it is in practice possible to obtain the witness value and thus test the entangled nature of the state generated by the actual circuit. We note, however, that the number of stabilizers grows exponentially with the number of qubits which makes this method practically challenging to implement. When using a single witness, this problem can cleverly be avoided by trading noise robustness for efficiency in the number of measurements as shown by Tóth and Gühne in Ref. [28]. We also emphasize that the latter difficulty must be distinguished from the obstacle due to the exponential growth in the number of bipartitions.
B. Efficient certification of GME As we have seen, entanglement witnessing is meant to be an experimentally-friendly technique to certify entanglement. Interestingly, there exist techniques to push witnessing to its limits so that a given witness delivers an impressive performance even in the presence of severe noise and errors [25,29,30,53]. In multipartite scenarios, however, we face a different problem, namely the scaling of the number of partitions with the input size which seems to be persistent for any method of entanglement certification.
In the scenario of certifying GME that is relevant to our purpose an n-partite system contains N b = 2 n−1 − 1 bipartitions to be tested for entanglement the exponential growth of which is a major challenge for large systems. We note that, by choosing the witnessing method for entanglement certification and using the construction of Eqs. (19) and (20), one might construct N b witnesses for each bipartition using a single test operator L. Nevertheless, in general, there is an exponential number of optimizations as per Eq. (15) that must be performed [26]. One way to circumvent this practical limitation is to choose a test operator L for which a suitable positive real number l is known-by other means-such that l is larger than the separability bound of Eq. (21) for all bipartitions. One such technique was adopted by Tóth and Gühne in Ref. [28]. However, the ease does not come for free: (i) the obtained witnesses are not the finest ones [25], as there may exist genuinely multipartite entangled states that cannot be detected by any such single witness, (ii) there is no general recipe for their construction, and (iii) they are limited to certain types of witnesses and systems as the value l cannot be deduced for an arbitrary test operator without performing the optimizations.
In the following, we exploit the concept of localizable entanglement (LE) [31,54] to introduce a general solution to this challenge that collapses the exponential complexity of GME witnessing to a linear growth for all system types in all dimensions. The price to pay, however, is that our technique only provides a sufficient condition for detecting GME, i.e. not every genuine multipartite entangled state can be detected using our approach. We emphasize, however, that for many operational scenarios including measurement-based quantum computation and quantum communication in which LE is a necessary resource [55,56], our sufficient condition becomes necessary as well, hence providing a necessary and sufficient condition for practical purposes.
Let us begin with a simple example. Suppose that two parties Alice and Bob are holding quantum systems A and B, respectively. In addition, Alice is holding an ancillary system C. Hence, we effectively have a tripartite system shared between two parties in the bipartition (AC|B). We denote the quantum state of the total system with respect to this bipartition by AC|B , and the amount of entanglement shared between Alice and Bob by E( AC|B ). We ask how that is related to the entanglement between subsystems A and B. This is, in general, a difficult question to answer. Nevertheless, it is clear that if Alice performs a measurement on C and, conditioned on the ith outcome of this measurement, she finds out that the corresponding conditional state A|B:i is entangled, then the original state AC|B prior to the measurement must have been entangled with respect to the bipartition (AC|B). The reason for this conclusion is that we know entanglement cannot increase via LOCC. If AC|B was to be separable with respect to the bipartition (AC|B), then it would be impossible for Alice to create entanglement by a local measurement (i.e. her measurement on C) and classically communicating the result (i.e. her ith outcome) to Bob. We thus see that entanglement between A and B conditioned on measurements on C implies entanglement within the bipartition (AC|B). Similarly, if we assume that Bob is holding the subsytem C, then we arrive at the conclusion that entanglement between A and B conditioned on measurements on C also implies entanglement within the bipartition (A|BC), hence the following lemma [57]. Lemma 1. Consider a tripartite state ABC . Given that the conditional state B|A:i for the ith outcome of some measure-ment on the subsystem C is entangled, this implies that ABC is entangled within both bipartitions (AC|B) and (A|BC).
The above example is reminiscent of the idea that, in a multipartite system, it might be possible to concentrate entanglement within a smaller set of subsystems by performing measurements on the remaining subsystems-and communicating the outcome-as first considered by Verstraete, Popp, and Cirac [31]. The maximum amount of entanglement that can be concentrated between Alice and Bob by such local measurements on average is dubbed as the "localizable entanglement" (LE). More precisely, suppose that E denotes an entanglement measure of quantum states that cannot be increased via LOCC. Given n quantum systems in the state , the LE of the bipartition (s x |s y ) for s x , s y ∈ {s 1 , . . . , s n } after local measurements on subsystems {s x , s y } c := {s 1 , . . . , s n }\{s x , s y } with outcomes {i} is given by in which x|y:i is the joint conditional state of subsystems s x and s y given the outcome i, with probability p i , of the local measurement M on subsystems {s x , s y } c . Moreover, the supremum is taken over the set C of all (n − 2)-partite local measurements. For our example, it thus follows that LE A|B > 0 implies entanglement in both bipartitions (AC|B) and (A|BC) as presented in Lemma 1.
Our main observation is that the implications of Lemma 1, in light of the concept of LE, can in fact be extended to any bipartition of any number of systems. Denote a generic bipartition of the n-partite system as (s 1 , . . . , s j |s j+1 , . . . , s n ). According to Lemma 1, entanglement in this bipartition is certified once the entanglement between two subsystems s x and s y from each party, i.e. with x ≤ j and y ≥ j +1, conditioned on appropriate measurement outcomes of the remaining n − 2 subsystems, is verified. Naively, given the j(n − j) choices of the pair s x and s y for each bipartition on top of the fact that there are yet 2 n−1 − 1 bipartitions to be considered, there still seems to be an exponentially-large number of entanglement certifications to be performed. Our central result stated in the following theorem shows that there is a huge redundancy in this process. Leveraging this redundancy allows us to reduce the exponential number of bipartitions to a linear one, hence making the GME detection efficient. Theorem 1. Given an n-partite quantum system of any dimension, certification of entanglement between the subsystems s 1 and s x for all s x ∈ {s 1 } c conditioned on an outcome i of suitable local measurements on the remaining n − 2 subsystems is sufficient for the certification of GME of the system. The number of bipartitions needed to be checked is thus n − 1.
Proof. To prove the theorem, let us first introduce a notation that simplifies and clarifies the procedure. For any pair of subsystems s x and s y , on which we want to localize entanglement, we can denote by (S L , [s x |s y ], S R ) a bipartition with respect to which the entanglement is being certified. Here, S L and S R are the collection of all subsystems except s x and s y that belong to the left and right parties, respectively, and on which the conditioning takes place. We also call the block [s x |s y ] the conditional bipartition.
By using Lemma 1, for a fixed choice of subsystems s x and s y , the localizable entanglement of any such bipartition is equivalent to that of the unique bipartition ([s x |s y ], S R ) where S R = S R ∪ S L . This follows directly by assuming that Alice is holding the subsystem A = s x while Bob holds B = s y ∪ S L ∪ S R and is able to make local measurements on C = S R .
Thus It follows from the above argument that bipartitions {([s 1 |s y ], S R ) : ∀s y ∈ {s 2 , . . . , s n }} cover the set of all possible bipartitions, in the sense that detection of their conditional entanglement is sufficient to certify entanglement in all possible bipartitions, hence GME. Since this set has n − 1 elements corresponding to the n − 1 pairings of s 1 with other subsystems, the detection of GME only requires a linear number of bipartitions.
It is worth mentioning that, despite the systematic reduction in the number of bipartitions needed for the certification of GME, in general, there exist GME states the entanglement of which cannot be detected through localizing procedure as described in Theorem 1. In particular, it was shown by Mičuda et al. [58] that there exist three-qubit mixed states that are genuinely multipartite entangled and, yet, no measurement on any of the subsystems leads to a bipartite entangled state of the remaining subsystems. An example state with this property is the Werner state [44] for 1 5 < p ≤ 1 3 . Moreover, very recently, a related result within the context of device-independent GME certification was obtained independently by Zwerger et al. [59]. There, it was shown that all pure GME states contain conditional bipartite entanglement. As a corollary, one can say that if a pure state is GME, then its GME can necessarily be certified using our conditional GME witnessing technique. Interestingly, it is possible to reformulate Theorem 1 in terms of neighbouring subsystems of an n-partite system. Theorem 2. Consider an n-partite quantum system of any dimension. Then, the certification of entanglement in all conditional bipartitions [s x |s x+1(mod n) ], with 1 ≤ x ≤ n, conditioned on an outcome i of suitable local measurements on the remaining n − 2 subsystems is sufficient for the certification of GME of the system. The number of bipartitions needed to be checked is thus n − 1. 5. Schematic of the bipartition (s1, . . . , sj|sj+1, . . . , sn) in neighboring subsystems for n qubits arranged on the circumference of a circle. The placements of separators P1 and P2 suffice to specify any given bipartition of the system.

FIG.
Proof. It is possible to give an intuitive pictorial proof of this theorem. Suppose that, as shown in Fig. 5, the n subsystems are arranged on a circle so that subsystems s 1 and s n are neighbours. A given bipartition (s 1 , . . . , s j |s j+1 . . . , s n ) can be identified with the placements of two separators P 1 and P 2 . Now, suppose that P 1 is placed between two subsystems s j and s j+1 and suppose that, conditioned on local measurements on the remaining subsystems, we find that s j and s j+1 are entangled. It is immediate, using Lemma 1, that due to the locality of measurements the placement of the separator P 2 is irrelevant, so that a nonzero LE between s j and s j+1 implies entanglement within all bipartitions that can be obtained by displacing separator P 2 .
Finally, since the placements of P 1 and P 2 are sufficient to specify all bipartitions, we conclude that the only relevant degree of freedom is the placement of P 1 . Finally, the latter can be done in n − 1 ways, hence the result.
Lastly, let us note that in Theorems 1 and 2 we have focused on local measurements. However, it is possible to derive variants of them in which joint entangled measurements on specific subsystems are allowed. Due to the fact that joint measurements generally increase the localization power, it is expected to obtain more powerful but rather complicated entanglement criteria from such considerations.

C. Conditional entanglement witnessing
Given an n-partite system, there are many ways to verify the entanglement localized between two subsystems by measuring the rest, and then using either Theorem 1 or 2 to show GME. Additionally, we require the detection of each nonzero LE to be efficient for each bipartition. A particular approach to do the latter is witnessing [60,61]. The collection of all quantum states with unlocalizable entanglement with respect to a specific conditional bipartition [s x |s y ] form a closed convex set denoted by Sep [sx|sy] . It is worth emphasizing that the states in Sep [sx|sy] are not necessarily biseparable states, rather they are states that reduce to separable bipartite states upon any local measurements on {s x , s y } c . It thus follows that Sep [sx|sy] ⊃ Sep I1|I2 for any I 1 s x and any I 2 s y . For every n-partite state / ∈ Sep [sx|sy] , that is a state with LE with respect to the conditional bipartition [s x |s y ], there exists a bounded Hermitian operator W [sx|sy] of the form with M sz:i being the effect corresponding to the outcome i of some specific measurement on the subsystem s z , such that We call the operator W [sx|sy] a conditional entanglement witness, the existence of which is guaranteed by (i) the assumption that contains LE between s x and s y , namely / ∈ Sep [sx|sy] , and (ii) as described in Sec. IV A, by the Hahn-Banach separation theorem, there exists a witness W sx|sy for the entanglement concentrated between these two subsystems. Furthermore, for each pair s x and s y , the bipartite witness W sx|sy can be constructed from a test operator L sx|sy using the approach delineated in Sec. IV A. It is worth emphasizing that, determining the separability bound for the test operator L sx|sy to be used in the construction of W sx|sy in Eq. (24) requires an optimization over biseparable states of systems s x and s y . Hence, the complexity of determining this bound is the same as generic entanglement witnessing, i.e. it is efficiently decidable [51,52]. Combining conditional entanglement witnessing with either of Theorems 1 and 2 thus gives an efficient technique for verification of GME that maintains the practicality of the entire process with additional robustness. We call this approach conditional GME witnessing.
In the rest of this paper, we apply the conditional GME witnessing to QEC stabilizer measurement circuits to characterize their performance in terms of their power for the creation of GME states in the presence of errors, different sources of noise and inefficiencies. We show that with a linear (in the number of qubits) increase in the complexity of the approach, we obtain significant noise robustness in our technique compared to the standard single witness entanglement tests [28]. Our claim can be pictorially be understood as shown in Fig. 4. Any standard GME witness can only detect GME states that do not belong to the closed convex hull of sets of separable states with respect to each bipartition. There, however, exist GME states that belong to this convex hull. Using conditional GME witnessing, in general, we use a linear number of witnesses to detect such GME states and obtain a higher resolution in the detection of GME.

V. NOISY TRAPPED-ION CIRCUITS
Starting with the pioneering proposal of Cirac and Zoller for universal quantum computation using the internal states of trapped ions as qubits, and the vibrational modes as a quantum bus to mediate entangling gate operations [62,63], systems of trapped atomic ions in radio-frequency potentials are nowadays considered to be among the most promising quantum information processors [1,64]. Over the years, various quantum protocols have been realized in different trapped-ion platforms [64,65] including small-scale QEC algorithms [66,67], a topologically encoded qubit based on the 7-qubit color code [16], fault-tolerant error detection [14], deterministic correction of qubit loss [68], and the first entangling gate at the level of logical qubits [69]. One of the current quests in trapped-ion quantum computing is to scale up these prototype processors towards larger-scale systems capable of taking full advantage of QEC routines of FT [4,15,42,[70][71][72].

A. Compilation into native ion-trap gates and operations
Whilst a large-scale FT implementation of QEC for universal quantum computations is beyond the reach of nearterm devices, small-scale FT-QEC protocols can already be run on some of the current trapped-ion platforms. Even though they still consist of a reduced number of qubits where some decoherence is unavoidable, they deliver long coherence times [73,74] and high-fidelity single and two-qubit gates [75][76][77][78] that are essential to test the performance of small distance FT-QEC codes or its building blocks. We thus focus on this platform to demonstrate the robustness and efficiency of our entanglement characterization method.
The native trapped-ion entangling gates in current designs are not CNOT gates [8]. Rather, they are based on state-dependent dipole forces and effective spin-spin interactions [79][80][81][82]. In this work, we shall be concerned with the so-called Z-state-dependent forces, which give rise to the entangling ZZ-gates [76,77,82], namely in which Z i and Z j are the Pauli matrices of the corresponding ith and jth qubits involved in the gate, respectively, and θ is the corresponding pulse area. In addition to ZZ-gates, which are fully entangling for θ = π/2, i.e. they map product states onto GHZ-type entangled states, we shall also consider singlequbit rotations. In particular, rotations of the form are obtained by local ac-Stark shifts [83]. The parallel rotations of ion states within the equatorial plane of the Bloch sphere are obtained by a simultaneous driving of the carrier transition of the ions in the laser focus, where R ⊥ 0 (θ) and R ⊥ π/2 (θ) correspond to rotations around x and y axes of the Bloch sphere, respectively. For instance, FIG. 6. Correspondence between the standard and trapped-ion universal gate sets enabling quantum computation. The solid line that joins two filled circles represents the ZZ-gate U ZZ ij (π/2) in Eq. (26).
by setting φ = 0 and θ = π, Eq. (28) represents singlequbit π pulses applied to all illuminated ions. We note that, although these rotations act on all illuminated ions, the equatorial rotations can be applied to a particular set of ions by using spin-echo-type refocusing pulses that interleave these rotations with the addressable Z-type rotations [84]. Although this collection of gates is not the standard one in quantum computation [8], it is a universal gate set so that any quantum algorithm can be decomposed into a sequence of these elementary operations [84,85]. In Fig. 6, we show the correspondence between the standard universal gate set and certain sequences of native trapped-ion gates. In Fig. 7, on the other hand, we present the compiled circuit of Fig. 2. a into the native trapped-ion gate set. The entangling ZZ-gates for θ = π/2 between the ith and jth qubit can be written as U ZZ i,j (π/2) = (I − iZ i Z j )/ √ 2. Similarly one can write the single-qubit rotations for qubit ith as R ⊥ π/2,i (±π/2) = (I ∓ iY i )/ √ 2 and R ⊥ 0,i (−π/2) = (I + iX i )/ √ 2. After some algebra, the output state of the circuit in Fig. 7 is obtained as which, as expected, is identical to the 5-qubit GHZ state in Eq. (4) generated with the circuit comprising CNOT gates.
Similarly to the non-FT scenario with CNOT gates, we may analyze the propagation of a dangerous single X-error from the syndrome qubit to the data qubits through the ZZ-gates, the details of which are given in Appendix D. It follows that, in this case too, the syndrome readout will not reveal any information about the propagation of the error. This leads us to the flag-based circuit shown in Fig. 8, which is the compiled version of Fig. 2. b into the native trapped-ion gate set. It is straightforward to calculate the output of this circuit as One realizes that the sequential application of two ZZgates between the syndrome qubit s and the flag qubit f, U ZZ sf (π/2)U ZZ sf (π/2)|− s |− f , leaves the two qubits in the product state |+ s |+ f . A dangerous Pauli X-error in the syndrome that produces a cascade of errors in the data, however, will flip the flag back into |− f . Hence, a readout of the qubit f "flags" the propagation of multiple errors that would not be possible in a non-FT scheme. In parallel with Fig. 3. d, when-FIG. 9. Flag-based FT stabilizer measurement circuit using the native trapped-ion gates. Here, a coherent-rotation error e iφX is injected in a specific position to create a 6-qubit entangled state in the flag-based FT stabilizer measurement. ever the syndrome qubit suffers from a coherent-rotation error exp (iφX) between the second and third syndrome-data ZZgates, as shown in Fig. 9, the ideal output state can be easily computed as A projective measurement of the flag again unveils a cascaded error in the syndrome and data qubits. A similar procedure can be implemented using the g z generator as presented in Appendix C.

B. Noise models
Recall from Sec. IV A that, in general, the output of an ideal plaquette is a GME state. Hence, to assess the robustness of the conditional GME witnessing method in a trapped-ion platform, we implement different noise models into the circuit, and compare the performance of conditional GME witnessing against the standard single witness (i.e. fidelity measurement) approach in detecting the potential GME output state.
In this regard, we use two different circuit-noise models and one measurement error scheme as leading errors in the stabilizer circuits for each of non-FT and flag-based FT scenarios. As the first circuit noise model we use a simplified and phenomenological one in which the preparation of the input state and all the gates are assumed to be perfect while the decoherence of qubits is simulated by an independent single-qubit depolarizing channel [8] applied to each qubit right before their measurements. Our second noise model is motivated by the realistic experimental details discussed in Ref. [77] wherein shuttling techniques are employed to carry out the two-qubit gates. Thus, we consider the case wherein the preparation of the input state is perfect while the two-qubit gates in the circuit suffer from independent depolarizing noise.
The measurement errors, modelled as independent classical bit-flip errors in the measured bits, are present in both scenarios and for all qubits. We assume that dephasing effects in idle qubits are depreciated compared to the two-qubit errors in entangling gates. This is a realistic assumption given the recent experiments on the use of stable magnetic fields which lead to a negligible dephasing of the qubits during the idletime intervals [86]. Moreover, in the considered experimental layout [77], single-qubit gates also have a negligible error in comparison to the two-qubit and measurement errors, and can be thus neglected. We do assume here that the error rates per two-qubit gate increase with the depth of the circuit as a consequence of the shuttling-based approach used in quantum charge-coupled devices [87][88][89].
a. Independent depolarizing noise.-This error channel is used only for the phenomenological model. It consists of independent depolarizing channels of the form acting on each of the qubits at the end of the circuit sequence and just before the measurements. Here, p is probability for a depolarizing error to occur on the ith qubit and we consider it to be the same for all qubits. b. Two-qubit depolarizing noise.-In a trapped-ion platform, ions can be shuttled in and out of the laser interaction zone in which the quantum operations and readouts are carried out [77]. This process may excite the ions' vibrational modes that affect the fidelity of the two-qubit gates depending on their order in the shuttling sequence or, equivalently, the time step at which the gate is applied. This detrimental effect can be modelled in a conservative manner by a two-qubit depolarizing noise after the application of each two-qubit entangling gate U ZZ ij . For each pair of ions involved in a ZZ-gate, they may undergo 15 possible one and two-qubit Pauli errors so that the total error channel is described as where i and j with i = j denote the active ions involved in each two-qubit entangling gate, p is the error probability, and the sum on the right runs over the 6 nontrivial single-qubit and the 9 nontrivial two-qubit Pauli operators. We assume a time (or circuit depth) dependent exponential growth in the error probability defined as p(r, t) = p(1 + r) t , where r and t are the error-growth rate per gate and the time step at which ZZentangling gates are applied, respectively. It is worth to clarify that t is not the actual elapsed physical time in an experimental implementation rather it is an index taking values t ∈ N specifying the order of entangling gates in the circuit. Hence, we assume the time increment between every two entangling gate to be ∆t = 1. Upon using this model, we also consider three error-growth rates of r = 0, r = 0.1, and r = 0.2, noting that an r = 0.2 implies that the 4th and 6th two-qubit gates are about 2 and 3 times worse than the first one, respectively. c. Bit-flip measurement errors.-Entanglement witnessing procedures with and without conditioning involve Pauli measurements of both data and ancillary qubits, which may also suffer from imperfections. We use a simple model for measurement errors, namely independent bit-flips. In a measurement of a single-qubit Pauli operator σ ∈ {X, Y, Z} the corresponding error-free positive operator-valued measure (POVM) [8] is specified by the set of operators {E σ + = I+σ 2 , E σ − = I−σ 2 }. For each measurement outcome, a bit-flip error taking place with probability p me thus gives rise to the POVM effects and Here, κ σ ∈ {X, Y, Z} is the (measurement dependent) error operator such that κ σ E σ It is also obvious that the effect of measurement errors can instead be described by a quantum channel acting on the individual qubits such that

VI. ROBUSTNESS OF CONDITIONAL GME WITNESSING
We are now ready to examine the robustness and efficiency of our conditional GME witnessing technique compared to the standard GME certification approaches used within the literature. To this end, we consider noisy non-FT and flag-based FT plaquette measurement circuits and witness the resulting entangled state using imperfect measurements in three different ways: (i) standard witnessing with a GHZ projector (i.e. a single witness) requiring an exponential number of measurements, that is, by measuring fidelity to the ideal output state, (ii) standard-linear witnessing (SL) with a single witness that relies on only a linear number of measurements using the proposed witnesses of Tóth and Gühne [28], and (iii) our proposed conditional GME witnessing requiring a linear number of witnesses and measurements.
A. Conditional GME witnessing in the noisy non-FT plaquette circuit Consider the 5-qubit non-FT g x circuit from Fig. 7. We implement each noise model of Sec. V B on the circuit and witness the output entangled state using the three abovementioned techniques. Beginning with the standard witnessing, it was shown in Sec. IV A (cf. Eq. (18)) that the 5-qubit GHZ projector is a possible test operator for GME, It was also shown in Eq. (20) that the detection bound for this test operator is 1 2 for any bipartition, i.e. given any state , an expectation value satisfying Tr (L GHZ ⊗5 ) > 1 2 implies the entanglement of with respect to all bipartitions and thus its GME. We have also shown in Eq. (6) that the 5-qubit GHZ projector can be written in terms of its 2 5 stabilizers. Combining the two, we observe that the expectation value of L GHZ ⊗5 for any state is given by It is also worth pointing out that L GHZ ⊗5 equates to the fidelity of the state ρ with the ideal output state of the 5-qubit non-FT plaquette circuit derived in Eq. (4). For the standard witnessing of GME using the 5-qubit GHZ projector L GHZ ⊗5 , it is thus sufficient to locally measure the stabilizers at the output of the plaquette circuit the number of which would in general scale exponentially with the size of the register. The second approach we consider is the SL witnessing of GME using a witness constructed out of the 5 generators of the 5-qubit stabilizer subgroup given in Eq. (5). Two test operators introduced by Tóth and Gühne [28] for this purpose are, after normalization, and The GME bounds for these witnesses are l TG1 = 3 4 and l TG2 = 4 5 , respectively [28]. Noting the form of the stabilizer generators, the obvious advantage of these witnesses is that they only require two measurement settings.
Finally, we implement our proposed conditional GME witness and show through this example that it is technically simple and, at the same time, powerful. Using Theorem 1, we focus merely on the four conditional bipartitions [s|1], [s|2], [s|3], and [s|4] and introduce the conditional test operators for x ∈ {1, 2, 3, 4}. Here, |Bell s|x Bell| is the projection of the qubit pair s and x onto the Bell state |Bell = (|00 + |11 )/ √ 2 and |+ +| ⊗3 denotes the projector of the remaining three qubits {s, x} c . The bounds on the conditional test operators are easy to compute as we are effectively dealing with two-qubit systems. For the case of interest here, it is known that where the supremum is taken over the set of all bipartite separable states of qubits s and x. Consequently, for any conditional bipartition [s|x] with x ∈ {1, 2, 3, 4} and any given 5-qubit state , an expectation value L [s|x] > 1 2 for all x ∈ {1, 2, 3, 4} implies GME of the quantum state .
Importantly for us, the Bell state is the one-dimensional code space of the stabilizer generators {XX, ZZ}. Similar to Eq. (6) we thus have implying that conditional GME witnessing can be performed solely by local Pauli measurements on the qubits. Furthermore, for the implementation of conditional GME witnessing using L [s|x] of Eq. (41) we need 3 settings per bipartition, hence a total of 12 measurement settings. It is also noteworthy that, while we only consider the projection onto |+ +| ⊗3 , we can consider other outcome combinations of the X measurements on these three qubits that give rise to either the same Bell state or the one orthogonal to it, namely (|00 s|x − |11 s|x )/ √ 2, that can be witnessed seamlessly with the same measurement settings. In experimental implementations of the conditional GME witnessing, in general, more than one of the conditioning events can thus be used to keep the overall witnessing procedure efficient costing at most a linear overhead in the number of settings.
We now turn to evaluating the robustness of our technique versus other witnessing approaches in the literature. The dark blue shaded areas in all plots represent states in which their GME, if any, cannot be detected by the corresponding witness. One can thus clearly appreciate the significant increase in the noise tolerance of conditional GME witnessing compared to the other witnessing methods that can be found in previous literature.
In particular, for p me = 0, the highest depolarizing error probability p that can be afforded before losing the GME witnessing capabilities for the standard method ( Fig. 10. a) is p ≈ 0.13. For the first (Fig. 10. b) and the second (Fig. 10. c) SL witness we find p ≈ 0.09 and p ≈ 0.07, respectively. These values demonstrate the typical trade-off between the number of measurements and the robustness of witnesses. For our conditional GME witness (Fig. 10. d), however, the error tolerance goes up to p ≈ 0.2. We thus observe the counterintuitive fact that a linear number of measurements does not necessary imply a loss of robustness in GME detection. Similarly, by fixing p = 0 for the depolarizing noise, we notice that the measurement probability error p me also reaches its highest threshold value for our conditional witnessing with p me ≈ 0.2 compared to p me ≈ 0.1 for the standard method. We see the lowest robustness for the first and the second SL witness with p me ≈ 0.07 and p me ≈ 0.05, respectively.
Recall that, in the conditional GME witnessing method for the 5-qubit circuit, according to Theorem 1, it is needed to test entanglement in a total of four bipartitions. In the top panel of Fig. 11, we present the behavior of the expectation value L [s|x] with respect to the depolarizing error probability p for different xs at the fixed measurement error probability p me = 0. It is evident that for this noise model the four bipartitions behave identically, as expected from the symmetries of the ideal state, the noise model exploited, and the conditional GME test used. Therefore, in this case, all the bipartitions would exhibit the same threshold values as in Fig. 10. d.

Two-qubit depolarizing noise model
As mentioned earlier, the depolarizing noise model of Sec. V B is an oversimplification. Hence, in this section, FIG. 12. GME witnessing plots in a 5-qubit non-FT plaquette readout circuit subject to the two-qubit depolarizing noise model. In each row i (i = 1, 2, 3) the contour plots represent, for different values of depolarizing-noise probability p and measurement-error probability pme, the expectation values of (a.i) the standard GME witness L GHZ ⊗5 in Eq. In all cases, the dark blue region identifies the noise values for which the GME tests are inconclusive.
we assume a 5-qubit non-FT readout circuit for the plaquette that suffers from the more realistic circuit noise of Eq. (33). As discussed in Sec. V B, this error model introduces a twoqubit depolarizing channel after each entangling gate. Recall that, in this model, the two-qubit gate error probability p(r, t) grows exponentially with the gate time-step t at which ZZentangling gates are applied at the rate r. Hence, the model takes into account the fact that the fidelity of gates can be affected by the depth of the circuit due to the accumulated decoherence and noise effects. As before, we have also included the measurement noise effects as per Eq. (36).  Fig. 12. d is due to the fact that, here, in contrast to the phenomenological noise, the expectation values L [s|x] are not equal for x = 1, 2, 3, 4, as shown in the lower panel of Fig. 11. In this case, the conditional bipartition [s|1] is the one in which the conditional GME witnessing performs the worst, providing thus the most strin-gent conditions for the detection of GME. Notably, the latter counter-intuitive observation suggests that the depolarizing noise processes before a two-qubit gate are more detrimental than those taking place after it to the correlation created by that gate between the target qubit and all the previouslyentangled qubits. This could be due to the loss of the input coherence that is necessary for correlating the qubits [90]. As such, qubit 3, for instance, becomes less correlated with qubits (s, 1, 2) than qubit 2 with qubits (s, 1), meaning that conditioning on qubit 3 is less informative than conditioning on qubit 2. Hence, the conditional bipartition [s|3] conditioned on the more informative qubits 1, 2 and the less informative qubit 4 performs better compared to the conditional bipartition [s|2] conditioned on the more informative qubits 1 and the less informative qubits 3, 4.
In Fig. 12 the dark blue shaded area again indicates the states for which each of the witnessing techniques is inconclusive. We observe that with increasing error-growth rate r the threshold for p decreases. However, even in the worstcase scenario, our conditional GME witnessing represented in Fig. 12. d shows significant robustness compared to the previously-studied entanglement witnesses for each r.
It is also interesting to compare the effect of the two different noise models shown in Figs. 10 and 12. We notice a higher threshold of detectable GME states when the two-qubit depolarizing noise model is applied. This means that the phenomenological model may underestimate the performance of entanglement witnessing methods whilst the more realistic two-qubit depolarizing noise model predicts a higher robustness of our conditional GME detection. Nevertheless, it is evident from our analysis here that for both noise models the GME witnessing by conditioning method introduced in this text is not only efficient in the number of qubits, but also robust against noise.
B. Conditional GME witnessing in noisy flag-based FT plaquette circuit We now consider the flag-based FT readout circuit for a single plaquette and implement each noise model of Sec. V B on the circuit evaluating the different GME witnesses on the output entangled state. We use again the three mentioned techniques: (i) standard witnessing with an ideal entangled logical state projector onto the ideal target state (31) requiring an exponential number of measurements, (ii) efficient witnessing using the second SL witness method proposed in [28] requiring in this case a linear number of measurements, and (iii) conditional GME witnessing requiring a linear number of witnesses and measurements.
As discussed above, the 6-qubit FT flag-based circuit presented in Fig 9 is the trapped-ion version of the circuit presented in Fig. 3. d compiled to the particular set of trappedion native gates (see Fig. 6). The role of the flag qubit in FT-QEC circuits is to detect cascades of errors from the syndrome qubit to the data qubits after measuring it and extracting the syndrome. In the majority of cases the flag remains disentangled from the syndrome and therefore from the rest of data qubits. However, under some circumstances, such as coherent-rotation syndrome errors of the form exp (iφX), the entire plaquette will end up in an entangled state of Eq. (31).
The ideal 6-qubit GME output state of Eq. (31) can now be used to evaluate the experimental quality of the plaquette measurement circuit. Beginning with the standard witnessing, to show that this state is GME, we have to check the entanglement in all 31 possible bipartitions. Let us focus on one of them, say (f|s, 1, 2, 3, 4), where we have used the symbol f for the flag qubit and s for the the syndrome qubit. It is easy to see that, for instance, setting φ = π 4 the output state can be read off as the following bipartite state where we denote | GHZ Consider now the test operator For the separability bound with respect to this bipartition, we are effectively dealing with a two-qubit system again which allows us to obtain l f|s,1,2,3,4 = sup σ∈Sep f|s,1,2,3,4 We note, however, that with respect to different bipartitions we may get different bounds. For each of the 31 bipartitions we have evaluated the bounds and exhaustively listed them in Table. I of Appendix B. In each case, we either get a bound of 1 2 or 1 4 . In the standard GME witnessing approach using a single test operator we must choose the largest value (see Eq. (21)) which, in this case, corresponds to 1 2 . Consequently, we can define a GME entanglement witness as so that Tr(W σ) ≥ 0 for all states that are separable with respect to at least one of the bipartitions, while there exist quantum states for which Tr(W ) < 0. Given any state an expectation value Tr( L) > 1 2 thus implies the entanglement of with respect to all bipartitions, i.e. its GME. In Eq. (6), it was shown that a GHZ-like projector can be written in terms of its 2 n stabilizers with n the number of physical qubits. Following the same procedure for the state in Eq. (44), the expectation value of the 6-qubit test operator is where the stabilizer subgroup is now given by For the standard witnessing of GME using the 6-qubit projector L, it is thus sufficient to locally measure the stabilizers at the output of the plaquette circuit, combine their statistics according to Eq. (48), and verify that L > 1 2 . The second approach we consider is the SL witnessing of GME [28]. In this occasion, the first SL test operator is not applicable to the 6-qubit state in Eq. (44) due to the lack of required symmetries in stabilizer generators in Eq. (49). The simplest witness we can get is by summing up all the generators as in the second SL witness The GME bound for this witness is l TG2 = 5 6 [28]. In contrast to the 5-qubit case, due to the form of the 6-qubit stabilizer generators, this witness would require more than two, yet a linear number of, measurement settings.
Finally, we implement our conditional GME witness. Using Theorem 1, we need to test five conditional bipartitions [f|1], FIG. 13. GME witnessing plots in a 6-qubit flag-based FT plaquette readout circuit under the phenomenological depolarizing noise model of Sec. VI B 1. The coherent-noise angles is set to φ = π/4. Each contour plot represents, for different values of depolarizing-noise probability p and measurement-error probability pme, the expectation values of (a) the standard GME witness L of Eq. (48), (b) the second SL witness, LTG2 in Eq. (50), (c) the worst-case conditional witnessing using L 1 [f|x] for x = s. from Eq. (51), and (d) the worst-case conditional witnessing using L 2 [f|x] in Eq. (52) for x = 2. The colormap sidebars represent the witness bounds for each method. In all cases, the dark blue region identifies the noise values for which the GME tests are inconclusive.
FIG. 14. GME witnessing plots in a 6-qubit flag-based FT plaquette subject to the two-qubit depolarizing noise model of Sec. VI B 2. The coherent-noise angle is set to φ = π/4. In each row i (i = 1, 2, 3) the contour plots represent, for different values of depolarizing-noise probability p and measurement-error probability pme, the expectation values of (a.i) L in the standard GME witness L in Eq. ( for all x ∈ {1, 2, 3, 4, s} implies GME of the quantum state . Importantly for us, the | Bell state is the one-dimensional code space of the stabilizer generators {XZ, ZX}, implying that conditional GME witnessing can be performed solely by local Pauli measurements on qubits. Furthermore, for the implementation of conditional GME witnessing we need 3 settings per bipartition, hence a total of 15 measurement settings.

Phenomenological depolarizing noise model
The contour plots of Fig. 13 present the results of the three witnessing techniques with the four test operators to the 6-qubit FT plaquette that suffers from the circuit noise of Eq. (32)  [f|x] and L 2 [f|x] behave equally for x = 3, 4, s and x = 1, 2, respectively; see the top panel of Fig. 15. This is due to the symmetry of the error channel with respect to each individual qubit, hence our choices of x in Figs. 13. c and d. In all plots the dark blue shaded areas represent states for which tests result values below the separability bounds and no GME is detected. As we can see, the increase in the noise tolerance of conditional GME witnessing compared to the standard methods is remarkable. Setting φ = π/4, we find that for p me = 0 our conditional witnessing method shows the highest robustness against the depolarizing noise up to p ≈ 0.21 and p ≈ 0.26 as shown in Figs. 13. c and d, respectively. With the standard method ( Fig. 13. a) the noise resilience drops to p ≈ 0.11 and its lowest value is seen for the second SL method (Fig. 13. b) at p ≈ 0.04. Here again, we clearly observe that linearizing the number of measurements typically results in a reduction of the robustness. Similarly, by fixing the probability of depolarizing error to p = 0, one notices that the measurement error probability p me also reaches its highest threshold value for our conditional witnessing methods both close to 0.2. For the standard witnessing method we get a threshold of p me ≈ 0.08 whilst it reaches its lowest values for the second SL witness at p me ≈ 0.04.

Two-qubit depolarizing noise model
We now assume that the 6-qubit FT plaquette suffers from the more realistic circuit noise of Eq. (33) which applies a two-qubit depolarizing channel after each entangling gate. As before, we have also included the measurement noise effects as per Eq. (36). Figure 14 represents the resulting contour plots of the expectation values for φ = π 4 of (a) the standard witness of Eq. (48), (b) the SL witness of Eq. (50), (c) our conditional witness of Eq. (51) for x = s and (d) our conditional witness of Eq. (52) for x = 2. The conditional bipartitions [f|s] and [f|2] chosen here are the ones in which the conditional GME witnessing performs the worst as shown in the bottom panel of Fig. 15. We observe that with increasing error-growth rate r the threshold for p decreases. However, even for the worst case scenario, the conditional GME witnessing represented in Figs. 14 c and d show significant robustness compared to the standard witnesses for each r. By comparing the effects of the two different noise models shown in Figs. 13 and 14, one notices again that the more realistic two-qubit depolarizing noise results in higher thresholds of detectable GME states than the phenomenological noise. Within both error models, the conditional GME witnessing methods are not just more efficient in the number of measurement settings, but also more robust against errors compared to their standard counterparts.

VII. CONCLUSIONS AND OUTLOOK
We have introduced conditional entanglement witnessing as a robust and efficient technique to test GME in multipartite quantum systems. We proved that, to show GME in a n-partite system it is sufficient to conditionally verify entanglement in just n−1 conditional bipartitions. We then introduced the conditional GME witnessing technique and applied it to non-FT and FT readout circuits for stabilizer operators. This enabled us to characterize the performance of these circuits as building blocks of larger topological QEC codes in terms of their power for generating GME entanglement.
In particular, we picked a g x syndrome-readout plaquette of the d = 3 topological color code and its flag-based FT version adapted to a shuttling-based trapped-ion platform. We have demonstrated the efficiency and robustness of the conditional witnessing compared to the standard witnessing method when the plaquette circuit undergo phenomenological and two-qubit gate depolarizing noise and measurements suffer from bit-flip errors. In terms of efficiency, for the 5-qubit non-FT scheme, in general, the number of measurement settings needed in the standard fidelity witnessing is 31, whilst the SL approach of Ref. [28] needs 2 settings, at the expense of a higher fragility in the presence of noise. Our conditional witnessing requires 12 settings, but we note that its growth remains linear in the number of qubits in contrast to the exponentially-increasing complexity of the fidelity witness.
For the 6-qubit FT scheme, the number of measurement settings for the standard fidelity witness rises to 63 whereas our conditional witnessing only requires 15 where one can already observe the exponential versus linear advantage. In this case, one SL witness worked at the cost of a significant drop in the noise robustness. With regards to the robustness of these methods, the conditional GME witness hereby proposed yields a significant increase in the noise tolerance compared to both the standard fidelity estimate, and SL witnesses.
We are convinced that, with the current technology where the addition of each qubit amplifies the unavoidable noise and errors, it is beneficial to use our conditional entanglement witnessing scheme to certify the entangling power of quantum processors wherein the output states are generic mixed states far from ideal expected output states. Moreover, it can also be applied to a broad variety of protocols where efficient entanglement certification plays an important role [91][92][93][94]. Last but not least, an interesting direction for further research is to evaluate and compare the performance of the witnessing methods discussed here under more refined microscopic noise models. the non-FT and (b) the flag-based FT readouts of the generators g (q) z (Eq. (3)) of the plaquette q in Fig. 1. The data qubits i1, i2, i3, i4 correspond to the four physical qubits of this plaquette.

Flag-based FT circuit
We now consider the FT version of the Z-type parity check by adding a flag-qubit as shown in Fig. 16. b. As in the previous case, the data and the syndrome qubits are initialized in |+ ⊗4 and |0 s respectively, whereas the flag qubit is prepared in |+ f . The expected output state is then given by As discussed in the main text, in this scheme the flag qubit will detect the presence of a single error on the syndromequbit that propagates to multiple errors on the data qubits, thus enabling the preservation of the encoded information. For example, if a single Pauli Z error occurs between the second and the third data-to-syndrome CNOT gates in Fig. 16. b, it leads to the state where the flag has been flipped. A final projective measurement on the flag qubit thus reveals the error. wherein Here, we give the exhaustive list of separability bounds for L, with respect to each bipartition B within the set of all 31 possible bipartitions B and show that they are either 1 2 or 1 4 . In the most general form, the solution to Eq. (B3) is obtained by solving a set of coupled nonlinear eigenvalue equations called multipartite separability eigenvalue equations [26,45]. This is a highly nontrivial problem to solve in general. Nevertheless, in some cases, including the example at hand, we can obtain the bounds without directly solving these equations and by merely relying on the properties of |ψ out . In particular, the property we use here is the following. Consider a bipartite pure state of the form such that i|j = δ ij and ψ i |ψ j = δ ij . Using techniques from Refs. [26,45], we infer that the maximum separability bound is In other words, biorthogonality properties of the local Schmidt bases allow us to read the separability values off the Schmidt rank of |ψ . It turns out that that we can use this result in the specific case of |ψ out in Eq. (B2). We skip writing down Schmidt decompositions with respect to individual bipartitions, as this is straightforward, and merely list the separability bounds in Tab. I. Nevertheless, to give an example, we notice that |ψ out in Eq. (B2) is written in its Schmidt decomposition with respect to the bipartition (f|s, 1, 2, 3, 4) with an Schmidt rank of 2 and it is of the form of Eq. (B4), hence l f|s,1,2,3,4 = 1 2 .

Non-FT circuit
In Fig. 17 the circuit for Z-type syndrome readout using the native trapped-ion language is shown. We start by initializing the data qubits in |− ⊗4 and the syndrome-qubit in |+ s . Similar to the CNOT-based circuit, this is expected to produced the output state with the same stabilizer generators as given in Eq. (A2). This means that |ψ out in Eq. (C1) is a +1 eigenstate of the five generating stabilizers g i from Eq. (A2) and all their possible combinations.

Flag-based FT circuit
Here, we present the flag-based g z readout circuit using the trapped-ion native gate set. Recall that, to generate entangle-ment between the flag, syndrome, and data qubits we need to inject an error of the form exp(iφX) in a controllable way; see where the stabilizer subgroup is given by SX ,6q = g 1 = X 1 Z 3 Z 4 Z 5 Z 6 , g 2 = X 2 Z 3 Z 4 Z 5 Z 6 , g 3 = X 3 X 5 , g 4 = X 4 X 5 , g 5 = −Z 1 Z 2 X 5 Z 6 , g 6 = −Z 3 Z 4 Y 5 Y 6 .

(C3)
Appendix D: Error propagation through ZZ-gates In Fig. 19 we give the Pauli-error propagation rules through the ZZ-entangling gates of trapped-ion platforms. These come in handy in calculating the output states, e.g. that of Eq. (31). FIG. 19. Error propagation through ZZ-gates. A Pauli-X (Y ) error propagates as a Y (X) error and a Z error onto the second qubit. An incoming single Z error commutes with the ZZ-gate and therefore does not propagate onto the second qubit.