# Dissipative Encoding of Quantum Information

Giacomo Baggio, Francesco Ticozzi, Peter D. Johnson, Lorenza Viola

DDissipative Encoding of Quantum Information

Giacomo Baggio, Francesco Ticozzi,

1, 2

Peter D. Johnson, and Lorenza Viola Dipartimento di Ingegneria dell’Informazione, Universit`a di Padova, via Gradenigo 6/B, 35131 Padova, Italy Department of Physics and Astronomy, Dartmouth College, 6127 Wilder Laboratory, Hanover, NH 03755, USA Zapata Computing, Inc., 501 Massachusetts Avenue, Cambridge, MA 02139, USA (Dated: February 10, 2021)We formalize the problem of dissipative quantum encoding, and explore the advantagesof using Markovian evolution to prepare a quantum code in the desired logical space, withemphasis on discrete-time dynamics and the possibility of exact ﬁnite-time convergence. Inparticular, we investigate robustness of the encoding dynamics and their ability to tolerateinitialization errors, thanks to the existence of non-trivial basins of attraction. As a keyapplication, we show that for stabilizer quantum codes on qubits, a ﬁnite-time dissipativeencoder may always be constructed, by using at most a number of quantum maps determinedby the number of stabilizer generators. We ﬁnd that even in situations where the target codelacks gauge degrees of freedom in its subsystem form, dissipative encoders aﬀord nontriv-ial robustness against initialization errors, thus overcoming a limitation of purely unitaryencoding procedures. Our general results are illustrated in a number of relevant examples,including Kitaev’s toric code.

I. INTRODUCTION

Implementing quantum information processing in physical devices requires that abstractly de-ﬁned quantum information, carried by ideal information units (qubits), be represented using theavailable degrees of freedom [1, 2]. Central in this context is the concept of a quantum code : whilein principle a code, C , is simply any subset of the physical system’s state space, H P , the detailsof the code are essential in determining the precise sense in which the quantum information ofinterest may be preserved against uncontrolled noise that physical systems are inevitably exposedto [3]. In particular, logically represented (“encoded”) quantum information may be intrinsicallyimmune to the action of a set of errors – for instance, by virtue of special symmetry properties,such as in decoherence-free subspaces or noiseless subsystems [4, 5] – or, more generally, it maybe actively protected through suitable recovery operations – such as in quantum error-correctingcodes [2]. Ultimately, in connection with the accuracy threshold theorem, quantum error correction(QEC) will be key in enabling large-scale fault-tolerant quantum computation, provided the noiseis suﬃciently well behaved [2, 6].Among various approaches for ﬁnding quantum error-correcting codes that have been pursued,the stabilizer formalism has proved to be especially powerful in describing a large and importantfamily of QEC codes and their error-correcting structure in a very compact form [2]. In its stan-dard version, a stabilizer code protects quantum information through a suitable subspace encoding,that is, encoded quantum states are restricted to a subspace of H P [7]. Within the more generalformulation of QEC theory aﬀorded by the subsystem notion [5, 8] (also later referred to as “oper-ator QEC,” OQEC [9]), a stabilizer code encodes the information to be protected in a subsystemof a subspace of H P [10]. Notably, the presence of auxiliary “gauge degrees” of freedom in sub-system codes can both lead to simpler error-recovery procedures, with implications for quantumfault-tolerance [11], as well as to intrinsic tolerance of the code against additional errors [12].Clearly, ensuring that the logical information of interest is eﬀectively encoded in the target codeis of crucial importance for the proper functioning of QEC itself. Loosely speaking, in practicalsettings such an encoding task entails transferring the information of interest from a quantum a r X i v : . [ qu a n t - ph ] F e b state of some accessible yet unprotected “upload” physical subsystem, where it initially resides, toa state in a subspace or subsystem that represents its encoded counterpart. Since the dynamicsimplementing this transfer must work for each state of the upload qubits, encoding procedures mustbe devised without making explicit reference to a particular input state. From a control standpoint,designing a quantum encoder amounts to ﬁnding dynamics that implement a continuous familyof speciﬁed one-to-one state transitions, from each state of the upload qubits to its correspondingcodeword state – which is a challenging problem in general.Methods for constructing encoding unitary dynamics within the circuit model of quantum com-putation have been extensively explored for stabilizer codes [7, 13], including their subsystemextensions [14]. Our interest here is to revisit the encoding problem from the perspective of using engineered dissipative dynamics [15], which have gained increasing signiﬁcance for quantum tasksranging from robust quantum state preparation, steady-state entanglement generation and cooling[16–19], to open quantum system simulation [20] and quantum-limited ampliﬁcation [21]. Notably,schemes for achieving dissipative quantum memories [22], dissipative quantum computation [23],and autonomous QEC [24–26] have also been put forward, whereas continuous-time Markovian dy-namics have been proposed in [27] to encode information in a speciﬁc albeit paradigmatic stabilizercode – Kitaev’s toric code on the square lattice [28].In this work, we characterize the general features of dissipative quantum encoders , and proposea systematic way to construct Markovian dynamics for encoding stabilizer codes, with specialemphasis on discrete-time dynamics and the possibility of exact ﬁnite-time convergence [29]. Ouranalysis both puts on a rigorous foundation and substantially expands the preliminary account ofdissipative encoding in continuous time we provided in [30]. Aside from its intrinsic appeal as analternative route to traditional unitary schemes, the use of dissipative encoding dynamics has thepotential advantage of supporting non-trivial basins of attraction: formally, the control problemis akin to devising a continuous family of many-to-one state transitions, one for each state in thetarget code. This feature can be potentially exploited to tolerate errors and oﬀer more ﬂexibilityon the initialization of the physical upload qubits.More speciﬁcally, the work is organized as follows. After providing some essential backgroundon quantum codes in Sec. II, we formalize the general encoding task as a two-step procedure inSec. III A: the information to be encoded is ﬁrst initialized from the logical level in a physical,upload subsystem, and then encoded into the target code C by a suitably engineered quantumevolution on the physical degrees of freedom. When the evolution is dissipative, investigating thegeneral structure of the basin of attraction for the procedure leads naturally, in Sec. III B, toexamine robustness against faulty initializations, represented by noise maps that act prior to thephysical encoding step, and to an existential characterization of noise-tolerant dissipative encodersin terms of compatible subsystem decompositions (Theorem 1). After this general discussion, in Sec.III C we formally introduce the important class of Markovian dissipative encoders based on bothcontinuous-time dynamics – implemented by a semigroup (Lindblad) master equation, as in [27] –or discrete-time dynamics – implemented by a sequence of quantum maps, comprising a dissipativequantum circuit, in the spirit of [29].In the second part of the paper, we focus on stabilizer codes and establish a number of con-structive results. In Sec. IV, we show that discrete-time encoders able to dissipatively preparethe target code subspace in ﬁnite time exists, using a number of steps determined by the numberof stabilizer generators. Notably, we also show that such encoders always have non-empty basinsof attractions even under additional constraints that may be relevant to the analysis, such as in-variance of the code and speciﬁc forms for the encoding maps and logical operators. While thelatter requirement may make the proposed encoders look similar to a stabilizer QEC protocol, afundamental diﬀerence stems from the fact that, in our setting, the “errors” that can be toleratedare not speciﬁed at the outset, but rather emerge from the form of the code and the initializa-tion subsystems. Likewise, although also for our task the encoding maps entail measurement ofstabilizer operators followed by unitary “correction,” the latter are chosen using diﬀerent criteriathan they are in QEC. Our construction is exempliﬁed in a number of relevant stabilizer codesin Sec. V A. In particular, while some degree of robustness against initialization errors is knownto be achievable with unitary dynamics in subsystem codes as long as non-trivial gauge factorscan be identiﬁed [14], our analysis makes it clear that using dissipative encoders may be the only way to attain similar robustness for subspace codes, or whenever gauge qubits are not easily iden-tiﬁable. The construction of a ﬁnite-time encoder for Kitaev’s toric code is addressed separatelyin Sec. V B, by directly leveraging special geometric features this code enjoys. While both thecontinuous-time encoding dynamics of [27] and the dissipative quantum circuit we propose respectthe same locality structure of the underlying stabilizer operators, our construction ensures thatthe target code space can be reached in a ﬁnite number of steps (proportional to the number ofphysical qubits) with zero error, in principle – something which is never possible when convergenceis exponential. We brieﬂy conclude in Sec. VI.

II. BACKGROUNDA. Quantum codes, subsystems, and the isometric approach

Mathematically, in order to specify a code that carries quantum information associated to anabstract, logical quantum system with Hilbert space H L , it is necessary to identify a subset ofstates of the physical system, with corresponding Hilbert space H P . In this work, we take both H L and H P to be ﬁnite-dimensional, and consider the representation of the full set of density operatorson H L , denoted by D ( H L ) , using a subset C ⊂ D ( H P ), with C being the code . The space of alllinear (bounded) operators on, say, H P is denoted by B ( H P ). Throughout the paper, we shall alsowrite A (cid:39) B to denote that two spaces, A , B , or decomposition thereof, are isomorphic. A (cid:39) B denotes that operator A is mapped into B via the same isomorphism (that is, in terms of theirmatrix representatives, they are the same up to a suitable choice of basis).The ﬁrst kind of quantum codes that have been discovered and studied, both as active [31, 32]or passive [4] codes, are subspace codes [2]. These are associated to sets of states that have supporton a subspace H C ≡ H S of the physical Hilbert space H P , with H S (cid:39) H L , so that we can write H P = H S ⊕ H R (cid:39) H L ⊕ H R . The quantum codewords are then the density operators supported on H S , that is, C = D ( H S ),and the summand H R = H ⊥ S in this case. The code subspace is chosen so that the action of theintended noise, which is modeled as a completely-positive, trace-preserving (CPTP) map M , iseither trivial (e.g., states in a decoherence-free subspace are invariant under M ) or can be recoveredby means of available measurements and correction operations – namely, there exists a recoveryCPTP map R such that ( R ◦ M ) | ψ (cid:105)(cid:104) ψ | = | ψ (cid:105)(cid:104) ψ | , for all | ψ (cid:105) ∈ H S [8]. In the simplest setting wherethe error model M corresponds to independent errors on qubits, the distance d of the code yieldsthe minimum number of single-qubit operations needed to transform a codeword into another (thenotion may be generalized to arbitrary error models [5]). Thus, one may formally view passivecodes ( R |C = I S , where I is the identity map) as inﬁnite-distance QEC codes.However, subspaces provably do not furnish the most general quantum codes possible. The subsystem principle for QEC, anticipated in [8] and established in [5, 33–35], states that any(passive or active) quantum code can be associated to a general subsystem decomposition: H P = H S ⊗ H F ⊕ H R (cid:39) H L ⊗ H F ⊕ H R . (1)As above, H S is isomorphic to the space to be encoded but, in a subsystem code, this space appearsas a factor, in tensor product with another Hilbert space H F , representing a gauge subsystem onwhich M can act without aﬀecting the information encoded in C = D ( H S ). More precisely, wesay that a state of the physical system, ρ ∈ D ( H P ), is initialized in H S with state ρ ∈ D ( H S ) ,and gauge state τ F ∈ D ( H F ), if ρ (cid:39) ρ ⊗ τ F ⊕ R , where 0 R denotes the zero operator on H R . Inparticular, we say that ρ ∈ D ( H P ) is initialized in a subsystem pure state if the above equationholds with ρ = | ψ (cid:105)(cid:104) ψ | , for some | ψ (cid:105) ∈ H S .When a gauge state τ F = (cid:80) fj =1 p j | φ j (cid:105)(cid:104) φ j | is speciﬁed, one can think of a subsystem code asa collection of f orthogonal subspace codes of the form H L ⊗ span {| φ j (cid:105)} , in each of which oneinitializes a fraction p j of the total probability. Thus, τ F does not carry any logical information,it only speciﬁes how the information is distributed over the set of orthogonal subspace codes. Itis then possible to prove that information encoded into subsystem codes is intrinsically robustwith respect to changes of the co-factor state, with the restriction of M to H S ⊗ H F obeying M |H S ⊗H F = I S ⊗ F , for some CPTP map F on H F [2, 34].In principle, it is possible to construct subsystem codes that extend a given subspace code H P (cid:39) H L ⊕ H R . The new subsystem is obtaining by identifying f − H S inside H R . However, in practical cases it may be diﬃcult to ﬁnd suchcopies so that they are collectively recoverable after the action of M . Nonetheless, we can alwayssee a subspace code as a subsystem code with a one-dimensional gauge co-factor. In light of theabove, in the more theoretical part of the paper (Sec. III A), we shall work directly with subsystemcodes, and see subspace codes as a particular case.Conversely, given a subsystem code, it is possible to obtain a subspace code by ﬁxing the gauge,that is, by losing the freedom in the gauge state. By imposing that τ F be a speciﬁed pure state | φ (cid:105)(cid:104) φ | , the only subspace that is allowed to carry information in H L ⊗ H F is H (cid:48) L (cid:39) H L ⊗ span {| φ (cid:105)} . We illustrate some of these ideas for the simplest quantum code, the repetition code, which willalso be revisited and used as a guiding example in the rest of the paper.

Example 1 (The repetition code as a subsystem code)

This 3-qubit code is usually de-scribed as a subspace code that encodes one qubit protected with respect to independent singlebit-ﬂip errors, H C = span {| (cid:105) , | (cid:105)} and errors act via M ( ρ ) = (1 − p ) ρ + ( p/ (cid:80) (cid:96) =1 , , X (cid:96) ρX (cid:96) , ρ ∈ D ( H P ), where X (cid:96) denotes the Pauli X acting on qubit (cid:96) , X = XII, X = IXI, X = IIX ,and p < / H C can be associated to a natural subsystemdecomposition H P (cid:39) H L ⊗ H F = C ⊗ C , induced by the unitary change of basis U L deﬁned by U L | abc (cid:105) ≡ | x (cid:105) ⊗ | yz (cid:105) , a, b, c ∈ { , } , (2)where x is the majority count of the string abc, while yz indicates the binary location in which abc diﬀers from xxx , with 00 indicating no diﬀerences. With respect to this subsystem decomposition,the original code subspace corresponds to H C (cid:39) H L ⊗ span {| (cid:105)} , and its codeword states areuniquely associated to the states of the subsystem code C = { ρ ⊗ | (cid:105)(cid:104) |} , with ρ ∈ D ( H L ). It iseasy to see that the action of any noise that does not aﬀect the majority count with respect to thesubsystem decomposition (2), namely, of evolutions of the form M = I L ⊗ F F , can be correctedby a recovery map R that resets (“cools”) the co-factor gauge qubits back to | (cid:105) . That is, in thisrepresentation, the code C is ﬁxed – is a noiseless subsystem [5] – under M ◦ R .In [35], a natural operational interpretation for the subsystem principle is provided, whichcontributes to clarify connections among various notions of error protection and correction. Aquantum code C can be identiﬁed as the image of a CPTP map Φ from the logical degrees offreedom H L into the physical Hilbert space H P , that preserves the distinguishability of states.Explicitly, the image of a CPTP map Φ deﬁnes a code if for all ρ , ρ ∈ D ( H L ) and p ∈ [0 , (cid:107) p Φ( ρ ) − (1 − p )Φ( ρ ) (cid:107) = (cid:107) pρ − (1 − p ) ρ (cid:107) , where (cid:107) A (cid:107) ≡ tr[ | A | ] = tr[ √ A † A ]. This requirement is equivalent to saying that Φ is a trace-normisometric embedding of B ( H L ) into B ( H P ).As shown in [35], this isometry property, together with linearity and the CPTP requirements,are both suﬃcient and necessary to ensure that the image of Φ is a subsystem encoding: Any1-isometric CPTP embedding Φ induces a subsystem decomposition H P (cid:39) H L ⊗ H F ⊕ H R , whereΦ( ρ ) (cid:39) ρ ⊗ τ F ⊕ R for some given τ F ∈ B ( H F ). A quantum code, then, may be describedas C ≡ Φ( D ( H L )), and its codewords are the states of the form ρ ⊗ τ F ⊕ R , for a given τ F .Preservation of distinguishability is also shown to be a necessary and suﬃcient requirement for acode undergoing a noisy physical evolution to be perfectly correctable. B. Basics of stabilizer formalism

1. Stabilizer codes

Let P n denote the n -qubit Pauli group [1]. A stabilizer (subspace) code C on ( C ) ⊗ n is supportedon the common +1-eigenspace H S of a set of commuting operators { S k } rk =1 ⊆ P n , which are called stabilizer operators . These operators generate an Abelian subgroup S of P n , the so-called stabilizer(sub)group. Thus, H C = H S ≡ span {| ψ (cid:105) | S k | ψ (cid:105) = | ψ (cid:105) , k = 1 , . . . , r } , implying that the code spaceis invariant under the action of S . Thanks to the properties of Pauli matrices, the dimension of H S is 2 n − r : This subspace can then be used to encode n − r logical qubits (also often called “virtual”qubits, as they need not be in a direct relation to the physical ones). To this aim, we deﬁne a setof logical Pauli operators , say, { X k , Z k } n − rk =1 , acting on H S . These operators must commute withall stabilizer generators and therefore belong to the centralizer of S ; thanks to the properties of thestabilizer group, the latter corresponds to the normalizer N ( S ) . For a Pauli subgroup, the latteris the set of operators that leave all the elements of S invariant under conjugate (adjoint) action,that is, N ( S ) ≡ { P ∈ P n | P SP † = S, ∀ S ∈ S} . Clearly, S ⊂ N ( S ). The operators which are in N ( S ) − S generate a subgroup of the Pauli group, called the logical subgroup , since it correspondsto operators that aﬀect non-trivially the information encoded in the logical qubits.Given a Pauli subgroup, following [2], we say that a set of generators is a canonical basis ifit is composed by pairs of operators ˆ X (cid:96) , ˆ Z (cid:96) (virtual X and Z operators) such that they anti-commute, { ˆ X (cid:96) , ˆ Z (cid:96) } = 0, while they commute for j (cid:54) = (cid:96), [ ˆ X (cid:96) , ˆ Z j ] = 0, in addition to [ ˆ X (cid:96) , ˆ X j ] = 0and [ ˆ Z (cid:96) , ˆ Z j ] = 0, for any pair of indexes. When a subgroup admits a canonical set of generators,it can be seen as a (virtual) qubit system. Being S a stabilizer subgroup, it can be shown thatits centralizer (hence, its normalizer) is generated by iI , S itself, and a canonical basis of n − r ˆ X (cid:96) , ˆ Z (cid:96) pairs. The (cid:96) -th logical qubit is then naturally associated to the corresponding pair of logicaloperators ˆ X (cid:96) , ˆ Z (cid:96) . It is worth stressing that the choice of basis is, in general, highly not unique.Also, the use of a suitable symplectic representation is especially convenient in allowing one tocheck for commutativity via simple linear-algebraic manipulations (see also Appendix A).As for classical linear codes, the key properties of a (binary) stabilizer code are described as astring of three parameters [2], [[ n, k, d ]] , where n is the total number of physical qubits, k = n − r the number of logical qubits encoded (thus, dim( H C ) = 2 k ), and d denotes the distance of the code,which for a stabilizer code is given by the minimum weight of any Pauli operator (other than theidentity) that commutes with all the stabilizer generators. The stabilizer formalism also permits anice characterization of the QEC criteria to be given, namely, { E a } is a set of correctable errors if E † a E b (cid:54)∈ N ( S ) − S for all possible error pairs [2, 8]. Remark 1

The 3-bit code of Example 1 may be easily described within the stabilizer formalism,by letting S to be generated, for example, by the two stabilizer operators S = ZZI and S = IZZ [33]. The operator X = XXX then acts like an encoded X operation on H C , whereas Z = ZII actslike an encoded Z operation, and the repetition code is [[3 , , , , , , , ,

2. Subsystem codes

The stabilizer formalism has also been extended to codes of the general subsystem form andoperator QEC [10]. This is done by ﬁrst specifying a 2 n − r -dimensional subspace H S as describedin the previous subsection, namely, by specifying r commuting Pauli operators, which generatea stabilizer subgroup S . We then ﬁnd the Pauli subgroup associated to the centralizer of thestabilizer group, and in particular a canonical set of the centralizer generators: As before, theseinclude iI and S , and n − r virtual qubits identiﬁed by the ˆ X (cid:96) , ˆ Z (cid:96) pairs. In this case, however, only s of these qubits are assigned to encode logical information, while the remaining n − r − s are gaugequbits. Recall that identiﬁcation of the virtual qubits in the stabilized subspace is, in general,highly non-unique: In some cases, this freedom can be used to identify the gauge qubits so that H S (cid:39) H L ⊗ H F , with the errors aﬀecting the physical system, restricted to H S , acting non-trivially only on H F . This implies that one has to employ QEC only to maintain the information inside H S , as the errors on the gauge qubits do not aﬀect the information encoded in H L .If the stabilizer subsystem code C = D ( H L ) encodes k logical qubits into n physical qubits withdistance d , using g gauge qubits, it is said to be a [[ n, k, g, d ]] code [2, 10]. Similarly to the generalcase, one can obtain stabilizer subspace codes from subsystem codes, and vice versa. In fact:(1) Every subsystem code can be turned into a standard (subspace) stabilizer code by extendingthe stabilizer group with extra n − r − s commuting operators that act on the gauge qubits. Theseimpose that the gauge qubits be in a speciﬁed pure state, and transform the [[ n, k, g, d ]] subsystemcode into a standard [[ n, k, d ]] stabilizer code. In doing this, there is a price to pay: The resultingsubspace code must now be actively correcting for a new set of error operators, determined by howwe choose the additional stabilizers, whereas in the original subsystem code, the same errors didnot need to be corrected, since they acted on the gauge qubits.(2) Reversing the procedure, every subspace stabilizer code, say a [[ n, k, d ]] code, can be viewedas a subsystem [[ n, k, g, d ]] code for some number g ≥ g for a given subspace code, though upper bounds exist [10]. For example, to the best of ourknowledge neither the 5-bit code nor Steane’s 7-bit code allow for a subsystem representation withnon-trivial gauge qubit, that is, for these codes g = 0. For Shor’s [[9 , , , , , , , , III. DISSIPATIVE QUANTUM ENCODERSA. The encoding task

We now speciﬁcally focus on the problem of encoding information in the correctable subsystem.We shall assume that the quantum information (i.e., a quantum state) of interest is initially stored inan upload subsystem that is isomorphic to the code subsystem and easy to prepare and manipulate,yet unprotected from noise. Typically, such a subsystem will be either directly identiﬁable withsome physical qubits, or emerging from system-speciﬁc symmetries and control capabilities [5, 33].

Example 2 (Encoding the repetition code)

In the repetition code example, it is natural toconsider one of the physical qubits as the upload subsystem: Without loss of generality, we choosethe ﬁrst physical qubit. Then, a simple (unitary) option for translating the initial information intoa codeword is oﬀered by any unitary U P such that U P | x (cid:105) ⊗ | (cid:105) = | xxx (cid:105) , x ∈ { , } . In the circuit model of quantum computation, the “encoder” U P is realized through a unitarycircuit involving single- and two-qubit gates (e.g., it may be obtained from a sequence of CNOTgates [1]). Importantly, this unitary encoding requires the physical qubits that are not used asupload qubits to be prepared in the pure state | (cid:105) . This requirement can be relaxed in two ways:(1) If we consider the subsystem version of the repetition code, the state of the factor state τ F doesnot aﬀect the encoded information. Hence, we can use as encoder any unitary such that˜ U P | x (cid:105) ⊗ | φ (cid:105) = U L | x (cid:105) ⊗ | φ (cid:48) (cid:105) , where U L is the unitary transformation given in Eq. (2) and | φ (cid:105) , | φ (cid:48) (cid:105) any pair of pure states ontwo qubits. This implies that ˜ U P is of the form U L ( I ⊗ U ) , and that the initial state of thesecond and third qubits is irrelevant to the encoding. (2) Otherwise, we can include a (necessarilydissipative) initialization step in the encoding protocol, leading one to consider the CPTP map:Φ P ( ρ ⊗ τ F ) = U P [ tr , ( ρ ⊗ τ F ) ⊗ | (cid:105)(cid:104) | ] U † P . The latter achieves the correct encoding irrespective of the initialization factor state τ F (and,in fact, it correctly encodes the reduced state of the ﬁrst qubit in C even if the input state isnot factorized). This illustrates how dissipative dynamics can, in principle, provide additionalrobustness with respect to errors in the initialization phase of an encoding procedure. Systematicways to follow the unitary approach (1) with quantum circuits for stabilizer subsystem codes havebeen proposed in [14]. Instead, we shall focus on the dissipation-based approach (2).Inspired by the above example, and in line with typical implementations of encoding protocols,we consider the task of encoding information in a quantum code C = Φ( D ( H L )) associated to a1-isometry Φ and a general subsystem decomposition H S ⊗ H F ⊕ H R , as entailing two steps: Step 1: Logical encoding (initialization).

The abstract information to be encoded, adensity operator ρ ∈ D ( H L ) , is ﬁrst “uploaded” in a physical subsystem that is easy to manipulateand initialize in the desired state, but oﬀers no protection against noise. In full generality, this isdone by identifying a subsystem H S (cid:48) of H P = H S (cid:48) ⊗ H F (cid:48) ⊕ H R (cid:48) , with H S (cid:48) (cid:39) H L . After this initialinformation upload, the state of the physical system is some density operatorΦ L ( ρ ) = ρ P (cid:48) (cid:39) ρ ⊗ τ F (cid:48) ⊕ R (cid:48) , (3)where τ F (cid:48) ∈ D ( H F (cid:48) ) . The map Φ L between the abstract state ρ to be encoded and the initializedstate ρ P (cid:48) must be a 1-isometric CPTP embedding in order for the information to be retrievable.Note that H F (cid:48) in the initialization subsystem does not need to be isomorphic to H F of the code. Step 2: Physical encoding.

A CPTP evolution on the physical degrees of freedom, Φ P ,transfers the initialized state to the corresponding encoded state in the code according toΦ P ( ρ P (cid:48) ) = ρ (cid:39) ρ ⊗ τ F ⊕ R , (4)where the last state is now correctly initialized in C . This Φ P can be either obtained unitarily (viaa quantum circuit) or dissipatively. The full encoding protocol is associated to the concatenationΦ = Φ P ◦ Φ L .In this paper, we shall assume that a nominal Φ L is given, and focus on the task of designingthe physical encoder Φ P , and its robustness with respect to the initialization. At its core, this taskrequires that Φ P ◦ Φ L ( ρ ) = ρ. Explicitly, in terms of the subsystem decompositions in Eqs. (3)-(4)corresponding to the initialized information and the code, the latter reads:Φ P ( ρ ⊗ τ F (cid:48) ⊕ R (cid:48) ) = ρ (cid:39) ρ ⊗ τ F ⊕ R , (5)that is, the physical encoder Φ P must map the information uploaded in the initialization step tothe correct corresponding state in the code.On the one hand, a key diﬀerence between unitary and dissipative dynamics for this problem isthat the latter allow for contractive, irreversible evolution, such that more than one input state canbe mapped to the same target. On the other hand, unitary evolution preserves distinguishability.Formally, we are led to a deﬁnition of dissipative encoding that highlights this feature by introducingthe basin of attraction of each code state. Deﬁnition 1 (Dissipative encoder)

A (physical) dissipative encoder for a code C is a (non-unitary) CPTP map Φ P : D ( H P ) → B ( H P ) as in Eq. (4) , such that for every encoded state ρ ∈ C , the initialized physical state in Eq. (3) obeys ρ P (cid:48) ∈ B ρ , where the basin of attraction B ρ = Φ − P ( ρ ) is the pre-image of ρ. Robustness in the encoding thus corresponds to having basins of attraction that contain morethan just ρ P (cid:48) . The advantage of using dissipative encoders is essentially related to having non-trivial B ρ : These allow for tolerance with respect to (certain) errors in the initialization of theupload subsystems, as well as freedom in the design of the map Φ L , thus oﬀering potentially easierinitialization procedures. Remark 2 (Unitary encoders can exhibit robustness only for subsystem codes)

Letthe map Φ P ( · ) = U P · U † P be a unitary physical encoder. As in the repetition code example,the to-be-encoded quantum information | ψ (cid:105) is initialized in the upload subsystem, while theremaining part of the system is initialized in some ﬁxed pure state | φ (cid:105) . Then, Φ P is a globalunitary transformation designed to map | ψ (cid:105) ⊗ | φ (cid:105) into the encoded state | ψ (cid:105) . In general, thesuccess of the encoding requires the remaining part of the system to be suﬃciently well-preparedin | φ (cid:105) . As we have seen for the repetition code, the unitary encoding is not generally robust toerrors in the initialization of | φ (cid:105) . For example, if the remaining system is aﬄicted by an error E which transforms | φ (cid:105) to an orthogonal state, (cid:104) φ | E | φ (cid:105) = (cid:104) φ | φ (cid:48) (cid:105) = 0, the subsequent encodedstate is sure to be orthogonal to the intended encoded state. However, a unitary encoder can berobust with respect to the initialization of some of the subsystems that are not the upload ones,corresponding to the gauge degrees of freedom of the code. The encoded state is then understoodwithin the subsystem code/operator QEC framework, where the gauge degrees of freedom can bemixed – as opposed to subspace codes that, as we recalled, must correspond to pure gauge states.On the other hand, if a subspace code does not admit a subsystem decomposition with somenon-trivial gauge degrees of freedom, the only option to allow for non-pure states in the uploadsubsystem is to use dissipative encoders at the physical encoding stage. B. Dissipative encoders and their basin of attraction

In view of the above discussion, it becomes important to investigate the general structure of thebasin of attraction for a subsystem code, and understand how such a basin can be made as largeas possible – at least when no other constraints are in place on the allowed dynamics.

1. Faulty initializations

Assume that in the initialization step, the physical system is expected to be mapped in a state ρ P (cid:48) , according to the subsystem structure H P (cid:39) H L (cid:48) ⊗ H F (cid:48) ⊕ H R (cid:48) , with dim( H L (cid:48) ) = dim( H L ), viaa given nominal Φ L . To explore the structure of the potential basin of attraction, it is convenientto consider a second CPTP map, ˜Φ L , which represents a faulty initialization and maps the logicalinformation in a diﬀerent state ρ P (cid:48)(cid:48) . We ﬁrst determine what properties such an initialization musthave in order for a physical encoder Φ P , originally designed to encode the outputs of Φ L , to beable to also map the faulty initialized ρ P (cid:48)(cid:48) of ˜Φ L onto the correct encoded state ¯ ρ ∈ C .As already remarked, it follows from the results in [35] that C must be a 1-isometric embeddingof the logical information in H P via an isometry Φ. Then it is immediate to see that a dissipativeencoder Φ P for the faulty initialization exists, meaning it satisﬁes Φ P ◦ ˜Φ L = Φ , if and only if ˜Φ L is itself a trace-norm isometry. However, this is not suﬃcient to our aim, since we wish to have the same Φ P to be able to encode the output of Φ L as well. We thus give the following: Deﬁnition 2

We say that a dissipative encoder Φ P , such that Φ P ◦ Φ L ( ρ ) = ρ, tolerates the faultyinitialization ˜Φ L if Φ P ◦ ˜Φ L ( ρ ) = Φ P ◦ Φ L ( ρ ) , ∀ ρ ∈ D ( H L ) . (6)Note that the physical encoder is required to be the same on the left and the right of Eq. (6).In what follows, it will be useful to consider a suitable decomposition of the faulty initialization.Namely, we can think that ˜Φ L is the concatenation of the nominal map Φ L , followed by a noise map N . Assuming this structure of ˜Φ L does not imply a loss of generality. In fact, both ˜Φ L and Φ L areisometric embedding, otherwise one would have degradation of distinguishability and impossibilityof exact decoding. Hence, the image of both maps must correspond to a subsystem representationof the logical degrees of freedom. Any such subsystem representation can be easily obtainedfrom another one by using a map N which maps the states initialized in one subsystem in thecorresponding ones of the other, and it is suitably completed to be CPTP. If we are considering morethan one possible faulty initialization, we can then think that the corresponding N correspondsto a certain family of “initialization errors”, which act with a certain probability. In this case, wedemand that Φ P correctly encodes both the intended Φ L and the faulty initializations ˜Φ L = N ◦ Φ L .0 L P (cid:48) P (cid:48)(cid:48) P L H L H P (cid:39) H L (cid:48) ⊗ H F (cid:48) ⊕ H R (cid:48) H P H P (cid:39) H L ⊗ H F ⊕ H R H L ρ L ρ P (cid:48) (cid:39) ρ L ⊗ τ F (cid:48) ⊕ R (cid:48) τ F (cid:48) full rank ρ P (cid:48)(cid:48) ρ ρ L Φ L N Φ P Φ − initialization noise physical encoding decodingFIG. 1: Schematic picture of an encoding protocol under faulty initialization. The logical state ρ L ∈ D ( H L )is ﬁrst initialized in the physical subsystem H P (cid:39) H L (cid:48) ⊗ H F (cid:48) ⊕ H R (cid:48) , with dim( H L (cid:48) ) = dim( H L ), throughthe logical encoder Φ L . In a second stage, the initialized state ρ P (cid:48) ∈ D ( H P ) is corrupted by the action ofa noise map N , yielding the “noisy” embedded states ρ P (cid:48)(cid:48) ∈ D ( H P ). Then, Φ P maps ρ P (cid:48)(cid:48) into an encodedstate ρ . Finally, decoding extracts the information encoded in the state ρ . Deﬁnition 3

We say that a dissipative encoder Φ P , such that Φ P ◦ Φ L ( ρ ) = ρ, ∀ ρ ∈ D ( H L ) , tolerates the noise map N if Φ P ◦ N ◦ Φ L ( ρ ) = Φ P ◦ Φ L ( ρ ) , ∀ ρ ∈ D ( H L ) . (7)With reference to the above framework, also depicted in Fig. 1, we shall investigate whatproperties ˜Φ L , or equivalently the noise maps N , must possess in order to be tolerated by anencoding map Φ P . As a ﬁrst result, it is straightforward to establish the following: Lemma 1

If the encoding map Φ P tolerates the noise action N , then it tolerates any convexcombination of the noise and the identity operator, i.e. M λ ≡ λ N + (1 − λ ) I , with λ ∈ [0 , . Proof.

The proof follows by linearity of Φ P . In fact, since Φ P is a linear map correcting N , forevery ρ L ∈ D ( H L ) we have:Φ P ◦ M λ ◦ Φ L ( ρ L ) = Φ P ◦ ( λ N + (1 − λ ) I ) ◦ Φ L ( ρ L )= λ Φ P ◦ N ◦ Φ L ( ρ L ) + (1 − λ )Φ P ◦ Φ L ( ρ L ) = Φ P ◦ Φ L ( ρ L ) . (cid:3)

2. Compatible subsystems

Next, we wish to investigate in more detail what faulty initializations can be tolerated by someΦ P . Since all concatenation of maps must be trace-norm isometries on their inputs in order tofaithfully preserve the information contained in ρ , the image of Φ L and N ◦ Φ L must have thestructure of a general subsystem code. Let ρ P (cid:48) (cid:39) ρ L ⊗ τ F (cid:48) ⊕ R (cid:48) , ρ P (cid:48)(cid:48) (cid:39) ρ L ⊗ τ F (cid:48)(cid:48) ⊕ R (cid:48)(cid:48) , where τ F (cid:48) and τ F (cid:48)(cid:48) are of full rank. These denote the states associated to the following subsystemdecompositions of H P , respectively: H P (cid:39) H L (cid:48) ⊗ H F (cid:48) ⊕ H R (cid:48) , H P (cid:39) H L (cid:48)(cid:48) ⊗ H F (cid:48)(cid:48) ⊕ H R (cid:48)(cid:48) , (8)with dim( H L (cid:48) ) = dim( H L (cid:48)(cid:48) ) = dim( H L ). In order for a faulty initialization to be tolerated by Φ P ,it needs to be in some sense “compatible” with the properly initialized information. That is, if weproject the faulty initialized states back on the support of the nominal ones, they should exhibit atensor structure that is of the same form. This notion is made precise in the following deﬁnition.1 Deﬁnition 4 (Compatible initializations)

Consider two subsystem decomposition as in Eq. (8) . We say that the initializations in H L (cid:48) with co-factor state τ F (cid:48) , and in H L (cid:48)(cid:48) with co-factor state τ F (cid:48)(cid:48) , are compatible if (cid:40) Π L (cid:48) F (cid:48) ρ P (cid:48)(cid:48) Π L (cid:48) F (cid:48) (cid:39) ρ L ⊗ ˜ τ F (cid:48) ⊕ R (cid:48) , Π L (cid:48)(cid:48) F (cid:48)(cid:48) ρ P (cid:48) Π L (cid:48)(cid:48) F (cid:48)(cid:48) (cid:39) ρ L ⊗ ˜ τ F (cid:48)(cid:48) ⊕ R (cid:48)(cid:48) , ∀ ρ L ∈ D ( H L ) , (9) where Π L (cid:48) F (cid:48) , Π L (cid:48)(cid:48) F (cid:48)(cid:48) are the orthogonal projections onto the subspaces H L (cid:48) ⊗ H F (cid:48) , H L (cid:48)(cid:48) ⊗ H F (cid:48)(cid:48) ,respectively, and ˜ τ F (cid:48) , ˜ τ F (cid:48)(cid:48) ≥ . Remark 3

In principle, one may allow for the projected states, that is, the right-hand sides ofEq. (9), to have a co-factor ˜ τ F (cid:48) ,F (cid:48)(cid:48) that depends on the encoded state ρ L . In Appendix B 1 weexplicitly show that this seemingly looser requirements is actually equivalent to the deﬁnition ofcompatible initializations given above.Let us now consider the decomposition H P (cid:39) H L (cid:48)(cid:48) ⊗ H F (cid:48)(cid:48) ,λ ⊕ H R (cid:48)(cid:48) ,λ induced by the isometricembedding M λ ◦ Φ L , with M λ ≡ λ N + (1 − λ ) I , λ ∈ [0 , ρ P (cid:48)(cid:48) ,λ ≡ M λ ( ρ P (cid:48) ) = ρ L ⊗ τ F (cid:48)(cid:48) ,λ ⊕ R (cid:48)(cid:48) ,λ the initialized state in H L (cid:48)(cid:48) with co-factor state τ F (cid:48)(cid:48) ,λ ∈ D ( H F (cid:48)(cid:48) ,λ ) of full rank.With these deﬁnitions in place, we are now in a position to prove the main theorem of this section,which clariﬁes the role of compatible initializations: Theorem 1 (Noise-tolerant encoders)

There exists an encoding map Φ P that tolerates thenoise action N if and only if the two initializations ρ P (cid:48) and ρ P (cid:48)(cid:48) ,λ in the subsystem decompositions H L (cid:48) ⊗ H F (cid:48) ⊕ H R (cid:48) and H L (cid:48)(cid:48) ⊗ H F (cid:48)(cid:48) ,λ ⊕ H R (cid:48)(cid:48) ,λ , respectively, are compatible for all λ ∈ [0 , . The proof is given in Appendix B 2. In the light of this characterization, we can show that, ingeneral, it is not possible to deﬁne of a unique , “maximal” basin of attraction. First, notice thatif an initialization is compatible with the nominal one, we can deﬁne a subsystem decompositionthat comprises both. Intuitively, either one is already a particular case of the other, with τ F havingsupport only on a proper subspace of H F , or it is suﬃcient to augment the dimensionality of thetensor factor H F by identifying isomorphic copies of H L in H R . Furthermore, it is easy to see that compatibility is not a transitive property for subsystem de-compositions. In fact, it is possible to construct a counter-example where two faulty initializationsare both compatible with the nominal one on its own support, but have mutually incompatiblestructure on the orthogonal complement. Hence it is not enough to consider all the noise actionscompatible with the correct initialization, and construct an overarching, maximal subsystem struc-ture. Nonetheless, it is possible to identify the maximal size of the gauge subsystem of a tolerableinitialization, which corresponds to the integer part of dim( H R ) / dim( H L ) . If dim( H R ) / dim( H L ) is indeed integer, constructing a maximal-dimension gauge subsystemleads to a pure tensor-factor decomposition of H P , that is, one with no summand H R : H P (cid:39) H L ⊗ H F, max . In such a case, if the dissipative encoder Φ P tolerates faulty encodings in H P (cid:39) H L ⊗ H F, max , weﬁnd the basin of attraction for each state to be simply B ρ = { ρ ⊗ τ F | τ F ∈ D ( H F, max ) } . It is worth remarking that these results are existential in nature, aimed to characterize whattype of robustness may be attained, in principle, by using dissipative quantum encoders. What canbe done in speciﬁc scenarios, including under further design constraints, may signiﬁcantly vary. Forexample, in Sec. IV, we will develop dissipative encoders that additionally guarantee invariance ofthe target code – at the cost of reducing the basin of attraction – and that rely on the importantclass of

Markovian dissipation, as we formally introduce next.2

C. Encoding via Markovian dynamics

1. Continuous-time encoders

Continuous-time Markovian dynamics are widely employed to model a variety of both natu-rally occurring and controlled irreversible behavior, in contexts ranging from quantum statisticalmechanics and thermodynamics to continuous quantum measurement and quantum reservoir en-gineering [15, 39, 40]. Their convergence to equilibria is provably always asymptotic [29]. In par-ticular, a number of approaches have been devised for analyzing and constructing continuous-timequantum dynamical semigroups (QDSs) able to ensure stabilization of desired states, subspaces,and subsystems, see e.g. [41, 42] and references therein.The task of designing a physical encoder entails a related, yet more articulated, set of re-quirements. With reference to Eq. (5), we say that a generator of a QDS (or “Liouvillian”), L : B ( H P ) → B ( H P ), deﬁnes continuous-time dissipative encoding (CDE) for a subsystem code C if for all initialized states Φ L ( ρ ) = ρ P (cid:48) (cid:39) ρ ⊗ τ F (cid:48) ⊕ R (cid:48) , where ρ ∈ D ( H L ) and τ F (cid:48) ∈ D ( H F (cid:48) ), theevolution converges asymptotically to the intended state in C , that is,lim t → + ∞ e L t [ ρ P (cid:48) ] = ρ (cid:39) ρ ⊗ τ F ⊕ R ∈ C . (10)In addition, for multipartite systems one may require the encoding generator to respect somelocality constraints. We say that a CDE is quasi-local (QL) with respect to a speciﬁed neighbor-hood structure N ≡ {N k } if L = (cid:80) k L k , with L k a generator acting nontrivially only on oneneighborhood, that is, a neighborhood map [29]. Remark 4

Beside ensuring encoding, Eq. (10) automatically implies that each state encoded in C is an invariant (ﬁxed) state for Φ P , L ( ρ ) = 0 . Note that the map Φ P is formally well-deﬁned only on initialized states , as the limit of e L t exists for initialized input states and their attractionbasins. Since all initial states of a QDS converge towards its center manifold (that compriseseigenoperators relative to purely imaginary eigenvalues), non-initialized states could also convergeto rotating states, preventing the CPTP map Φ P from being well-deﬁned. By requiring the limitto exist, we must have, in particular, eigenoperators corresponding to eigenvalue zero (i.e., non-oscillating) and hence the limit, for each initial condition, is a ﬁxed operator. Also notice that whileno explicit robustness against initialization errors is imposed, a CDE can, at least in principle,reabsorb errors asymptotically . Assume that two diﬀerent states ρ , ρ are to be correctly encodedin the same codeword ρ ∈ C . Then their diﬀerence must converge to zero, which can happen onlyasymptotically for continuous-time dynamics [29]. Since our discussion will focus on the ability ofdissipative encoding to reabsorb errors, this justiﬁes the asymptotic limit in our deﬁnition.

2. Discrete-time encoders

In scenarios where the physical encoder is implemented via a discrete sequence of operations(unitary and dissipative gates and measurements), a diﬀerent deﬁnition is more appropriate. Thediscrete-time framework allows for ﬁnite-time convergence, and includes more naturally the typicalunitary protocols for encoding as a limiting case.A sequence of CPTP maps {E k } on B ( H P ), deﬁnes discrete-time dissipative encoding (DDE) for a subsystem code C if for all initialized states Φ L ( ρ ) = ρ P (cid:48) (cid:39) ρ ⊗ τ F (cid:48) ⊕ R (cid:48) , where ρ ∈ D ( H L )and τ F (cid:48) ∈ D ( H (cid:48) F ), the evolution converges asymptotically to the intended state in C , that is,lim k → + ∞ E k ◦ E k − ◦ . . . ◦ E [ ρ (cid:48) ] = ρ (cid:39) ρ ⊗ τ F ⊕ R ∈ C . (11)3The limit of the concatenated sequence exists by deﬁnition, at least for initialized input states, andits extension to a CPTP map Φ P is the discrete-time dissipative physical encoder.In contrast with continuous time, in a discrete-time scenario perfect encoding can be achieved inﬁnite time in principle: A ﬁnite sequence of CPTP maps, {E k } Mk =1 on B ( H P ), deﬁnes a ﬁnite-timedissipative encoder (FTDE) for a subsystem code C , if for all initialized states Φ L ( ρ ) = ρ P (cid:48) (cid:39) ρ ⊗ τ F (cid:48) ⊕ R (cid:48) , where ρ ∈ D ( H L ) and τ F (cid:48) ∈ D ( H F (cid:48) ), the evolution converges to the intended statein the code in a ﬁnite number of steps, that is, E M ◦ E M − ◦ . . . ◦ E [ ρ (cid:48) ] = ρ (cid:39) ρ ⊗ τ F ⊕ R ∈ C . (12)We say that a discrete-time or FT DE is QL with respect to a neighborhood structure N if each E k is a neighborhood map.An FTDE allows for exact encoding in ﬁnite time, as typical unitary encoders do, while retainingthe ability of absorb initialization errors. While in the discrete-time scenario the invariance of thecode states is not strictly required to reabsorb errors, imposing invariance allows us to bettercompare with CDE, and makes the encoding task compatible with QEC protocols, as we shall seein the next section. We will say that a discrete-time DE or FT DE is code preserving if each state ρ ∈ C satisﬁes E k ( ρ ) = ρ , for each of the maps E k in Eq. (11) or Eq. (12), respectively. IV. FINITE-TIME DISSIPATIVE ENCODERS FOR STABILIZER QUANTUM CODESA. A ﬁnite-time encoder for the repetition code

In order to gain intuition into the general case, we ﬁrst reconsider the 3-qubit repetition code,within the stabilizer formalism. As mentioned in Remark 1, H C = span {| (cid:105) , | (cid:105)} = H S can beassociated to stabilizer generators { S = ZZI, S = IZZ } ∈ S . As before, we consider the ﬁrstphysical qubit to be the upload qubit, which we assume to be initialized in the logical state ρ L tobe encoded, and we choose the logical operators to be X = XXX and Z = ZII . We now showthat C may be encoded in ﬁnite time from a localized upload qubit using a sequence of two-bodyCPTP maps, that is, Φ P = Φ ◦ Φ , where indexes are understood to label physical qubits [50].Our strategy is to choose encoding maps that resemble the error-correcting operations of astabilizer code. As a ﬁrst step, we propose a structure for the CPTP maps that guarantees that theimage of Φ P = Φ ◦ Φ corresponds to C . Each of the two-body maps performs a measurementof the stabilizer generator S k , associated to projectors ( I ± S k ) , followed by a unitary (Pauli)correction operation C k in case the outcome corresponding to ( I − S k ) is observed. As in stabilizerQEC, we choose C k so that it anticommutes with S k . Hence, C k ( I − S k ) = ( I + S k ) C k . TheKraus operators of the composed map Φ P are then K ( i ,i ) = 12 ( I + S ) C i

12 ( I + S ) C i , i , i ∈ { , } . In order for the range of these composed maps to be in C , it is necessary and suﬃcient that[ C , S ] = 0. For necessity, consider that [ C , S ] (cid:54) = 0. Then, it must be that { C , S } = 0, sinceelements in P n either commute or anti-commute. The Kraus operator K ( i , would then be of theform ( I + S ) ( I − S ) C C i , having a range which is orthogonal to H C . That commutativity isalso suﬃcient follows from the fact that the range of the composed map’s Kraus operators is therange of ( I + S )( I + S ), which is equal to the code support (see Proposition 1 below).We can narrow down our search further by requiring that the logical operators of the code be leftinvariant, making the encoder code-preserving. This is equivalent to having the correction operators4commute with the logical operators, leaving, in our speciﬁc case, a choice of C ∈ { IXI, ZY I } and C ∈ { IIX, IZY } .Furthermore, for a general correction map, correction operators are only ever deﬁned up tomultiplication by the corresponding stabilizer. For instance, the Kraus operators of the ﬁrst map,including the correction, can be written equivalently with respect to either choices of the correctionoperator C , since12 ( III + ZZI ) ZY I = 12 (

ZZI + III )( ZZI ) ZY I = 12 (

III + ZZI ) IXI.

Therefore, our requirements have eﬀectively singled out one possibility for the encoding maps. Thekey properties of these maps is that the range of their composition is in C and the logical operatorvalues are left invariant.Having speciﬁed the form of Φ P , we determine the basin of attraction B ρ which ensures thatΦ P ( ρ L ⊗ σ ) = ρ. In this case, since the summand H R is empty, it is suﬃcient to determine theset of co-factor states σ that guarantee the correct encoding above. For this to be achieved, theexpectation of the logical operators computed with the output density matrix must coincide withthose of the upload qubit, that is,tr( X i Z j Φ P ( ρ L ⊗ σ )) = tr( X i Z j ρ L ) , ∀ i, j ∈ { , } . (13)Since, by construction, Φ P leaves the values of the logical operators invariant, the above equationsimpliﬁes to tr( X i Z j ρ L ) = tr( X i Z j ( ρ L ⊗ σ )) . Evaluating this for the repetition code, we obtaintr( X i Z j ρ L ) = tr(( X i Z j ρ L ) ⊗ [( XX ) i σ ]) , giving tr(( XX ) i σ ) = 1. Accordingly, the basin of attraction for ρ is the set of density operators ρ L ⊗ σ with support of σ contained in the +1-eigenspace of XX . B. General structure of ﬁnite-time encoders

Building on the previous example, we now construct a FTDE Φ P for a given stabilizer (subspace)code, with stabilizer generators { S k } rk =1 ⊆ P n , by considering a composition of r encoding CPTPmaps of the form Φ k ( ρ ) ≡ A + ,k ρA † + ,k + A − ,k ρA †− ,k , k = 1 , . . . , r, where A + ,k ≡

12 ( I + S k ) , A − ,k ≡ C k ( I − S k ) . Here, { C k } rk =1 are correction-like operators, that we require to satisfy a number of constraints. E1. The code space must be correctly prepared. { C k } rk =1 are Pauli operators such that { C k , S k } = 0 , ∀ k, (14)and [ C k , S j ] = 0 , ∀ j (cid:54) = k. (15)This implies that A − ,k can be rewritten as A − ,k = 12 ( I + S k ) C k . (16)The latter form is useful in proving that Φ P prepares the code subspace in the Schr¨odinger’s picture,that is, in establishing the following:5 Proposition 1

If the conditions in Eqs. (14) - (15) are obeyed, then any concatenation Φ P of the r maps Φ , . . . , Φ r prepares the code subspace, Φ P ( ρ ) ∈ C , and each encoded state ρ ∈ C is invariant. Proof.

If an operator has support on H C , then it is in the +1-eigenspace of all the A + ,k operatorsand in the kernel of all the A − ,k , and hence it is preserved by each Φ k . Thus, H C is invariant and,in particular, all the encoded states are ﬁxed states for Φ k ’s and thus Φ P . Using Eq. (16) torepresent all the A − ,k operators of the Φ k and Eq. (15) to “push” all correction operators before(to the right of) the projections, all Kraus operators of the concatenated maps Φ P , independentlyof the order of the Φ k , can be written in the form Π C ¯ C , whereΠ C ≡ (cid:89) (cid:96) =1 ,...,r ( I + S k ) / , is the projection on the stabilizer subspace H S = H C , and ¯ C an ordered product of a subsetof correction operators of the selected A − ,k . Hence, the output of the concatenated map Φ P hassupport contained in the support of C . Since all the maps are TP, this implies that the Φ P stabilizes H C in ﬁnite time [29, 43, 44]. (cid:3) It is worth noticing that: (i) Condition (15) is also necessary for invariance given the structure ofthe maps we chose, as in the repetition-code example; (ii) if an ordering for the stabilizer operatorsis ﬁxed, we can replace Eq. (15) with a weaker requirement, namely, [ C k , S j ] = 0, ∀ j < k . Thestronger condition (15) will imply that the encoding maps can be applied in any order (namely,they guarantee robust FTDE with respect to the map ordering ). Remarkably, we will prove thatﬁnding such operators is always possible for stabilizer codes.To address the encoding, however, this is not suﬃcient. We need to impose that the uploadqubits are correctly mapped to the corresponding ones in C . To this aim, it is convenient to focuson the eﬀect of the encoder on the observables – that is, to move to the Heisenberg picture. E2. Encoded operators must be extensions of the upload ones.

Consider a partition of thephysical subsystems in upload qubits and (with some abuse of terminology) gauge qubits for theencoding maps: H P (cid:39) H upload ⊗ H gauge . The upload subsystems initially carry the the informationthat will be transferred into C by the encoder; the gauge qubits are the rest. Let { X k , Z k } n − rk =1 bea canonical choice of logical operators for the input subsystem. We require that: X p Z q · · · X p n − r n − r Z q n − r n − r = X p Z q · · · X p n − r n − r Z q n − r n − r ⊗ R p,q , (17)for all p = ( p , . . . , p n − r ), q = ( q , . . . , q n − r ) such that p i , q i ∈ { , } , with R p,q being a Paulioperator acting non-trivially on the co-factor (gauge) subsystem H gauge . E3. Encoded operators must be invariant.

While we proved that all states on the code sup-port are indeed invariant, the operators we choose to represent encoded information have supporteverywhere, and their invariance is not directly guaranteed by the form of the maps Φ k . As in therepetition code example, invariance is guaranteed if[ C k , X j ] = [ C k , Z j ] = 0 , ∀ j (cid:54) = k. (18)Condition (18), in the dual (Heisenberg) picture, ensures that the logical operator are ﬁxed pointsfor the maps Φ k and it further allows us to easily determine the basin of attractions of Φ P .We can now show that the Φ P we constructed is indeed a valid encoder for the target code: Proposition 2

The concatenation Φ P = Φ r ◦ · · · ◦ Φ , for any ordering of the Φ i , is a validFTDE for the stabilizer code C if requirements E1.-E2.-E3. above are satisﬁed. The common -eigenspace of the R p,q identiﬁes the basin of attraction of co-factor states σ for the associatedphysical encoder, that is, Φ P ( ρ L ⊗ σ ) = ¯ ρ ∈ C , where ρ L is the state on the ﬁrst n − r qubits to beencoded, and supp( σ ) is contained in the common +1-eigenspace of R p,q . Proof.

Proper encoding (in the Heisenberg picture) is ensured if:tr( X p Z q · · · X p n − r n − r Z q n − r n − r Φ P ( ρ L ⊗ σ )) = tr( X p Z q · · · X p n − r n − r Z q n − r n − r ρ L ) , (19)for all p = ( p , . . . , p n − r ), q = ( q , . . . , q n − r ) such that p i , q i ∈ { , } . Assuming that the conditionsin Eqs. (15), (17), (18) hold, we have, for all p, q :tr( X p Z q · · · X p n − r n − r Z q n − r n − r Φ P ( ρ L ⊗ σ )) = tr (cid:0) Φ † P ( X p Z q · · · X p n − r n − r Z q n − r n − r )( ρ L ⊗ σ ) (cid:1) = tr( X p Z q · · · X p n − r n − r Z q n − r n − r ( ρ L ⊗ σ ))= tr( X p Z q · · · X p n − r n − r Z q n − r n − r ρ L )tr( R p,q σ ) . (20)In the last two equations we have used two facts: (i) the encoded operators are invariant for the(dual) encoder Φ † P , as they commute with both S k and C k , by Eq. (18). Therefore, for each k , A †± ,k ( X p Z q · · · X p n − r n − r Z q n − r n − r ) A ± ,k = ( X p Z q · · · X p n − r n − r Z q n − r n − r ) A †± ,k A ± ,k , from which invariance for the (unital) concatenation map Φ † P follows; and (ii) the explicit form inEq. (17) for the encoded operators. Then (19) is equal to (20) if and only if is the co-factor state σ is such that tr( R p,q σ ) = 1 , for all p, q. (cid:3) Remark 5

A similar construction to the one described above can be used to build a CDE, asdeﬁned in Sec. III C 1. More precisely, the semigroup generator L ( ρ ) ≡ Φ P ( ρ ) − ρ, where Φ P is aDDE, deﬁnes a CDE from the ﬁrst n − r qubits to the subspace code C , with basin of attractionthe common +1-eigenspace of R p,q . The full proof, which employs a diﬀerent approach leveragingLyapunov techniques, is given in [30]. C. Main result and implications

In the following theorem, which is the main result of this section, we both establish that,for stabilizer codes, it is always possible to construct encoding maps that satisfy the structuralconstraints speciﬁed above, and provide an explicit construction achieving that. As a corollaryof the analysis, we further show that the basin of attraction is always non-empty, and in factcorresponds to a stabilizer subspace of the co-factor space.

Theorem 2 (FTDE for stabilizer codes)

Given a stabilizer group S associated to a (subspace)code C , there exists a set of generators { S i } ri =1 , logical operators { X i , Z i } n − ri =1 and correction maps { C i } ri =1 satisfying the encoding requirements E1.-E2.-E3 for FTDE in C . Proof.

The proof is constructive. First, we show how to deﬁne a set of logical operators { X i , Z i } n − ri =1 satisfying condition E3. To this end, we exploit the check matrix representation ofthe stabilizer generators (see Appendix A). Speciﬁcally, we can express the check matrix of thestabilizer group S as S = n − r r − k k n − r r − k k (cid:20) (cid:21) A A I B C k D I E r − k ∈ Z r × n (21)7for binary matrices A , A , B , C , D , E of suitable dimensions (speciﬁed by the top and rightlabels). In particular, Eq. (21) corresponds to the “standard form” presented in [1, Sec. 10.5.7],up to a relabeling of qubits. Next, we deﬁne G z ≡ n − r r − k k n − r r − k k [ ]0 0 0 I A (cid:62) n − r ∈ Z ( n − r ) × n , (22) G x ≡ n − r r − k k n − r r − k k [ ] I D (cid:62) B (cid:62) n − r ∈ Z ( n − r ) × n . (23)Notice that the rows of G z and G x commute with every stabilizer generator in Eq. (21), since S Λ G (cid:62) z = 0 and S Λ G (cid:62) x = 0 . Further, it holds G z Λ G (cid:62) x = I . This in turn implies that the Pauli operators deﬁned by the rowsof G z and G x yield a canonical set of generators. We now deﬁne a set of generators of S , { S i } ri =1 ,via the rows of S in Eq. (21) and a set of encoded X operators, { X i } n − ri =1 , encoded Z operators, { Z i } n − ri =1 , via the rows of G x , G z , respectively. If we assume, without loss of generality, that theﬁrst r qubits represent the physical input (upload) qubits, the latter encoded logical operators areseen to satisfy condition E2.To complete the proof, we need to ﬁnd a set of correction operators satisfying E1.-E3. To thisend, we ﬁrst observe that the rows of the matrix S ≡ SG z G x ∈ Z (2 n − r ) × n are linearly independent by construction. By using Propositions 10.3-10.4 in [1], there exists a setof correction operators { C i } ri =1 in P n satisfying the desired conditions. More precisely, since therows of S are linearly independent, there always exists a vector x i ∈ Z n such that S Λ x i = e i , where e i denotes the (2 n − r )-dimensional vector with a 1 in the i -th position and 0s elsewhere. Supposethat x (cid:62) i corresponds to the row vector representation of C i . In view of condition S Λ x i = e i , C i commutes with all Pauli operators deﬁned via the rows of S , with the only exception of the i -thoperator. We have therefore constructed a set { C i } ri =1 that satisﬁes conditions E1.-E3. (cid:3) Through the construction proposed in the proof, we can explicitly obtain the operators R p,q ofEq. (17). These satisfy some additional interesting properties (recall also Proposition 2): Corollary 1 (Basin of attraction)

Given the construction of Theorem 2, the Pauli operators R p,q are pairwise commuting and identify a stabilizer subgroup, G , on the physical gauge qubits.The latter identiﬁes the basin of attraction B ¯ ρ of co-factor (gauge) states σ for the physical encoder,that is, Φ P ( ρ L ⊗ σ ) = ¯ ρ ∈ C , for all σ ∈ B ¯ ρ , where ρ L is the state on the ﬁrst n − r qubits to beencoded, and σ has support on the subspace stabilized by G . Proof.

From the check matrix representation of the logical operators in Eqs. (22)-(23), the Paulioperators R p,q are deﬁned via the rows of the two check matrices R z = r − k k r − k k [ ]0 0 0 A (cid:62) n − r ∈ Z ( n − r ) × r , (24) R x = r − k k r − k k [ ] D (cid:62) B (cid:62) n − r ∈ Z ( n − r ) × r . (25)8Since R z Λ R (cid:62) z = 0, R x Λ R (cid:62) x = 0, and R x Λ R (cid:62) z = 0, it follows that the Pauli operators R p,q alwayscommute pairwise and, therefore, form a stabilizer subgroup G . Thus, the basin of attraction ofthe code, that is identiﬁed with the co-factor states σ such that tr( R p,q σ ) = 1 , ∀ p, q , is determinedby all the states with support on the subspace stabilized by G . (cid:3) A few additional observations can be made, regarding the structure of the R p,q operators andthe basin of attraction: (i) In view of the check matrix representation of operators R p,q in Eqs. (24)-(25), it followsthat the basin of attraction always contains the product state | + (cid:105) ⊗ r − k ⊗ | (cid:105) ⊗ k , where | + (cid:105) denotesthe +1-eigenstate of X . This can be considered as an easy to prepare, nominal gauge state for theinitialization map Φ L . (ii) Since the operators R p,q in Eqs. (24)-(25) generate a stabilizer group, the basin of attractionhas (at least) dimension 2 r − ¯ r , where ¯ r is the (row) rank of the matrix¯ R ≡ (cid:20) R z R x (cid:21) ∈ Z n − r ) × r . In the worst case where ¯ R is of full row rank, the basin of attraction has dimension 2 r − n . (iii) If D (cid:62) in Eq. (25) has d x all-zero columns, then the basis of attraction contains d x physicalinput qubits. Further, if the column block of ¯ R , (cid:20) A (cid:62) B (cid:62) (cid:21) ∈ Z n − r ) × k , has d z all-zero columns, then the basis of attraction contains d z additional physical input qubits. V. ILLUSTRATIVE EXAMPLES

In this section, we exemplify the some of the general concepts and the construction of a FTDEpresented in the previous section in a number of paradigmatic stabilizer quantum codes. Whilewe ﬁrst consider some of the more standard stabilizer codes employed for encoding a single logicalqubit, we discuss separately (in Sec. in Sec. V B) the simplest example of a topological stabilizercode, Kitaev’s toric code on the square lattice [28, 45]. This is motivated by the additional specialfeatures that these codes enjoy – namely, locality of all their stabilizer generators – which alsonaturally suggest using an approach diﬀerent than the general one based on their standard formfor constructing the desired correction operators and dissipative maps.

A. Standard stabilizer codes

1. Shor’s 9-bit code

Shor’s 9-qubit code [31] provided, historically, the ﬁrst example of a concatenated quantum code ,whereby the ability to correct arbitrary single-qubit errors is achieved by a “nested” repetition-codestructure and linearity [1]. The code space is H C = span (cid:110) √ | (cid:105) ± | (cid:105) ) ⊗ (cid:111) , where the sign + ( − ) corresponds to | L (cid:105) ( | L (cid:105) ), respectively. That is, the two basis states havethe form of a phase-ﬂip code, where each of the three qubits of such a code has then been encoded9in the bit-ﬂip code described in Example 1. As mentioned in Remark 1, in the stabilizer languageand seen as a subspace code, this corresponds to a [[9 , , S = XXXIIXXXI,S = XIIXXXXIX,S = IZIIIIIZI,S = IIZIIIIZI,S = IIIZIIIIZ,S = IIIIZIIIZ,S = ZIIIIZIII,S = ZIIIIIZII.

The corresponding logical operators are X = XIIIIXXII, Z = ZIIIIIIZZ.

A set of correction operators { C i } i =1 such that [ C i , S j ] = 2 δ ij C i S j for all i, j = 1 , , . . . , C i , X ] = [ C i , Z ] = 0 for all i = 1 , , . . . ,

8, is then C = IZIIIIIII,C = IIIZIIIII,C = IXIIIIIII,C = IIXIIIIII,C = IIIXIIIII,C = IIIIXIIII,C = IIIIIXIII,C = IIIIIIXII.

Using Corollary 1, the basin of attraction of this code is found to consists of 8-qubit co-factorstates σ ∈ B ¯ ρ such thattr( R p,q σ ) = tr( I ⊗ ⊗ X i ⊗ X i ⊗ Z j ⊗ Z j σ ) = 1 , i, j = 0 , . This means that our proposed FTDE encodes an arbitrary state Φ ◦ · · · ◦ Φ ( ρ L ⊗ σ ) = ¯ ρ ∈ C , robustly with respect to both initialization of σ ∈ B ¯ ρ and with respect to the application order ofthe maps. In particular, any product state of the form | ψ (cid:105) ⊗ | ψ (cid:105) ⊗ | ψ (cid:105) ⊗ | ψ (cid:105) ⊗ | + (cid:105) ⊗ ⊗ | (cid:105) ⊗ ,with | ψ i (cid:105) , i = 1 , , ,

4, being arbitrary qubits, belongs to B ¯ ρ . As we noted in Sec. II B 2, Shor’scode may be seen as a [[9 , , , , , ,

2. Steane’s 7-bit code

Steane’s code, independently discovered as one of the ﬁrst known quantum codes [32], alsoachieves QEC against arbitrary single-qubit errors, however without resorting to a concatenated0structure. The stabilizer generators for this [[7 , , S = XIXXXII,S = XXIXIXI,S = IXXXIIX,S = ZZIIZIZ,S = ZIZIIZZ,S = IIIZZZZ, whereas he corresponding logical operators are X = XXXIIII, Z = ZIIIZZI.

A set of correction operators { C i } i =1 such that [ C i , S j ] = 2 δ ij C i S j for all i, j = 1 , , . . . , C i , X ] = [ C i , Z ] = 0 for all i = 1 , , . . . ,

6, is C = ZIZZIII,C = ZZIZIII,C = IZZZIII,C = IXIIIII,C = IIXIIII,C = IIIXIII.

The basin of attraction now consists of 6-qubit co-factor (gauge) states σ such thattr( R p,q σ ) = tr( X i ⊗ X i ⊗ I ⊗ Z j ⊗ Z j ⊗ I σ ) = 1 , i, j = 0 , . In particular, any product state of the form | + (cid:105) ⊗ ⊗ | ψ (cid:105) ⊗ | (cid:105) ⊗ ⊗ | ψ (cid:105) , with | ψ i (cid:105) , i = 1 ,

2, beingarbitrary qubits, belongs to the basin of attraction. Unlike for Shor’s code, no gauge symmetry(hence no gauge qubits) are present in this case. Therefore, dissipative encoders provide in thiscase the only means to achieve error-tolerant initialization.

3. The 5-qubit perfect code

The 5-bit code provides the simplest example of a stabilizer code that is not additive , namely,one that is not constructed from classical codes with some special properties [1]. It is also provablythe smallest quantum code that can correct arbitrary single-qubit errors, hence often referred to asa “perfect” code [36]. The stabilizer generators for this [[5 , , S = Y Y ZIZ,S = XIXZZ,S = XZZXI,S = Y ZIZY, with the corresponding logical operators X = X Z I I Z, Z = Z Z Z Z Z.

1A set of correction operators { C i } i =1 such that [ C i , S j ] = 2 δ ij C i S j for all i, j = 1 , , , C i , X ] = [ C i , Z ] = 0 for all i = 1 , , ,

4, is C = ZIXIX,C = Y IXXX,C = Y XXXI,C = ZXIXI.

In this case, the basin of attraction consists of 4-qubit co-factor (gauge) states σ such thattr( R p,q σ ) = tr(( Z i Z j ) ⊗ Z j ⊗ Z j ⊗ ( Z i Z j ) σ ) = 1 , i, j = 0 , . In particular, the product state | (cid:105) ⊗ belongs to the basin of attraction. Again, no representationwith gauge qubits is available for this code and hence a dissipative quantum circuit Φ ◦ · · · ◦ Φ isthe only way to warrant a non-trivial robustness in encoding. B. Topological stabilizer codes: Kitaev’s toric code

The toric code, C T , in two dimensions employs a 2D lattice of 2 L physical qubits arranged onthe edges of the squares of a grid [51]. As we already remarked, a key feature of this topologicalcode is that all the stabilizer operators are geometrically local. Neighboring quartets of qubitseither surround a square of the grid (“plaquette”) or surround the intersection of a vertical and ahorizontal line of the grid (“vertex”). To each plaquette p and to each vertex v (see Fig. 2a), weassign a four-body stabilizer acting on the corresponding qubits deﬁned, respectively, by H p ≡ ( Z ⊗ ) p ⊗ I ¯ p , H v ≡ ( X ⊗ ) v ⊗ I ¯ v , (26)where ¯ p denotes the complement to p , and similarly for ¯ v . Since each plaquette overlaps with aneven number of systems in any vertex, we have [ H p , H v ] = 0 for all p and v . One consequence ofthe toroidal geometry is that the above plaquette and vertex Hamiltonians are not algebraicallyindependent, since (cid:89) p H p = I and (cid:89) v H v = I. (27)These algebraic dependencies lead to the deﬁnition of a set of logical operators corresponding to atwo-qubit logical subspace. This space constitutes the toric code and may be deﬁned as the spaceof vectors | ψ (cid:105) satisfying H p | ψ (cid:105) = H v | ψ (cid:105) = | ψ (cid:105) for all p and v . Physically, C T corresponds to the(four-fold degenerate) ground space of the toric-code Hamiltonian H T ≡ − ( (cid:80) p H p + (cid:80) v H v ) . Lateron, we will use the fact that it suﬃces to associate C T to the +1-eigenspace of all but one H p andall but one H v . This follows from the algebraic redundancy expressed in Eq. (27).In [27], the authors provide a Liouvillian, constructed as a sum of plaquette- and vertex-actingterms, which generates a CDE from two localized physical qubits into C T . Following their labelingscheme (see Fig. 2b), the two neighboring upload qubits A and A are chosen so as to share aplaquette and vertex, which are labeled p ∗ and v ∗ . Then, the qubits of the vertical and horizontalstrips which pass through p ∗ (except for A and A ) are each prepared in | + (cid:105) . These stripsare labeled B and B , respectively. Similarly, the qubits of the bands passing through v ∗ areeach prepared in | (cid:105) . If these strips are labeled C and C , respectively, this results in the state | φ (cid:105) BC ≡ | + (cid:105) ⊗ L − B ⊗ | + (cid:105) ⊗ L − B ⊗ | (cid:105) ⊗ L − C ⊗ | (cid:105) ⊗ L − C . The logical operators are chosen as (see Fig. 3): X ≡ X A ⊗ X ⊗ L − B ⊗ I D , Z ≡ Z A ⊗ Z ⊗ L − C ⊗ I D ,X ≡ X A ⊗ X ⊗ L − B ⊗ I D , Z ≡ X A ⊗ Z ⊗ L − C ⊗ I D . (a) Plaquette and vertex stabilizeroperators (b) Qubit labeling scheme FIG. 2: (a) The four-body stabilizer operators of the toric code act on vertices v as X ⊗ or on plaquettes as Z ⊗ . (b) A and A are the two upload qubits whose initial state is mapped into the code. B and C arethe systems (in addition to A ) on which the code’s logical operators for the ﬁrst encoded qubit are deﬁnedto act. The same holds for B and C with respect to the second encoded qubit. D denotes the remainingqubits. The systems B , C , B , and C must be properly initialized in order to achieve a faithful encoding. (a) Logical X s of toric code (b) Logical Z s of toric code FIG. 3: A deﬁnition of logical operators for the toric code. Logical operators consist of topologically non-trivial loops of local bit-ﬂip or local phase-ﬂip errors.

The authors of [27] show that, with this initialization, the state of A ⊗ A is driven towards thecorresponding state of C T by means of their constructed Lindblad dynamics. After reviewing theCPTP correction maps used to construct such a Lindblad dynamics, we show that a judiciousordering of these maps does, in fact, constitute a FTDE.The stabilizer generators are { H p , H v } , where the set ranges over all plaquettes and vertices,except for p ∗ and v ∗ as speciﬁed above. Correction maps Φ p and Φ v are associated to each of thesestabilizer generators, for a total number of t ≡ L −

1) maps. Let plaquettes and vertices belabeled according to their lattice coordinates with respect to p ∗ and v ∗ , so that the plaquette p α,β and vertex v α,β lie α sites north and β sites east of p ∗ and v ∗ , respectively. If we use a tensorproduct structure where, for each plaquette and vertex system, the north, east, south, and west3 (a) Vertex correction maps (b) Plaquette correction maps FIG. 4: Sequences of CPTP maps for FTDE. The ordering of the correction maps and the location ofcorrection operators are chosen so that 1) correction operators commute with all four logical operators and2) subsequent correction operators are applied where no correction map has acted previously. qubits are N ⊗ E ⊗ S ⊗ W , we further deﬁne the following (unitary) correction operators: C p α, ≡ ( I ⊗ X ⊗ I ⊗ I ) p ⊗ I ¯ p ,C p α,β ≡ ( X ⊗ I ⊗ I ⊗ I ) p ⊗ I ¯ p ,C v ,β ≡ ( I ⊗ I ⊗ Z ⊗ I ) v ⊗ I ¯ v ,C v α,β ≡ ( I ⊗ I ⊗ I ⊗ Z ) v ⊗ I ¯ v . Finally, let the Kraus operators for the plaquette and vertex correction maps Φ p α,β and Φ v α,β be labeled K ( i ) p α,β and K ( i ) v α,β , respectively. The scheme devised in [27] for continuously correctingresidual errors in A and A suggests a choice of ordering for these dissipative maps as depictedin Fig. 4. From the construction in the proof of Theorem 2, we expect that the key feature of thischoice of correction operators and ordering is that subsequent correction operators commute withall previous stabilizer operators.Each plaquette correction map commutes with each vertex correction map, since exchangeof their Kraus operators can, at most, accrue an irrelevant global phase (which cancels in thesuperoperator). Without loss of generality, we consider the vertex maps to act ﬁrst. As seen inFig. 4, the ordering among the vertex (respectively, plaquette) correction maps is chosen such thateach subsequent correction operator acts where no previous correction map (and hence stabilizeroperator) has acted. This veriﬁes that subsequent correction operators commute with all previousstabilizer operators, as desired.Let i ≡ ( i , . . . , i t ) ∈ { , } t specify the i = 0 , P may be written as follows K ( i ) = (Π C i ) . . . (Π t C i t t ) = Π + ( C i . . . C i t t ) = Π + C ( i ) , where Π j ≡ ( I + H j ) and Π + is the projector onto the support of C T .The encoder can then be written asΦ P ( · ) = Φ ◦ . . . ◦ Φ t ( · ) = Π + (cid:16) (cid:88) i C ( i ) · C ( i ) † (cid:17) Π + . This veriﬁes that the range of the encoder is contained in the code itself. While the existence ofa FTDE for C T is implied by Theorem 2, the above construction further explicitly shows how this4encoding can be achieved using dissipative dynamics that is QL relative to the natural (four-local)neighborhood structure. We note that, while the number of required CPTP maps scales as L ,if we apply commuting maps in parallel, it is possible to equivalently implement Φ P in a timethat scales as L . This matches the scaling of the CDE of [27] (see also [46]), with the importantadvantage that in our case we can guarantee exact preparation in a ﬁnite evolution time, as longas all Φ j are implemented correctly.Finally, we determine the initializations that ensure a two-qubit state ρ L on A ⊗ A to beencoded into ρ ∈ C T . Let the initial state be ρ L ⊗ σ = ρ A A ⊗ σ BCD . The basin of attraction for σ is determined by the analogue of Eq. (13), namely,tr( X i A Z j A X k A Z l A ρ L ) = tr (cid:16) X i Z j X k Z l Φ P ( ρ A A ⊗ σ BCD ) (cid:17) , ∀ i, j, k, l ∈ { , } . Since the correction operators and the stabilizers commute with the logical operators, we haveΦ † P ( X i Z j X k Z l ) = X i Z j X k Z l . With this, the above equation simpliﬁes totr( X i A Z j A X k A Z l A ρ L ) = tr (cid:16) ( X i A Z j A X k A Z l A ρ L ) ⊗ (( X i Z j X k Z l ) ⊗ L − BC σ BCD ) (cid:17) = tr (cid:16) X i A Z j A X k A Z l A ρ L (cid:17) tr (cid:16) ( X i Z j X k Z l ) ⊗ L − BC σ BC (cid:17) , where in the last step, we have traced out D to obtain σ BC = tr( D σ BCD ). Hence, the state ofsystem D does not aﬀect the encoding. This determines the basin of attraction to be states σ BCD with reduced state on BC satisfying tr(( X i Z j X k Z l ) ⊗ L − BC σ BC ) = 1, for all i, j, k, l . A suﬃcientchoice of initial state, as used in [27], is the pure state | φ (cid:105) BC = | + (cid:105) ⊗ L − B | (cid:105) ⊗ L − C | + (cid:105) ⊗ L − B | (cid:105) ⊗ L − C introduced before. This demonstrates that a suitable initialization can be implemented locally.The full basin of attraction can be described as comprising any density operator with support inthe +1-eigenspace of each of the four commuting operators X ⊗ L − B , Z ⊗ L − C , X ⊗ L − B , and Z ⊗ L − C . VI. CONCLUSION

The ability to eﬀectively map – encode – abstractly deﬁned quantum information into logicallyrepresented degrees of freedom associated to a quantum code is an essential prerequisite for achiev-ing noise-protected quantum information processing in physical devices. While standard encodingprocedures employ discrete-time dynamics as realized by ﬁnite sequences of unitary quantum gates,we focused on formalizing the notion of a dissipative (Markovian) quantum encoder. In particu-lar, we argued how the use of discrete-time dissipative dynamics – a dissipative quantum circuitin the sense of [29] – can combine advantageous features from both the unitary setting and thecontinuous-time setting considered in [27, 30]. Speciﬁcally, such encoders can aﬀord extra robust-ness against a class of initialization errors thanks to the non-trivial basins of attraction that theirdissipative nature aﬀords, while retaining the possibility of exact convergence in a ﬁnite numberof steps that unitary circuits also enjoy. As a main result, we have showed that ﬁnite-time dissipa-tive encoders may always be constructed in principle for the important class of stabilizer quantumerror-correcting codes. For stabilizer codes which, like Steane’s 7-bit code or the 5-bit code, fail topossess gauge degrees of freedom in their subsystem (operator error correction) form, dissipativeencoders provide the only means for achieving nontrivial robustness against initialization errors,with the details depending on the structure of the encoder’s basin of attraction.A number of questions are left to future investigations. From both a conceptual and a practicalstandpoint, a particularly relevant question is to determine the extent to which ﬁnite-time con-vergence may be aﬀected by relevant kinds of errors in implementing the required encoding maps.While stability results under local perturbations have been established, in the quantum setting,5for continuous-time Markovian dynamics exhibiting rapid mixing [48], no results are available forﬁnite-time-stable discrete-time dynamics to the best of our knowledge. Also of interest would bethe design of explicit dissipative quantum encoders tailored to speciﬁc implementation platforms– notably, circuit QED architectures, for which explicit protocols for implementing quantum mapsusing an ancilla qubit with QND readout and adaptive control were recently proposed [49].

Acknowledgments

Work at Dartmouth was partially supported by the US NSF under grant No. PHY-1620541and the US DOE, Oﬃce of Science, Oﬃce of Advanced Scientiﬁc Computing Research, AcceleratedResearch for Quantum Computing program. G.B. and F.T. have been partially funded by theQUINTET, QFUTURE and QCOS projects of the Universit`a degli Studi di Padova.

