Localization of 4d $\mathcal{N}=1$ theories on $\mathbb{D}^2\times \mathbb{T}^2$

We consider 4d $\mathcal{N}=1$ gauge theories with R-symmetry on a hemisphere times a torus. We apply localization techniques to evaluate the exact partition function through a cohomological reformulation of the supersymmetry transformations. Our results represent the natural elliptic lifts of the lower dimensional analogs as well as a field theoretic derivation of the conjectured 4d holomorphic blocks, from which partition functions of compact spaces with diverse topology can be recovered through gluing. We also analyze the different boundary conditions which can naturally be imposed on the chiral multiplets, which turn out to be either Dirichlet or Robin-like. We show that different boundary conditions are related to each other by coupling the bulk to 3d $\mathcal{N}=1$ degrees of freedom on the boundary three-torus, for which we derive explicit 1-loop determinants.


Introduction
Since the pioneering work of Pestun [1], which builds on previous results on exact nonperturbative effects in 4d N = 2 supersymmetric gauge theories (8 flat-space supercharges) [2][3][4][5][6][7], localization techniques have been successfully applied to computing protected observables in theories with varying amounts of supersymmetry and in diverse dimensions and backgrounds (for recent comprehensive reviews on techniques and results we refer to [8,9]). For theories with N = 1 supersymmetry in four dimensions (4 flat-space supercharges), most of the studies have focused on closed compact spaces with S n × T m topology (or quotient thereof), while only few results for manifolds with boundaries are available, mostly focused on theories in two and three dimensions [10][11][12][13][14][15][16][17][18][19][20][21]. Loosely speaking, we will sometimes refer to a space with a boundary (possibly asymptotic) as non-compact, in sharp contrast to the radically different case of a closed space without boundary. The study of theories on non-compact spaces is interesting for many reasons as the boundary provides a kind of refinement of the compact setups. The scarcity of literature on the subject represents the main motivation for this paper, which is devoted to studying 4d N = 1 theories with R-symmetry on curved manifolds with boundaries. Following the rigid supergravity framework developed in [22][23][24][25][26] and demanding the existence of two Killing spinors of opposite R-charges in the bulk, the allowed backgrounds are complex manifolds diffeomorphic to torus fibrations over a Riemann surface. We consider the simplest choice, namely the (twisted) product of a torus (T 2 ) times a disk (D 2 ). The main goal of the paper is to compute the exact partition function (Z) through supersymmetric localization, recovering previous results arising from factorization arguments [27] as well as studying supersymmetry preserving boundary conditions. This observable can also be interpreted as a flavored Witten index (up to contact terms) where F is the fermion number and H is a certain element of the bosonic subalgebra commuting with the localizing supercharge. The trace is over the Hilbert space of states on D 2 ×S 1 , whose definition includes a choice of boundary conditions. This four dimensional background is particularly interesting also because most of the lower dimensional results can be recovered by dimensional reduction.
Factorization. The formulation of supersymmetric theories on manifolds with boundaries can be thought to be more elementary to a large extent. Indeed, the majority of the compact space results can be (non-trivially) obtained from the non-compact ones through certain sewing procedures, reflecting how a compact background can be decomposed into basic geometries while respecting supersymmetry (for an alternative approach using compact backgrounds with defect operators we refer to [28][29][30]). The prototypical example of this picture is provided by 3d N = 2 gauge theories, where the topology is sufficiently rich and the theories sufficiently simple to manifest these phenomena in a controllable way. In fact, in a large number of interesting examples it was explicitly shown that the partition functions of Yang-Mills-Chern-Simons-Matter theories on S 3 , S 2 × S 1 or lens spaces L(p, 1) [31][32][33][34][35][36][37][38][39][40][41][42] can be assembled from two copies of the partition functions on the half-space D 2 ×S 1 , a.k.a. 3d holomorphic blocks [43]. This can intuitively be understood as a manifestation of the genus one Heegaard decomposition/gluing of the compact spaces into/from a pair of solid tori D 2 × S 1 and the quasi-topological nature of the partition functions [25,44]. Together, these observations lead to the expected (schematic) result where g ∈ SL(2, Z) is the group element associated with the homeomorphism implementing the sewing along the boundaries ∂(D 2 × S 1 ) T 2 of the solid tori into the compact space (also acting on the disk partition function), while γ represents a label for the IR boundary conditions (Higgs vacua) to be summed over. This intriguing type of factorization, very reminiscent of the tt * geometries [45,46], was first observed by studying the functional structure of the partition functions on different compact spaces in several examples [27,[47][48][49][50][51][52], whereas a derivation of the 3d holomorphic blocks was obtained through supersymmetric localization on D 2 × S 1 [15], lifting the results for 2d N = (2, 2) theories on D 2 [12,13]. Similarly, a factorized structure for the partition functions of 4d N = 1 theories on S 3 × S 1 , S 2 × T 2 and more generally L(p, 1) × S 1 [53][54][55][56][57][58][59][60][61] was also observed [27,[62][63][64], where the solid tori are naturally replaced by D 2 × T 2 patches with the sewing along the boundaries ∂(D 2 × T 2 ) T 3 implemented by an element g ∈ SL(3, Z). One of the main motivations behind this work is to provide a derivation of the 4d holomorphic blocks proposed in [27] from an independent computation though supersymmetric localization on D 2 × T 2 , thus completing the 2d-3d-4d or rational-trigonometric-elliptic hierarchy [65,66] of the exact effective twisted superpotential of gauge theories with 4 supercharges.
Boundary conditions. The formulation of supersymmetric theories on manifolds with boundaries is also necessary in order to study interesting aspects which would be lost otherwise, such as the physics of boundary conditions, interfaces and bulk/boundary coupled systems. Once again, 3d N = 2 theories have provided a very useful laboratory so far [67][68][69][70], and the lift to 4d N = 1 theories provides another strong motivation for this paper (for a recent general analysis we refer to [71]). An interesting and localization-friendly approach has been recently put forward in [72] for 3d N = 2 theories and a class of dual boundary conditions preserving 2d N = (0, 2) supersymmetry on the boundary, including the familiar Dirichlet and Neumann conditions. In this paper, we begin to develop the four dimensional lift of that approach, focusing on a subset of boundary conditions which naturally arises from our localization framework. Indeed, it turns out that we are able to perform localization upon imposing either Dirichlet or Robin-like conditions on the chiral multiplets of the theory, which preserve some supersymmetry at the boundary. We argue that the two boundary conditions can be flipped by coupling additional degrees of freedom supported on the boundary, and we provide a non-trivial check by computing the D 2 × T 2 partition function for both boundary conditions and showing that their ratio does indeed reproduce the partition function of a 3d boundary theory on ∂(D 2 × T 2 ) T 3 , which we derive by cohomological localization. This feature is reminiscent of dualities of boundary conditions in the context of 3d N = 2 theories [72], and it also provides a physical inter-pretation of well-known shift properties of the elliptic Gamma function featuring in our computations. However, a direct uplift would correspond to 4d N = 1 supersymmetry in the bulk and 3d N = 1 on the boundary, whereas our background only preserves a certain subalgebra in both cases due to curvature and bulk-boundary couplings.
Localization. On the technical side, our approach to computing exact partition functions is based on the cohomological reformulation of the supersymmetry transformations, closely following the 3d N = 2 framework of [73,74]. In a nutshell, the central observation is that the supercharge which we use for localization can be identified with an equivariant differential acting on the supermanifold of quantum fields, therefore inducing the structure of an equivariant cohomological complex. Upon specifying its structure and the pairing between the different fields, the fluctuations around the localization locus can be integrated out to obtain the 1-loop determinants for both vector and chiral multiplets. However, we encounter several subtleties along the way, such as the presence of fermionic zero modes, singularities of the path integral measure and the related question of identifying the correct integration contour(s). Many of these issues are already familiar from studies of localization on compact manifolds [41,[75][76][77] and can be addressed by existing arguments, whereas other subtleties are strictly tied to our choice of background. Amongst the main differences, we can mention the global constraints imposed by the boundary. A key property of the selected supercharge is that its action squares to a (twisted) Lie derivative along a Killing vector parallel to the boundary, hence ensuring the cancellation of several boundary terms and leaving some freedom in the choice of boundary conditions. However, some of the boundary terms must be killed by a specific choice of boundary conditions, which turns out to be either Dirichlet or Robin-like for the chiral multiplets, while we consider Neumann for the vector to preserve some gauge symmetry on the boundary. These restrictions discard some of the fluctuations which would otherwise contribute to the 1-loop determinants, hence yielding different results w.r.t. the compact backgrounds (essentially, half of those). Finally, we discuss how 4d N = 1 multiplets can be decomposed into 3d N = 1 multiplets when restricted to the boundary, which is a convenient step before considering bulk-boundary coupled systems. The literature on 3d supersymmetric theories with minimal supersymmetry is rather limited (we refer to [78] for a general analysis), but this very interesting subject has lately gained great attention [79][80][81][82][83][84]. Our setup naturally allows us to consider such theories on (twisted) T 3 , and opens up a new perspective for computing their partition functions through cohomological localization in conjunction with the bulk theory.
Summary of the main results. Our main results are concrete expressions for the 1-loop determinants of 4d N = 1 vector and chiral multiplets on D 2 × T 2 , which constitute the building blocks of integral expressions of gauge theory partition functions. For a vector multiplet of a gauge group G with Cartan subalgebra h we find Res u=0 Γ(u; τ, σ) where Φ (0) ∈ h C is the zero mode of the gauge connection along the (anti-holomorphic) Killing vector field on the torus, P 3 (u) is a cubic polynomial arising from regularization, Γ(u; τ, σ) is the elliptic Gamma function with parameters τ, σ associated with the torus modulus and disk equivariant parameter respectively (that is the moduli of the complex structure), while the prime stands for excluding the zero roots (corresponding to Cartan generators). Similarly, for a chiral multiplet of R-charge r in a representation R of the gauge group we find for Robin-like conditions. One can notice that the ratio of these results is a Jacobi Theta function (up to the exponential of a quadratic polynomial) which can naturally be interpreted as the contribution of boundary degrees of freedom flipping the boundary conditions. This is an interesting prediction, which we are able to support by explicit computation of the 1-loop determinants of a pair of 3d N = 1 real multiplets on ∂(D 2 × T 2 ) T 3 , for which we find the r.h.s. of the ratio above.
Organization of the paper. The paper is organized as follows. In section 2, we collect relevant definitions and properties of the background geometry that we consider. In section 3, we provide a self-contained discussion of the supersymmetric multiplets, their actions and boundary terms. In section 4, we discuss the cohomological localization for vector and chiral multiplets, introducing the relevant complexes and evaluating the 1-loop determinants subject to boundary conditions. In section 6, we review how bulk fields can be decomposed into multiplets of the minimal supersymmetry preserved by the boundary, laying out the foundation for the analysis of the interplay between boundary matter and boundary conditions for bulk fields. In section 7, we discuss the inclusion of some observables and classical terms in the theory which are consistent with our localization framework, and we also test our results for the gauge theory partition functions against Seiberg duality for SQCD. In section 8, we conclude with a discussion of the main open questions that arose from our analysis and suggestions for future works. The paper is accompanied by several appendices, where we summarize our conventions and notations used in the main text as well as few side technical aspects of our analysis.

Background geometry
Let us start by reviewing the geometry of the class of supergravity backgrounds we are interested in, closely following [23,54,57,58]. The purpose of this section is to provide a detailed description of the geometry from various angles. We begin by expressing various geometric quantities such as the complex structure or the metric in terms of Killing spinor bilinears. This will be useful in the construction of supersymmetric actions and in the description of the cohomological complexes adopted for localization. The choice of adapted complex coordinates will be useful for explicit computations of 1-loop determinants. An alternative choice of real coordinates will also be useful for dealing with the boundary. Our conventions are collected in appendix A together with some useful identities.

General aspects
We consider Riemannian 4-manifolds with metric g µν admitting solutions to the following Killing spinor equations where A µ is a background Abelian connection for the R-symmetry line bundle R, while V µ is a background field satisfying ∇ µ V µ = 0. The existence of solutions implies that the manifold has to be Hermitian, and we denote the Hermitian metric by g µν . We focus on the case where two solutions ζ andζ of R-charges ±1 and opposite chiralities exist. In this case, we can define the following fundamental vectorial Killing spinor bilinears 1 The vectors Y µ ,Ȳ µ have R-charge ±2, while K µ is a complex Killing vector and we assume that K µ commutes with its conjugate. 2 When there is no confusion, we will omit all the indexes to avoid cluttering. In particular, the dual 1-forms obtained by lowering the indexes with the metric will be denoted by the same symbols. Next, we define the following 2-form Killing spinor bilinears 3 Notice that the tensor P is self-dual and carries R-charge 2, whileP is anti-self-dual and carries R-charge −2. The tensor J µ ν squares to −1, it is integrable and provides a complex structure. 4 In fact, the 2-form J µν is the Kähler form associated with the Hermitian metric. Notice that the vectors K, Y are anti-holomorphic whileK,Ȳ are holomorphic. In terms of the 1-form bilinears, we also have the expressions The 1-form Killing spinor bilinears provide an orthonormal frame, and the metric reads The volume form is taken to be The Killing spinor equations also impose some integrability condition on the background fields, in particular where R is the Ricci curvature (negative for the round sphere) and F µν is the R-symmetry field strength. Also, the existence of the Killing spinors, and hence a choice of the above geometric structures, can be used to determine the background fields A µ and V µ , in par- where κ is an arbitrary K-invariant function, namely K µ ∂ µ κ = 0. The R-symmetry connection can be similarly written in terms of the Chern connection, the complex structure and the Killing vector, but we will consider its explicit form later on in specific coordinates. Finally, given a connection 1-form A for an additional vector bundle, we denote the total covariant derivative by where the dot denotes the action in the appropriate representation and q R is the R-charge. In fact, A will be the gauge connection for a gauge group G with Lie algebra g and choice of Cartan subalgebra h. For a given vector v, we define the (total) covariant derivative along v by In particular, the Killing spinor equations imply the conservation laws

Complex coordinates
Under the above assumptions, a complex 4-manifold admitting such geometric structures is a T 2 fibration over a Riemann surface. Introducing local complex coordinates (w,w) on the torus and (z,z) on the base, the Hermitian metric can be locally written as where Ω = Ω(z,z) and c = c(z,z) are nowhere vanishing real functions while h = h(z,z) is generically complex. This suggest to work in the holomorphic frame where θ a form a real orthonormal frame and a = 1, 2, 3, 4 is a flat space index. In this frame, the Killing spinors we consider can be explicitly given as where s is a nowhere vanishing global section of the canonical line bundle tensored with the square of the R-symmetry line bundle. In fact, since P is a section of the R-symmetry line bundle R with R-charge 2 and a section of the canonical bundle K of self-dual (2, 0)-forms, it can be defined by  (2.16) and the dual 1-forms are while the volume form becomes Finally, the R-symmetry connection in the holomorphic frame reads After the previous general and local analysis, let us next discuss the global properties of the background we are interested in. We consider the product of a torus T 2 with a disk D 2 . The modular parameter τ ∈ H + of the torus determines the periodicities of the complex coordinate w to be w ∼ w + 2π ∼ w + 2πτ . The boundary of the disk is defined to be a circle located at |z| = |z| ∂ , corresponding to the actual boundary ∂(D 2 × T 2 ) T 3 . In later sections, we will make a few simplifying choices w.r.t the most general setup that has been discussed so far. In particular, we will consider the standard flat metric on the torus and the standard Kähler metric on the disk where = ±1, 0 for the spherical, hyperbolic or flat space. In the following, we will adapt our discussion to the spherical metric, in which case we can consider a boundary at finite distance. Note that this metric posses an additional Killing vector corresponding to rotations parallel to the boundary of the disk generated by −i(z∂ z −z∂z). It will be convenient to consider the unit normalized real vector and introduce the normal direction to the boundary as its orthogonal (unit normalized) complement on the disk, namely Even though these are ill-defined at the origin of the disk, we only need them close to the boundary, and we will often use the symbol ⊥ to denote the normal direction. As far as the background fields are concerned, the Kähler condition dJ = 0 implies V = κK, hence we may further specialize to κ = 0, in which case the R-symmetry connection reduces to The R-symmetry connection is real provided that |s| is constant, which is what we assume. From dA = vol D 2 /2, we see that this configuration gives a unit flux on the full sphere. We also consider a refinement of the background consisting of the following global identifications of the holomorphic coordinates [54] (w, z) ∼ (w + 2π, e 2πiα z) ∼ (w + 2πτ, e 2πiβ z) , (2.24) with α, β ∈ R, α ∼ α + 1, β ∼ β + 1. The parameters τ and σ ≡ ατ − β can be interpreted as complex structure moduli. Note that the 2-form (2.15) must be well-defined under the quotient (2.24), implying that s must also be subject to the identifications s ∼ e −2πiα s , s ∼ e −2πiβ s . (2.25) As we have already mentioned, since s is a nowhere-vanishing global section of R 2 ⊗ K transforming by phases w.r.t. holomorphic coordinate changes, we can always offset these identifications by a suitable R-transformation so that s (and hence the Killing spinors) behaves as a scalar w.r.t. changes of adapted coordinates. In other words, one can identify R K − 1 2 (up to a trivial line bundle). After that, since we restrict to constant |s| in order for the R-symmetry connection to be real, we could treat s as a constant as well, however it will be more convenient to retain it for bookkeeping purposes. Any other field X of the theory carrying R-charge q R also acquires twisted periodicities under the identifications (2.24), namely For our background, K is topologically trivial, hence the R-charges do not need to be quantized. This is in contrast with the case where the disk is replaced by a compact sphere.

Real coordinates
It is also useful to have a description of the background in terms of real coordinates trivializing the identifications (2.24). For the torus we employ real coordinates (x, y) subject to periodic identifications Similarly, we can parametrize the unit disk through a radial coordinate tan ϑ/2, ϑ ∈ [0, π/2] and an angular coordinate ϕ ∼ ϕ+2π. Here we are adapting the notation to the hemisphere with polar angle ϑ, and thus it is natural to place the boundary at ϑ = π/2, namely at |z| = 1 in complex coordinates. The change from real to complex coordinates is as follows which inverts to In real coordinates, the metric reads ds 2 = (dx + Re(τ )dy) 2 + Im(τ ) 2 dy 2 + dϑ 2 + sin 2 ϑ(dϕ + αdx + βdy) 2 , (2.30) while the R-symmetry connection becomes (up to flat connections) These expressions clarify that the refinement provided by α, β is equivalent to turning on a flat connection in the dϕ direction, namely an equivariant deformation by the chemical potential σ for the angular momentum on the disk. In fact, the Killing vector is a complex combination of the three real angles in geometry and the twisted periodicities on the fields can be interpreted as shifting the effective angular momentum by the R-charge due to the presence of a magnetic field. 5 Finally, the normal and tangent vectors to the boundary introduced in (2.21), (2.22) are simply identified with (2.33) 5 In real coordinates, it is more convenient to work with periodic fields along the torus and turning on a corresponding flat connection. While we have repeated all computations also in the real frame, here we only present them in the holomorphic frame, which is more elegant.
Remark. When there is a boundary, an important piece of data is the transition between the bulk and boundary frames, and this is particularly delicate for spinorial objects. We refer to [12] for an exhaustive discussion on the disk in the context of supersymmetric localization. We discuss the geometry of the boundary and its relation to the bulk in more detail in section 5.

Bulk supersymmetry
Having discussed the background geometry in the previous section, we now turn to a description of the supersymmetry algebra preserved by this background. We will first review how supersymmetry acts on 4d N = 1 vector and chiral multiplets in the supergravity background of the previous section. This will set the stage for the discussion of supersymmetric actions and suitable boundary terms.

Supersymmetry multiplets
In Euclidean flat space, the 4d N = 1 supersymmetry algebra is generated by left and right handed supercharges Q α ,Qα with R-charges ∓1 satisfying where P a is the (covariant) momentum operator and a = 1, 2, 3, 4 a flat index. In the curved background we are considering, we will denote by δ ζ , δζ the odd supersymmetry transformations generated by the commuting Killing spinors ζ,ζ respectively, and the supersymmetry algebra is broken down to the subalgebra where L K is the Lie derivative along K and G Φ represents an infinitesimal gauge transformation with parameter Φ. Gauge transformations act on the gauge connection A and any other field X as follows where Φ. denotes the action in the relevant linear representation. It turns out that is a component of the gauge field itself. We also introduce the neutral combination which we are going to use for localization. In particular, using the real coordinates for the simplified Kähler background described in section 2.2, we can readily identify the Hamiltonian operator H that appeared in the introduction of the paper with where u can be an element in the Cartan of a global symmetry for which a background flat connection can be turned on. The almost perfect symmetry amongst the three boundary translation operators already hints at interesting modular properties of the partition functions. 6 We can now move on to discuss how supersymmetry is realized on elementary fields. Even though for actual computations we are eventually interested in the simplified geometry where dJ = V = 0, in this section we are going to discuss the general setup, unless otherwise stated.

Vector multiplet
A vector multiplet (A, λ,λ, D) includes a gauge field, gauginos, and an auxiliary scalar D whose R-charges are (0, 1, −1, 0). In Euclidean signature, λ andλ are independent Weyl spinors of opposite chirality. All fields are valued in the Lie algebra g of the gauge group G. The field strength with Hodge dualF ≡ F, 7 that isF SUSY transformations. The off-shell supersymmetry transformations are (3.10)

Zero mode multiplet
For later purposes, it is useful to separately study the multiplet of zero modes. This is motivated by the BPS localization locus that we will encounter later on. Since we are eventually interested in flat connections, it is useful to define the constant variables  [54,60]. 7 We use the ε tensor εwzwz = |g| × 1.
which coincide with the torus zero modes of the connection and encode the commuting holonomies around its cycles. In fact, using the gauge freedom, we can restrict to constant configurations along the torus, therefore Φ (0) andΦ (0) are proportional to the periods We can further assume that the holonomies can be simultaneously conjugated to the same Cartan torus, 8 hence effectively defining rk(G) independent complex coordinates on the flat connection moduli space. Also, since the periods shift by n y − n x τ and n y − n xτ respectively under the large gauge transformation A x,y → A x,y + 2πn x,y , 9 they are defined on a rk(G)-dimensional torus. The Kähler background we are eventually interested in admits non-trivial fermionic zero modes coming from the Cartan gaugini which feel only the spin and R-symmetry connections. Therefore, they must be proportional to the Killing spinors. This is particularly simple to see in the case V = 0, when the Killing spinors are annihilated by the Dirac operator. Altogether, the zero modes form a complete supermultiplet, and by defining the following constant fermionic scalar zero modes or equivalently then the supersymmetry transformations are where we have defined the constant (generically complex) combination Note that on the zero mode supermultiplet we have Q 2 = 2iδ K = 0, and that the BPS configurations necessarily have ∆ (0) = 0, namely F (0) = D (0) = 0 upon imposing the usual reality conditions

Chiral multiplet
The 4d N = 1 chiral multiplet (φ, ψ, F ) contains a complex scalar, a Weyl spinor, and an auxiliary complex scalar, all transforming in the same representation of the gauge group G. We will say that the multiplet has R-charge charge r if its component fields have charges (r, r − 1, r − 2). In Euclidean signature, each chiral multiplet is accompanied by an independent anti-chiral multiplet, with component fields denoted by (φ,ψ,F ). These have opposite R-charges, and transform in the conjugate representation of G.
SUSY transformations. The off-shell supersymmetry transformations for a chiral multiplet coupled to a vector multiplet are

Supersymmetric actions
Having reviewed how the basic 4d N = 1 multiplets transform under the supercharges preserved by our background, we now turn to supersymmetric actions, without superpotential terms. The inclusion of a superpotential will be discussed in section 7.1 since it is most conveniently carried out in terms of twisted fields, to be introduced later on. Also, in order to avoid cluttering, for non-Abelian theories the Tr in all the actions is left implicit.

Vector multiplet
The usual Lagrangian for the vector multiplet is However, in the presence of a boundary the action is generically neither Q -exact nor supersymmetric due to boundary terms, namely 10 Using the Killing spinor equations we can also writeζσ µD µψ = Dµ(ζσ µ ψ), ζσ µD µψ = Dµ(ζσ µψ ).
Let us compute the boundary terms. We define an involution ∨ acting as † on Killing spinors, background geometric quantities and C-numbers, while we will specify its action on dynamical fields momentarily. We define the following fermionic functionals and compute the variations where we used the identities Then the bosonic parts of the Lagrangians Q V vec , QṼ vec read Similarly, for the fermionic parts after this choice we obtain (3.27) and using the conservation (2.11) we get Note that the other Q -exact combination is a boundary Lagrangian which reduces to a 3d N = 1 Chern-Simons term on the boundary.
Remark. In order to properly define the theory, we need to discuss the allowed boundary conditions. We will do that when computing the partition function of the theory through localization. The Lagrangian that we will use differs from the usual one by boundary terms, and to apply our framework to the latter one would need to additionally restrict to those boundary conditions that also kill the normal component of B µ vec (and its Q-variation if some supersymmetry has to be preserved on the boundary). Since our Lagrangian is Qexact and the supercharge squares to an isometry generated by a Killing vector parallel to the boundary, supersymmetry alone does not enforce a choice of boundary conditions, leaving the freedom to explore different choices.

Chiral multiplet
The usual Lagrangian for the chiral multiplet coupled to a vector is However, in general the action is not supersymmetric nor Q -exact due to boundary terms, namely Let us compute the boundary terms. We define the following fermionic functionals We let the involution introduced previously to act as (φ, F ) ∨ = (φ, −F ) and assume a real R-symmetry connection so that A ∨ = A. The variations of the fermionic functionals yield Remark. In order to properly define the theory, we need to discuss the allowed boundary conditions. We will do that when computing the partition function of the theory through localization. As for the vector multiplet, let us reiterate that the Lagrangian that we are going to use for localization differs by boundary terms from the usual one. Therefore, in order to apply our framework to the usual Lagrangian one would need to additionally check that the boundary conditions also kill the the normal components of B µ chi ,B µ chi (and their Q-variations if some supersymmetry has to be preserved on the boundary).

Localization
We have now collected all the necessary ingredients for the off-shell Lagrangian formulation of 4d N = 1 theories on a manifold with boundary. In this section, we will employ the previous analysis to set up a computation of the path integral by localization. After some general remarks on the idea behind the cohomological approach to localization, we will discuss a preliminary reduction of the functional integral to a contour integral over the bosonic zero modes of the vector multiplet. We will then introduce the localization Lagrangians for vector and chiral multiplets and discuss the BPS locus defined by each of them. The next step will be to switch to twisted fields in order to make the structure of cohomological complexes manifest, both for vector and chiral multiplets. The identification of the complexes will then allow us to proceed with an explicit evaluation of the 1-loop determinants, taking into account the choice of boundary conditions. We will conclude the section with a brief discussion of the peculiar modular properties of the partition functions.

Preliminaries on the cohomological approach
The path integral we wish to compute takes the schematic form where we have generically denoted by X the collection of all quantum fields. We also recall that the combination Q of supercharges introduced in (3.2) represents an odd symmetry which is preserved even in the presence of the boundary. The localization principle relies on the fact that, upon very general and mild conditions, 11 Q-exact deformations of the supersymmetric measure do not modify the path integral (we refer to [9] for an exhaustive review of the subject, here we simply recall the main points). Therefore, one can either 11 Incidentally, we will soon see that in our case a very careful analysis of the Q -exact terms is needed.
work in the semiclassical limit if the defining action is already Q-exact, or one can consider Q-exact deformations and then take the semiclassical limit e 2 , g 2 → 0, which becomes an exact approximation. The crucial requirement is that the localizing action has positive semi-definite bosonic part along the integration contour in the complexified field space. Upon such procedure, the final result can be expressed in terms of a matrix-like integral of classical and 1-loop contributions over the moduli of the localizing equations, usually given by constant field configurations, namely 12 Different techniques have been developed to compute 1-loop determinants, from brute force diagonalization of kinetic operators to sophisticated index theorems. Our approach will be based on the cohomological reformulation of the supersymmetry transformations. 13 The key observation is that the supercharge Q can be identified with an equivariant differential acting on the field supermanifold, which can be in turn neatly divided into base (ϕ) and fiber (ϕ ) coordinates forming an equivariant cohomological complex After this identification, one can linearize the cohomological complex around the localization locus and integrate out the Gaussian fluctuations, obtaining the reduction which allows one to bypass the brute force diagonalization of the relevant kinetic operators. In fact, this result does not even require a choice of the Q -exact deformation terms and relies only on supersymmetry, but it is a good practice to define these terms as the field space is infinite dimensional and some care may (and will) be needed. Another advantage of this approach is that, along the way, one naturally discovers the operators which pair up the bosonic and fermionic modes, which may be used to simplify the problem even further.
The main goal of this section is to compute the determinant (4.5) for the vector and chiral multiplets. However, we should stress that there are several subtleties in the blind application of the localization principle to our setup, such as the presence of fermionic zero modes, singularities and divergences in the quantum measure at special loci as well as the identification of the correct integration cycle(s) in field space. These difficulties have already appeared, and have been extensively studied, in the literature [41,61,[75][76][77]. However, 12 In this paper, we do not have to deal with non-perturbative saddles. Also, we focus on the so-called Coulomb branch localization scheme. In principle, Higgs branch localization would also be possible and interesting to analyze, see e.g. [62,77,[85][86][87][88][89][90][91]. 13 For recent work in the context of 4d N = 2 theories, see e.g. [92,93]. most works focus on lower-dimensional theories, or on spaces without boundaries. In the following, we will adapt those results to our setup, emphasizing the additional working assumptions, similarities and differences, while we refer to the original references for a full account.

Reduction to a contour integral
Before embarking on the proper localization of the path integral and the computation of the 1-loop determinants, we would like to discuss two main sources of subtleties: 1. The presence of fermionic zero modes (Ξ 0 (0) , Ψ (0) ), making the direct application of the cohomological localization approach non-obvious.
(0) ), making the analysis of the Gaussian integration around the localization locus and the choice of integration contour very subtle.
Here we argue that these issues are related and that can be cured together to obtain a concrete answer for the partition function, along the lines of [41,61,77]. In fact, the original analysis of [75,76] applies essentially unchanged to our background too, with the modification of taking into account the disk modes. However, for the sake of completeness let us briefly recall how one can arrive at the expression (4.5), focusing on the Abelian case which is much simpler and eventually generalizes to the non-Abelian case too.
Even before any application of the localization machinery, the partition function of the whole theory can schematically be represented as an integral over the zero mode supermultiplet, and we can thus write where Z is the result of path integration over all the field configurations but the zero modes. The integration over the fermionic modes can be performed using a shortcut exploiting supersymmetry. Using the property Q Φ (0) = 0, one can deduce that and hence where the specialization Ξ 0 (0) = Ψ (0) = 0 is to be understood. Now the integrand on the r.h.s. can be computed exactly by localization, namely in the limit e 2 , g 2 → 0. While the g 2 → 0 limit does not pose serious problems, the limit e 2 → 0 must be taken with some care because the integrand may develop singularities at certain points in the Φ (0) ,Φ (0) plane where chiral multiplets develop scalar massless modes.
Remark. Intuitively, the dangerous loci come from the scalar zero modes of the kinetic operator on which Q 2 acts diagonally. In fact, for the modes |LȲ φ| 2 = 0 the only damping term is the mass |Φ (0) − Φ sing.
As a partial fix, one can make sure that there is the usual D-term coupling between the chirals and the vector, which is easy to fulfill by including in the localization action the Q -exact term Q (V λ +Ṽ λ ) from (3.33). This will generate a quartic potential providing a damping even at the dangerous locus. Unfortunately, this is true only as long as e 2 = 0. The recipe to control this bad behavior is to keep ∆ (0) as a regulator, and remove a small tubular neighborhood of the singular loci, of size ε shrinking faster than any power of e 2 . With this double scaling limit in mind, one is left with the contour integral which still needs to be properly defined. 14 Now the disk kinetic action includes a mass term so the (towers of) singularities in the complex ∆ (0) -plane become quite involved and one should specify the integration contour such that the scalar modes do not develop a tachyonic potential. The prescription that does the job is as follows: i) the contour of −i∆ (0) must asymptote the real axis and passes either slightly above or below the obvious singularity at ∆ (0) = 0; ii) assuming the chiral multiplets have (effective) R-charges all of the same sign, one splits the singularities to lie on either side of the contour according to the sign of their gauge charges. In the double scaling limit ε e 2 → 0, the poles in the ∆ (0) -plane will start moving around, towards the real axis and the origin. However, as long as the contour can be shifted to avoid possible collisions, the integral is well defined and in fact trivial because of the smoothness of the integrand and the Gaussian damping. However, a pole which moves towards the origin from the same side as the contour will inevitably pinch it against the pole at the origin. The contour must then cross the origin, picking up the residue at the unique BPS pole ∆ (0) = 0. This is the net contribution to the path integral, yielding the final expression ) since this is the meromorphic 1-loop determinant around the BPS saddles, and the subscript simply means that this pole prescription is equivalent to using the Jeffrey-Kirwan cycle/residue. The non-Abelian generalization is much more involved but the final result is the same, with the J.K. contour being a specific middle-dimensional cycle in the complex bosonic moduli space.
Remark. We expect that on the disk there should be multiple (in fact, a basis of) integration cycles (roughly speaking, corresponding to different vacua as described in [43]). While the J.K. cycle arises from the above arguments, there are more choices that one may take.
In particular, in the case of diverse chiral multiplets supporting a flavor symmetry, one can first resolve the degeneracies by turning on distinct background flat connections, and then one may consider contours going around the singularities associated with a selected multiplet γ, namely The basis of integration contours can be determined after the computation of the integrand.

BPS localization locus
Having laid out some of the subtleties involved in the computation, we now turn to the characterization of the BPS locus. In the cohomological localization approach, the computation of Z BPS (Φ (0) ) amounts to the evaluation of two quantities: i) the classical action on the "trivial" BPS localization locus, in which Ψ (0) = Ξ 0 (0) = ∆ (0) = 0; ii) the 1-loop determinant of Gaussian fluctuations around this background. The BPS locus is determined by a suitable choice of Q -exact localization actions, which we now construct.
Vector multiplet. As a localizing action we choose the Q -exact term Thanks to Q 2 = 2iL K on a neutral scalar, this action is automatically supersymmetric even in the presence of a boundary and regardless the boundary conditions if the Killing vector is tangent to the boundary, which is indeed our case. Notice that the bosonic part is also manifestly positive semi-definite on the real contour (A, D) † = (A, −D) = (A, D) ∨ , i.e. along D ∈ iR and A ∈ R. 15 The localization locus is thus given by the BPS equations leading to On the real contour, these are simply equivalent to F = ∆ = 0. Therefore, the BPS locus is given by flat connections (mod gauge transformations) These are classified by the commuting holonomies along T 2 , encoded by Φ (0) ,Φ (0) , which can be assumed simultaneously conjugated to the same Cartan torus. 16 In fact, using the 15 Notice that the path integral we started with makes sense as an integral over a complexified field space along a suitable contour. In fact, the SUSY transformations do not generically preserve the reality conditions one is interested in. As usual, the action of the involution ∨ must be taken as a definition, and it coincides with Hermitian conjugation only on the real contour. This is manifestly convergent but other choices may be possible. 16 We remind that we restrict to simply connected or unitary Lie groups. gauge freedom, the BPS locus can be reduced to the complexified Cartan torus (mod the Weyl group) Remark. Relaxing the reality condition on the contour of integration for D allows for a much larger set of BPS solutions, which can be called flux configurations. Taking a contour parallel to the imaginary axis, but not passing through the origin, the new BPS loci correspond to The configurations with Re(∆) = 0 are non-BPS, and therefore they are expected not to contribute in the limit e 2 → 0. However, configurations with constant ∆ = ∆ (0) and constant disk flux proportional to ιȲ ι Y F (0) would deserve a separate analysis because they pass through the BPS point and can reach the real contour D ∈ iR. As pointed out in [41,77], these non-trivial non-BPS flux saddles play indeed an important role in A-twisted theories on compact spaces. In our case, since we are mainly interested in preserving same gauge symmetry at the boundary through Neumann conditions, these saddles can be discarded. However, they can play a role for Dirichlet conditions, we will briefly return to this in section 6.4.
Chiral multiplet. As a localizing action we choose the Q -exact term where the localizing functional is As already mentioned for the vector, this action is automatically supersymmetric even in presence of the boundary. However, the bosonic part of the action is not manifestly positive semi-definite because of mixed terms involving δ ζ , δζ-variations and the D-term coupling. On the one hand, the mixed terms simply cancel out upon the standard choice (F,F ) ∨ = −(F , F ) as shown in appendix C, and the real contour where ∨ acts as † yields a manifestly positive semi-definite action. The convergence conditions imposed by the presence of the D-term coupling have already been discussed in section 4.2. Therefore, the bosonic localization locus is given by the BPS equations 20) in the (trivial) BPS vector background A = A (0) . Contracting these equations with the Killing spinors, we simply get In order to solve these equations, we need some information about the R-symmetry connection. We see from (2.19) Once the twisted periodicities (2.26) are taken into account, one can conclude that the solution has to be φ = 0, and a similar argument also showsφ = 0. As we will explain below, the other equations can be thought as consistency conditions for F − iL We can thus conclude that the BPS localization locus is trivial, namely (4.23)

