Flying-cat parity checks for quantum error correction

Long range, multi-qubit parity checks have applications in both quantum error correction and measurement-based entanglement generation. Such parity checks could be performed using qubit-state-dependent phase shifts on propagating pulses of light described by coherent states $\vert\alpha\rangle$ of the electromagnetic field. We consider"flying-cat"parity checks based on an entangling operation that is quantum non-demolition (QND) for Schr\"odinger's cat states $\vert\alpha\rangle\pm \vert-\alpha\rangle$. This operation encodes parity information in the phase of maximally distinguishable coherent states $\vert\pm \alpha\rangle$, which can be read out using a phase-sensitive measurement of the electromagnetic field. In contrast to many implementations, where single-qubit errors and measurement errors can be treated as independent, photon loss during flying-cat parity checks introduces errors on physical qubits at a rate that is anti-correlated with the probability for measurement errors. We analyze this trade-off for three-qubit parity checks, which are a requirement for universal fault-tolerant quantum computing with the subsystem surface code. We further show how a six-qubit entangled"tetrahedron"state can be prepared using these three-qubit parity checks. The tetrahedron state can be used as a resource for controlled quantum teleportation of a two-qubit state, or as a source of shared randomness with potential applications in three-party quantum key distribution. Finally, we provide conditions for performing high-quality flying-cat parity checks in a state-of-the-art circuit QED architecture, accounting for qubit decoherence, internal cavity losses, and finite-duration pulses, in addition to transmission losses.


I. INTRODUCTION
The ability to scale up quantum computers is crucial for the long-term goal of performing computations fault-tolerantly.Many current proposals for scaling up take a modular approach where groups of qubits at the nodes of a network are linked by quantum photonic interconnects [1][2][3].Recent experiments have shown significant progress, demonstrating entanglement distribution across nodes that are separated by tens of metres [4][5][6].In a distributed architecture, the ability to perform long-range (inter-node) parity checks would also provide a clear path towards implementing quantum error correction [7,8].
Many quantum error correcting codes, including the surface code [9][10][11], fall within a class of stabilizer codes [12] known as Calderbank-Shor-Steane (CSS) codes [13,14].In CSS codes, errors can be detected by measuring the parities of groups of qubits, given by the eigenvalues of stabilizer operators of the form X ⊗n and Z ⊗m , where X and Z are Pauli-X and Pauli-Z operators, respectively.Here, n and m are integers giving the weight of the stabilizer, equal to the number of qubits on which the operator acts nontrivially.A parity check can be performed using a sequence of entangling gates applied between an ancilla qubit and each of several code qubits.The ancilla qubit can then be measured to infer the parity of the code qubits.
Rather than mapping parity onto an ancilla qubit, parity information can more broadly be extracted by measuring any observable-not necessarily corresponding to a qubit observable-whose outcome depends on parity.In a circuit quantum electrodynamics (QED) architecture, for instance, this could be a shift in the resonance frequency of a microwave resonator dispersively coupled to multiple code qubits [27][28][29][30][31][32].
In an architecture involving photonic interconnects, a natural way to connect qubits is using pulses of light.An inter-node parity check could then be performed via qubit-state-selective phase shifts α → e iϕ α on a light pulse prepared in a coherent state |α⟩.Such stateselective phase shifts have been analyzed theoretically as a means of implementing quantum gates [33,34].In addition, small conditional phase shifts (ϕ < π) generated from weak light-matter interactions have been theoretically considered as a resource for parity measurements [35,36].More recently, large phase shifts (ϕ ≃ π) have been realized experimentally in both the optical [37,38] and microwave [39][40][41][42] domains.These experiments demonstrate the enabling technology for parity checks based on "flying-cat" states given by superpositions of macroscopically distinct coherent states, |C ± ⟩ ∝ |α⟩ ± |−α⟩, associated with propagating pulses of optical or microwave light.In ancilla-based parity checks (involving gates on a common ancilla qubit), measurement errors and gate errors typically have independent physical origins and thus occur with independent proba-bilities.This is not the case for flying-cat parity checks, where these two error sources are correlated with the average number of photons in the coherent state, |α| 2 .In particular, there is a trade-off between the rate of measurement errors (errors made in discriminating |±α⟩) and the rate of errors on code qubits due to backaction arising from photon loss.While the coherent-state distinguishability is controlled by a finite overlap ⟨α| − α⟩ that decreases with increasing |α| 2 , the rate of photon loss increases with increasing |α| 2 .
In this paper, we quantify the performance of flyingcat parity checks in the presence of photon loss.To do this, we derive a superoperator describing the backaction of photon loss on code qubits during a weight-3 flying-cat parity check.From this superoperator, error patterns on code qubits together with their associated error probabilities can be identified.This knowledge can then be used to optimize α to minimize the total error probability.High quality weight-3 parity checks have applications in both universal quantum computing with surface codes [43] and entanglement distribution in multi-node quantum networks.As a short-term demonstration of these ideas, we further show that weight-3 Pauli-X and Pauli-Z parity checks can be used to prepare a particular six-qubit entangled state.This state can be used for three-party controlled quantum teleportation of an arbitrary two-qubit state.It also provides a natural testbed for flying-cat parity checks in early implementations, en route to the more ambitious goal of performing faulttolerant quantum computation.
The layout of this paper is as follows.In Sec.II, we describe how qubit-state-selective phase shifts imprint parity information onto propagating light pulses.In Sec.III, we discuss the aforementioned trade-off between measurement errors and errors due to photon loss.Next, in Sec.IV, we illustrate how flying-cat parity checks can be used to generate entanglement in a multi-node network.In particular, we show how they can be used to prepare a six-qubit entangled state that provides a resource for three-party controlled quantum teleportation.Finally, in Sec.V, we establish conditions for implementing flying-cat parity checks in a state-of-the-art circuit QED architecture, accounting for imperfections due to finite-bandwidth pulses, internal cavity loss, qubit decoherence, and transmission losses.