Appendix A: Symplectic representation for stabilizers codes

We recall that one can conveniently represents the generators { S k } rk =1 of a stabilizer group usingthe so-called symplectic representation and the check matrix [1, Sec. 10.5]. For qubits, the latter isan r × n matrix whose rows correspond to the generators S through S r , and the columns to theset of generators of the Pauli group P n given by single-qubit X and Z operators. The left-handside of the matrix contains 1s to indicate which generators contain X s, and the right-hand sidecontains 1s to indicate which generators contain Z s; the presence of a 1 on both sides indicates a Y in the generator.One of the main interests in this representation is that it allows to check commutativity as alinear algebraic property, through a symplectic product. Let us deﬁne the 2 n × n matrixΛ ≡ (cid:20) II (cid:21) , where the I matrices on the oﬀ-diagonals are n × n . It can be shown that two elements of the Pauligroup, say g and g , commute, if and only if the corresponding row vectors in the check matrixrepresentation, say G and G , satisfy G Λ G (cid:62) = 0 (where arithmetic is done modulo two). Appendix B: Technical proofs1. Co-tensor factor states must be independent of logical information

Lemma 2

Consider two decompositions H L (cid:48) ⊗ H F (cid:48) ⊕ H R (cid:48) and H L (cid:48)(cid:48) ⊗ H F (cid:48)(cid:48) ⊕ H R (cid:48)(cid:48) with dim( H L (cid:48) ) =dim( H L (cid:48)(cid:48) ) , and full rank states τ F (cid:48) ∈ D ( H F (cid:48) ) , τ F (cid:48)(cid:48) ∈ D ( H F (cid:48)(cid:48) ) . Suppose that for any pair of pure initializations in H L (cid:48) with co-factor state τ F (cid:48) , and in H L (cid:48)(cid:48) with co-factor state τ F (cid:48)(cid:48) , it holds (cid:40) Π L (cid:48) F (cid:48) ( ρ L ⊗ τ F (cid:48)(cid:48) ⊕ R (cid:48)(cid:48) )Π L (cid:48) F (cid:48) (cid:39) ρ L ⊗ ˜ τ F (cid:48) ( ρ L ) ⊕ R (cid:48) , Π L (cid:48)(cid:48) F (cid:48)(cid:48) ( ρ L ⊗ τ F (cid:48) ⊕ R (cid:48) )Π L (cid:48)(cid:48) F (cid:48)(cid:48) (cid:39) ρ L ⊗ ˜ τ F (cid:48)(cid:48) ( ρ L ) ⊕ R (cid:48)(cid:48) ∀ ρ L ∈ D ( H L ) , (B1) with Π L (cid:48) F (cid:48) , Π L (cid:48)(cid:48) F (cid:48)(cid:48) as in Deﬁnition 4 and ˜ τ F (cid:48) ( ρ L ) , ˜ τ F (cid:48)(cid:48) ( ρ L ) ≥ that are, in general, functions of ρ L .Then the two initializations are compatible – i.e., ˜ τ F (cid:48) ( ρ L ) , ˜ τ F (cid:48)(cid:48) ( ρ L ) are actually independent of ρ L . Proof.

