Boundary and domain wall theories of 2d generalized quantum double model

The generalized quantum double lattice realization of 2d topological orders based on Hopf algebras is discussed in this work. Both left-module and right-module constructions are investigated. The ribbon operators and the classification of topological excitations based on the representations of the quantum double of Hopf algebras are discussed. To generalize the model to a 2d surface with boundaries and surface defects, we present a systematic construction of the boundary Hamiltonian and domain wall Hamiltonian. The algebraic data behind the gapped boundary and domain wall are comodule algebras and bicomodule algebras. The topological excitations in the boundary and domain wall are classified by bimodules over these algebras. The ribbon operator realization of boundary-bulk duality is also discussed. Finally, via the Hopf tensor network representation of the quantum many-body states, we solve the ground state of the model in the presence of the boundary and domain wall.


Introduction
Topologically ordered phases extended our understanding of the notion of phases of matter beyond the Landau-Ginzburg symmetry-breaking picture [1,2]. Besides their foundational importance, these exotic quantum phases of matter also found their applications in quantum information processing, such as robust topological quantum error-correction code (QECC) [3,4] and topological quantum computation (TQC) [5][6][7]. The mathematical structures behind the usual symmetry-breaking phases are symmetry groups (G H , G Ψ ) with G H the symmetry group of Hamiltonian and G Ψ the symmetry group of the wavefunction, while the mathematical frameworks behind topological orders are tensor categories. More precisely, a gapped 2d topological order is characterized by a unitary modular tensor category (UMTC) D; for the gapless edges, another data, central charge c, is needed, namely, (D, c) fully characterizes the topologically ordered phase. A gapped topological phase is an equivalence class of gapped Hamiltonians together with their corresponding ground state spaces {(H, H)}, which realizes some topological quantum field theory (TQFT) at low energy. The excitations are characterized by a quantum group constructed from the gauge group of the theory, and the quasi-particle types are given by irreducible representations of the quantum group. A crucial class of such kind of (2 + 1)D model is the twisted quantum double model based on a finite group algebra C[G] [8][9][10], which is a Hamiltonian realization of the Dijkgraaf-Witten TQFT [11]. Their topological excitations are characterized by the representation category of the twisted quantum double D α (G) with α a 3-cocycle over G. When the 3-cocycle is trivial, the model becomes Kitaev's quantum double model [5], which corresponds to BF theory and to a special case of the Kuperberg invariant [12] as well. The Levin-Wen's string-net model [13] has a more general setting, and realizes the Turaev-Viro-Barrett-Westbury TQFT [14,15]. For arbitrary unitary fusion category (UFC) C, the topological excitations of the Levin-Wen model based on C are given by the Drinfeld center Z(C).
On the other hand, although the topological phases on closed surfaces seem to be natural from a mathematical perspective, real samples of topologically ordered material usually have boundaries and the boundary modes are easier to measure experimentally. Thus the topological phases on surfaces with boundaries are of more practical and theoretical importance. Another crucial reason to investigate the boundary theory and domain wall theory is that there is a boundary-bulk duality, with which the boundary phase is obtained from the bulk phase using anyon condensation, and the bulk phase is recovered from the boundary phase by taking the Drinfeld center [37,38]. The study of the gapped boundary theory of topological phases has garnered significant attention over the past few decades [25][26][27][28][29][30][31][32][37][38][39][40][41][42][43][44][45][46][47][48][49].
Not all topological phases allow the gapped boundaries (with a lattice realization). One of the crucial observations of the existence of a gapped boundary is that the chiral central charge c − = c L − c R must vanish [31,39,40,44,50]. Even for the c − = 0 case, there exist some ungappable boundaries [31,44,50]. Therefore, a deep and comprehensive understanding of the boundary theory is of great importance. For the quantum double phase, the boundary is gappable, and the gapped boundary theories for the finite group algebra case have been extensively explored [25][26][27][28][29][30][31][32][33][34][35][36]. However, for the general Hopf algebra case, the gapped boundary theory has not been systematically investigated yet. This is due, to some extent, to the mathematical difficulties when dealing with general Hopf algebras.
In this work, we will investigate the generalized quantum double model in detail and present the Hamiltonian construction and algebraic theory of gapped boundaries and domain walls.
In Sec. 2, we first review the generalized quantum double model on a closed surface and stress the problem of constructing the ribbon operators for this model and classifying the topological excitations. For the generalized quantum double model, there also exist electric charges, magnetic charges, and dyons, with all these charges can be created with proper ribbon operators.
Sec. 3 establishes the boundary theory of the Hopf quantum double model. We show that gapped boundaries of the Hopf quantum double phase can be equivalently classified by an H-comodule algebra A or an H-module algebra M. The boundary excitations are classified by bimodules over these algebras. The lattice model for the gapped boundary is constructed using the symmetric separability idempotent of the H-comodule algebra. We show that the boundary stabilizers generate a boundary local algebra whose representation category is equivalent to the category of boundary excitations. The connection between the quantum double boundary theory and Levin-Wen string-net boundary theory is also discussed. After these preparations, we present the construction of boundary ribbon operators and discuss how to realize the anyon condensation via these ribbon operators. In Appendix D, we also give another construction of a gapped boundary lattice model which is parameterized by a triple of Hopf algebras (K, J, W ) with some pairings among them. Each boundary site supports a representation of a generalized quantum double induced by the pairing. This indirect lattice construction is also of its own interest.
Sec. 4 establishes the domain wall theory of the generalized quantum double model. Using the folding trick, a domain wall can be transformed into a gapped boundary; and a gapped boundary can be regarded as a special case of the domain wall which separates the quantum double phase with vacuum. We build the theory of the gapped domain wall based on the H 1 |H 2 -bicomodule algebra, both the algebraic theory and Hamiltonian theory are discussed. The domain wall is characterized by an H 1 |H 2 -bicomodule algebra B and the wall excitations are classified by B|B-bimodules. In Appendix E, an indirect construction based on the generalized quantum double is also discussed. The lattice model of the domain wall between two quantum double phases is given by a quadruple of Hopf algebras (K, J 1 , J 2 , W ) with some pairings among them. The left and right boundary sites support different representations of quantum doubles induced by different pairings.
In Sec. 5, by utilizing the Hopf tensor network representation of quantum many-body states, we solve the ground state of the model with boundaries and domain walls and obtain the explicit ground states. Using this explicit exact ground state of the model, we can investigate various properties of the phase in the presence of boundaries and domain walls. Especially, the entanglement entropy can be calculated directly. This also paves the way for applications of generalized quantum double phase in QECC and TQC.
The appendices collect some detailed discussions and calculations.

Generalized quantum double model
Let us start with a brief review of the Hopf algebraic quantum double model [16,19,51] on a closed 2d surface. Kitaev's original construction of the quantum double model is based on finite group algebra C[G], and he also pointed out that the model can be generalized to the finite-dimensional Hopf algebra equipped with a Hermitian inner product with certain properties [5]. The first explicit construction is given in [16], and the corresponding ribbon operators are discussed in detail in [19,51]. In this section, we will discuss the construction and stress the chirality of the construction. From the model, we can obtain Turaev-Viro type topological invariant [21,52].

Generalized quantum double model
For a given 2d closed manifold Σ, consider a lattice 1 C(Σ) = V (Σ) ∪ E(Σ) ∪ F (Σ) on Σ, where V (Σ), E(Σ) and F (Σ) are sets of vertices, edges and faces respectively. The dual lattice of C(Σ) is a latticeC(Σ) for which the vertices and faces of the original lattice are switched while the edge set remains unchanged. We assign a direction for each edge e ∈ E(Σ), and the direction of the corresponding dual edgeẽ ∈Ẽ(Σ) is obtained by rotating the direction of e counterclockwise by π/2. As shown in Fig. 1, the original lattice is drawn with black solid lines, and the dual lattice is drawn with red dashed lines. A site s = (v, f ) is a pair of a vertex v and an adjacent face f (which is a dual vertex of the dual lattice). The site is drawn as a solid line connecting v and f . Two sites s, s ′ are called adjacent if they share a common vertex or face.
Hereinafter, we assume that H is a finite-dimensional C * Hopf algebra (H has a Hilbert space structure given by Eq. (A.13)); its dual Hopf algebra will be denoted asĤ or H ∨ . Note that such an H is semisimple. For general facts of Hopf algebras, see Appendix A. To each edge of the lattice, we attach a copy of H, i.e., H e = H. The total Hilbert space is H = H tot = ⊗ e∈E(Σ) H e . To define the model, we need to introduce four types of edge operators L h + , L h − , T φ + , T φ − with h ∈ H and φ ∈Ĥ, as follows: ⟨φ, S(x (1) )⟩x (2) ⟩, (2.4) where we have adopted the Sweedler arrow notations. Notice that H can be regarded as left H-modules with actions h ▷ x and x ◁ S(h) (recall that S(hg) = S(g)S(h) and S(1 H ) = 1 H ), so that L h + and L h − are the corresponding operator representations. H can also be regarded as leftĤ-modules with the actions φ ⇀ x and x ↼Ŝ(φ) (recall thatŜ(φψ) =Ŝ(ψ)Ŝ(φ) andŜ(1) =1), so that T φ + and T φ − are the corresponding operator representations. Since the antipode is involutive S 2 = id, the reverse of the edge direction is given by x e →x e = S(x e ). This is compatible with four edge actions, e.g., S(L h − |x⟩) = |S(xS(h))⟩ = |hS(x)⟩ = L h + |S(x)⟩ and S(T φ + |x⟩) = (x) ⟨φ, x (2) ⟩|S(x (1) )⟩ = T φ − |S(x)⟩. This means that all patterns of the edge directions are equivalent, hence the quantum double model can be constructed from arbitrary given pattern.
Let j be a directed edge and v one of its endpoints. We define L h (j, v) as follows: if v is the origin of j, set L h (j, v) = L h − (j), otherwise, set L h (j, v) = L h + (j). Similarly, let j be a directed dual edge and f one of its endpoints; if f is the origin of j, set T φ (j, f ) = T φ + (j), otherwise, set T φ (j, f ) = T φ − (j). See Fig. 1 for an illustration of these choices. For a given site s = (v, f ), we order the edges around the vertex v and around the face f counterclockwise with the origin s. Using these conventions, the vertex operators and face operators on a site s = (v, p) are defined as T φ (1) (j 1 , f ) ⊗ · · · ⊗ T φ (n) (j n , f ). (2.6) Notice that hereinafter we assume that comultiplication ∆(φ) is taken inĤ, thus the order around the face is counterclockwise; if we use comultiplication ∆ ofĤ cop , the orientation around the face must be clockwise.
Since x 6 x 1 where "•" means the argument of the function. In fact, this establishes an algebra homomorphism for arbitrary given site s: We see that if h ∈ Z(H) and φ ∈ Z(Ĥ) (by Z(H) we mean the center of the Hopf algebra H), the commutators vanish. Using the C * structure, for involution invariant elements h * = h and φ * = φ, the corresponding operators are Hermitian (2.9) If we further require that h, φ are idempotent h 2 = h and φ 2 = φ, then A h (s) and B φ (s ′ ) become projectors.
where h ∈ H and φ ∈Ĥ. Here H can be regarded as right H-modules via actions x ◁ h and S(h) ▷ x, withL h − andL h + being the corresponding operator representations. H can also be regarded as rightĤ-modules via the actions x ↼ φ andŜ(φ) ⇀ x, withT φ − andT φ + being the corresponding operator representations. For site s = (v, f ), we can order the edges around vertex v and around face f clockwise starting from s. The convention for choosing "+" or "−" remains unchanged. In this way, for Haar integrals h H ∈ H and φĤ ∈Ĥ, the vertex operatorÃ H v and the face operatorB H f can be constructed. A right-module The ground state space of the model (2.10) is given by The ground state degeneracy depends on the topology of the surface Σ, and is independent of the choice of the cellulation C(Σ) (since different cellulations can be related with Pachner moves), On a sphere (or infinite plane), GSD = 1, i.e., there is a unique ground state |Ψ GS ⟩.