II. COHERENT STATES AS PARITY METERS
A parity measurement of two or more physical qubits can be performed by allowing a propagating light pulse in coherent state |α⟩ to interact with each qubit according to the entangling operation described by where |0⟩ and |1⟩ are the qubit Pauli-Z eigenstates [with Z |s⟩ = (−1) s |s⟩ for s = 0, 1].This operation can be real-  [33,34,38,40,41].
ized by coupling a three-level system with states |1⟩ , |0⟩, and |e⟩ to a single quantized cavity mode, such that the |0⟩ ↔ |e⟩ transition is resonantly coupled to the cavity mode [33,34] (Fig. 1).An input coherent state |α⟩ occupying a propagating spatiotemporal mode (light pulse) that is resonant with the decoupled cavity frequency ω c will then acquire a different phase upon reflection from the cavity, depending on the qubit state.When the qubit is in state |1⟩, the cavity frequency is unaffected by the presence of the qubit, and the input pulse is reflected with a π phase shift [44].However, when the qubit is in state |0⟩, hybridization of the qubit and cavity suppresses the cavity density of states at ω c , and the input pulse is reflected with no phase shift.This is of course not the only way of realizing the interaction given in Eq. (1).Another way to realize this scenario can be achieved in the dispersive regime (see Sec. V below for a detailed discussion of this second strategy).
After interacting with n qubits in state |s 1 s 2 . . .s n ⟩ (s i ∈ {0, 1}), |α⟩ will have acquired a total phase shift (−1) s = e isπ , where s = i s i (mod 2) is the Z-basis parity of the n qubits: The use of such an entangling interaction for continuous stabilization of a Bell state was analyzed theoretically in Ref. [45] and demonstrated experimentally (with phase shifts < π due to a small dispersive coupling) with superconducting qubits in Ref. [46].Switching from Z-basis to X-basis parity checks simply requires that Hadamards be applied to the qubits both before and after the entangling operation described in Eq. ( 1): where here, X |±⟩ = ± |±⟩.Hence, for both X-and Z-basis parity checks, the parity of the code qubits can be inferred by measuring the phase of the coherent-state amplitude.
A. Weight-3 checks are enough Many quantum error correcting codes are formulated as stabilizer codes [12] defined by a stabilizer group S. The associated code space C is then given by the span of the vectors |ψ⟩ stabilized by S, i.e., satisfying S j |ψ⟩ = |ψ⟩ for all stabilizers S j ∈ S. In the usual surface code [11], for instance, correctable errors can be detected by measuring weight-4 stabilizers of the form X ⊗4 and Z ⊗4 .
A surface code can alternatively be operated as a subsystem code [43] [Fig.2(a-c)].A subsystem code [47][48][49] is defined by a non-Abelian gauge group G together with an Abelian stabilizer subgroup S ⊆ G.This construction allows the code space C stabilized by S to be partitioned into subsystems, C = A ⊗ B. Here, the subsystems A and B are defined by the action of gauge operators g ∈ G, which may act nontrivially only on subsystem B: Errors acting on the codespace are then defined only up to an equivalence relation involving G.In particular, error operators E and E ′ are equivalent in their action on encoded logical information (in subsystem A) if E ′ = Eg for some g ∈ G.Much of the appeal of subsystem codes comes from the fact that stabilizer eigenvalues can be inferred from measurements of lower-weight gauge operators.For the subsystem surface code [43] [Fig.2(a-c)], for instance, the eigenvalues of the weight-6 stabilizers X ⊗6 can be inferred by multiplying together the measurement outcomes of two weight-3 gauge operators of the form X ⊗3 .Correctable errors in a surface code can therefore be detected using weight-3 parity checks only (as opposed to the usual weight-4 parity checks), with a fault-tolerance threshold of order 1% [43,50].Gates on logical qubits can be performed as in the usual surface code [11,43].With this long-term application in mind, we consider error sources-photon loss and finite coherent-state distinguishability-that are specific to weight-3 flying-cat parity checks [Fig.2(d)] and show how to minimize their total impact.Further error sources (finite-duration pulses, internal losses, and qubit decoherence) are assessed in Sec.V, below.
An important advantage of the subsystem surface code is that errors on ancilla qubits used for syndrome readout propagate onto at most one other qubit, modulo gauge operators [43].The extra degree of freedom provided by the gauge group therefore eliminates the horizontal hook errors considered in Ref. [51] for the surface code, wherein ancilla-qubit errors propagate onto several qubits.

III. TRADE-OFF BETWEEN MEASUREMENT ERRORS AND ERRORS DUE TO PHOTON LOSS
Parity checks performed using coherent states exhibit an unavoidable trade-off between error sources depending on the average number of photons per pulse, |α| 2 .Due to the non-orthogonality of |±α⟩, larger field amplitudes α yield better measurement fidelities.However, they also produce a stronger backaction on the code qubits in the presence of photon loss.In this section, we consider these two competing error sources: measurement errors and errors due to photon loss.
In a real-world implementation, there may be a number of other error sources affecting the quality of the operation required for parity checks [Eq.(1)].For example, the qubit-state-dependent conditional phase introduced may not be precisely π, phase noise or thermal light may corrupt the prepared coherent states, and photodetectors may suffer from amplifier noise, dark counts, etc.In this section, we assume that these implementation-dependent imperfections lead to a background error rate that can be controlled, leaving the effects of photon loss and imperfect coherent-state distinguishability as the dominant error sources.These effects are likely to be common to any implementation.We consider several additional sources of error in the specific context of a circuit-QED setup in Sec.V.

