Towards a dual spin network basis for (3+1)d lattice gauge theories and topological phases

Using a recent strategy to encode the space of flat connections on a three-manifold with string-like defects into the space of flat connections on a so-called 2d Heegaard surface, we propose a novel way to define gauge invariant bases for (3+1)d lattice gauge theories and gauge models of topological phases. In particular, this method reconstructs the spin network basis and yields a novel dual spin network basis. While the spin network basis allows to interpret states in terms of electric excitations, on top of a vacuum sharply peaked on a vanishing electric field, the dual spin network basis describes magnetic (or curvature) excitations, on top of a vacuum sharply peaked on a vanishing magnetic field (or flat connection). This technique is also applicable for manifolds with boundaries. We distinguish in particular a dual pair of boundary conditions, namely of electric type and of magnetic type. This can be used to consider a generalization of Ocneanu’s tube algebra in order to reveal the algebraic structure of the excitations associated with certain 3d manifolds.


JHEP10(2018)023 1 Introduction
Gauge theories have become indispensable in modern physics. A prime example of gauge theories is Yang-Mills theory, which is an essential part of the standard model for particle physics. A crucial tool to address non-perturbative regimes is lattice gauge theory, which relies upon a discretization of spacetime. Lattice gauge theories appear, in particular, in the description of quantum chromodynamics and loop quantum gravity [1][2][3]. They also provide a particularly tractable class of topological quantum field theories which in turn describe gapped phases of matter [4,5]. An example of such topological quantum field theory is BF theory that can be understood as the weak coupling limit of Yang-Mills theory. It is an important ingredient of loop quantum gravity [3,[6][7][8][9] as well as the spin foam approach [10,11]. In the condensed matter literature, its Hamiltonian realization for finite groups is known as the Kitaev model.
Via the introduction of gauge variables, gauge theories allow for a local formulation of their dynamics -at the price of introducing redundancies. In contrast, gauge invariant observables feature a form of non-locality. In lattice gauge theories, observables are typically defined over extended objects. Indeed, holonomies arise from a (exponentiated) connection integrated over a path. Choosing this path to be a loop and taking the trace of the holonomy, we obtain a gauge invariant observable known as a Wilson loop. Conjugated to these holonomies are electrical fluxes which are integrals of the electrical field over surfaces (in three spatial dimensions). 1 A key challenge of such formulation is to define a set of commuting gauge invariant observables such that the eigenvalues of these observables provide a complete -but not over-complete -labeling for a basis of gauge invariant states. Additionally, one would like these observables to be as local as possible. This is needed in order to define a notion of (quasi-)local excitations which arise as defects in the context of topological phases.
The spin network basis [12] provides a gauge invariant basis which diagonalizes certain invariant combinations of electrical fluxes. This basis has found wide applications in loop quantum gravity [1][2][3]13] and more generally in lattice gauge theories. It also appears in the form of string nets [14] in the study of (2+1)d topological phases of matter. In spite of its success, the spin network basis is mostly adjusted to describe the strong coupling regime of lattice gauge theories. The reason is that the strong coupling regime can be understood as the (vacuum) state where all the electrical fluxes are sharply vanishing. Consequently, the spin network basis can be seen as describing electric flux excitations, that is nonvanishing electrical flux, with respect to this vacuum state. In loop quantum gravity, this state is referred to as the Ashtekar-Lewandowski vacuum [15,16] and represents a state of no spatial geometry. 2 The previous remarks raise the question of whether there is a basis that describes curvature (or magnetic) excitations, generated from a vacuum state sharply peaked on flat connection. Such a basis would be adjusted to the weak coupling regime of lattice gauge JHEP10(2018)023 theory and it would be very useful for the description of topological phases and their defect excitations [17][18][19][20]. Defect magnetic excitatons on top of this alternative vacuum state are excitations leading to non-trivial values for Wilson loops based on contractible cycles. Such excitations are concentrated on point like defects in (2+1)d (e.g. the vertices of a 2d triangulation) and on one-dimensional defects in (3+1)d (e.g. the edges of a 3d triangulation). A basis in which the description of such defects is transparent would naturally help to understand their properties, such as their fusion and their braiding relations. As we describe further below, such a basis has been defined for (2+1)d models [21]. In this paper, we are interested in generalizing this basis to (3+1)d for which defect excitations are much less understood.
Another reason to look for such a curvature basis are recent developments in loop quantum gravity. The description of the Hilbert space of the theory has initially been based on the Ashtekar-Lewandowski vacuum (as a cyclic state of this Hilbert space), and the spin network basis has been very useful to describe the (electric flux) excitations on top of this vacuum. Recently, new and inequivalent Hilbert space descriptions have been introduced, based on a vacuum state peaked on flat connections [6-9, 22, 23] and vacua states peaked on homogeneously curved geometries [24,25], respectively. This new Hilbert space supports curvature (or magnetic) excitations localized on zero-dimensional (in two dimensions) or one-dimensional (in three dimensions) defect structures. It is therefore useful to have a basis which includes labels for such curvature excitations.
Previous results: the approach we take in this paper is motivated by a number of recent results concerning the construction of bases of excited states. For (2+1)d lattice gauge theories, a basis which describes excitations on top of a flat connection vacuum can be obtained [21] by adapting the so-called fusion basis from the theory of (2+1)d topological phases [19,26]. This fusion basis does not only describe magnetic excitations -which are encoded in conjugacy class labels C -but also electric excitations labeled by representations R of the stabilizer groups of the conjugacy classes. Together, these labels form the irreducible representations ρ = (C, R) of an algebraic structure known as the Drinfel'd double of the group G.
The fusion basis provides labels for the basic excitations (e.g. those based on elementary plaquettes of the underlying lattice) but also for the excitations that arise from the fusion of the basic excitations. As such, this basis has an inherent hierarchical structure and is ideally suited for coarse-graining [21,27]. In fact, it exhibits a crucial feature of non-abelian gauge theories, namely that the fusion of two purely magnetic excitation can lead to an excitation with dyonic charge, that is where both the magnetic and electric component are non-trivial [28]. This feature makes coarse-graining in the spin network basis quite cumbersome [7,29,30]. Another property of the fusion basis is that it is also valid when one replaces the gauge group with a quantum group (for instance SU(2) k ) and, correspondingly, the fusion category of group representations with the fusion category of quantum group representations. In this latter scenario, the fusion basis involves the so-called Drinfel'd centre of this fusion category.
Topological phases and their possible defects are much less understood in three spatial dimensions than in the lower dimensional case. As part of an ongoing attempt to fill this JHEP10(2018)023 gap [18,25,[31][32][33][34][35][36][37][38][39][40][41][42], the authors proposed in [37] a procedure which lifts a (2+1)d topological phase to a (3+1)d one that is defined on a three-manifold M, with possible excitations along the one-skeleton of a discretization embedded in M. The basic idea is that the one-skeleton can be used to obtain a so-called Heegaard splitting of the manifold M. This Heegaard splitting allows to encode the topology of M onto a Heegaard surface, which is equipped with two sets of curves, namely one-handle curves and two-handle curves. The Hilbert space for the (3+1)d theory can then be obtained by adopting the Hilbert space of a two-dimensional topological theory for the Heegaard surface. One has to furthermore implement constraints that prohibit degrees of freedom associated with the two-handle curves. On the other hand, the one-handle curves are allowed to carry degrees of freedom and as such they describe excitations associated with the chosen one-skeleton.
This strategy was applied in [25] to the Turaev-Viro model [43] for SU (2) k , which can be understood as a quantum deformation of three-dimensional BF theory. This led to a consistent construction of a Hilbert space associated to the Crane-Yetter model -a quantum deformation of four-dimensional BF theory. But this (3+1)d Hilbert space does allow for curvature excitations along the one-skeleton of a discretization. For this reason, one can identify this Hilbert space with the gauge invariant Hilbert space of a quantum deformed SU(2) k lattice Yang-Mills theory. Furthermore, this model displays a beautiful self-duality, 3 see also [41]. This is exhibited by the existence of two bases that are dual to each other: a (quantum deformed) spin network basis which diagonalizes certain invariant combinations of (quantum deformed) electrical flux operators and a dual spin network basis that diagonalizes Wilson loop operators. Both bases are labeled by the same algebraic data, namely the irreducible representations of SU(2) k .
It turns out that both bases can be derived from two different choices of a (2+1)d fusion basis associated to the Heegaard surface. The definition of a fusion basis relies upon a socalled pant decomposition of the corresponding surface. In the case of Heegaard surfaces, there are two natural choices for such a decomposition that are adjusted to the one-skeleton of the triangulation (i.e. the defect structure) or the one-skeleton of the dual complex, respectively. The former yields the dual spin network basis, which encodes curvature excitations, while the latter yields the spin network basis.
These results for the quantum group SU(2) k (which generalize to so-called modular fusion categories) open the question whether a similar dual spin network basis exist in the case of classical groups (which lead to non-modular fusion categories). In this work, we use the same strategy involving Heegaard splittings to arrive at different parametrizations for the gauge invariant Hilbert space of (3+1)d lattice gauge theories. We will see that we regain the spin network basis without any problems, but that we need to provide in general more input to construct a complete dual spin network basis. Therefore, the case of classical groups turns out to be more complicated than for quantum groups. 4

JHEP10(2018)023
We wish here to concentrate on the algebraic aspects and avoid rather involved measure theoretic issues. We thus consider only finite groups. Finite group models can be also used to test coarse-graining algorithms for spin foams and lattice gauge theories [30,44,45]. We follow the strategy of using the Heegaard surface representation of three-dimensional manifolds to obtain convenient representations of the gauge invariant subspace of threedimensional graph connections. To this end we need, to understand the parametrization of the space of flat connection on the Heegaard surface. This allows us to isolate the two-handle constraint equations that will determine the structure of the dual spin network basis. We also show that the strategy of using Heegaard splittings is useful in order to describe the Hilbert space of connections associated to three-dimensional manifolds with boundary. We will see that there are different ways of defining such a boundary, which can be seen to be adjusted to either the spin network basis or the dual spin network basis. The latter gives a more direct description of the excitations. By introducing a notion of cutting and gluing of three-dimensional manifolds and their associated state spaces, we can generalize Ocneanu's tube algebra in order to reveal the algebraic structure of the excitations associated with certain 3d manifolds.
Plan of the paper: in section 2, we illustrate the key mechanism of lifting the fusion basis from two to three dimensions using the simplest possible example, namely a curvature defect along a loop embedded into a three-sphere. This leads to (a simple version of) the spin network basis and the dual spin network basis, and display how these are connected via a so-called S-transform. We encounter the Drinfel'd double of the group and its representations, which we shortly review. We discuss two different parametrizations of the space of locally flat connections on a closed surface in section 3. This understanding of the space of locally flat connections for a surface will be crucial for the lifting procedure and the imposition of the constraints. We review this lifting procedure in section 4 and then consider the lifting of the fusion basis, firstly adapted to the dual graph, and secondly adapted to the one-skeleton of the triangulation. This first case yields the spin network basis. The second case yields a basis describing directly the curvature or magnetic excitations. But we will see that in general we need to specify further observables to obtain a complete basis. We consider explicit examples and determine these additional observables and the label sets that allow to obtain a complete dual spin network basis. We subsequently consider three-manifolds with boundary in section 5. We will see that the Heegaard surface splitting allows in particular for a description of boundaries slicing through the faces and edges of the triangulation (as opposed to the faces and edges of the dual complex). This description allows us to derive a generalization of the so-called quantum triple algebra (itself a generalization of the tube algebra).
group. In both cases this defines a modular fusion category. For the (3+1)d case we have to impose the two-handle constraints onto the fusion basis states. As we mentioned above, if the fusion basis is adapted to the dual graph, this results in the spin network basis. That is the algebraic structure is reduced from the Drinfel'd double to the original fusion category of representations of the group or quantum group, which are non-modular and modular, respectively. We are interested in describing the space of gauge invariant states of a lattice gauge theory defined on the one-skeleton Υ 1 of a three-dimensional cell complex Υ that is embedded into a three-dimensional manifold M. We declare locally flat configurations, that is configurations whose holonomies along all the loops contractible in M are trivial, as vacuum states. Excited states are thus states which have a non-trivial holonomy for at least one contractible curve. We can however render a set of closed curves in M non-contractible by removing an appropriate one-dimensional defect structure. For instance, if we want to produce a new non-contractible loop, we remove the blow-up of a loop, which encircles the first loop, from M. Generalizing this procedure, we can identify the gauge invariant state space of connections on Υ 1 with the space of gauge invariant flat connection on M\ 1 where 1 is the blow-up of the one-skeleton of the complex dual to Υ. In this section, we explain the main concepts we will use in the rest of this work using a simple example: we choose the three-manifold M to be the three-sphere S 3 and consider a closed loop embedded in S 3 as defect structure. By considering a regular neighborhood (or less precisely a blow-up) of this closed loop, we obtain a solid two-torus denoted bẙ T 2 . It turns out that the manifold S 3 \T 2 is also isomorphic to a solid two-torus. This defines a decomposition of the three-sphere as S 3 =T 2 ∪ S 3 \T 2 T 2 ∪T 2 which states that the three-sphere can be obtained as the gluing of two solid tori. This decomposition is referred to as the genus one Heegaard splitting of the three-sphere. The gluing of the two tori is performed along the boundary ∂T 2 of the manifoldT 2 which is by definition homeomorphic to the two-torus T 2 , and defines the Heegaard surface associated to the Heegaard splitting above. Notice that any flat connection in S 3 \T 2 can be mapped to a flat connection on its boundary T 2 . But the space of flat connections on the torus is larger than the space of flat connections on S 3 \T 2 . This is due to a set of curves, generated by a loop parallel to the defect loop, which are non-contractible on the torus but are contractible in S 3 \T 2 . We can thus define the state space of flat connections in S 3 \T 2 by following two steps: (i) Define the state space of flat connections on the surface T 2 . (ii) Impose that the holonomies along the contractible cycles in S 3 \T 2 are flat.
Let us therefore consider the state space of flat connections on the two-torus. The twotorus has two non-contractible cycles 1 and 2 which satisfy the relation 1 triv, where = triv denotes the trivial cycle. These cycles, which are represented in figure 1 are referred to as the meridional and the equatorial cycle, respectively. Let us denote by |g, h T 2 the graph-states defined on T 2 where the group variables g, h ∈ G label the equatorial and the meridional cycle, respectively. The Hilbert space H T 2 of gauge invariant functionals on the space of flat connections on T 2 is then spanned by states 5 5 An inner product on this space can be induced from an inner product g, h|g , h = δ g,g δ h,h on Figure 1. The left panel represents a closed line embedded into the three-sphere. The middle panel corresponds to a regular neighborhood of such closed line which is nothing else than a solid two-torusT 2 . The right panel represents a graph embedded on the boundary of the solid two-torus which captures the two non-contractible cycles.
where [g, h] := ghg −1 h −1 is the group commutator and Z g, is the stabilizer group of the tuple (g, h) under the adjoint action. The averaging over x ∈ G is there to ensure gauge invariance at the single vertex. The dimension of this Hilbert space is given by where it is understood that the group G acts by conjugation.
To obtain the Hilbert space of flat connections on S 3 \T 2 we have to impose that cycles, which are not contractible in T 2 but are contractible in S 3 \T 2 , carry a trivial holonomy. Such cycles are generated by the equatorial cycle labeled by the g-holonomy. Thus the Hilbert space is spanned by states where C denotes a conjugacy class of G. We would have also obtained this basis of states if we had started with a particular 6 fusion basis for the state space associated to the torus T 2 . This basis, which we will present in detail further, is parametrized by a conjugacy class C of G and an irreducible representation R of the stabilizer group Z C of C. This stabilizer group is defined as {g ∈ G | [g, c 1 ] = 1 G } with c 1 being the representative of C. The conjugacy class C characterizes the holonomy h of the meridional cycle and the representation R characterizes the dependence of the state on the equatorial holonomy g.
The alternative basis states are then given by where χ R denotes the character of the representation R of Z C . The states (2.3) can be written as the following linear combinations of these fusion basis states Figure 2. Graphical depiction of the S-transform which sends the graph-state |g, h to |h −1 , g . The matrix elements of this map relates the two fusion bases which can be defined on the two-torus.
where we made use of the well-known identity for finite groups We could have also started with a fusion basis where the conjugacy class C characterizes the equatorial holonomy and R the meridional one. These basis states are given by and are related to the first set of fusion basis states (2.4) via a so called S-transformation. This transformation has a simple geometric interpretation: it is a large diffeomorphism of the torus that exchanges the equatorial with the meridional cycle, see figure 2.
Using this second set of fusion basis states, it is straightforward to implement the triviality of the equatorial holonomy, as it just requires to set C to be the trivial conjugacy class: Here the label R stands for an irreducible representation of the group G (which is the stabilizer of the trivial conjugacy class). Thus, starting from the two possible fusion bases for the torus, we have obtained two different bases for the space of flat connections on S 3 \T 2 . The first basis, which is labeled by a conjugacy class does characterize the (magnetic or curvature) excitation along the defect loop. The second basis is labeled by a representation of the group and can be identified with a spin network basis based on a loop dual to the defect loop. The two bases can be transformed into each other by a restriction of the S-transform to the subspace of flat connections for which the equatorial connection is trivial. In terms of the 3d theory, this leads to a gauge invariant version of the group Fourier transform: (2.10)

Tube algebra and Drinfel'd double
In the previous section, we defined basis states for the Hilbert space of gauge invariant functionals on the space of flat connections on the torus. These basis states were labeled by JHEP10(2018)023 Figure 3. Graphical depiction of Ocneanu's tube algebra. The cylinders are glued by identifying the punctures and the links ending at these punctures are connected. This leads to a new internal two-valent node and a new face (represented in gray on the figure) at which we need to enforce gauge invariance and flatness, respectively. The resulting state is gauge invariant and flat and can therefore be expressed on a minimal graph. The result defines the multiplication rule of the Drinfel'd double.
a pair (C, R) with C a conjugacy class and R an irreducible representation of the stabilizer Z C . In this section, we review how this pair labels the irreducible representations of a wellknown algebraic structure, namely the Drinfel'd double of the gauge group G [46,47]. This algebraic structure arises by considering the gluing of states defined on cylinders [20,21,[48][49][50]. The representation theory of the Drinfel'd double can then be used to define the fusion basis on arbitrary (handle-body) surfaces.
The cylinder surface denoted by I can be obtained from a two-sphere by removing two disks from the surface. In addition, the boundary of each of these disks is required to carry a single marked point (see figure 3). We define a graph on the cylinder, seen in figure 3, which captures the single non-contractible cycle and such that there is an open link ending at each of the marked points. We consider the space of connections for this graph and impose gauge invariance at the four-valent node but do not require gauge invariance at the one-valent nodes. By using a gauge fixing, we can define a basis for such connection states |g, h I where (g, h) ∈ G × G denote the holonomies as represented in figure 3. A general state is then given by ψ = g,h ψ(g, h)|g, h I . (2.11) Two cylinders can be glued to each other such that they give another cylinder. We will now define a gluing of the corresponding state spaces such that the resulting states define again (flat) connection states on the cylinder. This turns the space of connections on the cylinder into an algebra. Let us define the general gluing procedure (see [20,51] for more details). Let Σ A and Σ B be two surfaces, Γ A and Γ B two graphs embedded on Σ A and Σ B , respectively, and H A and H B the corresponding gauge invariant Hilbert spaces of locally flat connections. Both Σ A and Σ B are assumed to have boundaries whose components carry single marked points. The embedded graphs end at these boundaries by at least one open edge. The gluing of the surfaces Σ A and Σ B is a surface Σ A∪B obtained by identifying the boundary of the disks defining the punctures from each one of them, as well as the corresponding marked points. Furthermore, the links of the embedded graphs along which the gluing is performed must be connected. The result is a single embedded graph Γ A∪B . This resulting graph possesses new internal nodes and new closed faces. A connection state for the graph Γ A∪B might therefore not be gauge invariant at these new internal nodes and also not be flat JHEP10(2018)023 at the new internal faces. Therefore, we introduce a projector P which performs a gauge averaging at the internal nodes and multiplies the states with a delta function δ(h f , 1 G ) for each new closed face f . The resulting Hilbert space is denoted H A∪B . Note that states in this Hilbert space can be mapped bijectively to states on a minimal graph for Σ A∪B .
The gluing procedure between states ψ A ∈ H A and φ B ∈ H B is defined to be the projection into H A∪B of the product of the two states: Let us now apply this procedure to the gluing of two cylinders. In this case, the map defines an algebra product since the gluing of two cylinders leads to another cylinder. This algebra is known as Ocneanu's tube algebra [20,21,[48][49][50]. We consider two basis states |g 1 , h 1 I and |g 2 , h 2 I living on two different cylinders. The gluing is graphically depicted figure 3 and the result reads This fundamental result shows that the gluing of two cylinders reproduces the multiplication rule of the Drinfel'd double D(G) whose definition is recalled in appendix A. Once we have identified the algebra, we can ask for the corresponding irreducible linear representations. Physically, the irreducible modules are characterized by observables (identified as charges) that are left unchanged under the gluing. In other words, we can think of the multiplication |g 1 , h 1 I |g 2 , h 2 I as the action of the algebra element g 1 ⊗ δ h 1 on the state |g 2 , h 2 I . We are then asking for observables, which are identified with charges, that are invariant under this action. From the algebra (2.13) we can indeed see that the conjugacy class C of the h-holonomies is preserved. We furthermore see that the algebra reproduces for the g-holonomies the usual group product. We can therefore expect a second invariant observable involving irreducible representations as functions of the g-argument. However, we also have to take into account that the g-holonomies act on the h-holonomies. Indeed, the irreducible representations of the Drinfel'd double ρ = (C, R) are labeled by a conjugacy class C of G and a representation R of its stabilizer group Z C . The matrix elements of these representations can be used to define a new basis for the cylinder states given by (see appendix A for details): Here D ρ M N denotes a matrix element of an irreducible representation ρ of D(G) and d ρ its dimensions. We denote by g ⊗ δ h a basis element of the Drinfel'd double algebra. We will refer to the states |ρ, M N I as the fusion basis states for the cylinder.
By construction the new basis states diagonalize the -product:

JHEP10(2018)023
making explicit that the charges, which are characterized by the representation label ρ = (C, R), are invariant under the gluing. The conjugacy class C describes the magnetic excitation, that is the trace of the holonomy around the cylinder. The representation R (of the stabilizer group of C) characterizes the electric excitation, in the sense that it describes the dependence of the state on the holonomy along the cylinder. When the representation R is trivial, the state is completely gauge invariant and has therefore a vanishing electrical charge. Note that the gluing rule (2.15) can be used to regain the states for the torus, namely by gluing cylinder states. The torus is obtained by identifying the two punctures and the corresponding marked points of a cylinder. After identification, the two one-valent nodes become a two-valent vertex at which the group averaging must be applied. This induces a contraction of the corresponding representation space indices. The flatness is also implemented, as the character has only support on elements g ⊗ δ h for which g and h commute. The resulting state is given by where the explicit expression for the characters χ ρ of the Drinfel'd double can be found in appendix A. Using the explicit formula for the characters, this recovers the states (2.4) defined previously. As a matter of fact, the torus can be obtained from the gluing of a cylinder in two different ways -the gluing can be performed along the equatorial or the meridional cycle. Correspondingly, there is a second fusion basis for the torus which is related by the so-called S-transform to the first one. The states of this second fusion basis are given by This can be used to compute the matrix elements of the S-transform as the transformation which relates these two bases (see appendix B). Applying this transformation to states that satisfy the additional flatness constraint g = 1 G we recover the transformation rules (2.10) between the curvature excitation basis and the spin network basis for the flat connection states on S 3 \T 2 .

Parametrizations for the space of flat connections on 2d surfaces
In the previous section, we illustrated with a simple example our strategy to define Hilbert spaces and bases for the space of flat connections on three-dimensional manifolds with defect structures. This strategy can be summarized as follows: firstly, we define the Hilbert space of gauge invariant functions on the space of flat connections on a two-dimensional surface JHEP10(2018)023 obtained from a Heegaard splitting, which is adjusted to the defect structure. Secondly, we impose that the holonomies along the cycles that are contractible in the three-dimensional manifold with defect structre are trivial. In this section, we focus on the first one of these steps, namely the construction of the Hilbert space of flat connection on two-dimensional surfaces. We will describe two different holonomy parametrizations. The first one gives a global description, whereas the second one, based on a pant decomposition of the surface, is more local. This second description leads to the fusion basis and this is also the one we use to impose the flatness constraints needed for the construction of the 3d state spaces.

Holonomy parametrization
The first parametrization we discuss is based on a minimal set of holonomies. Let Σ be a genus-g two-dimensional surface. It is possible to represent Σ as a sphere with g handles glued to it (see figure 4). More precisely, we can obtain Σ by gluing twice-punctured twospheres (or cylinders) to a 2g-punctured two-sphere. Fixing a base point n b on the sphere, we choose for each handle i an oriented curve that starts and ends at n b and by going along the handle i only. The orientation of the curve induces an orientation for the handle which allows to differentiate between the source and the target punctures on the sphere to which the handle is glued. Furthermore, to every curve going along a handle, we assign a node n i that is located on the curve, as well as another curve starting and ending at n i that goes around this (and only this) handle once. The orientation of this curve is chosen such that it goes anti-clockwise around the corresponding source puncture as seen from the target puncture. The resulting graph is denoted by Γ.
Let us now define a graph connection on this graph Γ by assigning g i -holonomies to the links going from the base point n b to the node n i on the handle i and h i -holonomies to the links going around the handle i from n i to n i . The remaining links, i.e. the links going from the nodes n i to the base point n b , are labeled by a trivial holonomy. This can be understood as a gauge fixing condition for the gauge action at the nodes n i . So far we have defined a graph connection on Γ by assigning a set of group elements . But this connection is not necessarily flat. In order to enforce the flatness constraint, we need to impose that contractible cycles are associated with trivial holonomies. Let us consider the path going around every puncture on the sphere. Such a path can be contracted to a trivial path and therefore the corresponding holonomy must be trivial. This flatness condition can be also understood as imposing the Bianchi identity for the sphere. To give the flatness constraint explicitly we assume that the links from the base point to the handles i can be cyclically ordered around n b , without any crossings, as follows: if we denote by i the link from n b to n i and by i the link from n i to n b the cyclic ordering in the clockwise direction is given by ( 1 , 1 , 2 , 2 , . . . , g , g ). The flatness constraint finally reads  Figure 4. A genus-g two-dimensional hypersurface can be obtained by gluing g cylinders to a 2g-punctured two-sphere. We then define a graph Γ on the surface which captures all the noncontractible cycles. discussed above remains intact: We notice in particular that such simultaneous action by conjugation preserves the flatness constraint (3.1). In summary, the space of flat connections on a genus-g surface is parametrized by equivalence classes such that the flatness constraint (3.1) is satisfied. An inner product can be straightforwardly defined, e.g. by introducing a Hilbert space spanned by states |{g i , h i } g i=1 , and by defining Notice that this inner product is invariant under the adjoint action (3.2). Therefore, one can define an induced inner product on the subspace of wave functions satisfying the constraint (3.1) and invariant under the action (3.2). A similar strategy can be applied for the other holonomy parametrizations which we present below. In this case, one has a larger number of holonomy parameters to begin with and correspondingly has to implement a larger number of gauge invariances and flatness constraints. For this reason, the induced inner products obtained from different holonomy parametrizations might differ by overall factors of |G|.
Let us now present a more local holonomy parameterization for which we employ a more refined graph. This more local holonomy representation will lead us eventually to the Drinfel'd Double parametrization. To define the more refined graph, we use the fact that every two-dimensional Riemann surface can be obtained as a gluing of thrice-punctured JHEP10(2018)023 two-spheres denoted by Y. More precisely, we can decompose a closed surface of genus g with g ≥ 2 into 2g − 2 thrice-punctured two-spheres Y. 7 We label the thrice-punctured spheres by k = 1, . . . , (2g − 2) and we choose a base node n Y k on each sphere. Furthermore, as before, we assign the (3g − 3) cylinders, which are glued to the punctures, with an orientation so that we can define source and target punctures associated to a given cylinder. Source and target punctures are all equiped with a marked point living at the boundary of the corresponding disks. These marked points, which serve as nodes for the graph Γ, are denoted by n I s(a) and n I t(a) with a = 1, . . . , (3g − 3). Putting everything together, we construct the graph 8 Γ together with a graph connection by choosing: • For each of the source s(a) and target punctures t(b) on a given sphere k, a link from the base point n Y k to the marked points n I s(a) and n I t(b) , respectively. We then associate a trivial holonomy to these links, or equivalently we use the gauge freedom at the marked points in order to gauge fix these to the identity.
• For each cylinder a, a link from its source node n I s(a) to its target node n I t(a) . We associate a holonomy g a = g t(a)s(a) to this link and such that the inverse holonomy g −1 a is denoted by g s(a)t(a) .
• For each cylinder a, we define a link around the corresponding target puncture with clockwise orientation (as seen on the target sphere) which starts and ends at n I t(a) . The corresponding holonomy is denoted by h t(a) . Sometimes it is also convenient to consider links around the source punctures with clockwise orientation as seen on the source sphere. Flatness along the cylinder then imposes that the corresponding holonomy reads h s(a) := g −1 a h −1 t(a) g a for these links.
The graph associated with a thrice-punctured two-sphere following these conventions is represented in figure 5.
As before, such a parametrization {g a , h a } 3g−3 a=1 is over-complete since additional constraints and equivalence relations need to be imposed. Firstly, for each sphere there is a flatness constraint, which can be interpreted as the Bianchi identity for this sphere. Consider a sphere k and a clockwise ordering of the links around the base node n Y k given by ((a 1 , o 1 ), (a 2 , o 2 ), (a 3 , o 3 )) where o = s, t denotes whether the puncture is a source or target one, respectively. The flatness constraint is then given by Such expression typically involves g a holonomies via the definition h s(a) := g −1 a h −1 t(a) g a . Moreover, there might be redundancies among the set of flatness constraints, e.g. for a genus three surface one finds only three independent flatness constraints. In general, we find that the number of independent flatness constraints matches the genus of the surface. 7 This simply follows from Euler's formula which states that for a convex three-dimensional polyheron: # loops = # edges − #vertices + 1. Since we are looking for a decomposition into thrice-puncture spheres, we have the additional constraint that 3#vertices = 2# edges . Setting # loops = g, we finally obtain #Y = #vertices = 2g − 2. 8 We do not allow any crossing of the links accept at the nodes. JHEP10(2018)023 Figure 5. Graphical representation of the conventions used to label the holonomies and the nodes of the graph.
Finally, we are looking for equivalence classes under the gauge action at the base node n Y k of every thrice-punctured two-sphere. A transformation with gauge parameters As before, it is always possible to preserve the gauge fixing for the holonomy going from n I a to the marked point of the target puncture. To summarize, we now have a parametrization for a flat graph connection by equivalence classes where the holonomy configurations have to satisfy the flatness constraints (3.5) and the gauge orbits are defined in (3.6). This description can be easily modified by contracting a cylinder, which connect two different spheres, and thus joining these two spheres to obtain a sphere with more punctures. A contraction of a cylinder removes a (g a , h t(a) )-pair from the configuration space -which is consistent as one has also reduced the number of spheres, and thus the number of flatness constraints and gauge actions, by one. We leave it to the reader to show that a contraction of cylinders along a maximal spanning tree (of the spine graph defined by taking the spheres as nodes and cylinders as edges) recovers consistently the minimal holonomy description in (3.3).

Towards the Drinfel'd Double parametrization
The holonomy parametrization as given above is not free in the sense that many flatness constraints remain to be imposed on the holonomies and we still have to factor out the gauge action. Starting from the holonomy parametrization which is based on a decomposition of the genus-g surface into thrice-punctured two-spheres Y, we wish to fix the gauge action and at the same time solve for the flatness constraints associated with the spheres.
Let us first consider the holonomies {h} going around the punctures. The gauge invariance requires the states to be invariant under adjoint action on such holonomies.

JHEP10(2018)023
Therefore, we introduce a gauge invariant characterization in terms of the corresponding conjugacy classes. For each Y, we have three clockwise-ordered punctures labeled by ((a 1 , o 1 ), (a 2 , o 2 ), (a 3 , o 3 )). The corresponding holonomies (h o 1 (a 1 ) , h o 2 (a 2 ) , h o 3 (a 3 ) ) then satisfy the flatness constraint (3.5). A gauge invariant characterization of this triple of holonomies is obtained by using their conjugacy classes ( ). The flatness constraint then select which triples of conjugacy classes are allowed to appear. In order to perform such a selection, it is convenient to introduce fusion coefficients for the conjugacy classes. Let us consider the set The number of orbits the set S splits into under simultaneous adjoint action defines fusion coefficients denoted by N Co 1 a 1 C o 2 (a 2 ) C o 3 (a 3 ) . These coefficients are non-vanishing only when the triple of conjugacy classes is admissible. As the name suggests, we can indeed understand this statement as a condition for the magnetic excitations labeled by C o 1 (a 1 ) and C o 2 (a 2 ) to fuse so as to obtain a magnetic excitation labeled by C o 3 (a 3 ) −1 which is defined to be the conjugacy class of the inverse of any element of C o 3 (a 3 ) . More precisely, the fusion coefficients count the number of inequivalent ways of satisfying such a fusion. In the following, we assume for notational convenience that for each allowed triple of conjugacy classes, there is only one representative triple of holonomies which satisfy the flatness constraint modulo a common adjoint action of the group. This amounts to assuming multiplicity freeness for the associated coupling. 9 Replacing the h-holonomies by their conjugacy classes C h , and allowing for each thrice-punctured sphere only triples of admissible conjugacy classes, is a first step towards a gauge invariant parametrization. Let us now analyze the remaining gauge freedom in more detail.
Let us consider an (ordered) triple of conjugacy classes (C 1 , C 2 , C 3 ) such that the corresponding fusion coefficients are non-vanishing and let us choose a representative (ordered) We denote by Z C 1 C 2 C 3 the stabilizer group with respect to a simultaneous adjoint action of this representative triple. For each Y, we equip the punctures with clockwise ordering and assign each ortiented cylinder with a conjugacy class so that the coupling conditions are satisfied. Assume that we have a configuration {g t(a)s(a) , h t(a) } 3g−3 a=1 consistent with this choice of conjugacy classes. We can use the gauge freedom at each Y to transform each consistent triple of holonomies ) of conjugacy classes. This leaves us with a residual gauge freedom given by the stabilizer groups Z C 1 C 2 C 3 associated with every Y.
So far we have been focusing on the h-holonomies, let us now consider the g-holonomies. More precisely, we want to determine how much freedom is left, after the above gauge fixing, in choosing the g-holonomies. The assignment of conjugacy classes to the cylinders, together with the above gauge fixing, determines uniquely all the h s(a) -and h t(a) -holonomies. For a given cylinder a with conjugacy class C = C a , the choice of holonomy g = g a is re-JHEP10(2018)023 stricted since the identity h −1 s := g −1 h t g need to be satisfied so that it must take the form where z ∈ Z C , the centralizer group of C, and ι C is a labeling function such that q ι C (h) are elements of the quotient group G/Z C satisfying Most importantly, it follows from the previous relation that for each cylinder a, the freedom left in choosing g a is parametrized by the stabilizer group Z Ca of the conjugacy class C a associated with the cylinder. As noted above, we also have a residual gauge action given by the stabilizer groups Z C 1 C 2 C 3 associated with each thrice-punctured twosphere. Finding a completely gauge invariant parametrization for the remaining choice of the g-holonomies leads to the Drinfel'd double parametrization.

