Designing quantum memories with embedded control: photonic circuits for autonomous quantum error correction

Quantum error correction (QEC) is fundamental for quantum information processing but entails a substantial overhead of classically-controlled quantum operations, which can be architecturally cumbersome to accommodate. Here we discuss a novel approach to designing elementary QEC memory cells, in which all control operations are performed autonomously by an embedded optical feedback loop. Our approach is natural for nanophotonic implementations in which each qubit can be coupled to its own optical resonator, and our design for a memory cell based on the quantum bit-flip or phase-flip code requires only five qubit-cavities (three for the register and two for the controller) connected by wave-guides. The photonic QEC circuit is entirely on-chip, requiring no external clocking or control, and during steady-state operation would only need to be powered by the injection of constant-amplitude coherent fields.

pathways for optical feedback using two additional laser beams (injected in the coherent state |β ) for corrective Raman bit-or phase-flips. Such a circuit could be implemented using solid-state qubits embedded in nanophotonic resonators connected by single-mode wave-guides [10,11], or using microwave components as in circuit QED [12]. The quantitative performance of such a quantum memory will of course depend on physical parameters such as the qubit-cavity coupling strengths and the cavity decay rates, but below and in Appendix B we show that our approach does not require any fine-tuning of the parameters and requires only that certain ratios be large. It is interesting to note that these ratios become large in a small volume limit for the optical resonators, which is a natural limit to consider in nanophotonic implementations. Passage to the small volume limit also gives rise to drastic simplifications of the quantum input-output models for the components in the QEC circuit, and thus emerges as a significant new abstraction principle for the analysis of nanophotonic signal-processing networks.
The physical qubits Q1, Q2 and Q3 are actually multi-level 'atoms' or comparable solid-state emitters, e.g., nitrogenvacancy centers. Fig. 2 shows the level structure presumed for the individual atoms and the couplings utilized for the bit/phase-flip schemes, with {|g , |h } corresponding to the single qubit states {|0 , |1 }. In the bit-flip implementation we assume that each qubit is strongly coupled to a single-mode, single-sided cavity on its |g ↔ |e transition as discussed in [8]. As a result, the phase acquired on reflection by a probe beam is π if the qubit is in state |g and 0 if it is in |h . While details of the probe-qubit interaction can be investigated for any desired physical parameters using the familiar cavity QED master equation [8], for our network calculation we utilize a simple abstraction obtained when the vacuum Rabi frequency g p and cavity field decay rate κ p are taken to infinity with the decoherence rates held fixed. Because g p and κ p both increase with decreasing resonator volume, we term this a 'small volume' limit. The simplified model is derived using a quantum stochastic differential equation (QSDE) limit theorem [13] following a similar procedure to that of [8] (see Appendix B 1). In the phase-flip scenario we modify the scheme by assuming a linearly polarized cavity mode (as in a micro-disk or photonic crystal resonator) that couples to both a σ − transition from |g ↔ |e and a σ + transition from |h ↔ |e .
The central component in the network's QEC 'controller' is a recently proposed [9] cavity-QED relay, some details of which are presented in Fig. 3. Three cavity modes are resonant with various transitions in an intra-cavity atom, as shown in Fig. 3 b and c. In a similar small volume limit [9], the atomic dynamics are limited to only the ground states, and when the atom is in state |h (|g ) the cavity's POWER input is connected to the OUT (OUT) output port. A probe signal driving the SET input port (in the absence of signal at the RESET input) causes the relay state to decay to |h , while driving only the RESET input induces decay to |g . Through these internal dynamics, a probe signal entering either the SET or RESET port of the relay routes the POWER input out either the OUT or OUT port, respectively.
We now trace through the circuit dynamics of Fig. 1 in more detail, assuming a bit-flip code implementation. A coherent input |2α is split into probe and reference beams. The probe beam first reflects from the cavity containing Q2, gaining a π or 0 phase shift depending on the state of that atom, putting the probe signal into a coherent state with amplitude √ 2αZ (Q2) (where Z (Q2) = |h h| − |g g| on Q2 and the identity operation on all other Hilbert spaces is implied-see Appendix C). The probe signal is again split and the two resulting fields separately probe the cavities containing Q1 and Q3, resulting in signals with coherent amplitudes αZ (Q1) Z (Q2) and αZ (Q2) Z (Q3) . These are interfered with copies of the reference beam, producing four signals with amplitudes α(I ± Z (Q1) Z (Q2) )/ √ 2 and α(I ± Z (Q2) Z (Q3) )/ √ 2. The '+' signals are sent to the SET inputs of relays R1 and R2, the '-' to the RESET inputs. In this way, the SET (RESET) input to R1 receives a coherent input signal if Q1 and Q2 have even (odd) parity, while the RESET (SET) receives only a vacuum input. Similarly for R2 and qubits Q2 and Q3. The POWER inputs to R1 and R2 are two more coherent fields, each with amplitude β and frequency and polarization that drive the remaining, far-detuned atomic transitions depicted in Fig. 2. The OUT port of R1 (R2) is directed to both Q1 and Q2 (Q2 and Q3). The OUT port of R1 (R2) is directed to Q3 (Q1). When a qubit is simultaneously illuminated by two of these feedback beams, Raman resonance conditions are satisfied, inducing a coherent Rabi oscillation between the states of that single qubit. When only one feedback beam illuminates an atom, the beam is assumed to be sufficiently detuned such that it only imparts an AC Stark shift to one of the atomic ground states. Remarkably, a proper choice of the ground state each feedback beam targets prevents Stark shift-induced dephasing of the stored codeword in any error state (see Appendix C 4).
Assuming the register qubits are initialized in a proper bit-/phase-flip codeword, this network will self-stabilize against bit/phase-flip errors without any external input other than the coherent probe and Raman fields (α, β, and all Hamiltonian coupling constants are constant in time). For an intuitive understanding of the network, note that if no flip errors occur, the SET inputs to the relays are activated, Q1 and Q3 only receive one feedback signal each and no corrective dynamics occur. If for example Q2 flips, the RESET inputs on both R1 and R2 are activated, Q2 receives both feedback signals, while Q1 and Q3 again get only one each. A corrective flipping Hamiltonian is thus implemented on Q2 until a flip is 'complete,' which in turn drives the relay switches back to the 'no-error' state, which then extinguishes the flipping Hamiltonian. This coherent feedback network thus implements a continuous version of the usual discrete-step strategy that diagnoses and corrects particular errors without disturbing the information content of the encoded joint state.
After interconnecting simplified (small-volume) models for the bit-flip components according to the bit-flip circuit diagram, including individual bit-flip error processes, and adiabatically eliminating of all but the qubit and relay ground states, we obtain (see Appendix C) the closed-loop master equatioṅ where where X (C) = |h g| + |g h|, σ (C) jk = |j k| and Π (C) j = |j j| on component C, each qubit suffers random flips at a rate Γ, and the 'feedback parameter' Ω is proportional to |β| 2 /∆ (note that several L j terms corresponding to strong dephasing of the relay states have been omitted as they have no appreciable effect on our dynamics). An analogous procedure using the phase-flip component models leads to a master equation with the substitutions . While L 5 through L 7 drive the corrupting bit-flip processes, the first three terms of the Hamiltonian (H) and remaining 'collapse operators' work in concert to implement the corrections: L 1 through L 4 chiefly drive the state of the two relays to reflect the qubit parities, and each bit-flipping term in the Hamiltonian is only active for a particular 'syndrome state' [1], as indicated by the relays. The remaining Hamiltonian terms physically correspond to AC Stark shifts, whose effects have been minimized by design (see Appendix C 4). Indeed from the general structure of equation (2) it is straightforward to intuit master equations that correspond abstractly to memories based on other stabilizer codes, highlighting the potential of our approach for developing technology-inspired abstractions in engineering of quantum optical networks.
Note that a network simulation with full physical models of all the components would be beyond our present computational capabilities; judicious use of the small-volume abstraction, which allowed us to derive the easily interpreted closed-loop master equation (1), has thus been essential in our effort to prove that autonomous QEC with fully embedded control is possible in principle in nanophotonic implementations. Previous studies [8,9] have shown that the idealized behaviors are reasonably well approximated in component simulations using realistic physical parameters.
In Fig. 4 we display some illustrative numerical integrations [14] of equation (1) for the bit-flip scenario. With the flip rate set to Γ = 0.1, the feedback amplitude is varied from Ω = 0 (no feedback) to Ω = 210, with the probe amplitude kept at α = Ω/8. The initial state of the qubit register is chosen as |Ψ 0 = (|ggg − i|hhh )/ √ 2, ρ 0 = |Ψ 0 Ψ 0 |, and the fidelity decay Ψ 0 |ρ t |Ψ 0 is computed to quantify the decoherence suppression achieved by the coherent feedback loop. With Ω = 0 the fidelity decay is identical to that of the three-qubit register without any measurement or feedback, while for larger values of Ω and longer storage times, the fidelity of the encoded qubit is clearly improved relative to what it would be for a bare qubit. Variation in performance for different |Ψ 0 is only due to the different susceptibilities of codewords to bit-flip errors. Because of the small, but finite likelihood that additional errors accrue before the correction of a single flip is implemented, fidelity is steadily lost for finite probe and feedback strengths, in analogy to the failure of the discrete time bit-flip code to correct multiple flips.
In conclusion, we have described a novel approach to continuous quantum error correction based on stationary coherent feedback. Our scheme may match well with hardware implementations that feature solid-state qubits embedded in planar circuits of electromagnetic resonators and wave-guides, and establishes important new connections between QEC and coherent-feedback quantum control theory [15][16][17]. While our current results are limited to the bit/phase-flip scenarios, we hope in future work to find ways to combine bit-flip and phase-flip probe interactions (possibly employing either the five-qubit code [1] or Bacon-Shor subsystem code [18]) to design feedback networks that can correct arbitrary single-qubit errors.
interconnecting open Markov quantum components. Here we shall only give a brief reminder of these formalisms, a detailed exposition and nice introduction to the formalisms, including several illustrative examples, can be found in [2,3]; see also the references cited therein.

