Dual Boundary Conditions in 3d SCFT's

We propose matching pairs of half-BPS boundary conditions related by IR dualities of 3d $\mathcal{N}=2$ gauge theories. From these matching pairs we construct duality interfaces. We test our proposals by anomaly matching and the computation of supersymmetric indices. Examples include basic abelian dualities, level-rank dualities, and Aharony dualities.

Suppose one has a pair of dual 3d N = 2 theories, i.e. a pair of UV gauge theories T , T ∨ that flow to the same superconformal infrared theory T IR . Given a UV boundary condition (b.c.) B for T that flows to a superconformal b.c. B IR , it may be possible to find a UV boundary condition B ∨ for T ∨ that flows to the same B IR . This is what we mean by dual boundary conditions. There is no a priori reason why such a B ∨ should exist for any B, unless T ∨ is free. Nevertheless, we will see in numerous examples that dual pairs (B, B ∨ ) can be explicitly (and fairly simply) constructed.
One way to facilitate the existence of a dual UV boundary condition B ∨ for any B is to construct a duality interface I, along the lines of [20,50,[57][58][59][60]. By definition, this is an interface between the UV theories T and T ∨ that flows to the trivial/identity interface in the infrared (between T IR and itself). Such a duality interface can be used to generate dual boundary conditions, by defining (say) B ∨ to be the collision of I and B -assuming that the RG flow implicit in the collision commutes with the RG flows defining the IR theories and boundary conditions, as in Figure 1. We will construct duality interfaces for all the examples in this paper. Most of the dual 3d N = 2 gauge theories that we consider fit into a large family of Seiberg-like dualities, obtained from a "parent" duality of Aharony [4] by a series of flows [14,15]. Specifically, we will propose dual boundary conditions and duality interfaces for: • The basic Aharony duality [4] relating U (N ) and U (N f − N ) Yang-Mills theories with N f fundamental and N f antifundamental chirals, together with additional singlets and a superpotential on one side.
• Its precursor [3], corresponding to the case N f = N , which relates U (N ) Yang-Mills with N fundamental and N antifundamental chirals to a Landau-Ginzburg model. For N f = N = 1, this becomes the basic duality between SQED and the XYZ model, which played a prominent role in the 3d-3d correspondence.
• The basic supersymmetric particle-vortex "triality" relating a free chiral, U (1) 1 2 theory with a charged chiral, and U (1) − 1 2 theory with a charged chiral. This may be considered a special case of level-rank duality with matter, or the simplest 3d N = 2 "mirror symmetry" [1], or obtained from SQED↔XYZ duality by a real mass deformation.
We also consider SU (2) 1 theory with adjoint matter, which is dual to a free chiral [66].
In all these cases, we find that a Neumann-like b.c. for one 3d theory T is dual to a Dirichlet-like b.c. for T ∨ . Making this precise requires a longer discussion of multiplets and supersymmetric boundary conditions. Such a discussion was initiated in [50,51,53], and we will summarize and slightly extend it in Section 2. The basic construction of an N = (0, 2) boundary condition involves 1) Choosing Neumann or Dirichlet b.c. for the gauge fields (the b.c. is then extended by N = (0, 2) SUSY to the entire gauge multiplet).
2) Choosing Neumann or Dirichlet b.c. for the scalars in each chiral multiplet (the b.c. is then extended by N = (0, 2) SUSY to the entire chiral multiplet).
3) Choosing additional 2d N = (0, 2) boundary matter (or a boundary CFT) with appropriate boundary couplings. 4) In the case of Neumann b.c. for the 3d gauge fields, ensuring that all boundary gauge anomalies vanish.