A. Photon-loss-induced backaction
In this subsection, we evaluate the backaction of photon loss on the state of the three code qubits involved in the parity check.Photon loss during a flying-cat parity check can lead to two-qubit correlated errors on the code qubits (horizontal hook errors, Fig. 3).As is the case for parity measurements via noisy ancilla qubits [43], these horizontal hook errors are gauge-equivalent to singlequbit Pauli errors, and they can therefore be corrected as if they were single-qubit Pauli errors.This key advantage of the subsystem surface code is therefore retained for flying-cat parity checks.
To perform a weight-3 parity check, a coherent state |α⟩ will interact with three qubits.In what follows, it will be helpful to define the even and odd (Z-basis) parity subspaces given by We write the state |Ξ⟩ of the three qubits prior to the parity check as where |Ξ ± ⟩ ∈ H ± , and where σ=± |c σ | 2 = 1.In the absence of photon loss, the states |Ξ ± ⟩ are preserved by Eq. ( 1): To perform an X-basis parity check, Hadamards are simply applied before/after the Z-basis parity check, as described in Eq. (3).In that case, we take |Ξ⟩ to describe the state of the three qubits after the first set of Hadamards.
In the presence of photon loss, the parity check has a backaction on the code qubits that leads to the introduction of errors beyond the background error rate.We

FIG. 2. (a)
The unit cell of the subsystem surface code [43].Physical qubits represented by solid black dots are located on the edges and vertices of a square lattice.(b) Gauge operators: Each stabilizer can be represented as the product of two weight-3 gauge operators.Gauge operators do not all mutually commute, but they do commute with all stabilizers and therefore preserve the code space.(c) Stabilizers of the subsystem surface code: Each unit cell hosts two stabilizers, one of the form Z ⊗6 (left) and one of the form X ⊗6 (right).(d) A light pulse is prepared in a coherent state |α⟩ and interacts sequentially with three qubits.The interaction of the light pulse with each qubit results in the entangling operation of Eq. ( 1).Photon loss in transit is modeled by a series of beam splitters having reflectivities ηi (i = 1, 2, 3).The parity of the code qubits is inferred by performing a phase-sensitive measurement of the coherent state amplitude.This phase-sensitive measurement could be achieved through homodyne detection by interfering the light pulse with a reference signal and measuring the resulting intensity.model the effect of photon loss to the environment via a beam splitter-type interaction [52] where here, a is an annihilation operator defined such that a |α⟩ = α |α⟩, a ℓ is associated with an environmental loss mode into which photons may be scattered, and η is the beam splitter reflectivity.Under this operation, where here, | ⟩ ℓ is the state of the loss mode.Although coherent-state amplitude may be lost to many different environmental modes in principle, these modes can be treated as a single effective mode since the state of the environment will eventually be traced over.To account for the effect of loss at different points in the parity-check operation, we imagine that the light pulse undergoes such a beam splitter interaction R(η i ), i = 1, 2, 3, after every entangling operation [Fig.2(d)].Accounting for loss in this manner, the initial state |s 1 s 2 s 3 ⟩ |α⟩ |0, 0, 0⟩ ℓ of the qubits, coherent state, and environment (here, |0, 0, 0⟩ ℓ denotes the vacuum state of the three loss modes) evolves into where s = s 1 + s 2 + s 3 (mod 2) is the Z-basis parity of , and where The joint state ρ of the qubits and electromagnetic field following the entangling operations (but prior to mea-surement) can then be obtained by tracing over the loss modes: where ρ ±,± ∈ H ± .For |Ξ + ⟩ = i=0,3,5,6 c i |i⟩, where here, i is the base-10 value of s 1 s 2 s 3 in binary, ρ +,+ takes the following form in the basis The block ρ −,− /|c − | 2 takes the same form as Eq. ( 11) under the mapping (0, 3, 5, 6) → (1, 2, 4, 7).The offdiagonal blocks ρ ±,∓ ∝ c ± c * ∓ in Eq. ( 10) appear as a result of considering an initial state |Ξ⟩ [Eq.( 5)] of mixed parity and will be suppressed exponentially ∼ e −2| ᾱ| 2 in the final post-measurement state.
In the absence of photon loss (η j = 0 for j = 1, 2, 3), due to the photon-loss-induced backaction of the parity check.Hence, while the interaction with the electromagnetic field remains quantum non-demolition (QND) in the parity of |s 1 s 2 s 3 ⟩ in the presence of photon loss, it is no longer QND in |Ξ ± ⟩ as desired.It may be verified that the backaction leading to this non-QND character can be described by the composition of two dephasing channels: where and where The approximations in Eq. ( 13) are valid to leading order in η j ≪ 1.
The operators E 1,2 can be understood as follows: In the cat-state basis |C ± ⟩ ∝ |α⟩ ± |−α⟩, Eq. ( 1) describes a CZ gate for any nonzero α.Since |C ± ⟩ are eigenstates of the photon-number parity operator e iπa † a , the loss of a photon constitutes an X error, Hence, as a result of the CZ gates involved in the parity check, photon loss leads to Z errors on the code qubits.(Generally speaking, an X error on qubit a, propagated

Operator
Error E introduced Prob(E) being measured by photon loss through a CZ acting on qubits a and b, leads to a Z error on qubit b.)These Z errors appear in the combination E 1 = Z 2 Z 3 for photon loss occurring between qubits 1 and 2 (Fig. 3), and as E 2 = Z 3 for photon loss occurring between qubits 2 and 3.In a surface code where stabilizer parity checks are performed using propagating pulses of light, photon loss would therefore lead to correlated (horizontal hook) errors on code qubits.However, due to the gauge degree of freedom introduced by the gauge group, the horizontal hook error Z 2 Z 3 introduced by the parity check [cf.Eq. ( 12)] is equivalent to the single-qubit error Z 1 [9].This is because Since X-basis parity checks differ only by some additional Hadamards applied to ρ [Eq.(10)], the effects of photon loss during X-basis parity checks are instead equivalent, up to a gauge operator, to single-qubit X 1 and X 3 errors occurring with the same probabilities (Table I).These errors are not detected by the parity check in which they are introduced (since Z-basis parity checks only detect X errors and vice versa), but may be detected in the next parity check of the other basis.