Hudson-Parthasarathy QSDEs and unitary evolution of open Markov quantum systems
In the following we shall use the notations: i = √ −1, * will denote the adjoint of a linear operator as well as the conjugate of a complex number, if A = [a jk ] is a matrix of linear operators or complex numbers then A # = [a * jk ], and A † is defined as A † = (A # ) T , where T denotes matrix transposition. We also define Re{A} = (A + A # )/2 and Im{A} = (A − A # )/2i and denote the identity matrix by I whenever its size can be inferred from context and use I n to denote an n × n identity matrix.
Let η 1 t , . . . , η n t be n independent vacuum quantum white noise processes satisfying the commutation relations: are quantum stochastic processes collectively referred to as fundamental processes, and A j * t = (A j t ) * . The products of their differential increments are given by the quantum Itô table [4,5] All products dM t dt and dt dM t vanish. If two processes X t and Y t have the quantum stochastic differentials: for constant system operators F lj , G lj , H ljk , l = 1, 2, then the quantum stochastic differential of the product X t Y t is given by the quantum Itô rule: in which each term on the right hand side can be evaluated using the quantum Itô table given above, and using the fact that X t and Y t commute with each of the differentials dA j t , dA j * t and dΛ jk t [4,5].
In the interaction picture with respect to the free field dynamics, the general evolution of an open Markov quantum system coupled to the fundamental processes at any time t ≥ 0 is given by a unitary (co-cycle) propagator V (t) satisfying the right Hudson-Parthasarathy (HP) quantum stochastic differential equation (QSDE) [4][5][6]: where H r is self-adjoint (i.e., Hermitian) linear operator that is the Hamiltonian of the system, L r = (L r,1 , L r,2 , . . . , L r,n ) T is a column vector of coupling linear operators L r,j to the fields, and S r,jk , j, k = 1, . . . , m, is a bounded system operator such that S r = [S r,jk ] j,k=1,...,n is unitary, that is, S † r S r = S r S † r = I. S r is called a scattering matrix. Here we have added the subscript r just to emphasize that (A3) is a right HP QSDE. If we define K r = −iH r − 1 2 n k=1 L * r,k L r,k , then we see that K r + K * r = − n k=1 L * r,k L r,k and K r − K * r = −2iH r . Using the right propagator V (t), observables evolve in the Heisenberg picture according to a t = V * t a 0 V t , which has the differential form Note that the right QSDE is completely specified by three parameters, S r , L r , and H r .
In many parts of the calculations to follow in these appendices we will work with left QSDE's involving a left unitary propagator U t such that observables evolve according to a t = U t a 0 U * t . We use this left form because we will be applying the adiabatic elimination results of Bouten, van Handel and Silberfarb [13], in which they adopted the left QSDEs in their work for technical reasons, rather than physical ones; see [13,Remark 3].
The relation between the left propagator U t and right propagator V t for the same system is