Ribbon operators
The ribbon operators are crucial for us to study the topological excitations. In this subsection, following the work of [19], we will construct ribbon operators and determine the corresponding ribbon operator algebra over a given ribbon. There are two kinds of ribbons, called type-A and type-B here, classified by the chirality of the triangles composing them. Their corresponding ribbon operator algebras are slightly different. A detailed presentation of ribbon operator algebras and the properties of ribbon operators will be given in Appendices B and C.
To begin with, we introduce several geometric objects [5,19,28,32] (see Fig. 1 for illustrations and see Appendix B for a more comprehensive discussion): • A direct triangle τ = (s 0 , s 1 , e) consists of two adjacent sites s 0 and s 1 connected via a directed edge e. Similarly, the dual triangleτ = (s 0 , s 1 ,ẽ) consists of two adjacent sites s 0 and s 1 connected via a dual edgeẽ. The direction of the triangle is defined as the direction from s 0 to s 1 . Notice that the direction of the triangle may or may not match the direction of the edge.
• For a given (direct or dual) triangle, the chirality (which is called local orientation in [19]) of the triangle is defined as follows: it is called a left-handed (right-handed) triangle if the edge of the triangle is on the left-hand side (right-hand side) when we pass through the triangle along its positive direction. Notice that the chirality is fixed when the direction of the triangle is fixed. We will denote left-handed (right-handed) direct triangle and dual triangle as τ L andτ L (τ R andτ R ) respectively.
• A ribbon ρ is a collection of triangles τ 1 , · · · , τ n with a given direction such that ∂ 1 τ j = ∂ 0 τ j+1 and there is no self-intersection. A closed ribbon is defined as a ribbon that does not have any open ends, viz., ∂ 1 τ n = ∂ 0 τ 1 . For a given directed ribbon, the direct triangle and dual triangle in it must have different chirality. A ribbon consisting of left-handed direct triangles and right-handed dual triangles is called a type-A ribbon and will be denoted as ρ A ; similarly, a type-B ribbon consists of right-handed direct triangles and left-handed dual triangles and will be denoted as ρ B .
The ribbon operator can be defined recursively. First, we define the triangle operator, then by introducing recursive relation, the ribbon operator is determined. To define triangle operators, we need to consider different cases separately (the convention we use here is following Ref. [5], which is slightly different from the one in Ref. [19]).
For right-handed direct triangles, we have For right-handed dual triangles, we have For left-handed dual triangles, we have For left-handed direct triangles, we have The reason for the above choice of convention we have made is to make the vertex and face operators be special cases of ribbon operators. For general ribbon ρ, the ribbon operator on it can be defined recursively as follows. We begin with the definition of type-B ribbon operators. They are built from the dual Hopf where {k} is an orthogonal basis of H with {k} its dual basis. For a ribbon ρ = ρ B and an element h ⊗ φ ∈ D(H) ∨ , we can define the ribbon operator F h,φ (ρ) = F h⊗φ (ρ B ). The operator acts non-trivially only on edges contained in ρ B , and it commutes with all vertex and face operators except the ones that act on the ending sites of the ribbon. These operators form an algebra A ρ B = {F h,φ (ρ B ) | h ∈ H op , φ ∈Ĥ} called the ribbon operator algebra. Consider the decomposition ρ = ρ B = τ 1 ∪ τ 2 where both τ 1 and τ 2 have the same direction with ρ and ∂ 1 τ 1 = ∂ 0 τ 2 . For h ⊗ φ ∈ H op ⊗Ĥ, the ribbon operator on this composite ribbon can be defined as (2.28) From the co-associativity of the Hopf algebra D(H) ∨ , we see that this definition is independent of the decomposition ρ = τ 1 ∪ τ 2 . The construction for type-A ribbon is similar, but the ribbon operator is now built from For a closed ribbon, there is only one end ∂ρ = ∂ 0 ρ = ∂ 1 ρ. The vertex and face operators can be regarded as special cases of closed ribbon operators. Specifically, is a type-A direct closed ribbon operator. A more comprehensive discussion of ribbon operators is given in Appendices B and C.

Topological excitations
The topological excitations of the model are point-like quasi-particles, and the corresponding state |Ψ⟩ violates some of the stabilizer conditions A h H v |Ψ⟩ = |Ψ⟩ and B φĤ f |Ψ⟩ = |Ψ⟩ for some local vertex and face operators. For a ribbon ρ connecting sites s 0 and s 1 , ribbon operator F g,ψ (ρ) commutes with all the vertex and face operators in the Hamiltonian of Eq. (2.10) except the ones at sites s 0 = ∂ 0 ρ and ∂ 1 ρ = s 1 . Thus the ribbon operator creates excitations only at the ends of the ribbon.
Before we discuss the topological excitations of the Hopf algebraic quantum double model, let us first recall the case that H = C[G] with G a finite group [5]. In this case, topological excitations are classified by ([g], π) where [g] is a conjugacy class of the group G, and π is an irreducible representation of the centralizer C G (g). Notice that there is a CC G (g)-module M π corresponding to π, thus a topological charge can also be expressed as (2.29) The vacuum charge corresponds to g = e G and π = 1 (the trivial representation). The antiparticle of the one in Eq. (2.29) is given by (note that C G (g) = C G (g −1 )) The conjugacy class [g] of a topological charge is called magnetic charge and the irrep π is called electric charge. When g = e G , a [e],π is characterized by a representation of G and is called a chargeon; when π = 1, a [g],1 is called a fluxion; and when both g ̸ = e G and π ̸ = 1, a [g],π is called a dyon. The quantum dimension of the topological excitation is given by These topological excitations form a UMTC Rep(D(G)), the representation category of the quantum double of the finite group G. For a general Hopf algebra H, a similar picture for classifying topological excitations exists, but it is much more complicated (to our knowledge, this has not been discussed in physical literature so far). To introduce such a classification, let us first present several crucial mathematical notions. A fusion category C is called G-graded if there exists a decomposition where C g 's are some full Abelian subcategories, and the tensor product of C maps C g ×C h to C gh for all g, h in the finite group G. G is called a grading group of C; when G is maximal in the sense that any other grading is obtained by a quotient group of G, it is called a universal grading group and we denote it as G = U (C). It follows from [53] that there is a universal grading group G = U (Rep(H)) for any semisimple Hopf algebra H. Consider the largest central Hopf subalgebra CG ∨ is a normal Hopf subalgebra of D(H) [54,55], and g ∈ G becomes an irreducible character of K(Ĥ cop ). We denote I g = {M g } the set of all irreducible representations ofĤ cop 1 H g (here "1" denotes bicrossed product) such that the character χ Mg , when restricted on K(Ĥ cop ), satisfies χ Mg | K(Ĥ cop ) = g dim M g . With the above preparation, we are now at a position to present the classification of topological excitations, namely where g ∈ G and M g ∈ I g . This completely classifies the irreducible representations of the quantum double D(H), see [54,55] for rigorous proof. The g ∈ G can be regarded as a magnetic charge and M g an electric charge. When g = e G , a e G ,Me G is called a chargeon; when M g = 1, a g,1 is called a fluxion; and when both g ̸ = e and M g ̸ = 1, a g,Mg is called a dyon. The quantum dimension of the topological excitation is These topological excitations form a UMTC Rep(D(H)), the representation category of the quantum double of the Hopf algebra H.

Gapped boundary theory
In this section, we will establish the theory of gapped boundaries for the Hopf quantum double model. While the boundary theories for the special case where H = C[G] have been investigated from different aspects in previous works [25][26][27][28][29][30][31][32][33][34][35][36], the problem has not yet been systematically studied for the general Hopf algebra case. Therefore, we will present the lattice construction and algebraic theory of the gapped boundary for a general bulk Hopf algebra H, based on an H-comodule algebra A (or equivalently, based on an H-module algebra M). Furthermore, we will demonstrate that there exists a one-to-one correspondence between all the gapped boundaries of quantum double phase and H-comodule algebras. Specifically, this means that any gapped boundary of the quantum double phase with input bulk Hopf algebra H can be realized by an H-comodule algebra. Before we start, let us first recall the following fundamental definitions (see [56,57] and Appendix A for more details). Notation. For left and right comodules, we shall adopt the Sweedler's notation for left and right coactions β( [1] respectively.
By invoking the construction of Frobenius algebra in a rigid category in Ref. [58], we can equip an H-comodule algebra A with a Frobenius algebra structure. Consider the rigid category Vect C , which contains A as an object. We denote the dual object corresponding to A in Vect C as A ∨ . Let {k,k} k be dual basis for A and A ∨ . The coevaluation map is a linear map coev A : . Based on Ref. [58,Proposition 8], it is easy to check that (A, µ A , η A , ∆ A , ε A ) is a normalized-special and symmetric Frobenius algebra (see Appendix A for definition).
Remark 3.1. It is worth mentioning that a left (right) H-action on A canonically corresponds to a right (left)Ĥ-coaction on A. If A is a left (right) H-comodule algebra, then it is a right (left)Ĥ-module algebra. Thus, the boundary can be equivalently described byĤ-module algebras. Since the quantum double model is self-dual when exchanging H andĤ (known as an electric-magnetic duality), the boundary data can be chosen as H-module algebras or H-comodule algebras freely. On the other hand, it is easy to verify that if A is a module algebra thenÂ is a module coalgebra and vice versa; if A is a comodule algebra thenÂ is a comodule coalgebra and vice versa. This means that we can freely choose one of four kinds of structures as our input data for boundary model: module algebra, comodule algebra, module coalgebra, and comodule coalgebra. In this work, we will choose to interchangeably use the comodule algebra and module algebra structures.
In order to ensure the stability of our gapped boundary lattice model, we will require that the H-comodule algebra A is H-indecomposable. This means that there are no nontrivial two-sided H-ideals I and J such that A = I ⊕ J. By H-ideal we mean an ideal that is also an H-comodule. This stability condition is also presented in the Kitaev-Kong construction of the string-net gapped boundary model, and it has been shown [35] that A is H-indecomposable if and only if the module category A Mod of left A-modules is indecomposable. We will provide further clarification on this topic in our subsequent discussion.

Lattice construction
We will start with a simple construction based on Hopf subalgebras, which are automatically H-comodule algebras. Later, we will explore a more general construction based on Hcomodule algebras.