B. Measurement errors
Determining the parity of two or more qubits using this approach requires a phase-sensitive measurement of the electromagnetic field (to infer the sign of α).Such a measurement can be implemented via homodyne detection [54].In homodyne detection, a signal field is first mixed on a 50:50 beam splitter with a local oscillator in coherent state |β⟩, and the output intensity is then measured, giving information about the phase of the signal relative to the local oscillator.In this case, the signal field is the propagating light pulse entangled with the state of the qubits [Eq.(10)].Without loss of generality, we assume that α is real and positive, α ∈ R + .With a strong local oscillator (β ∈ R ≫ α), homodyne detection implements a projective measurement |x⟩⟨x| onto the x eigenbasis [54], where here, |x⟩ is an eigenstate of x = (a † + a)/ √ 2. The sign ± = sign(x) of the measured displacement can then be taken as an inference of even (+) or odd (−) parity for the state of the qubits.In the event that α is complex, the measured quadrature can be adjusted by introducing a phase on the local oscillator: β → βe i(φ−π) .In that case, the projection is instead onto an eigenstate of xφ = x cos φ+ p sin φ, where [x, p] = i [54].
Given ρ [Eq.( 10)], the state ρ x of the code qubits conditioned on the measurement outcome x is then given by where p(x) = Tr{|x⟩⟨x| ρ}, and where Tr EM {• • • } denotes a partial trace over the state of the electromagnetic field.This quantity can be evaluated straightforwardly using the representation ⟨x|ᾱ⟩ = π −1/4 e − 1 2 (x− √ 2 ᾱ) 2 of |ᾱ⟩.For a thresholded decision, where x > 0 (x < 0) is taken to indicate even parity (odd parity), the post-measurement state for an inference of even parity is given by with a similar expression for ϱ − involving an integral from −∞ to 0. The joint probability P (" ± ", ∓) of the state being odd/even (∓) for an inference of even/odd parity (" ± ") is where Π± is a projector onto H ± and erfc(x) is the complementary error function.The error p M associated with the measurement is then given by The total probability of an error occurring as part of a parity check-either an incorrect parity inference or a code-qubit error-is then (neglecting corrections of order p i p j for p i ≪ 1): In the second, approximate equality, we have neglected subleading corrections in η j |α| 2 < 1 and approximated the error function by its asymptotic form for |α| > 1.
Since errors introduced by photon loss occur at a rate that increases with α (∼ η j |α| 2 ), while measurement errors are suppressed for large α (∼ α −1 e −2α 2 ), there is an inherent trade-off between the two types of error as a function of coherent-state amplitude.Their total impact can therefore be minimized by optimizing α (Fig. 4).
In light of the nonlinear (exponential) suppression of p M with |α| 2 , it is natural to consider whether repeating the measurement can lead to a smaller error.In this case, a single-shot measurement with a coherent state of amplitude α = √ N α 0 leads to the same measurement error p M as a sequence of N measurements performed with smaller coherent state amplitudes α 0 .However, this equivalent performance can only be reached if a soft decision is made, where each measurement outcome x k (k = 1, 2, . . ., N ) is assigned a confidence p(±|x k ) = Tr{ Π± ρ x k }, and where the individual outcomes are correlated in determining the most likely parity.If instead, each of the N measurements is thresholded independently leading to a majority-vote decision, the error is less favorable, p M,th ∼ √ p M (up to logarithmic corrections for large N ) [55].The large discrepancy between the error for a thresholded (hard) decision and the soft decision is a feature of the Gaussian distribution of measurement outcomes x k [55,56], a model that is accurately realized for measurement of a coherent state quadrature.Exploiting this soft-decision advantage in repeated measurements with weak pulses may prove useful if the amplitude of each coherent state is limited for technical reasons (nonlinearity, unwanted qubit excitation, amplifier noise, etc.).

IV. ENTANGLED RESOURCE STATES
In addition to enabling quantum error correction, flying-cat parity checks could also be used to distribute entanglement in a quantum network, with applications in both quantum computing and quantum communication.In this section, we discuss the concrete example of generating three-qubit Greenberger-Horne-Zeilinger (GHZ) states.GHZ states have applications in precision sensing and multi-party quantum communication.They could also be used as the central resource for weight-3, ancillabased inter-node parity checks using the approach of Refs.7 and 8 (an alternative to the strategy for direct parity checks described above).We further show how to create a particular six-qubit entangled "tetrahedron" state using only X-and Z-basis weight-3 parity checks FIG. 4. The total error ptot [Eq.(18)] is given by the sum of competing terms: measurement errors, which decrease with α, and errors due to photon loss, which increase with α.For simplicity, we assume that ηi = η for all i. and single-qubit gates.This state can be used as a resource for three-party controlled quantum teleportation of an arbitrary two-qubit state.Its preparation also provides a convenient setting in which to benchmark the performance of the parity checks themselves.