The master equation
Working with the right QSDE we follow Gardiner's method (see, e.g., [7]) for deriving the master equation; see also the derivation in [4,5]. By averaging over the noise terms in the evolution, we obtain the expected evolution of an observable This may be compared with to obtain

Concatenation and series product
Let G denote an open Markov quantum system that evolves according to the right QSDE (A3) with given parameters S r , L r and H r . For compactness, we shall use a shorthand notation of [2], and denote such a system as G = (S r , L r , H r ). In this section we briefly recall the concatenation and series product developed in [2] that allows one to systematically obtain the parameters of an open Markov quantum system built up from certain interconnections of open Markov quantum systems.
Let G 1 = (S 1 , L 1 , H 1 ) and G 2 = (S 2 , L 2 , H 2 ) be two open Markov quantum systems. The concatenation product G 1 G 2 of G 1 and G 2 is defined as It is important to note here that elements of S 1 , L 1 , H 1 need not commute with those of S 2 , L 2 , H 2 (i.e., G 1 and G 2 may be the sub-systems of a common larger system). If G 1 and G 2 are independent systems, in the sense that their coefficients commute with one another then concatenation can be interpreted simply as the grouping of variables of two non-interacting open Markov systems to form a larger open Markov system. It is also possible to feed the output of a system G 1 (here the output is the field that results after the incoming field has interacted with the system; see [2,7] for details) to the input of system G 2 , with the proviso that G 1 and G 2 have the same number of input and output channels. This operation of cascading or loading of G 2 onto G 1 is represented by the series product G 2 G 1 defined by: Thus far, we have provided overviews for QSDEs driven by quantum noise fields that are in the vacuum state. However, in many situations in quantum optics the fields are in coherent states, emanating from a laser source. Suppose that each of the fields A 1 t , A 2 t , . . . , A n t is in a coherent state with (complex) amplitude α 1 , α 2 , . . . , α n , and let α = (α 1 , α 2 , . . . , α n ) T ; note that this includes the vacuum states by setting the amplitude for a particular field to zero. Fields with coherent states can be obtained from fields in the vacuum state by an application of a Weyl operator W α t satisfying both the right and left QSDE: and we also have the relation Then the right unitary propagator V α t of a system driven by fields with coherent amplitudes α is where V t is the right QSDE given in (A3), representing the same system with vacuum inputs. Alternatively, using the series product formalism from the preceding subsection, we can write G α = G (I, α, 0), where G α = (S, L r + Sα, H r + Im{L † Sα}) is the system driven by coherent fields with amplitudes α, and G is the system when driven by vacuum fields.