The Drinfel'd double parametrization
In section 2.2, we derived a basis for excited states on the twice-punctured two-sphere labeled by Drinfel'd double irreducible representations. These states were obtained via a Drinfel'd double Fourier transform (2.14). Furthermore, we explained earlier how in order to perform the gluing of surfaces, and of the states who live on such surfaces, it was necessary to apply a projector to impose flatness and gauge invariance. This gluing procedure is particularly simple for Drinfel'd double parametrized states (2.14) as it amounts to summing over the vector space indices of the representations at hand. The same strategy holds for more general states.
The Drinfel'd double (or fusion) basis states on the cylinder are labeled by ρ = (C, R) where C is the conjugacy class of the holonomy going around the cylinder and Rdenoting an irreducible representation of the stabilizer group Z C -characterizes the states dependence on the holonomy along the cylinder. In the previous section, we also found that the holonomies around the cylinders can be characterized by their conjugacy class C and that the remaining freedom in choosing the g-holonomies along the cylinders is parametrized by the stabilizer groups Z C associated to each of the cylinders. This suggests that we should indeed assign to each cylinder a Drinfel'd double state and that we should glue or 'fuse' these states at the thrice-punctured spheres connecting the cylinders. This fusion does indeed correspond to a fusion (or tensor) product in the category Rep[D(G)] of finite dimensional representations of the Drinfel'd double (see appendix A for more detailed definitions). That is, we can form the tensor product of two representations where ∆ denotes the comultiplication map (see appendix A). Such coefficients act as an intertwiner between V ρ 1 ⊗ V ρ 2 and V ρ 3 . It is often convenient to use the more symmetric where ρ * 3 denotes the representation dual to ρ 3 , that define the mapping V ρ 1 ⊗V ρ 2 ⊗V ρ 3 → V 0 . By analogy with the group case, we refer to these coefficients as the 3ρM -symbols.
By definition the 3ρM -symbols satisfy an invariance property. Let us for instance consider the situation where the 3ρM -symbols perform the mapping V * In this case, the invariance of the 3ρM -symbols reads (3.13) This can be used to show that the 3ρM -symbols implement the flatness constraint and the gauge invariance when gluing three cylinders states to a thrice-punctured sphere (see [21] for details). For example, figure 5 displays the gluing associated to the configuration of (3.13) where the states |ρ * 1 I and |ρ * 3 I are ingoing while the state |ρ 2 I is outgoing. By convention, the 3ρM -symbols ρ 1 ρ 2 ρ 3 N 1 N 2 N 3 are associated to three outgoing states labeled by ρ 1 , ρ 2 and ρ 3 . This explains why we consider the dual representations ρ * 1 and ρ * 3 in our example. This gluing of three cylinder states via the 3ρM -symbols provides us with the following fusion basis states for the thrice-punctured two-sphere Y: (3.14) From the discussion above, it follows that the flatness (or Bianchi) constraint for the sphere is satisfied and that the gauge invariance at the internal nodes is implemented. Therefore, in order to obtain the fusion basis states for a genus-g surface Σ we proceed as follows: (i) Choose a pant decomposition {Y} of the surface Σ. (ii) Associate with each Y a fusion basis state. (iii) Glue all the fusion basis states together by summing over the corresponding vector space indices according to the pattern of the pant decomposition. In this way, we associate also to each cylinder in the pant decomposition a Drinfel'd double irreducible representation ρ = (C, R). We have furthermore coupling conditions for each triple of representations ρ 1 , ρ 2 , ρ 3 meeting at a sphere which do entail the coupling conditions for the conjugacy classes, that we discussed in the previous section.
The C-labels therefore agree with the parameterization discussed in the previous section. The remaining R-labels denote irreducible representations of the stabilizer groups Z C of C. Indeed, we saw in the previous section that the remaining freedom in the gconnections is parametrized by the stabilizer groups Z C , but that there is also a remaining gauge freedom given by the stabilizer groups Z C 1 C 2 C 3 associated to each thrice-punctured sphere. But the Drinfel'd double basis does encode the g-connection into a spin network, with representation labels conditioned by the C-labels. This spin network description ensures gauge invariance with respect to the remaining gauge freedom given by the stabilizers Z C 1 C 2 C 3 . Note finally that this construction also applies to 2d surfaces with boundary since it is still possible to obtain them as a gluing of thrice-punctured two-spheres Y.