Cohomological complex
Having determined the BPS locus in the previous subsection, the next step is to introduce the 4d N = 1 cohomological complexes. This will set up the coordinate system (on the space of fields) in which we are going to compute 1-loop determinants. In practice, the cohomological complexes are obtained by converting all fields to differential forms through appropriate contractions with the Killing spinors. The selected supercharge then clearly acts as an equivariant differential on the supermanifold of cohomological field variables.

Vector multiplet
We start by introducing twisted variables for the gauginos by using the Killing spinors. We introduce scalar fermionic variables and fermionic 1-forms The superscripts of the scalar modes (Λ 0 ,Λ 0 , Λ + ,Λ − ) emphasize their R-charges which equal (0, 0, +2, −2), while the 1-forms are neutral. Note that the relations between scalars and 1-forms are The SUSY transformations for the twisted fields are Since we are using the supercharge Q = δ ζ + δζ in order to perform localization, the SUSY transformations suggest to introduce the combinations 29) and to choose the cohomological multiplets where we have defined 17 We refer to these multiplets and Q as the SUSY complex of the vector multiplet. 18 Remark. The decomposition makes it manifest that Ξ µ and Ψ capture all four fermionic (off-shell) scalar degrees of freedom and that ι K Ξ = 0, implying the property As a consequence, on the r.h.s. of Q A what really appears is Ξ = pKΞ, where we defined the following projector onto the space of horizontal 1-forms w.r.t.K This is ultimately due to the fact that the component Φ = −ι K A appears as the gauge parameter in Q 2 = 2iδ K . We will come back to this important point later on when computing the 1-loop determinant for the vector multiplet.
Finally, since the cohomological fields are R-symmetry neutral forms on the manifold, we can introduce the usual inner product between g-valued n-forms on spacetime which can be used to rewrite the actions, compute the adjoint of the relevant operators as well as determine normalizability of the fields.