Appendix B: Component and subsystem models
In this section we describe several of the network subsystems using the formalism introduced in section A. We also introduce and apply a recent adiabatic elimination theorem [13] that generates a QSDE description of an often much simpler, approximate evolution of a physical system with well-separated time scales. These approximate models form the subsystem components of the full network model presented in section C.

Probe component model
In this section we present the physical cQED model for the probed qubits and derive its limiting evolution used in the network model [8].
As represented by the blue transitions in Fig. 2, the Z and X probe interactions emerge from a three level atomic system in a λ-configuration interacting with a quantized mode of a single-sided electromagnetic resonator (cavity). In the case of the Z probe, the |g ↔ |e transition is strongly coupled and on resonance with the cavity mode, while the |h state is fully uncoupled. In the case of the X probe, both |g ↔ |e and |h ↔ |e transitions are simultaneously coupled and on resonance with the cavity mode. The X probe configuration could be realized with a degenerate spin-1 2 ground state pair coupled to an excited spin-0 state via a linearly polarized cavity mode, for example. Thus, in a properly rotating frame and applying the usual rotating wave approximation, the familiar Jaynes-Cummings Hamiltonian interaction for both systems is where a is the cavity mode annihilation operator, the atomic 'lowering operators' act as σ = |g e| on the atomic states in the bit-flip network, σ = 1 √ 2 (|g + |h ) e| in the phase-flip network, and the coupling rate g c may be taken real without loss of generality.
However, the cavity mode and atom also interact with the free fields that surround them: the cavity photons will decay out of the resonator and the excited atomic state will spontaneously emit photons into the environment. These interactions are included in a HP QSDE description of the dynamics with the inclusion of two coupling operators [19]: where κ and γ ⊥ are the cavity field and atomic dipole decay rates, respectively. As there is no direct coupling between the cavity and atomic decay channels, the scattering matrix for this system is the identity. Thus, the right QSDE descriptions of the dynamics for the Z and X systems with vacuum inputs are characterized by the operator coefficients We will eventually use the limiting evolution of these 'vacuum' cQED systems in our network model, but note that familiar, driven cQED dynamics may be derived with the inclusion of a Weyl operator in series product with the vacuum system (representing an on-resonance, CW coherent-state input to the cavity mode) followed by the application of the master equation from section A 2.
We now begin an adiabatic elimination procedure on Q to obtain the very simple limiting dynamics of a measurable qubit, which will be used in the network model. The physical intuition of the derived dynamics is as follows. As described in [8], in a bad cavity limit (κ → ∞), with the atom in a uncoupled state, a coherent probe resonant with the cavity will enter the cavity and exit 'immediately' (due to the large κ), picking up no additional phase shift. However, if the atom is in a coupled state, and the system is also in a 'small volume' coupling limit (g c , κ → ∞, with g c /κ constant), then the same probe will simply reflect from the off-resonant, atom-cavity system, picking up an additional π phase shift. Thus, in these limits, the cQED system acts as a simple scattering object with no internal dynamics, but which imparts a phase shift on a cavity-incident coherent probe, as determined by an internal qubit state.
Following the mathematical formalism of [13], we redefine and relabel Q with a scaling parameter k, which is assumed to take the limit k → ∞, and write the component as a left QSDE Note that with the scaling, the cavity field decay and coupling rates take the limits described above.
In the notation of [13], the operator coefficients of the above left QSDE are Through the adiabatic elimination procedure of [13], a set of limiting operator coefficients (which we denote without the ' (k) ') are derived, which define another, limiting propagator, Q t , to which Q (k) t strongly converges. It is this limiting propagator that will be used in the network model in place of the physical cQED model.
This provides YỸ =Ỹ Y = P 1 . Then by [13], the limiting operator coefficients are, and (with Π in = |i, n i, n|) Collecting the results, the limiting system is characterized by the operator coefficients to which the physical cQED system, Q (k) , strongly converges in the limit k → ∞. For the X probe case in the phase-flip network, the analogous follows, but with the pauli-X spin operator eventually replacing Z in equation (B10).