JHEP10(2018)023
4 Lifting procedure to the (3+1)d case We can now construct the state spaces for flat connections on manifolds M with a defect structure. The first step of this construction consists in applying the previous procedure to define the Hilbert space of flat connections H Σ H on a two-dimensional surface Σ H , obtained from a Heegaard splitting of a three-manifold M, adjusted to the defect structure. By imposing further constraints on the states in H Σ H , we obtain a Hilbert space of flat connections which can describe magnetic (or curvature) excitations attached to the chosen defect structure. Here we assume that the defect structure is given by the one-skeleton of a triangulation. The construction is however easily generalizable to other lattices.

Heegaard splitting
A Heegaard splitting [52] is a decomposition of a compact three-manifold M into two handlebodies M 1 and M 2 such that M = M 1 ∪ M 2 . This splitting is performed along the so-called Heegaard surface Σ H , that is Σ H is the boundary of each of the two handlebodies One way of obtaining such a splitting is via a triangulation. Let be a trianguation of M and 1 its one-skeleton, i.e. the union of its vertices and edges. We then consider the regular neighbourhood 1 of 1 obtained by blowing-up the vertices and edges into a union of 3-balls and solid cylinders, respectively. This regular neighbourhood provides the first handlebody M 1 1 and M 2 is defined as its complement in M i.e. as M\ 1 . The surface of this regular neighbourhood defines the Heegaard surface Σ H ( ) associated with the triangulation . Similarly, we can consider the regular neighbourhood of the dual graph Υ to the triangulation, which is homeomorphic to M 2 defined above, that is the complement of the regular neighbourhood of the one-skeleton 1 in M. The surface of the regular neighbourhood of the dual graph is homeomorphic to Σ H ( ).
Let us now consider a graph Γ embedded on Σ H ( ) which captures the non-contractible cycles of the fundamental group π 1 (Σ H ( )) of Σ H ( ). We distinguish on the Heegaard surface Σ H ( ) two sets of closed curves, which we denote by {C t } and {C e }. The first set {C t } t⊂ consists of the curves around the triangles, that is each triangle t contributes a curve t ∩ Σ H ( ). The second set {C e } e⊂ is given by the curves around the edges e of the triangulation, that is for each edge we choose a disk d e (of appropriate size) intersecting the edge e transversally and consider the curve d e ∩ Σ H ( ). The set {C t } t⊂ generates all curves that are contractible in M\ 1 but are not contractible in 1 . Note that, as far as this generating property is concerned, the set {C t } t⊂ is in general over-complete. In terms of the holonomies associated with these curves, this over-completeness leads to one Bianchi identity for each of the 3-simplices of . (The Bianchi identities may themselves be over-complete.) Conversely, the set {C e } e⊂ generates all curves that are contractible in 1 , but not in M\ 1 . Again, this set is often over-complete which now leads to Bianchi identities associated with the vertices of the triangulation.
Let us now describe the space of flat connections on M\ 1 using the Heegaard surface Σ H ( ): we do so by considering the Hilbert space H Σ H ( ) and impose on this space additional flatness constraints. These flatness constraints demand that the holonomies along h t (12) h t(24) h t (34) h t (14) h t (13) h t(23) g We discussed in section 3.2 that for the definition of a fusion basis on Σ H ( ), we need to choose a pant decomposition for this surface. In the following, we consider two classes of such pant decompositions, which are adjusted to the one-skeleton 1 of the triangulation and the one-skeleton Υ 1 of the dual cell-complex, respectively. 10 This is reminiscent of the fact that when blowing-up the one-skeleton of the triangulation , the blown-up edges form one-handles while the blown-up triangles form two-handles. 11 This task is straightforward in the finite group case as the subspace of states satisfying the constraints is a proper subspace of H Σ H ( ) . For Lie groups the two-handle constraints are given by delta functions on the group. If one chooses a measure for H Σ H ( ) constructed from the Haar measure on the group, wave functions satisfying these constraints will not be normalizable with respect to the inner product of H Σ H ( ) . Thus the space of solutions has to be equipped with a new inner product. Several methods are available [53][54][55] for the construction of such inner products. We will see that we regain the spin network basis, which is also well defined for the Lie group case and thus we expect that a suitable procedure can be found. Another possibility is to consider a discrete measure for H Σ H ( ) , which in fact arises if one wishes to work with continuum Hilbert spaces [6,8,9]. In this case the spectrum of the two-handle constraints will be discrete and thus the solutions to the constraints will be normalizable.