We ﬁrst show that if the ﬁrst condition in Eq. (B1) holds true, then the same conditionholds true for every state ρ L ∈ D ( H L ) with ˜ τ F (cid:48) ( ρ L ) independent of ρ L . To this aim, let {| ψ i (cid:105)} i be6an orthonormal basis in H L and deﬁne ρ (cid:48)(cid:48) i (cid:39) | ψ i (cid:105)(cid:104) ψ i | ⊗ τ F (cid:48)(cid:48) ⊕ R (cid:48)(cid:48) , ˜ ρ (cid:48) i (cid:39) | ψ i (cid:105)(cid:104) ψ i | ⊗ ˜ τ F (cid:48) i ⊕ R (cid:48) . Byassumption, we haveΠ L (cid:48) F (cid:48) ( αρ (cid:48)(cid:48) i + βρ (cid:48)(cid:48) j )Π L (cid:48) F (cid:48) = α ˜ ρ (cid:48) i + β ˜ ρ (cid:48) j (cid:39) α ( | ψ i (cid:105)(cid:104) ψ i | ⊗ ˜ τ F (cid:48) i ⊕ R (cid:48) ) + β ( | ψ j (cid:105)(cid:104) ψ j | ⊗ ˜ τ F (cid:48) j ⊕ R (cid:48) )for all i, j and α, β > α + β = 1. We next show that ˜ τ F (cid:48) i = ˜ τ F (cid:48) j for all i (cid:54) = j . To thisaim, let us deﬁne ρ ij = ( a i | ψ i (cid:105) + a j | ψ i (cid:105) )( a i (cid:104) ψ i | + a j (cid:104) ψ i | ), with a i , a j ∈ C such that | a i | + | a j | = 1.Since ρ ij is pure, in view of the ﬁrst condition in (B1), it holdsΠ L (cid:48) F (cid:48) ( ρ ij ⊗ τ F (cid:48)(cid:48) ⊕ R (cid:48)(cid:48) )Π L (cid:48) F (cid:48) = ˜ ρ (cid:48) ij (cid:39) ( ρ ij ⊗ ˜ τ F (cid:48) ij ⊕ R (cid:48) ) , so that Π L (cid:48) F (cid:48) Π k ( ρ ij ⊗ τ F (cid:48)(cid:48) ⊕ R (cid:48)(cid:48) )Π k Π L (cid:48) F (cid:48) (cid:39) | a k | ( ρ k ⊗ ˜ τ F (cid:48) ij ⊕ R (cid:48) ) , (B2)where Π k (cid:39) ( | ψ k (cid:105)(cid:104) ψ k | ⊗ I F (cid:48)(cid:48) ⊕ R (cid:48)(cid:48) ), k = i, j . On the other hand, in view of the deﬁnition of ρ ij , italso holds Π L (cid:48) F (cid:48) Π k ( ρ ij ⊗ τ F (cid:48)(cid:48) ⊕ R (cid:48)(cid:48) )Π k Π L (cid:48) F (cid:48) (cid:39) | a k | ( ρ k ⊗ ˜ τ F (cid:48) k ⊕ R (cid:48) ) , k = i, j. (B3)Eventually, a comparison of Eqs. (B2) and (B3) yields the desired conclusion, that is, ˜ τ F (cid:48) ij =˜ τ F (cid:48) i = ˜ τ F (cid:48) j , for all i, j, i (cid:54) = j. We can apply the same argument as before to show that if the secondcondition in (B1) holds true for all pure ρ L , then the same condition holds true for every, pure ormixed, ρ L with ˜ τ F (cid:48)(cid:48) ( ρ L ) independent of ρ L . Hence, we proved that ˜ τ F (cid:48) ( ρ L ) , ˜ τ F (cid:48)(cid:48) ( ρ L ) in Eq. (B1)are actually independent of ρ L , or, equivalently, that the two initializations are compatible. (cid:3)