A. A three-qubit GHZ state
An alternative, established approach to long-range parity checks involves the generation and consumption of four-qubit GHZ states [7,8].In this setup, each node houses a code qubit and (at least) one ancilla.To perform a parity check, four ancilla qubits located at four different nodes are prepared in a GHZ state.The parity of the code qubits located at these nodes can then be inferred by applying controlled-NOT gates between the code qubit and the ancilla located at each node, then measuring all ancillae.The distributed GHZ state in this proposal could be generated, in principle, via flying-cat parity checks.Although the original proposal of Refs.7 and 8 focused on weight-4 parity checks, weight-3 checks are sufficient to operate a subsystem surface code, as described above, so in this section we consider the preparation of three-qubit GHZ states.The ancilla-based approach of Refs.7 and 8 may be preferable over a direct flying-cat parity check in the case where the photon loss rate is high, leading to a high probability of errors being introduced on the code qubits.The low-fidelity GHZ states produced in the presence of high photon loss could then be purified "offline" prior to being consumed as part of a parity check, as considered in Refs.[7,8].
A simple measurement-based strategy for three-qubit GHZ-state preparation begins with preparation of the three qubits in |+ + +⟩.Measuring Z 1 Z 2 and Z 2 Z 3 projects the qubits into an entangled state, which can then be transformed into |GHZ⟩ ∝ |000⟩ + |111⟩ with an X-gate correction on the appropriate qubit.For a mea-surement outcome Z 1 Z 2 = −1, this is qubit 1; for Z 2 Z 3 = −1, it is qubit 3; if both outcomes are −1, it is qubit 2. However, as described above in Sec.III, a Z-basis flyingcat parity check may introduce Z errors on the qubits.For a measurement of Z i Z j , these are single-qubit Z j errors occurring with probability p ij = (1 − e −2ηij |α| 2 )/2, where here, η ij is the beam splitter reflectivity quantifying the strength of the losses incurred while traveling between qubits i and j.Measurement errors occurring with probability q ij = erfc[ √ 2(1 − η ij )α]/2 will also result in the wrong correction operator being applied.In the presence of photon loss and accounting for measurement errors, the two parity checks and correction step described above will lead to preparation of the following mixed state: where p = i p i = p 12 + p 23 − p 12 p 23 + q 12 + q 23 + q 12 q 23 , and where ⟨GHZ|i ⊥ ⟩ = 0 for all i.Since |GHZ⟩ can be described as the simultaneous +1 eigenstate of a set of CSS stabilizer generators-namely, Z 1 Z 2 , Z 2 Z 3 , and X 1 X 2 X 3 -several noisy copies of σ distributed across three nodes ("Alice", "Bob", and "Charlie") could be purified using any CSS error-correcting code, e.g., C 4 [57].In the case of C 4 , this protocol would require that Alice, Bob, and Charlie share four copies of σ.They would each measure the stabilizers of C 4 on their four qubits, and then use local operations and classical communication to produce a less noisy, encoded version of σ [57].Since the six-qubit "tetrahedron" state discussed in the following subsection also has a description in terms of a set of CSS stabilizer generators, the same protocol [57] could be used to purify this state as well.

B. A six-qubit entangled state
In this section, we show how weight-3 parity checks can be used to prepare a "tetrahedron" state-a six-qubit entangled state where each qubit can be associated with one edge of a tetrahedron [Fig.5(a)].This state provides a source of shared randomness with potential applications for three-party quantum key distribution.A tetrahedron state can also be used as a resource for controlled quantum teleportation of an arbitrary two-qubit state.Independent of these potential applications, the tetrahedron state provides a natural testbed for benchmarking the performance of weight-3 flying-cat parity checks (since its preparation requires both X-and Z-basis parity checks).
The tetrahedron state spans the codespace of a (trivial) CSS code admitting a set of stabilizer generators that can be associated with the faces and vertices of a tetrahedron [Fig.5(a)]: FIG. 5. (a) Six qubits can be associated with the six edges of a tetrahedron.Each of the stabilizers in Eq. ( 20) is a product of three Pauli-Z or Pauli-X operators acting on qubits that neighbor a common face (Z) or vertex (X).(b) A potential real-space setup for applications discussed in the main text: Each node (A, B, C) contains a pair of qubits whose associated tetrahedron edges have no face nor vertex in common.Every parity check required for preparation of |T⟩ [Eq.( 20)] involves only one qubit at each node.For nodes (A, B, C) implemented via the cavity-QED realization shown in Fig. 1, the three qubits not being measured during a given parity check can be made inactive by detuning them from their respective cavities.
It may be verified that the stabilizers associated with the remaining face and vertex are simply given by S 1 S 2 S 3 and S 4 S 5 S 6 .The stabilizer eigenvector relations S i |T⟩ = |T⟩, i = 1, 2, . . ., 6, admit one common eigenstate, the tetrahedron state: where If node A houses qubits 1 and 2, node B qubits 3 and 4, and node C qubits 5 and 6 [Fig.5(b)], then the outcomes of Bell measurements at nodes A-C are uniformly distributed across Bell states but perfectly correlated across nodes.A tetrahedron state can therefore provide Alice, Bob, and Charlie with two bits of shared randomness, which could be used to build a shared private key for cryptography.With the qubits partitioned in the manner described above, every stabilizer S i in Eq. ( 20) involves one qubit at each node.Preparation of |T⟩ can be achieved in two steps, starting from a random initial state.In the first step, all S i are measured using flying-cat parity checks.At this point, each stabilizer measurement returns a random outcome, σ i = ±1.In the second step, the −1 outcomes are treated like an error syndrome and the appropriate correction operator (identified in the manner described below) is applied, transforming the postmeasurement state into the target state |T⟩.
Since |T⟩ [Eq.( 21)] is the non-degenerate ground state of − i S i , the code defined by S i is trivial, reflecting the trivial genus-0 topology of the tetrahedron.Despite the absence of logical qubits (which, in a toric-code construction [58], requires that − i S i have degenerate ground states), the code nonetheless serves as a quantum memory for |T⟩: Given full syndrome information, consisting of the six eigenvalues σ i of S i , any number of X and Z errors can be corrected using a simple syndrome-decoding algorithm.The procedure is identical for X and Z errors, so without loss of generality, we give the decoding procedure for X errors: 1. Measure the Z-basis stabilizers S 1−3 .If the syndrome is (1, 1, 1), then no correction is required.All other errors can be divided into two classes: 2. Class I errors: If syndrome j in Table II is obtained, then apply an X gate to qubit j.