Chiral multiplet
We start by introducing scalar fermions by using the Killing spinors. We define Note that the R-charges of (φ, C) and (B, F ) and are r and r − 2 respectively, while those of (φ,C) and (B,F ) are −r and 2 − r respectively. In terms of the twisted variables the SUSY transformations (3.18) read and similarly Since we are using the supercharge Q = δ ζ + δζ to perform localization, these variations led us to choose the cohomological multiplets and similarly (φ, where We refer to these multiplets and Q as the SUSY complex of the chiral multiplet. Finally, having rewritten all the fields in terms of scalars, we can introduce the usual inner product between fields with the same quantum numbers (in particular, the same R-charge) which can be used to rewrite the actions, compute the adjoint of the relevant operators as well as determine normalizability of the fields.

1-loop determinants
Since the BPS locus and the relevant cohomological complexes have been found, we are now in a position to finally compute 1-loop superdeterminants of Gaussian fluctuations. For concreteness and ease of computations, we focus on the real Kähler background described in section 2.2, but the final results are expected to hold more generally.

Vector multiplet
In order to compute the 1-loop determinant of Gaussian fluctuations around the localization locus, it may be useful to recast V loc vec into the operatorial matrix form Since in cohomological variables we have recalling that we have set 19 we can easily read off the resulting matrix which can be simply linearized around the trivial BPS locus by substituting A = A (0) in d A . Given the lower-triangular nature of this matrix and the supersymmetric pairing between bosons and fermions, simple linear algebra (see e.g. [94,95] in the review [9] for a general derivation) would naively lead us to conclude that the superdeterminant of the kinetic operators in Q V loc vec around the localization locus would be given by where δ K denotes the operator (3.2) at the BPS locus, and the determinants are taken over the fermionic Ψ ∈ Ω 0 and bosonic A ∈ Ω 1 coordinates . However, it is easy to understand that this cannot be quite correct for at least two reasons: 1. As remarked around (4.34), Ξ is horizontal w.r.t.K. Therefore, the operator D 11 is dangerously ambiguous by left-multiplication by the projector pK, and the argument leading to the simplification of its determinant between bosons and fermions fails.
2. The gauge symmetry has not been fixed yet, therefore the space of 1-forms over which we are evaluating the bosonic determinant is highly redundant.
As we are going to explain, these two problems are actually related, and we outline how they can be solved together to yield a sensible answer. First of all, it is natural to resolve the first ambiguity by restricting the evaluation of all the 1-form determinants on the image of pK, where it simply restricts to the identity. This means that the determinant should be computed on the subspace Ω 1 K ≡ {ω ∈ Ω 1 | ι K ω = 0}. One can see the necessity for such a restriction on the bosonic side too. For the gauge field this amounts to splitting and restricting toÂ. In the cohomological formalism, Φ should not be treated as a coordinate because Q Φ = 0 and it rather it appears as a gauge parameter in Q 2 = 2iδ K . Therefore, it is natural to exclude it from the computation of the determinant. Secondly, in order to properly fix the gauge, one should introduce the usual Faddeev-Popov ghosts c,c and the Lagrange multiplier b, together with the BRST charge Q B generating gauge transformations with parameter c, for instance Q B A = d A c. However, in order to preserve supersymmetry, the BRST complex must be combined with the SUSY complex, in particular Q c = −2iΦ, and then localization must be performed w.r.t. the total odd charge Q + Q B . This is indeed consistent with Φ being not a coordinate field but rather the differential of a fermionic variable, and as such it does not contribute to the determinant. The bottom line of these arguments is that the correct ratio of 1-loop determinants can be obtained from (4.48) by enlarging the space of 0-forms to include the missing ghosts and reducing the space of 1-forms, namely where the prime means exclusion of the constant modes. Unfortunately, we are not able to provide a complete proof of this formula. A posteriori, the strongest support for our proposal comes from the consistency of the final answer with known results and comparison with dimensional reductions. Therefore, before computing the concrete expression for (4.50), let us make a few more observations that support our result. Upon dimensional reduction, the 4d N = 1 cohomological complex we are considering should reduce to the 3d N = 2 cohomological complex studied for example in [73,74], which will be referred to as Källen's complex. Hence, our setup is expected to be related to a lift of the 3d setup by the inclusion of an additional tower of KK modes. In order to push the similarities between the 4d and 3d setups even further, let us comment on some features of the splitting of the gauge field introduced in (4.49): 1. Under a general gauge transformationÂ and Φ do not mix. The full gauge symmetry of the 4d theory is preserved, howeverÂ and Φ transform in a funny way w.r.t. arbitrary gauge transformations. On the other hand,Â transforms as an ordinary gauge field and Φ is covariant w.r.t. gauge transformations which are holomorphic on the torus, thus preserving the condition ι KÂ = 0.
2. The fieldÂ really contains three independent components due to ι KÂ = 0. At the same time, Φ is a gauge parameter in the SUSY transformations, hence it should not enter the cohomological complex as a bosonic coordinate.
3. In complex coordinatesÂ = A z dz + Azdz + A w dw, hence our cohomological complex is formally the same as Källen's but with a complex direction and a partial connection 20 upon the identifications These formal substitutions into Källen's computation [73] reproduce (4.50).
We can now move on and compute the actual expression of the proposed determinant.
Once the localizing action is brought to the cohomological form, the usual strategy is to look for the off-diagonal operator (commuting with δ K ) pairing bosons and fermions and to study the equivariant index to extract the contributing modes and weights. In our case, we have to solve two other problems: i) we have not fully worked out the combined SUSY-BRST complex explicitly and ii) we cannot easily exploit the usual index theorems because of the boundary. We propose to solve these problems as follows. From (4.47), we see that the off-diagonal operator written in the holomorphic frame is essentially the pullback to the disk of the de Rham differential. This suggests that the right complex to look at is eventually the de Rham one, restricted to the disk with differential d 2 , as also argued in [58]. We can use the complex structure to split Ω 1 K = Ω 1,0 T 2 ⊕ Ω 1,0 D 2 ⊕ Ω 0,1 D 2 and notice that there is a natural bijection between Ω 1,0 T 2 and Ω 0,0 given by acting on the former with the interior product ιK. 21 This implies that the contribution of modes from these two spaces exactly cancel each other in the 1-loop determinant. The remaining modes can also be mapped into each other by replacing the de Rham differential with the Dolbeault operators, namely d 2 = ∂ 2 +∂ 2 . We are thus led to consider the complex and (ignoring possible phases) we can remove the square root from (4.50) by just considering (∂ 2 : Ω 0 → Ω 0,1 D 2 ) × (c.c.). Hence our problem has reduced to studying the Dolbeault complex on D 2 subject to the desired boundary conditions (of course, with two towers of KK modes). The map∂ 2 : Ω 0 → Ω 0,1 D 2 is surjective without restrictions on the domain and codomain, in which case the contributing modes come entirely from the kernel of∂ 2 , that is holomorphic ghosts on the disk. This conclusion still holds if we restrict the codomain to 1-forms whose field strengths have vanishing contractions with Y,Ȳ at the boundary (Neumann conditions). Because of the quotient (2.24) and the twisted periodicities (2.26) we are imposing on all the fields, let us introduce twisted Fourier modes on the torus w(τ n x − n y + mσ) −w(τ n x − n y + mσ) , (4.53) satisfying the property F (m) nx,ny (w + 2πk + 2πnτ,w + 2πk + 2πnτ ) = e 2πim(kα+nβ) F (m) nx,ny (w,w) .
leading to the result which of course needs to be regularized. We can do that by using ζ-function regularization as discussed in appendix B, with the final result (up to an overall constant) where Γ is the elliptic Gamma function defined in appendix B, the prime denotes exclusion of zero roots and P 3 is a cubic polynomial. The factor det ad (Φ (0) ) −1 coming from the constant mode can be canceled by the Vandermonde determinant in the integration measure once a change of variables from the algebra to its Cartan is performed.