Gapped boundary theory I
Consider a surface Σ with a single boundary ∂Σ. For a given cellulation C(Σ) = C(Σ \ ∂Σ) ∪ C(∂Σ), we need to investigate the vertices, edges, and faces in the vicinity of the boundary. Our first construction of the gapped boundary is based on a Hopf subalgebra K ≤ H. In this case, A = K is naturally an H-comodule algebra. The coaction is just the coproduct map β K = ∆ K : Thus K can be regarded as either a left or a right H-comodule algebra. By definition, β K (ab) = β K (a)β K (b) and β K (1) = 1 ⊗ 1.
The boundary edges are projected to the subspace The boundary vertex operator is chosen as where h K is the Haar integral of K. It is obvious that Since h K and φĤ are Haar integrals, they are cocommutative, which implies that Notice that the face operator near the boundary has the same form as the bulk face operator, but it has a different meaning, since there is one component φ This construction is a natural generalization of the constructions for the group algebra case [28,30]. When we choose H = C[G] and K = C[N ] with N a subgroup of G, our model reduces to the group-algebra boundary model. However, the viewpoint for constructing the boundary local operator algebra is different. In our construction, we do not treat the local edge projector Π K : H → K as a stabilizer, and instead, we set the boundary edge space to be K. For the Hopf quantum double model, this approach is more natural, as the projector is not easily realized as a face operator with just one edge. For the group algebra case, both constructions work, and their local operator algebra is related by a fusion-categorical Morita equivalence. This will be clarified in Proposition 6.
Let us take a closer look at two typical examples of this kind of construction.
Example 3 (Smooth boundary). For the smooth boundary, the corresponding Hopf subalgebra is K = H. On a boundary site s b , we have the local operator algebra H generated by The boundary excitations are characterized by the UFC Rep(H).
Example 4 (Rough boundary). For the rough boundary, the corresponding Hopf subalgebra is the trivial one K = C1 H and the Haar integral is h K = 1 H . In this case, boundary edges are fixed with label 1 H and A K v b = id. Consider the boundary face operator as shown in Fig. 2 acting on Thus the rough boundary can be obtained equivalently by removing all boundary edges and boundary vertices, and the boundary local operator algebra is generated by In this way, the boundary excitations are characterized by the UFC Rep(Ĥ).
The boundary topological phases for smooth and rough boundaries are Morita equivalent (their Drinfeld double is equivalent as UMTC). To see this, let us recall the Kitaev-Kong construction of boundary theory of the Levin-Wen model for 2d topological phase [26], for which the bulk phase is determined by a UFC C, and the boundary is characterized by an indecomposable C-module category M. The boundary excitation is given by the UFC Fun C (M, M) of all C-module functors. By transforming the basis of the Hopf algebraic quantum double model to the fusion basis, the quantum double model can be mapped to a Levin-Wen model [18,23,52], see also next subsection. In this case, the input UFC for the bulk is C = Rep(H). For the smooth boundary, the module category is M s = Rep(H), and for the rough boundary, the module category is M r = Vect. It can be proved that there is a monoidal equivalence This implies that the topological excitations of smooth and rough boundaries are Morita equivalent.

Gapped boundary theory II
We now consider how to construct the gapped boundary model for general H-comodule algebras. An indirect construction based on the generalized quantum double is given in Appendix D, where we use a pair of Hopf algebras J, K to realize the gapped boundary. In this part, we discuss a direct construction proposed recently for a more general weak Hopf quantum double model in our work [59]. From our previous construction for a Hopf subalgebra K, it was apparent that the crucial step was to use the Haar integral h K for the construction of local vertex stabilizers. However, for a general H-comodule algebra A, this approach is not feasible as it is not a Hopf algebra and hence lacks the concept of Haar integral. Therefore, it is necessary to generalize the notion of Haar integral to the general H-comodule algebra A. As we have demonstrated in Ref. [59], the key concept for constructing local stabilizers for a general H-comodule algebra A is the notion of a symmetric separability idempotent, as defined in Refs. [60,61].
From the above definition we can derive that λ is an idempotent of the enveloping algebra A ⊗ A op . If K is a Hopf algebra with Haar integral h K , then it is straightforward to verify that λ = (h K ) h (1) K ) is a symmetric separability idempotent. In Ref. [60,Corollary 3.1], it is proved that the symmetric separability idempotent exists and is unique for a finite-dimensional semisimple algebra over an algebraically closed field of characteristic zero. Additionally, Ref. [61,Proposition 19] shows that the following equation holds: i.e., β(λ ⟨1⟩ ) 13 β(λ ⟨2⟩ ) 23 = λ 12 in A ⊗ A ⊗ H (the notation we adopt here is standard in Hopf algebra; the subscript indicates the tensor space in which the vectors lie).
If we designate the direction of all boundary edges such that the bulk is located to the right of the boundary edge 2 , there exist only two configurations, depending on how the bulk edges are connected to the boundary vertex. The choice of boundary edge directions depends on the choice of left or right H-comodule algebras for the input data of the gapped boundary. For these two configurations, there are four corresponding sites. We define the following operator A a⊗b (s b ) for a ⊗ b ∈ A ⊗ A op for four possible cases associated to a boundary vertex v b : |a [0] x, yb, a [1] h⟩, (3.9) x y h |a [0] x, yb, hS(a [1] )⟩. (3.11) The convention here follows from that in Sec. 2.1. Note that x, y ∈ A and a, b ∈ A are elements of the H-comodule algebra A. Since A is an H-comodule algebra, a and b cannot directly act on h ∈ H as there is no action from A to H. However, by using the coaction map β : A → A ⊗ H, both a [1] and b [1] are elements of H and hence can act on h ∈ H. From the construction, it is clear that if the bulk is on the right-hand side of the boundary when moving along the positive direction of the boundary, the input H-comodule algebra must be chosen as a right H-comodule algebra. If the input data is chosen as a left H-comodule algebra, we must change the direction of the boundary edges. This matches well with the construction of the Levin-Wen string-net boundary [26], where the boundary direction determines the choice of left or right C-module structure M. Since M is not the fusion category, there is no duality operation in M, and we cannot change the boundary direction arbitrarily. We will discuss this in detail later.
To introduce the boundary face operator, we need to introduce the action ofĤ on the right H-comodule algebra A. This is given byT φ , which is well-defined because x [1] ∈ H for x ∈ A. Then the boundary face operator B φ (s b ) for φ ∈Ĥ is given as follows: (3.12) according to the convention in Sec. 2.1. We introduce the crossed product (A ⊗ A op ) ⋆Ĥ between A ⊗ A op andĤ as follows: the underlying vector space is (A ⊗ A) ⊗Ĥ, the multiplication is given by [1] • d [1] )ψ, (3.13) and the unit is The multiplication is associative: [1] • f [1] d [1] )ψ(e [2] • f [2] )θ (3.14) where a ⊗ b ∈ A ⊗ A op and φ ∈Ĥ. Therefore, the map is an algebra homomorphism. That is, every boundary site supports a representation of (A ⊗ A op ) ⋆Ĥ.
Proof. Let us consider the following boundary configuration (the others are similar) The second assertion follows immediately from Eqs. (3.15) and (3.16). ■ To construct the lattice model for a gapped boundary, we introduce the boundary vertex operator A λ (s b ), where λ is the symmetric separability idempotent of the input Hcomodule algebra A. It can be verified straightforwardly from Eqs.
Notice that here we have used the boundary site s b to stress that the local stabilizers are constructed on boundary sites. A direct calculation shows that when the input algebra that we constructed in the last subsection. This is because in this case, the symmetric separability idempotent λ and the Haar integral h are related by λ = (h) h (1) ⊗ S(h (2) ). Thus the boundary model in the last subsection is a special case of the model presented here.

Boundary topological excitation
We have presented a Hamiltonian theory for a gapped boundary in the previous subsection. Let us now provide a detailed characterization of the topological excitations for these boundary models. We first give an algebraic theory of the topological excitations based on an H-comodule algebra A and modules over A (see Appendix A for some necessary details of mathematical concepts used here), and then we show the topological nature of the boundary Hamiltonian by mapping the Hopf quantum double boundary lattice model to a Levin-Wen string-net boundary whose topological nature has been shown previously in Ref. [26]. The main results are summarized in Tables 1 and 2.