Class II errors: If the syndrome consists entirely
of −1 outcomes, then apply X gates to any pair (1, 2), (3,4), or (5, 6) of qubits having no face nor vertex in common.
Any number of X errors can be corrected in this way: Single-qubit errors are reversed, while multi-qubit X errors corrected as single-qubit X errors are transformed either into S 4−6 or into products thereof, all of which act trivially on |T⟩.As an example, consider the scenario where qubits 1 and 3 have undergone bitflip errors.
For states (like |T⟩) having a description in terms of a set of CSS stabilizer generators, it is known that the maximal Schmidt coefficient across bipartitions is α |T⟩ = 1/2, and that the witness W can be expressed in terms of the CSS stabilizer generators [61]: The expectation value ⟨W⟩ can be estimated using two measurement settings only: one where all qubits are measured in the Z basis, and one where all qubits are measured in the X basis.The fidelity F = ⟨T|ρ|T⟩ = 1/2 − ⟨W⟩ of some noisy state ρ relative to |T⟩ can therefore be estimated using single-qubit measurements, independent of the parity checks that were used to create the state.This provides an avenue for benchmarking the quality of the weight-3 flying-cat parity checks used to prepare |T⟩.When a complete set of parity checks is performed starting from some initial state, a set of six eigenvalues {σ i } is found.In the absence of measurement errors or errors due to photon loss, the operation required to transform the initial state into |T⟩ can be correctly identified based on these eigenvalues.A measurement error, however, will lead to the wrong operation being applied, resulting in the creation of a state orthogonal to |T⟩.Errors on physical qubits can also be introduced by photon loss during a parity check.This loss-induced backaction takes the form of stochastic Z errors (X errors) during measurement of Z-basis (X-basis) parity checks.Such errors could be corrected in subsequent error-correction cycles using the decoding procedure explained above.However, any errors introduced by the last set of parity checks (prior to any measurements occurring at nodes A-C) remain uncorrected.If, for instance, this last round of checks consists of Z-basis parity checks, then |T⟩ may be affected by uncorrected Z errors, which also produce states orthogonal to |T⟩.To leading order in p 1,2 , and neglecting corrections O(p 1,2 p M ), we then have FIG. 6.The preparation fidelity F = ⟨T|ρ|T⟩ accounting for measurement errors and errors due to photon loss.
Here, the term gives the probability of making at least one measurement error across the six stabilizer measurements, while the term 3(p 1 + p 2 ) gives the probability of photon loss introducing an error during the last set of parity checks (consisting of either three X-basis or three Z-basis checks).Notably, in the limit α → 0, we have ⟨W⟩ = 1/2 − 1/2 6 , giving F = 1/2 6 .This is the fidelity expected from randomly guessing the six stabilizer outcomes and applying a correction based on these guesses.

Controlled quantum teleportation
The tetrahedron state can be used as a resource state for three-party controlled quantum teleportation.Controlled quantum teleportation of a single-qubit state using a three-qubit GHZ state was introduced in Ref. [62], and since then, many protocols extending the scheme to multiqubit states using various resource states have been proposed [63][64][65][66][67][68].The premise underlying this protocol is that Alice and Bob should be able to teleport quantum states with unit fidelity only with Charlie's cooperation.Here, the fidelity of a teleportation protocol is given by the fidelity of the state reconstructed by Bob relative to Alice's original state.In Ref. [69], Li and Ghose introduced the notion of control power to quantify Charlie's influence over the fidelity of the teleportation protocol.The control power is equal to 1 − F for an average teleportation fidelity F .For teleportation of a two-qubit state, Charlie's control power must be 1 − F ≥ 3/5 in order to prevent Alice and Bob from benefiting from their shared entanglement [70].Not all entangled states meet this criterion, but we now show that the state |T⟩ does.
We imagine that Alice, Bob, and Charlie share one copy of |T⟩, with each party holding two qubits according to the partitioning shown in Fig. 5

(b). Alice has two additional qubits
which she wants to teleport to Bob.She performs Bell measurements on pairs of qubits (A 1 , 1) Correction operators for a two-qubit controlled quantum teleportation scheme using |T⟩ as the entangled resource state.and (A 2 , 2) and transmits the results to Bob, who applies the correction operators given in Table III.Once these correction operators have been applied, Bob and Charlie share one of four possible states: If Charlie wished to complete the teleportation, he would measure one of his qubits in the Z basis and the other in the X basis.He would then send the measurement outcomes to Bob, who would conditionally apply further corrections to his qubits according to Table III.When Bob is given both Alice's and Charlie's measurement outcomes, the fidelity of the teleportation protocol is unity.
With only Alice's information, however, Bob's qubits are in a mixed state ρ B obtained by tracing over Charlie's qubits.The fidelity ⟨φ|ρ B |φ⟩ of the teleportation protocol for state |φ⟩ can then be averaged over the Haar measure dφ to obtain the average fidelity corresponding to a control power of 1 − F = 3/5.The average teleportation fidelity that Alice and Bob achieve without Charlie's help is therefore only equal to the fidelity of the best classical strategy [71], in which Alice performs an optimal measurement of her two-qubit state and sends the result to Bob, who then attempts to reconstruct Alice's state on the basis of this classical information.The maximal fidelity for this classical strategy is given by the optimal fidelity for estimation of a quantum state, equal to 2/5 for a two-qubit system [72][73][74].
Charlie therefore has the power to prevent Alice and Bob from deriving any advantage (over classical strategies) from their shared entanglement.We note that the notion of control power given above only has meaning when the three parties share a pure state.Noise can, however, be incorporated under appropriate conditions [75].Whether the noisy tetrahedron state resulting from a sequence of flying-cat parity checks with finite measurement errors and finite photon loss provides sufficient control power is a question for future study, beyond the scope of the present work.

V. FEASIBILITY
In this section, we consider the feasibility of implementing flying-cat parity checks in a state-of-the-art circuit QED architecture [76], using currently realized experimental parameters.The basic elements of the parity check consist of: (i) an entangling operation realizing the qubit-state-dependent phase shift of Eq. ( 1), and (ii) propagation of the microwave-frequency light pulse through superconducting transmission lines and circulators [Fig.5(b)].We begin by discussing error sources related to (i), namely internal cavity losses and errors due to a finite pulse duration, and then errors due to qubit decoherence.