Chiral multiplet
We now move our focus to the chiral multiplet. Ideally, in order to compute the 1-loop determinant around the BPS locus, we would like to recast V loc chi into the matrix form Ψφ , (4.59) up to terms whose Q -variations can be killed by choosing suitable boundary conditions. The superscripts in D (r,r ) i : Ω 0 (r ) → Ω 0 (r) remind us what is the space the operator acts on as the cohomological variables have generically non-zero R-charges. Also, note that the last term can be dropped because we are eventually interested in linearizing this functional around the trivial BPS locus in which Ψ = Ψ (0) = 0. Since we have 22 60) recalling that we have defined (F,F ) ∨ = (−F , −F ), 23 we can easily read off the resulting matrices which can be easily linearized around the BPS localization locus by substituting A = A (0) in the covariant derivatives.
Remark. In order to achieve this form, we had to integrate by parts, i.e. to define the adjoints of LK, L Y w.r.t. (4.44), which imposes the vanishing of the boundary terms The first term vanishes becauseK is tangent to the boundary, while the vanishing of the second term requires suitable boundary conditions to which we will return below.
As we have already discussed for the vector multiplet, now simple linear algebra implies that the 1-loop determinant is computed by with the numerator and denominator capturing the contributions of the fermionic and bosonic coordinates B ∈ Ω 0 (r−2) and φ ∈ Ω 0 (r) respectively. In appendix D, we present a detailed derivation. This result may be further simplified by noting that the off-diagonal operators commute with δ (0) K and provide maps between 0-forms of different R-charges In order for these operators to provide meaningful maps, we have to impose compatible boundary conditions which are in fact dictated by the vanishing of the boundary terms appearing in (4.63), which we call: 22 We are assuming a real background and contour. In general, this functional may be taken as a definition. 23 Correspondingly (XF ,XF ) ∨ = (−XF + 2iLYφ, −XF − 2iLȲ φ). The ratio of determinants can then be computed on smaller spaces given by the kernels and cokernels of the pairing operators, namely In our simplified choice of Kähler background, the relevant operators read and we can perform explicit computations. The kernels are easily seen to be parametrized by (anti-)holomorphic functions on the disk, namely while the cokernels are empty, since the corresponding operators are surjective thanks to boundary conditions, as can be seen from a Laurent expansion on the disk. 24 Remark. In general, the selection of modes depends on the analytic properties of the metric. Assuming 4 √ g = (1 + εzz) −1 as for the standard Kähler metric on the disk, there are three cases corresponding to ε = ±1, 0 (spherical, hyperbolic, flat). As we have already mentioned, our analysis is adapted to the spherical case, and the mode expansion of a scalar function assumes the form f (z,z) = m,n∈Z f mn z mzn . Normalizability of the individual modes on the hemisphere restricts m + n ≥ 0.
The modes that contribute to (4.68) can be expanded in a basis of (anti-)holomorphic modes on the disk and twisted Fourier modes (4.53) on the torus according to  Assuming that not only d|s| = 0 (as required for a real background) but also ds = 0 after imposing the twisted periodicities, then ι K A = 0 and the spectrum of 2iδ (0) K is given by the eigenvalues τ n x −n y +σ(r/2+m)+Φ (0) , λ B = i Im(τ ) τ n x −n y +σ(r/2−1−m)+Φ (0) .