Raman transition model
In this section we describe the physical Raman interaction that is used to correct the qubit states in the coherent feedback loop. We presume in this case that the atoms in the probed qubits described in subsection B 1 are also interrogated by two free field modes (i.e. field modes transverse to the cavity mode) that drive atomic Raman transitions when displaced by a large, coherent amplitude.
We assume that there also exists an additional atomic excited state |r , distinct and far detuned from |e for theoretical simplicity, although |r = |e should work in practice. Both ground states are coupled to |r via interactions with transverse free fields. Two of these field modes, far detuned by frequency ∆ from the {|h , |g } ↔ |r transition are used to drive the Raman interaction, as represented by the red transitions in Fig. 2. For the bit-flip network, in a properly rotating frame, these interactions are modeled in a QSDE by the Hamiltonian and coupling operators (redefining ∆ → k 2 ∆ in anticipation of an eventual k → ∞ limit) [20] For the phase-flip network, the above coupling operators are modified with σ hr → 1 √ 2 (σ hr + σ gr ) and σ gr → 1 √ 2 (σ hr − σ gr ) (physically suggesting two linearly polarized modes coupling to angular momentum eigenstates, for example). Also, the interactions of the {|h , |g } ↔ |r transitions with all other free modes (which principally drive spontaneous emission decay from |r to the ground states) may be aggregated into just two more coupling operators in the limit γ γ . Together with an identity scattering matrix, the above Hamiltonian and coupling operators represent a simple vacuum-input Raman system, Q R . In the quantum network, the field modes 1 and 2 undergo a non-trivial processing before reaching the Raman systems described above. For demonstration purposes, however, consider a bit-flip Raman system in isolation, but with modes 1 and 2 simply displaced into large-amplitude coherent states. This system can be represented by the operator coefficients where W kβ is a Weyl operator of displacement amplitude kβ. Application of the adiabatic elimination theorem [13] to the above (using a technique discussed below in section B 3) results in an approximate Hamiltonian interaction and all atomic operators drop out of the field coupling operators (eliminating all spontaneous emission dynamics). Thus, coherent transitions between the two ground states may be driven by the last two terms in H when both Raman modes are in large-amplitude coherent states. However, the ground state energy shifts represented by the first two terms (physically recognizable as AC Stark shifts) are generally inconvenient in the QEC network.
To compensate for these Stark shifts, in principle we could presume an additional pair of excited states {|H , |G } (not shown in Fig. 2) that also couple to the ground states {|h , |g } via modes 1 and 2, respectively, but with the opposite detunings: −k∆. This choice to add more atomic levels is again made for theoretical simplicity, although two additional free field modes coupling to |r , but with opposite detunings, would likely be more practical. Thus, the physical Raman interaction would have the form where we have omitted the coupling of the excited states to any other free modes, as the dynamics they induce would eventually drop out in the k → ∞ limit, as above. In this limit, the effective evolution is again governed by the Hamiltonian dynamics depicted in equation (B14), but without the first two, AC Stark shift terms.