Algebraic theory
There are several different but equivalent ways to understand the topological excitations of the gapped boundary for 2d non-chiral topological order (for which quantum double phase is a special example). Roughly they can be divided into two types (see Refs. [26,32,43,62]): • From anyon condensation point of view, the bulk phase is characterized by a UMTC D. The gapped boundary phase is determined by a Lagrangian algebra L ∈ D, which plays the role of boundary vacuum charge. When a bulk anyon moves to the boundary, it is surrounded by the boundary vacuum, which mathematically results in a right L-module structure of the condensed anyon. The boundary phase is thus given by the category of all right L-modules in D, denoted as B L = Mod L (D), which is a UFC (the boundary is a 1d phase, and there is no braiding structure). The condensation process is given by a monoidal functor Cond L : D → B L , X → X ⊗ L. Another different but equivalent construction of anyon condensation from bulk to the boundary is based on a Frobenius algebra F ∈ D. In this case, the condensation becomes a two-step procedure: first, take the quotient category D/F; then take idempotent completion (Karoubi envelope) of D/F to obtain the boundary phase B F = Q(D, F). See our previous work [62] for a detailed discussion of the connection and the difference for both of the approaches. Notice that the Lagrangian algebra L naturally has a Frobenius algebra structure [43]. 3 • Since the bulk phase D is non-chiral, this means that there is a UFC C such that D = Z(C). Thus the boundary theory can also be understood at the C level. Kitaev and Kong show that the boundary is characterized by an indecomposable C-module category M [26] (notice that M is in general not a monoidal category, it is only required to be a finite semisimple Abelian category). The boundary excitations are given by the category of C-module functors C ∨ M = Fun C (M, M), which is a UFC 4 . The boundary vacuum charge is just the identity functor id : M → M, which plays the same role as Lagrangian algebra in D. Since the category D = Z(C) is equivalent to the category Fun C|C (C, C) (the category of all C|C-bimodule category functors from C to C), the anyon condensation from bulk to the boundary is thus a monoidal functor Cond M : Fun C|C (C, C) → Fun C (M, M), whose explicit form is given by [43] as follows: The Lagrangian algebra determined by Cond M can be obtained by L M = Cond ∨ M (1 C ), viz., acting the right adjoint functor of Cond M on the tensor unit of C.
For our model, the bulk is determined by the UFC C = Rep(H) and the bulk topological phase is given by D = Z(C) ≃ Rep(D(H)). As we have presented above, our boundary model is determined by an H-comodule algebra A. It is natural to ask what the C-module category corresponding to this boundary is; the answer is boundary module category: where A Mod is the category of all left A-modules (this is mathematically guaranteed by the result in [35]). To show that this is indeed a Rep(H)-module, first notice that A Mod is finite semisimple, where the simple objects are just simple A-modules. Since dim A < ∞, there are finite simple objects up to equivalence. The action of Rep(H) over A Mod is given by the usual tensor product X ⊗ M for X ∈ Rep(H) and M ∈ A Mod. We only need to check that there is a left A-module structure over X ⊗ M , more explicitly, a map In fact, it is easy to verify that this structure is given by (in diagrammatic representation) where µ X and µ M are the H-module structure and A-module structure maps of X and M respectively, β A is the Hcomodule structure map of A, and τ A,X is the swap map. We say that Since the A-boundary excitation can be regarded as a point defect between two Aboundaries, the boundary anyon is thus described by a functor from the Rep(H)-module category A Mod to itself. It can be proved [35,Theorem 1.21] that for each such functor F there is an A|A-bimodule Y such that F is naturally isomorphic to Y ⊗ A •. Thus the boundary anyons are classified by A|A-bimodules Y . A left H-covariant A|A-bimodule is an A|A-bimodule equipped with a left H-coaction such that the coaction is a morphism of A|A-bimodules. To be more clear, for two H-comodule algebras A and B, the A|B biaction on H ⊗ M (with M an A|B-bimodule) is defined as follows We denote the category of all H-covariant A|B-bimodules as H A Mod B 5 . It can be proved that the module functor category from A Mod to itself is equivalent to H A Mod A [35]. This implies that the A-boundary topological phase is given by This point of view can be naturally generalized to the boundary defect between two boundaries determined by two H-comodule algebras A and B. The direction of the boundary Hopf quantum double model We have shown that from our boundary model, there is a corresponding module category. Conversely, for a given Rep(H)-module M, we can also find a corresponding Hcomodule algebra A such that M ≃ A Mod. The main mathematical tool for doing this is the internal Hom proposed in Refs. [33,34]. We say that M ∈ M generates M if for any N ∈ M, there exists X ∈ C such that Hom(X ⊗ M, N ) ̸ = 0. For indecomposable M, all non-zero simple objects are generators. For finite C-module category M, the functor Hom(• ⊗ M 1 , M 2 ) from C to Vect is a representable functor, and the object in C that represents this functor is called the internal Hom and denoted as Hom(M 1 , M 2 ); more explicitly, for all X ∈ C and M 1 , M 2 ∈ M. In diagrammatic representation, this reads  It is showed in [35] that A Mod ≃ C M ≃ M. To summarize, for any C-module category M, we can find a corresponding H-comodule algebra A such that this M-module boundary can be regarded as an A-boundary of the Hopf quantum double phase. Thus the boundary can be equivalently characterized by an H-module algebra M or an H-comodule algebra A. Note that for a right M-module M , the left A-action on M is given by for all x ∈ M, h ∈ H and m ∈ M . For the bulk Hopf algebra H, the boundary H-comodule algebra A and the corresponding boundary H-module algebra M are also correlated by the Yan-Zhu stabilizer [66]. It is proved [35] that, asĤ-comodule algebra (equivalently, as H-module algebra) where M is a nonzero A-module and Stab A (M ) is the Yan-Zhu stabilizer. We have established a complete theory about the gapped boundary of the Hopf quantum double phase. However, it is possible that two different H-comodule algebras give the same topological boundary M. This has been reflected in the above discussion of constructing the H-comodule algebra A from a given C-module M: by choosing different non-zero simple objects M ∈ M, we obtain different H-module algebras M = Hom(M, M ), and they all give the same C-module category M. In Hopf algebraic language, this is captured by  Notice that from Yan-Zhu stabilizer and Eq. (3.29), we will obtain an H-comodule algebra A ′ . This A ′ may be different from A, but they are Morita equivalent, thus they give the same gapped boundary.
To summarize, a gapped boundary for Hopf quantum double phase is determined by Morita equivalent class of H-comodule algebras or H-module algebras. The module category of the corresponding boundary is given by the module category over these algebras. The topological excitations are classified by bimodules over these algebras. Example 7. It is worth discussing how to recover the result of boundary theory for finite group quantum double H = C[G] in our framework. From Refs. [26,28,30,[32][33][34][35][36], the boundary is described by a pair (N, σ) where N ≤ G is a subgroup up to conjugacy and

Mapping quantum double boundary to string-net boundary
We have proved the topological nature of our Hopf quantum double boundary from an algebraic theory perspective. Let us now prove it from the perspective of lattice Hamiltonian. We will show how to map a quantum double boundary to a string-net boundary (which realizes an extended Turaev-Viro TQFT, thus is topological), and also discuss, how a string-net boundary can be mapped to a quantum double boundary.
We first introduce the Fourier transformation for a general Hopf algebra H with Haar integral h H : where D ν is a fixed matrix representation of ν ∈ Irr(H), and a, b = 1, · · · , dim ν. Here Irr(H) is the set of all equivalence classes of irreducible representations of H. This orthonormal basis is usually called the fusion basis. We have (Peter-Weyl theorem, a.k.a., Artin-Wedderburn theorem) and thus dim H = ν∈Irr(H) (dim ν) 2 . So they form a complete basis. For the convenience of later discussion, we assume that the Hopf quantum double model is built on a trivalent lattice with boundary 6 . The general approach to mapping the quantum double model on a closed surface to an extended string-net model is presented in [18,23,24]. A mathematical proof that shows Hopf quantum double model gives the same topological invariant as Turaev-Viro TQFT is presented in [52]. The input data of an extended string-net model is (C, ω C ) SN with C a UFC and ω C a fiber functor, viz., a monoidal functor ω C : C → Vect.
The input data of a Hopf quantum double model is a Hopf algebra (H) QD . By setting C = Rep(H), the Hopf quantum double model can be mapped into a string-net model. Using Tannaka-Krein reconstruction [63], and by setting H = End(ω C ) (the natural endomorphism of ω C which has a canonical Hopf algebra structure), the extended string-net model can be mapped into a Hopf quantum double model. For our case, we only need to consider how to map the boundary of the Hopf quantum double model to the extended string-net boundary. Recall that extended string-net boundary is determined by a C-module category M together with an additive functor ω M : M → Vect. They satisfy 7 From the previous discussion of algebraic theory we know that M = A Mod. We can choose ω M as a forgetful functor. We will establish the following correspondence: Proof. A rigorous proof for the general H-comodule algebra is complicated and lengthy, it will be given in our forthcoming work [67]. Here we only prove that the commutative diagram in Eq. (3.34) holds when we set C = Rep(H) and M = A Mod. When acting on objects X ∈ Rep(H) and M ∈ A Mod, for the upper right path, the tensor product is given by The following proof is for the special case that A = K ≤ H, where all data are clear for both the extended string-net model and for the Hopf quantum double model.
1. Suppose that the boundary is characterized by an H-comodule algebra A = K ≤ H. For a boundary vertex v b connecting two boundary edges e 1 , e 2 and a bulk edge e 3 , the boundary edge space is H e 1 = H e 2 = A and the bulk edge space is By taking the Fourier transform for H and A, we obtain (3.35) The coefficient can be obtained by taking the inner product of each, e.g., ⟨ν; a, b|g⟩ = H |g⟩ 8 . To obtain the Fourier transform of the vertex operator A K v b , it is sufficient to consider the K action over the fusion basis of H and K. Taking A = K fusion basis as an example, it is easy to verify that where the second one can be derived from the first one by using Eq. (C.1). Then we see that is the projector on the space Hom(µ 3 ⊗ ν 1 , ν 2 ). This coincides with the string-net boundary vertex operator.
In the same spirit, for boundary face f b (with one boundary edge e 1 and three bulk edges e 2 , e 3 , e 4 ), we need to consider theĤ action T φ ± on fusion bases of H and K. It is clear that for H (and similar for K) Notice that we have where χ ν is the character of ν. The boundary phase operator can be written as where Suppose all edges surrounds f b counterclockwise, then using Eqs. (3.39) and (3.40) one has H,j ⟩.

(3.44)
It is easy to verify that this matches well with the string-net face operator. 2. Consider an extended string-net model with C = Rep(H) and M = Rep(K) with K ≤ H. We attach to each bulk and boundary edge the Hilbert spaces where ω C and ω M are forgetful functors of the representation. For a trivalent boundary vertex v b , the corresponding space is As we have shown before, since K is a left H-comodule algebra, the tensor product i⊗x for representations i ∈ Irr(H) and x ∈ Irr(K) is a representation of K, the fusion rule is Since ω M preserves that tensor product (Eq. (3.34)) and direct sum (this holds by definition), we have The boundary vertex operator is defined as the projection that characterizes the above The boundary vertex operator is thus given by To show that Q v b coincides with the quantum double boundary vertex operator A v b , we only need to use the fact that the 3j-symbol we defined in Eq. (3.38) coincides with Q i,x;y v b . We will employ the definition of the face operator provided in Ref. [18]. Through our analysis, we will demonstrate that, in this particular instance, the face operator aligns with the quantum double face operator as per its definition.
( 3.49) If we denote the domain and codomain face spaces of B f as and then the face operator can be regarded as an element in (3.52) Fix the ν ∈ Irr(C), we defined P i,i ′∨ ,ν as the projection of the tensor product of three representations into the vacuum, i ⊗ i ′∨ ⊗ ν → 1. Notice that for the boundary edge, the projection to vacuum is to the vacuum of 1 K ∈ Rep(K), and for the bulk edge, it is the projection to vacuum 1 H . For each edge, we assign the same ν, and label the edges around the faces as s = 1, · · · , 4, then the ν-component of string-net face operator is defined as We see that it is of the same form as Eq. (3.43). The boundary face operator thus coincides with the face operator of that of the quantum double model, as expected. ■

Anyon condensation via ribbon operator
In this section, we will delve into the lattice construction of local operator algebra, as well as ribbon operators and their application in realizing anyon condensation and boundary-bulk duality.
From the perspective of anyon condensation theory, the boundary vacuum anyon can be viewed as a composite of bulk anyons, represented by the equation In the lattice realization, the boundary vacuum anyon sector is the space of states that are invariant under all boundary local stabilizers, i.e., (3.55) The anyon condensation process occurs when a bulk anyon moves near the boundary and becomes a boundary anyon. Since the bulk phase is described by a UMTC D and the boundary phase is described by a UFC B, the condensation is characterized mathematically by a monoidal functor Cond : D → B (roughly speaking, this is a functor that preserves the fusion structure). The bulk anyons that become boundary vacuum anyon are called condensed. Our goal is to construct ribbon operators that can facilitate the anyon condensation process and explore the boundary-bulk duality. Before we start, let us introduce some notions that we will use: (i) the bulk-to-boundary ribbon ρ ↓ is a directed ribbon that starts at some bulk site s = ∂ 0 ρ and ends at some boundary site s b = ∂ 1 ρ; (ii) the boundary-to-bulk ribbon ρ ↑ starts at some boundary site and ends at some bulk site; (iii) the boundary ribbon ρ b is a ribbon that starts and terminates on boundary sites s 0 b = ∂ 0 ρ b and s 1 b = ∂ 1 ρ b . These ribbons can also be called type-A or type-B according to the same convention as we have adopted in the bulk case (see Sec. 2.2).
Topological excitations are characterized as point-like excitations in the lattice model, and are represented by the local operator algebra. Specifically, for a given bulk site s, the vertex operator A g (s) and B ψ (s) generate an algebra D(s), which is isomorphic to the quantum double of the input Hopf algebra. Topological excitations correspond to irreducible representations of these local operator algebras. The bulk ribbon operator is constructed to generate an algebra A, which is isomorphic to the dual algebra of D(s). Local stabilizers at the internal sites of the ribbon commute with the ribbon operator, but at the two ends, they do not commute, and their commutators correspond to topological excitations when the ribbon operators act on the ground state. For a gapped boundary, a similar picture exists. Boundary excitations correspond to representations of the boundary local operator algebra, and the bulk-to-boundary ribbon operator algebra is dual to the boundary local operator algebra. In the previous section, we demonstrated that the gapped boundaries C-module Boundary phase Boundary local algebra of a bulk Hopf algebra H are classified by H-indecomposable left (or right) H-comodule algebras A. We will now determine the algebraic structure of the boundary local operator algebra and bulk-to-boundary ribbon operators.  Table 3 for a summary.
2. The bulk-to-boundary ribbon operator algebra A ρ ↓ is the dual of the boundary local operator algebra A ρ ↓ ≃ D(s b ) ∨ . Or equivalently, the dual of the bulk-to-boundary ribbon operator algebra is fusion-categorical Morita equivalent to the boundary local  Table 1 for a summary. The bulk-to-boundary ribbon operator algebra is dual to the boundary local operator algebra. At the boundary end, the ribbon operator algebra generates all the boundary excitations. Because the local operator algebra is not unique, it follows that the ribbon operator algebra is also not unique. This is reflected in the fact that there exist many different lattice constructions that realize the same phase.
Proof of Proposition 6. We only need to prove that 1 and 2 are statements about the requirement that bulk-to-boundary ribbon operator algebra must satisfy.
Without loss of generality, let us consider the right-H comodule algebra A, and suppose that the boundary phase is given by B = A Mod H A . A module M ∈ B is an A|A-bimodule with a right H-comodule structure with the coaction β : M → M ⊗ H, (3.56) such that the coaction is an A|A-bimodule map (the A|A-bimodule structure of M ⊗ H is ). This means that we have [1] · m [1] · b [1] . (3.57) A leftĤ-module structure of M can be defined as The condition of Eq. (3.57) can be expressed in the leftĤ-action as Now a direct calculation gives (⋆ is just tensor product here) where a, b, c, d ∈ A and ψ, φ ∈Ĥ. This implies that which coincides with Eq. (3.13). This means that M ∈ B implies that M ∈ (A⊗A op )⋆Ĥ Mod.
The proof of the converse direction can be showed similarly since the leftĤ-action and the right H-coaction correspond to each other in a canonical way. ■ In Proposition 1, we demonstrated that the boundary local vertex and face operators generate the boundary local algebra D(s b ). This result supports the claim that the lattice model we have constructed realizes the boundary phase of B = A Mod H A . We would like to note that the above proposition holds not only when the input A for the boundary is a right H-comodule algebra, but also when A is a left H-comodule algebra. This is summarized in Table 3. When A is a faithfully flat H-Galois extension, the local operator algebra can be showed to be fusion-categorically equivalent to either A2 HĀ orĀ2 H A [68]. For further details, please refer to Eq. (D.8) and the accompanying discussions. This equivalence enables the construction of a gapped boundary model via a generalized quantum double construction, as outlined in Appendix D. Using this approach can simplify the lattice realization of ribbon operators and other related concepts.
The case where A = K ≤ H is of interest in its own right, we can provide a more explicit lattice construction of ribbon operators and anyon condensation. By discussion in Sec. 3.2, we have known that for the boundary model determined by an H-comodule algebra A = K ≤ H, the boundary topological excitations are classified by H-covariant A|A-bimodules. Or equivalently, they are also classified by M|M-bimodules in Rep(H), where M ∼ = Stab K (M ) is the Yan-Zhu stabilizer for some nonzero K-module M and is an H-module algebra. One can take M = C the trivial K-module. In this case, it is showed [35,Example 2.19] that M ∼ = Stab K (C) ∼ = K ∨ as rightĤ-comodule algebras with K := H/S −1 (K + )H and K + := ker(ε) ∩ K the augmentation ideal of K. TheĤ-comodule algebra structure will canonically induces an H-module algebra structure on K ∨ . The bulk-to-boundary ribbon operators are operators supported on bulk-to-boundary ribbons and commute with all stabilizer operators in the Hamiltonian except at the two end sites of the ribbons. These operators form an algebra A ρ ↓ . Proposition 6 has provided one way to identify this algebra up to a fusion-categorical Morita equivalence.

Local operator algebra
In this subsection, we will determine the local operator algebra D(s b ) over the boundary site s b in the case that A = K is a Hopf subalgebra of H.
Since boundary topological excitations are given as the monoidal category H K Mod K , identifying the local operator algebra amounts to the reconstruction problem: if there is some kind of algebraic object whose representation (modules or comodules) category is equivalent to H K Mod K . A more general case has been studied in [69,70] which applies to our case. Note that K ≤ H are finite-dimensional complex Hopf algebras, hence H is cocleft as a left K-module coalgebra (see Refs. [69,70] and references therein for related definition).
There is a unique monoidal category structure over H/K + H Mod K makingω a monoidal equivalence such that ω factors overω (see [70,Theorem 3.3.5]): The next step is to identify an algebraic objectH such that H/K + H Mod K ≃H Mod. It turns out thatH = (H/K + H) ⋊K is a coquasi-Hopf algebra which is a crossed coproduct built on (H/K + H) ⊗K with structures given below (cf. [69,Sec. 4.2]). First define ⇀ : Using this definition, one computes that where {k} is an orthogonal basis of K with {k} its dual basis. By this preparation, and associator Moreover, (H/K + H)⋊K can be equipped with a coquasi-antipode (S, α, γ) whose existence is guaranteed by the rigidity of the monoidal category H K Mod K . Thus (H/K + H) ⋊K has a structure of coquasi-Hopf algebra. Details can be found in [70,Sec. 4.4] and [57,Sec. 9.4].
The equivalenceω : H/K + H Mod K ≃ (H/K + H)⋊K Mod is described as follows. Given an M ∈ H/K + H Mod K , it can be endowed with a left (H/K + H) ⋊K-comodule structure by where {k} is an orthogonal basis of K with {k} its dual basis; conversely, given an N ∈ (3.64) Therefore, the local operator algebra D(s b ) is fusion-categorical Morita equivalent to K K ∼ = ((H/HK + ) ⋊K) ∨ , which has a structure of quasi-Hopf algebra. This is compatible with Examples 3 and 4, since K H ∼ = H and K C1 H ∼ =Ĥ. It is important to note that the algebra K K is also fusion-categorical Morita equivalent to the local algebra described in Proposition 6. This equivalence arises because the category in Eq. (3.63) is equivalent to the fusion category associated with the boundary phase.

Bulk-to-boundary ribbon operators
Let us now consider the construction of the bulk-to-boundary ribbon operator for a gapped boundary determined by a Hopf subalgebra K ≤ H. The process is similar to that of the bulk case: first, we define the triangle operators on eight types of triangles, then the general ribbon operators are defined recursively. The main tool is the observation that the where h K ∈ K is the Haar integral of K. This is well-defined by the definition of K + : if for direct right triangle τ R and dual right triangleτ R , etc. For a general bulk-to-boundary ribbon ρ, say of type-B, ribbon operators are determined by the comultiplication of the dual D(s b ) ∨ = (H/ /K) ⊗K, whose comultiplication is given by (3.62). Since it is a coquasi-Hopf algebra, the comultiplication is co-associative.
To define the ribbon operator, take a decomposition ρ = ρ 1 ∪ ρ 2 . For [h] ∈ H/ /K and φ ∈K, the ribbon operator is then given by   [32]. Thus, the group case fits well into our construction.
In Appendix C, we have shown that at any boundary site s b the following commutation relations hold for k ∈ K and ψ ∈ (H/ /K) ∨ : where {ℓ} is a basis of K. The local operator algebra D(s b ) is fusion-categorical Morita equivalent to K K , which is also fusion-categorical Morita equivalent to (K ⊗ K op ) ⋆Ĥ by Proposition 6. The multiplication in the algebra D(s b ) is determined by the comultiplication of D(s b ) ∨ , hence is given as holds for φ ∈ (H/HK + ) ∨ and k ∈ K (the proof has no essential difference with that on the bulk). This straightening relation totally determines the multiplication in Eq. (3.72). Hence every boundary site supports a representation of D(s b ).
More precisely, consider a bulk-to-boundary ribbon ρ with s 0 = ∂ 0 ρ and s 1 = ∂ 1 ρ = s b . Let |Ω⟩ be a ground state. Denote |Ω ,φ (ρ)|Ω⟩ and and let V(s 0 , s 1 ) denote the space spanned by {|Ω defines a representation on V(s 0 , s 1 ). In fact, the commutation relations above imply that where in the last equality we used Eq. (3.73). In other words, the map is an algebra homomorphism and defines the representation.
The coalgebra structure and the antipode are determined by where δ i,j = 1 if i = j and 0 otherwise. For [h] ∈ H/HK + and δ a ∈K, the ribbon operator

Condensations
Now let us characterize the algebras that give the condensations of the boundary model. One can move bulk excitations to the boundary by applying bulk-to-boundary ribbon operators. Since the stabilizer operators of the Hamiltonian on the boundary are different from those in the bulk, a bulk excitation may be condensed on the boundary sites. Our goal is to determine the subalgebra of the ribbon operator algebra which gives condensations. The group case has been studied in [30]. Fix a bulk-to-boundary ribbon ρ = ρ ↓ , say of type-B, connecting a bulk site s and a boundary site s b = (v b , f b ). Let A ρ be the algebra of ribbon operators F [h],φ (ρ), and let C ρ ⊂ A ρ be the subalgebra of ribbon operators that commute with both A K v b and B H f b : Applying elements in C ρ to the ground state of the Hamiltonian will create excitations on s but not on s b .
Multiplying A h K (s b ) on both sides from the right, and using

the above identity holds if and only if
By the above computation, we conclude that C ρ is generated by This algebra determines all excitations at s condensed on the boundary site s b .

Recover the bulk phase from the boundary phase
From the boundary-bulk duality, the bulk phase D can be recovered from boundary phase B by taking monoidal center: D ≃ Z(B). It is interesting to consider how to realize this point of view of boundary-bulk duality in the lattice model. This, to our knowledge, has not been systematically discussed before.
Here we will follow the approach initially proposed by Kong [43,72] to recover the bulk anyon from its boundary condensate in the lattice model. We know that for bulk anyons x, the physical information it carries is: topological charge x, fusion rule [N x ] = N z x,y , Fsymbol, quantum dimension d x , topological spin θ x and braiding c x = {c x,y : x⊗y → y⊗x} y . After anyon condensation, the boundary anyon X = Cond(x) = x 1 ⊕· · ·⊕x n is a condensate of several kinds of bulk anyons and they all lose their braiding information. To recover the bulk anyons from their boundary condensate, we need to add their braiding information back. This intuition can be formalized as the following rigorous construction [73]: Definition 9. For a given monoidal category (C, ⊗, 1, α, l, r), a left half braiding is a pair (x, β x,• ), where x ∈ Obj(C) and β x,• = {β x,y : x ⊗ y → y ⊗ x} y∈Obj(C) is a natural isomorphism between functors x ⊗ • and • ⊗ x, that is, for any y, z ∈ Obj(C) and f : y → z, we have (f ⊗ id x ) • β x,y = β x,z • (id x ⊗ f ), and which is ⊗-multiplicative in the sense that for ∀ y, z ∈ Obj(C), the following diagram commutes: .

(3.77)
The definition of left half braiding implies that β x,1 = id x ; we call x the underlying object of the left half braiding (x, β x,• ).
Definition 10. The monoidal center Z(C) of a monoidal category C is a category defined as follows.
By definition, an anyon in the bulk phase (seen from the boundary-to-bulk perspective) where β X is a half braiding. As illustrated in Fig. 3, we could consider two situations: (i) the direct condensation of two bulk anyons x, y and obtain X ⊗ Y in the boundary (this is realized by two bulk-toboundary ribbon operators F X (ρ 1 ↓ ) and F Y (σ 1 ↓ ) with ρ ↓ ∩ σ ↓ = ∅); and (ii) first braid x, y, then condense them and obtain Y ⊗ X in the boundary (in this case, two corresponding bulk-to-boundary ribbons have non-empty overlap ρ 2 ↓ ∩ σ 2 ↓ ̸ = ∅). The braiding information is thus encoded in the morphism β X,Y : X ⊗ Y → Y ⊗ X. Since the boundary phase is described by a UFC B, we could use the boundary ribbon operator F Y (ξ) to realize this process. F Y (ξ) create Y,Ȳ pairs at two ends of ξ, then we dragȲ to the condensed anyon Y and fuse them to vacuum. Suppose that |Ω⟩ is the ground state, then we have where ' ∼ =' means that they are topologically equivalent. A simple example of toric code is given by Kong [72].  To recover the bulk phase from the rough boundary, we first need to calculate the monoidal center Z(B r ). Each object in Z(B r ) is a pair (x, β x,• ). So our goal is to determine each object x and isomorphism {β x,y : x ⊗ y → y ⊗ x} y corresponding to each bulk anyon. Notice here x, y = I, M ; we will give a physical argument based on the lattice model. First, since the bulk particles 1 and e condensed as vacuum of B r , they must be of the forms   In general, it is believed that braiding has no physical observable effect, we can only observe the mutual statistics that corresponding to double braiding. But we shall argue that for a quantum double with boundary, braiding has its physical reality. This can be seen from toric code boundary model. We first calculate the statistics of dragging one e particle around a boundary m vortex. Let |Ψ(m, f b )⟩ be an excited state containing a magnetic vortex at the boundary face f b , that is, B f b |Ψ⟩ = −|Ψ⟩. The boundary ribbon operator F e (ξ) in this case is just a Z-string: Notice that f b must be surrounded by ξ. When implementing this on the boundary excited state |Ψ(m, f b )⟩, we have The boundary ribbon operator F e (ξ) realizes the half braiding between m and e and it has a physical observable effect. All other half braidings can be realized in a similar way. For the general Hopf quantum double boundary, the generalization is straightforward. To recover the bulk phase from the boundary phase, we implement a boundary-to-bulk ribbon operator F X (ρ ↑ ) which connects boundary site s b and bulk site s. At boundary site s b , there is a boundary excitation X which is a condensate of several bulk anyons x i (e.g., M is a condensate of m, ε in toric code). We have a collection of boundary ribbon operators Definition 12. Let H 1 , H 2 be Hopf algebras, N be an algebra, and N be an (2) )(h (2) ▷ y ◁ g (1) ).

Domain wall lattice
Suppose that two 2d quantum double phases, which are respectively characterized by Hopf algebras H 1 and H 2 , are separated by a 1d domain wall, see Fig. 4   when walking along the direction on the domain wall edges, the H 1 -bulk is always on the lefthand side while the H 2 -bulk is always on the right-hand side. According to how the edges on the two bulks are connected to the domain wall vertices, there are four configurations. There are four corresponding sites for each of these configurations. We define the domain wall vertex operator A a⊗b (s d i ) (i = 1, 2) for a ⊗ b ∈ B ⊗ B op as follows: x y h k |a [0] x, kS(a [−1] ), yb, a [1] h⟩, (4.2) x y h k |a [0] x, kS(a [−1] ), yb, hS(a [1] )⟩, (4.6) x y h k x y h k |a [0] x, a [−1] k, yb, a [1] h⟩. The domain wall Hamiltonian is thus given as (4.9)

Topological excitation of the domain wall
In this part, we will establish the algebraic theory of the gapped domain wall and discuss the relation between the gapped domain wall and the gapped boundary in the language of Hopf algebras. The main results are summarized in Table 4. Similar to the boundary, we can analyze the domain wall excitations at two different but equivalent levels: • From the anyon condensation perspective, a domain wall that separates two bulks with topological order given by UMTCs D i (i = 1, 2) is a UFC W. The anyon condensation from D i to domain wall W is controlled by a condensable algebra A i ∈ D i (i.e., a connected separable commutative algebra) [43]. The wall excitations are given by • From the bulk UFC C i (i = 1, 2) perspective, two bulk topological order are given by D i = Z(C i ). The domain wall is characterized by a C 1 |C 2 -bimodule category M. The domain wall excitations are given by the category of all module functors W = Fun C 1 |C 2 (M, M). Notice that in C i bulk, C i can be regarded as a C i |C i -bimodule category; thus the bulk topological excitations can also be described by Hopf In fact, it is easy to verify that the module structure map is given by (in diagrammatic representation) . This proves that the boundary bimodule category for our model is M ≃ B Mod. We can also apply the folding trick to our model. As illustrated in Fig. 4 (4.11) this domain wall will be called a transparent domain wall (the corresponding bimodule category is called invertible). The box tensor here is the Deligne tensor product, which means that we fuse two domain walls over some given bulk that is in between them.

Ground states in the presence of boundaries and domain walls
In this section, we will solve the extended generalized quantum double model with gapped boundaries and domain walls and obtain the corresponding ground states. To this end, we first review the Hopf tensor network representation of the states proposed in [16], which is convenient for investigating the entanglement properties of the states.

Hopf tensor network states
Consider two Hopf algebras J, W with a pairing ⟨•, •⟩ : J ⊗ W → C and ϕ ∈ J, x ∈ W . The basic ingredient of the Hopf tensor network is the rank-2 Hopf tensor Ψ(x, ϕ) = ⟨ϕ, x⟩, Notice that here the blue edges (corresponding to the faces of the lattice) are labeled with ϕ ∈ J and the black edges (corresponding to the edges of the lattice) are labeled with x ∈ W . For fixed ϕ, x, the evaluation is determined by the pairing, and the process will be called Hopf trace. Therefore, the Hopf tensor network representation is a diagrammatic representation of the pairing. For two Hopf algebras J and I which both have their pairings with Hopf algebra W , we can contract the rank-2 tensors to obtain rank-3 tensors. There are two types of contractions. The first one is parallel gluing, which is determined by the comultiplication of W . For example, fix ϕ ∈ J, ψ ∈ I and x ∈ W , we define The second one is vertical gluing, which is determined by the comultiplication of J. For example, fix ϕ ∈ J and x, y ∈ W , we have ⟨ϕ (1) , x⟩⟨ϕ (2) , y⟩. With the above rules, for arbitrary Hopf tensor network Γ with no free indices (which is a lattice for which all edges and faces have been labeled, and each face has its fixed starting site), the above Hopf trace gives us a complex number. We denote the Hopf trace as whose evaluation rules are given by Eqs. (5.3) and (5.4). Now consider a lattice C(Σ) of a 2d surface Σ with face set F and edge set E. We assign each face f a Hopf algebra J f and each edge e a Hopf algebra W e . Assume that for each face, J f has the corresponding pairings with the edge Hopf algebras for edges e ∈ ∂f . If we set the edge with values x e ∈ W e and face with values ϕ f ∈ J f , then we obtain a Hopf tensor network The corresponding Hopf tensor network states are defined as (5.7)

Ground state of the boundary model
From an anyon-condensation point of view, the bulk phase of the Hopf algebraic quantum double model is characterized by the UMTC B = Rep(D(H)) ≃ Z(Rep(H)). A gapped boundary is characterized by a Lagrangian algebra L in B. For a sphere Σ with n boundaries ∂ i Σ and each boundary is characterized by its Lagrangian algebra L i , the ground state degeneracy is given by  [1] ), since x [1] ∈ H. Hence for h e ∈ H e , ϕ f , φ f b ∈Ĥ f , and x e b ∈ A e b , we have the following Hopf tensor network state Suppose that A is augmented, i.e., there is an algebra homomorphism ε : A → C; for example, one can take the counit ε when A = K is a Hopf subalgebra. Let λ = ⟨λ⟩ λ ⟨1⟩ ⊗ λ ⟨2⟩ ∈ A ⊗ A op be the symmetric separability idempotent of A. Denote (5.10) When A = K and ε is the counit of K, h A is the Haar integral of K.
Proposition 8 (Ground state on a disk). Suppose that Σ is a disk, then the ground state is unique. Then the ground state of the boundary lattice model determined by an H-comodule algebra A is the Hopf tensor network state For each bulk site s, we have Proof. The first assertion follows from the general equation (5.8). Hence by the uniqueness of the ground state on a disk, it suffices to check the state (5.11) satisfies the stabilizer conditions. The proof for the bulk part is the same as that in Ref. [16]. Let us prove the boundary part. Consider the following configuration In this case, the state (5.11) near the vertex reads H )|λ where φ 1 = φ 2 = φĤ , h 1 = h 2 = h A , and λ 1 = λ 2 = λ. One computes H )|λ where the third equality follows from xλ 2 , the sixth from Eq. (3.7), and the last from λ ⟨1⟩ λ ⟨2⟩ = 1. Next consider the following configuration In this case, the state (5.11) near the face is 3 ) where h i = h H , φ i = φ = φĤ , and h = h A . By computation, one has for φ ′ = φĤ , 3 ))φ(h [2] S(h 3 ) 3 ))φ(h [2] S(h 3 ))φ(h [1] S(h 3 ) where the last equality follows from φ 2Ĥ = φĤ . The last assertion is immediate from the property of Haar integral. ■ In Appendix D, we give an alternative construction of the boundary lattice model based on the generalized quantum double. We can also solve the Hamiltonian of this kind of boundary model by the Hopf tensor network states. For this construction, all internal edges are set as the Hopf algebra H, and internal faces the Hopf algebraĤ. The boundary edge is set as W and the boundary face is set as J. In this way, we obtain the corresponding Hopf tensor network states of the model, The ground state of the model is the one for which we choose all elements as Haar integrals. For each bulk site s, we have For the boundary site s b , we have Proof. Since the ground state is unique, we only need to check that the state we construct here satisfies the stabilizer conditions. For the bulk part, the proof is the same as given in Ref. [16]. We only need to check the boundary stabilizers. Recall that in our construction, the boundary can be treated as a big face (see Appendix D). Using the fact that φ J φ J = φ J and h W ∈ Cocom(W ), it is easy to check B φ J |Ψ GS ⟩ = |Ψ GS ⟩. For vertex stabilizers, using the fact that h K ∈ Comm(K), h W ∈ Cocom(W ) and

Ground state of the domain wall model
Using the Hopf tensor network representation, we can also solve the model with a domain wall Σ d separating two bulks Σ i (i = 1, 2). The spirit is the same as the construction of the boundary. Consider the domain wall determined by an 1, 2), and x e d ∈ B, we have the corresponding Hopf tensor network state 1,e 1 }, 2,e 2 }, {ϕ 2,f 2 }) where e i and f i are the edges and faces respectively in region i = 1, 2, e d are edges on the wall, and f d i are wall faces in region i = 1, 2. By a similar computation as in Proposition 8, one can show that the ground state |Ψ GS ⟩ is given by In Appendix E, we construct a domain wall lattice model based on pairings between Hopf algebras. We can apply the same method to identify the ground state of this type of domain wall model, that is, we put the corresponding Haar integrals over each edge, and all the faces also take the Haar integrals. The ground state |Ψ GS ⟩ is therefore given by The generalization to N -bulk domain wall is straightforward. Notice that these states are local quasi-product states [74], thus they satisfy the entanglement area law. Recently, it is discovered (in group algebra case) that the entanglement entropy of the quantum double phase is sensitive to the existence of the boundary and boundary types [75][76][77][78] (and domain walls [79,80]). Using this explicit ground state, we can also analyze the entanglement feature of the extended generalized quantum double model in more detail; this will be done in our future work.