(4.72)
24 It may be more convenient to use "gauge" transformed operators to simplify various factors of 4 √ g.
Keeping only regular modes at the origin, Dirichlet conditions yield a net contribution from B-modes only where R is the gauge (and/or flavor) group representation. Viceversa, imposing Robin-like conditions leaves only a net contribution from φ-modes In this case it should be noted that imposing B| ∂ = 0 also requires iLȲ φ| ∂ = F | ∂ by compatibility with supersymmetry, and we can consistently set F | ∂ = 0.
Remark. If the matter content support a global symmetry, we can turn on chemical potentials u F ,ū F for the associated background flat connection. This will simply shift Φ (0) → Φ (0) + u F and will resolve the 1-loop singularities into simple poles. Following the discussion in section 4.2, we see that the contours mentioned in (4.11) must be middle dimensional cycles around the singularities associated with a selection of chiral multiplets with Robin-like conditions, which are indeed the dangerous modes as expected.
The regularization of the 1-loop determinants can be performed by using Hurwitz ζ-function regularization as discussed in appendix B, with the final result (up to an overall constant)  where Θ is the short Jacobi Theta function defined in appendix B and P 2 is a quadratic polynomial. In section 6.2, we will provide a microscopic interpretation of this relation between different boundary conditions in terms of boundary degrees of freedom.

Anomalies and modularity
The cubic polynomials appearing in the regularization of 1-loop determinants are known to encode the possible gauge, global and mixed-gauge anomalies [27,100]. Therefore, in a physical anomaly-free theory, we can ignore the exponential factors associated with local symmetries, which must cancel out when building the block integral (4.11). However, the constant terms can have a physical significance (at least in superconformal theories) since they determine the asymptotic behavior of the partition function as a function of the moduli. In particular, in the case of the index background these terms have been successfully matched against Casimir energies and central charges [101][102][103][104][105][106][107][108][109][110]. It would be interesting to understand whether one can extract something new from the disk geometry, also in view of the almost perfect democracy between the torus and disk parameters τ , σ and the peculiar modular properties of the partition functions. In fact, it is worth noting that the very same cubic polynomials also appear in the modular transformation properties of the elliptic Gamma functions. These objects are not sections of a line bundle over an elliptic curve, rather they are sections of a gerbe on the universal triptic curve [111], and as such they enjoy SL(3, Z) Z 3 modular properties [112] rather than SL(2, Z) Z 2 as Theta functions, which do appear as 1-loop determinants of honest torus partition functions (7.15). Therefore, the D 2 × T 2 partition functions can be thought as defined on the torus of holonomies only in this generalized sense. In particular, the 1-loop determinants are not invariant under large gauge transformations, unless one imposes special relations between the torus and disk parameters and/or other global fugacities. For instance, the failure of the double periodicity under u → u + Z + τ Z is reflected in the law where the Θ-factorial is defined in appendix B. In view of (4.77), we may also say that such a shift induces additional boundary contributions, but unfortunately we do not have a deep understanding for those. 25 We also observe that by using the modular property 26 the 1-loop determinants may also be rewritten in terms of modified elliptic Gamma functions [113], which may be useful for studying the unrefined limit σ → 0 and also gluings into compact geometries. Finally, it is conceivable that having a field theoretic construction of this class of special functions may be helpful for developing the field even further, especially in the context of automorphic forms or integrable systems.

Boundary supersymmetry
In former sections, we have focused on bulk degrees of freedom only. However, the boundary has played several roles, from demanding the addition of certain terms to the actions to preserve supersymmetry, to requiring certain choices of boundary conditions for bulk fields. In flat space, upon imposing half-BPS boundary conditions, the restriction of bulk fields to the boundary gives rise to 3d N = 1 multiplets. In this section, we describe how bulk degrees of freedom split up into boundary multiplets and summarize how the surviving curved space supersymmetry algebra acts on the latter. 25 However, it has been observed that these factors cancel out in compact space partition functions [27], hence supporting the boundary interpretation. 26 For the S 2 × T 2 geometry, the action of an SL(3, Z) subgroup on (τ, σ) gives rise to equivalent complex structures [54], i.e. the same identifications (2.24).