The spin network basis
In this section, we consider the case of a pant decomposition adjusted to Υ 1 , that is the one-skeleton of the dual complex to the triangulation. We show that in this case the twohandle constraints just pick out a subset of the fusion basis states in H Σ H ( ) , and that this subset agrees with the (gauge invariant) spin network basis [12] for lattice gauge theory and loop quantum gravity.
Such a pant decomposition can be obtained by first cutting the surface Σ H ( ) along the triangle curves {C t } t⊂ . This decomposes the surface into four-punctured spheres, each one of them being associated with a tetrahedron of the triangulation. These spheres are connected by cylinders that surround the edges of the dual graph Υ 1 . Each fourpunctured sphere can then be decomposed -in one of the three possible ways -into two thrice-punctured spheres in order to obtain a pant decomposition. The fusion basis associated with such a pant decomposition assign labels (C e * , R e * ) to each dual edge e * = t. Furthermore, to each vertex v * dual to a 3-simplex of the triangulation, we assign a pair of labels (C v * , R v * ) which are associated to the virtual cylinders connecting the pairs of thrice-punctured spheres resulting from decomposing the four-times-punctured ones.
The C e * -labels provide the conjugacy classes associated with the holonomies going around the dual edges, that is around the triangles of . This means that the two-handle constraints are satisfied if and only if {C e * = {1 G }} for all the dual edges e * . Imposing these conditions, each of the thrice-punctured spheres will have two punctures carrying labels with a trivial conjugacy class. It then follows from the fusion coefficients for the conjugacy classes that the conjugacy classes associated with the remaining punctures must be trivial as well, i.e. {C v * = {1 G }} for all dual vertices v * . 12 Since all the conjugacy classes are trivial, the corresponding stabilizer groups always coincide with the full group G and a fortiori the representation labels {R} stand for irreducible representations of this group. In summary, we have G-representation labels {R e * } associated with the edges of the dual graph together with representation labels {R v * } associated with the dual vertices. This latter set can be interpreted as labels for the four-valent intertwiners associated with the dual vertices, that is the tetrahedra of the triangulation. 13 We have therefore reconstructed the spin network basis [12]. This can be easily confirmed by considering the Drinfel'd double Fourier transform defined in (2.14) for trivial conjugacy classes. Indeed, it follows from equations (A.8) and (3.11) that the irreducible representations and the Clebsch-Grodan coefficients for D(G) reduce to the ones for the group G if all the conjugacy classes are trivial. 12 The argument generalizes also to lattice with three-dimensional building blocks which have more than four faces: a three-dimensional building block with n faces is dual to an n-valent vertex. This n-valent vertex can be extended into a three-valent tree graph with n leaves, which represent the faces of the building block and (n − 3) internal edges which represent virtual cylinders. The two-handle constraints impose a trivial conjugacy class for all leaves. The fusion rules then impose that the conjugacy classes for the virtual cylinders are also trivial. 13 Remember that we assumed multiplicity freeness for the tensor product of two Drinfel'd double representations, which implies multiplicity freeness for the tensor product of two group representations.

The dual spin network basis
Let us now consider the case of a pant decomposition adjusted to 1 , that is the oneskeleton of the triangulation. In this case, the projection procedure is far more involved. A pant decomposition associated with 1 can be obtained by cutting the Heegaard surface along the set of curves {C e } e⊂ . By doing so, we associate with each m-valent vertex of the triangulation an m-times-punctured sphere. We can again freely decompose these m-times-punctured spheres into thrice-punctured ones. In order to discuss the imposition of the two-handle constraints, we make use of the parametrization of the space of flat connections developed in section 3.1 and 3.2.
Let us first briefly recall the definition of the holonomies used in the parametrization of the space of flat connections. In particular, we want to clarify their meaning for the pant decomposition at hand. We start from the picture where to each oriented cylinder a appearing in the pant decomposition we associated a holonomy h t(a) and a holonomy g a = g t(a)s(a) . This determines another holonomy associated with the source puncture of the cylinder whose expression reads h s(a) = g −1 a h −1 t(a) g a . A subset of cylinders can be identified with the edges of the triangulation. We choose an orientation for these edges and denote the corresponding cylinders by e instead of a. The remaining cylinders are associated with the vertices of the triangulation. For each m-valent vertex of , we have (m − 3) pairs of variables (h t(v,j) , g v,j ) m−3 j=1 arising from the decomposition of the associated m-punctured spheres into thrice-punctured ones. The h t(v,j) variables give the holonomies around certain sets of edges starting from the same vertex v. The g v,j variables complete the information about the parallel transport on the punctured spheres, so that the set of g-holonomies provide a graph connection along the blown-up one-skeleton 1 . Note that is important to keep track of how the g-holonomies wind around the punctures of a given sphere.
The set of holonomies we just described is supposed to define a flat connection on Σ H ( ). This set is therefore subject to constraints that are given in terms of the Bianchi identities for the thrice-punctured spheres. As explained in section 3.2, the Bianchi identities are imposed by associating to each cylinder a = e or a = (v, j) conjugacy classes C a so that the coupling conditions for the conjugacy classes are satisfied. Furthermore, we need to enforce the two-handle constraints in order to project the states in H Σ H ( ) onto the Hilbert space H M\ 1 . In order to identify which holonomies are set to the identity, we need to consider, for each triangle t ⊂ , the triangle curve C t and isotopically deform this curve so that it matches a path along the chosen graph Γ on Σ H ( ). Since the triangle curves necessarily go along the edges of the triangulation, the two-handle constraints must involve the g-holonomies. However, in order to obtain paths which are isotopically equivalent to the triangle curves, it might be necessary to include some windings around the punctures. In such cases, the two-handle constraints also involve some h-holonomies.
We described in section 3.2 how, given a consistent set of conjugacy classes {C a } a , we can construct a partial gauge fixing which determines uniquely all the h-holonomies. This partial gauge fixing is such that g a -holonomies are restricted to be of the form