Adiabatic elimination with large field displacements
In the previous section we mentioned that the adiabatic elimination processes will be applied to the Raman components only after they are placed in the quantum network. However, there are some mathematical complications in applying the usual theorem [13] when the amplitude of coherent field input must be scaled. In this section we describe a procedure to overcome this difficulty briefly and in the abstract. This technique is a generalization upon a similar technique developed by Luc Bouten and applied in [8].
Let (S 0 , L 0 , H 0 ) be a network with only vacuum inputs. The same network, but with coherent displaced inputs is defined as where d k is a vector with complex-valued entries, some of which may scale with k (e.g. kβ), some may not (e.g. 2α), and some still may be 0. The scattering matrix S = S 0 is assumed to have no scaling with k. It happens that applying the adiabatic elimination theorem on G (k) is complicated by the S 0 d k term in the coupling operators. The first step in overcoming these difficulties is to reconstruct the network such that all the scaled parameters are moved to the Hamiltonian of a new subcomponent. That is, we rewrite It will be straightforward to apply the adiabatic elimination procedure on the subsystemG (k) , which will produce a limiting subsystemG. Thus G (k) is asympotically approximated bŷ for sufficiently large values of k. It is this asymptotically approximate and simpler networkĜ (k) that will be used in final description of the coherent feedback system.

Appendix C: The quantum network
Here we present a detailed calculation of the coherent-feedback network model. A schematic diagram of the overall quantum network is shown in Fig. 5 FIG. 5: The quantum 'correction' network model. Concatenation decomposition of a quantum network analogous to that represented in Fig. 1 as G G . See Remark 1 for an explanation of the network differences.

Remark 1
The network considered in the appendices is slightly different from the network shown in Fig. 1. This is because in these appendices, the cavity for Q2 is taken to be two sided with a coherent probe laser impinging on each side, allowing us to obtain a decomposition of the network into two (symmetric) parts as shown in Fig. 5 and simplifying the calculations for the overall network parameters that are presented in subsection C 3. On the other hand, in Fig. 1 we make all qubit cavities identical and one sided, which would be probably more suited in actual cQED implementations. Similar effects can be achieved with either a double sided cavity for Q2 or a single sided cavity that is followed by a 50/50 beamsplitter. Although the two networks are slightly different, they only differ in the overall network scattering matrix, and a slightly modified repeat of the lengthy calculations of subsection C 3, with Q2 one-sided and followed by a beamsplitter, will show that the network coupling vector and Hamiltonian will be the same for both networks. As a consequence, we emphasize that the two networks will have the same network master equation. Since, our main interest here is the network master equation, to derive this equation it is more convenient to work with the slightly modified network of Fig. 5.