3d N = 1 supersymmetry
In Euclidean signature, the minimal three dimensional flat space supersymmetry algebra is generated by a Dirac supercharge 27 Q A subject to where Pâ is the (covariant) momentum operator,â =1,2,3 a three dimensional flat index and Γâ B A the Dirac matrices with the convention ε123 = +1. Spinor indices are raised and lowered with the charge conjugation matrix AB . In order to study supersymmetry in a curved but conformally flat space, one can start by solving the conformal Killing spinor equation for a Dirac spinor ξ where we use m, n for three dimensional spacetime indices. In the case of our interest, we have to solve (5.3) with the line element induced from the bulk. We consider again the Kähler metric (2.20), leading to the (flat) induced metric and volume form where the adapted "holomorphic" coordinates x m = (w,w, t) describe the twisted T 3 given by the global identifications (w, t) ∼ (w, t + 2π) ∼ (w + 2π, t + 2πα) ∼ (w + 2πτ, t + 2πβ) . In the "holomorphic" frame the general solution to (5.3) reads and it encodes four supercharges, one for each constant parameter a i , b i . In particular, a i correspond to Poincaré supercharges Q A , whereas b i correspond to superconformal supercharges, which are however broken due to the identifications (5.5). The Killing spinor 27 In Lorentzian signature, one can impose a Majorana condition on spinors. We will discuss later on what is the Euclidean analog of this condition. We also refer to [114] for an exhaustive classification of spinors in arbitrary dimension. and its complement thus generate the full 3d N = 1 supersymmetry algebra (5.1), in particular {δ, δ} = −2iδ k , (5.9) where we set δ ≡ ξ A Q A and δ k is a (covariant) momentum along the vector k m ≡ ξΓ m ξ . (5.10) Indeed, the Killing spinor ξ A and its conjugate ξ † A can be used to form bilinears yielding a complete three dimensional frame, namelȳ which in adapted "holomorphic" coordinates simply reads as and similarly for the dual 1-forms, which we denote with the same symbols This is trivially integrable and it induces a complex structure on the transverse torus described by the holomorphic coordinate w, w.r.t. which k m is anti-holomorphic andk m is holomorphic. In fact, the Killing spinor bilinears, and hence the (integrable) almost contact metric structure, directly descend from the bulk where the vanishing of the normal component of boundary vectors is to be understood.

Supersymmetry multiplets and actions
In this section, we recall the minimal three dimensional supersymmetry multiplets and construct δ-exact supersymmetric actions.

Real multiplet
In Lorentzian signature, 3d N = 1 matter is described by the real multiplet containing a real scalar ϕ, a Majorana spinor χ and a real auxiliary field f . Their supersymmetry transformations are (see e.g. [78][79][80]) In Euclidean signature, the definition of a single real multiplet is problematic due to the absence of Majorana spinors, even though attempts to overcome the obstruction have appeared in the literature [115,116]. Therefore, in our setup all the multiplets are actually complex. However, we can mimic a real setup by assuming that all the fields transform under a USp(2N f ) global symmetry as the latter allows for describing fermionic fields by means of symplectic Majorana spinors χ i , i = 1, . . . , 2N f . These are well-defined in any dimension and signature, and they satisfy the reality condition where ω ij is the standard invariant symplectic form. Slightly more generally, given 2N f × 2N c real multiplets ϕ ia , χ ia , f ia transforming in the bifundamental representation of 2N f is a flavour index and a = 1, . . . , 2N c a gauge index, we have the supersymmetry transformations with the fields fulfilling the reality conditions The supersymmetric variation of the fermionic functional produces by construction a δ-exact Lagrangian with positive semi-definite bosonic term where we omitted the total derivative ∂ m −i (ξχ ia )(χ ia Γ m ξ † ) .
Remark. In order to avoid cluttering, in the following will often omit any gauge index when not explicitly needed.

Vector multiplet
The 3d N = 1 vector multiplet consists of a gauge field a m and a Dirac spinor ρ in the adjoint representation of the gauge group. As before, for USp(2N c ) we can impose a reality condition. The supersymmetry transformations read as follows The latter can be used to write down a δ-exact Lagrangian containing a Yang-Mills term for the gauge field and a kinetic term for the gaugino (a Tr is left implicit for non-Abelian theories) Furthermore, one can also consider a Chern-Simons term at level k ∈ Z given by a m a n a ) − i ρρ , (5.26) which is δ-closed.

Cohomological fields
By contracting all the spinors with the Killing spinor ξ and its conjugate ξ † , we can introduce fermionic scalar variables as we did for the bulk multiplets.
Real multiplet. For the matter spinor fields χ i we introduce These allow us to rewrite the supersymmetry transformations for the real multiplet as where L k , Lk, L y denote the total covariant derivatives along k,k and y respectively. Note that the supersymmetry algebra in this notation is given by (5.9) with δ k = L k . The real multiplet Lagrangian (5.23) in terms of cohomological fields reads as We recall that this action is δ-exact w.r.t. the fermionic functional (5.22), which in cohomological fields is simply Vector multiplet. Similarly, for the vector multiplet we can introduce the odd scalars (5.31) and then the supersymmetry transformations are Note that the variation of the gauge field is missing a component, namely δ(k m a m ) = 0. This is again due to the fact that k m a m appears as a gauge parameter in δ 2 . For later purposes, it is convenient to rewrite the cohomological vector multiplet in terms of scalar components 30 obtained by contraction with the Killing spinor bilinears: (5.33) so that the supersymmetry transformations are Since we will not need to consider boundary vector multiplets, we omit writing their lagrangian in cohomological form.

Induced supersymmetry
After having reviewed basic facts about three dimensional minimal supersymmetry which are relevant for our boundary, we are ready to study in more detail how the bulk supersymmetry acts on the latter. In particular, since the supercharge Q played a major role for localization in the bulk, the natural question is whether it can be interpreted as a boundary supercharge as well. In this case, it is possible to consider bulk-boundary coupled systems and perform (in principle) localization w.r.t. the very same supercharge. In flat space, the boundary would preserve half of the bulk supercharges at most. In curved space, the full supersymmetry algebra is already broken down to the subalgebra (3.2), and we recall that the selected localizing supercharge is the linear combination Q = δ ζ + δζ of supercharges preserved by the bulk. Therefore, the minimal setup we would like to consider is when Q is a preserved supercharge of the 3d N = 1 supersymmetry algebra we have just reviewed. Following our previous discussion, it is clear that the correct candidate is the supercharge δ defined in (5.9) and associated with the spinor (5.8). In this section, we show how this comes about, closely following the approach of [79,80].
We start by considering embedding functions η α A ,ηα A and the following linear combination of bulk supercharges which, by plugging in (3.5), satisfy the algebra where A, B are SU (2) indices to be identified with boundary spinor indices. In order for the algebra (5.36) to match with the algebra (5.1) and hence for it to describe the minimal supersymmetry of a boundary theory, the embedding functions must satisfy certain conditions. First of all, the matrix must act as a projector on the transverse space w.r.t. the normal N , that is Therefore, the projection on the normal must be captured by the anti-symmetric part Then, (5.37) can be interpreted as boundary Dirac matrices, namely they must satisfy where indices are moved with AB . The orthogonality condition can be solved by setting Γ µ (AB) ≡ (Γ µν N ν ) (AB) for some matrix-valued anti-symmetric 2-tensor Γ µν , and we can almost immediately identify (up to signs) Indeed, one can verify that (5.40) is satisfied and the algebra (5.36) reproduces (5.1). A concrete choice for the embedding functions can be given by noticing that Q A must be R-symmetry neutral and that in three dimensions there is no distinction between dotted and undotted spinors, a convenient identification being provided by σ ⊥ αα andσα α ⊥ . For definiteness, we identify the SU(2) indices with undotted indices, and then it is easy to show that the following choice meets all the requirements 31 Let us now define a spinor ξ A such that Then it follows that the supercharge ξ A Q A can be identified (up to a factor of √ 2) with the localizing supercharge Q . Moreover, since we have the inverse relations η α A , we can write the spinor ξ A also as Because of the four dimensional R-symmetry, this identification is up to local phase rotations.
or more democratically One can verify that the spinor bilinears given in section 5.1 are correctly reproduced, allowing us to finally identify ξ A defined here with the spinor defined in (5.8), 32 and hence ξ A Q A with the supercharge δ defined in (5.9).

Mapping 4d multiplets to 3d multiplets
We are now ready to discuss how bulk and boundary supersymmetry can be related.
Matter multiplets. Let us start by considering 4d N = 1 chiral and anti-chiral multiplets, transforming in the fundamental and anti-fundamental representations of the gauge group G respectively. If these representations are N c dimensional, they can be accommodated into a pair of 3d N = 1 real multiplets transforming in the fundamental of USp(2N c ) by embedding the N c ⊕ N c representation of G into the fundamental of USp(2N c ). 33 For concreteness, we may consider G = (S)U(N c ). Using twisted variables, we can then write (φ a , C a , B a , F a ) for the chiral multiplet and (φ a ,C a ,B a ,F a ) for the anti-chiral multiplet, where a = 1, . . . , 2N c is a USp(2N c ) index, and eventually set the last N c components to zero to recover the original multiplets. In analogy with [79,80,117], we introduce where the index i = 1, 2 can be associated with a (broken) USp(2) flavor symmetry. In particular, the new bosonic fields can be taken to satisfy the reality conditions which can be though of as imposing the real contour (φ, F ) † = (φ, −F ) in terms of the original bulk fields. A similar reality condition is to be imposed on the fermions.
Having set up some notation, we can now rewrite in 3d language the SUSY complex of the 4d chiral multiplet. Using the relations (5.16), we can write the bulk transformations at 32 Note that, because of the different frames, there is a relative Lorentz rotation to take into account. This does not affect the quantities with all the spinor indices contracted. 33 This is not necessary but we decided to mimic a real structure as discussed before.

the boundary as
which are easily seen to coincide with the 3d N = 1 cohomological complex (5.28) by using the definitions (5.46) and the capital/lower case map The covariant derivatives along the boundary directions contain the induced gauge and R-symmetry connections, namely where R i j is the diagonal Pauli matrix. Note that all the fields have now the same Rcharge magnitude, with the i = 1, 2 components representing the ±1 eigenspaces. Also, the background A (R) explicitly breaks the global USp(2) to its U(1) Cartan. Equivalently, the bulk R-symmetry is realized at the boundary as the Cartan of the putative USp(2) global symmetry for which a Wilson line is turned on.
Vector multiplets. Working with scalar components only, at the boundary the gauge field can be split as A µ = (A ⊥ , A m ) ≡ A ⊥ , A ,Φ, Φ , while the gauginos as (λ α ,λα) ≡ Λ ⊥ , Λ , Ψ,Ψ , where we defined Moreover, normal derivatives of fields yield or redefine auxiliary fields In this notation, part of the 4d N = 1 vector multiplet gives rise to a 3d N = 1 vector multiplet with supersymmetry transformations which is indeed identical to the cohomological complex (5.34) upon the identifications The remaining fields have supersymmetry transformations Up to the additional auxiliary field D Φ , which is a remnant of the bulk gauge symmetry, (5.55) are the supersymmetry transformations of an adjoint real multiplet. Indeed, they coincide with (5.28) if the map is performed. In particular, we see that Dirichlet or Neumann boundary conditions on the bulk vector multiplet correspond to killing either the 3d N = 1 vector or real adjoint multiplets respectively at the boundary. This is an example of dual boundary conditions, which we study in more detail in the next section.

Dual boundary conditions from 3d multiplets
We will now explore basic aspects of a rather interesting interplay between boundary conditions for bulk fields and couplings to boundary degrees of freedom. Using the D 2 × T 2 partition functions computed previously, together with the discussion of boundary supersymmetry of the previous section, we study how it is possible to change the boundary conditions through the inclusion of boundary fields. Our main goal is to give a microscopic derivation of the relation (4.77). Very similar phenomena were discovered for 3d N = 2 theories with 2d N = (0, 2) boundary degrees of freedom in [72]. We expect that many results of this reference should have an interesting uplift to four dimensions, vastly generalizing the discussion of this section.