JHEP10(2018)023
where the remaining freedom is parametrized by z a ∈ Z Ca and q ι C (h) is defined as in (3.9). Henceforth, we will make use of the shorthand notation q ιa ≡ q ι Ca (ht) and q ι a ≡ q ι Ca (h −1 s ) . Recall finally that when performing the partial gauge fixing, for a given consistent set of conjugacy classes {C a } a , there is some remaining gauge freedom given by the stabilizer groups Z C 1 C 2 C 3 associated with the thrice-punctured spheres. For a given configuration {C a } a of conjugacy classes, we thus understand the two-handle constraints as (flatness) conditions on the variables {z a ∈ Z Ca } a . We distinguish three possible scenarios: (1) The two-handle constraints admit no solution, in which case we have to exclude the configuration {C a } a . In this case we have to conclude that a basis state with a curvature configuration {C a } a does not exist.
(2) The two-handle constraints admit a unique solution modulo the gauge action given by the stabilizer groups Z C 1 C 2 C 3 associated to the thrice-punctured spheres. In this case we can conclude that there is a unique state peaked on a curvature configuration {C a } a .
(3) There are several (left-over gauge) orbits satisfying the two-handle constraints so that we need to introduce additional quantum numbers {Q I } I which label such orbits. For instance, one can define closed holonomy operators O I , i.e. operators measuring the conjugacy class of holonomies associated to certain loops, that differentiate between these orbits.
One would expect the scenario (3) to occur for manifolds M with non-trivial π 1 (M), in particular for the case of vanishing magnetic excitations {C a = {1 G }} a for all a. In this case, we should still be left with the space of flat connections described by homomorphisms of π 1 (M) into G (modulo the adjoint action). Conversely, for a trivial π 1 (M), one would find a unique basis state with configuration {C a = {1 G }}. We will however see that the cases (3), and (1) do appear also for triangulations of the three-sphere. In the case where (1) appears, we can interpret the absence of the corresponding configuration of conjugacy classes {C a } as an additional coupling rule.
In general, it is difficult to predict which of the three scenarios does occur. The examples show that this might depend on the structure of the group, the topology of the manifold as well as the defect structure. A first indication can be obtained by comparing the number of elements in the spin network basis and the number of admissible curvature configurations {C a } a . But even if these numbers match, it is not guaranteed that scenario (2) applies, as this might also happen if both cases (1) and (3) appear.
In order to distinguish the different solutions appearing in case (3), we have to add additional (gauge invariant) observables {O I } I . These can be chosen to be conjugacy classes of cycles which involve the g-holonomies. For instance, if M has non-trivial topology, we can choose cycles along the Heegaard surface that generate π 1 (M), and we can pick as observables the conjugacy classes of the holonomies associated to these cycles as well as products of these cycles. One can however also construct more local observables that capture gauge invariant information about the g-holonomies. Let us assume that there are solutions to the two-handle constraints that differ in their g a value for a particular JHEP10(2018)023 cylinder a, which goes between two spheres s(a) and t(a). In this case, we can consider the conjugacy class of the holonomy g −1 a h T g a h S , where h S is a holonomy around a cylinder b adjacent to the sphere s(a) and h T is a holonomy around a cylinder c adjacent to the sphere t(a). The basis states can then be expressed as where Θ C (•) is the characteristic function of C and N ({C}) a suitable normalization constant.

Examples
In this section, we present several examples of our construction based on Heegaard splittings. In order to perform the computations explicitly, we consider the non-abelian group of permutations of three elements denoted by S 3 .

Preliminary: symmetric group S 3
The symmetric group S 3 is the simplest example of finite non-abelian group. It is the symmetry group of an equilateral triangle. This group is generated by a rotation with a 2π/3 angle as well as a reflection with respect to any of the three medians. The groups associated with these two generators are the cyclic groups Z 3 and Z 2 , respectively. We denote the generators of Z 2 and Z 3 by r and s, respectively, such that r 2 = 1 and s 3 = 1.
The six group elements of S 3 are therefore given by which are defined with respect to the following conjugacy class representatives: c 1 (T ) = 1, Recall that the fusion coefficients for the conjugacy classes are defined as the number of orbits the set splits into under simultaneous adjoint action. For S 3 there are 11 non-vanishing fusion rule coefficients for which there exists a triple (h 1 , h 2 , h 3 ) of group elements with h i ∈ C i and h 3 h 2 h 1 = 1. Furthermore, for the group S 3 it holds that for a given (C 1 , C 2 , C 3 ) all such triples of group elements are related by a common adjoint action transformation. Therefore, there is a one-to-one correspondence between each ordered triple (h 1 , h 2 , h 3 ) satisfying the flatness condition and the corresponding triple of allowed conjugacy classes (C 1 , C 2 , C 3 ). We summarize in the following table these 11 configurations: Let us finally discuss the irreducible representations of S 3 . There are three irreducible representations. This includes the trivial one R = 0. The sign representation R = 1 is one-dimensional and gives D R=1 (g) = ±1 depending on whether g is even or odd. Then there is the two-dimensional defining representation R = 2, which derives from the group of rotations and reflections O(2) in two dimensions. There are also 11 possible couplings between these representations as can be seen from the following table:

Genus-2 defect
In section 2, we considered the simplest example of our construction, namely a loop defect embedded in the three-sphere. A slightly more complicated example consists in a genus-2 defect embedded in the three-sphere. JHEP10(2018)023 Figure 7. Example of embedded graph on a genus-2 surface.
Let us consider a graph embedded in S 3 which consists of three edges and two vertices so as to form a θ-shape. By blowing-up this graph we obtain a double torus which defines the Heegaard surface Σ H ( ). The Heegaard surface splits the three-sphere into the blow-up 1 of this graph, which gives a solid double torus, and the complement S 3 \ 1 , which happens to be also a solid double torus. This defines the genus-2 Heegaard splitting of the threesphere. We represent in figure 7 the Heegaard surface together with an embedded graph.
We define a graph connection for the graph in figure 7 by specifying three pairs of group elements {(g a , h a = h t(a) )} 3 a=1 . The group elements for the remaining links are gauge fixed to 1. To obtain a flat connection, we need to impose the Bianchi identities for the two spheres. We can use one of the Bianchi identities to solve for h 3 so that we are left with the following global Bianchi identity We can furthermore gauge fix g 3 = 1 which leaves us with a residual gauge action, given by the diagonal adjoint action on the configurations (g 1 , h 1 , g 2 , h 2 ). The two-handle constraints g 1 g 2 = 1 and g −1 2 g 3 = 1 fix g 1 = 1 and g 2 = 1. These solutions do also satisfy the Bianchi identity (4.8). Consequently, we are only left with the parameters (h 1 , h 2 ) which are subject to a diagonal adjoint action. The corresponding 11 (for S 3 ) equivalence classes are in one-to-one correspondence with the admissible triples of conjugacy classes (C * 1 , C 2 , C 3 ) (considering the vertex where the a = 1 cylinder is outgoing). These conjugacy classes encode the values for the Wilson loop observables going around each of the edges of the defect structure given by the θ-graph.
We noted above that the complement of the double torus in the three-sphere is again a double torus. Therefore, the corresponding dual graph is also given by a θ-graph. We can use a similar parametrization of the space of flat connection on the surface surrounding this dual graph as before, but now the two-handle constraints demand that h 1 = h 2 = h 3 = 1.
We are thus left with the g-holonomies, for which we have to impose gauge invariance. Using the corresponding Drinfel'd basis, the two-handle constraints impose that all conjugacy classes are trivial. We remain with the R-labels, which are now irreducible representations of the full group, and define a spin network for the θ-graph. This spin network basis does indeed give a complete gauge invariant basis for the space of g-connections. For the group S 3 , there are 11 spin network states for the θ-graph, which is consistent with the number of states in the dual spin network basis.