5)
If there is a bulk superpotential, ensuring that it is properly "factorized" at the boundary.
Together with matching of boundary flavor symmetries and boundary 't Hooft anomalies, the constraints of anomaly cancellation and superpotential factorization turn out to be surprisingly restrictive. Just as in the initial examples of [50,51], most of the dual pairs of boundary conditions that we propose are actually the simplest possible choices that are consistent with all these constraints. We note that some basic dualities of boundary conditions in abelian theories, in particular particle-vortex duality and SQED↔XYZ, were already proposed in [50] and [53], based on holomorphic block identities of [67] and a moduli space analysis. An extended discussion of Neumann-like b.c. for pure Yang-Mills-Chern-Simons theory, their IR behavior, and their connection to level-rank duality appeared in [51] and led to N = (0, 2) trialities [52]. Related constructions of WZW and coset models on boundaries in supersymmetric Chern-Simons theory appeared in [68,69].
Our main tool in the analysis of boundary conditions is the 3d half-index. Indices, halfindices, and more general partition functions have been used to spectacular effect in verifying and even predicting dualities of supersymmetric theories in recent years (see the review [70] and references therein). Examples involving dual boundary conditions and interfaces for 4d N = 2 theories, closely analogous to our current topic, appeared in [20,[71][72][73][74]. Early checks of bulk 3d dualities based on the 3d index and S 3 partition function include [75][76][77][78][79][80].
The 3d half-index "counts" boundary operators in the cohomology of one of the supercharges in the N = (0, 2) superalgebra preserved by the boundary condition. 2 The 3d half-index may equivalently be identified with the partition function of a 3d N = 2 theory on a hemisphere HS 2 times S 1 , with a chosen boundary condition on ∂(HS 2 × S 1 ) S 1 × S 1 . From this perspective, it is clear that if the 3d bulk is trivial the partition function should simply reduce to an S 1 × S 1 partition function, which turns out to be the 2d elliptic genus.
A UV formula for the 3d half-index of a gauge theory with Neumann b.c. for the gauge fields was given in [50,51], analogous to UV formulae for the 2d elliptic genus [50,[87][88][89]. By "UV formula," we mean a prescription for computing the half-index from the UV field content of a theory as in [90] -essentially obtained by counting operators constructed from the classical fields and (in the case of Neumann b.c.) using a contour integral to project to gauge invariants. Intuitively, this is possible because the index is insensitive to RG flow, and largely insensitive to UV superpotential couplings. 3 Such UV formulae for indices or halfindices are often reproduced by localization computations of partition functions. In particular, 2 The twist of 3d N = 2 theory with respect to this supercharge was recently studied by [81]. The twisted theory is topological in the direction perpendicular to the boundary, and holomorphic in the plane parallel to the boundary. Thus boundary operators counted by the index have the structure of a chiral algebra. Indeed, if the 3d bulk theory were empty, the boundary chiral algebra would precisely coincide with that appearing in the half-twist of 2d N = (0, 2) theories [82,83], and the half-index would coincide with the 2d elliptic genus [84][85][86]. 3 UV formulae for the index are only available if the IR U (1)R coincides with some (possibly unknown) linear combination of the UV U (1)R symmetry and other U (1) flavour symmetry generators which are present in the UV. This is the main reason we focus on boundary conditions which preserve some UV U (1)R symmetry.
localization of the full 3d index was performed in [79,91] (further analyzed, extended, and related to three-sphere partition functions [75,78,92] in [67,80,[93][94][95][96]); and localization of the 3d half-index with Neumann b.c. appeared in [55]. 4 In Section 3 we propose an extension of the half-index to Dirichlet b.c., which instead of a projection to gauge invariants involves a sum over boundary monopole sectors.
The half-indices that we consider in this paper are closely related to the holomorphic blocks of [67,98] (see also [99][100][101][102][103]). As discussed in [67], holomorphic blocks are defined in the infrared of a 3d N = 2 theory. They are defined as partition functions of a mass-deformed theory on C × S 1 , with a boundary condition near infinity on C labelled by the choice of an IR vacuum. The most general N = (0, 2) boundary condition in the IR may be described as a superposition (direct sum) of boundary conditions labelled by vacua, each optionally decorated with a boundary N = (0, 2) theory. Correspondingly, the C × S 1 partition function of a general IR boundary condition will be a linear combination of holomorphic blocks, with coefficients valued in elliptic genera.
Since any (SUSY-preserving) UV boundary condition B flows to some IR boundary condition, one should expect that the UV half-index of B will be equal to such a linear combination of holomorphic blocks. We indeed find this to be the case, though we do not analyze the phenomenon in detail here. We show that half-indices are solutions to the same difference equations that characterize the holomorphic blocks (up to a systematic modification that we explain), which implies that the former is a linear combination of the latter. These are also the same difference equations that are obeyed by the S 2 × S 1 index and by the S 3 partition function of a 3d theory [18,73]; in all cases, the difference equations capture relations in the category of bulk BPS line operators.

Future directions and additional motivations
The results of this paper can be extended in numerous orthogonal directions, some of which originally motivated this work.
1. The analysis of boundary gauge and 't Hooft anomalies and the matching of symmetries on the two sides of the dualities is not specific to supersymmetric gauge theories. The same anomaly matching considerations allow one to formulate plausible pairs of dual boundary conditions for non-supersymmetric "bosonization" dualities. Preliminary results were announced in [104]. While this draft was completed, further work appeared on the subject [105].
2. In addition, we expect that one can recover dual pairs of boundary conditions in [105] associated with bosonization and particle-vortex duality by judiciously breaking supersymmetry in our dual pairs of boundary conditions (analogous to the 'bulk' study of [24,25]). We have performed a similar breaking of the 3d N = 4 abelian mirror symmetry interface obtained in [60] to the 3d N = 2 interface. We derive the latter in Section 5.2 by independent means. In completely breaking SUSY, of course, one is subject to the usual caveats associated with uncontrolled RG flows.
3. The tools we employed in our analysis apply equally well to boundary conditions for 3d N = 4 gauge theories, preserving N = (2,2) and N = (0, 4) SUSY. The corresponding dualities of boundary conditions may also be derivable through brane constructions [106]. 4. The N = (2, 2) boundary conditions played an important role in the physical explanation of symplectic duality [60]. They should also be useful in interpreting the results of [102]. 5. On the other hand, N = (0, 4) boundary conditions for 3d N = 4 gauge theories play an important role in past [107] and upcoming [108] work on gauge theory constructions of vertex operator algebras with applications to the Geometric Langlands program. Our half-index calculations provide important checks in the form of characters of the relevant VOAs.

6.
Our abelian examples are the basic building blocks for an analysis of boundary conditions and duality interfaces for 3d N = 2 theories of class R [18,109], which correspond geometrically to ideal triangulations of 3-manifolds. They are also the building blocks for an IR description of codimension-two defects in 4d N = 2 theories of class S, along the lines of [110] (and related to [111,112]). 7. Some of our proposed dual pairs of boundary conditions are mutually consistent thanks to some known dualities of N = (0, 2) gauge theories [52]. It would be interesting to explore the relationship further.
8. Many 3d dualities descend from Seiberg duality for 4d N = 1 gauge theories, cf. [15]. The basic N = (0, 2) boundary conditions in the 3d theories would arise naturally from cigar configurations with a N = (0, 2) surface defect at the tip of the cigar. It may be possible to lift some dualities of boundary conditions to Seiberg dualities of surface defects (see e.g. [113]). 9. In the opposite direction, it would be interesting to reduce some of the 3d dualities of boundary conditions considered here to two dimensions, along the lines of of [114,115], and relate to the analysis of UV boundary conditions in 2d N = (2, 2) GLSM's carried out in [54,116,117].

2d N = (0, 2) boundary conditions
We describe several very general families of boundary conditions for 3d N = 2 theories that preserve two-dimensional N = (0, 2) supersymmetry, and their associated anomalies. We also introduce some compact notation that we'll use throughout the paper.
Most aspects of boundary conditions presented below appeared in a slightly more condensed form in [50,51,53]. New features of our discussion include a refined computation of boundary anomalies, showing that they are independent of the signs of bulk real masses or the signs of bulk Chern-Simons levels -in contrast to the well-known shifts of bulk Chern-Simons levels induced by massive fermions. We also initiate a study of singular boundary conditions, analogous to the Nahm-pole b.c. in 4d N = 4 super-Yang-Mills [58,59] and generalizing the 3d N = 4 analysis of [106].

Basic conventions:
We identify the local neighborhood of a boundary with half of 3d Minkowski space R 1,1 × R ≤0 . We use coordinates x µ (µ = 0, 1) on R 1,1 , and a spatial coordinate x ⊥ ≤ 0 transverse to the boundary. In later sections, we will also consider Euclidean signature, with complex coordiantes z,z in the plane of the boundary.
The 3d N = 2 SUSY algebra has four real odd generators that can be regrouped into complex spinors Q α , Q α (α = −, +), satisfying where P ± = ±P 0 + P 1 are the left and right translation operators in R 1,1 and Z is a real central charge. The algebra admits a U (1) R R-symmetry with charges A given boundary condition can (potentially) preserve any subalgebra of 3d N = 2 that does not contain P ⊥ . We are interested in the N = (0, 2) subalgebra that is generated by Q + and Q + , and inherits the U (1) R symmetry of 3d N = 2. We focus our attention on boundary conditions that preserve this (0, 2) subalgebra and leave U (1) R unbroken. Note that unbroken U (1) R is necessary in order to define a half-index. Superconformal boundary conditions always preserve some U (1) R , though it may be emergent in the IR.

Free chiral
We begin with the simplest 3d theory: that of a free chiral multiplet. Off-shell, it contains a complex boson φ, a complex fermion ψ α and its conjugateψ α , and a complex auxiliary field F , which can be grouped in a superfield with remaining components determined by the chirality condition The 3d theory has an action d 3 xd 4 θ Φ † 3d Φ 3d , and the equations of motion set F = 0. Our conventions for 3d and 2d SUSY coincide with [3,83] and with a dimensional reduction of 4d N = 1 following [118], up to numerical factors that we do not carefully keep track of, as they do not affect the structure of the results.
The multiplet Φ 3d can be decomposed into two multiplets under the (0, 2) subalgebra, a (0, 2) chiral that satisfies D + Φ = 0, and a (0, 2) Fermi multiplet that also satisfies D + Ψ = 0. The auxiliary field f in the Fermi multiplet is equal on-shell to f = ∂ ⊥φ , as can be seen from In the language of [83], one would say that Ψ has a "J-term" Written in (0,2) superspace, the bulk action takes the form with a fermionic superpotential Ψ∂ ⊥ Φ that sets f ∼ ∂ ⊥φ and ultimately gives rise to the ∂ ⊥ derivatives in the 3d kinetic term. There are two basic boundary conditions for a free 3d chiral. They follow most simply by observing that the action (2.7) contains a termψ − ∂ ⊥ ψ + , which forces one or the other of the fermions to be zero at the boundary in order to avoid a boundary term in the equations of motion (at least in the absence of any additional boundary matter). The SUSY completion of setting ψ − to zero, which we'll call Neumann and denote as 'N', sets to zero the entire (0,2) multiplet Ψ: We call this Neumann due to the induced Neumann b.c. on φ.) One SUSY completion of setting ψ + to zero, which we'll call Dirichlet and denote 'D', sets to zero the entire multiplet Φ: Alternatively, we can set Φ equal to a constant (background) chiral superfield at the boundary, i.e. to a complex number c, leading to a deformation of the Dirichlet b.c. that we denote 'D c ' D c b.c. : For the D c b.c., we always assume that c = 0. Clearly, a D c boundary condition for a free chiral will not flow in the IR to a superconformal boundary condition. More generally, in order for D c to preserve U (1) R , the R-charge of φ must be zero. This precludes any straightforward RG flow to a superconformal boundary condition even in the presence of interactions, since the R-charge is below the unitarity bound. There is, however, a useful loophole: in a gauge theory, if φ is not gauge invariant, it may have R-charge zero as long as all gauge-invariant chiral operators have an R-charge above the unitarity bound. Thus, giving charged chirals D c b.c. in a gauge theory may still be part of the UV definition of superconformal boundary conditions. Note that in order to include D c b.c. in a gauge theory, the gauge group will have to be partly broken at the boundary.

Boundary conditions encoded in the action
Any quantum field theory, even a free one, will generally admit a very large variety of "boundary conditions," some of which may not even admit a weakly-coupled description. A general classification of such boundary conditions would be at least as intricate as the classification of quantum field theories in one dimension lower.
Even semi-classically, there may be a large variety of elliptic boundary conditions on the bulk fields. We will ignore for now the possibility of boundary conditions defined by a singular behaviour of the bulk fields near the boundary -we will come back to that in Section 2.6.
A fairly general strategy to define boundary conditions is to start from a simple "reference" boundary condition and deform it by a boundary action, possibly involving auxiliary boundary degrees of freedom. Intuitively, one picks conjugate variables (u, v) in phase space and a boundary action S ∂ (u) to deform the boundary conditions as As a shortcut, we can think about the original and modified boundary condition as arising as boundary equations of motions for half-space actions The shortcut is correct as long as we forbid the boundary action from depending on v.
In general, a boundary condition is supersymmetric if the perpendicular component of the super-current is a total derivative along the boundary. A simple way to obtain supersymmetric boundary conditions is to start from a supersymmetric reference boundary condition and add supersymmetry-preserving boundary couplings.
We illustrate this perspective by reformulating the basic N, D, and D c b.c. for a free 3d chiral in terms of half-space actions. Effectively, Φ and Ψ are conjugate variables. The reference N and D boundary conditions are associated to bulk actions (2. 13) Varying S N leads to a boundary term δS N = (bulk terms) + d 2 x dθ + ΨδΦ ∂ + c.c.
(2.14) whose associated equation of motion sets Ψ ∂ = 0, effectively imposing N b.c. Similarly, the variation of S D has a boundary term dθ + δΨΦ ∂ that imposes D b.c.: The modification D c of the Dirichlet boundary condition can be achieved by adding a boundary superpotential cΨ. Consider (2.16)

Boundary fields and boundary superpotentials
In this section we discuss boundary conditions for free chirals that involve boundary degrees of freedom. In order to obtain N = (0, 2) boundary conditions, we add (0, 2) chiral and/or Fermi multiplets on the boundary, coupled to the bulk with a fermionic superpotential. We describe some general consequences of such a modification. Consider a 2d N = (0, 2) theory with chiral multiplets C α and Fermi multiplets Γ i . Recall that interactions in this theory may be introduced via a choice of 'E' and 'J' terms for the Fermi multiplets. In superspace Both E i and J i are necessarily chiral (since D 2 + = 0), and we assume they are holomorphic functions of the C α . The 2d action may be written as S 2d = d 2 xdθ In this theory, the equations for a supersymmetric vacuum 6 include

20)
5 This standard constraint arises from the variation of the fermionic superpotential Q + dθ + J · Γ ∼ dθ + D+(J · Γ) = dθ + E · J. This will vanish as desired if E · J is constant. Further requiring that the theory admits a supersymmetric vacuum, as in (2.20), forces E · J = 0.
6 Meaning: a combination of the BPS equations for the full (0, 2) algebra together with the equations of motion in the low-energy limit, so that derivatives in the x 0 , x 1 directions drop out.
where ∂ α J := ∂J(C)/∂C α , etc. Note that there is an inherent symmetry under exchange Γ i ↔ Γ † i and E i ↔ J i . This wellknown symmetry may actually be viewed as fermionic analogue of T-duality. Some details of this perspective are presented in Appendix A. Now suppose we have a 3d chiral multiplet Φ 3d = (Φ, Ψ) with N b.c., encoded in the action S N from (2.13), and use a boundary N = (0, 2) theory as above to modify it. We introduce boundary chiral and Fermi multiplets C α , Γ i , and couple them to the bulk by allowing the E and J terms to contain a holomorphic dependence on the boundary values of Φ . The modified action takes the form The variation of S mod N with respect to the boundary fields C, Γ gives rise, at low energy, to the usual 2d constraints (2.20). In addition, the variation of S mod N with respect to the bulk field Φ takes the form Setting this variation to zero leads to Thus, in the infrared, we expect the modified boundary condition to flow to one combining (2.23) and We may modify the D b.c. on a 3d chiral in a similar way. We begin with the action S D from (2.13). We add 2d multiplets C α , Γ i with E and J terms that depend only on C. Then we introduce a boundary J-term J Ψ (C) for the restriction to the boundary of the bulk multiplet Ψ. The modified action takes the form Setting to zero the boundary variation of this action leads at low energy to The first equation is the deformed boundary condition, the other equations are required for a low energy supersymmetric vacuum.

Flips
There are two simple, important special cases of modified boundary conditions for a 3d chiral. Starting with N b.c., we may introduce a single boundary Fermi multiplet Γ with J = Φ. The modified action is (2.26) whose boundary variation (at low energy) sets This both relieves the constraint on the boundary value of Ψ (imposed by pure N b.c.) and constrains Ψ. Indeed, (2.27) looks just like D b.c. Conversely, starting with D b.c., we may introduce a single boundary chiral multiplet C and a J-term J Ψ = C for Ψ. The modified action is (2.28) whose boundary variation (at low energy) sets This frees up the boundary value of Φ while constraining Ψ, so that we effectively end up with N b.c. (Note also that the definition of D c b.c. in (2.16) is a special case of (2.28), with C = c a constant rather than a dynamical boundary field.) We say that coupling to a boundary Fermi multiplet (and flowing to the IR) "flips" N to D, while coupling to a boundary chiral multiplet (and flowing to the IR) "flips" D to N: (2.30) These "flips" are analogous to modifications of boundary conditions of 4d N = 2 theories that were discussed in [18], inspired by the field-theoretic Fourier transform of [119,120].

Multiple chirals
If we have multiple 3d free chiral multiplets Φ a 3d N f a=1 , we can define a basic boundary condition by choosing N, D, or D c b.c. for each Φ a 3d independently. This basic combination of boundary conditions can be further modified by introducing boundary fields and couplings, in a straightforward generalization of the above analysis.
For example, we could use a modification to engineer a boundary condition that restricts the bosons φ a to lie on an arbitrary holomorphic submanifold S ⊂ C N f , and the fermions ψ a − to take values in the (parity-reversed) conormal bundle of S: To do so, we begin with N b.c. for all the Φ a 3d , and introduce boundary Fermi multiplets This results in a modified boundary condition which is precisely of the form (2.31) for S = {J 1 = ... = J d = 0} ⊂ C N f . Such boundary conditions are familiar in the 2d B-model, where they given rise to coherent sheaves.

Bulk superpotentials
A standard bulk deformation of the theory of N f free chirals Φ a 3d corresponds to adding a superpotential to the bulk action. In the presence of a superpotential, Neumann-type boundary conditions require a modification (often a severe modification, which can make them partially Dirichlet) in order to preserve 2d (0, 2) supersymmetry [121]. The structure of the possible modifications is encapsulated by the same "matrix factorizations" that show up in 2d Landau-Ginzburg models. We review a few relevant details here, following [51,Sec. 4.1]. First, let's recall why Neumann b.c. are incompatible with superpotentials. When W = 0, each 3d chiral multiplet may still be decomposed into a 2d chiral Φ a and a 2d Fermi multiplet Ψ a , as in (2.4), (2.5). However, the Fermi multiplets no longer satisfy D + Ψ = 0; rather, one finds In N = (0, 2) terminology, Ψ a has both a J-term J a ∼ ∂ ⊥ Φ a and an E-term E a ∼ ∂ a W . We may now try to engineer a Neumann boundary condition by writing down an appropriate half-space action and setting the boundary variation to zero -just as in Section 2.1.1. The action S N in (2.13) is a natural choice, and certainly induces ∂ ⊥ φ a ∂ = 0. However, this action no longer preserves (0, 2) SUSY, because it violates the standard E · J = 0 constraint (2.19). In the present case, we have (2.35) whence the constraint is W (Φ) ∂ = 0. This clearly cannot be satisfied if W is nontrivial and the φ a are left unconstrained on the boundary, as for standard N b.c. 7 Fortunately, the computation (2.35) tells us how to remedy the situation. We can introduce additional boundary Fermi multiplets Γ i (i = 1, ...d) with their own E and J terms E i Γ , J i Γ (which are holomorphic functions of Φ| ∂ , and perhaps other boundary chirals) such that The factorization (up to a constant shift) of W in this manner is a basic example of a matrix factorization. The constant will have to vanish for boundary conditions that preserve U (1) R . Note that many choices of E Γ and J Γ are possible. The relation (2.36) ensures that the total E · J vanishes, so that the modified half-space action is once more supersymmetric. The actual boundary condition resulting from the variation of (2.37) now becomes (cf. (2.23)) 38) The "matrix factorization" (2.38) is the most general sort of boundary condition we will need in the presence of a superpotential. It may be a mild or severe modification of standard N b.c., depending on the precise choice of J Γ and E Γ . Notice that J Γ ∂ = E Γ ∂ = 0 impose Dirichlet-like b.c. on some of the φ a . The additional relations Ψ ∂ ∼ dJ · Γ constrain some of the Ψ's (those in the cokernel of the map dJ), leading to Neumann b.c. for others of the φ a .
We should also discuss the effect of a bulk superpotential on Dirichlet D c boundary conditions. Generic Dirichlet boundary conditions do not appear to break SUSY explicitly when the bulk superpotential is turned on, but they break it spontaneously if the boundary value of the fields is not a critical value of W . That means we need to impose ∂W (c) = 0 in order to have (classically) low energy supersymmetry.
It is easy to reproduce this statement as a special case of (2.38). Adding auxiliary boundary Fermi multiplets Γ a with J a = Φ a − c a to go from Neumann to general Dirichlet b.c. we have a constraint (2.39) that can be solved in a straightforward manner. Low energy SUSY requires both Φ a = c a and E a (Φ, c) = E a (c, c) = ∂W (c) = 0 (2.40) In a similar way, we can argue that if we give Dirichlet b.c. to a subset Φ of the bulk fields, Neumann for the remaining Φ , then we will need a matrix factorization of W (c, Φ ). Compatibility with the bulk SUSY vacua will further require at low energy ∂ c W (c, Φ ) = 0.
Although Dirichlet boundary conditions do not need extra conditions to preserve SUSY in the UV, there are constraints on boundary couplings of the form J Φ (C α )Ψ| ∂ , in the sense that the E.J = const constraint is deformed to E.J − W (J Φ ) = const.

Example: XYZ
A simple example of a 3d N = 2 theory with a superpotential is the "XYZ model," i.e. three chiral fields X 3d , Y 3d , Z 3d coupled by a superpotential W = X 3d Y 3d Z 3d . What are the basic (0,2) boundary conditions for this theory?
The preceding analysis suggests that we cannot choose N b.c. for all three chirals without adding some extra degrees of freedom to factorize XY Z. Setting D b.c. for a single chiral, say X = 0, is already enough to preserve SUSY in the UV. On the other hand, if we deform the boundary condition for X to D c , we will still have to deal with the restriction cY Z of the bulk superpotential.
Altogether, we can consider the following simple boundary conditions: • (D,D,D): D b.c. for all three fields. This can be deformed to a (D x ,D y ,D z ), but the deformation will break SUSY spontaneously unless xy = xz = yz = 0. In other words, we should really only consider (D c ,D,D), (D,D c ,D) or (D,D,D c ) deformations.
• (D,D,N): Dirichlet for X and Y , Neumann for Z (or permutations thereof). We can consider deformations (D c ,D,N) or (D,D c ,N).
• (D,N,N): Dirichlet for one field, Neumann for the other two.
In Section 6, we will identify the duals of most of these boundary conditions in 3d N = 2 SQED.

Boundary 't Hooft anomalies
Boundary conditions that preserve N = (0, 2) supersymmetry typically have 't Hooft anomalies for global symmetries. We would like to determine what they are. We use the following conventions: • A purely two-dimensional left-handed chiral fermion (such as the leading component γ − in a Fermi multiplet Γ = γ − + ...) contributes +1 to the anomaly for the U (1) symmetry it is charged under. Letting f denote the field strength for the symmetry, the anomaly polynomial is I 2 (f ) = f 2 .
• Three-dimensional U (1) Chern-Simons theory (purely bosonic) has a level k ∈ Z naturally quantized to be an integer; and it induces an anomaly +k f 2 on the boundary. Now, a three-dimensional fermion (ψ + , ψ − ) has both left-handed and right-handed components with respect to the 2d Lorentz group. Typical boundary conditions set either ψ + or ψ − to zero at the boundary. Let f be the field strength for the U (1) symmetry rotating ψ. We claim that • A three-dimensional fermion with b.c. ψ + ∂ = 0 (so that ψ − survives at the boundary) contributes 1 2 f 2 to the anomaly polynomial.
To verify the claim, we introduce a real mass for the 3d fermion ψ α , flow to the IR, and match UV and IR anomalies. A real mass term im αβ ψ αψβ has two effects at energies below |m|. First, the fermion becomes fully massive in the bulk, and integrating it out at oneloop generates a (background) Chern-Simons term for its U (1) symmetry, at level 1 2 sign(m) [122][123][124] (cf. [3] in the supersymmetric case). Second, since the Dirac equations take the form (∂ ⊥ + m)ψ − + (∂ ± of other fermions) = 0 , normalizable edge modes (i.e. purely 2d fermions) may survive, with profiles If the boundary condition is ψ + ∂ = 0, then an edge mode of ψ − exists when m < 0, so the total IR anomaly is On the other hand, if the boundary condition is ψ − ∂ = 0, then an edge mode of ψ + exists when m > 0, so the total IR anomaly is This substantiates our claim 8 .
In the case of a free chiral multiplet Φ 3d , there are two U (1) symmetries around: a flavor symmetry U (1) f under which Φ 3d has charge 1 (say), and the R-symmetry U (1) R under which Φ 3d has some charge ρ. The component fields have charges (Note that the superpotential Φ∂ ⊥ Ψ has U (1) f charge 0 and U (1) R charge 1, as required for unbroken flavor and R-symmetry.) Therefore, our basic boundary conditions come with anomalies N b.c. : encoded as polynomials I 2 (f , r) in the U (1) f and U (1) R curvatures. This prescription is perfectly consistent with the "flips" that modify D to N or vice versa. For example, in order to flip D to N we must introduce a boundary chiral multiplet C. The boundary superpotential ΨC fixes the U (1) f , U (1) R charges of C to be (1, ρ), so that the right-handed chiral fermion in C contributes an anomaly −(f + (ρ − 1)r) 2 , which is exactly right to modify the D anomaly to the N anomaly.
It is somewhat insightful to repeat the analysis of edge modes for a free chiral in superspace. If we introduce a real mass m as a background value of the scalar field in the U (1) f gauge multiplet, the real mass will enter the Lagrangian through complexified covariant ∂ ⊥ derivatives. In other words, the superpotential Ψ∂ ⊥ Φ in (2.7) gets modified to (2.47) Recalling that the real mass m plays the role of a central charge Z, we may view (2.47) as a consequence of the fact that Z complexifies P ⊥ in the SUSY algebra (2.1). The N = (0, 2) BPS equations now arising from the superpotential (2.47) are which lead directly to the edge mode profiles in (2.42).

Nonabelian symmetries
The anomaly for a nonabelian symmetry group G may be fixed by ensuring that the above rules/conventions are consistent with the maximal abelian torus of G. As might be expected, we find that 3d fermions that survive as chiral fields on the boundary contribute half of the standard 2d anomaly. We briefly recall the standard 2d result. Let G be a simple compact group and R an irreducible unitary representation of G. Let T R denote the quadratic index of R, defined so that the ratio of traces in any pair of representations obeys Tr R , and normalized so that T adjoint = 2h where h is the dual Coxeter number. For example, this means that if G = SU (N ) we have T fundamental = 1 and T adjoint = 2N = 2h. In general, the index so normalized may be computed as a sum of lengths-squared of weights where long roots α have ||α|| 2 = 2. When G is U (N ) or SU (N ), we simply write 'Tr' the usual trace (on the enveloping algebra) in the fundamental representation; and for general G define Tr := 1 2h Tr adjoint . Let f denote the field strength of a G connection. Then • A 2d left-handed (resp., right-handed) complex fermion in representation R of G contributes Tr R (f 2 ) = T R Tr(f 2 ) (resp., −T R Tr(f 2 )) to the anomaly polynomial.
• Correspondingly, the left-handed (resp., right-handed) component of a 3d fermion in representation R of G that is unconstrained by a boundary condition contributes 1 2 T R Tr(f 2 ) (resp., − 1 2 T R Tr(f 2 )) to the anomaly polynomial.
• In this same normalization, 3d Chern-Simons term for G at level k contributes k Tr(f 2 ).
We may extend this analysis to a 3d chiral multiplet Φ 3d in representation (R, ρ) of G × U (1) R , where G is simple and U (1) R is the R-symmetry. We find that Neumann and Dirichlet b.c. have boundary anomalies (2.50) If G is not simple, the anomaly can be computed by directly ensuring agreement with the abelian anomaly for the maximal torus. We list a few special cases for G = U (N ). Let f denote the usual N × N field strength. A 3d chiral of R-charge ρ in the fundamental, anti-fundamental, and adjoint representations of G = U (N ) has a boundary anomaly fund: with a '-' sign for Neumann b.c. and a '+' sign for Dirichlet.

Gauge fields
We next extend the analysis of N = (0, 2) boundary conditions to gauge fields.

Reduction of 3d gauge multiplets
For gauge group G, the 3d N = 2 gauge multiplet contains the connection A m , a real scalar σ, a complex fermion λ α , and (off shell) a real auxiliary field D 3d , all valued in the real Lie algebra g. These fields may be grouped in a Hermitian vector superfield or a gauge-covariant linear superfield that contains the field strength and satisfies D α D α Σ 3d = D α D α Σ 3d = 0, cf. [3]. On shell, the auxiliary field D 3d is set equal to the moment map for G acting on the matter scalars (which necessarily parameterize a Kähler manifold) : We typically set the gauge coupling e 2 = 1, as it can be restored by dimensional analysis.
In the presence of an FI term t and/or a supersymmetric Chern-Simons term at level k, the D-term is modified to 9 1 e 2 D 3d = µ matter − t − kσ .
(2.55) 9 The relative sign of the moment map and Chern-Simons term in (2.55) is somewhat important (in contrast to most numerical factors in the SUSY analysis). It enters in the (0,2) BPS equations (Section 2.6), which in turn control edge modes that can contribute to anomalies. The sign in (2.55) was carefully computed, and agrees with our sign conventions for anomalies.
The 3d gauge multiplet may be decomposed into an N = (0, 2) gauge multiplet and an N = (0, 2) chiral multiplet. The chiral multiplet contains the complexified connection σ + iA ⊥ in the x ⊥ direction, together with the right-handed fermion λ + . As an N = (0, 2) chiral superfield, it takes the form with its remaining θ +θ+ component determined by the (gauge-covariant) chirality constraint D + S = 0. In the presence of chiral matter, the superfield S appears in complexified covariant derivatives. For example, the fermionic superpotential Ψ ∂ ⊥ Φ from (2.7) that we encountered when writing an N = (0, 2) superspace action for a 3d chiral gets modified to Note how this is compatible with the BPS equations (2.48) in the presence of a background gauge multiplet (containing m rather than σ), and the fact that Z complexifies P ⊥ in the SUSY algebra (2.1). The remaining fields of the 3d gauge multiplet go into an N = (0, 2) gauge multiplet, which comprises a pair of superfields Here 'D' is a new auxiliary field that is equal on shell to 10 (The RHS of (2.59) will contain covariant ∂ ⊥ derivatives when the gauge group is nonabelian.) From the gauge multiplet one can also construct the fermionic field-strength superfield which is covariantly chiral D + Υ = 0. The kinetic terms of the 3d gauge theory action may be written more or less as ordinary N = (0, 2) kinetic terms for a vector multiplet (A, V − ) coupled to a chiral S. Some care must be taken to account for the fact that S has an exotic gauge transformation 11 , but this is not important for our subsequent analysis. Additionally, an FI term for the abelian part of the gauge group appears in a superpotential (2.61) 10 The relative sign of ∂ ⊥ σ appearing here is important, just like the sign of k was in (2.55). It can ultimately fixed by observing that the N = (0, 2) BPS equations take the form of a gradient flow, as discussed in Section 2.6. 11 If Λ is the chiral parameter of a super-gauge transformation, then the gauge transformation takes the from S → e −iΛ Se iΛ + e −iΛ D ⊥ e iΛ , mirroring the gauge transformation of A ⊥ . For abelian gauge group, this looks like S → S + i∂ ⊥ Λ.
while a 3d Chern-Simons term at level k manifests as which also includes a superpotential piece. We note that the U (1) R charges of fields in the 3d gauge multiplet are uniquely determined from the fact that A µ , A ⊥ , σ have R-charge zero. Explicitly, the R-charges are (2.63)

Basic N , D boundary conditions
In pure, non-supersymmetric gauge theory, there always exist two basic boundary conditions compatible with the Maxwell/Yang-Mills equations of motion. A Neumann boundary condition sets F ⊥µ ∂ = 0, and preserves gauge symmetry on the boundary. A Dirichlet boundary condition sets A µ ∂ = 0, and breaks gauge symmetry to a global symmetry at the boundary (since only gauge transformations that are constant along the boundary preserve the constraint A µ ∂ = 0). In 3d N = 2 gauge theory, there exist natural supersymmetric completions of these basic Neumann and Dirichlet b.c., which we denote N and D, respectively. The N = (0, 2) supersymmetric completion of Dirichlet simply sets the superfields A, V − from (2.58) to zero on the boundary: The constraint on the D-term translates on-shell to which is a modified Neumann b.c. for the scalar σ. (As usual, if the gauge group is nonabelian, ∂ ⊥ should be promoted to a covariant derivative.) In a quantum theory, the usual one-loop corrections from massive fermions will modify the Chern-Simons term on the RHS of (2.65). The N = (0, 2) supersymmetric completion of Neumann may be understood as setting to zero the complexified (chiral) covariant derivative ∂ ⊥ − S (as in (2.57)) in a gauge-invariant way. This results in N b.c. : which includes a Dirichlet b.c. for the scalar σ. In the presence of additional boundary matter charged under the bulk gauge group G, the constraint on the field strength is modified to where J ∂ ± is the current for the boundary G symmetry. Moreover, for abelian factors in the gauge group, one may introduce boundary FI parameters t ∂ , which modify the Neumann b.c. to σ ∂ = t ∂ . (2.67) The FI parameters enter supersymmetrically via a boundary superpotential dθ + t ∂ Υ| ∂ +c.c. A standard generalization of the basic N , D b.c. in gauge theory involves choosing a subgroup H ⊆ G of the gauge group to remain unbroken on the boundary. Let h ⊆ g denote the Lie algebra of H, and h ⊥ its orthogonal complement with respect to the Cartan-Killing form; and let π : g → h and π ⊥ : g → h ⊥ denote the corresponding orthogonal projections. Then we may define a hybrid boundary condition In the presence of bulk chiral matter (and superpotentials, etc.), the basic N and D b.c. for the gauge multiplet may be combined with N, D, or D c , or any of the more complicated choices of boundary conditions for matter fields discussed in Sections 2.1-2.3. We will see how this works in many examples.

Dual-photon multiplet
When the bulk gauge group is abelian (or has an abelian factor) one may dualize the gauge field to a circle-valued scalar, the "dual photon" γ, which obeys dγ = * F . Supersymmetrically, the complex combination σ + iγ is the leading component of a 3d N = 2 chiral multiplet [3]. Just as in Section 2.1, this 3d chiral may be decomposed into • a N = (0, 2) chiral multiplet S ∨ containing σ + iγ and λ + ,λ + , which may be identified as the two-dimensional T-dual of S • a N = (0, 2) Fermi multiplet containing λ − ,λ − and the normal derivative ∂ ⊥ S ∨ = ∂ ⊥ (σ+iγ)+..., which may be identified with Υ (note that on-shell, Υ contains F 01 +iD ∼ i∂ ⊥ (σ + iγ)) Our basic N and D boundary conditions for abelian gauge theory now look just like basic D and N b.c. (respectively) for the 3d dual-photon multiplet! In particular, the D b.c. (2.64) is compatible with setting Υ ∂ = 0, while leaving the boundary value of S ∨ unconstrained. Conversely, the N b.c. (2.66) is compatible with setting S ∨ ∂ = 0. This may be deformed to by introducing a complex boundary FI parameter (including a real FI parameter and a thetaangle). Thus N b.c. sets the dual photon γ ∂ equal to the boundary theta-angle. The deformation (2.70) is exactly of the same "D c " type discussed in Section 2.1, corresponding to the addition of the boundary superpotential dθ + t ∂ Υ| ∂ + c.c..

Anomalies
The gauginos λ + , λ − in the 3d gauge multiplet necessarily have R-charge +1, as in (2.63), and also transform in the adjoint representation of the gauge group G. These gauginos may therefore contribute to boundary anomalies. A Neumann b.c. for the 3d gauge multiplet sets λ + | ∂ = 0 but does not constrain λ − . Thus, our standard UV computation (Section 2.4) would suggest a contribution from λ − to the boundary anomaly if G is simple. If G is not simple, than a computation such as (2.51), for the adjoint representation, gives the anomaly. If G is abelian, then the anomaly is simply 1 2 r 2 . The prediction (2.71) may again be compared with an IR calculation. We focus on the G symmetry, and assume that G is simple. We introduce a supersymmetric Chern-Simons term at level k, which includes a real mass for the gauginos. Indeed, in the presence of the Chern-Simons term, the Dirac equations for gauginos take the form (assuming that λ ± are constant in the x µ directions parallel to the boundary), from which we recognize −k as the real mass. In the bulk, integrating out massive gauginos shifts the Chern-Simons coupling k → k − h sign(k). On the boundary, λ − has an edge mode when k > 0, which contributes a standard 2d anomaly 2h Tr(f 2 ). Thus, the total IR anomaly for G is This agrees with the UV prediction, which gives k from the CS term, plus h Tr(f 2 ) from (2.71). Note that, unlike 't Hooft anomalies for flavor symmetries, the anomaly for a G gauge symmetry on a Neumann b.c. must somehow be cancelled! Either bulk our boundary matter may be added to effect the cancellation.
A Dirichlet b.c. for the 3d gauge multiplet behaves in the opposite way to Neumann. Since D sets λ − | ∂ = 0 while leaving λ + unconstrained, it comes with an anomaly for (say) a simple gauge group G. Again, this may be computed either in the UV or the IR. Note that (2.74) contains the anomaly for the boundary flavor symmetry G on a Dirichlet b.c., rather than the bulk gauge symmetry. It is an ordinary 't Hooft anomaly, and does not need to be cancelled.

Relations between gauge theory boundary conditions
When describing boundary conditions for a free 3d chiral, we observed in Section 2.2.1 that D (resp. N) can be "flipped" to N (resp. D) by coupling to boundary matter. In gauge theory, we can look for similar relations between N and D.
Modifying D to N , possibly enriched by any boundary matter, is relatively easy. Let G denote the bulk gauge group. Since D has a global boundary G symmetry, we can "gauge" the boundary symmetry by adding 2d N = (0, 2) gauge fields with gauge group G, together with any other 2d N = (0, 2) degrees of freedom charged under the new G gauge symmetry. (In doing so, we should carefully ensure that all G anomalies cancel.) The resulting boundary condition should be equivalent to N , as the 2d G gauge fields are eaten up by the bulk gauge fields.
In the case of abelian G = U (1) gauge theory, we saw in the previous section that the bulk gauge multiplet may be dualized to a chiral dual-photon multiplet, grouped into two N = (0, 2) superfieldsŜ and Υ. The D b.c. sets Υ| ∂ = 0, and the flip to N introduces a boundary U (1) gauge symmetry with field strength Υ ∂ , coupled toŜ by a superpotential dθ +Ŝ ∂ Υ ∂ . Just as in Section 2.2.1, this coupling modifies the b.c. tô For general G, there is no systematic operation that maps a generic N boundary condition to a D boundary condition. In the case of abelian G = U (1) gauge theory, it is possible to modify N to D by promoting the boundary FI parameter to a dynamical chiral superfield. Comparing to (2.70) we see that this is essentially a D → N flip for the dual photon.

BPS equations and singular boundary conditions
So far, we have focused on UV boundary conditions defined by fixing the values or normal derivatives of various fields at the boundary. There is another possibility that we briefly discuss, though it will not play a major role in this paper: we may require the bulk fields to have a singular profile in the neighborhood of the boundary that is compatible with N = (0, 2) SUSY. A prototypical example of a singular half-BPS boundary condition (the Nahm pole b.c.) was introduced by [58,59,125,126] in the context of 4d N = 4 super Yang-Mills theory, and we follow the basic logic of [58,59] here.
One inspiration for considering singular boundary conditions arises from the IR behavior of D c b.c. Recall from Section 2.1 that D c boundary conditions for chiral multiplets may flow to useful superconformal boundary conditions in the presence of gauge fields. In fact, in non-supersymmetric theories, D c -type b.c. may lead to conformal boundary conditions even in the absence of gauge fields! A notable example is a real 3d scalar with a φ 4 potential, which flows to the 3d Ising CFT. This theory admits a conformal boundary condition that flows from φ| ∂ = c in the UV, known as the "exceptional transition" boundary condition [127]. In the IR, the operator φ simply diverges at the boundary, as the RG flow sends the scale c to infinity.
We thus find it natural to ask: in a given 3d N = 2 gauge theory, can we define singular boundary conditions directly in the UV that flow to the same IR superconformal boundary condition as some D c ? The answer, in certain cases, seems to be affirmative.
In general, in a Lagrangian QFT, a disorder operator supported on a submanifold S may be defined by finding a singular solution to the equations of motion in a neighborhood of S, and requiring fields to asymptotically approach this solution when performing the path integral. One may further require that the operator preserves certain symmetries (e.g. flavor symmetry, supersymmetry, conformal symmetry...). These symmetries must then leave invariant the singular solution to the equations of motion. In the case at hand, we want to define a singular boundary condition that preserves 2d N = (0, 2) supersymmetry, so we look for solutions to the equations of motion that are fixed by the N = (0, 2) subalgebra of 3d N = 2; in other words, we look for solutions of the N = (0, 2) BPS equations.
In a 3d gauge theory with chiral matter, most of the BPS equations for scalar fields can be deduced by rewriting the theory in 2d N = (0, 2) superspace (as in Sections 2.1, 2.2, 2.5), and requiring E, J, and D terms to vanish. Let's describe these in turn.
• The vanishing of E terms requires fields to sit at a critical point of the 3d superpotential, dW = 0.
• The vanishing of J terms sets for the bosonic component φ of each 3d chiral, where D ⊥ −σ is the complexified covariant derivative perpendicular to the boundary. Here σ ∈ g implicitly "acts" on φ in the appropriate representation; for example, if the gauge group is G = U (1) and φ has charge q, the equation (2.76) would read (∂ ⊥ − iqA ⊥ − qσ)φ = 0.
• The vanishing of D terms as in (2.59) schematically sets We can now specialize to the definition of UV boundary conditions. In the UV, we expect CS terms to be subleading compared to YM gauge kinetic terms. Indeed, they will provide subleading corrections to the solutions we describe.
It is natural to look for solutions where the fields have a singular power law behaviour near the boundary. In an axial gauge, (2.76) immediately tells us that with s some constant element of the Lie algebra that determines the scaling behavior of all chiral fields near the boundary. On the other hand, (2.77) then requires the matter moment map µ matter to diverge as s (x ⊥ ) 2 near the boundary.
For simplicity, we can restrict ourselves to solutions where the chiral fields have the minimal divergence compatible with the behaviour of the moment map, i.e.
Restoring dimensionful units, that would become u ex ⊥ , with u dimensionless and φ and e of dimension 1 2 . The differential equations thus collapse to ordinary equations: These solutions are a close analogue of the Nahm pole boundary conditions. Indeed, the Nahm pole boundary condition occurs precisely in this setting for 3d N = 4 gauge theory [106], where only the adjoint chiral in the N = 4 gauge multiplet acquires a singularity. Then s and u are generators of an su(2) embedding in the gauge group. The resulting boundary conditions preserve N = (0, 4) SUSY in that case.
Surprisingly, the equations (2.80) have solutions even for simple abelian gauge theories. For example, if G = U (1) and φ consists of a single chiral of charge 1, we can simply take s = 1 and u = 1. The resulting boundary condition preserves the same symmetries as a (D,D c ) boundary condition and presumably flows to the same boundary condition in the IR.
In general, these singular boundary conditions require the boundary gauge symmetry to be broken to gauge transformations that leave s and u fixed. The residual gauge group may then be broken further and/or coupled to extra boundary degrees of freedom.
We leave a full discussion of such boundary conditions to future work.

Building the half-index
In this section, we give the basic rules for computing the half-index of various boundary conditions. Formulae for the half-index with Neumann (N ) b.c. for gauge multiplets (and various b.c. for matter) were derived in [50,51,55]. We review these results, and propose a generalization to Dirichlet (D) b.c. for gauge multiplets that involves a sum over monopole sectors.
The half-index may be defined as the character of the vector space of local operators on the boundary: for a 3d N = 2 theory T with a N = (0, 2) boundary condition B, the half-index is a trace 12 where R is the R-charge operator, J generates Spin(2) U (1) J rotations in the plane of the boundary, and e is a flavor charge operator, measuring charges under a maximal torus of the flavor symmetry group on the boundary. The character (3.1) counts operators in the 12 Often one finds the expression Tr(−1) F q J+ R 2 x 2 instead of (3.1), where F = 2J is fermion number. As long as all R-charges can be chosen to have integral values, the two formulae are simply related by substituting q -25 -cohomology of the supercharge Q + , which is part of the N = (0, 2) algebra preserved by a half-BPS boundary condition. 13 For a superconformal boundary condition, with the superconformal assignment of Rcharges, the half-index should begin with '1 + ...' and thereafter only contain positive powers of q. More generally, the same properties should hold a 3d N = 2 gauge theory and a 2d N = (0, 2) boundary condition B that flows to a superconformal boundary condition in the infrared, assuming an appropriate assignment of R-charges. In the gauge theory there is typically some range of R-charge assignments that preserve the positivity of J + R 2 . If one can choose integral R-charge assignments within this range (which will be true for the theories considered in this paper), then we expect i.e. the half-index is a formal Taylor series in q, whose coefficients are Laurent polynomials in x, themselves with integer coefficients. An equivalent definition of the half-index is as a hemisphere 'HS 2 ×S 1 ' partition function, with the boundary condition B placed at the equatorial boundary of the hemisphere HS 2 and wrapping S 1 . This perspective is amenable to a localization computation [55]. In this section, however, we take the perspective of counting boundary local operators seriously, and employ physical intuition to derive practical formulae for the half-index.
The general formula for the half-index of a Lagrangian 3d gauge theory, summarized in Section 3.5, takes the schematic form II gauge multiplets × II 3d matter multiplets × I 2d boundary index .
This is further projected to gauge-invariant operators (given a N b.c. for gauge fields) or summed over monopole sectors (given a D b.c. for gauge fields). We describe the various ingredients, from right to left.
Notation: In formulae for the half-index, we use the q-Pochhammer symbols Also, for a general symmetry group G we work with a vector of fugacities x ∈ T C valued in the maximal torus of G. If R is a (unitary) representation of G, and λ ∈ wt(R) Hom(T C , C * ) a weight of R, then the fugacity corresponding to the λ weight space is λ(x), which we denote with the more common notation x λ .
In this section, we will work in Euclidean signature and use complex coordinates z,z in the plane parallel to the boundary, so that the (∂ − , ∂ + ) derivatives become (∂ z , ∂z).

2d theories
A purely two-dimensional N = (0, 2) theory may be considered a boundary condition for a trivial three-dimensional bulk. In this case, the half-index is simply the elliptic genus of the 2d N = (0, 2) theory [84][85][86] -or, more accurately, the "flavored" generalization of the elliptic genus discussed in [50,[87][88][89]. We refer to these latter references for details, and simply summarize the main features here.
For a 2d N = (0, 2) gauge theory, the elliptic genus may be constructed as a UV index, by starting with a product of elliptic genera for matter multiplets, then projecting to gaugeinvariants by doing an integration along the torus of the gauge group. Superpotentials (E and J terms) only affect the index insofar as they constrain flavor symmetries.

Matter
The index of a 2d chiral multiplet Φ = φ + θ + ψ + + ... of charge +1 under a U (1) x flavor symmetry (with fugacity 'x') and R-charge 0 is On the RHS, we use q-Pochhammer notation (x; q) ∞ := n≥0 (1 − q n x). This is the inverse of a Jacobi theta function, up to a 1/(q; q) ∞ prefactor. The operators in Q + -cohomology counted by this index are φ and its ∂ z derivatives, ∂ zφ and its further ∂ z derivatives, and normalordered monomials in these basic operators. Indeed, the supersymmetry transformations take the form The operators ∂ n z φ (n ≥ 0) are Q + -closed on the nose; while the operators ∂ n+1 zφ (n ≥ 0) obey Q + ∂ n+1 zφ ∼ ∂ n+1 zψ + and are closed modulo the Dirac equation, which sets ∂ zψ+ = 0. Since the flavor charges, R-charges, and spins are and these operators are all bosonic, the index (3.5) results.
Similarly, the index of a 2d Fermi multiplet Γ = γ − + ... counts the operators ∂ n z γ − and ∂ n zγ − (n ≥ 0) and normal-ordered polynomials thereof. If Γ has U (1) x flavor charge −1 and R-charge 1, then these operators have charges and remembering that they are fermionic leads to the index The fact that F(x; q) = C(x; q) −1 is not coincidental. It reflects the fact that a chiral multiplet and a Fermi multiplet of the charges given above can be coupled via a superpotential dθ + ΦΓ that preserves flavor and R-symmetry. The superpotential makes all the fields massive, triggering a flow to a trivial theory in the infrared, whose index is trivial due to the identity F(x; q)C(x; q) = 1.
We also see that F(x; q) = F(qx −1 ; q). This reflects the fact that a free Fermi multiplet may equivalently be encoded in a superfield Γ = γ − + ... orΓ =γ − + .... In the presence of gauge fields and superpotentials, the fundamental ambiguity in how one treats the on-shell Fermi multiplet persists, though the relation between superfields Γ andΓ is somewhat more interesting: it can be interpreted as a fermionic remnant of 2d N = (2, 2) T-duality that we describe in Appendix A.

Gauge fields
In pure 2d N = (0, 2) gauge theory with compact gauge group G, the G gauge multiplet takes the same form as (2.58). The gauginos and their derivatives are in Q + -cohomology. In particular, Q + λ − = 0 and Q + D zλ− ∼ D z F zz = 0 by the equations of motion, so the operators contributing to the index are where s ∈ T C is the fugacity for the G symmetry, and α ∈ wt(adj) are the weights of the adjoint representation (including the zero weights), counted with multiplicity. These operators provide a contribution α∈wt(adj) (qs α ; q) ∞ (qs −α ; q) ∞ in the index, which can usefully be rewritten as Projecting to G-invariants by integrating over the torus of G with a Vandermonde determinant (3.12) For 2d gauge theory coupled to chiral or Fermi matter multiplets, the index is obtained by combining the gauge and matter contributions: For example, given a chiral multiplet (of R-charge zero) in representation R of G, and a Fermi multiplets (of R-charge 1) in representation R of G, the matter index takes the form . The formula (3.13) combines operators from the chiral and Fermi multiplets with gauginos, and projects to G-invariants.

3d chirals
We perform an analysis analogous to that of Section 3.1.1 to find the half-index for 3d chiral multiplets.
We begin with a single free 3d N = 2 chiral multiplet Φ 3d , with charge +1 under a U (1) x flavor symmetry (with fugacity x) and charge zero for U (1) R . Recall from Section 2.1 that Φ 2d decomposes into a N = (0, 2) chiral multiplet Φ = φ + θ + ψ + + ... and a Fermi multiplet Ψ =ψ − + .... In the 3d bulk, the operators ∂ n z φ and ∂ n zψ − are in Q + -cohomology. However, in contrast to Section 3.1.1, the operators ∂ zφ and ψ − (and their further derivatives) are no longer Q + -closed: we have Q + (∂ zφ ) ∼ ∂ zψ+ and Q + (ψ − ) ∼ ∂ ⊥ φ, neither of which are set to zero by the 3d equations of motion. Thus, the bulk operators potentially contributing to an index are On a Neumann (N) boundary condition, all the ∂ n zψ − operators are killed. The bosonic ∂ n z φ operators survive, and lead to the half-index On a Dirichlet (D) b.c., the ∂ n z φ operators are killed while the fermionic ∂ n zψ − operators survive, giving a half-index In a similar way, a 3d chiral multiplet of R-charge ρ has half-indices II N ((−q 1 2 ) ρ x; q) and II D ((−q 1 2 ) ρ x; q), obtained by a standard shift in fugacities x → −q 1 2 x.

Flips
We can use these basic half-indices to test the operations that "flip" between N and D b.c., as in 2.2.1. We expect that a 3d chiral with N b.c. coupled to a 2d boundary Fermi multiplet of opposite flavor charge is equivalent to D b.c.; and conversely that a 3d chiral with D b.c. coupled to a boundary chiral multiplet of the same flavor charge is equivalent to N b.c. These operations are reflected in the obvious identities

D c and singular b.c.
A D c boundary condition, where Φ ∂ = c is set to a nonzero value at the boundary, is very similar to D b.c. The same ∂ n zψ − operators survive. However, U (1) x flavor symmetry is broken, and U (1) R symmetry is preserved precisely if Φ has R-charge zero. Correspondingly, the half-index is This analysis indicates how we should treat D c boundary conditions in more interesting gauge theories with chiral matter, superpotentials, etc.: the index may first be written down for D b.c., and then "deformed" to D c by specializing the flavor fugacities of the relevant chiral multiplets according to the broken flavor symmetry, i.e. x → 1. The specialization is done in the entire index.
The 3d gauge multiplet decomposes into a 2d gauge multiplet with fermionic field strength Υ and a chiral multiplet S, as discussed in Section 2.5.1. Given a Neumann (N ) boundary condition, only the operators formed out of the fields in Υ survive at the boundary. Ignoring gauge invariance for the moment, the operators in Q + -cohomology are as follows.
In a pure gauge theory, the elementary bulk operators in Q + -cohomology are the gaugino λ − and its D z -derivatives. In contrast to a purely 2d gauge theory, D z λ − is no longer closed, since Q + D z λ − ∼ D z F zz is no longer set to zero by the 3d equations of motion. Thus, the operators contributing to the half-index for gauge group G are The full contribution to the index from polynomials in the D n z λ − is As in 2d, the fugacity s is valued in the complexified torus T C of G. Projecting to gaugeinvariants with a contour integral and a Vandermonde determinant leads to The half-index for a N b.c. is not directly sensitive to a bulk Chern-Simons level. However, since gauge symmetry is preserved by a N b.c., the boundary gauge anomaly must be cancelled. The computations of anomalies in Section 2.5.4 show that unless additional matter is present, a N b.c. for pure gauge theory only makes sense at Chern-Simons level k = −h. Thus it is only for k = −h that (3.21) computes an actual half-index.
In the presence of bulk or boundary matter, other Chern-Simons levels are possible. Matter is incorporated into the half-index in a standard way: • The 2d index of boundary matter (or a boundary gauge theory, or a boundary CFT) should be inserted directly into the integrand of (3.21). The 2d theory will typically have a G flavor symmetry that is gauged in coupling to the bulk, thus the 2d index will depend on the fugacity s.
• For 3d chiral matter with N b.c., D b.c., D c b.c., or some combination thereof, the halfindex is computed as if G were a flavor symmetry, and then inserted into the integrand of (3.21). (Note that D c b.c. are not possible for 3d chirals charged under G, if gauge symmetry is to be preserved at the boundary.) For example, a G gauge theory with a chiral multiplet in representation for N and D b.c. on the chiral, respectively. Additional fugacities may be added for flavor symmetries. Again, cancellation of the gauge anomaly constrains the bulk CS level. Here As observed in many analogous index computations, and in particular in (0, 2) elliptic genus calculations [52,88,89], doing the integration carefully may require careful contours prescriptions. As long as the 2d index of boundary matter does not contribute poles to the integrand for 3d gauge fields, our naive operator-counting approach works in a straightforward way. This will be the case in many of our examples, where the boundary matter is a collection of 2d Fermi multiplets.
If the 2d index of boundary matter does contribute poles, then our naive approach would need to be re-considered. There is a simple strategy which should work: replace N b.c. with a combination of D b.c. and 2d gauge fields and then apply the known contour prescriptions for contour integrals associated to 2d gauge fields.

3d gauge symmetry: D b.c. and boundary monopoles
Now consider pure 3d gauge theory in the presence of a Dirichlet (D) boundary condition.
The λ − gaugino is killed, but there are other operators in Q + -cohomology formed from the leading component σ +iA ⊥ of S and its D z derivatives. Recall that D b.c. breaks G gauge symmetry to a global G ∂ symmetry at the boundary, allowing only gauge transformations that are constant along the boundary. Nevertheless, one may still perform "residual" gauge transformations that depend on x ⊥ , given by elements g(x ⊥ ) ∈ G that restrict to the identity at the boundary. The boundary operator σ + iA ⊥ is not quite invariant under these residual gauge transformations, and its further D z derivatives are invariant, and generate the Q + -cohomology. They have charges leading to a half-index Here s is a fugacity for the boundary G ∂ symmetry, and there is no need for any projection to G-invariants.
Note that F z⊥ is the chiral current for the G ∂ flavor symmetry on the boundary. Thus, the operators in (3.24) may be interpreted as positive modes of a complexified version of this current. Alternatively, in an abelian gauge theory, the operators in (3.24) are just modes of the dual photon.
In a 3d gauge theory with D b.c., coupled to 3d and/or 2d matter, the index (3.25) is simply multipled by the matter index. As usual, the matter index may depend on the fugacity s. For example, a 3d gauge theory with a chiral multiplet of R-charge zero in representation R of G, with D b.c. for the gauge multiplet and (say) D b.c. for the chiral, has boundary operators counted by the index So far, the index is completely insensitive to a bulk Chern-Simons coupling. There is no need to cancel the 't Hooft anomaly for G ∂ .

Boundary monopole operators
In truth, (3.25) and (3.26) must be supplemented by nonperturbative contributions from monopole operators. The D b.c. for gauge fields are just right to support boundary monopoles with a conserved topological charge, which enhance the space of local operators. The basic analysis of these operators appeared in [60], and we review the main ideas here. It is well known (cf. [3,128]) that one can define a BPS monopole operator (that is, in particular, Q + -closed) in the bulk of a 3d N = 2 theory as a disorder operator, by specifying a singular solution to the BPS equations For gauge group G = U (1), the basic solutions are Dirac monopoles: they have σ = m 2r , where r is the radial distance from the singularity and m is a constant. The condition that the flux through a 2-sphere surrounding the singularity be quantized, S 2 F ∈ 2πZ, constrains m ∈ Z . For general gauge group G, the singular solutions to (3.27) come from embeddings of the basic abelian monopole σ = 1 2r into G, and are thus labelled by cocharacters where T ⊂ G is the maximal torus of G. (More accurately, the embeddings are labelled by cocharacters modulo the action of the Weyl group.) In the present case, we want to consider a monopole operator on the boundary, defined (say) by a singular solution to (3.27) on a half-space. It is easy to see that in abelian G = U (1) gauge theory the basic solution for the scalar field is compatible with supersymmetric D b.c. (2.64)-(2.65), which do not constrain σ ∂ of F z⊥ ∂ , but set F zz ∂ = 0. One can also find a gauge transformation near the boundary so that the connection A corresponding to (3.29) satisfies A ∂ = 0 away from z =z = 0. More generally, we can use a cocharacter m as in (3.28) to embed the basic abelian solution (3.29) into any gauge group G, thus defining a boundary monopole operator of "charge" m.
Geometrically, one may think of boundary monopole operators as follows. Take G = U (1). Consider surrounding an operator O at x ⊥ = z =z = 0 with a hemisphere HS 2 . The D b.c. trivializes the principal G bundle at the boundary and sets A z ∂ = Az ∂ = 0 there. In particular, D b.c. trivializes the G-bundle on ∂(HS 2 ) = S 1 . In the interior of HS 2 , the bundle may be topologically nontrivial, and its topological type is precisely measured by the curvature integral This is the monopole charge of O. The curvature integral gives a well-defined integer precisely because of the trivialization at the boundary, and the boundary condition A z ∂ = Az ∂ = 0. 14 In the case of the full 3d index (or S 2 × S 1 partition function), it is well known how bulk monopole operators contribute. A localization computation [79,91] expresses the full 3d index as a sum over flux sectors on S 2 , i.e. over cocharacters of G. Notably, this is a sum over abelian flux sectors, i.e. over all cocharacters rather than their Weyl-orbits. The localization computation for the half-index with D b.c. proceeds a similar way, summing over abelian fluxes on the hemisphere.
We are led to a complete, nonperturbative formula for the half-index of the form (3.31) Here all the fugacities s for the boundary G ∂ symmetry have been shifted s → q m s, reflecting the fact that electrically charged states acquire spin in the presence of magnetic flux. In terms of operators, one would expect that a monopole of charge m dressed by operators of electric charge λ ∈ wt(G) acquires spin m · λ. In addition, in the presence of a Chern-Simons coupling at level k, even a bare monopole operator is induced to have nontrivial electric charge km and spin k 2 Tr(m 2 ). 15 This leads to the extra weight q 1 2 k Tr(m 2 ) s km in the monopole sum. We propose that for boundary monopole operators the correct Chern-Simons level to include in the index (3.31) is not the bare UV Chern-Simons level k from the bulk, but rather an effective k eff := CS level that captures the total boundary G ∂ anomaly, including shifts from gauginos and bulk or boundary matter (3.32) In other words, k eff is such that the boundary anomaly I 2 is the exterior derivative of a Chern-Simons form at level k eff . A strong argument for using this effective level comes from observing that bulk Chern-Simons terms in the presence of D b.c. are equivalent in the IR to boundary chiral matter, and the effective level k eff (or more accurately, the boundary anomaly) is the only quantity that consistently captures the effect of both. We will thoroughly test the proposed use of k eff in many examples. It would be satisfying to reproduce this proposal using localization, as in the case of Neumann boundary conditions [55]. As a simple test, consider an abelian G = U (1) bulk gauge theory at level k − 1 2 with a 3d chiral of U (1) ∂ charge +1 and R-charge +1 (for convenience). By our proposal, the half-index of D b.c. on the gauge multiplet and N b.c. on the chiral is computed by Similarly, the Cartan-Killing form is implicitly being used to transform a magnetic charge m ∈ cochar(G) to an electric charge km ∈ wt(G), so that s km makes sense.
which reflects the boundary anomaly Similarly, the half-index with D b.c. on the chiral is computed by These two boundary conditions should be related by a flip, e.g. (D,N) should be equivalent to (D,D) coupled to a boundary Fermi multiplet Γ of U (1) ∂ charge −1 and R-charge zero. Accordingly, we find due to the theta-function identity Then, given D b.c. for all of G, one sums over cocharacters m ∈ cochar(G) ⊂ g, which by the embedding G ⊂G may also be thought of as cocharacters m ∈ cochar(G) ⊂g. In the monopole sum, all fugacities are shifteds → q ms (meaning explicitly (s, x, −q  For example, in pure 3d U (1) gauge theory at level k, with a D b.c., the boundary anomaly polynomial is kf 2 + 2ff x , where f x is a field strength for the topological U (1) x flavor symmetry (the R-symmetry does not enter here). The corresponding bilinear form is k 1 1 0 . Letting s, x denote the fugacities for the boundary U (1) ∂ symmetry and for U (1) x , the half-index becomes

Comparison between D and N
We now have prescriptions for D and N boundary conditions. when the D and N boundary conditions are both well-defined (with the same boundary conditions on the rest of the other super-multiplets), it should be also possible to obtain the half-index of N boundary conditions by 2d gauging the half-index of the corresponding D boundary conditions. If the boundary matter does not contribute poles to the index, so that we do have a reliable prescription for both sides, it should be possible to match the answers of our two prescriptions.
We will not do so in detail, but the match is intuitively clear: in the correct circumstances the N contour integral can be executed on C * , picking a semi-infinite sequence of poles. On the other hand, the 2d contour integral will only pick the poles in (3.31) which lie in the fundamental region |q| < |s| < 1. These come again in semi-infinite sequences labeled by the magnetic charge m, as the q m shifts push the poles out of the fundamental region when m is sufficiently large with the appropriate sign.
On the other hand, as we mentioned before, when the boundary matter does contribute poles to the index, then we expect the 2d prescription applied to (3.31) to produce the correct, unknown prescription for the half-index of N boundary conditions.

Summary
Altogether, the computation of a half-index involves of a 3d N = 2 gauge theory T with a 2d N = (0, 2) boundary condition B involves: 1. Computing a 2d index I 2d , as in Section 3.1, for any 2d N = (0, 2) theory that is coupled to the bulk in defining B.
2. Multiplying by II N or II D half-indices for all 3d chiral multiplets as in Section 3.2, depending on whether these multiplets are given N or D b.c., prior to coupling to any 2d matter.
3. Integrating over fugacities (i.e. projecting to invariants) for the part of the bulk gauge group given N b.c., using the measure (3.21) from Section 3.3.
4. Summing over monopole sectors for the part of the bulk gauge group given D b.c., with the "measure" (3.31) from Section 3.4, along along with shifts of fugacities and the effective Chern-Simons contribution from (3.31).
5. For any boundary flavor symmetries broken by D c b.c. or singularities such as Nahm poles, setting the corresponding fugacities to 1, as in Section 3.2.2.

Line operators
A useful modification of the half-index comes from including a half-BPS line operator that preserves the Q + supercharge. Here we envision a line operator L supported on a ray perpendicular to the boundary, as in Figure 2, hitting the boundary at (say) the origin z =z = 0.
Such a line operator can preserve a full 1d N = 2 subalgebra of 3d N = 2 generated by Q + and Q − . The half-index can be defined to count local operators at the intersection of L and the boundary. 16 Alternatively, under a state-operator correspondence, the half-index with a line operator L can be interpreted as a D 2 × S 1 partition function with L inserted along {0} × S 1 .

L B
M L There are two simple types of line operators that we will consider here. The first is a supersymmetric Wilson line W R in representation R of the bulk gauge group, defined as If the gauge multiplet is given Neumann (N ) b.c., the boundary operators at the end of W R are no longer gauge-invariant, but rather must be in representation R. The half-index is accordingly modified by inserting a character which precisely projects to operators in representation R. Alternatively, if the bulk gauge multiplet is given Dirichlet (D) b.c., the boundary operators at the end of W R are simply tensored with the representation R of the G ∂ boundary flavor symmetry. In the presence of W R and monopole flux, this can modify the spin of boundary operators by the mechanism of Section 3.4; accordingly, the half-index takes the form D : Tr R (q m s)II matter,CS .
(3.43) 16 These form a module ML for the usual chiral algebra of boundary local operators (since there is an OPE between generic boundary local operators and boundary local operators stuck to the endpoint of L). Thus, the half-index in the presence of L can be interpreted as a character of the module ML. This is analogous to the behavior of the 4d N = 2 index in the presence of a surface operator [129,130].
More trivially, we can insert a bulk Wilson line for a flavor symmetry rather than a gauge symmetry. This again just tensors the boundary operators by representation R for the flavor symmetry, and multiplies the entire half-index by Tr R (x), where x is the flavor fugacity. A second simple type of line operator is a vortex line V n for an abelian gauge or flavor symmetry, which can be understood as an insertion of n units of flux through the z,z plane. More precisely, V n is a disorder operator that requires the connection to attain the singular profile A ∼ n dθ near z =z = 0. Working in holomorphic gauge Az = 0, this profile looks like Vortex lines for a dynamical abelian gauge symmetry are relatively boring, as they can be screened in the bulk (in other words, the gauge transformation g(z) = z n can be undone). With N b.c. for the gauge symmetry, they can also be screened on the boundary, so the N half-index is insensitive to a V n insertion. This is manifest in (3.46), since the shift s → q −n s is invisible after one integrates over s (projects to gauge invariants). With D b.c., the vortex line does have a mild effect, as it leaves behind a singularity on the boundary. The shift s → q −n s could be removed from the monopole sum (3.31) by redefining m → +n, were it not for the additional prefactor q 1 2 k eff Tr(m 2 ) s k eff m , controlled by effective Chern-Simons terms. Due to this extra prefactor, the D half-index obeys where x is the fugacity for the topological U (1) symmetry dual to the bulk G gauge symmetry. This identity reflects the classic phenomenon that, in the presence of Chern-Simons terms, a vortex line for an abelian gauge symmetry is equivalent to a Wilson line -here, a Wilson line both for G and the topological U (1).

Difference equations
The bulk 3d index, S 3 partition, and holomorphic blocks of a 3d N = 2 theory all satisfy a common set of difference equations [18,67,73]. On the holomorphic blocks B(x; q), which depend on fugacities x i for each bulk flavor symmetry, 17 the difference equations take the form f a (p i , x i ; q) · B(x, q) = 0 , (3.48) where the f a are a finite set of polynomials in the q-commuting operators p i , x i , which obey The x i operators act on B(x; q) by multiplication, while the p i operators act by a q-shift, sending x i → qx i . The 3d index and S 3 partition functions obey two sets of equations of the form (3.48), involving two mutually commuting copies of the algebra (3.49) and exactly the same polynomials f a . Physically, all these difference equations are a consequence of identities in the algebra of half-BPS line operators of the 3d theory -in particular, identities among abelian vortex lines and flavor Wilson lines [18,131]. 18 We therefore expect that 3d half-indices would also satisfy (3.48). This turns out to be true, up to a small modification controlled by the boundary 't Hooft anomalies.
To understand the modification, we consider a 3d N = 2 theory with U (1) x flavor symmetry, and a boundary condition that preserves this flavor symmetry. Suppose that the half-index obeys some difference equation This argument is easily generalized to determine how any shift in the boundary 't Hooft anomaly modifies operators acting on the half-index. To express the result concretely, suppose that the difference in boundary 't Hooft anomalies is encoded in a quadratic polynomial δI 2 (x i , r). Let q = e β , so that we may represent p i = exp βx i ∂ ∂x i . Then the shift in anomalies modifies difference operators by conjugation, or simply Despite the complicated-looking expression, (3.54) is simply a redefinition of p i by a monomial in the x's. For example, if there is a single U (1) flavor symmetry and we shift the anomaly by δI 2 (x, r) = x 2 as above, then just as in (3.52). The appearance of 'iπ + β 2 ' in (3.54) reflects the fact that the U (1) R fugacity in the half-index is exp iπ + β 2 = −q 1 2 . We can now understand which operators will actually annihilate the half-index of a UV boundary condition in a 3d N = 2 theory. Suppose that no flavor symmetry is broken by the boundary condition: so the chirals all have N or D b.c. (not D c ); and in the case of N b.c., there is no mixed gauge-flavor anomaly. If the boundary 't Hooft anomaly were exactly zero, we would expect the very same difference operators (3.48) to annihilate the half-index f a (p i , x i ; q) · II(x; q) = 0 .
(3.56) This is consistent with the fact that the holomorphic blocks of [67] were carefully engineered to have zero boundary anomaly. In addition, given D b.c. for the gauge multiplets, there are additional equations expressing independence under q-shifts of the G ∂ fugacities 's', namely When the boundary anomaly is not zero, we use (3.54) to modify the difference operators accordingly. Explicitly, given a boundary anomaly c.), we conjugate the p's and p s in (3.56)-(3.57) by For example, after conjugation, we recover from (3.57) the simple difference equation (3.47) relating G ∂ vortices and Wilson lines. If a symmetry is broken by the boundary condition, its fugacity (say 'y') should be subsequently removed from the difference operators by first eliminating the dual operator p y from (the conjugated versions of) (3.56), (3.57), and then setting y → 1.
We will give a few examples of these difference operators below. The fact that the same f a (up to monomial redefinitions) annihilate UV half-indices and holomorphic blocks (and full indices and S 3 partition functions) can actually be seen explicitly from the formulaic definitions of all these objects. In each case, simple chiral-matter partition functions are multiplied together, then gauge fugacities are integrated over (and/or monopole sectors summed over). The difference equations can correspondingly be constructed step by step, starting from elementary equations satisfied by free chirals. 19 The steps are identical, up to simple monomial redefinitions, no matter which object is being considered.

Particle-vortex triality
The simplest dual pair of 3d N = 2 theories is actually part of a mirror "triality," involving theories This is the simplest example of 3d N = 2 "mirror symmetry" [1], and also follows from deforming the SQED ↔ XYZ duality of [3] by a large real mass [18]. The triality played a fundamental role in the 3d-3d correspondence, where it encoded a Z 3 rotation symmetry of a tetrahredron [18]. This triality is a supersymmetric version of classic particle-vortex duality, and can be used to derive both bosonic and fermionic versions of non-supersymmetric particlevortex duality [24,25,34].

Free chiral
Let's first focus on theory T . We define T to contain a free 3d N = 2 chiral multiplet (Φ, Ψ) of charge ρ = 0 for U (1) R R-symmetry and charge +1 for a U (1) x flavor symmetry. As in [18], we add − 1 2 units of background Chern-Simons coupling for U (1) x to cancel a parity anomaly. Specifically, the anomaly polynomial encoding the bulk UV (background) Chern-Simons couplings is The two basic N = (0, 2) boundary conditions for the free chiral are Neumann (N, Ψ| ∂ = 0) and Dirichlet (D, Φ| ∂ = 0), as in Section 2.1. The corresponding boundary 't Hooft anomalies (Section 2.4) and half-indices (Section 3.2) are anomaly half-index N : Following Section 3.7, we expect that these half-indices satisfy certain difference equations. The difference operator that annihilates the full 3d index of a free chiral is p + x −1 − 1.
Since the boundary anomaly for D b.c. is zero, this should also annihilate II D (x; q), and indeed c., we must conjugate the difference operator by exp − 1 2β (log(x) − iπ − β 2 ) 2 , corresponding to the boundary anomaly. This modifies and changes the difference operator to −x −1 p + x −1 − 1. Thus we expect that (p − 1 + x) · II N (x; q) = 0, and we check that this is true: We may also modify the Dirichlet b.c. to D c (Φ| ∂ = c). This breaks U (1) x flavor symmetry but preserves U (1) R . As discussed in Section 3.2.2, the effect is to set x → 1 in the Dirichlet index. Alternatively, we may first add a flavor vortex line of charge m ∈ Z as in Section 3.6, sending x → q −m x, and subsequently impose D c b.c.; overall, this sets x = q −m in the Dirichlet index. We have: (4.7) Note that the vortex line effectively sets φ ∼ z m at the boundary, which breaks SUSY unless m ≥ 0. Correspondingly, the half-index II Dc,m (q) vanishes unless m ≥ 0.

+ a chiral
Next, consider the theory T . It is a U (1) gauge theory, with a chiral multiplet (Φ , Ψ ) of charge +1 under the gauge group and R-charge ρ = 0. There is also a topological flavor symmetry U (1) x . The bulk UV Chern-Simons levels required for this theory to be dual to T are encoded in the anomaly polynomial In particular, the U (1) gauge symmetry (with field strength f ) has Chern-Simons level + 1 2 . Recall that under the duality T ↔ T , the fundamental chiral of T maps to a monopole operator of T , and (correspondingly) the ordinary flavor symmetry U (1) x of T maps to the topological flavor symmetry of T .
We would like to find boundary conditions for T that are dual to N, D, D c , and D c,m in T . It is most enlightening to begin with N. Notice that the N b.c. leaves the chiral Φ of T free at the boundary. Thus we would expect that a dual boundary condition in T would leave the vev of a monopole operator unconstrained at the boundary. There is only one choice of boundary condition for the gauge fields that has this property, namely Dirichlet (D) as in Sections 2.5, 3.4. Recall that D b.c. has an additional boundary U (1) ∂ flavor symmetry. We try choosing D b.c. for the chiral of T as well, and examine the half-index. To use the prescription for the half-index from Section 3.4, we must compute the boundary 't Hooft anomaly: where now f is the field strength for U (1) ∂ . We read off from this a matrix of effective Chern-Simons levels. The half-index then becomes a monopole sum where we have used 'x' to denote the topological U (1) x fugacity and 'y' to denote the boundary U (1) ∂ fugacity, and the monomial prefactor q This calculation strongly suggests that the (D, D) b.c. for T is dual to N b.c. for the free chiral of T together with a free Fermi multiplet of charge (−1, −1, 1) for U (1) x , U (1) ∂ , U (1) R . The appearance of this extra Fermi multiplet is not a surprise. First, since the (D,D) b.c. for T had a U (1) ∂ symmetry that acted on the boundary but not in the bulk, we would expect a dual b.c. for T to have some purely two-dimensional degrees of freedom charged under this symmetry. Second, we may compare anomaly polynomials (4.9), (4.3), whose difference is precisely the contribution of an extra boundary Fermi multiplet Γ. Thus anomaly matching alone requires Γ. The map of operators across the duality identifies the boundary value Ψ | ∂ in theory T (which is gauge-invariant at the boundary) with the composite operator Φ| ∂ Γ in T . Several more dualities may be inferred from (4.11). The (D, D c ) b.c. for T , which sets Φ | ∂ = c and breaks the U (1) ∂ boundary symmetry, corresponds to setting y → 1 in the 20 For a quick proof that (4.10) and (4.11) are equivalent, it suffices that the two expressions obey the same first-order q-difference equations in x and in y, and that they agree at a particular value of (x, y). In fact, it suffices to use the single difference equation in y, II D,D (x, qy) = − 1 xy II D,D (x, y; q), which follows from F(qxy) = − 1 xy F(xy) in (4.11) and follows from simple manipulations of the sum in (4.10). Then we check agreement at y = 1 (for any x), which is the well-known identity in (4.13).
index. Since (q 1−m y −1 ; q) ∞ vanishes at y = 1 unless m ≤ 0, we find This is actually a well-known q-series identity. It suggests that the (D, D c ) b.c. for T is dual to ordinary D b.c. for T . Similarly, adding an additional vortex line of charge n and then using D c b.c. sets y → q −n 21 x n II D (x; q) , (4.14) which suggests that the (D, D c,n ) b.c. is dual to D b.c. for T together with a flavor Wilson line of charge n (corresponding to x n ) and an extra shift of the background spin and R-charge. More interestingly, we may compute the half-index of (D, N) b.c. for T , which give N b.c. to the chiral. Now the boundary 't Hooft anomaly is just It is convenient to rewrite II N (q n y; q) = II D (q n y; q)/F(q n y; q) = (−1) n q n 2 −n 2 y n II D (q n y; q)/F(y; q) = (−1) n q n 2 −n 2 y n II D (q n y; q) C(y; q), whence II D,N (x, y; q) = C(y; q) 1 (q) ∞ n∈Z (−1) n q n 2 −n 2 y n x n II D (q n y; q) (4.16) = II N (x; q) F(xy; q)C(y; q) . (4.18) This suggests that the (D, N) b.c. for T is dual to the N b.c. for T , coupled to both a boundary Fermi multiplet Γ and a boundary chiral multiplet C. The symmetries and Rcharges are just right for a boundary superpotential coupling Notice how the chiral C may be understood as flipping D to N b.c. for the chiral (Φ , Ψ ) of theory T , by a boundary superpotential coupling Ψ ∂ C; the dual of this coupling in T is precisely (4.19). 21 Here we used F(q −m x) = (−1) m q − m 2 +m 2 x m F(x).
There are also a family of boundary conditions for T that use Neumann (N ) for the gauge multiplet, preserving dynamical U (1) gauge symmetry at the boundary. Some of these were first discussed in [50]. Suppose we combine N with N b.c. for the charged chiral. The boundary anomaly polynomial is 2 f f x , where f is now the curvature of the dynamical gauge symmetry at the boundary. There is no gauge anomaly, so no additional boundary matter is required, but we see that the topological U (1) x symmetry will be broken by a mixed anomaly. Following Section 3.3, the index is simply computed as where s is the gauge fugacity. This can be evaluated by residues to give suggesting that (N , N) b.c. is dual to D c b.c. for T . This is actually a physically sensible answer: the Neumann b.c. for an abelian gauge multiplet sets the scalar σ field equal to a boundary FI parameter, and more generally (as explained in Section 2.5.3) sets the chiral dual-photon field equal to a complexified FI parameter t 2d . In the quantum gauge theory, this means that the monopole operator of T should be set to a nonzero constant ∼ e t 2d at the boundary. The dual statement in theory T is that the chiral field should be set to a nonzero constant, which is exactly what D c b.c. does. A generalization of (4.20) is to add a Wilson line of charge n ending on the boundary. This leads to a projection onto boundary operators of gauge charge −n. The half-index becomes II Nm,N (q) = (q) ∞ ds 2πis s n II N (s; q) = ∞ a=0 q −an (q −1 ; q −1 ) a = (q 1−n ; q) ∞ = II D c,−n (q) . In other words, we find D b.c. for T deformed by a flavor vortex of charge −n. This reflects the standard fact that a Wilson line in abelian gauge theory is equivalent to a vortex line for the topological flavor symmetryi.e. the ordinary flavor symmetry in T . It is worth observing that the (N , N) should be obtainable from (D, N) by gauging the U (1) ∂ boundary symmetry. This breaks U (1) x , but it is useful to keep x in the calculation until the very end. Then the 2d gauging prescription is to multiply II D,N (x, y; q) by (q) 2 ∞ and take the residue at y = 1, leading to II N (x; q) F(x; q). Setting x = 1 we recover II Dc (q).
The physical interpretation of this calculation is somewhat interesting: on the mirror side we have an N b.c. coupled to a boundary theory consisting of an a U (1) gauge theory coupled to a single 2d chiral and a single 2d Fermi multiplet. It appears that the 2d theory flows to a single Fermi multiplet in the IR, the "meson" µ = ΓC, with a dynamically generated fermionic superpotential cµ, which then flips the boundary condition to D c .
We could also combine N b.c. for the gauge fields with D b.c. for the chiral, but this boundary condition does have a gauge anomaly, since its anomaly polynomial is (4.9). In principle, we could also attempt to modify the N b.c. with additional boundary matter in order to cancel the mixed anomaly for the topological U (1) x symmetry. Because of the sign of the anomaly, though, we cannot do so by boundary Fermi multiplets: we need boundary chiral multiplets. For example, (N , D) b.c. together with a boundary chiral multiplet of charges (1, 1, 0) for U (1), U (1) x , U (1) R has a total boundary anomaly polynomial (f − r) 2 so only an 't Hooft anomaly remains.
If we couple the boundary chiral multiplet to the bulk chiral multiplet by a bi-linear fermionic superpotential we simply convert D b.c. back to N b.c. and we do not get anything new. If we do not add such a coupling, the naive half-index takes the form but there is no obvious prescription to deal with the infinite line of poles of C(sx; q) at s = q n x −1 (n ∈ Z). Instead, we can go back to the (D, D) boundary condition, add the 2d chiral field to cancel the U (1) ∂ 't Hooft anomalies and then gauge U (1) ∂ as a 2d gauge symmetry. The resulting index would have an overall factor of II N (x; q) but would vanish, as on the mirror side one has a boundary theory consisting of a 2d U (1) 2d gauge theory coupled to a Fermi multiplet of charge (−1, 1) for U (1) 2d , U (1) R and a chiral multiplet of charges (1, 0) for U (1) 2d , U (1) R , which cancel each other in the index and leave no poles to be picked.
We can interpret this tentatively as a manifestation of spontaneous SUSY breaking. This agrees with the physical picture we discussed for (N , N): in the absence of the coupling Φ| ∂ µ, the dynamically generated cµ fermionic superpotential for the U (1) 2d gauge theory will break SUSY.
We summarize the plethora of dual boundary conditions we have found so far:

+ a chiral
The theory T is similar to T . However, its Neumann boundary conditions turn out to be better behaved, while some of its Dirichlet boundary conditions exhibit bad behavior. We define theory T as a U (1) gauge theory with a chiral of gauge charge +1 and R-charge zero, with bulk UV Chern-Simons levels encoded by the anomaly polynomial As before, f is the field strength of the dynamical gauge field, while −f x is the topological U (1) x flavor symmetry. We start with the Neumann (N ) boundary conditions for the gauge fields, which all behave nicely. Giving N b.c. to the chiral as well, we find a boundary anomaly which can be neatly cancelled by a boundary Fermi multiplet of charges (1, 1, Note that the extra boundary Fermi cancels both the gauge and the mixed gauge-U (1) x anomalies, so this boundary condition preserves the U (1) x topological symmetry. Just as in T , we expect that (N , N) is dual to a Dirichlet-like b.c. for T ; in fact, since U (1) x is preserved, we expect pure D b.c. Indeed, the half-index shows The (N , N) b.c. can be modified by a bulk Wilson line of charge n that ends on the boundary, which keeps boundary operators of gauge charge −n. We expect this to be dual to a bulk flavor-vortex in theory T , which shifts the spins of operators charged under U (1) x . We check: II Nn,N+fermi (x; q) = (q) ∞ ds 2πis s n F(sx; q)II N (s; q) = II D (q −n x; q) , (4.28) as expected. The (N , D) b.c. is even simpler: the boundary anomaly is I N , x , so U (1) x is anomalous, but there is no gauge anomaly to cancel. We would expect this to be dual to D c b.c. for the free chiral, and indeed respectively. Letting y denote the fugacity for the boundary U (1) ∂ symmetry, we find putative half-indices for negative n. In the analysis of bulk indices, such behaviour is usually indicative of a "bad" setup where some operators, such as these boundary monopoles, hit the unitarity bound along the RG flow and the U (1) R in the IR contains emergent symmetries. Our tools are thus insufficient to study the problem.
There is one choice of D b.c. for which the half-index does make sense. If we give D c b.c. to the chiral (possibly with a vortex of charge n) and break U (1) ∂ flavor symmetry, we find Thus, we seem to recover N b.c. for a free chiral, with a flavor Wilson line of charge −n.

Left vs. right boundary conditions, and CS levels
It may appear that there is a curious asymmetry between the available boundary conditions for theories T and T , and their respective duals for the free chiral T . One may well wonder how the sign of a Chern-Simons level, + 1 2 for T and − 1 2 for T can make such a difference. The distinction is indeed irrelevant in the 3d N = 2 bulk. However, when constructing boundary conditions, we implicitly chose • a "right" (vs. left) boundary condition, for a 3d theory on x ⊥ ≤ 0 (rather than x ⊥ ≥ 0) • a 2d N = (0, 2) (vs. N = (2, 0)) SUSY algebra to preserve.
The first choice (right vs. left) controls the sign of anomalies coming from bulk UV Chern-Simons levels. The second choice (N = (0, 2) vs. N = (2, 0)) controls the sign of anomalies from bulk matter and gauginos, since it determines how left-handed vs. right-handed fermions pair up in SUSY multiplets with the bosonic fields. Both choices break the symmetry between positive and negative Chern-Simons levels in the bulk. If we were to reverse both choices simultaneously, then the behavior of boundary conditions for T and T would be exchanged.

Duality interfaces
We would next like to construct a duality interface between the free chiral T and the abelian gauge theories T or T from section 4. In preparation, we discuss some of the general structure of a duality interface.

Factorizing the identity
A systematic way to construct a duality interface for a pair of dual 3d theories T and T ∨ (these could be any theories) involves starting with a pair of UV boundary conditions B and B ! for T alone that can be coupled together in such a way that they flow to the trivial/identity interface in the IR. This "factorization of the identity" is illustrated on the LHS of Figure 3, with B as a right b.c. and B ! as a left b.c. It is not always guaranteed that a suitable pair B, B ! exists. If it does, however, the duality interface can be obtained by dualizing (T , B) to a dual boundary condition (T ∨ , B ∨ ) for the dual theoryi.e. dualizing T on the left half-space -and then coupling (T ∨ , B ∨ ) back to the boundary condition B ! on the right half-space, as on the RHS of Figure 3.
In 3d N = 2 UV gauge theories, we can always find suitable (B, B ! ), often in many different ways. The pair is built up from certain complementary choices of boundary conditions for the matter multiplets and for the gauge multiplets.
Consider a free 3d chiral multiplet. It is not hard to see that taking B = N and B ! = D (or vice versa) factorizes the identity as desired, if the two are coupled together by a quadratic superpotential. To be explicit, let us denote the 2d N = (0, 2) multiplets on the left of the interface (x ⊥ ≤ 0) as (Φ, Ψ), and on the right (x ⊥ ≥ 0) as (Φ , Ψ ). We may deform the product of N b.c. for (Φ, Ψ) and D b.c. for (Φ , Ψ ) by the superpotential In the IR, this has the effect of simultaneously setting Ψ ∂ = Ψ ∂ and Φ ∂ = Φ ∂ , thereby gluing the theory back together. We may also check anomalies. Suppose there is a background Chern-Simons level k for the chiral multiplet's U (1) flavor symmetry. Then the flavor symmetry has boundary 't Hooft c. on x ⊥ ≥ 0 to leave behind zero anomaly, as must be the case if the system flows to a trivial interface in the IR. (Alternatively, B = D can be paired with B ! = N.) In a similar way, the N and D boundary conditions for a 3d gauge multiplet constitute a suitable (B, B ! ) pair. Indeed, there is a canonical coupling between N and D, given by using the dynamical G gauge symmetry on N to gauge the G ∂ boundary flavor symmetry on D. This obviously glues the gauge theory back together, and extends supersymmetrically to identify the entire 3d gauge multiplet across the interface. Moreover, anomalies cancel in essentially the same way as above. For example, for simple G at Chern-Simons level k, the boundary gauge or 't Hooft anomalies are b.c.\ location and cancel between N and D.
In a full 3d gauge theory, we may now construct a suitable pair (B, B ! ) by simply combining a choice of (N,D) or (D,N) for each matter multiplet and a choice of (N , D) or (D, N ) for the gauge group. The procedure should work even in the presence of a bulk superpotential W , as long as sufficiently many D b.c. can be chosen on each side to ensure the vanishing of W at the interface.

Particle-vortex duality interface
Let's illustrate the above construction for theory T (a free chiral) and its duals T (U (1) After re-coupling the B ∨ = (N + 2d fermi) b.c. for T to B ! = (N , N) b.c. for T , we find that the interface has a fairly symmetric description. It is built by: • Placing T on a half-space x ⊥ ≤ 0 with N b.c. (leaving the chiral Φ unconstrained at the boundary) • Placing T on a half-space x ⊥ ≥ 0 with B ! = (N ,N) b.c. (leaving the chiral Φ unconstrained at the boundary) • Adding a 2d Fermi multiplet Γ at the interface x ⊥ = 0 • Coupling the two halves via a cubic superpotential dθ + ΦΓΦ , and identifying (gauging) the U (1) ∂ flavor symmetry on the left with the U (1) gauge symmetry on the right.
We schematically represent this interface as Notice that the charges of the various multiplets are just right to ensure that the interface superpotential ΦΓΦ preserves gauge, flavor, and R-symmetry. More so, by construction, anomalies for all symmetries cancel perfectly: from N b.c. on the left we have −(f x −r) 2 ; from (N ,N) b.c. on the right we have − 1 2 (f −r) 2 + 2 f f x − 1 2 r 2 + 1 2 r 2 − 1 2 (f − r) 2 (note the opposite sign from bulk CS levels, due to the orientation), and from Γ we have (f + f x − r) 2 , which add up to zero. Interestingly, anomaly cancellation forces the interface Fermi multiplet Γ to be charged under the topological U (1) x symmetry of T . The cubic superpotential then identifies U (1) x with the usual flavor symmetry of T .
Notice how the Fermi multiplet Γ mediates the map of operators under the duality. The superpotential dθ + ΦΓΦ modifies the N b.c. for the chirals on either side, from the usual In addition, if we move onto the (bulk) moduli space of T by giving Φ a vev, the Fermi multiplet Γ will become massive. Integrating it out at one loop generates a "field-dependent FI term" on the interface, encoded in the superpotential 22 where Υ is the field strength multiplet in theory T , restricted to the boundary. The superpotential (5.8) now carries the contribution to the mixed gauge-topological anomaly from Γ; in particular, by itself, (5.8) breaks the U (1) x symmetry under which Φ is charged. We now recall from Section 2.5.3 that N b.c. on the gauge multiplet of Theory T is a D b.c. on its dual-photon multiplet S ∨ . In turn, the effective superpotential (5.8) modifies the D b.c. on the dual photon to S ∨ ∂ = J Υ = log Φ. Since the monopole operator of T may be defined in the UV as V ∼ exp(S ∨ ), this induces a relation at the interface, which identifies the vev of the monopole operator of T with the vev of the free chiral of T . We may similarly define a duality interface between T and T (U (1) − 1 2 +a chiral). Now the simplest procedure is to "factorize the identity" for T by coupling D b.c. on x ⊥ ≤ 0 to N b.c. on x ⊥ ≥ 0, and then dualize the left half to (N , N)+fermi for T . We obtain: 22 Superpotentials like this were described and generalized in many ways in, e.g., [52,[137][138][139][140][141]. At its heart, the superpotential is an N = (0, 2) version of the "Σ log Σ" effective twisted superpotential that appears in N = (2, 2) theories and played a fundamental role in 2d mirror symmetry [83,142].
coupled to the bulk via a cubic superpotential dθ + Φ ΓΦ.
It is again straightforward to check that all anomalies cancel. The map of operators also proceeds the same way, mediated by Γ.
The collision between the T T interface and the T T interface now suggests a UV definition for a duality interface between T and T . Since sandwiching T between two N b.c. leaves behind an ordinary 2d chiral multiplet Φ, we expect the T T duality interface to contain two 2d Fermi multiplets Γ, Γ and the 2d chiral Φ, coupled to the bulk chirals Φ , Φ on either side by a superpotential dθ + Φ ΓΦ + ΦΓΦ ) . (5.10) We emphasize that the duality interfaces constructed here are all uni-directional. For example, the interface above between T and T requires T to sit on the half-space x ⊥ ≤ 0 and T to sit on x ⊥ ≥ 0, and not the other way around. The asymmetry comes from our choice in preserving 2d N = (0, 2) SUSY (rather than (2, 0)), as well as the relative signs of the bulk Chern-Simons couplings -much as in Section 4.4. The general methods of Section 5.1 can be used, in principle, to construct duality interfaces going in the opposite directions. However, the construction seems to result in non-perturbative superpotential couplings at the interface, involving boundary monopole operators. 23 We hope to pursue this further elsewhere.

SQED and XYZ
We may extend the techniques used to understand particle-vortex duality to produce dual boundary conditions and a duality interface for the pair of dual 3d N = 2 theories This basic duality was introduced in [3], and may be derived from abelian 3d N = 4 mirror symmetry. One new ingredient is the bulk superpotential W in the XYZ model. As discussed in Section 2.3, boundary conditions for the XYZ model may require extra boundary degrees of freedom to factorize W . We shall mainly consider boundary conditions are "sufficiently Dirichlet," as in Section 2.3.1, so that W is automatically set to zero on the boundary. However, the duality interface will indeed involve a nontrivial factorization.
We use the following conventions. In SQED, the chirals, decomposed into N = (0, 2) multiplets, are denoted (Φ, Ψ), (Φ,Ψ). In XYZ the chirals are (X, Ψ X ), (Y, Ψ Y ), (Z, Ψ Z ), and duality maps the meson ΦΦ of SQED to X, and the monopole operators of SQED to Y and Z. The global symmetry group of SQED comprises a U (1) a axial symmetry, U (1) y topological symmetry, and the usual U (1) R symmetry, under which the various chiral fields have charges The bulk UV Chern-Simons levels for SQED just contain the coupling to the topological U (1) y symmetry, and may be encoded in the anomaly polynomial 2 f y (where y is the U (1) y field strength). This matches identically zero bulk CS terms for XYZ. This identification follows from a careful comparison of sphere partition functions, which are sensitive to background Chern-Simons terms (contact terms), see e.g. [18].

A fundamental duality and the interface
The most interesting dual pair of boundary conditions -and the one that we use to build the duality interface -involves Dirichlet (D) for the gauge multiplet in SQED and D for both chirals. We'll call this (D,D,D). We can derive its mirror in the XYZ model from a simple physical analysis! The (D,D,D) b.c. in SQED should leave the two monopole operators unconstrained at the boundary, while setting the meson ΦΦ to zero. Therefore, we expect that the dual b.c. in the XYZ model is Neumann for Y and Z, and Dirichlet for X. 24 We call this putative dual (D,N,N). Note that, a priori, it requires no further boundary d.o.f., since it sets W | ∂ = 0. However, just as in particle-vortex duality: -(D,D,D) b.c. for SQED has a boundary U (1) ∂ flavor symmetry that's missing in XYZ; -there is a mismatch in boundary 't Hooft anomalies between (D,D,D) and (D,N,N). There is an easy way to fix both of these problems by adding an extra boundary Fermi multiplet on the XYZ side. Indeed, the difference in boundary 't Hooft anomalies (with f , a, y denoting the field strenghts for U (1) ∂ , U (1) a , U (1) y ) This putative duality of boundary conditions immediately leads to a construction of the duality interface, following the logic of Section 5.1. We may start with a factorization of the identity interface in SQED that couples the (D,D,D) b.c. on x ⊥ ≤ 0 to (N ,N,N) on x ⊥ ≥ 0. Dualizing the left half-space leads to XYZ on x ⊥ ≤ 0 with (D,N,N)+Γ b.c., coupled to SQED with (N ,N,N) on x ⊥ ≥ 0. We might schematically, and more symmetrically, denote this as XYZ (D,N,N) Γ SQED (N , N,N) . (6.5) Here the U (1) gauge symmetry on the right is used to gauge the U (1) ∂ flavor symmetry of Γ.
In addition, there must be some boundary superpotential couplings! There is essentially a single possibility compatible with the global symmetries and with factorization of W ; we propose where Γ is given both J and E terms J Γ = Y Φ, E Γ = ZΦ. This could actually be deduced from the original coupling in the factorization of the identity interface and the map of operators across the duality. The coupling (6.6) actually treats Φ,Φ and Y, Z symmetrically, though it does not look so, since we may always replace Γ with its "T-dual" Γ † whose E and J terms are swapped (cf. Appendix A). To check that (6.6) provides a matrix factorization of the bulk superpotential on the XYZ side, we first observe that the Ψ X ΦΦ coupling sets at the interface; then = XY Z (6.8) as required.
The proposed interface gives the expected map of operators. The relation between X and the meson ΦΦ is explicit in (6.7). In addition, the E and J terms for Γ modify the N b.c. for Y, Z, Φ,Φ as in Section 2.2: Finally, the relations involving monopole operators may be deduced from quantum corrections to the interface superpotential (just like in (5.8) for particle-vortex duality). We may give a vev to either Y or Z (but not both, due to the bulk X 3d Y 3d Z 3d superpotential) and make Γ massive at the boundary. Integrating Γ out at one-loop generates interface superpotentials where Υ is the field strength in SQED, restricted to the interface. These modify the D b.c. for the monopoles V ± of SQED to Unlike the case of particle-vortex dualities, the duality interface between SQED and XYZ is actually symmetric. That is, we can sensibly define an interface in the opposite direction SQED (N ,N,N) Γ XYZ (D,N,N) (6.12) in essentially the same way as above, but now with a 2d Fermi multiplet Γ of charges (−1, 0, 1, 0) under U (1) gauge ×U (1) a ×U (1) y ×U (1) R . 25 The reader may verify that all anomalies cancel. The important difference between the SQED-XYZ duality and the particle-vortex duality of Section 4 is that the former has vanishing bulk Chern-Simons levels for dynamical gauge symmetry. This makes the SQED-XYZ duality more symmetric with respect to left vs. right boundary conditions. Finally, we may check the duality (6.4) with a half-index computation. For SQED, we compute the "effective" boundary CS levels from the anomaly (6.3), which simplifies to f 2 + 2 f y + (a − r) 2 − 1 2 r 2 . Following the rules of Section 3.4, this leads to a half-index II SQED (D,D,D) (s, a, y; q) = 1 (q) ∞ n∈Z q n 2 2 s n y n II D (q n sa; q) where s, a, y are the U (1) ∂ , U (1) a , U (1) y fugacities. This turns out to equal Just as in (4.10), the equivalence of (6.13) and (6.14) may be established by showing that both expressions obey the same first-order difference equations in s, a, and y, and that they are equal at a particular point. The difference equations, which may all be interpreted as identities for line operators (Section 3.7), are II(q −1 s, a, y; q) = q − 1 2 syII(q −1 s, a, y; q) , II(q − 1 2 s, q II(s, a, y; q) (6.15) and follow either directly from (6.14) or by simple manipulations inside the sum of (6.13). A convenient evaluation point is s = a = y = 1, where both (6.13) and (6.14) reduce fairly trivially to (q) ∞ . Alternatively, by sending s/a → 0 while holding sa and sy fixed, we may reduce to the identity in (4.10)- (4.11). This corresponds physically to turning on a large real mass to integrate outΦ in SQED and X, Z in XYZ, recovering the basic particle-vortex duality.

Other dual boundary conditions
There are many other dual pairs of boundary conditions for SQED and XYZ. As we have already mentioned, this pair of 3d theories is even better behaved than the particle-vortex duality of Section 4, due to vanishing bulk Chern-Simons levels. Thus both Dirichlet and Neumann b.c. are available for the gauge multiplet of SQED, with interesting duals on the XYZ side. We summarize the proposed dualities in Table 1. 26 For each of these pairs of boundary conditions, the boundary anomalies match up perfectly, and there is an associated half-index identity. We discuss a few of the more interesting cases below. Various vortex/Wilson lines can also be incorporated in a fairly straightforward way, following the models of Section 4. The new feature here is that there seem to be two distinct UV boundary conditions for the XYZ model that are IR equivalent. This becomes less surprising upon closer inspection. The (D c ,N,D) b.c. sets X| ∂ = c = 0 and Z| ∂ = 0 while seemingly leaving Z unconstrained. However, the bulk F-term ∂W/∂Z = XY (identified as the N = (0, 2) E-term for Ψ Z ) must also vanish in a supersymmetric vacuum. Since at the boundary the F-term is XY | ∂ = cY | ∂ , we see that Y | ∂ is also set to zero in the IR. Thus, the (D c ,N,D) b.c. seems to look identical to (D c ,D,N).
We can verify that boundary 't Hooft anomalies match. We compute: which agree. Moreover, these match the boundary anomaly of (D,D c ,D c ) b.c. for SQED: Curiously, the anomaly for (D c ,D,D), which might also have been expected to be IR equivalent to these b.c., equals 1 2 (2a − r) 2 + 1 2 (y − a) 2 + 1 2 (y + a) 2 2a=0 = y 2 + 1 2 r 2 , and does not agree. The half-index identity corresponding to the putative duality of boundary conditions is obtained by taking the identity (6.13)-(6.14) of Section 6.1 and setting to one the fugacities for both of the chirals in SQED, which are given D c b.c., namely as = 1 and a/s = 1, or simply a = s = 1. This results fairly trivially in a half-index on either side equal to (q) ∞ , independent of y.
A stronger argument for the duality can be made by deforming the (D, D,D) ↔ (D,N,N)+Γ duality of Section 6.1 by boundary superpotentials. To reach (D, D c ,D c ) in SQED, we add a superpotential dθ + (cΨ + c Ψ ) . (6.18) If we turn these terms on one at a time, we may view the cΨ coupling as modifying the b.c. to Φ| ∂ = c, and then the c Ψ coupling as subsequently modifying the boundary vev of the meson operator to ΦΦ| ∂ = cc . Correspondingly, in SQED we add superpotentials for the dual operators: first we add cΓY (since ΓY is dual to Ψ| ∂ ), and then we add cc Ψ X (since X is dual to the meson). The superpotential dθ + (cΓY + cc Ψ X ) (6.19) has the effect of "flipping" the b.c. on Y from N to D, and deforming the b.c. on X to X| ∂ = cc , which is precisely (D c ,D,N). Alternatively, had we turned on the superpotential terms in the opposite order, we would have obtained (D c ,N,D).

(D,N,N) ↔ (D,N,N) with a Fermi and two chirals
The boundary condition here for XYZ is a true matrix factorization, very similar to the one that entered the duality interface. Indeed, this duality can neatly be obtained by colliding the interface (6.5) with (D,N,N) b.c. for SQED. The "sandwich" between (N ,N,N) (on the right side of the interface) and (D,N,N) kills the U (1) gauge symmetry, and leaves behind two 2d chirals C,C, coming from the reductions of Φ,Φ on the segment. The interface itself contributes the 2d Fermi Γ, and we are left with (D,N,N) b.c. for XYZ coupled to Γ, C,C via the superpotential As in the interface, this sets X| ∂ = CC, so that E Γ J Γ = CCY Z = XY Z = W . The relevant index identity is 1 (q) ∞ n∈Z q − n 2 2 s −n y n II N (q n sa; q)II N (q −n s −1 a; q) (6.21) and follows easily from (6.13)-(6.14) by rewriting II N (q n sa; q)II N (q −n s −1 a; q) as C(as)C(a/s)q n 2 s 2n II D (q n sa; q)II D (q −n s −1 a; q) on the LHS. Let us consider the anomalies explicitly. On the SQED side, we have modifying the anomaly to y 2 − (a − r) 2 + 1 2 r 2 , and in particular canceling the terms involving the dynamical field strength f . We may compare this with (N,D,D) b.c. for SQED, which has anomaly The same identity appeared when studying holomorphic block dualities [67], later interpreted via half-indices in [50]. Finally, we take a look at another duality where the XYZ boundary condition has multiple UV descriptions. In SQED, the (N ,D,N) b.c. does not have a gauge anomaly, but it does have a mixed anomaly: we compute a boundary polynomial This breaks the symmetry with field strength y + a − r, which is precisely the symmetry under which the chiral Z in the XYZ model is charged. Thus, in XYZ, we expect a D c b.c. for Z. Moreover, (N ,D,N) sets the meson to zero so we expect its dual to give D b.c. to X.
Comparing 't Hooft anomalies then suggests that the dual b.c. should be (D,N,D c ). As before, the BPS equations on the (D,N,D c ) b.c. actually set Y | ∂ = 0 as well in a supersymmetric vacuum. This fits the proposed duality, since N b.c. in SQED certainly kills both monopole operators, including the one dual to Y . We suspect that the (D,N,D c ) b.c. can equivalently be described as (N,D,D c ).

Gauging D and 2d dualities
It is again instructive to take D-type boundary conditions and gauge the 2d U (1) ∂ symmetry, comparing the result with proposed mirrors of N -type boundary conditions. The richest example is to gauge (D, N,N) + Γ s/y in order to obtain (N , N,N) + Γ s/y . On the mirror side, we get (D, N,N) coupled to an intricate boundary theory: a 2d U (1) s gauge theory with two Fermi multiplets Γ s/y and Γ 1/(sy) and two chiral multiplets C as andC a/s . From Table 1, we expected this mirror to be equivalent to (N,D,D). This is only possible if the 2d boundary gauge theory flows in the IR to a combination of a chiral multiplet and two Fermi multiplets.
The picture is supported by a 2d index calculation, which involves picking a single pole from the positively charged C as . Indeed, if we add an extra Fermi multiplet to analyze (N , N,N) + Γ s/y + Γ −q 1/2 /a 2 , the RG flow of the 2d theory to the two Fermi multiplets that flip (D,N,N) to (D,D,D) is the very simplest example of (0, 2) triality [52, Fig. 2], with N 1 = N 2 = 1 and N 3 = 0.
The basic SQED ↔ XYZ duality has a natural generalization, in which SQED is replaced by U (N ) SQCD with N f = N fundamental and antifundamental chirals (quarks and antiquarks), and the dual theory is another "Landau-Ginzburg model" with a cubic superpotential capturing the low-energy dynamics of SQCD [3,4]. Specifically, the dual theory contains chirals Y 3d , Z 3d that match the monopole operators of SQCD, an N × N matrix M 3d matching the mesons of SQCD, and a superpotential As before, there are two basic pairs of dual boundary conditions that can be used to construct duality interfaces going in both directions. In compact notation: where Γ and Γ are 2d Fermi multiplets in representations Let us check that the boundary anomalies match for (6.29). First consider (D,D,D), i.e. Dirichlet for the U (N ) gauge multiplet as well as the quarks and anti-quarks of SQED. Following (2.51) for the computation of U (N ) anomalies, we find I (D,D,D) = −N Tr(s 2 ) + (Tr s) 2 − 1 2 N 2 r 2 + 2(Tr s)y (gauginos, FI) (6.31) = (Tr s) 2 + 2(Tr s)y + 1 2 N Tr(x 2 ) + Tr(x 2 ) + N 2 (a − r) 2 − 1 2 N 2 r 2 where, in order to match fugacities in the index, we have used s to denote the field strength of U (N ) ∂ , and x,x to denote the field strengths of the SU (N ), SU (N ) flavor symmetry. On the dual side, the (D,N,N) boundary condition (D b.c. for M , N b.c. for Y, Z) has an anomaly The difference in these two quantities, with the difference made up for by the Γ Fermi multiplet. In particular, the anomaly of Γ is just right to cancel the gauge and mixed gauge-topological anomaly for N b.c. in SQCD. We may also check these proposed dual boundary conditions by a half-index computation. Following the rules of Section 3, we compute II D q m i ax α s i ; q II D a q m ix α s i ; q , (6.35) where s = (s 1 , ..., s N ) are the U (N ) ∂ fugacities, m = (m 1 , ..., m N ) ∈ Z N cochar(U (N )) are the monopole charges, a, y are the axial and topological fugacities, and x = (x 1 , ..., x N ), x = (x 1 , ...,x N ) are the SU (N ), SU (N ) fugacities, constrained to satisfy α x α = βx β = 1. We have checked these formulas for a variety of N in Mathematica up to order q 10 . 27 27 It seems feasible that the equality II (D,D,D) = II (D,N,N)+Γ could be established in general by comparing difference equations, much like (6.15). This approach is promising because the index (6.36) is simply a product of q-Pochhammer symbols, which obey simple first-order equations.
By following the general prescription of Section 5.1, we may now use (6.29) to construct duality interfaces. They have the same form as in SQED ↔ XYZ. In one direction, detYZ (D,N,N) Γ SQCD (N , N,N) , (6.37) with an interface superpotential dθ + Y Γdet(Q) + QµQ and E Γ = Zdet(Q). Note that at the interface this sets M = QQ and provides a matrix factorization of the bulk superpotential In the other direction, with superpotential dθ + Y Γ det(Q) + QµQ and E Γ = Zdet(Q). The Fermi muliplets Γ and Γ mediate the map of bulk operators across the duality interface, essentially the same way as in SQED ↔ XYZ. In particular, giving a vev to Y or Z generates a superpotential dθ + (TrΥ) log Y or − dθ + (TrΥ) log Z, generalizing (6.11), which sets the monopole operators of SQCD equal to Y and Z.
Simple modifications of (6.29) and/or collisions with the interfaces may be used to construct many, many other dual pairs of boundary conditions, analogous to all of Table 1.
It is also instructive to take D-type boundary conditions and gauge the 2d U (1) ∂ , comparing the result with proposed mirrors of N -type boundary conditions. Again, we can start from (D, D,D), add fundamental and anti-fundamental chiral fields to flip to (D, N,N) and Fermi multiplet Γ .
On the mirror side we get (D, N, N ) coupled to a 2d U (N ) ∂ gauge theory with fundamental and anti-fundamental chiral fields and two Fermi multiplets in the determinant representation. Consistency of our proposal requires the 2d theory to flow to a bi-fundamental chiral and two Fermi multiplets to flip (D, N, N ) to (N, D, D). This is reasonable. Indeed, if we add an extra bi-fundamental Fermi multiplet, the RG flow of the 2d theory to the two Fermi multiplets which flip (D, N, N ) to (D, D, D) is a simple example of (0, 2) triality [52], with N 1 = N 2 = N and N 3 = 0.

Level-rank dualities
So far we have discussed pairs of 3d N = 2 dual theories with nontrivial gauge degrees of freedom on one side only, but potentially interesting matter content on both sides. We now turn to the opposite scenario: gauge groups on both sides, and trivial matter. We investigate boundary conditions in 3d N = 2 level-rank duality.
Level-rank dualities comprise a familiar set of tractable examples that have their origins in equivalences of two-dimensional chiral algebras. Viewing the associated conformal field theories as the edge modes of three dimensional topological theories, the level-rank duality ascends to a duality of Chern-Simons theories. The classic non-supersymmetric dualities [61][62][63][64][65] (and more modern extensions, e.g. [4,37]) readily admit N = 2 supersymmetric completions [11,14]. For instance, one basic equivalence in 3d N = 2 Chern-Simons theory is where the notation on the left indicates a different level for the U (1) factor, discussed at the end of Section 7.1. These level-rank dualities follow from several dualities we will meet later with additional matter, such as Aharony, Giveon-Kutasov, or other Seiberg-like dualities, either by setting N f = 0 or by adding masses to the matter multiplets and integrating them out until one obtains a pure N = 2 gauge theory.
The supersymmetric dualities are related to non-supersymmetric ones in a straightforward way: by integrating out (or in!) massive vectormultiplet scalars and gauginos, and shifting the Chern-Simons level due to the gauginos. The shift is always controlled by the adjoint anomaly. If G is a simple group, an N = 2 G κ Chern-Simons theory flows to G κ−h sign(κ) non-supersymmetric Chern-Simons in the IR. If G is not simple, the level shift may be more complicated, as in Section 2.4.
In the deep infrared, both the supersymmetric and non-supersymmetric Chern-Simons theories (which we think of as defined by a path integral over gauge connections, with the usual Chern-Simons action) flow to a massive, topological quantum field theory. We will refer to the topological theory corresponding to G k non-SUSY Chern-Simons as T F T [G k ]. It has no local degrees of freedom, but does have a category of line operators.
The level-rank duals of boundary conditions may be understood to follow from two more fundamental UV-IR relations. Let G be a simple group and k > 0. We propose that 1) 3d N = 2 G k+h Yang Mills-Chern-Simons theory with a Dirichlet (D) boundary condition flows to a left-moving (chiral) G k WZW model coupled to T F T [G k ].
2) 3d N = 2 G −k−h Yang-Mills-Chern-Simons theory with a Neumann (N ) boundary condition must be coupled to a left-moving chiral algebra T 2d (which may be part of an N = (0, 2) boundary theory) in order to cancel the gauge anomaly. In the IR, this boundary condition flows to the coset T 2d /G −k coupled to T F T [G −k ].
Both relations are fully compliant with 't Hooft anomaly matching. Analogous statements should hold for non-simple G with modified level shifts. The idea that Neumann b.c. for Yang-Mills-Chern-Simons theory leads to coset models is familiar in the literature, cf. [51,68,69], though we believe the statement about Dirichlet boundary conditions is new. We will give evidence of both statements for G = U (N ) and SU (N ) (and, in the case of D b.c., general simple G) by computing half-indices. With D b.c., the half-index constitutes an "abelianized" formula for WZW characters. We will also check the identification of bulk (UV) Wilson lines with modules for the boundary chiral algebras.
We note that the sign of the Chern-Simons level is important in the above statements. As discussed in Section 4.4, the choice of left vs. right boundary condition breaks the symmetry between positive and negative bulk levels. Recall that 3d N = 2 G κ YM-CS theory breaks SUSY in the bulk if |κ| < h [128,[143][144][145].
With our conventions for boundary conditions, the half-indices of G k+h theory with D b.c. are badly behaved. Presumably, boundary monopole operators hit some unitarity bound along the RG flow. Notice that there are no known N = 2 supersymmetric anti-chiral WZW models, which would have been an obvious candidate for the IR boundary physics.
On the other hand, N b.c. for k < 0 require some anti-chiral boundary matter in the UV, such as (0, 2) chiral multiplets, making index calculations somewhat trickier. The IR physics should involve some (0, 2) G gauge theory coupled both to a G −k WZW model and the UV boundary matter. It goes beyond the scope of this paper.
The supersymmetric statements above have obvious non-supersymmetric versions: 1') Non-SUSY G k YM-CS theory with a Dirichlet b.c. flows to a chiral G k WZW model coupled to T F T [G k ].
2') Non-SUSY G −k YM-CS theory with Neumann b.c. coupled to chiral algebra T 2d to cancel the gauge anomaly flows to a chiral T 2d /G −k coset, coupled to T F T [G −k ].
(Now there are no subtleties about simple vs. non-simple G.) We became aware of these relations in discussions with Kevin Costello and in other projects (such as [146]). The supersymmetric and non-supersymmetric statements about RG flows lead to levelrank-dual boundary conditions when appropriate choices for G and T 2d are made -so that a particular coset T 2d /G k (coming from N b.c.) happens to be equivalent to aGk WZW model (coming from D b.c.). We will discuss this in Section 7.2.

Dirichlet boundary conditions
We present a few examples of statement (1) about RG flows with Dirichlet boundary conditions. In the IR, the bulk theory is purely topological and has no local operators. We should thus find that half-indices compute the characters of appropriate WZW models that appear in the IR on the boundary. We indeed find a match with the Weyl-Kac character formula [147][148][149] for general simple G.
When k < 0, the monopole sum diverges badly, similar to what we saw in particle-vortex duality (4.31) when the boundary anomaly was negative. We will restrict ourselves to k > 0.
To obtain characters of other modules, we add Wilson lines. Following Section 3.6, we see that a Wilson line of charge n ∈ Z in the UV G = U (1) k Yang-Mills-Chern-Simons theory modifies the half-index as This agrees with the WZW character up to a mild prefactor,

SU(2)
Next, consider SU (2) k , at k > 0. A general spin j character 28 may be written as Notice that there are negative terms in the sum, as χ −j (x) = −χ j−1 (x). In particular, for the vacuum character we can write This shows the sequence of nested Verma modules of spin 0, k + 1, k + 2, 2k + 3, . . . which give a resolution of the vacuum module.
Another simple manipulation of (7.6) expresses the vacuum character as (7.8) where in the middle step we employed the usual identity F(x; q) = q n 2 2 (−q − 1 2 x) n F(q n x; q) for F(x; q) = (x; q) ∞ (qx −1 ; q) ∞ . This final expression agrees precisely with the half-index of 3d N = 2 SU (2) k+2 CS-YM theory with D b.c., as we had hoped.
In a similar way, the spin-j character may be rewritten as which agrees with the half-index II D [SU (2) k+2 , j] in the presence of a spin-j Wilson line. Notice also the difference equation One can check explicitly that this is exactly the character in su(2) 2 with highest weight vector Λ = (1, 1) (written via its Dynkin labels), as expected. (The vacuum, or basic, representation of su(2) 2 has highest weight vector Λ = (k, 0) = (2, 0) in this notation). One can perform an identical check for the j = 1 Wilson line against the representation with highest weight vector Λ = (0, 2), as well as similar checks for general k, j.

SO(3)
Similarly, we can begin with the WZW vacuum character for SO(3) k . This can be obtained by combining the vacuum character of SU (2) 2k with the spin k character of SU (2) 2k , which has dimension k(k+1) 2k+2 = k 2 . It can be compactly written as a sum over a lattice refined by a factor of two: and rearranged the same way as before to (7.13) which matches the Dirichlet half-index.

Any simple G
Analogously, we expect the vacuum WZW character for general simple group G at level k > 0 to be computed by the half-index where r = rank(G), Λ ∨ denotes the cocharacter lattice of G, and Φ is the set of roots of G. Just as in the SU (2) example above, this can be rewritten as (7.16) In Appendix B, we show that this expression is equivalent to the usual expression for the Weyl-Kac character formula (up to the overall factor of the modular anomaly) when G is simply connected.
We can also write down the half-index with a Wilson loop insertion in representation R: which we expect to coincide with the character of other highest-weight modules. Of course, there should be identifications between Wilson lines. These are captured by the identity which follows easily from a shift of summation in (7.17) .

U(N)
For level-rank duality, it is useful to consider U (N ) groups as well. There are two well-behaved possibilities. Suppose that we wish to reproduce the U (N ) k WZW characters from a half-index, at k > 0. Then we need to look for a 3d N = 2 theory whose boundary 't Hooft anomaly is kTr(f 2 ). A naive guess is N = 2 U (N ) k+N theory; but the computation in (2.51) shows that this won't quite work, due to an extra (Tr f ) 2 contribution from the gauginos. What works instead is an N = 2 YM-CS theory with a different level for the U (1) part of U (N ). We use the following notation (coincident with [21,37]): We write U (N ) κ = U (N ) κ,κ for a Chern-Simons theory whose (UV) action corresponds to the anomaly polynomial U (N ) κ : κ Tr(f 2 ) , (7.19) where f is the U (N ) field strength. We write U (N ) κ,κ+p for the more general possibility Notice that if we restrict f to be diagonal with all entries equal to f / √ N (corresponding to the U (1) field strength inside U (N )), the polynomial (7.20) reduces to (κ + p)f 2 . Thus the effective U (1) level is κ + p.
In order to reproduce the U (N ) k WZW vacuum character, we should use 3d N = 2 U (N ) k+N,k theory. The polynomial encoding its bulk CS levels is I bulk = (k + N )Tr(f 2 ) − (Tr f ) 2 , so that the boundary anomaly on a D b.c. is which (modulo the r 2 term) matches the anomaly of U (N ) k WZW. If we include a topological U (1) y symmetry as well, which gives an extra term 2(Tr f )y in the anomaly polynomial, then the half-index is Alternatively, we may consider 3d N = 2 U (N ) k+N YM-CS theory. Its bulk CS levels are encoded by (k + N )Tr(f 2 ), so the boundary anomaly on D b.c. is now The half-index is now expected to compute the vacuum character of U (N ) k,k+N WZW, which matches the anomaly (7.23).

Neumann boundary conditions and dualities
We now consider statement (2): that 3d N = 2 YM-CS theory with N b.c., and appropriate degrees of freedom to cancel the gauge anomaly, flows to a coset model. Since this has already been studied in the literature, we only give a few examples, and focus on explaining how the statement may be used productively to generate dual boundary conditions.
Consider 3d N = 2 U (1) −k theory, now with N b.c. The boundary anomaly is simply If k > 0, a simple way to cancel the anomaly is by introducing k boundary Fermi multiplets Γ i of gauge charge +1 (and R-charge zero). The corresponding half-index is where we have introduced additional fugacities x = (x 1 , ..., x k ) with i x i = 1 for the new boundary SU (k) flavor symmetry that rotates the Fermi multiplets. We now observe that the boundary anomaly has been shifted to a 't Hooft anomaly for the SU (k) flavor symmetry. Such an anomaly could be matched by an SU (k) 1 WZW model in the IR. Indeed the SU (k) 1 WZW is exactly what we would expect from the coset construction k free fermions The index (7.26) is actually easy to evaluate directly, since F(−q This is the lattice sum for the vacuum character of SU (k) 1 WZW. For example, at k = 2 we may use SU (2) fugacities (x 1 , x 2 ) = (x, x −1 ) and obtain χ 0 [SU (2) 1 ] = 1+qχ 1 (x)+q 2 χ 1 (x)+χ 0 (x) +q 3 2χ 1 (x)+χ 0 (x)]+q 4 χ 2 (x)+2χ 1 (x)+2χ 0 (x) +... (7.30) where χ j (x) is the spin-j character of SU (2), just as in (7.6).
In Section 7.1 we encountered another boundary condition whose half-index was an SU (k) 1 character, namely D b.c. for 3d N = 2 SU (k) k+1 theory. The Dirichlet half-index of this latter theory matches (7.29). We deduce a duality of SUSY boundary conditions We could in principle have considered k < 0 as well. Then the N b.c. gauge anomaly for U (1) −k would have to be cancelled by chiral rather than Fermi multiplets. However, this leads to the same sort of difficulties in the index computation that we encountered in particlevortex duality, cf. (4.23). To avoid potential problems with free chirals on the boundary, we restrict ourselves to k > 0.
To generalize the U (1) −k example above, let us consider 3d N = 2 U (N ) −k−N,−k with k, N > 0.The level convention (7.20) means that the bulk CS levels are (7.32) The boundary anomaly on N b.c. due to gauginos then becomes We may cancel this by introducing k fundamental Fermi multiplets Γ i (of R-charge zero), transforming under an SU (k) boundary flavor symmetry. They shift the anomaly by I Γ = k Tr(f 2 ) + N Tr(x 2 ), where x is the SU (k) field strength, to This matches perfectly with the 't Hooft anomaly of a Dirichlet b.c. on 3d N = 2 SU (k) k+N YM-CS theory (up to a shift of the R-R anomaly, which can be put in by hand). Thus we may expect a duality of boundary conditions We are claiming slightly more than this, namely that both sides flow to an SU (k) N WZW model on the boundary. On the right side this follows from Section 7.1. On the left side, we expect a coset model, which agrees by standard level-rank duality of chiral algebras: In addition, the Neumann b.c. for U (N ) −k−N,−k theory has a half-index Finally, let us apply the same analysis starting with a Neumann b.c. for 3d N = 2 U (N ) −k−N theory, with k, N > 0. It is useful to keep track of the U (1) y topological symmetry, for which we introduce a field strength y as usual. Then the bulk CS levels are (7.40) leading to a boundary anomaly Adding k fundamental Fermi multiplets Γ on the boundary is not sufficient to cancel the −(Tr f ) 2 part of the gauge anomaly. However, we can deal with this by introducing one more "baryonic" Fermi multiplet η, which transforms under the U (1) part of U (N ). We can even cancel the mixed gauge-topological anomaly by giving η nontrivial U (1) y charge.
The multiplets Γ and η introduce an extra U (k) flavor symmetry on the boundary. This is the commutant U (N ) × U (1) y in U (N k + 1). Under both gauge and flavor symmetry, these Fermi multiplets may be taken to have charges Then their joint contribution to the anomaly is The 't Hooft anomaly (7.44) matches that of Dirichlet b.c. in U (N ) k+N theory (7.23), up to a shift of the r 2 and y 2 terms. Thus, we may surmise that In the IR, we expect the right side to flow to a U (k) k+N,N WZW model, and the left side to flow to a coset, essentially This is the duality of chiral algebras responsible for level-rank duality of non-superymmetric U (N ) −k−N,−k and U (k) k+N,N Chern-Simons theories, cf. [21].
We may also compare half-indices. The Neumann b.c. has 47) and we have checked computationally that this indeed matches (7.24) in several cases.

Interfaces
We may use the proposed dual boundary conditions above to construct duality interfaces for level-rank dual theories. The construction works the same way as in Sections 5 and 6. Just as in the case of particle-vortex duality, the interfaces turn out to be directional: in our conventions, they must necessarily have negative CS levels on the left to positive CS levels on the right.
For example, the duality interfaces for U (N ) −k−N,−k ↔ SU (k) k+N and SU (N ) −k−N ↔ U (k) k+N,N have N b.c. for the gauge fields on either side, coupled to N k free Fermi multiplets Γ in a bi-fundamental representation of the gauge groups. Schematically, Again we emphasize that anomalies on the interfaces only cancel for k, N > 0. Similarly, the duality interface for U (N ) −k−N ↔ U (k) k+N involves both bi-fundamental and bi-baryonic Fermi multiplets Γ, η as in (7.42): It is worth pointing out that this is a "supersymmetrization" of a non-supersymmetric level-rank duality interface, defined in terms of bi-fundamental fermions rather than Fermi multiplets.

From U to SU
In bulk 3d dualities, one has a great deal of freedom to "move" U (1) gauge groups around. This typically proceeds by gauging topological symmetries, which can have the effect of ungauging dynamical U (1)'s [15,119,120]. The bulk U (N ) and SU (N ) level-rank dualities above are known to be related by such operations. The gauging and un-gauging operations may be applied in the presence of dual boundary conditions as well, being careful to account for the boundary degrees of freedom.
We illustrate this by reducing the duality of boundary conditions in U (N ) −k−N ↔ U (k) k+N theories (7.45) to U (N ) −k−N,−k ↔ SU (k) k+N as in (7.35). For a perfect match of boundary 't Hooft anomalies, the bulk CS levels in U (N ) −k−N ↔ U (k) k+N duality may be defined as U (N ) −k−N : I bulk = −(k + N )Tr(f 2 ) + 2(Tr f )y + y 2 − N 2 2 r 2 , U (k) k+N : I bulk = (k + N )Tr(x 2 ) + 2(Tr x)y + k 2 2 r 2 . (7.50) Now we simultaneously gauge the U (1) y topological symmetry in both theories. In the U (k) k+N theory, this has the effect of un-gauging the U (1) part of U (N ), to which the topological symmetry has a mixed CS coupling. Thus we are left with an SU (k) k+N bulk theory. The boundary condition is still D.
On the other hand, in the U (N ) −k−N theory, due to the extra y 2 CS term, gauging the U (1) y symmetry has virtually no effect in the bulk. Indeed, once U (1) y is gauged, we can redefine abelian gauge charges in a way that corresponds to sending y → y − Tr f . The bulk CS levels become and we see that the bulk theory has become a decoupled U (N ) −k−N,−k × U (1) 1 . On the boundary, the extra 2d Fermi multiplets now have charges Thus Γ is only charged under U (N ) and η only under the new U (1), giving decoupled boundary conditions

Aharony duality
In this section we identify several dual pairs of boundary conditions for Aharony-dual theories with U (N ) gauge groups [4]. Aharony dualities generalize the SQED ↔ XYZ and SQCD ↔ detYZ dualities from Section 6, and flow from 4d Seiberg duality [150] (cf. [15]). Just as in SQED and SQCD in Section 6, all the bulk UV Chern-Simons levels in Aharony duality are identically zero, and the matter fields are "non-chiral" -in that equally numbers of fundamental and anti-fundamental 3d chiral multiplets occur. This leads to a structure of dual boundary conditions that is very similar to that found in Section 6, and duality interfaces that are effectively bi-directional.

Fundamental duality and interface
Aharony duality relates the 3d N = 2 theories Theory A : U (N c ) gauge theory with N f fundamental (Q 3d ) and N f anti-fundamental (Q 3d ) chirals Theory B : ) and N f anti-fundamental (Q 3d ) chirals, a N f × N f matrix of singlets (M 3d ), and two more singlets (V ± 3d ), We assume that N f > N c (so N c > 0); otherwise, at N f = N c one finds instead the SQED ↔ XYZ and SQCD ↔ detYZ dualities of Section 6.
Recall that the bulk duality maps the mesons Q 3dQ3d of Theory A to the singlets M 3d of Theory B, and it maps the two scalar monopole operators of Theory A to the singlets V ± 3d of Theory B. Theory B has its own mesons Q 3dQ 3d and scalar monopole operators U ± ; however, these operators are killed by the bulk superpotential.
The global symmetry is where as usual the latter three U (1)'s are axial, topological, and R-symmetry. We split the bulk chirals into N = (0, 2) chiral and Fermi multiplets as usual, namely The (0, 2) chirals can be taken to have charges and as usual the (0,2) fermis have the conjugate flavor charges and (1 − ρ chiral ) R-charge. We again emphasize that the bulk UV Chern-Simons levels (both for gauge and global symmetries) are identically zero. We propose the following two pairs of dual boundary conditions: where Γ, η, Γ , η are 2d boundary Fermi multiplets with charges 2) The choice of D vs. N b.c. for the various matter fields either fully aligned or fully anti-aligned with the signs of the fields' axial charges. This turns out to be important in recovering pure level-rank duality by turning on a large axial mass and integrating out all the bulk matter -in particular, it ensures that after the bulk matter is integrated out, no edge modes are left behind. We will say more Section 9.
Two natural duality interfaces can be produced from (8.4) by applying the procedure of Section 5.1: Each interface carries a superpotential, that factorizes the cubic part of the bulk superpotential from Theory B, by a now familiar mechanism. Namely, the µQQ coupling sets M = QQ at the interface, and then E Γ · J Γ = QQQ Q (with all gauge and flavor indices contracted), which equals the bulk W = M Q Q . We would expect the Fermi multiplet η to play a role in 1) factorizing the U − V + + U + V − part of the bulk superpotential at the interface; and 2) mediating the relation between monopole operators of Theory A and the V ± singlets of Theory B at the interface. The latter function was accomplished by Γ in SQED ↔ XYZ and SQCD ↔ deyYZ in Section 6, cf. (6.11). The precise couplings of η to the bulk and the mechanism by which it accomplishes (1) and (2) are not yet clear, and would be interesting to understand.
Other dual pairs of boundary conditions can be generated from (8.4), either by deforming both sides, or by colliding with the interface (8.6). The pattern is a generalization of Table 1 for SQED ↔ XYZ.

Anomalies
Now, let us check more closely that boundary anomalies match for the proposed dual pairs (8.4). We denote the field strengths for various gauge and global symmetries as   where I Γ = I Γ = N c Tr(s 2 ) + 2(Tr s)(Tr s ) + N c Tr(s 2 ) and I η = (Tr s − Tr s + y) 2 , I η = (Tr s−Tr s −y) 2 are precisely the anomalies of the additional 2d Fermi multiplets we proposed. In particular, the (N ,N,N,D,N) boundary condition in Theory B has gauge and mixed gauge-topological anomalies that are precisely cancelled by coupling to the boundary fermis Γ, η; and the (N ,N,N) b.c. in theory A has similar anomalies that are cancelled by coupling to Γ , η .

Half-indices
To compute half-indices of the boundary conditions in (8.4), we introduce fugacities constrained so that Then we find as well as We expect that and have checked these and have checked these in a variety of examples by comparing (at least) the first ten terms in the q-series expansion. 29 For illustrative purposes, let us examine one nontrivial example, the duality II (D,D,D) (s, x,x, q, y; q) = II (N ,N,N,D,N)+Γ,η (s, x,x, q, y; q) with N c = N c = 2, N f = 4. For those who wish to reproduce some of our computations in Mathematica, we note that in most examples it is convenient to make the substitution a → a/q, which has the nice feature of improving convergence in the monopole sum. The expressions quickly become unwieldy, so we only display a few terms: II(s, x,x, q, y; q) = 1 + s 1 s 2 + s 2 s 1 + 2 q + q 3/2 s 4 2 s 6 1 y 2 + s 5 2 s 5 1 y 2 + s 6 2 s 4 1 y 2 + s 2 1 + s 2 s 1 + s 2

Flows from Aharony duality
It is well known (cf. [14,15]) that Aharony dualities can be deformed by real masses in such a way that they flow to interesting "chiral" dualities with non-zero Chern-Simons levels, including Giveon-Kutasov duality [11] and level-rank dualities in pure gauge theory from Section 7. With some care, the flows can be performed in the presence of boundary conditions. Then the basic dual boundary conditions (8.4) in Aharony duality can be used to derive (or re-derive) dual boundary conditions for other pairs of bulk theories. We discuss the basic technique, and illustrate it in a few examples.
Consider the Aharony duality of Section 8 with N c = N and N f = k + N , where k, N > 0. Turning on a large real mass for the axial U (1) a symmetry allows all matter fields to be integrated out in the bulk of both Theory A and Theory B. Integrating out fermions shifts the Chern-Simons level in a manner that depends on the sign of the mass: • With a large positive axial mass, the bulk Theory A flows to pure N = 2 U (N ) k+N Yang-Mills-Chern-Simons theory, and Theory B flows to a pure N = 2 U (k) −k−N YM-CS theory. The global symmetry is reduced to U (1) y × U (1) R (the remainder of the flavor group acts trivially). There are some non-trivial background Chern-Simons terms; after an equal shift of the R-R term on both sides (by −( 1 2 N 2 + kN )r 2 ) we find that the bulk CS terms correspond to the anomaly polynomials Theory A: U (N ) k+N I A bulk = (k + N )Tr(s 2 ) + 2yTr s + 1 2 N 2 r 2 , Theory B: U (k) −k−N I B bulk = −(k + N )Tr(s 2 ) + 2yTr s − y 2 + 1 2 N 2 r 2 .
(9.1) 29 For comparison, the full superconformal index for many Aharony dual pairs was computed in [151].

(9.2)
These coincide with the level-rank duality of Section 7. We can derive the dual boundary conditions in level-rank duality from dual boundary conditions in Aharony duality, but in doing so we must be a little careful. Turning on a real mass m Φ for a 3d N = 2 chiral multiplet allows it to be integrated out in the bulk. However, in the presence of a boundary condition, it may acquire a massless edge mode, in the form of a purely 2d N = (0, 2) chiral or Fermi multiplet. We recall from Section 2.4 that The presence of these edge modes is necessary to ensure that the boundary anomaly remains constant during a flow.
The simplest way to flow from Aharony to level-rank duality on a half-space is to choose boundary conditions that ensure that no edge modes survive. Recall the two dual pairs of b.c. from (8. Since the effective real mass of each 3d chiral is proportional to its axial charge, this means that Q,Q, M will have positive mass while Q ,Q , V ± have negative mass; therefore, no edge modes will arise during the flow. We deduce that where Γ, η are bifundamental and bi-det Fermi multiplets, just as in level-rank duality, Section 7.2. Alternatively, we can use the bottom pair of b.c. when turning on a large, negative axial mass, resulting in This is of course the same as (9.4).
In a similar way, we can flow from the interfaces (8.6) in Aharony duality to the interface (7.45) in level-rank duality. No matter whether we turn on a large positive mass in the first interface of (8.6) or a large negative mass in the second interface, we end up with the same level-rank interface (U (N ) −k−N , N ) Γ, η (U (k) k+N , D) , (9.6) which necessarily has a negative level on the left and a positive level on the right. In principal, one could consider turning on an axial mass of the "wrong" sign. This does generate edge modes, which need to be kept track of carefully. In particular, it may introduce additional 2d N = (0, 2) chiral multiplets on the boundary. Charged 2d N = (0, 2) chirals can be problematic, as we first found in particle-vortex duality, cf. (4.23).
For example, suppose that we introduce a large negative axial mass in the top pair of boundary conditions in (9.3). This will lead to chiral edge modes of Q 3d ,Q 3d , which are potentially problematic. A possibly way to remedy the problem is to first flip the D b.c. on the Q 3d ,Q 3d chirals in Theory A, by introducing boundary (0,2) chiral multiplets q,q of the same charges. Then, in the presence of negative axial mass, Theory A flows to U (N ) −k−N CS-YM theory with D b.c., while Theory B flows to U (N ) k+N YM-CS theory with N b.c. coupled to a large collection of 2d multiplets: -The fermis Γ, η -A Fermi µ that's a surviving edge mode of M 3d -Chirals Q ,Q , V ± that are surviving edge modes of the corresponding bulk fields -Chirals q,q from flipping Q,Q in Theory A These various 2d multiplets are coupled together by a boundary superpotential dθ + µqq + qΓQ , as well as E µ = −Q Q and E Γ =qQ . The V ± are free 2d chirals, but not necessarily problematic because they are uncharged under the gauge symmetry.
It is not necessary to integrate out all the matter when flowing from Aharony duality. Here and in Section 9.4 we discuss two particularly well-behaved scenarios in which some 3d chiral matter remains.
Consider the basic bulk Aharony duality of Section 8, and write as before. Suppose we want integrate out all the anti-fundamental chiralsQ 3d in Theory A, leaving behind fundamentals Q 3d . This can be done by first redefining axial charge in Theory A by adding −1 times the charge under the U (1) part of the gauge group, and by N f times the topological charge. Then introducing a large positive (say) axial mass gives Q 3d a positive mass, keeps Q 2d massless, and (thanks to the mixing with topological charge) maintains a vanishing effective FI parameter. The bulk Theory A flows to By inspecting effective Chern-Simons levels on the Coulomb branch of the theory, one also finds that there is a single scalar, gauge-invariant monopole remaining.
We may track the effect of the same deformation in Theory B. We similarly start by redefining axial charge by adding N f times topological charge and (now) +1 times U (1) gauge charge. Then introducing a large positive axial mass gives theQ 3d anti-fundamental chirals and the V − 3d singlet a negative real mass, gives all the singlets M 3d a positive mass, and keeps Q 3d and V + 3d massless. The bulk theory flows to with N f fund's Q 3d and a singlet V + 3d , (9.10) with bulk Chern-Simons terms We summarize the charges of the remaining matter fields in Theories A and B: The equality of half-indices corresponding to the pair of b.c. (9.14) also follows from equality of the half-indices in Aharony duality (8.13), (8.14), by applying a limit to fugacities that mimics the limit of real masses in the flow. Specifically, we should redefine and then send a → ∞. Conveniently, the prefactor in the II (D,D,D) index (that depends on the boundary anomaly) remains independent of a, thanks to our careful mixing of axial and topological symmetries. Moreover, a only appears in the arguments of quantum dilogarithms with negative exponents, thanks to our careful alignment of N vs. D b.c. and axial charges. Thus the a → ∞ is well defined, and simply sends every quantum dilogarithm containing a negative power of a to '1'. This just means that the contributions of all massive bulk fields disappear. Assuming equality of the half-indices (8.13), (8.14), we derive an equality = II (N ,N,N)+Γ,η .
Finally, note that we could equally well have triggered the above flows with a large negative axial mass. This leads to  On the boundary, the baryonic Fermi multiplet η is lost by the same mechanism as in Section 7.4. The N fundamental Fermi multiplets Γ coupled to Neumann b.c. are sufficient to cancel gauge anomalies. We expect, for example, that where now the s fugacities parameterize the torus of SU (N ) and m are vectors in the cocharacter lattice of SU (N ). Let us present a simple non-abelian example. On the Neumann side we consider U (2) −9/2,−3/2 with one fundamental and three boundary Fermi multiplets, and on the Dirichlet side we consider its dual SU (3) 9/2 with one fundamental.
The Neumann side of the half-index is × II D ((a/q)q −1+m 1 s 1 )II D ((a/q)q −1−m 2 /s 2 )II D ((a/q)q −1−m 1 +m 2 s 2 /s 1 ) (q 1−2m 1 +m 2 s 2 /s 2 1 ) ∞ (q 1+m 1 +m 2 s 1 s 2 ) ∞ (q 1+m 1 +2m+2 s 2 2 /s 1 ) ∞ where, as in other examples, we have shifted the fugacity for the axial symmetry a → a/q for convenience. One can check that these expressions match order by order in q. The expansion may be written compactly in terms of SU (3) characters  with n f fundamentals, n a anti-fundamentals Generalizing the previous example, we may partially integrate out some fundamentals and antifundamentals from Aharony duality. If we wish to avoid edge modes, we may use (say) the (D,D,D) ↔ (N ,N,N,D,N)+Γ, η duality of boundary conditions, and make sure that both fundamentals and antifundamentals are integrated out with positive mass in Theory A, and negative mass in Theory B. Suppose that we wish to integrate out N f − n f fundamentals (leaving n f behind) and N f − n a anti-fundamentals (leaving n a behind), all with positive mass in Theory A. Following [14], this can be accomplished by breaking the flavor symmetry SU (N f ) → SU (n f )×SU (N f − n f ) × U (1) f and SU (N f ) → SU (n a ) × SU (N f − n a ) × U (1) f , and, roughly speaking, using a combination of axial, U (1) f , and U (1) f masses to give the last N f −n f fundamentals (N f −n a anti-fundamentals) a positive mass while keeping the rest massless. As long as n a , n f < N f , no scalar, gauge-invariant monopole operators remain.
The corresponding transformation in Theory B gives the last N f − n f fundamentals (N f − n a anti-fundamentals) a negative mass. It also gives some of the mesons a positive mass, and (due to mixing with the topological symmetry) it turns out to give the V ± singlets a negative mass so long as n a , n f < N f . This aligns perfectly with the (N,N,D,N) b.c. in Theory B, so no edge modes are generated.
After integrating out all massive fields in the bulk, we arrive at The full anomaly polynomials encoding the new bulk UV CS levels come out as 31 Tr(s 2 ) + (Tr s) 2y + (n a − n f )(a − r) (9.27) Tr(s 2 ) + (Tr s ) 2y + (n a − n f )a (9.28) + 1 2 (k + N − n a )Tr x 2 + 1 2 (k + N − n f )Trx 2 + 1 2 (n a + n f )(k + N ) − 2n a n f a 2 + − (n a + n f )N + 2n a n f a r with the Fermi multiplets Γ, η remaining untouched -they have the same bifundamental and bi-det charges as in (8.5). Anomaly matching along the RG flow on either side ensures that boundary anomalies will still match perfectly; and an identity of half-indices may be derived from the Aharony half-indices (8.13)-(8.14) by sending appropriate fugacities to infinity, just as in (9.20). Finally, from (9.29) (or by flowing with the Aharony interface (8.6)), we obtain the duality interface

Other Seiberg-like dualities
There are many more Seiberg-like dualities in the bulk that flow from Aharony duality by integrating out chirals with a combination of positive and negative masses. This generates bulk Chern-Simons levels that are smaller than those in (9.25). In the presence of our usual boundary conditions, such a flow will necessarily produce edge modes, which must be incorporated into a duality of boundary conditions in the way that was outlined at the end of Section 9.1. This leads to boundary conditions that appear rather complicated, though in principal their analysis is systematic.

Adjoint matter
We conclude with a simple example of a gauge theory coupled to adjoint matter: SU (2) k plus a single adjoint chiral multiplet Φ 3d . If the Chern-Simons level is equal to ±1, then 31 To obtain this form, we shifted the global CS levels for both theories A and B by a constant amount.
according to the "duality appetizer" of Jafferis and Yin [66] this theory is dual to a single free N = 2 chiral multiplet. We consider the following duality amuse-bouche by finding simple dual boundary conditions. We assume that the chiral Φ 3d has R-charge zero, and charge +1 for a U (1) x flavor symmetry. We also set all the background CS levels in the bulk to zero.
First suppose that the dynamical Chern-Simons level is non-negative, k ≥ 0, so that Dirichlet b.c. are well behaved. Taking D b.c. for the gauge multiplet and D b.c. for the chiral, the anomaly polynomial is The corresponding half-index is II D,D (x, y; q) = 1 (q) ∞ II D (x; q) m∈Z q km 2 y 2km II D (q 2m xy 2 ; q)II D (q −2m xy −2 ; q) (q 1+2m y 2 ; q) ∞ (q 1−2m y −2 ; q) ∞ , (10.2) and converges nicely as long as k ≥ 0. (A substitution x → x/q aids computations). Here x is the fugacity for the bulk U (1) x flavor symmetry and (y, y −1 ) are the fugacities for the SU (2) ∂ boundary flavor symmetry. For k = 1 we find II k=1 D,D (x, y; q)=II D (x 2 ; q) χ 0 [SU (2) 1 ](y) , i.e. the index of D b.c. for a free chiral Tr(Φ 2 ) (as predicted by the duality appetizer), together with a decoupled SU (2) 1 WZW model on the boundary. The WZW model carries the Tr(f 2 ) boundary 't Hooft anomaly. In order to get a perfect match of boundary anomalies, the RHS also requires background CS terms − 1 2 (x + r) 2 in the bulk. Amusingly, at k = 0 we also find II k=0 D,D (x, y; q) = II D (x 2 ; q)II N (x −1 ; q) , (10.4) suggesting that the bulk theory is dual to two free chirals of U (1) x charge +2, −1, with N and D b.c., respectively. Indeed, we can identify the +2 chiral with Tr(Φ 2 ), and the −1 chiral with a monopole operator that hits the unitarity bound during RG flow. The anomalies match on the nose, since on the RHS I D + I N = 1 2 (2x − r) 2 − 1 2 (x + r) 2 = 3 2 x 2 − 3xr. We may similarly consider Neumann b.c., assuming that the Chern-Simons level is nonpositive, k ≤ 0. At k = 0, the anomaly polynomial of N b.c. on the gauge multiplet and N b.c. on the adjoint chiral is I N ,N k=0 = − 3 2 x 2 + 3xr . Happily, there is no gauge anomaly to cancel. We suspect by comparison to (10.4) that in the IR we should find two chirals of U (1) x charges +1, −1, with N and D b.c., respectively. Indeed, the half-index is and a gauge anomaly must be cancelled. This can be done by adding two boundary Fermi multiplets Γ 1 , Γ 2 of R-charge zero, transforming as a doublet of SU (2). These Fermi multiplets also transform with charge +1 (say) under a boundary U (1) z flavor symmetry. The total boundary anomaly becomes I N ,N + I Γ = −Tr(f 2 ) − 3 2 x 2 + 3xr + Tr(f 2 ) + 2z 2 = 2z 2 − 3 2 x 2 + 3xr . We show here that this can be viewed as a fermionic analogue of T-duality. We thank N. Seiberg for suggesting this perspective to us. We begin by considering a 2d N = (2, 2) theory with a free, periodic chiral multiplet Φ, satisfying D ± Φ = 0. With respect to a N = (0, 2) subalgebra, the multiplet splits into a chiral and a fermi C : The T-dual of Φ is a twisted-chiral multipletΦ, which also splits into a N = (0, 2) chiral and a fermiC : Note that Γ and Λ are ordinary (0,2) Fermi multiplets, both with E = J = 0, which must capture the same degrees of freedom. Since the (2,2) chiral and its T-dual are related on shell by (cf. [142]) Φ + Φ † =Φ +Φ † , (A. 4) we immediately see that, on shell, which is the same as (A.1).
To incorporate general E and J terms, we work directly in an interacting 2d N = (0, 2) theory. Consider a general 2d N = (0, 2) theory with a distinguished Fermi multiplet Γ, which is constrained to satisfy D + Γ = E Γ (C) (a function of the chiral multiplets) and has a superpotential interaction dθ + ΓJ Γ (C). We assume that the kinetic term for Γ has been diagonalized, 32 so that the part of the superspace Lagrangian involving Γ takes the form L(Γ) = dθ + dθ + h(C, C † , ...)ΓΓ † + dθ + ΓJ Γ + c.c. (A.6) Note that supersymmetry requires the total E · J to vanish (or more generally to be constant, see Footnote 5), but as long as there are other Fermi multiplets in the theory we may assume that E Γ and J Γ are totally generic. We can rewrite the action in terms of a general, unconstrained superfield Γ by introducing a second Fermi multiplet Λ to act as a Lagrange multiplier: L(Γ, Λ) = dθ + dθ + h(C, C † , ...)ΓΓ † + dθ + ΓJ Γ − Λ(D + Γ − E Γ ) + c.c. (A.7) A priori, D + Λ could be arbitrary (the chiral constraint D + Γ = E Γ is implemented regardless); but new superpotential term preserves SUSY only if the total 'E · J' is unchanged (up to a constant). The new effective contribution to E · J, replacing E Γ J Γ , is Finally, we integrate out the unconstrained superfield Γ to obtain a dual Lagrangian in terms of Λ, As desired, the E and J terms have been swapped. More interestingly, the metric has also been inverted. It is also easy to see from (A.10) that, on shell, Note that in a gauge theory, if Γ has charge q under an abelian (say) gauge symmetry, the effective metric in the Lagrangian looks like h ∼ e 2qA + . Its inverse in the Λ kinetic term is 1/h ∼ e −2qA + , consistent with the fact that Γ and Λ must have opposite charges.

B Character of the Vacuum Module
In this section, we show that equation (7.16) is equivalent to the standard Weyl-Kac character formula for the vacuum module.
The standard Weyl-Kac character formula for an integrable representation of an affine Kac-Moody algebra of highest weightλ is chλ[G k ] = w∈Ŵ (w)e w(λ+ρ) eρ α>0 (1 − e −α ) mult(α) (B.1) where we can write the affine weight and Weyl vectors in terms of their finite counterparts asλ = (λ, k, 0),ρ = (ρ, h, 0) 33 . In particular, the highest weight vector corresponding to the vacuum module is λ = (0, k, 0), where the first entry is understood to be the vector of length r with all components equal to zero. In general, a hatted quantity denotes its affine counterpart. It is convenient to rewrite the 'normalized character' following [148] as where the theta functions, defined below, in the numerator and denominator together include the overall factor of the modular anomaly, see footnote 28. Notice that the sum in the numerator is now over the finite Weyl group. The theta functions are Θλ(q, x) = α ∨ ∈Q ∨ e (λ+kα ∨ ,k,|λ| 2 /2k−|λ+kα ∨ | 2 /2k) =: m∈Q ∨ x km x λ q k 2 |m+λ/k| 2 = m∈Q ∨ x km x λ q k 2 (m,m) q (m,λ) q |λ| 2 /2k (B.3) with the sum taken over the coroot lattice Q ∨ .
We can use this to rewrite the numerator of the Weyl-Kac formula for the vacuum module as In the second line we used the fact that Weyl translates of ρ have the same length and in the second-to-last line we have used the Weyl denominator formula: w∈W (w)e w(ρ)−ρ = α∈Φ + (1 − e −α ). Finally, in the last line, we used the identity α∈Φ + (q 1/2 ) −m.α = q (m,ρ) (after accounting for our particular sign conventions). The extra factor of (−1) m.α is trivial in the case of G simply connected, since m.ρ ∈ Z, m ∈ Λ ∨ = Q ∨ so that (−1) m.α = 1. This is precisely the numerator of equation (7.16)-except for the modular characteristic q 1 2 |ρ| 2 /(k+h)− 1 2 |ρ| 2 /h which we drop-if the group G is simply connected and hence the coroot lattice can be identified with the cocharacter lattice.
Manipulating the denominator formula of the affine Weyl-Kac character formula is even easier: where we recall that the set of positive affine rootsα = (α, n, 0) includes roots with positive, negative, and zero α with positive n, as well as roots of the formα = (α, 0, 0) with α ∈ Φ + . For non-simply connected G our half-index formulae suggest that one should just replace the coroot lattice with the cocharacter lattice in the definition of our theta function, as well as honestly include the (−1) m factor, which may be nontrivial in general. The former replacement indeed occurs in the work of [153], who proposes a non-simply connected generalization of the Weyl-Kac formula in Theorem 5.5. It would be interesting to precisely match our formula to the literature in the case of simple but not simply connected G (or else refine our conjecture).