Chiral multiplet boundary conditions
Let us start by writing down the action of a 4d N = 1 chiral multiplet in 3d N = 1 language. For F on-shell =F on-shell = 0, we find 34 We may ask whether this Lagrangian is Q-exact with respect to the boundary supersymmetry. To answer this question, we can consider the fermionic deformation term leading to the Q-exact Lagrangian We have that F i on-shell = −i R i j L ⊥ φ j , thus the actions S chi and S (R) chi are identical upon integrating out the auxiliary fields. Moreover, from (6.3) we see that the equations of motion of B i , F i give bulk terms only. Instead, those of φ i , C i yield boundary termŝ whereδ denots field variations producing the equations of motion, not to be confused with supersymmetry variations. The boundary terms in (6.4) can be removed in two ways compatible with supersymmetry: • Dirichlet boundary conditions • Robin-like boundary conditions Especially, if we choose not to constrain the field variationsδφ i ,δC i , the action (6.3) naturally encodes (R). 34 We focus on the chiral multiplet alone, omitting the coupling to the vector multiplet.

From Robin to Dirichlet boundary conditions
We are now ready to explain the relation (4.77) in greater detail. In the following, we show that a suitable modification of the Lagrangian leads to different constraints on boundary fields, turning Robin-like conditions into Dirichlet. In order to do this, let us start from the action given in (6.3), with i = 1, 2 for simplicity. We construct a new actionŜ Note that, since Q ∼ δ at the boundary, we just use Q . The equations of motion of b ia , f ia now provide Dirichlet boundary conditions Since Qφ i ∼ C i , these boundary conditions are trivially supersymmetric. On the other hand, the equations of motion of φ i , C i lead to Supersymmetry imposes the further conditions ϕ i = φ i | ∂ and c i = C i | ∂ . Therefore, Dirichlet boundary conditions on φ i and C i imply ϕ i = c i = 0. As a result, the degrees of freedom in the kinetic term in (6.7) effectively reduce to b i , f i and only these latter will contribute to the 1-loop determinant of the boundary action. At the end of the day, the actionŜ (D) chi correctly encodes Dirichlet conditions. Consequently, we can borrow the flipping argument from [72] and argue that the partition functions computed with different boundary conditions should be related as is the partition function of the boundary theory on ∂(D 2 × T 2 ) T 3 .
The bulk-boundary couplings in (6.7) deserve some comment. First of all, these terms do not respect full 3d N = 1 supersymmetry since only half-multiplets appear. This unusual fact is consistent with our setup since the bulk preserves two of the four flat space supercharges, and the boundary is only required to preserve a further half of these, namely the linear combination Q . Interactions are only required to transform in representations of the surviving supersymmetry subalgebra, and the half-multiplets appearing in (6.7) are by construction representations of the subalgebra generated by Q. However, note that since our boundary is flat, if taken alone it could preserve all supercharges: the breaking of supersymmetry is a consequence of coupling to a curved bulk. This differs from the case of a flat space with boundary [72], where half of the bulk supercharges would be preserved, leading to a full 3d N = 1 theory on the boundary in our case.
We can now turn to discussing the boundary partition function, which is given by the 1-loop determinant of the kinetic operator −iL k ∼ Q 2 computed over the vector space of b i modes, in the constant background A (0) . Calculations can be simplified by inverting the maps in (5.46) In this language, the on-shell conditions (6.9) simply read as B| ∂ = b andB| ∂ =b. Therefore, the mode expansions of b,b should coincide with that of B,B restricted to the boundary, namely b(w,w, t) = nx,ny,m∈Z b nx,ny,m e imt F (r/2−1−m) nx,ny (w,w) , (6.12) and similarly for the conjugate fieldb. Note that on T 3 all the modes are normalizable, hence m ∈ Z. Up to an overall constant, the boundary partition function is then The condition B| ∂ = b descending from (6.9) instructs us to regularize this infinite product by factoring out the bulk contribution Z chi(D) , (6.14) where in the last step we have used the very same regularization employed in (4.75), (4.76). This result explains the physics behind the relation observed in (4.77).

From Dirichlet to Robin boundary conditions
We have just seen how adding matter fields at the boundary with a coupling to the bulk fields can be used to switch from Robin-like to Dirichlet boundary conditions. Here we discuss the reverse mechanism. Let us start from the alternative Lagrangian which encodes (D) through the equations of motion of B ia , F ia . We can obtain (R) by adding a positive and Q -exact action for boundary multiplet (ϕ i , Q ϕ i ) coupled to bulk The equations of motion of ϕ i , c i set Robin-like conditions Q B i | ∂ = B i | ∂ = 0, while those of B i , F i set φ i | ∂ = ϕ i as well as C i | ∂ = c i . According to the flipping argument presented in the previous subsection, the partition functions computed with different boundary conditions should then satisfy where Z ∂ [ϕ i , Q ϕ i ] is the partition function of the boundary theory, which is computed by the 1-loop determinant of the kinetic operators −LkL k and −i Lk over the vector spaces of modes of the boundary fields ϕ i , c i . The maps in (5.46) suggest to consider the fields The boundary partition function is then , (6.19) as expected from the cohomological structure of the multiplets. In this notation, the onshell conditions relating bulk and boundary fields reduce to φ| ∂ = ϕ, C| ∂ = c and similarly for the tilded fields. The mode expansion of boundary fields should therefore match with their bulk counterparts, for instance The relation φ| ∂ = ϕ teaches us to regularize the determinant by factoring out Z chi(R) 1-loop , and a computation analogous to (6.14) directly leads to (6.17), namely . (6.21) Remark. The partition functions Z ∂ [ϕ i , Q ϕ i ] and Z ∂ [b i , Q b i ] are formally the same as those of chiral and Fermi multiplets on a two-torus with modular parameter σ. This seems to be consistent with the previous observation made after (6.10) that the peculiar boundary theories we have considered behave essentially as a 2d N = (0, 2) theories due to the coupling with the bulk. It would be natural to expect τ to emerge as the modular parameter, instead of σ. The appearance of σ can be traced to the asymmetry between the two moduli introduced in the choice of regularization made in (6.14), which is dictated by coupling with the bulk.

A conjecture for the vector: from Neumann to Dirichlet
In the previous two subsections, we have described a mechanism for switching from Robinlike to Dirichlet conditions for the 4d N = 1 chiral multiplets. From the viewpoint of the bulk, imposing one type or the other translates to the vanishing of either submultiplet (B, Q B) or (φ, Q φ) respectively. From the viewpoint of the boundary, these two choices can be related by the coupling additional degrees of freedom, which can restore one submultiplet at the expense of the other. Using the explicit results (4.75), (4.76) for the 1-loop determinants with either boundary conditions, we have been able to explain the reflection property (4.77) through 1-loop computations on the boundary (6.14), (6.21).
In (5.53), (5.55), we have managed to split the 4d N = 1 vector multiplet into two submultiplets of the boundary supersymmetry, one of which is set to zero by either Neumann or Dirichlet conditions for the gauge field. It is therefore natural to expect that a boundary condition changing mechanism should exist in this case too. Since throughout the main text we have assumed Neumann conditions in order to preserve gauge symmetry at the boundary, we expect that, upon considering suitable boundary couplings, it should be possible to obtain the results for Dirichlet conditions. Unfortunately, as discussed in section 4.5.1, when dealing with the vector multiplet the proper gauge fixing is crucial, and since we have not worked out the full BRST complex, we are not able to present an exhaustive analysis. However, we can at least propose what the final result should be at the level of 1-loop partition functions: guided by the observation that, in the case of the chiral multiplet the 1-loop determinants of dual boundary conditions are related by a simple reflection property, we can assume that the same holds for the vector multiplet. Starting from the computation with Neumann conditions (5.53) and using (B.16), we are thus led to propose that Z vec(D) where we have allowed any multiplet (including the vector) to have an effective shifted R-charge to take into account possible contributions of flux configurations with flux m, described around (4.17). In fact, while Neumann conditions have allowed us to discard such configurations due to F ⊥µ | ∂ = 0, Dirichlet conditions are compatible with these non-trivial saddles. As mentioned in the main text, even though such configurations are not BPS, they cannot a priori be discarded as can represent the non-perturbative contribution to the path integral [41,77]. Moreover, while Neumann conditions preserve gauge symmetry at the boundary and hence Φ (0) is to be seen as a modulus of the theory to be integrated over, Dirichlet conditions allow only gauge transformations that coincide with the identity at the boundary, hence changing the interpretation of Φ (0) as a background chemical potential for a global symmetry acting at the boundary. On the other hand, now a summation 35 is to be performed over the modulus m to take into account all possible saddles. In support of this rather heuristic derivation, this picture seems to be consistent with a four dimensional lift of the discussion presented in [72]. 35 We can assume m to be quantized precisely due to Cauchy boundary conditions. Configurations of the gauge field can be classified by relative cohomology classes, due to the presence of a boundary. The holonomy along the disk boundary captures the non-integral part of the flux, while the integral part is classified by quantized flux through the disk (corresponding to m).

Observables and examples
In this section, we discuss which observables are compatible with our background. We also discuss a relevant example, namely the SU(N ) theory coupled to (anti-)fundamental matter and check Seiberg duality.

Superpotential
In order to begin with, let us investigate the effect of including superpotential terms. In the bulk we consider a standard superpotential, described by (anti-)holomorphic functions W (φ) and W (φ) of R-charge ±2 of the scalars in the (anti-)chiral multiplets. We directly use twisted fields to write the F-term descending from W (φ) as where W I ≡ ∂ I W , W IJ ≡ ∂ I ∂ J W . Supersymmetry acts on the two pieces as where the Lie derivatives contain the gauge field A µ , the R-symmetry connection A µ and a flavour connection A (F ) µ . By taking into account that we find Hence, the supersymmetric variation of the holomorphic superpotential is a total derivative if the conditions are satisfied, simply meaning that W (φ) must have R-charge +2 and be a singlet under flavour symmetry. Consequently Similarly, the anti-holomorphic superpotential term reads where Repeating the same steps as above, one can confirm that W (φ) must have R-charge −2 and neutral under gauge and flavour symmetries. Eventually Therefore, we showed that the supersymmetric variations of S W and S W do not vanish because of the boundary. This can be cured by introducing the F-term The supersymmetric variation of S F exactly cancels the boundary terms generated by Q S W and Q S W , and the improved superpotential term is supersymmetric without imposing boundary conditions.

Fayet-Iliopoulos term
For a U(1) factor in the gauge group, we can consider a Fayet-Iliopoulos (FI) term, which for the class of backgrounds we are considering in this paper reads [26] Notice that for a Kähler metric V µ = κK µ , so gauge invariance holds due to ∇ µ V µ = 0 and V ⊥ = 0. The Q -variation of S FI vanishes up to boundary terms, and we find that Q S FI generates a boundary term that is exact w.r.t. the boundary supersymmetry, namely where we used the 3d cohomological fields defined in (5.51). As a consequence, we can define an improved FI term 14) whose supersymmetry variation vanishes without imposing boundary conditions. Note that for our choice of background this term is zero on the localization locus we have considered, hence it cannot give classical contributions. However, it may contribute for more general choices and/or if one allows for flux configurations. Also, this term cannot be made fully invariant w.r.t. arbitrary large gauge transformations, unless one imposes some rational condition on ξ FI and Im(τ )/Re(τ ). A similar observation can be found in [26,118].