Defects along a tetrahedral skeleton
Let us now consider a tetrahedron embedded into the three-sphere. We then perform a Heegaard splitting of the three-sphere such that the Heeagaard surface Σ H ( ) is obtained as the blow-up of the one-skeleton of the tetrahedron. The result is a genus-3 two-dimensional surface which we equip with a flat connection. By performing a pant decomposition, we obtain Σ H ( ) as a gluing of four Y associated with the vertices of labeled by k = 1, . . . , 4. For each sphere, we choose a base node n k . The spheres are glued to each other via tubes labeled by a = 21, 31, 41, 32, 42, 43, where we choose the sphere with the smaller label to be the source of the tube. Each tube intersects its source and target Y at punctures which possess a marked point on their boundary. These marked points define the nodes n s(a) and n t(a) . Between these nodes, we have a link going from n s(a) to n t(a) . Furthermore, for each sphere k we choose a link from the base node k to all the n s(a) and n t(a) on this sphere. Finally, we choose links going around (clockwise on the punctured spheres) both ends of each tube that start and end at n s(a) and n t(a) , respectively. Putting everything together, we obtain a graph Γ on Σ H ( ). These conventions are summarized in figure 5.
We can now define a flat connection on Σ H ( ) by assigning group elements {g a } to each link running along the cylinders a from n s(a) to n t(a) , as well as holonomies {h t(a) } going along the links encircling the target punctures of the cylinders. The holonomies from n k to the adjacent n s(a) and n t(b) are gauge fixed to the identity by using the gauge freedom at these latter nodes.
Following this procedure, we obtain a parametrization which depends on six pair of group elements {g a , h t(a) }. This parametrization is over-complete since, on the one hand, there is a remaining gauge freedom for the base nodes {n k } and, on the other hand, the Bianchi identity holds at each Y. To express this systematically, it is convenient to introduce the holonomies around the source puctures of the tubes, namely {h s(a) = g −1 a h −1 t(a) g a }. For instance, for the sphere nr. 1 one has Using the Bianchi identities for the spheres k = 1, 2, 3 we can solve for h t (41) , h t (42) and h t (43) in terms of h t (21) , h t (32) , h t(31) and the g-holonomies. We are then left with the Bianchi identity for the remaining sphere. The resulting parameterization still has some gauge freedom. This can be almost completely gauge fixed by imposing for instance the conditions g 41 = g 42 = g 43 = 1. Putting everything together, we are left with a parametrization in terms of three h-variables and three g-variables. There is a residual gauge action, which is the diagonal adjoint action, and one remaining Bianchi identity With this parameterization on the space of flat connections at hand, we can impose the two-handle constraints -that is the constraints that impose flatness for the holonomies around the triangles of . There are four triangles but, due to the Bianchi identity for the tetrahedron, we have only three independent constraints. Furthermore, with our choice JHEP10(2018)023 of graph, these constraints involve only g-holonomies, e.g. for the triangle (124) we have g −1 41 g 42 g 21 = 1. With our gauge fixing we have a unique solution to these flatness constraints given by g a = 1 for all a. This does also solve the remaining Bianchi identity (4.10).
Imposing the two-handle constraints leads to a first parametrization of the state space of flat holonomies on the three-sphere with a tetrahedral defect structure: it is given by (ordered) triples of group elements (h t (21) , h t (32) , h t(31) ) up to a global adjoint action. For the group S 3 there are 49 such equivalence classes. Therefore, the Hilbert space describing the 3d connections possesses 49 basis states.
We now would like to derive a more local parametrization, which would in particular allow us to read off directly the curvature (or magnetic charge) associated with each edge of the tetrahedral skeleton. As in the case of the genus-2 defect structure, we could hope that labeling the edges a of the tetrahedron with the conjugacy classes C a of the holonomies h t(a) gives a one-to-one parametrization of the set of equivalence classes described above. These C a would naturally have to satisfy the coupling rules (4.6) at each vertex of the tetrahedron. However, it turns out that the number of all such configurations allowed by the coupling rules is only 47. Therefore, such a parameterization would not be sufficient to capture the entire space of 3d connections.
To investigate in more detail the failure of the parametrization by the conjugacy classes, we reconstructed explicitly the admissible configurations of the six holonomies {h t(a) } and their conjugacy classes {C a }. This revealed that the parametrization in terms of conjugacy classes fails because there is one configuration of conjugacy classes {C a }, which is allowed by the coupling rules but for which there does not exist a g-connection satisfying the twohandle constraints (case (1) in section 4.3). Furthermore, we have three other configurations of conjugacy classes {C a } which modulo residual gauge transformation admit two such gconnections (case (3)). For all other (43) configurations there exists a unique (modulo residual gauge transformation) g-connection satisfying the two-handle constraints (case (2)). Let us illustrate this by providing explicit examples.
Case (1): this appears for the configuration where each edge of the tetrahedron is labeled by the conjugacy class E of even elements. Thus for each vertex we have a triple (E, E, E) of conjugacy classes and we choose as representatives the triple (s, s, s) of holonomies. The coupling condition is obviously satisfied since s 3 = 1. Such a choice of configuration means that all the h s(a) -and h t(a) -holonomies are given by the group element s. The question is whether we can find values for the g a -holonomies, such that (i) h s(a) = g −1 a h t(a) g a , and (ii) the two-handle constraints hold. As explained in section 3.2, in order to satisfy (i), the g a -holonomies need to be of the form where z a belongs to the stabilizer Z E = {1, s, s 2 } and q ι Ca (ht) = q ι E (s) = 1. The problem arises as we also have q ι Ca (h −1 s ) = q ι E (s −1 ) = q ι E (s 2 ) = r since s 2 = rsr −1 . From this, we can conclude that the g a -holonomies are necessarily odd elements. This prevents us from satisfying (ii), that is the two-handle constraints, as these require that a product of three g-holonomies is equal to the identity. Thus we cannot find a g-connection satisfying the JHEP10(2018)023 . We choose as representative of such a triple the configuration (r, s, rs 2 ). The stabilizer group of this triple of group elements, under the diagonal adjoint action, is given by the trivial group {1}. By demanding that the h-holonomies on each thrice-punctured sphere (with some chosen ordering in clockwise direction) are given by the triple (r, s, rs 2 ), we have therefore completely fixed the gauge.
We need now to determine the number of solutions for the g-connections satisfying the two-handle constraints as well as the condition h s(a) = g −1 a h t(a) g a for each edge a. Considering the flatness conditions for just one triangle, e.g. the triangle (1, 3, 4), one finds two possible solutions for the g-holonomies associated to the adjacent edges. These JHEP10(2018)023 two solutions extend to two different global solutions, which we display in figure 8. We can choose an (gauge invariant) observable with distinguishes between these two different solutions. Such an observable is given by the conjugacy class of g −1 41 h t(43) g 41 h s (21) and could be interpreted as local observable, as it involves the holonomies of one tube and the adjacent spheres only. This observable happens to distinguish the two solutions for all three degenerate configurations of h-conjugacy classes.
In summary, we saw that the case of a tetrahedral skeleton embedded into the threesphere already showcases that the parametrization which attaches conjugacy classes to the edges of the skeleton is not sufficient. However, in order to obtain a complete parametrization, we only needed to add one further gauge invariant observable. This observable combines the holonomies associated to one tube and its two adjacent punctured spheres, and in this sense can be considered to be local. The resulting set of parameters is subject to coupling rules: firstly, we have the coupling rules which arise from the Bianchi identities associated to the punctured spheres, which are already imposed in the fusion basis for the Heegaard surface. Secondly we have additional coupling rules which arise from the two-handle constraints. As we have seen, these constraints suppress one configuration of conjugacy classes that is a priori allowed by the Bianchi identities. Furthermore, we found that the value of the added observable is in most cases uniquely determined by the initial set of conjugacy classes and can take only two values for three configurations of this set.

Three-torus
We finally consider an example where the 3d manifold, into which the defect structure is embedded in, has a non-trivial topology. We take this 3d manifold to be a three-torus, which can be discretized as a cube with periodic boundary conditions. Due to the periodic identification of the various elements, this lattice has only three faces, three edges associated with the three non-contractible cycles, and one six-valent vertex. We allow for curvature defects along the edges of this one-cube lattice. We are thus interested in the space of flat connections on the three-torus with a thickening of the one-skeleton of the one-cube lattice removed.
The surface of the thickening of this one-skeleton defines a Heegaard surface for the three-torus. A convenient representation of this surface is shown in figure 9. The sphere surrounding the one vertex with its six punctures is represented as a disk with five punctures, with the boundary of the disc defining the sixth puncture. Pairs of punctures (i, i+1) with i = 1, 3, 5 are connected by tubes (or one-handles) and we have therefore a genus-3 surface. We can find a parametrization of the space of flat connections on this surface by choosing a base node n 0 , links from n 0 to the marked points n i , i = 1, . . . , 6 of the six punctures, links around the punctures starting and ending at n i , and links along the tubes from n i to n i+1 (see figure 9).
We associate holonomies h i , i = 1, . . . , 6 to the (clockwise) links around the punctures and holonomies g i+1,i to the links from the puncture i = 1, 2, 3 to the puncture (i + 1). Furthermore, holonomies from the base node n 0 to the marked points n i are gauge fixed to the identity. Finally, the holonomies {h i } are not independent since  Figure 9. The three-torus can be discretized as a cube with opposite faces identified so that the discretization contains one six-valent vertex, three edges associated with the non-contractible cycles and three faces. The Heegaard surface is obtained by blowing-up the one skeleton of this discretization so that the single vertex becomes a six-times-punctured two-sphere as represented on the left panel. The edges are blown-up into cylinders that connect the punctures 1 to 2, 3 to 4 and 5 to 6, respectively. The same object is depicted in a different representation on the right panel as a disk with five punctures, the boundary of the disk corresponding to the sixth puncture. In this representation, the of a given puncture is identified with the ⊗ of the puncture at the other end of the corresponding cylinder. The dashed line represents the intersection of the Heegaard surface with the face going through the punctures 1, 2, 3 and 4.
We have therefore a parametrization of the space of flat connections on the genus-3 Heegaard surface by three pairs of holonomies {h i , g i+1,i } i=1,3,5 . This set of holonomies is subject to the Bianchi constraint associated with the six-times-punctured sphere We have furthermore a left-over gauge action at the base node n 0 , that results into a diagonal adjoint action on the set {h i , g i+1,i } i=1,3,5 .
We can now consider the two-handle constraints, which demand that the holonomies around the faces of the cube are flat. At this stage, some care needs to be taken in determining a path that is homotopy equivalent to the intersection of the Heegaard surface with the faces, see figure 9. It turns out that such a path does not only involve links along the tubes but needs also to wind around one of the remaining punctures. Thus, each of the three two-handle constraints involves one of the h i -holonomies and can be used to fix these h i -holonomies in terms of commutators of the corresponding g-holonomies: (4.14) These relations impose automatically the Bianchi identity (4.13). We have thus reached a parametrization of the space of flat connections on the 3-torus with the one-skeleton of JHEP10(2018)023 the one-cube lattice removed, which is given by three holonomies {g 21 , g 43 , g 65 } modulo a diagonal adjoint action. For the group S 3 this amounts to 49 configurations (the same number as for the tetrahedron).
In the case of the three-torus, the holonomies {g i+1,i } encode global topological observables, i.e. they are associated with paths that are topologically non-trivial even without removing the blown-up one-skeleton of the discretization. Due to the small lattice, it turns out that these observables also determine completely the holonomies around the edges of the cubical discretization. Nevertheless, in order to illustrate the effects of a non-trivial underlying three-dimensional manifold, we discuss what happens if we seek a more local parametrization.
To this end, we choose to include the conjugacy classes of the h-holonomies as parameters. Note that so far, we introduced the h-holonomies h 1 , h 3 , h 5 , but we also have the set h 2 , h 4 , h 6 whose conjugacy classes coincide with those of h 1 , h 2 and h 3 , respectively.
To gain more gauge invariant information about the h-holonomies, we also consider the conjugacy classes of certain products of these h-holonomies: This choice defines one way to split the six-times-punctured sphere, which resulted from blowing up the one vertex of our cubical lattice, into four thrice-punctured spheres, by including virtual cylinders. The set {C 35 , C 351 , C 62 } provides the conjugacy classes of the holonomies around these virtual cylinders. We already know that the tree-torus has a degenerate vacuum, that is we have non-trivial flat connections on the three-torus even if all the h-holonomies, which describe the (curvature) defect excitations, are trivial. Thus the parameters {C 1 , C 3 , C 5 , C 35 , C 351 , C 62 } alone fail to give an effective description for the periodically identified cubical lattice. Studying the matching of the connection configurations and these parameters in more detail, we see that both the cases (1) and (3) listed in section 4.3 appear.
Recall that case (1) refers to the impossibility of finding g-connections satisfying the two-handle constraints for certain configurations of conjugacy classes which are allowed by the coupling rules. This is evident from the form of the h-holonomies (4.14) in terms of the g-holonomies: if a given h-holonomy includes a g-holonomy, it must include its inverse as well. Therefore, all h-holonomies have to be even elements. Thus the conjugacy class C = O of odd elements cannot appear as a value for any of the parameters We also have occurences of case (3), in which there are several equivalence classes of g-connections for a given configuration of conjugacy classes for the h-holonomies. As we have already mentioned, the vacuum sector is degenerate for the three-torus. There are 21 equivalence classes of g connections consistent with a trivial h-holonomy configuration. This is the number of locally flat connections on the three-torus for the group S 3 . Such degeneracies also appear if we have non-trivial values for the set of h-conjugacy classes. Since the conjugacy class O of odd elements cannot appear for the h-holonomies, the only JHEP10(2018)023 possibilities are the trivial conjugacy class T and the conjugacy class E of even elements. It turns out that the degeneracy is completely determined by how many of the six parameters {C 1 , C 3 , C 5 , C 35 , C 351 , C 62 , } take on the value E. Configurations with only two such parameters are not allowed, configurations with three or four such parameters have a three-fold degeneracy, and configurations with five or six such parameters admit a unique g-connection.
As for the tetrahedron, it is possible to add further gauge invariant observables to the parameterization in order to resolve the degeneracies. In the case of the three-torus, we know that the g-connection can be non-trivial due to the non-trivial topology and it makes therefore sense to add global information about this g-connection. For instance, we can choose to add the conjugacy classes C g 21 , C g 43 , C g 65 and C g 21 g 43 , C g 43 g 65 , C g 21 g 65 . This does indeed get rid of all degeneracies. This comes of course at the price of over-parametrization. More precisely, this adds a number of additional coupling rules that determine which values for the g-conjugacy classes can appear, depending on the values for the h-conjugacy classes The example we have considered here is of course extreme, as the lattice is so small that all the holonomies are determined by global parameters, namely the holonomies associated to the non-contractible cycles of the three-torus. With a more refined lattice, we expect the local parametrization to be more efficient. Of course, in the case of a non-trivial topology for the three-manifold carrying the defects, we will always have to take into account the non-triviality of the vacuum sector.