A. Entangling operation
To assess the quality of the entangling operation, here we focus on a circuit-QED setup consisting of a singlesided microwave cavity with a mode at frequency ω c , coupled to a transmission line with coupling rate κ 0 .In addition, the cavity is coupled via a transverse (Rabi) coupling g to a two-level system encoding a qubit with level splitting ω q .As in Fig. 1, we consider a regime where an incident microwave pulse prepared in a coherent state |α⟩ acquires a qubit-state-dependent phase shift upon reflection [α → (−1) s α for s = 0, 1].However, in contrast to the setup in Fig. 1, which relies on strong, resonant coupling and the existence of a third level, here we focus on an alternative approach due to its compatibility with qubits having no nearby third level, e.g., electron-spin qubits [77,78].A similar analysis could also be carried out for the setup in Fig. 1, leading to slightly different conditions.
Under the standard (Born-Markov) approximation for a wide-bandwidth transmission line, the cavity field evolves according to the quantum Langevin equation where r in (t) characterizes the complex amplitude of the incoming microwave pulse, and where κ int gives the rate of internal cavity losses.From Eq. ( 28) and the inputoutput relation [80], r out (t) = (2π) −1 dωe −iωt r out (ω) = r in (t)+ √ κ 0 ⟨a(t)⟩, we then find the qubit-state dependent reflection coefficient R s (ω) = r out (ω)/r in (ω): For an ideal narrow-bandwidth input pulse with ω ≃ ω c , and for negligible internal losses, κ int ≃ 0, a special choice of dispersive shift |χ| = κ 0 /2 leads to a phase shift α → R s (ω)α ≃ (−1) s iα [39,42].The operation of Eq. ( 1) can then be recovered with a change in phase reference, α → −iα.Deviations from the idealized assumptions above (e.g., finite-bandwidth pulses and finite internal losses κ int ̸ = 0) will generally lead to an imperfect entangling operation.
As a measure of quality for the entangling operation, we use the infidelity ε of the final joint state ρ imperfect of the qubit and microwave pulse obtained in the presence of imperfections, relative to the ideal final state |ψ ideal ⟩ = (|0, α⟩ + |1, −α⟩)/ √ 2 for a qubit initially prepared in |+⟩: Here, we have divided ε into a contribution ε qubit due to qubit decoherence (neglecting other error sources) and a contribution ε reflect due to the combined effects of internal cavity losses and finite pulse bandwidth (neglecting decoherence).
To quantify the effects of both finite κ int and finite bandwidth ∼ τ −1 (for a pulse with duration τ ), we assume that the spatiotemporal mode supporting state |α⟩ has waveform u(t), normalized according to dt|u(t)| 2 = 1 [34].Before the reflection, frequency mode ω of the transmission line is in a coherent state having amplitude αu(ω), where here, u(ω) is the Fourier transform of u(t).For an ideal entangling operation, the waveform would acquire a well-defined ±π/2 phase shift, u(ω) → ±iu(ω), conditioned on the qubit state, in which case we could simply write |α⟩ → |±iα⟩.However, in practice, αu(ω) → αR s (ω)u(ω).Evaluating the overlap of the ideal output state with the state resulting from a finite κ int and finite τ gives For a Gaussian waveform with width τ , corresponding in the frequency domain to |u(ω)| 2 = 2 √ πτ e −(ω−ωc) 2 τ 2 , the integrand in Eq. (31) Inserting this result into Eq.( 31), performing the Gaussian integral, then expanding to leading nontrivial order in κ int /|χ| and 1/(τ |χ|) gives Taking a large dispersive shift therefore has two benefits: first, reducing the effects of internal cavity loss ∼ κ int , and second, allowing for a faster error-correction cycle ∼ τ while maintaining a small error, ε reflect .The setup described above has been realized experimentally in, e.g., Ref. [42] for a transmon qubit coupled to a microwave cavity.For the values realized in Ref. [42] (κ int /2π = 0.22 MHz, χ/2π = −1.05MHz, and τ = 500 ns), and assuming α = 1, Eq. ( 33) gives a contribution to the infidelity ≃ 0.046 from the term ∝ 1/τ 2 and a contribution ≃ 0.004 arising from internal losses.The estimate above therefore suggests ε reflect ≈ 0.05, dominated by the finite-bandwidth pulses, although it should be noted that the pulse used in Ref. [42] was square, rather than Gaussian.Doubling the value of the dispersive shift (so that χ/2π = −2.10MHz) would reduce the error ∝ τ −2 to 0.01 for the same value of τ = 500 ns, comparable to the O(1%) threshold of the subsystem surface code [43,50].A much smaller value of κ int /2π ∼ 100 Hz also remains well within the state of the art [81].Therefore, we do not expect ε reflect to be a limiting error source for near-term implementations.
The expression for the reflection coefficient R s (ω) [Eq.( 29)] neglects the effects of qubit decoherence, which will also degrade the quality of the entangling operation.To guarantee a low probability of qubit decoherence on the timescale τ of the pulse, we require that min{T 1 , T * 2 } ≫ τ , where here, T 1 is the timescale for energy relaxation and T * 2 is the inhomogeneous dephasing time due to random fluctuations in the qubit splitting from shot to shot.For dephasing caused by a Markovian (short-correlation-time) environment, the homogeneous dephasing time T 2 is equal to T * 2 , and the decay of coherences is exponential with timescale T 2 = T * 2 .In Ref. [42], decoherence was limited by pure dephasing on a time scale T 2 = T * 2 = 6 µs, while the pulse had a duration of τ = 500 ns.To leading order in τ /T * 2 , a quick estimate for the infidelity due to decoherence is then given by Inserting the values for τ and T * 2 from Ref. [42] then gives ε qubit ≃ 0.08, comparable to the infidelity of 0.11 attributed to the effects of decoherence, based on a more sophisticated error model [42].Reducing the pulse duration therefore provides a clear avenue towards reducing errors due to decoherence.However, to maintain the same small value of ε reflect , a reduction in τ must be accompanied by a proportional increase in |χ|, as discussed above.