Surface defects
In A-twisted 2d N = (2, 2) theories on the sphere [77,119], correlation functions of local operators at the poles can be computed through localization. In 3d N = 2 theories, the natural lift is provided by Wilson loops [31,41]. In our setup, Wilson loops cannot be defined because the Killing vector is complex and it generates the whole torus (together with its complex conjugate). Therefore, it is more natural to look for surface operators wrapping the torus. In terms of the twisted variables (4.36), the 4d N = 1 SUSY transformations (4.37) of the chiral multiplet can naturally be interpreted in terms of 2d N = (0, 2) SUSY transformations on the torus, with (φ, C) and (B, F ) representing chiral and Fermi multiplets respectively. Similarly, the 4d N = 1 SUSY transformations (4.27) and the components (A w , Aw, Λw,Λw, D) can be interpreted in terms of a 2d N = (0, 2) vector multiplet on the torus. Therefore, it is easy to couple to the bulk a 2d defect theory on the torus while preserving the Q supercharge. For Lagrangian theories, the partition functions of the defect theories can be again computed by localization, and the 1-loop determinants of chiral, Fermi and vector multiplets read [75,76,120] (up to zero-point energies) where u is a U(1) chemical potential and w belongs to a Cartan subalgebra of the 2d gauge group. The coupling to the bulk can be accomplished by gauging a subgroup of the 2d flavor group with a 4d vector multiplet, namely by inserting the 2d partition function under the integral of the bulk partition function. More generally, provided that the partition function can be computed by other means, one can also consider non-Lagrangian defect theories. A very interesting class of 2d N = (0, 2) theories was constructed in [68] from a twisted compactification of the 6d N = (0, 2) theory on a 4-manifold, whose torus partition functions are computed by certain affine characters. These objects represent the natural lift of ordinary characters to our setup, 36 which in 3d N = 2 theories can be used to compute the expectation values of Wilson loops.

SQCD and Seiberg duality
We can now apply the results of this paper to an interesting example, namely the SU(N ) theory with (anti-)fundamental matter. We will denote by µ ≡ m + σr/2 andμ ≡m − σr/2 the combined flavor and R-symmetry chemical potentials, while we will denote the fundamental gauge chemical potential by u. The absence of gauge anomalies instruct us to consider N f anti-fundamental chirals with Robin-like conditions and N f fundamental chirals with Dirichlet conditions with the correct R-charge assignment r = 1 − N/N f and flavor chemical potentials constrained by f (m f − m f ) = N (1 + τ ). We also restrict to N f ≥ N . The 1-loop integrand of the localized partition function reads (up to normalizations) . We therefore consider the independent poles at 37 where γ is a label set of N elements out of N f . Taking into account the permutation symmetry, we thus obtain the residue series (7.20) where the divergent factor in Υ(µ f ∈γ ) is to be understood as its residue at the pole. This expression can be identified with the elliptic vortex partition function of the theory in the vacuum where N anti-fundamentals acquire an expectation value. In order to see this more explicitly, let us focus on the fixed vortex number k = f ∈γ k f and compare this with the more conventional integral where the prime denotes that the zero factor (i = j) in the numerator is to be replaced by Res u=0 Θ(u, τ ). Notice that the 4d anomaly cancellation condition guarantees that the form of the 2d integrand is preserved under the identification φ j ∼ φ j +Z+τ Z and modular transformation τ → −1/τ . Recalling (7.15), we see that the k-vortex sector corresponds to the elliptic genus of a 2d N = (0, 2) U(k) theory coupled to N anti-fundamental chirals, N f − N fundamental chirals, N f fundamental and one adjoint Fermi multiplets, corresponding to the k-vortex theory of the 4d N = 1 theory we are considering. 38 More explicitly, we distribute each of the k integration variables around the N chirals according to the unordered partition {k f } and integrate them one by one. What we eventually get is a net contribution from a tail of poles arising from the charge minus chirals starting at φ j = −a f for some f ∈ γ, namely The evaluation of the residues at these poles yields We can now use the identity Θ(u; τ ; σ) k −k = Θ(u − σk; τ ; σ) −k Θ(u − σk; τ ; σ) −k (7.24) to write (7.25) coinciding with the k-vortex part of (7.20) upon straightforward identifications of the parameters. This exercise allows us to test Seiberg duality. In fact, the integrand of the elliptic genus (7.21) is a meromorphic elliptic function of φ j ∼ φ j + Z + Zτ , and by deforming the integration contour to pick up the poles arising from the tail of charge plus chirals, 38 See e.g. [63,122] for a recent and more detailed discussion related to our setup. the U(N ) vortex partition function (7.20) has an alternative representation in which the role of f ∈ γ and f ∈ γ are swapped, namely it is equivalent to a dual U(N f − N ) vortex partition function. What is left to be checked is the correct transformation law of the 1-loop determinant in the γ vacuum, which is indeed invariant up to the appearance of the singlet contributions with the dual variables defined byμ ≡ −µ + σ/2,μ ≡ −μ − σ/2 + 1 + τ .

Conclusions and future directions
In this paper, we have studied 4d N = 1 theories on D 2 × T 2 and certain BPS boundary conditions, and we have used supersymmetric localization techniques to perform the exact evaluation of the partition functions. We have met several subtle points during our analysis, part of which are also shared with the compact backgrounds (such as the presence of fermionic zero modes in A-twisted theories) and part of which are instead proper of the non-compactness of the background (such as the proper implementation of the boundary conditions in 1-loop computations) or due to the complex nature of the Killing vector arising from the localizing supercharge (such as the proper treatment of the cohomological complex for the vector multiplet). Despite these issues, the results that we have presented in this work passed some nontrivial tests, such as the derivation of a consistent picture, the correct 3d and 2d limits, and the recovery of known results and dualities. One prominent question that remains unclear, is to find a microscopic understanding of the relation between boundary conditions and integration contours for the localized path integral, a closely related one is the map between IR/UV boundary conditions. One overarching motivation for trying to give more rigorous -or more satisfactory-answers to this and other questions, is that localization techniques would eventually allow one to compute partition functions and indices on non-compact manifolds with diverse topologies, which provide important tools in a wide range of current research areas. For an illustration of this point, we conclude with a collection of few potential applications of our results and suitable extensions thereof.
1. It would be very interesting to extend our results to more general boundary conditions. In the case of the chiral multiplet, we found that there is a nice mechanism for switching between two choices which naturally arise from our localization setup. Classifying boundary conditions would conceivably lead to a larger group of similar dualities. Analogous programs have been carried out in 3d N = 2 and N = 4 theories [72,123], which uncovered rich duality actions on the space of boundary conditions.
2. 4d holomorphic blocks should exhibit interesting global behavior in parameter space, such as Stokes phenomena. In fact, viewing our setup as a double uplift of 2d N = (2, 2) theories on a disk, it should be possible to establish a precise relation between (sums of products of) 4d holomorphic blocks and the topological-antitopological amplitudes first considered by Cecotti and Vafa [45]. Indeed, in [46] a four dimensional version of the tt * geometry was proposed, involving precisely 4d N = 1 theories on D 2 × T 2 . Similar considerations for 3d holomorphic blocks were explored in [43]. It would be interesting to study to what extent suitable combinations of 4d holomorphic blocks can be used to construct solutions to tt * equations, and explore applications to moduli spaces of hyper-holomorphic connections.
3. 3d holomorphic blocks can be characterized as solutions to a set of difference equations, physically interpreted as Ward identities for the algebra of half-BPS line operators [43,48,124,125]. In our case, the 1-loop determinants of the chiral multiplets also satisfy simple difference equations (we refer to [27] for an interacting example), and it is tempting to identify them as basic Ward identities for the algebra of surface defects (constructions of such identities may presumably be obtained with the help of the algebraic interpretation of 4d holomorphic blocks [126][127][128]). This would allow the 4d holomorphic blocks, possibly enriched with defects, to be also characterized as solutions to elliptic difference equations. This perspective has successfully been applied in the context of class S theories [129] and index computations [130][131][132][133][134]. 4. It may be possible to preserve more supercharges with suitable restrictions on the background geometry or by modifying the supergravity background fields. This would lead to the possibility of computing interesting protected indices of 4d N = 2 theories. One of these would be the AMNP 3d index [135]. The AMNP index enjoys several interesting properties, including a relation to Darboux coordinates for twistor constructions of hyper-Kähler metrics, and a relation to solutions of TBA equations arising in the study of 4d N = 2 wall-crossing. To employ our approach for its computation, one should take a limit of the background with a flat infinite disk and simultaneously stretch the complex structure of the torus, so as to obtain the required geometry of R 2 × R × S 1 (in fact, torus compactification and stretching were already employed in [135] as a regulator). Perhaps the main technical step to be taken in this direction would be to understand how to include instanton and monopole corrections.
and "Exact Results in Gauge and String Theories" from the Knut and Alice Wallenberg foundation during part of this work. The work of FN is supported by the German Research Foundation (DFG) via the Emmy Noether program "Exact results in Gauge theories". FN was also supported by Vetenskapsrådet under grant #2014-5517, by the STINT grant and by the grant "Geometry and Physics" from the Knut and Alice Wallenberg foundation during part of this work. The work of AP is supported by the ERC STG Grant 639220.

B Special functions and regularization of determinants
In this appendix, we collect useful definitions and properties of some special functions used in the main text. Our main reference is [137].

C Some computation with twisted fields
In this appendix, we spell out some detail about manipulations used to compute supersymmetry variations and tQ -exact actions.
Vector multiplet. Let us compute Hence the localizing functional used in the main text reads one can also rewrite the above functional in terms of ∆ ∨ .

D More details on the chiral multiplet
In this section, we give more details on the computation of the 1-loop determinant for the chiral multiplet. We also use another basis for the mode expansion which confirms the results obtained in the main text through (anti-)holomorphic modes. The fermionic part of the localizing Lagrangian (4.19) reads where we omitted the term V λ +Ṽ λ for simplicity. Upon integration by parts, this equation defines the boundary Lagrangian , ϕ e = √ 2(X,X). On the real contour we haveφ = φ † ,F = −F † , namelyX F = −X † F + i(1 + Ω 2 |s| 2 )L Yφ . Then we can write where we defined the boundary term Now we can recast the localizing Lagrangian in the form where we defined the kinetic operators Y and we added a superscript to remind on which space the operators act on. The boundary terms are Now we can notice that there exists the operator T = iL where we used that K F • T is upper triangular thanks to [L K , LȲ ] = 0, with determinant det(∆ (r) ) det(iL (r−2) K ). The determinants on the r.h.s. are to be computed on the space of scalar fields of R-charge r or r − 2, and the modes to be kept are determined by the vanishing of the boundary actions. The only obvious ways to impose their vanishing on the boundary (consistently with supersymmetry) is either through Dirichlet boundary conditions on φ, and by supersymmetry Dirichlet conditions also on C, or LȲ φ| ∂ = 0 and Dirichlet conditions on B, and by supersymmetry Dirichlet conditions also on X F .