Three-manifolds with boundary: cutting and gluing
In this section, we consider a generalization of the previous construction where the threemanifold carrying the defects is allowed to have a boundary. More precisely, we discuss two kinds of cutting procedure for three-manifolds with defects: the first one is adapted to the spin network basis and is often used for the electric centre definition of entanglement entropy [51,[56][57][58][59][60][61]. The second one is rather adapted to the dual spin network basis and can be used for a magnetic centre definition of entanglement entropy [58] for (3+1)d lattice gauge theories. (See [51] for a magnetic centre definition in the (2+1)d case.) We will see that the holonomy description introduced with the Heegaard surface provides an efficient way to describe such cuttings.

Cutting
In order to account for a boundary, we can proceed as follows. We start from a closed manifold with a given defect structure and its corresponding Heegaard surface. As a two-dimensional Riemann surface, this Heegaard surface can be obtained as a gluing of punctured two-spheres along tubes. We then cut the 3d manifold transversally through the tubes. 14 As a result of this cutting, the Heegaard surface is now decomposed into two or more surfaces with punctures.

JHEP10(2018)023
As before, in order to reconstruct a 3d interpretation for these Heegaard surfaces with boundary, we need to specify which curves are contractible in the embedding threemanifold. The holonomies along these curves are then constrained to carry a trivial holonomy. We distinguish two different cases: • The cut is performed parallel to a face whose boundary corresponds to a contractible loop. In this case, the face is copied for each piece resulting from the cut, so that if the pieces were glued back together, the two copies would be identified to one face. Correspondingly, the flatness constraint is imposed on each copy of the face. This situation appears when the Heegaard surface is obtained by blowing-up the dual graph Υ 1 so that the tubes of the Heegaard surface pierce faces of the dual triangulation.
• The cut goes through a face. In this case, we relax the corresponding flatness constraint so that it does not hold at either of the faces resulting from the cutting. On the other hand, if we glue back the two pieces together, we do impose the flatness constraint associated with the restored face. This situation appears when the Heegaard surface is obtained by blowing-up the one-skeleton 1 of the triangulation .
Following this approach, we can define the Hilbert space of flat connections for a three-manifold with defects and boundary. We do so by first defining the Hilbert space of flat connections on the associated punctured Heegaard surface and then impose flatness constraints at every face fully included into the triangulation. We discuss explicit examples below. In general, such a cutting procedure is best defined as the dual procedure of the corresponding gluing. We introduced how to glue two dimensional surfaces so as to define the tube algebra in section 2.2. We can now discuss a three-dimensional version of this gluing.

Gluing
Let us define how to glue pieces of three-manifolds, and the corresponding Hilbert spaces of flat connections, together. As far as the gluing of punctured 2d surfaces is concerned, the basic idea has been laid out in [51] and was recalled in section 2.2. Since we are able to represent flat connections on 3d manifolds with defects and with boundary as flat connections on punctured 2d surfaces, we just need to add the two-handle flatness constraints to the discussion.
Let H A and H B be two Hilbert spaces of flat connections on the punctured surfaces Σ A and Σ B , respectively. These punctured surfaces represent two pieces of a Heegaard surface obtained as the blow-up of two pieces of a triangulation so that they can be glued to each other. It is understood that the states in H A and H B satisfy the flatness constraints associated with the faces that are fully included in the triangulations. Performing the gluing of the two pieces of triangulation implies the gluing of the two pieces of the Heegaard surface. As before, each puncture of the two-dimensional surfaces is assigned a marked point. Pairs of these marked points need to be properly identified upon gluing. Furthermore, each piece of the Heegaard surface is equipped with an embedded graph such that the marked points JHEP10(2018)023 serve as one-valent nodes. Identifying the marked points then ensures that the embedded graphs are properly joined upon gluing of the corresponding surfaces.
Given two states ψ A ∈ H A and ψ B ∈ H B , we defined in section 2.2 the -product (2.12): we first form a new state ψ A · ψ B on the graph Γ A∪B obtained by connecting the graphs Γ A and Γ B embedded on Σ A and Σ B , respectively. We then impose constraints at the new nodes and faces emerging from the gluing. We distinguish three types of constraints when dealing with Heegaard surfaces representing three-manifolds, the first two being common to the case of gluing 2d surfaces: • The Gauß constraints demanding gauge invariance at the two-valent nodes that arise from identifying the marked points of two punctures with each other.
• The flatness constraints that arise from newly formed faces of the graph embedded on the Heegaard surface.
• The two-handle flatness constraints associated with the newly formed triangles of the glued 3d triangulation.

Cutting in the spin network basis
Let us assume the Heegaard surface is chosen such that it is adjusted to constructing the spin network basis. We decompose the Heegaard surface into punctured spheres surrounding the nodes of the 3d dual graph and into tubes surrounding the links of the 3d dual graph. Cutting transversally through the tubes, we cut along the triangles of the triangulation. Therefore, the boundary only contains full triangles. Accordingly, we do impose the flatness constraints associated with these boundary triangles as well as with all bulk triangles.
In the case without boundary, we can associate a fusion basis to such a decomposition of the Heegaard surface adjusted to the dual graph. This fusion basis associates labels (C t , R t ) to each tube of the surface decomposition -that is for each triangle of the triangulation. There are possibly additional intertwiner labels for the spheres (resulting from the decomposition of n > 3 punctured spheres into thrice-punctured spheres). In case the tubes are open, i.e. are associated to a boundary triangle t, we have an additional vector space index N t associated with the representation space V Ct,Rt .
Imposing the flatness constraints associated with the triangles force again all conjugacy class labels C t to be trivial. Therefore, the R t labels stand for representations of the full group and the vector space indices N t reduce to vector space indices associated with V Rt . We obtain a spin network basis with open edges, that can carry electric indices. These edges ending at the boundary can be understood to carry a Gauß constraint violation or electric charge at their end. This structure corresponds to the 'electrically' extended Hilbert space defined in [56,57]. This choice is associated to a definition of entanglement entropy with an electric centre [51, 56-58, 60, 61].

Cutting in the curvature basis and extended quantum triple algebra
Let us now assume the Heegaard surface is chosen such that it is adjusted to constructing the curvature basis. We only allow cuts through the tubes surrounding edges of the trian-JHEP10(2018)023 gulation (or lattice) so that we cut through the triangles (or faces of the lattice). Only the flatness constraints for triangles and faces that are fully included in the triangulation with boundary are imposed. The Hilbert space, for a triangulation with a boundary resulting from such a cut, is defined from the Hilbert space of flat connections on the associated punctured surface by imposing the two-handle constraints for all bulk triangles (or more generally bulk faces).
Let us consider a concrete example, namely the three-torus with the one-cube lattice sliced open along one plane. In the notation of section 4.4.4, we assume this slicing to cut through the tube between the punctures i = 5 and i = 6. The resulting 2d surface is of genus two with two punctures. We keep most of the notation of section 4.4.4, but now have to take into account that h 5 and h 6 are, a priori, two independent holonomies around the punctures i = 5 and i = 6, respectively. Furthermore, we replace the holonomy g 65 with the holonomies g 5 and g 6 that go from the marked point of the puncture 5 and 6, respectively, to the marked point at the other end of the 'half-tube'. Hence the space of flat connections on the 2d surface is parametrized by the holonomies {h 1 , h 3 , h 5 , h 6 } and {g 21 , g 43 , g 5 , g 6 }. These are subject to the Bianchi identity which can be solved for h 5 in terms of the other holonomies. Furthermore, there is a residual gauge action that acts as a diagonal adjoint action on all the holonomies, except on g 5 and g 6 for which it amounts to a right action. This can be used to obtain a complete gauge fixing, i.e. by demanding that g 5 = 1 G . In summary, the space of flat connections on our genus-two surface with two punctures is parametrized by the holonomies {h 1 , h 3 , h 6 } and {g 21 , g 43 , g 6 } without any further constraints to impose or gauge equivalences to take into account. But now we have to consider the flatness constraints associated with the faces of the one-cube lattice. Since only the face spanned by the tubes (12) and (34) is intact, we have a single two-handle constraint h 6 = g 43 g 21 g −1 43 g −1

21
(5.2) that allows to fix h 6 . Thus we obtain a space of flat connection for the one-cube lattice periodically identified along two directions parametrized by five holonomies {h 1 , h 3 } and {g 21 , g 43 , g 6 }. We can glue back the slice open three-torus to a three-torus, which in particular requires imposing the two flatness constraints associated with the two new faces. This gives back the configuration space of the three-torus with defects. Another possibility is to glue two slice open three-tori together -which topologically gives again a sliced open three-torus. In the case that we impose vanishing curvature defects on the edges, the two pieces that we glue and the piece that we end up with all have the same topology and therefore carry equivalent Hilbert spaces of flat connections. This allows to define an algebra referred to as quantum triple in [20,34]. Here we consider a slight extension of this algebra by allowing also non-trivial curvature along the edge transversal to the gluing plane (i.e. we have non-trivial h 5 = h −1 6 ). Let us compute explicitly this extended quantum triple algebra resulting from such gluing. Setting h 1 = h 3 = 1 G , the free parameters for the slice open three-torus are given by JHEP10(2018)023 (g 21 , g 43 , g 6 ). These holonomies do determine also h 5 and h 6 via (5.2) and (5.1), respectively. We now consider another slice open three-torus with parameters (g 2 1 , g 4 3 , g 6 ) which we glue to the first one by identifying its puncture nr. 6' to the puncture nr. 5 of the previous one. After gluing the graphs on which the holonomies are based together, we have to impose the flatness constraints for the 2d surface, the two-handle constraints and the gauge invariance for the new two-valent vertices. More precisely, we need to consider the flatness constraints for the new tube going from puncture 5 to puncture 6 and the gauge invariance for the two-valent node on this tube. Additionally, there are two two-handle constraints to impose. Renaming g = g −1 6 , g 21 = h 1 , g 34 = h 2 , and likewise for the variables with primed indices, and introducing the notation |g, h 1 , h 2 and |g , h 1 , h 2 for (basis) states on the slice open three-torus, the algebra resulting from the gluing is a generalization of (2.13) in section 2.2: This reproduces the multiplication for the quantum triple algebra as defined in [20] at the difference that we allow for a defect parallel to the direction of the gluing so that we do Similarly to the tube algebra, we can ask for the irreducible modules of this algebra. These irreducible modules can then be identified with the charge sectors. More specifically, we are interested in the irreducible representations of this tube algebra. These can be constructed as a generalization of the Drinfel'd double representations, discussed in appendix A, and the quantum triple representations introduced in [20]. As explained in more detail in appendix C, the representations are labeled by a pair (T, R). Here T is a triple of conjugacy classes T = (C 1 , C 2 , C 3 , d) together with a degeneracy variable d. We only admit triples for which there are group elements h 1 ∈ C 1 , h 2 ∈ C 2 and h 3 ∈ C 3 that satisfy The label d differentiates between potentially multiple orbits of the adjoint action in C ⊂ G × G × G, where C is the subset satisfying (5.4). The label R in stands for an irreducible representation of the stabilizer group of some representative element in the orbit associated to T . As for the Drinfel'd double, we can use the irreducible representations to define a basis for the state space defined on the slice open torus. This basis would have labels (T, R; a, m; b, n) where a, b is a pair of labels for the elements in the orbit associated to T and m, n are vector space indices for the representation R. The labels for this basis include the conjugacy class of the defect in addition to the conjugacy classes of the two global holonomies of the slice open three-torus. Thus the labeling of defect excitations with conjugacy classes, resulting from choosing a 2d fusion basis adjusted to the one-skeleton of the triangulation, is also justified if we consider 3d manifolds and their gluing. As a side result, we note that the extended quantum triple algebra can be easily generalized. We have so far three examples of algebras which result from gluing flat connection configurations on manifolds with boundary. The manifolds have the topology [0, 1] × Σ where Σ is the circle S 1 for the Drinfel'd double algebra, the two-torus T 2 for the quantum JHEP10(2018)023 triple and finally the once-punctured two-torus for the extended quantum triple discussed in this section. These examples suggest that we can generalize this approach to any 2d surface Σ, 15 with or without punctures. Considering only gauge invariant configurations, that is we do not allow for open edges on Σ, the space of flat connection on Σ can be parametrized by a set of n holonomies {h 1 , . . . , h n }/G quotiented by the adjoint action and possibly with a constraint C, which is invariant under the adjoint action, imposed. The space of flat connections on [0, 1] × Σ is then given by {g, h 1 , . . . , h n }/G where the h-holonomies have to satisfy C. The algebra is given by where we assume that the constraint C is satisfied. The irreducible representations of this algebra are labeled by an orbit T of the adjoint action in the constrained submanifold described by C in G n and an irreducible representation R of the stabilizer group of a representative point in the given orbit T under the adjoint action. The representation matrices can be defined in analogy to the case where Σ is a punctured torus, see appendix B.

Discussion
In this work, we have introduced a novel way to construct gauge invariant bases for (3+1)d lattice gauge theories. In particular, we have reconstructed the known spin network basis but found also a new basis referred to as the dual spin network basis. The latter provides a local description of magnetic excitations for BF topological phases and is particularly suited for the new representations 16 of loop quantum gravity based on the BF vacuum [6][7][8][9]. The duality between these two bases for (3+1)d lattice gauge theories was first exposed for the quantum group case in [25]. Moreover, it is reminiscent of a similar duality in (2+1)d, discussed in [23]. 17 Furthermore, in the context of the 3d Turaev-Viro model and the Ponzano-Regge model, a related duality, based on a change of variables for the corresponding partition functions, has been described in [62] and [63], respectively. In order to construct these bases, we have employed a lifting technique that uses the representation of three-dimensional manifolds on so-called Heegaard surfaces. States and Hilbert spaces of (2+1)d topological theories are mapped to states and Hilbert spaces of a (3+1)d theory with certain types of line defects. We have also used this lifting technique to describe state spaces for three-dimensional manifolds or lattices with boundaries and their gluing. We encountered two types of boundaries: the well-known electric boundary [57,15 The algebra can be also generalized to higher-dimensional Σ along the same lines. 16 Although one uses a Lie group SU(2), this group is equipped with a discrete measure, which makes this case similar to a discrete group. We therefore expect that possible measure theoretic questions can be resolved. 17 There, two quantization schemes are presented which correspond to different orderings of implementation of the constraints of the theory, namely the Gauß constraint and the flatness constraint. The first constraint to be implemented, i.e. the kinematical one, dictates a choice of representation and a fortiori basis for the kinematical Hilbert space. When the flatness constraint is the kinematical one, it is natural to work with a basis labeled by group variables instead of the usual spin network basis.

JHEP10(2018)023
64], where one cuts through the links of the spin network, and an alternative magnetic boundary, where one cuts through the edges of the defect structure, e.g. a triangulation. These different kinds of boundary lead to different notions of entanglement entropy for gauge theories, namely the electric centre and magnetic centre definition, respectively [58,59]. This has been already shown in 2+1 dimensions [51]. So far there has not been any explicit definition for the magnetic centre version in 3+1 dimensions for non-abelian groups, but we expect that one can find such a definition following [51] and the gluing procedure discussed here. Note that the gluing of the magnetic boundary requires to employ a gauge averaging, as for the electric boundary, but also to enforce flatness and two-handle constraints. We expect these constraints to lead to additional contributions for the magnetic centre definition of entanglement entropy. Furthermore, we showed how we can use the gluing with magnetic boundary to derive a generalization of the so-called quantum triple algebra [20], which similarly to the quantum double or tube algebra in (2+1)d, can be used to classify excitations for (3+1)d phases.
Let us comment more on the two different types of bases constructed using the lifting technique. The spin network basis diagonalizes certain combinations of electric flux operators, whereas the dual spin network basis diagonalize (magnetic) Wilson loop operators. In the context of gauge models of topological phases, the dual spin network basis characterize magnetic excitations in a local 18 manner and thus defines an excitation basis. The construction of the spin network basis via the lifting procedure is straightforward. The states of the spin network basis are uniquely characterized by a labeling of the graph dual to the defect structure (e.g. given by a triangulation) with irreducible representations of the group associated to links and intertwiners associated to the nodes. We would expect the dual spin network to be very similar to the spin network basis. Naively, we would replace the graph dual to the triangulation with the one-skeleton of the triangulation, and the irreducible representations of the group with its conjugacy classes. However, it turns out to be more complicated. Indeed, to each admissible set of conjugacy classes, there might correspond a unique (gauge invariant) configuration, several configurations, or no configurations at all. Which case occurs depends on the number of solutions to the two-handle constraints modulo gauge equivalence. We have seen that in two very simple cases the mapping between admissible labelings with conjugacy classes and gauge invariant configurations is unique, but this is generally not the case.
Due to the degeneracy of locally flat configurations on manifolds with non-trivial topology, we have to expect a mismatch at least in this case. Indeed, we find that all three types of matching and non-matching do occur for the three-torus. But we have also found an example, namely the tetrahedral lattice embedded in the three-sphere, in which all three types occur in spite of the topology of the manifold being trivial. This mismatch can be improved by adding further (Wilson-loop) observables. Furthermore, the case of no solutions for the two-handle constraints suggests the existence of -possibly non-local -coupling rules. A complete resolution of this issue requires the understanding of the intricate interplay between group structure and the topology of the lattice.

JHEP10(2018)023
It turns out that the construction of the dual spin network basis is very similar to the task of finding a complete (and not over-complete) set of Wilson loops that characterize the holonomy configurations on a given lattice. The main problem here are the so-called Mandelstam identities which relate the values of different Wilson loops [65]. Certain progress has been achieved to solve these Mandelstam identities and to determine a set of independent parameters, but only for particular (regular) lattices and for specific groups (e.g. SU(2)) modulo certain discrete ambiguities [66][67][68]. The local counting argument in [68] indicates that, in the case of SU(2), the admissible labelings of the triangulation with conjugacy classes does indeed lead to the correct number of continuous parameters, but additional discrete parameters might be required. 19 This is also consistent with the fact that the quantum group SU(2) k does admit a dual spin network basis in which these labelings are indeed necessary and sufficient [25]. It would be interesting to revisit this work addressing the Mandelstam identities, which is based on more local considerations, in the light of the technique presented here, which provides a more global view. The resolution of these issues would for instance allow for a new understanding of the Yang-Mills (lattice) dynamics in terms of Wilson loops [67,69].
Finally, we want to emphasize the main differences between the (2+1)d and the (3+1)d cases. In (2+1)d, we have the spin network basis as well as the fusion basis. The fusion basis may be seen as being dual to the spin network basis, but it encodes both electric and magnetic excitations. Furthermore, in the case of non-abelian groups, the fusion basis has an inherent hierarchical structure and describes an entire fusion scheme, starting with the excitations at the lattice level and extending to the most coarse-grained one. The algebraic input for the fusion basis are representations of the Drinfel'd double of the group. It turns out that we obtain a very similar structure when working with (root of unity) quantum groups. In the language of topological phases or string net models [50], it amounts to working with a modular fusion category instead of a pre-modular one. However, in 3+1 dimensions, the cases of pre-modular and modular fusion categories are quite different. This starts with the fact that pre-modular fusion categories lead to a degenerate vacuum 20 whereas modular fusion categories lead to a unique vacuum. The case of the modular fusion category appears to be much simpler, in the sense that a systematic definition of a dual spin network basis can be obtained. On top of that we have a self-duality which follows from the fact that both bases are labeled by objects of the modular fusion category [25].
These differences can be understood in the light of the fact that the (2+1)d case is governed by the Drinfel'd double (or more precisely the Drinfel'd center), which for both modular and pre-modular fusion categories, gives a modular fusion category. The lifting procedure shows that for the (3+1)d case, the two-handle constraints force us to work with 'half' the Drinfel'd double. This is straightforward in the case where the original fusion category was modular but rather non-symmetric in the case of a non-modular one. This also suggests two interesting generalizations, which can lead to topological theories with new types of defects. The first is to replace the magnetic-type two-handle constraints 19 We also expect this to hold only for an open neighbourhood in the set of gauge invariant configurations and not for its boundaries or conical singularities. 20 This is essentially the statement that BF theory is non-trivial as a topological theory.