Notation
We shall use the following symbolic convention for individual components in the network: B = beam splitter, Q = qubit cavity, R = quantum relay/switch. Distinct network components that are of the same type are distinguished by assigning to each a unique subscript as an index, and all components in the network are open Markov quantum systems described by three parameters introduce in section A: a unitary scattering matrix, a coupling vector, and Hamiltonian operator. Matrices and vectors can have operator entries and an entry of a matrix M in row k and column l is denoted as M kl . A network component Z k with Z ∈ {B, C, R} and k some index will be written as We will exploit such a concatenation decomposition whenever they can be made to simplify the network calculations. Recall that it is not required that entries of the parameters of Z kj commute whenever j = k and series products can be formed from such components.
It is important to note that the series product is only defined for systems that have an equal number of input and output fields. However, naturally it is often necessary to make interconnections between systems with different numbers of input and output field fields. To apply the series product we augment the systems to be connected with "dummy" trivial couplings to additional fields as required to make the number of input-output fields of systems to be connected be the same. This is best illustrated with a simple example. Suppose we wish to connect a system C 1 = (S (C1) , L (C1) , H (C1) ) having only single input and output fields with another system C 2 = (S (C2) , L (C2) , H (C2) ) having two input-output fields by passing the output field of C 1 as the second field into C 2 . Then two systems connected in this way is given by the series product C 2 ((1, 0, 0) C 1 )), where (1, 0, 0) represents a dummy coupling of C 1 to a second field that merely "passes through" C 1 , without interacting with it, before entering C 2 as the first input field. In general, all that is needed is to insert these trivial (1, 0, 0) systems in the appropriate locations before making the series connection; see [2] for several examples.
Recall that I n denotes the n × n identity matrix and I and 0 to denote identity and a matrix will all zero entries, respectively, whose dimensions can be determined from context. In order to reduce the complexity of expressing trivially augmented systems we introduce the additional notation k to denote the operation of augmenting a system on the left of k by inserting a trivial (I n , 0, 0) system as the k-th to (k + n − 1)-th component of the system. To illustrate, for the system C 2 that we had before we would have: and so on in this fashion.

Network components a. Qubit cavities
We note that in our quantum network all qubit cavities will have a concatenation decomposition. In what follows, Q2 will be taken to be a double ended cavity which is connected to two probe lasers and two bit correcting lasers (cf. Remark 1). It has a concatenation decomposition: Q 2 = Q 21 Q 22 Q 23 Q 24 , where Q 21 and Q 24 are subsystems associated with the coupling of Q2 to the probe lasers, while Q 22 and Q 23 are associated with the coupling of Q2 to the bit correcting lasers that drive qubit Raman transitions. Q1 and Q3 are single ended cavities decomposable as Q j = Q j1 Q j2 Q j3 (j = 1, 3) with Q j1 and Q j3 associated with the coupling of Qj to the two bit correcting lasers, while Q j2 is the subsystem associated with the coupling of the cavity to a probe laser. Detailed derivations for the simplified cavity model can be found in subsections B 1 and B 2.

b. Probe interactions
Subsystems of the qubit cavities corresponding to Z-probe interactions have the following limit model for the atom-cavity interaction: The analogous X-probe qubit cavities replace the substitution Z (Qi) → X (Qi) . Detailed derivation of the probe interaction model is provided in subsection B 1.

c. Raman transitions
The bit-flip network Raman systems are: hr , hr , where we note that the indices are connected slightly differently for Q 1 than Q 2 and Q 3 , following the diagram in Fig. 5. The analogous phase-flip Raman interactions replace σ hr → 1 √ 2 (σ hr + σ gr ) and σ gr → 1 √ 2 (σ hr − σ gr ) in the above. Details of the Raman transition model is provided in subsection B 2. As explained in section C 4, the particular choice of coupling operators in each of the above helps to prevent Stark shift dephasing of the protected codeword without additional, Stark shift-compensating atomic levels.