Conclusion and discussion
In this work, we establish the theory of gapped boundary and domain wall for the generalized quantum double model. A gapped boundary is equivalently characterized by an H-comodule algebra or an H-module algebra. A domain wall is characterized by an H 1 |H 2bicomodule algebra. We present the lattice realization and the ground states of these extended quantum double models are solved by using the Hopf tensor network representations of the quantum states. The boundary and wall excitations and ribbon operators are also discussed in detail. While significant advancements have been achieved in constructing the gapped boundary and domain wall of the generalized quantum double model using Hamiltonian methods, there are still numerous areas that require further exploration to enhance our comprehension of the theory: (i) We have successfully constructed the gapped boundary model for a general Hcomodule algebra A, demonstrating that the boundary local algebra provides the desired boundary phase. However, further investigation is needed to develop a general construction of ribbon operators that realize anyon condensation.
(ii) We have mentioned that the entanglement features of the generalized quantum double model are sensitive to the existence of types of gapped boundaries and domain walls; this part is left for our future study.
(iv) The study of higher dimensional Hopf quantum double models holds significant importance in the investigation of higher dimensional topological order. While the Z 2 group case has been extensively explored, particularly in relation to topological defects characterized by higher categories [13,[87][88][89], the more general group cases and Hopf algebra cases still largely remain open topics for research. Further investigations are needed to deepen our understanding of these models and their associated higher-dimensional topological phenomena.
These topics will be covered in our future studies.
Acknowledgments Z.J. acknowledges Liang Kong and Zhenghan Wang for many helpful discussions on topological order, boundary-bulk duality, and the mathematical theory of various topological defects. He also acknowledges Yuting Hu for his help. S.T. would like to thank Uli Walther for his constant encouragement and stimulating conversations. He also appreciates Shawn X. Cui and Bowen Yan for many helpful discussions. We also acknowledge Juven C. Wang and Eric Samperton for bringing our attention to several related references. All authors are grateful for the referee's valuable suggestions. Z.J. and D.K. are supported by the National Research Foundation and the Ministry of Education in Singapore through the Tier 3 MOE2012-T3-1-009 Grant for Random numbers from quantum processes. S.T. was in part supported by NSF grant DMS-2100288 and by Simons Foundation Collaboration Grant for Mathematicians #580839.
A C * Hopf algebra In this appendix, we will introduce the input data of our construction of lattice realization of 2d topological ordered phase, that is, a finite-dimensional C * Hopf algebra and module coalgebra over it. And we will collect some properties of them that will be used in this paper. All vector spaces are over the field of complex numbers C. 1. (H, µ, η) is an algebra: µ • (µ ⊗ id) = µ • (id ⊗ µ), and µ • (η ⊗ id) = id = µ • (id ⊗ η).
4. The antipode S satisfies: We will use the notation µ(x ⊗ y) = xy and η(1) = 1 H for multiplication and unit. We will also adopt the Sweedler's notation ∆(u) = (u) u (1) ⊗ u (2) In general, we define ∆ 1 = ∆ and ∆ n = (id ⊗ · · · ⊗ id ⊗ ∆) • ∆ n−1 , then ∆ n (u) = (u) u (1) ⊗ · · · ⊗ u (n+1) . From the definition above, we have the following useful identity: The swap operation is defined as τ (x ⊗ y) = y ⊗ x, by which one denotes µ op = µ • τ and ∆ op = τ • ∆. The opposite Hopf algebra H op is defined as (H, µ op , η, ∆, ε, S −1 ), and the coopposite weak Hopf algebra H cop is defined as (H, µ, η, ∆ op , ε, S −1 ). A Hopf algebra H is called simple (or irreducible) if its algebra (H, µ, η) does not have nontrivial ideal, and it is called semisimple if its algebra can be written as a direct sum of simple algebras. From the Larson-Radford theorem, H is semisimple if and only if S 2 = id (also equivalent to the simplicity of the dual Hopf algebraĤ). A * -Hopf algebra (H, * ) is a Hopf algebra H equipped with a star structure * : H → H such that ∆ is a * -homomorphism. That is for all x, y ∈ H and c ∈ C. (H, * ) is called a C * Hopf algebra if there exists a faithful * -representation ρ : H → B(H) for some operator space over a Hilbert space H. Note that a finite-dimensional C * Hopf algebra is semisimple. It can be proved that In particular, for semisimple Hopf algebra, this implies that S(x * ) = S(x) * . For a finite-dimensional C * Hopf algebra, the antipode satisfies the following properties: S(x (1) )x (2) .
These properties are useful for our calculation. Note it follows that S : H op → H cop is an isomorphism of Hopf algebras. Another notion we will use is the Haar integral h ∈ H, which is defined as a normalized two-sided integral. A left (resp. right) integral of H is an element ℓ (resp. r) satisfying xℓ = ε(x)ℓ (resp. rx = rε(x)) for all x ∈ H. If h is simultaneously left and right integral, it is called a two-sided integral. A left (resp. right) integral ℓ (resp. r) is called normalized if ε(ℓ) = 1 (resp. ε(r) = 1). We see that normalized integral is idempotent ℓ 2 = ε(ℓ)ℓ = ℓ (resp. r 2 = rε(r) = r). A Haar integral of H is a normalized two-sided integral. Notice that a Haar integral, if exists, must be unique. To see this, suppose that h, h ′ are two Haar integrals, then (A.14) 10 There are several different constructions of the quantum double, see [57]. Here we choose the one built from (H ∨ ) cop ⊗ H. See also Sec. D for more general construction.
where "•" denotes the argument of the function. The other data are given by (2) ).  [57,[90][91][92]. In particular, we have the following useful straightening formula which will be useful in dealing with computation involving ribbon operators. The above is the input data for the bulk. For boundaries and domain walls, we need to introduce the notion of H-comodule algebra.  The smash product algebra A#H is defined as follows.
1. As a vector space A#H = A ⊗ H; we denote a#h for element a ⊗ h.

The product is given by
and the identity is 1#1.
When M is a left H-module algebra, M op is a left H cop -module algebra. The smash product A = M op #H cop is a left H-comodule algebra with coaction given by where the comultiplication label is taken in H.

Definition 18.
A Frobenius algebra is a quintuple (F, µ, η, ∆, ε) with µ : F ⊗ F → F, η : C → F, ∆ : F → F ⊗ F and ε : F → C, such that (F, µ, η) forms an algebra and (F, ∆, ε) forms a coalgebra and A Frobenius algebra is called special if there exist α, β ∈ C × such that When α = 1 and β = dim F, it is said normalized-special (or separable). A Frobenius algebra is said symmetric if where coev F is the coevaluation map.

B Geometric objects on 2d lattice
In this appendix, following Ref. [28], we provide a detailed discussion of geometric objects that appeared in the quantum double model.
Definition 19 (Lattice on a surface). Let Σ be a 2d surface, a lattice C(Σ) on it is a simple graph embedded in Σ, where, by simple graph we mean a graph for which no edge starts and ends at the same vertex.
It can be proved that, for an arbitrary 2d surface, this kind of lattice embedding always exists. Another way to understand the lattice is from the perspective of cellulation, and the result coincides with the graph embedding. A typical example is a triangulation, which always exists for topological manifolds with dimensions less than or equal to three [93]. A slightly more complicated case is to consider the lattice as a ribbon graph embedded in the surface [21,22], but there is no big difference. We can always break the ribbon graph into a simple graph by breaking edges and adding some new edges. Notice that for a given surface, different lattices on it have the same topological invariant (e.g., the same Euler characteristics), thus they are topologically equivalent. For the surface with boundaries, similar results hold. We first make a graph embedding of the boundary, which is nothing but an m-vertex cycle. The bulk graph shares these vertices and edges on the boundary. Definition 20. For a lattice C(Σ) on the surface Σ, we denote its vertex set, edge set, and face set as V (Σ), E(Σ) and F (Σ) respectively. The dual latticeC(Σ) is the Poincaré dual of C(Σ), for which the role of face set and vertex set interchange. We also introduce a direction of each edge e ∈ E(Σ), and the direction of the dual edge is obtained by rotating the direct edge counterclockwise with π/2. The inverse edgeẽ is obtained by reversing the direction of edge e. Two ends of edge e are denoted as ∂ i e with i = 0, 1 indicating the starting and terminal ends. A direct path p is a list p = (v 0 , e 1 , · · · , e n , v n ) for which ∂ 0 e k = v k−1 and ∂e k = v k . The dual path is thus a listp = (f 0 ,ẽ 1 , · · · ,ẽ n , f n ) such that ∂ 0 e k = f k−1 and ∂e k = f k .

Definition 21.
A site is a pair s = (v, f ) with adjacent v ∈ V (Σ) and f ∈ F (Σ). A direct triangle τ = (s 0 , s 1 , e) consists of two sites s 0 , s 1 and a direct edge e, for which s 0 and s 1 share a common face. A dual triangleτ = (s 0 , s 1 ,ẽ) consists of two sites s 0 , s 1 and a dual edgeẽ, for which s 0 and s 1 share a common vertex. The two sites of the triangle are denoted as ∂ i τ with i = 0, 1 indicating the starting and terminal ends. Notice that each edge has its direction, which may or may not match the direction of the triangle. A left-handed (right-handed) triangle is one for which the edge is on the left-hand (right-hand) side when we pass through the triangle along its positive direction. Two triangles overlap if there share some common area. Two direct (dual) triangles overlap only if they are the same triangle. A direct triangle overlaps with a dual triangle when their direct edge and dual edge coincide.
• A strip (ribbon) is called empty if its length is zero (no triangle).
• A strip (ribbon) is called direct (dual) if it consists only of direct (dual) triangles.
• A strip (ribbon) is called proper if it contains both direct and dual triangles. For a proper strip (ribbon), there is an associated direct path p ρ and a dual pathp ρ .
• A strip (ribbon) is called closed if ∂ 0 ρ = ∂ 1 ρ, viz., its starting site and terminal site are the same site. The only end site of the closed strip (ribbon) is denoted as ∂ρ.
Definition 23. A directed strip (ribbon) is called type-A (resp. type-B) if all the direct triangles in it are left-handed (resp. right-handed).
Definition 24. A direct closed ribbon is a closed ribbon consisting of only direct triangles. A dual closed ribbon is a closed ribbon consisting of only dual triangles.

C Properties of ribbon operators
In this appendix, we provide some detailed discussion and calculations of ribbon operators.

C.1 Triangle operators
The building blocks for the ribbon operators are eight triangle operators given in Eqs. (2.17)- (2.24). We see that they are determined by the left-handed edge operators T ± , L ± , and right-handed edge operatorsT ± andL ± . Recall that the inner product on the Hopf algebra H is given by ⟨x, y⟩ = φĤ (x * y), where φĤ is the Haar integral ofĤ. The left-handed operator and right-handed operator are independent, and they won't appear in a given ribbon simultaneously. Only when considering the overlap of two ribbon operators with different chiralities, need we be concerned with the relation between them.
Using the definition of these operators, it is not difficult to work out the commutation relations among these operators, where "•" denotes the argument of the function. The right-handed edge operators and left-handed edge operators are related via antipode byL (C.6) Thus from the properties of left-handed edge operators, we similarly have: and The commutation relations for right-handed edge operators (and the commutation relations between left-handed and right-handed edge operators) can also be obtained from Eqs. (C.6), (C.4) and (C.5).
It is easy to prove that (C.9) From the above equalities and the definition of triangle operators, it is clear that This means that, as algebras, the triangle operator algebras satisfy

C.2 Vertex and face operators
The type-B construction of the quantum double model is based on the left-module structure of H. The vertex operators A h (s) are built from L ± in counterclockwise order, and the face operators B φ (s) are built from T ± in a counterclockwise order. It is easy to verify that See Sec. III A in Ref. [16]. They form a representation of D B (H) =Ĥ cop 1 H.
The type-A construction of the quantum double model is based on the right-module structure of H. The vertex operatorsÃ h (s) are built fromL ± in a clockwise order, and the face operatorsB φ (s) are built fromT ± in a clockwise order. It is easy to verify that They form a representation of

C.3 Properties of ribbon operators
There are several crucial properties for open ribbon operators that will be used for constructing topological excitations of the model. As we have mentioned before, the topological excitations are given at two ends of the ribbon operators, thus the commutation relations between the vertex and face operators and ribbon operators are crucial: 1. At the starting points of ribbons ρ A and ρ B , we have Similarly, at the ending points, we have See [19] for detailed proofs (although the convention we use here is different from the one in [19], but the same result can be obtained).
Proposition 10. Let ρ be a closed ribbon with end site s = ∂ρ.
For the second statement, using Eqs. (C.17) and (C.21), one has Here, in the fifth equality, we use the fact that φ is cocommutative. This completes the proof of the assertion for type-B ribbons. The assertion for type-A ribbons can be proved similarly [19]. ■ Proposition 12. The ribbon operator F h,ϕ (ρ) of a closed ribbon ρ commutes with all sta- Proof. Denote s 0 = ∂ρ and s = (v, f ). We only need to consider the case that s lies on ρ. Note that we can always find an s 1 in ρ such that ρ = ρ 1 ∪ ρ 2 with ∂ 0 ρ 1 = ∂ 1 ρ 2 = s 0 , ∂ 1 ρ 1 = ∂ 0 ρ 2 = s 1 and s ̸ = s 1 . Then ρ 1 and ρ 2 are open ribbons and s is not an end site of them. It follows from Proposition 11 that A H v and BĤ f commute with F (h⊗φ) (1) (ρ 1 ) and F (h⊗φ) (2) (ρ 2 ), and hence with F h,φ (ρ) by the recursive formula of ribbon operator. ■

Proof of the commutation relations (3.68-3.71)
We will prove the commutation relations for type-A ribbons. The proof for type-B ribbons is similar.

D Gapped boundary lattice based on generalized quantum double
Let us now introduce a general construction of a gapped boundary model based on a generalized quantum double. The cellulation of the surface for this construction is slightly different from the one given above. As shown in Fig. 5, the boundary is drawn as a bold ⟨h (1) , a⟩⟨h (2) , b⟩, (D.2) There is a convolution algebra structure over C := Hom(J ⊗K, C), with the convolution defined as (2) ). (D.4) The multiplication and unit of C are defined as It is easy to verify that (for semisimple Hopf algebras), the convolutional inverse of λ is Hereinafter, we assume that the pairing is also consistent with the C * structure in the sense that λ(φ * ⊗ h) = λ(φ ⊗ S(h) * ).
Definition 26 (Generalized quantum double [57]). For a given pairing λ : J ⊗ K → C, the generalized quantum double D λ (J cop , K) := J cop 1 λ K is a Hopf algebra built on J cop ⊗ K with Hopf algebra multiplication given by where the comultiplication of g is taken in J cop .
To construct the topological boundary of the Hopf quantum double model with the bulk determined by a Hopf algebra H, we need to impose some conditions on J, K such that they are related to H. Here we will assume that there exists a left H-comodule algebra A such that the category of representations of J cop 1 λ K is equivalent to the category of Hcovariant A|A-bimodules, that is, Rep(J cop 1 λ K) ≃ H A Mod A . The physical meaning of this restriction has been illustrated in Sec. 3.2. If A is a left H-comodule algebra with coaction β A , byĀ we mean the right H-comodule structure with opposite underlying algebra A op and coactionβĀ( ). If A is a right H-comodule algebra, similarly,Ā is a left H-comodule algebra. For a right H-comodule (M, β M ) and a left H-comodule (N, β N ), the cotensor product M 2 H N is the equalizer of the morphisms β M ⊗ id N and id M ⊗ β N , in the sense as follows: (D.8) When A is a Galois-Hopf extension, the representation category is equivalent to the left module category overĀ2 H A. This will be helpful for constructing boundary ribbon operators. As we will see later, the above restriction for J, K is equivalent to that the representation category of the generalized quantum double is equivalent to the H-covariant A|A-bimodule category. We would like to stress that this restriction is not artificial, since for any such J cop 1 λ K, starting from the representation category Rep(J cop 1 λ K), we can construct such an H-comodule algebra A which satisfies the above assumption. Details have been given Sec. 3.2. Now we are ready to present the construction of the boundary Hamiltonian. The boundary is characterized by the following collection of data: the bulk Hopf algebra H and the boundary Hopf algebras J, K, W . They satisfy the following conditions: • Two finite-dimensional C * Hopf algebras K and J for which there exists a pairing λ : J ⊗ K → C. And there is a pairing betweenĤ and K, γ :Ĥ ⊗ K → C.
• A finite-dimensional C * Hopf algebra W , which is a K-bimodule coalgebra. The left and right K-actions are denoted as h▷w and w◁h respectively for w ∈ W, h ∈ K. The right action induces a left K-module structure by w ◁ S(h). We denote the operators corresponding to these two actions as L K,h + w = h ▷ w = hw, L K,h − w = w ◁ S(h) = wS(h). (D.9) We also assume that the antipode law holds: S(h ▷ w) = S(w) ◁ S(h) and S(w ◁ h) = S(h) ▷ S(w); for C * structure, we assume (h ▷ w) * = w * ◁ h * and (w ◁ h) * = h * ▷ w * ; and for Haar integral h W ∈ W and k ∈ K, we assume kh W = ε(k)h W = h W k.
• H is a K-bimodule coalgebra that satisfies the antipode law.
• There is a pairing α :Ĥ ⊗ W → C which also induces anĤ-bimodule structure over W in a similar way as in Eq. (D.10). It is easy to verify that W is also anĤ-module algebra, and this module algebra structure induces an H-comodule algebra over W . For the Haar integral φŴ , we assume that (x) ⟨φŴ , x (1) ⟩α(ψ, x (2) ) = εĤ (ψ)⟨φŴ , x⟩ for all ψ ∈Ĥ and x ∈ W .