JHEP10(2018)023
with electric type two-handle constraints. The second is to not impose the two-handle constraints at all and in this way allow for excitations along the triangulation as well as excitations along the dual graph. We hope that the different bases constructed here will help to construct suitable new tensor network coarse-graining schemes for lattice gauge theories and spin foam models [30,45,[70][71][72]. Since the fusion of purely magnetic charges can lead to electric charge components, the spin network basis is not stable under coarse graining. It rather requires some kind of extension, see [73] for proposals. We expect that this holds also for the dual spin network basis, as it also describes only magnetic excitations. However, the construction we presented here is based on lifting the (2+1)d fusion basis to (3+1)d, the fusion basis being stable under coarse graining. We therefore believe that the strategy presented in this paper can be used in order to construct suitable extensions of the (3+1)d spin network basis and dual spin network basis so as to be stable under coarse-graining.

JHEP10(2018)023
and the corresponding counit is defined by (g ⊗ δ h ) = δ h,1 G . The antipode, which can be thought as a generalization of the inverse element in the context of Hopf algebras, is defined via the relation and its explicit expression reads S(g ⊗ δ h ) = g −1 ⊗ δ g −1 h −1 g . (A.7) The irreducible representations {ρ = (C, R)} of D(G) are labeled by a conjugacy class C and an irreducible representation R of the centralizer Z C of C. The elements of C are denoted c a and its representative c 1 . The elements of the quotient Q C G/Z C are denoted by q a such that c a = q a c 1 q −1 a . Finally, the matrix elements of the Drinfel'd double element g ⊗ δ h in the representation (C, R) are given by D C,R am,bn (g ⊗ δ h ) = δ(h, c a )δ(c a , gc b g −1 )D R mn (q −1 a gq b ) (A.8) where m and n are the magnetic indices associated to the representation R of Z C . Thereafter, we make use of the more compact notation D ρ M N ≡ D C,R am,bn such that ρ ≡ C, R, M ≡ am and N ≡ bn. By tracing over the magnetic indices, we obtain the defining equation for the characters where Θ C (•) is the characteristic function of C and ι C (•) is the labeling function defined such that ι C (c a ) = a. The set of irreducible representations is complete and orthogonal with the orthogonality being provided by where d ρ = d C,R = d R .|C| denotes the dimension of the representation ρ. Furthermore, the matrix elements of the representation ρ * dual to ρ are obtained via the antipode as follows We will be careful in distinguishing the last expression with the one for the complex conjugate of the matrix elements Thanks to the comultiplication, tensor product of representations can be constucted: (D ρ 1 ⊗ D ρ 2 )(∆(g ⊗ δ h )) = x,y∈G xy=h (D ρ 1 ⊗ D ρ 2 )((g ⊗ δ x ) ⊗ (g ⊗ δ y )) . (A.13)

JHEP10(2018)023
Such tensor product can then be decomposed into irreducible representations according to the fusion rules N ρ 3 ρ 1 ρ 2 i.e. ρ 1 ⊗ ρ 2 = ρ 3 N ρ 3 ρ 1 ρ 2 ρ 3 . (A.14) The fact that the comultiplication is an algebra homomorphism further implies the existence of a unitary map C ρ 1 ρ 2 : ρ 3 ∈ρ 1 ⊗ρ 2 V ρ 3 → V ρ 1 ⊗ V ρ 2 which satisfies We refer to such maps as Clebsch-Gordan coefficients by analogy with the group case. In the main text, we make use of the following intertwiners refer to as 3ρM -symbols From the unitarity of C ρ 1 ρ 2 , it follows the orthogonality relation as well as the completeness relation

B S-matrix for the punctured torus
The construction of a fusion basis involves a choice of pant decomposition for the surface Σ. Different choices can be related via so-called S-transforms and F -moves. The F -moves relate the two different ways of obtaining a four-punctured sphere by gluing two thricepunctured spheres. Such a map is obtained by defining the F -symbols for the Drinfel'd double. These are simply defined as a contraction of four Clebsch-Gordan coefficients. On the other hand, the S-transform provides the equivalence between the two possible bases on a punctured torus T 1 2 . In this appendix, we derive the expression for the matrix elements of such S-transform.
The defining formulas for these two bases, labeled by A and B, respectively, are

JHEP10(2018)023
Here First(t a ) extracts the first entry h a 1 from the triple of group elements associated to t a and Sec(t a ) the second, while g t b is the adjoint (diagonal) action on the triple t b . The verification that (C.2) does define a representation of the algebra (5.3) is straightforward and proceeds along the same line as for the Drinfel'd double representations or for the quantum triple representations in [20]. Note finally that for the case where C 3 is the trivial conjugacy class, the representations defined here do reduce to the ones in [20].
Open Access. This article is distributed under the terms of the Creative Commons Attribution License (CC-BY 4.0), which permits any use, distribution and reproduction in any medium, provided the original author(s) and source are credited.