2. Proof of Theorem 1

Proof.

We ﬁrst address necessity, i.e., “ ∃ Φ P that tolerates N = ⇒ the initializations ρ P (cid:48) and ρ P (cid:48)(cid:48) ,λ are compatible for all λ ∈ [0 , P correcting N then Φ P also corrects any convex combination of the noise and the identity operator, namely M λ = λ N + (1 − λ ) I , λ ∈ [0 ,

1] (Lemma 1). Let {| ψ i (cid:105)} i be any orthonormal basis in H L and ρ P (cid:48) ,i (cid:39) | ψ i (cid:105)(cid:104) ψ i | ⊗ τ F (cid:48) ⊕ R (cid:48) . We will prove that for all λ ∈ [0 , ρ P (cid:48) ,i M λ ( ρ P (cid:48) ,j )) = 0 , ∀ i, j, i (cid:54) = j. (B4)Notice that if (B4) holds true, then ρ P (cid:48) ,i M λ ( ρ P (cid:48) ,j ) ρ P (cid:48) ,i = 0 , ∀ i, j, i (cid:54) = j, which in turn implies Π L (cid:48) F (cid:48) M λ ( ρ P (cid:48) ,j )Π L (cid:48) F (cid:48) = ρ P (cid:48) ,j , ∀ j, where Π L (cid:48) F (cid:48) (cid:39) I L (cid:48) ⊗ I F (cid:48) ⊕ R (cid:48) is the orthogonal projection onto H L (cid:48) ⊗ H F (cid:48) .In order to prove Eq. (B4) pick any λ ∈ [0 ,

1] and assume, by contradiction, that there exists apair ( i, j ), i (cid:54) = j , such that tr( ρ P (cid:48) ,i M λ ( ρ P (cid:48) ,j )) (cid:54) = 0 . The latter condition implies that M λ ( ρ P (cid:48) ,j ) ≥ ρ ( γ ) P (cid:48) ,j (cid:39) | ψ i (cid:105)(cid:104) ψ i | ⊗ γ ⊕ R (cid:48) , γ ≥ ρ P (cid:48) ,i ≥ cρ ( γ ) P (cid:48) ,j for suitable c ∈ R , c >

0, since τ F (cid:48) is of full rank. Moreover, since Φ P is a positivemap, it preserves the partial ordering, i.e. Φ P ( X ) ≥ Φ P ( Y ) if X ≥ Y ≥

0. Therefore, we havetr(Φ P ( ρ P (cid:48) ,i )Φ P ( M λ ( ρ P (cid:48) ,j ))) ≥ tr( ˜Φ P ( ρ P (cid:48) ,i ) ˜Φ P ( M λ ( ρ P (cid:48) ,j ))) ≥ c tr( ˜Φ P ( ρ ( γ ) P (cid:48) ,j ) ) > , where ˜Φ P ( X ) = Φ P (Π i X Π i ), Π i (cid:39) | ψ i (cid:105)(cid:104) ψ i | ⊗ I F (cid:48) ⊕ R (cid:48) . Hence, we proved that, for i (cid:54) = j ,tr(Φ P ( ρ P (cid:48) ,i )Φ P ( M λ ( ρ P (cid:48) ,j ))) (cid:54) = 0 . (B5)Now, since Φ P tolerates N and, therefore, M λ for λ ∈ [0 ,

1] (Lemma 1), we have Φ P ( M λ ( ρ P (cid:48) ,j )) =Φ P ( ρ P (cid:48) ,j ). In view of the latter fact and of Eq. (B5), it follows that tr(Φ P ( ρ P (cid:48) ,i )Φ P ( ρ P (cid:48) ,j )) (cid:54) = 0 ,i (cid:54) = j, which, in turn, implies that Φ P is not orthogonality-preserving. This contradicts the factthat Φ P must be an isometry [47, Prop. 2.1]. The same argument outlined above holds if weconsider ρ P (cid:48)(cid:48) ,λ,i (cid:39) | ψ i (cid:105)(cid:104) ψ i | ⊗ τ F (cid:48)(cid:48) ,λ ⊕ R (cid:48)(cid:48) , and replace Eq. (B4) withtr( ρ P (cid:48)(cid:48) ,λ,i R ( ρ P (cid:48)(cid:48) ,λ,j )) = 0 , ∀ i, j, i (cid:54) = j, (B6)where R is an isometric map from H P to H P , mapping ρ P (cid:48)(cid:48) ,λ to ρ P (cid:48) . Consequently, we have thatboth Eqs. (B4) and (B6) hold. These condition in turn imply that, for every basis {| ψ i (cid:105)} i ,Π L (cid:48) F (cid:48) ρ P (cid:48)(cid:48) ,λ,j Π L (cid:48) F (cid:48) (cid:39) | ψ j (cid:105)(cid:104) ψ j | ⊗ ˜ τ F (cid:48) j ⊕ R (cid:48) , ∀ j, Π L (cid:48)(cid:48) F (cid:48)(cid:48) ρ P (cid:48) ,j Π L (cid:48)(cid:48) F (cid:48)(cid:48) (cid:39) | ψ j (cid:105)(cid:104) ψ j | ⊗ ˜ τ F (cid:48)(cid:48) ,λj ⊕ R (cid:48)(cid:48) , ∀ j. In view of this and of Lemma 2, we conclude that the initializations ρ P (cid:48) and ρ P (cid:48)(cid:48) ,λ in the subsystemdecompositions H L (cid:48) ⊗ H F (cid:48) ⊕ H R (cid:48) and H L (cid:48)(cid:48) ⊗ H F (cid:48)(cid:48) ,λ ⊕ H R (cid:48)(cid:48) ,λ are compatible for all λ ∈ [0 , ρ P (cid:48) and ρ P (cid:48)(cid:48) ,λ are compatible for all λ ∈ [0 , ⇒ ∃ Φ P that corrects N ”. To this aim, pick ˆ λ ∈ (0 ,

1) and consider the CPTP mapΦ ˆ λ ≡ I L (cid:48)(cid:48) ⊗ F P (cid:48)(cid:48) , ˆ λ ⊕ I R (cid:48)(cid:48) , ˆ λ (B7)such that F P (cid:48)(cid:48) , ˆ λ ( σ ) = τ F for all σ ∈ D ( H F (cid:48)(cid:48) , ˆ λ ). The previous map is an isometry which toleratesthe map M ˆ λ = ˆ λ N + (1 − ˆ λ ) I , that is Φ ˆ λ ( ρ P (cid:48)(cid:48) , ˆ λ ) (cid:39) ρ L ⊗ τ F ⊕ R . We want to show that Φ ˆ λ tolerates also the noise N , that is Φ ˆ λ ( ρ P (cid:48)(cid:48) ) (cid:39) ρ L ⊗ τ F ⊕ R . We ﬁrst notice that, since ˆ λ ∈ (0 , L (cid:48) F (cid:48) ≤ Π L (cid:48)(cid:48) F (cid:48)(cid:48) , ˆ λ , where Π L (cid:48)(cid:48) F (cid:48)(cid:48) , ˆ λ denotes the orthogonal projection onto H L (cid:48)(cid:48) ⊗ H F (cid:48)(cid:48) ,λ . Inview of this fact and since ρ P (cid:48) and ρ P (cid:48)(cid:48) , ˆ λ are compatible by assumption, it holdsΠ L (cid:48)(cid:48) F (cid:48)(cid:48) , ˆ λ ρ P (cid:48) Π L (cid:48)(cid:48) F (cid:48)(cid:48) , ˆ λ (cid:39) ρ L ⊗ ˜ τ F (cid:48)(cid:48) , ˆ λ ⊕ R (cid:48)(cid:48) , ˆ λ , ∀ ρ L ∈ D ( H L ) . Hence, we have Φ ˆ λ ( ρ P (cid:48) ) (cid:39) ρ L ⊗ τ F ⊕ R , ∀ ρ L ∈ D ( H L ) . Eventually, by linearity of Φ ˆ λ and in viewof the deﬁnition of ρ P (cid:48)(cid:48) , ˆ λ ,Φ ˆ λ ( ρ P (cid:48)(cid:48) ) = Φ ˆ λ (cid:16) λ ρ P (cid:48)(cid:48) , ˆ λ − − ˆ λ ˆ λ ρ P (cid:48) (cid:17) = 1ˆ λ Φ ˆ λ ( ρ P (cid:48)(cid:48) , ˆ λ ) − − ˆ λ ˆ λ Φ ˆ λ ( ρ P (cid:48) ) (cid:39) ρ L ⊗ τ F ⊕ R , for all ρ L ∈ D ( H L ), whereby the desired conclusion follows. (cid:3) [1] M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information . Cambridge Uni-versity Press, 2000. [2] D. A. Lidar and T. A. Brun (Eds.), Quantum Error Correction . Cambridge University Press, Cam-bridge, 2013.[3] R. Blume-Kohout, H. Khoon Ng, D. Poulin, and L. Viola, “Characterizing the structure of preservedinformation in quantum processes,”

Phys. Rev. Lett. , vol. 100:030501, 2008; “Information-preservingstructures: A general framework for quantum zero-error information,”

Phys. Rev. A , vol. 82:062306,2010.[4] P. Zanardi and M. Rasetti, “Noiseless quantum codes,”

Phys. Rev. Lett. , vol. 79: 3306, 1997; D. Lidar,I. Chuang, and K. Whaley, “Decoherence free subspaces for quantum computation,” ibid. vol. 81:2594,1998.[5] E. Knill, R. Laﬂamme, and L. Viola, “Theory of quantum error correction for general noise,”

Phys.Rev. Lett. , vol. 84:2525, 2000.[6] J. Preskill, “Suﬃcient condition on noise correlations for scalable quantum computing,”

Quant. Inf.Comput. , vol. 13:181, 2013.[7] D. Gottesman, “Class of quantum error-correcting codes saturating the quantum Hamming bound,”

Phys. Rev. A , vol. 54:1862, 1996; “Theory of fault-tolerant quantum computation,” ibid. , vol. 57:127,1998.[8] E. Knill and R. Laﬂamme, “Theory of quantum error-correcting codes,”

Phys. Rev. A , vol. 55:900,1997.[9] D. Kribs, R. Laﬂamme, and D. Poulin, “Uniﬁed and generalized approach to quantum error correction,”

Phys. Rev. Lett. , vol. 94:180501, 2005; D. W. Kribs, R. Laﬂamme, D. Poulin, and M. Lesosky, “Operatorquantum error correction,”

Quant. Inf. Comput. , vol. 6:383, 2006.[10] D. Poulin, “Stabilizer formalism for operator quantum error correction,”

Phys. Rev. Lett. , vol.95:230504, 2005.[11] P. Aliferis and A. W. Cross, “Subsystem fault tolerance with the Bacon-Shor code,”

Phys. Rev. Lett. ,vol. 98:220502, 2007.[12] G. Sarma and H. Mabuchi, “Gauge subsystems, separability and robustness in autonomous quantummemories,”

New J. Phys. , vol. 15:035014, 2013.[13] R. Cleve and D. Gottesman, “Eﬃcient computations of encodings for quantum error correction,”

Phys.Rev. A , vol. 56:76, 1997.[14] P. Sarvepalli and A. Klappenecker, “Encoding subsystem codes,”

Int. J. Adv. Security , vol. 2:142,2009.[15] C. Altaﬁni and F. Ticozzi, “Modeling and control of quantum systems: An introduction,”

IEEE Trans.Autom. Control , vol. 57:1898, 2012.[16] B. Kraus, S. Diehl, A. Micheli, A. Kantian, H. P. B¨uchler, and P. Zoller, “Preparation of entangledstates by quantum Markov processes,”

Phys. Rev. A , vol. 78:042307, 2008.[17] F. Ticozzi and L. Viola, “Stabilizing entangled states with quasi-local quantum dynamical semigroups,”

Phil. Trans. R. Soc. A , vol. 370:5259, 2012; “Steady-state entanglement by engineered quasi-localMarkovian dissipation,”

Quantum Inf. Comput. , vol. 14:0265, 2014.[18] G. Baggio, F. Ticozzi, and L. Viola, “Quantum state preparation by controlled dissipation in ﬁnite time:From classical to quantum controllers,” , pp.1072–1077, 2012.[19] F. Ticozzi and L. Viola, “Quantum resources for puriﬁcation and cooling: Fundamental limits andopportunities,”

Sci. Rep. , vol. 4:5192, 2014.[20] S. Lloyd and L. Viola, “Engineering quantum dynamics,”

Phys. Rev. A , vol. 65:010101, 2001; J. T.Barreiro, M. M¨uller, P. Schindler, D. Nigg, T. Monz, M. Chwalla, M. Hennrich, C. F. Roos, P. Zoller,and R. Blatt, “An open-system quantum simulator with trapped ions,”

Nature , vol. 470:486, 2011.[21] A. Metelmann and A. A. Clerk, “Quantum-limited ampliﬁcation via reservoir engineering,”

Phys. Rev.Lett. , vol. 112:133904, 2014.[22] F. Pastawski, L. Clemente, and J. I. Cirac, “Quantum memories based on engineered dissipation,”

Phys. Rev. A , vol. 83:012304, 2011.[23] F. Verstraete, M. M. Wolf, and J. I. Cirac, “Quantum computation and quantum-state engineeringdriven by dissipation,”

Nat. Phys. , vol. 5:633, 2009.[24] F. Reiter, A. S. Sørensen, P. Zoller, and C. A. Muschik, “Dissipative quantum error correction andapplication to quantum sensing with trapped ions,”

Nat. Commun. , vol. 8:1822, 2017.[25] B. de Neeve, Th. L. Nguyen, T. Behrle, and J. Home, “Error correction of a logical grid state qubit by dissipative pumping,” arXiv:2010.09681, 2020.[26] V. Martin and A. Sarlette, “Scaling up reservoir engineering for error-correcting codes,”arXiv:2010.02850, 2020.[27] J. Dengis, R. K¨onig, and F. Pastawski, “An optimal dissipative encoder for the toric code,” New J.Phys. , vol. 16:013023, 2014.[28] A. Kitaev, “Fault-tolerant quantum computation by anyons,”

Ann. Phys. , vol. 303:2, 2003.[29] P. D. Johnson, F. Ticozzi, and L. Viola, “Exact quasi-local stabilization of entangled states in ﬁnitetime,”

Phys. Rev. A , vol. 96:012308, 2017.[30] F. Ticozzi, G. Baggio and L. Viola, “Quantum information encoding from stabilizing dynamics,”

Nice, France, pp. 413-418, 2019.[31] P. W. Shor, “Scheme for reducing decoherence in quantum computer memory,”

Phys. Rev. A , vol.52:R2493, 1995.[32] A. M. Steane, “Error correcting codes in quantum theory,”

Phys. Rev. Lett. , vol. 77:793, 1996;“Multiple-particle interference and quantum error correction,” Proc. Roy. Soc. Lond. A, vol. 452:2551,1996.[33] L. Viola, E. Knill, and R. Laﬂamme, “Constructing qubits in physical systems,”

J. Phys. A: Math.Theor. , vol. 34:7067, 2001.[34] E. Knill, “Protected realizations of quantum information,”

Phys. Rev. A , vol. 74:042301, 2006.[35] F. Ticozzi and L. Viola, “Quantum information encoding, protection, and correction from trace-normisometries,”

Phys. Rev. A , vol. 81:032313, 2010.[36] R. Laﬂamme, C. Miquel, J. P. Paz, and W. H. Zurek, “Perfect quantum error correcting code,”

Phys.Rev. Lett. , vol. 77:198, 1996; C. H. Bennett, D. P. DiVincenzo, J. A. Smolin, and W. K. Wootters,“Mixed state entanglement and quantum error correction,”

Phys. Rev. A , vol. 54:3824, 1996.[37] N. P. Breuckmann,

Quantum Subsystem Codes, Their Theory and Use , Bachelor Thesis, Aachen Uni-versity, 2011.[38] D. Bacon, S. T. Flammia, A. W. Harrow, and J. Shi, “Sparse quantum codes from quantum circuits,”

IEEE Trans. Inf. Theory , vol 63:2464, 2017.[39] R. Alicki and K. Lendi,

Quantum Dynamical Semigroups and Applications . Springer-Verlag, Berlin,2007.[40] R. Kosloﬀ, “Quantum thermodynamics: A dynamical viewpoint,”

Entropy , vol. 15:2100, 2013.[41] F. Ticozzi and L. Viola, “Quantum Markovian subsystems: Invariance, attractivity and control,”

IEEETrans. Autom. Control , vol. 53:2048, 2008.[42] F. Ticozzi and L. Viola, “Analysis and synthesis of attractive quantum Markovian dynamics,”

Auto-matica , vol. 45:2002, 2009.[43] S. Bolognani and F. Ticozzi, “Engineering stable discrete-time quantum dynamics via a canonical QRdecomposition,”

IEEE Trans. Autom. Control , vol. 55:2721, 2010.[44] F. Ticozzi, L. Zuccato, P. D. Johnson, and L. Viola, “Alternating projections and discrete-time stabi-lization of quantum states,”

IEEE Trans. Autom. Control , vol. 63:819, 2018.[45] E. Dennis, A. Kitaev, A. Landahl, and J. Preskill, “Topological quantum memory,”

J. Math. Phys. ,vol. 43:4452, 2002.[46] R. K¨onig and F. Pastawski, “Generating topological order: No speedup by dissipation,”

Phys. Rev. B ,vol. 90:045101, 2014.[47] P. Busch, “Stochastic isometries in quantum mechanics,”

Math. Phys., Anal. Geom. , vol. 2:1, 1999.[48] A. Lucia, T. S. Cubitt, S. Michalakis, and D. P´erez-Garc´ıa, “Rapid mixing and stability of quantumdissipative systems,”

Phys. Rev. A , vol. 91:040302(R), 2015.[49] C. Shen, K. Noh, V. V. Albert, S. Krastanov, M. H. Devoret, R. J. Schoelkopf, S. M. Girvin, andL. Jiang, “Quantum channel construction with circuit quantum electrodynamics,”