(D.12)
Remark D.1. As in the bulk, we can also construct the boundary using the right-module structure; the generalization is straightforward.

(D.18)
The boundary Hamiltonian is given by the local commuting projector Hamiltonian The total Hamiltonian is thus This model will be called the extended Hopf algebraic quantum double model. The ground state degeneracy now depends on both the topology of the 2d surface Σ and its boundaries. It is still independent of the choice of the cellulation C(Σ).
When Σ is a sphere, by cutting boundaries, the ground state space will become degenerate.
To shed further light on this construction of boundaries, let us consider two examples.
Example 27. Consider the case that W = H, J ≤Ĥ and K ≤ H are Hopf subalgebras. We see that they satisfy all the requirements for constructing the boundary. In this kind of model, it is more convenient to discuss boundary condensation and confinement using the ribbon operators. We can also obtain a corresponding generalized model. This model is similar to the one given in [28].

E Domain wall lattice based on generalized quantum double
Suppose that two 2d quantum double phases, which are respectively characterized by Hopf algebras H 1 and H 2 , are separated by a 1d domain wall, see Fig. 4 (a). To construct the domain wall Hamiltonian, we need the following input data (all Hopf algebras here are finite-dimensional C * Hopf algebras): • Two domain wall face Hopf algebras J 1 , J 2 and one domain wall vertex Hopf algebra K, and there exist pairings, λ 1 : J 1 ⊗ K → C and λ 2 : J 2 ⊗ K → C.
• A domain wall Hopf algebra W which is a K-bimodule. The left actions of K on W induced by h ▷ w and w ◁ S(h) are denoted as L K,h + and L K,h − respectively.
• Two bulk Hopf algebras H 1 , H 2 which are K-bimodules. The bimodule structures also induce two inequivalent left module structures on H i .
Similar to the gapped boundary construction, we will also assume some consistency conditions for these pairings and actions. For each edge in the first and second bulks C(Σ 1 ) and C(Σ 2 ), we assign the Hopf algebras H 1 and H 2 respectively. Two bulk total Hilbert spaces are thus H(Σ i ) = ⊗ e∈C(Σ i ) H i with i = 1, 2. For each domain wall edge e d ∈ C(Σ d ) (where Σ d = ∂Σ 1 = ∂Σ 2 ), we attach the Hopf algebra W to it. The total domain wall Hilbert space is H(Σ d ) = ⊗ e d ∈C(Σ d ) W . We define the domain wall vertex as the vertex on the wall and denote them as v d . The domain wall face on the first bulk is the face near the wall in the first bulk, and it is denoted as f d,1 . Similarly, we denote f d,2 for the domain wall face on the second bulk.
For a domain wall site s d = (v d , f d ) and h ∈ K, we defined (in counterclockwise order) where, for first and second bulk edges, L K,h (ℓ) (j ℓ , v d ) act on H i , and for domain wall edges, they act on W . The convention for choosing L + , L − is the same as in the bulk.
The action decouples from the tensor product of two phases. We could introduce a domain wall Hopf algebra K to sew them together. The actions of K on H i naturally induce an action of K on W = H 1 ⊗ H 2 as k ▷ (h 1 ⊗ h 2 ) = (k) k (1) h 1 ⊗ k (2) h 2 . To simplify the notation, we will denote the action of K on H i as kh and h i S(k). For example |h 2 S(k (1) ), k (2) (h 3 ⊗ g 2 ), k (3) g 3 , (h 1 ⊗ g 1 )S(k (4) )⟩. (E.14) We see that the gapped domain wall is determined by K, J 1 , J 2 .
N -bulk domain wall and folding trick.
-The above discussion about the domain wall between two bulks can be generalized to the N -bulk scenario. This N -bulk domain wall is crucial for investigating the higher-dimensional Hopf quantum double model.
In this N -bulk case, it turns out that we need extra input data, that is the direction for each bulk (denoted as σ(i)). If we fix the direction of the domain wall, then using the right-hand screw rule, there is an induced directionσ(i) for each bulk. This induced direction may or may not coincide with the direction of that bulk. We assign a Hopf algebra H i (equivalently, a UFC C i = Rep(H i )) for each bulk. An N -comodule algebra B can be defined as follows: for arbitrary pair of bulks H i , H j , if σ(i) =σ(i) and σ(j) ̸ =σ(j), there is an H 1 ⊗ H cop 2 -comodule structure over B, and all other situations can be treated similarly. The N -bulk domain wall is thus characterized by this N -comodule algebra B.
The lattice construction is similar to the two-bulk case: we assign a Hopf algebra W for each wall edge; a Hopf algebra K for each wall vertex; and a Hopf algebra J i for boundary face in the H i -bulk. They satisfy similar compatibility conditions to the two-bulk case. The wall Hamiltonian becomes The wall excitations are given by the N -module functor category Fun C 1 |···|C N ( B Mod, B Mod).
The folding trick also holds in this case, namely, by stacking all bulk together, the domain wall will become a gapped boundary.