B. Transmission losses
For the setup illustrated in Fig. 5(b), sources of photon loss will likely include losses η trans incurred in transit, together with losses η circ due to chiral elements like circulators, giving Many superconducting interconnects are made of NbTi, for which typical attenuation rates are 5 dB/km, corresponding to losses of 68%/km [82].The architecture of Ref. [82] instead uses pure Al to achieve losses of 0.15 dB/km (3.4%/km), comparable to the values reached for fiber-optic cables carrying telecom-frequency light.
Hence, for a meter-scale experiment, η trans can likely be made negligible relative to other sources of loss.
In microwave platforms, chiral elements like circulators often lead to higher losses than those incurred during free propagation, due in part to the challenges of on-chip integration.In Ref. [6], for instance, circulators led to insertion losses estimated at η circ = 0.13.If the dominant source of error is circulator loss, a factor-of-two improvement would be sufficient to demonstrate multipartite entanglement in a tetrahedron state using the layout of Fig. 5(b), since ⟨W⟩ < 0 can be achieved for the entanglement witness W [Eq. ( 23)] provided η ≲ 0.05 [cf.Fig. 6].Significant effort has gone towards the development of microwave circulators compatible with on-chip integration [83,84], as this technology has already been identified as a key ingredient for scaling up superconducting processors.As a final comment, the circulators shown in Fig. 5(b) are not strictly necessary.They could be replaced by fast dynamical switches that control the path taken by the pulse.

C. Summary: Parametric constraints
For the circuit QED architecture considered above, where the entangling operation of Eq. ( 1) is realized in the dispersive regime, increasing the strength of the dispersive coupling provides a straightforward avenue towards increasing the fidelity of the entangling operation.Decoherence times are another important consideration.For min{T 1 , T * 2 } = 10 µs, and for the same value of κ int /2π = 0.22 MHz realized in Ref. [42], a possible combination of τ and χ giving ε ≈ ε qubit + ε reflect ≈ 0.01 is τ = 100 ns and |χ|/2π = 10 MHz.Dispersive shifts as large as 10 MHz have been realized experimentally for transmon qubits [85].
Assuming the layout of Fig. 5(b), preparing a tetrahedron state requires six stabilizer measurements, each involving three entangling operations, for a total of eighteen entangling operations.Accounting for errors in the entangling operations, an estimate for the maximum achievable preparation fidelity of the tetrahedron state is therefore F ≤ F max ≃ 1 − 18ε.Since a fidelity F > 1/2 is required to demonstrate multipartite entanglement [Fig.6], an ideal scenario is one where all error sources associated with the entangling operation (e.g.qubit dephasing, internal cavity losses, and finitebandwidth effects) can be controlled to the extent that 18ε ≪ 1/2 (ε ≪ 0.03).If this condition is met, then multipartite entanglement can be demonstrated with a photon loss rate as high as η ≈ 0.05 [Fig.6].As discussed above, this would require only a factor ∼ 2 improvement in the circulator insertion losses reported in Ref. [6].

VI. CONCLUSION
High-quality flying-cat parity checks could provide the ability to perform error correction in distributed architectures, where native qubit-qubit interactions are not typically available across nodes.However, operations involving propagating quasimodes of the electromagnetic field will introduce photon loss as a source of error on code qubits.
In this work, we have analyzed the trade-off between measurement errors and errors due to photon loss in the context of weight-3 flying-cat parity checks.We have shown how the total impact of these error sources could be minimized as a function of the coherent-state amplitude.In addition, we have verified that the horizontal hook errors due to photon loss remain gauge-equivalent to single-qubit errors for gauge operators of the form X ⊗3 , Z ⊗3 , so that flying-cat parity checks preserve this key advantage of the subsystem surface code.In the context of entanglement distribution, we also described how flying-cat parity checks can be used to generate threequbit GHZ states, as well as a six-qubit entangled "tetrahedron" state that can be used for controlled quantum teleportation of an arbitrary two-qubit state.Another result of this paper is the conditional post-measurement state ρ x of the data qubits following a phase-sensitive measurement of the electromagnetic field, incorporating both measurement errors and photon-loss-induced errors.This object can be used to find the conditional probabilities for error patterns on the code qubits, shot-by-shot for each measured value of x.In a quantum error correcting code, this probability could be passed to a decoding scheme that takes full advantage of this soft information [86][87][88].Finally, we have shown that high-quality flyingcat parity checks are feasible with current or near-future technology.
Flying-cat parity checks rely on sources and detectors for (classical) coherent states of light, rather than the single photons used to link nodes in several other quantumnetwork implementations.These parity checks therefore do not require single-photon sources or detectors, although they do require a high-quality stable source of coherent light and low-noise phase-sensitive measurements.We have only considered the simplest encoding (a singlemode input coherent state).In future work, it may be interesting to consider whether a more elaborate encoding could be used to simultaneously detect photon loss and parity using, e.g., a cat-code variant [89].Additionally, rapid qubit gates and dynamical decoupling sequences performed to preserve code qubits coupled to cavities will generically lead to bursts of light that can carry away information [90].Whether dynamical decoupling can be made compatible with flying-cat parity checks is an open question.
The flexible qubit connectivity enabled by the use of propagating light pulses could also provide an avenue towards realizing the nonlocal interactions required by certain quantum low-density parity-check (LDPC) codes [91][92][93][94][95].
Quantum LDPC codes have shown promise for reducing the number of physical qubits required to encode a logical qubit compared to leading candidates like the surface code.

FIG. 3 .
FIG.3.Horizontal hook error Z2Z3 due to photon loss during a parity check.

TABLE I
. Errors arising due to photon loss during a Z ⊗3 gauge-operator parity check are equivalent (up to a gauge transformation) to Z1 or Z3 errors arising with probabilities p1 and p2, respectively.During an X ⊗3 parity check, these errors are instead equivalent to X1 or X3 errors.

TABLE II .
Syndrome data for decoding Class I errors.