d. Coherent displacements
Several vacuum inputs to the network will be displaced with Weyl operators, representing constant amplitude, coherent state inputs. For a given displacement, d, such inputs are represented with: All beamsplitters in the network are taken to be 50/50, mixing the inputs of two fields: Relays are modeled by a simplified four-state, four mode model. In the network there are two relays R 1 and R 2 , each of which has the decomposition R k = R k1 R k2 . The state of the relay is controlled by the field inputs to R k2 , while the state of the relay controls the routing of the field inputs to R k1 , hence for k = 1, 2, where the superscripts keep track of operators on different component states. Detailed physical modelling for such quantum relays and derivation of the simplified scattering model can be found in [9].
g. Bit-/phase-flip errors The single-qubit error processes that the network seeks to correct may be described with for a bit-flip error process with mean rate Γ on qubit i, and for a phase-flip error process on qubit i, also with mean rate Γ.

Network calculations
The main task is to calculate the 'correction' network G G , with the subnets G and G defined as follows. Parts of G : representing the 'probe' and 'feedback' network subsystems of G = G p G f , respectively. Correspondences in G : The overall structure of the network is (with a trivial rearrangement of field indices) In this calculation, the network components representing the bit-or phase-flips errors, E X,Z , may be simply concatenated to the 'correction' network N immediately before the derivation of the full system's master equation.

a. Probe network
Plugging in component models into G p and G p we arrive at where, for the bit-flip correcting network, E (ij) = Z (Qi) Z (Qj) + 1 and O (ij) = Z (Qi) Z (Qj) − 1 are proportional to two-qubit parity projectors. For the phase flip network, E (ij) = X (Qi) X (Qj) + 1 and O (ij) = X (Qi) X (Qj) − 1.  Concatenating the asymptotically approximate 'correction' subsystems calculated above with the error processes, we immediately arrive at a master equation for the bit-flip network (see section A 2): hg E (12) , The phase-flip network simply replaces X (Qi) ↔ Z (Qi) and 2Π (Qi) h g → I ± X (Qi) in the above. Note that we have omitted the field coupling operators from G (k) F in the above master equation. This is because these terms serve only to decohere the ground states of the relays, which have no effect on our network dynamics if the relays are initiated in ground state eigenstates. The Hamiltonian dynamics principally serve to flip the state of the individual qubits, depending on the state of the relays (first three terms); L 1 and L 2 drive the state of R1 to reflect the joint parity of Q1 and Q2, and L 3 and L 4 drive R2 to reflect the parity of Q3 and Q2. The final four terms of the Hamiltonian are physically recognizable as AC Stark shifts that necessarily accompany the Raman interactions. Although not immediately obvious, the feedback was designed to minimize the detrimental effects of these shifts, as described in section C 4.

AC Stark shift compensation
As discussed in sections B 2 and C 3 c, our feedback network induces both Raman interactions that help to correct errors and AC Stark shifts that alter the energy of each qubit ground state. Unfortunately, these Stark shifts tend to break the energy degeneracy between joint qubit states, which consequently causes rapid dephasing in the encoded codeword. There are two ways to counteract this. One is to design the network such that the net effect of these shifts is null and the other is to modify the components such that the AC Stark shift is nulled on a qubit-by-qubit basis.
The network described in section C 3 takes the former approach. As summarized in table I, by choosing the intensities of and the particular transitions targeted by the Raman beams, the feedback is designed such that the aggregate AC Stark shift experienced by any joint qubit state is equal to −2Ω, as long as the relays accurately reflect the joint parities of the qubits. Thus, codeword dephasing occurs only in the interval between changes in the qubit parities and the accurate reflection of these changes in the relays. Consequently, the amount of Stark shift-induced dephasing may be decreased by increasing the probe amplitude α. This approach yields sub-optimal storage fidelities, as some codeword dephasing will occur for finite α, but has the advantage of significantly simpler components. Representative performance curves are shown in Fig. 4.
The latter approach was discussed in some detail at the end of section B 2. By presuming an extra pair of atomic excited states in each qubit with equal but opposite detuning from the Raman beams, the AC Stark shifts may be completely cancelled on a qubit-by-qubit basis. (Alternatively, an additional pair of feedback Raman beams with equal but opposite detunings would have an equivalent effect) The resulting network master equation would have an identical form as equations (C17) and (C18), but without the final four terms in the Hamiltonian. Such a network yields better storage fidelities than the network described in section C 3, but requires significantly more complicated and precisely tuned component devices. Representative performance curves produced by this approach are depicted in Fig. 6, which were calculated for the same parameters as for Fig. 4.