A Twist in the Dyon Partition Function

In four dimensional string theories with N=4 and N=8 supersymmetries one can often define twisted index in a subspace of the moduli space which captures additional information on the partition function than the ones contained in the usual helicity trace index. We compute several such indices in type IIB string theory on K3 x T^2 and T^6, and find that they share many properties with the usual helicity trace index that captures the spectrum of quarter BPS states in N=4 supersymmetric string theories. In particular the partition function is a modular form of a subgroup of Sp(2,Z) and the jumps across the walls of marginal stability are controlled by the residues at the poles of the partition function. However for large charges the logarithm of this index grows as 1/n times the entropy of a black hole carrying the same charges where n is the order of the symmetry generator that is used to define the twisted index. We provide a macroscopic explanation of this phenomenon using quantum entropy function formalism. The leading saddle point corresponding to the attractor geometry fails to contribute to the twisted index, but a Z_n orbifold of the attractor geometry produces the desired contribution.


Introduction and Summary
We now have a good understanding of the spectrum of dyons in N = 4 and N = 8 supersymmetric string theories . For large charges the result for the degeneracy agrees with the macroscopic entropy of a black hole carrying the same charges. We also have a good understanding of how to systematically compute higher derivative corrections [34][35][36][37][38] and quantum corrections [39][40][41][42] to the black hole entropy. Some of these corrections have already been used to test the correspondence between the microscopic and black hole entropies beyond the leading order. Eventually one hopes to be able to systematically compute the corrections to the black hole entropy using these techniques, and compare the results with the microscopic answer, thereby testing the correspondence between macroscopic and microscopic entropies to much finer detail. Some attempt to generalize these results to half BPS black holes in the N = 2 supersymmetric STU model has also been made in [43,44].
On the microscopic side one often computes an index rather than the absolute degeneracy, defined so that it receives contribution only from the BPS states in the spectrum. As a result these indices are protected and do not vary continuously as we vary the moduli of the theory.
In four dimensions the standard index is the helicity trace index B 2n defined as follows [45,46] B 2n = 1 (2n)! T r (−1) 2h (2h) 2n , (1.1) where h is the third component of the angular momentum of a state in the rest frame, and the trace is taken over all states carrying a given set of charges. In order that a given state gives a non-vanishing contribution to this index, the number of supersymmetries broken by the state must be less than or equal to 4n. This is due to the fact that for every pair of broken supersymmetries we have a pair of fermion zero modes whose quantization gives a bose-fermi degenerate pair of states. As a result T r(−1) 2h will vanish unless we insert a factor of 2h which prevents the cancelation between these pair of states, thereby effectively soaking up the pair of fermion zero modes. Thus if we have more than 4n broken supersymmetries, and hence more that 4n fermion zero modes, then B 2n does not contain enough insertions of 2h to soak up all the fermion zero modes, and the contribution to the trace from such states vanishes. On the other hand if we have states with precisely 4n broken supersymmetries then B 2n receives contribution from these states, but not from any other states with more than 4n broken supersymmetries. This makes B 2n the ideal index for capturing protected information on states with 4n broken supersymmetries. Some standard examples are B 2 for half BPS states in N = 2 supersymmetric theories, B 4 for half BPS states in N = 4 supersymmetric theories, B 6 for quarter BPS states in N = 4 supersymmetric theories, B 14 for 1/8 BPS states in N = 8 supersymmetric theories etc. The normalization in the definition of B 2n has been adjusted so that the contribution to the trace from the 4n fermion zero modes due to broken supersymmetries exactly cancels the denominator factor of (2n)! except for a sign given by (−1) n .
Given that on the macroscopic side the black hole entropy always gives the absolute degeneracy whereas on the microscopic side we compute the helicity trace index, one might wonder whether comparing the two is justified. A resolution of this issue was proposed in [42] where it was shown how using the expression for the degeneracy on the macroscopic side one can compute the helicity trace index. This can then be compared with the microscopic results. This argument will be reviewed in §6.
In this paper we shall study a modified index obtained by twisting the helicity trace index by an appropriate discrete symmetry transformation -both on the microscopic and the macroscopic side -and compare the results. For this we need to restrict the moduli to be on special subspaces of the moduli space where the theory admits extra discrete symmetries generated by an element g, and restrict the charges carried by the dyon to be such that they are invariant under g. In this case we can define a new twisted index as 2 If all the supersymmetry generators of the theory are invariant under g then our earlier counting holds and we conclude that B g 2n does not receive any contribution from states which breaks more than 4n supercharges. However suppose that some of the broken supersymmetry generators are not invariant under g. In that case the corresponding fermion zero modes are also not invariant under g, and the contribution from these modes in T r(−1) 2h g will not vanish. As a result we do not need any factor of 2h to soak up this pair of fermion zero modes. If on the other hand we have a pair of fermion zero modes which are invariant under g then we need a factor of 2h in the trace to soak up these zero modes. Thus B g 2n receives non-vanishing contribution from states which break less than or equal to 4n g-invariant supersymmetries, -the total number of broken supersymmetries can be more than 4n. Conversely, if we have a state that breaks certain number of supersymmetres, and if 4n of these broken supersymmetries are invariant under g, then the ideal g-twisted index for capturing information about the spectrum of these states is B g 2n . Since we expect B g 2n to have properties similar to that for B 2n (e.g. for wall crossing [49][50][51][52][53][54]), this allows us to introduce an index in extended supersymmetric theories which behaves as an index in a theory with less number of supersymmetries. 3 The main goal of this paper will be to compute such twisted indices in type II string theory compactified on M × T 2 where M can be either T 4 or K3. We choose g to be the generator of a geometric Z Z N symmetry acting on M preserving 16 supersymmetries. For type II string theory on T 4 × T 2 this requires g to commute with 16 out of the 32 unbroken supersymmetries, while for type IIB string theory on K3 × T 2 this will require g to commute with all the 16 unbroken supersymmetries. Examples of such Z Z N transformations have been discussed in [59,60], and the dyon spectrum on orbifolds of the original theory by these symmetries (accompanied by a translation along a circle) have been analyzed in [9][10][11]. These (without 2 Black holes carrying discrete gauge charges have been discussed earlier in [47,48]. 3 The use of such indices is not new. In particular such an index has been analyzed in detail in N = 4 supersymmetric gauge theories where it was found that supersymmetric multi-monopole solutions preserving quarter of the supersymmetries exist only on a subspace of the moduli space [55][56][57][58]. As a result these do not contribute to the usual helicity trace index B 6 which should have the same value everywhere in the moduli space (leaving aside possible jumps across walls of marginal stability). Nevertheless one can define appropriate index to capture information about the multi-monopole states in the particular subspace of the moduli space where the solution exists. the translations along the circle) will be the Z Z N transformations we shall be using in our analysis. However here we do not take the orbifold of the original theory; we simply use g for defining a twisted partition function in the original theory. In this theory we consider dyonic states preserving 4 supersymmetries all of which are g invariant. Such a dyon breaks 12 of the 16 g-invariant supersymmetries, and the relevant g-twisted index is B g 6 . We find explicit expression for this index in the examples described above, and find that the index has properties similar to B 6 in N = 4 supersymmetric string theories, -the helicity trace index used for encoding information on 1/4 BPS states in this theory. In particular: 1. The index is given by the Fourier transform of the inverse of a modular form of a subgroup of Sp(2, Z Z).
2. The value of the index in different domains separated by the walls of marginal stability is controlled by the same partition function -with the information on the domain being encoded in the choice of contour along which the Fourier integral is to be performed.
3. The jumps across the walls of marginal stability are controlled by the residues at certain poles of the partition function. The resulting expression for the jump follows the same wall crossing formula as the usual B 6 index. 4. The growth of the index for large charges is controlled by another set of poles of the partition function.
There is however an important difference. If we associate an 'entropy' to this index defined by taking its logarithm, we find that for large charges the entropy is given by where S BH is the entropy of a black hole carrying the same set of charges as the dyon and N is the order of g. Given this result for the index it is natural to ask if this can be explained from the macroscopic viewpoint. We show that it is indeed possible to provide an explanation using the quantum entropy function formalism [41,42], -a proposal for calculating systematic quantum corrections to the black hole entropy as a path integral of string theory over the near horizon geometry of the black hole. We find that when we follow the same prescription to compute the twisted index B g 6 , the path integral must be carried out over field configurations satisfying g-twisted boundary condition along the boundary circle of the AdS 2 factor of the near horizon geometry. Since the circle is contractible in the interior of AdS 2 , this is not an allowed boundary condition on the fields in the attractor geometry. As a result the saddle point corresponding to the attractor geometry does not contribute to the path integral. However a Z Z N orbifold of the attractor geometry, which has the same asymptotics as the attractor geometry, does contribute and gives a contribution to the path integral whose semiclassical value is exp(S BH /N). This provides a natural explanation for the microscopic result (1.3).
The rest of the paper is organised as follows. In §2 we consider the simple example of type II string theory on K3 × T 2 and compute the index B g 6 for a Z Z 2 transformation g that acts geometrically on K3 and commutes with all the symmetries. The result is expressed as a triple Fourier integral of a 'partition function'. In §3 we study various properties of this partition function by relating it to a threshold integral [7,8,[61][62][63]. In particular we show that it transforms as a modular form under a subgroup of Sp(2, Z Z). We also determine the location of its zeroes and poles. In §4 we use these properties to derive properties of the index. In particular we prove the S-duality invariance of the index and show that the jump in this index across a wall of marginal stability is controlled by the residues at the poles of the partition function. We also determine the behaviour of the index for large charges, and find that the 'entropy', defined as the logarithm of the index, is half of the entropy of a black hole carrying the same charges. In §5 we generalize these results to type IIB string theory on M × T 2 where M = K3 or T 4 , with g chosen as a Z Z N transformation in M which preserves 16 of the supersymmetries of the theory. In this case the 'entropy' associated with the index grows as 1/N times the entropy of the black hole. In §6 we provide a macroscopic explanation of this phenomenon using quantum entropy function formalism. We end in §7 by discussing some other possible applications of this twisted index.

Computation of a ZZ Twisted Index in type II String
Theory on K3 × T 2 In this section we shall consider the spectrum of 1/8 BPS dyons in type IIB string theory on K3 × T 2 , identify g as a specific geometric Z Z 2 symmetry of K3 used in [6,9,18] that preserves the covariantly constant spinors of K3 and leaves invariant 14 of the 22 2-cycles of K3, and calculate the index B g 6 for these dyons. This of course forces the moduli of K3 to lie in a subspace of the full moduli space admitting this symmetry. We shall denote the a and b cycles of T 2 by S 1 and S 1 , and focus on a specific class of dyons consisting of one D5-brane wrapped along K3 × S 1 , (Q 1 + 1) D1-branes wrapped along S 1 and one Kaluza-Klein (KK) monopole associated with the circle S 1 , carrying −n units of momentum along S 1 and J units of momentum along S 1 . 4 A duality map involving an S-duality of the ten dimensional type IIB string theory, followed by a T-duality along S 1 and finally a string string duality transformation that relates type IIA string theory on K3 to heterotic string theory of T 4 , brings this state to a specific state in heterotic string theory. Under this duality map the charges Q 1 , J and the single D5-brane wrapping along K3 × S 1 become components of the magnetic charge P , the charges n and the single KK-monopole charge associated with S 1 become components of the electric charge Q, and the transformation g gets mapped to a specific symmetry of the heterotic string theory that exchanges the two E 8 factors of the gauge group. Thus it acts only on the left-moving modes of the world-sheet and preserves all the supersymmetries. The duality group of the theory is SO(6, 22; Z Z) T × SL(2, Z Z) S where the subscripts T and S denote that in this heterotic frame they appear as T-and S-duality symmetries respectively. If we denote by Q 2 , P 2 and Q · P the SO(6, 22) invariant bilinears in the charges then for this particular charge vector Q 2 , P 2 and Q · P are given by the relations [9,18] Q 2 = 2n, P 2 = 2Q 1 , Q · P = J . (2.1) We define the partition function Z(ρ, σ, v) via the relation: where B g 6 (n, Q 1 , J) is the contribution to B g 6 from states carrying quantum numbers (n, Q 1 , J). Inverting this relation we get 3) The computation of the Z(ρ, σ, v) proceeds as in [9] where the B 6 index of dyons was calculated in type IIB string theory on K3 × T 2 , modded out by a Z Z 2 transformation that involved the same symmetry g accompanied by half unit of translation along S 1 . We shall follow the notations of [18] where these results were reviewed. The main difference between our analysis and the one given in [9] will be that 1) here we do not remove any mode since we are not considering an orbifold, and 2) instead of correlating the momentum along S 1 with the g quantum number as in [9], here we use the g quantum number of a mode as the weight of its contribution to the index. However as far as the counting of the modes and their bahaviour under g transformation are concerned, we can directly use the results of [9]. As in the case of [9] we shall express Z as a product of several independent pieces: 1. Partition function for the excitation modes of the KK monopole.
2. Partition function for the D1-D5 center of mass motion in the KK monopole background.
This can be further divided into the contribution from the zero modes and the contribution from the non-zero modes.
3. Partition function associated with the motion of the D1-branes relative to the D5-brane.
The world volume degrees of freedom of the three component systems listed above, and the quantum numbers carried by them, including their transformation properties under g, can be found in [9,18]. As in [9,18], we shall work in the convention where the four g-invariant unbroken supersymmetries of the system act on the right-moving modes, ı.e. modes carrying positive momentum along S 1 . In this convention the requirement of unbroken supersymmetry forces all the right-moving modes into their ground states.
In the process of computing the index we must make sure that all the g-invariant fermion zero modes are absorbed by the factors of 2h inserted into the trace. Since in the present example g commutes with all the supersymmetries of the theory, all the fermion zero modes associated with the broken supersymmetries will be g even. In particular the KK monopole world-volume breaks 8 of the 16 supersymmetries, producing 8 fermion zero modes. These eight g-even fermion zero modes are soaked up by 4 factors of 2h in B g 6 . The D1-D5 system in the KK monopole background breaks four more supersymmetries. This exhausts all the fermion zero modes associated with broken supersymmetry generators as long as we consider only BPS excitations, ı.e. excitations carrying negative momentum along S 1 .
We begin by computing the contribution to the partition function from the KK monopole. It follows from the results reviewed in [18] that the world-volume of the KK monopole has 16 left-moving bosonic oscillators even under g and 8 left-moving bosonic oscillators odd under g. None of these excitations carry any D1-brane charge or momentum along S 1 . Furthermore the ground state of the Kaluza-Klein monopole carries −1 unit of left-moving momentum, ı.e. one unit of momenum along S 1 . Thus the net contribution to the partition function from these modes is given by There are also eight right-moving fermion zero modes which are absorbed by four factors of 2h inserted into the trace.
Next we turn to the contribution from the D1-D5 center of mass motion in the background of the KK monopole. Again the various modes and their quantum numbers can be read out from the results reviewed in [18]. In particular all of these modes are g-invariant. There are four fermion zero modes associated with broken supersymmetry; they are absorbed by two factors of 2h inserted into the helicity trace. The dynamics of the rest of the zero modes is described by an interacting supersymmetric quantum mechanics with Taub-NUT target space, and using the results of [64,65] one finds that the corresponding contribution to the partition function is given by −e −2πiv /(1−e −2πiv ) 2 [18]. On the other hand the non-zero mode oscillators consist of four g-invariant left-moving bosonic modes carrying ±1 units of momentum along S 1 , and four g-invariant left-moving fermionic modes carrying no momentum along S 1 . 5 Thus the net contribution to the partition function from the zero modes and the non-zero mode oscillators associated with the D1-D5-brane center of mass motion is given by Finally we turn to the contribution from the motion of the D1-branes relative to the D5brane. For this we first need to introduce some auxiliary quantities. The low energy dynamics of a single D1-brane inside the D5-brane, wound once along S 1 , is described by a superconformal field theory with target space K3. We define [18] where T r denotes trace over all the g r twisted Ramond-Ramond (RR) sector states in this CFT, and J L /2 and J R /2 denote the generators of the U(1) L × U(1) R subgroup of the SU(2) L × SU(2) R R-symmetry group of this conformal field theory. In our convention the current associated with J L is holomorphic and the one associated with J R is anti-holomorphic. Explicit 5 At the center of the KK monople the quantum number labeling S 1 momentum can be identified as the U (1) L generator of the SU (2) R × SU (2) L rotation group in the tangent space of the KK monopole. computation gives [7] where ϑ i are the Jacobi theta functions. (2.7) can be rewritten as We now define the coefficients c Substituting (2.10) into (2.8) and using the Fourier expansions of ϑ 3 (2τ, 2z), ϑ 2 (2τ, 2z) we get Consider now the motion of a single D1-brane, wound w times along S 1 , inside a D5-brane. The dynamics of this system is described by a superconformal field theory with target space K3, but since the D1-brane has length w times the period of S 1 , one unit of left-moving momentum along S 1 will appear as w units of left-moving momentum (L 0 ) on the D1-brane.
Also in the background of the Kaluza-Klein monopole the quantum numbers (J L , J R ) can be identified respectively with the S 1 momentum J and the fermion number F of the four dimensional theory [3,5,66]. We denote by (−1) j n(w, l, j; k) the total number of bosonic minus fermionic states of this D1-brane, carrying g quantum number (−1) k , momentum −l along S 1 and momentum j along S 1 . Then it follows from (2.6), (2.11) that [9,18] (2.12) Using this and the techniques of [67] we can compute the contribution to the partition function from the general motion of the D1-branes inside a D5-brane, where we have excitations involving multiple D1-branes carrying different values of w, l and j. This is given by The extra factor of e −2πiσ reflects that the total number of D1-branes is Q 1 + 1 and not Q 1 . This extra shift in Q 1 by 1 accounts for the fact that a single D5-brane wrapped on K3 carries −1 unit of D1-brane charge. Using the results we can express the total partition function as The w = 0 term in the above product is obtained from the Z KK Z cm term computed from (2.4), (2.5).

Properties of the Dyon Partition Function
Various symmetries of the dyon partition function are best studied by relating the function Φ defined in (2.15) to a threshold integral [7,9,10,[61][62][63]. Most of the results that we shall be using can be found in appendices C and D of [18] (the function Φ was called Φ in [18]). We begin by defining: We now consider the integral [18]: (3.4) F denotes the fundamental region of SL(2, Z Z) in the upper half plane. The subtraction terms proportional to c (0,s) 0 (0) have been chosen so that the integrand vanishes faster than 1/τ 2 in the τ → i∞ limit, rendering the integral finite. Following the procedure described in [7] one can show that [18] where bar denotes complex conjugation, for all (r, s). This is due to the fact that the manipulations leading to (3.5) makes use of the modular property of h (r,s) b (τ ) and such modular transformations give h and Φ is the same function that appears in the expression (2.15) for the partition function.
Due to the relation (3.5), symmetries of Φ can be determined from the symmetries of I [7]. 8 Consider in particular O(3, 2; Z Z) transformation on the variables (ρ, σ, v) and (m 1 , n 1 , m 2 , n 2 , j) defined as follows:  where S is a 5 × 5 matrix with integer entries, satisfying and λ is a number to be adjusted so that the fourth element of the vector on the left hand side of (3.7) is 1. I n denotes n×n identity matrix. One can easily check that p 2 R and p 2 L are invariant under these transformations. Thus as long as the transformation (3.7) preserves the restriction on (m 1 , n 1 , m 2 , n 2 , j) in the sum in (3.4), and preserves m 2 mod 1, this transformation is a symmetry of I, and hence of (det ImΩ) k ΦΦ. From the known modular transformation properties of det ImΩ it then follows that Φ transforms as a modular form of weight k under these transformations. Since O(3, 2; Z Z) is isomorphic to the modular group Sp(2; Z Z) of genus two Riemann surfaces we see that Φ is a modular form of a subgroup of Sp(2, Z Z). The generators of this subgroup have been given explicitly in [6,18].
Eq.(3.5) also allows us to determine the zeroes and poles of Φ, since they correspond to logarithmically divergent contribution to the threshold integral I. A detailed analysis can be found in [9,18]; here we summarize the main results. Analyzing (3.4) one can show that I can get logarithmically divergent contributions when p 2 R vanishes and p 2 L = 1 4 for one of the terms in the sum, ı.e. near the point where (m 1 , n 1 , m 2 , n 2 , j) takes one of the values which appear in the sum in (3.4). Near such a point Φ(ρ, σ, v) behaves as [18] Φ Now from (2.14) we see that c (1,s) 1 (−1) = 0 for all s. Thus there are no poles and zeroes of Φ for odd n 2 . On the other hand for n 2 even we have r = 0 in (3.12), and from (2.14) we get (3.13) Thus Φ has a second order zero for even values of 2m 2 in (3.12) and no poles.

Properties of the Index
In this section we shall make use of the various properties of the dyon partition function derived in §3 to derive properties of the index B g 6 . In particular we shall study the properties of B g 6 under S-duality, study the jump in B g 6 under wall crossing and study the asymptotic growth of B g 6 for large charges. Our starting point will be (2.3), but using (2.1) we shall express it as: .
The integral has been written as an integral over a 'contour' C which, according to (2.3), lies along the real (ρ, σ, v) axes. Naively in (2.3) we can fix Im(ρ), Im(σ) and Im(v) to any values we like; however in order that (2.2) converges we need to choose the imaginary parts of (ρ, σ, v) to lie in certain domains in R R 3 . As is well understood by now, the choice of the imaginary parts of (ρ, σ, v) depend on the point in the moduli space of the theory we are at [13,14,16,17] since the spectrum -and hence the convergence property of (2.2) -changes discontinuously as the moduli cross the walls of marginal stability. Nevertheless one finds that the function Z(ρ, σ, v) defined through (2.2) is the same -or more precisely the analytic continuation of the same meromorphic function -irrespective of where in the moduli space we compute it. The logic leading to this conclusion will be reviewed at the end of §4.1. This is equivalent to the statement that B g 6 in different domains in the moduli space are given by (4.1) with the same Φ, but the choice of the contour C is different in different domains in the moduli space, dictated by the convergence of the sum in (2.2). A convenient prescription for the choice of contour as a function of the moduli is [17] where Λ is a large positive number,  [13,14].
Using T-duality symmetry of the theory one can argue that any other charge vector that can be related to the D1-D5-KK monopole system considered here via a g-invariant T-duality transformation will have B g 6 given by (4.1). The choice of contour given in (4.2) is manifestly invariant under T-duality transformation.

S-duality Invariance
S-duality transformations act on the charges and moduli as (4.5) One can easily verify that and Furthermore, using the results Q 2 , P 2 ∈ 2 Z Z and Q·P ∈ Z Z one finds that (−1) Q·P = (−1) Q ′ ·P ′ . Using these relations we can rewrite (4.1) as . (4.8) Note that we have now explicitly indicated the dependence of B g 6 on the moduli τ , M via the choice of the contour (4.2). One can now further observe that • The choice of the contour C given in (4.2) is S-duality covariant under simultaneous Sduality transformation on (τ, Q, P ) given in (4.4) and of (ρ, σ, v) given in (4.6). Thus we can replace C by C ′ in (4.8) with the understanding that C ′ corresponds to the contour where all the variables are replaced by primed variables in (4.2).
• We have the relation and that the two matrices in (4.10) generate the whole S-duality group.
Using these two results we can rewrite (4.8) as This finishes the proof of S-duality invariance of B g 6 . In practice we derive the expression (4.1), (4.2) for the index only in certain domains in the moduli space where the type IIB string theory is weakly coupled [9,18] and then extend the result to other domains by requiring S-duality invariance of the spectrum [13,14]. Thus our analysis in this section should really be regarded as a proof not of S-duality invariance but of (4.1), (4.2), -ı.e. of the statement that the same function Φ can be used to capture the index in different domains in the moduli space just by changing the contour according to (4.2).

Wall Crossing
If we keep the charges fixed and vary the asymptotic moduli then the integration contour C varies. When it hits a pole of the integrand there is a jump in B g 6 given by the residue of the integrand at the pole. The physical interpretation of this jump is that at these points in the moduli space we have a wall of marginal stability and the jump in the degeneracy is due to the jump in the index across the wall of marginal stability [13,14]. One can show that [13] the poles which are encountered in this process are of the form The corresponding wall of marginal stability is associated with the decay (Q, P ) → (αQ + βP, γQ + δP ) + (δQ − βP, −γQ + αP ) . In fact via S-duality transformation all of these decays can be related to the decay [13] (Q, P ) → (Q, 0) + (0, P ) , (4.14) and the corresponding pole of the partition function is at v = 0 . we see that for small v 1 − e 2πinρ 16 1 + e 2πinρ 8 . Thus the jump in the index, given by the residue at the pole of the integrand in (4.1) at v = 0, is given by where . (4.20) It is easy to see that 1/g(ρ) is precisely the partition function that computes the B g 4 index of the dyons carrying charges (Q, 0) (ı.e. the KK monopole carrying momentum along S 1 ) or (0, P ) (ı.e. the D1-D5 system carrying momentum along S 1 ) and preserving half of the g-invariant supersymmetries. For example 1/g(ρ) is precisely the partition function of the Kaluza-Klein monopole given in (2.4) after removing the contribution from the fermion zero modes. Thus

Asymptotic Growth
We shall now study the asymptotic growth of the index B g 6 for large charges. As was shown in [1,2,6,9] and reviewed in [18], when Q 2 , P 2 and Q · P are all large and of the same order the asymptotic growth of the index, given by (2.3), is controlled by the pole of the partition function, ı.e. zeroes of Φ at for |n 2 | > 0. Furthermore the contribution from a pole of this type is of order exp π Q 2 P 2 − (Q · P ) 2 /|n 2 | + · · · , (4.23) where · · · denotes terms which are of order unity or suppressed by powers of the charges. Thus the leading contribution to the entropy comes from the poles with lowest possible non-zero value of |n 2 |. Since from the analysis below (3.12) it follows that Φ has no zeroes for odd n 2 we see that the leading contribution to B g 6 comes from the pole(s) with |n 2 | = 2. Thus for large charges we have Since the entropy of a BPS black hole carrying these charges is given by π Q 2 P 2 − (Q · P ) 2 [69,70], we see that ln |B g 6 | is half of the entropy of a black hole carrying the same charges (and also half of the 'entropy' computed from the usual helicity trace index B 6 ). We shall provide a macroscopic explanation of this phenomenon in §6.

Generalization to ZZ N Twisted Index
The above results can be easily generalized to the case where the theory under consideration is type IIB string theory on M × T 2 where M can be either T 4 or K3, and the Z Z 2 symmetry generator g is replaced by a Z Z N symmetry generator g that has a geometric action on K3 or T 4 , and commutes with an N = 4 subalgebra of the full supersymmetry algebra. This implies that for M = T 4 g commutes with half of the 32 supersymmetries, while for M = K3 g must commute with all the 16 supersymmetries. 10 The Z Z N transformations we shall be using can be found in [11] and references therein. However unlike in [11], we are not computing the spectrum in a new theory obtained by taking a Z Z N orbifold of the original theory. Our interest is to compute the g twisted index B g 6 in the original theory, ı.e. in type IIB string theory on T 4 × T 2 or K3 × T 2 .
The dyon system we consider is identical to the one described in §2, with the only difference that for M = T 4 we denote the number of D1-branes by Q 1 . The method of analysis is also identical to that in §2 and all the technical results needed for the computation can be found in [11,18]. The only extra complication for M = T 4 arises from the additional degrees of freedom associated with the Wilson line on the D5-brane along T 4 , but their effect can be easily computed since the quantum numbers and the g transformation laws of these additional degrees of freedom have been given in [11,18]. We shall describe only the final results. First we define This defines the coefficients c The index B g 6 is then given by The factor of C 3 in Φ comes from the quantization of the g non-invariant fermion zero modes carrying no J quantum number.
The threshold integral that can be used to derive various properties of Φ is given by (see appendix C of [18])  .7), preserves the restrictions on ( m, n, j) in the sum in (5.9), and preserves m 2 mod 1 so that the e 2πim 2 s factor in (5.9) also remains invariant. The generators of this subgroup of Sp(2, Z Z) have been given explicitly in [11,18]. The zeroes and poles of Φ can also be found from I following the analysis of [9,11] reviewed in [18] (appendix D). The result is that the zeroes and poles of Φ are of the following form: For N ≥ 5, we also have additional zeroes/poles of the type N ) , m 1 , n 1 , n 2 ∈ Z Z, j ∈ 2 Z Z + 1, m 2 ∈ Z Z/N, r = n 2 mod N, It was argued in [18] (appendix D) that the exponents in (5.16) and (5.17) are always negative or zero for r = 0 mod N, hence they correspond to poles of Φ. 11 Since our main interest is in determining the poles of the partition function which come from the zeroes of Φ, we can ignore the contribution from the r = 0 terms. For r = 0 we must have n 2 = 0 mod N.
In this case the constraints on (m i , n i , j) forces p to vanish in (5.17), reducing it to the case described in (5.16). Finally using the identities reviewed in [18] we see that only zeroes of Φ, both for K3 and T 4 , arise from the choice m 2 ∈ Z Z in (5.16) and are of the form Φ ∼ n 2 (σρ − v 2 ) + jv + n 1 σ − ρm 1 + m 2 m 1 , n 1 , m 2 ∈ Z Z, n 2 ∈ N Z Z, j ∈ 2 Z Z + 1, m 1 n 1 + m 2 n 2 + The knowledge of the zeroes of Φ gives us two important informations. First of all the zeroes of the form described in (4.12), obtained by choosing n 2 = 0 in (5.19), give us information on wall crossing for the decay (4.13). Again using S-duality transformation all such decays can be related to the decay given in (4.14) with the corresponding wall at v = 0. Using (5.6) and the identity 20) one finds that near v = 0, .

(5.22)
The constant C has been defined in (5.7). Using (5.21) we see that the jump in B g 6 across the wall of marginal stability, given by the residue of the integrand in (5.5) at the pole at v = 0, is given by It is easy to check, e.g. by computing the index B g 4 of a Kaluza-Klein monopole carrying momentum along S 1 , that f (Q) and f (P ) have the interpretation of the index B g 4 for dyons carrying charge (Q, 0) and (0, P ) respectively. Thus we get in agreement with the expected wall crossing formula for the index B 6 . The second application of the knowledge of the zeroes of Φ is in the determination of the asymptotic behaviour of B g 6 for large charges. They are controlled by the zeroes of Φ given in (5.19) for |n 2 | > 0. The constraint n 2 ∈ N Z Z in (5.19) implies that the lowest value of |n 2 | other than zero for which there is a pole is |n 2 | = N. The analysis of the asymptotic growth of the index, which is controlled by this pole, then tells us that the index grows as exp π Q 2 P 2 − (Q · P ) 2 /N . (5.26)

Macroscopic Explanation from Quantum Entropy Function
The near horizon attractor geometry of an extremal black hole in four dimensions contains an AdS 2 × S 2 factor. After euclidean continuation the metric on AdS 2 × S 2 takes the form where v 1 and v 2 are constants whose values are determined by the charges carried by the black hole. Besides the metric the background also has non-vanishing fluxes through various cycles and constant vacuum expectation values of the scalars which we have not written down explicitly. These background fields respect the SO(3) × SO(2, 1) isometry of AdS 2 × S 2 .
According to the quantum entropy function proposal [41,42] (see also [71]) the degeneracy associated with the black hole horizon is given by an appropriate path integral of string theory in the euclidean near horizon geometry of the black hole. More precisely the degeneracy associated with the black hole horizon is given by Here denotes the result of path integral over the string fields, q i are the electric charges describing fluxes of the U(1) gauge fields A (i) µ in AdS 2 and dθ denotes an integral along the boundary of AdS 2 . The superscript 'finite' refers to the infrared finite part of the amplitude defined as follows. If we carry out the path integral by putting an infrared cut-off at η = η 0 so that the boundary has a finite length L, then we may express Z computed via (6.3) as [41,42] for some L independent constant C. As indicated in (6.4), Z f inite is obtained by removing the e CL factor from Z and taking the L → ∞ limit. This prescription for computing d hor ( q) follows naturally from AdS 2 /CF T 1 correspondence and reduces to the exponential of the Wald entropy in the classical limit [41].
In (6.3) the path integral is to be carried out over all string field configurations whose asymptotic geometry coincides with the attractor geometry. In particular in integrating over the gauge fields we must keep the electric fields fixed at infinity and allow the constant modes of A (i) θ to fluctuate [41]. This follows from the fact that the electric field modes represent nonnormalizable deformations of AdS 2 whereas the constant A (i) θ modes represent normalizable deformations. With this prescription one can argue, via AdS 2 /CF T 1 correspondence, that the d hor defined in (6.2), (6.3) measures the degeneracy of a dual quantum mechanical system whose Hilbert space is degenerate and finite dimensional, containing the grounds states of the black hole carrying a fixed set of charges.
Since d hor measures the degeneracy associated with the horizon whereas in the microscopic analysis we calculate an index, one might wonder how we can compare the two quantities. For the helicity trace index B 2n this issue was addresed in [42] where the following explanation was offered. The main idea is to try to compute the index B 2n on the macroscopic side as well and then compare this with the microscopic result. The first step is to note that the factors of 2h inserted into the trace are used in soaking up the fermion zero modes associated with the broken supersymmetries. Typically these modes are always part of the hair degrees of freedom of the black hole, ı.e. live outside the horizon. This allows us to relate B 2n to T r(−1) 2h associated with the horizon degrees of freedom [42]. In fact if the only hair degrees of freedom are the fermion zero modes associated with broken supersymmetry then, up to a sign, the macroscopic B 2n can be shown to be equal to T r(−1) 2h associated with the horizon degrees of freedom. The second step is to note that although from the point of view of the asymptotic observer 2h measures angular momentum, in AdS 2 it can be regarded as an electric charge of the U(1) ⊂ SU(2) gauge field A associated with the rotational isometry of S 2 [72].
Thus while carrying out the path integral this charge must be fixed, and in fact has zero value since the attractor geometry is spherically symmetric. 12 Thus we have (−1) 2h = 1 and B 2n can be directly related to d hor defined in (6.2), (6.3). Put another way, computation of T r(−1) 2h can be expressed as a path integral of the kind described in (6.3), but with a twisted boundary condition that requires the fields to transform by (−1) 2h as θ changes by 2π. This can be regarded as a Wilson line of A along the boundary circle. But while carrying out the path integral over the gauge fields we are instructed to integrate over the Wilson lines of A along the boundary circle keeping the electric fields fixed. Thus a background Wilson line along the boundary circle can be removed by a shift in the integration variables and does not affect the 12 In classical supergravity in four dimensional Minkowski space all supersymmetric black holes are spherically symmetric. One can argue that supersymmetric black holes whose near horizon geometry has an AdS 2 factor must be spherically symmetric even in the full theory. For this we note that due to the presence of the AdS 2 throat, the full symmetry algebra at the horizon contains an sl(2, R) subalgebra besides the supersymmetry generators. The (anti-)commutators of the sl(2, R) and the supersymmetry generators then generate the su(1, 1|2) algebra which contains su(2) as its subalgebra.
final value of the path integral.
If we try to follow a similar logic for the index B g 2n then the first part of the argument goes through as usual, ı.e. the factors of (2h) 2n inserted into the trace are absorbed by the fermion zero modes living on the hair. At the end we are left with T r(−1) 2h g associated with the horizon degrees of freedom. This can be expressed as a path integral similar to the one described in (6.2), (6.3), but with a twisted boundary condition on the fields which require the fields to transform by g(−1) 2h as θ changes by 2π. Let us call this partition function Z g .
Of these the factor of (−1) 2h can be removed by the same argument described above. For the factor of g there are two possibilities. If g can be regarded as a rigid gauge transformation for some U(1) gauge field living on AdS 2 -like (−1) 2h as an element of the gauge group associated with the rotational invariance on S 2 -then the effect of the insertion of g is a background value of the Wilson line associated with the gauge group. Since in carrying out the path integral we integrate over the mode representing the Wilson line at the boundary, the effect of g insertion has no effect. Alternatively one can say that since the electric charges associated with all the gauge fields are fixed at the boundary, all states which contribute to d hor have the same value of g and hence the effect of insertion of g into the trace is trivial. On the other hand if g is not an element of a U(1) gauge group then there is no such interpretation. In this case the attractor geometry is not a valid saddle point in the theory, since the boundary circle along which we insert the twist by g is contractible at the center of AdS 2 (η = 0) and a twist by g will produce a singularity at the center of AdS 2 .
This however is not the end of the story. In carrying out the string path integral we are instructed to integrate over all configurations preserving the required boundary condition at η → ∞. So we can look for other saddle points. One of the criteria one must use in searching for these saddle points is supersymmetry; if the saddle point breaks too much supersymmetry then integration over the associated fermion zero modes will make the path integral vanish. It was shown in [73] that if we take an orbifold of the original geometry by a transformation that involves equal amount of rotation in AdS 2 and S 2 , possibly accompanied by another symmetry that commutes with supersymmetry, then the resulting orbifold, if consistent, preserves the necessary number of supersymmetries so that the contribution from this saddle point to the path integral does not vanish due to integration over the fermion zero modes. This suggests the following procedure for constructing a saddle point that contributes to B g 6 : we take the original attractor geometry geometry and then take an orbifold of this by a Z Z N transformation that combines the action of g with a shift of θ by 2π/N and a shift of φ by 2π/N. It can be shown following [74] that this geometry satisfies the required boundary condition as η → ∞. For this we need to carry out a rescaling θ → θ/N, η → η + ln N so that in the new coordinate system the AdS 2 part of the metric takes the form: Clearly as η → ∞ the metric approaches that of AdS 2 . The orbifold group now acts as θ → θ + 2π, φ → φ + 2π N together with an action of g. The g action is exactly as required for computing the g twisted index. On the other hand the 2π/N rotation in φ is part of a gauge transformation from the point of view of the theory on AdS 2 and hence, by our previous argument, has no effect on the macroscopic computation of the index, except possibly an overall phase. Put another way, the path integral involves integrating over all values of the Wilson line at ∞, and hence a saddle point corresponding to any specific value of the Wilson lline is an admissible configuration in the path integral. Thus we conclude that this saddle point contributes to Z g .
It follows from the analysis of [74] that the semiclassical contribution to Z f inite g from this saddle point is given by exp(S wald /N) where S wald is the Wald entropy of the BPS black hole carrying the same set of charges. The argument is fairly straightforward: if we keep the cut-off of η fixed as we take the orbifold action, then the classical action gets divided by N. On the other hand the length of the boundary also gets divided by N. Thus after subtracting the term proportional to the length of the boundary to extract the finite part of the action, we find that the finite part of the action for the orbifold is 1/N times the finite part of the action for the original attractor geometry. Since the latter is given by S wald = π Q 2 P 2 − (Q · P ) 2 , we get This is in agreement with the microscopic result given in (5.26). One possible problem with this construction however is that this saddle point has a Z Z N orbifold singularity on a codimension eight subspace that lies at the center of AdS 2 , either at the north or the south pole of S 2 and at the fixed points of g in M. In the absence of flux this is a consistent orbifold of string theory, but it is not clear if the presence of the background flux makes the orbifold inconsistent. If the attractor geometry contains a circle C then one way to avoid the existence of the orbifold singularity is to accompany the Z Z N transformation also by 1/N unit of shift along C [42,75,76]. The Z Z N now acts freely on the attractor geometry and hence there is no fixed point. By our previous argument the 1/N unit of shift along C under θ → θ + 2π effectively amounts to switching on a Wilson line at the boundary of AdS 2 and hence is an admissible saddle point. However in this case there is another subtlety, arising from the fact that at the origin of AdS 2 ı.e. at η = 0, the shift along θ is irrelevant. Thus we have an identification under φ → φ + 2π/N together with the action of g and 1/N unit of shift along C. As a result at the center of AdS 2 any magnetic flux through the three cycle S 2 × C, possibly accompanied by some other cycles of M × T 2 , will get divided by N, and unless the original flux through this cycle is a mutiple of N, the orbifold is not a consistent background of string theory. Thus we must judiciously choose the circle C such that C × S 2 either does not carry any magnetic flux or carries N units of magnetic flux. In the present example S 1 provides us with such a circle, in a spirit close to the one discussed in [75].
This finishes our proof that the macroscopic 'entropy' associated with the index B g 6 grows as π Q 2 P 2 − (Q · P ) 2 /N for large charges, in agreement with the microscopic results.

Discussion
In this paper we have computed the twisted helicity trace index for a class of dyons in type II string theory compactified on T 6 or K3×T 2 and studied their properties. We have also provided a macroscopic explanation for the observed asymptotic growth of this index by identifying the leading saddle point in the path integral which contributes to this index.
One of the special features of an index of this type is that in deriving the various general properties of this index we can focus on supersymmetries which commute with this twist. In particular if the full theory has M supersymmetries, and if only N of these commute with this twist, then the general properties of the index (e.g. under wall crossing) will be similar to those of the usual helicity trace index in a theory with N supersymmetries.
We shall now give some more examples of such indices which could have potential application. Consider type IIB / IIA string theory compactified on T 6 . The spectrum of elementary strings in this theory contains quarter BPS states obtained by keeping the right-moving worldsheet degrees of freedom in their ground state and exciting only the left-moving modes. Since these states break 24 out of 32 supersymmetries, the relevant index for these states is B 12 . This can be easily computed in the light-cone gauge Green-Schwarz formulation, where the world-sheet degrees of freedom consist of 8 scalars, 8 left-moving fermions and eight rightmoving fermions. However it turns out that due to an extra cancelation between the bosonic and fermionic states in the left-moving sector of the world-sheet, B 12 grows with charges at a rate much lower than the rate at which the absolute degeneracies grow [77,78]. Thus the contribution from most of the states cancel due to the cancelation between the contributions from fermionic and bosonic states, -indeed whereas the degeneracies grow exponentially with the charges, the index grows only as a power of the charges.
However consider now the subspace of the full moduli space of the theory where we set all the Ramond-Ramond (RR) moduli to zero. In this subspace the theory has a discrete symmetry denoted as (−1) F L that changes the signs of all the RR and R-NS sector states. Since elementary string states only carry charges under the NS − NS sector gauge fields, these charges are automatically invariant under (−1) F L . Thus we can choose g = (−1) F L for defining a new index B g 2n . For elementary string states in the ground state of the right-moving sector but with arbitrary excitations in the left-moving sector of the world-sheet all the 16 supersymmetries in the R-NS sector, and 8 supersymmetries in the NS-R sector are broken. Thus we have 16 g-odd and 8 g-even broken supersymmetries, and these elementary string states contribute to B g 4 . The eight g-invariant fermion zero modes from the right-moving sector are soaked up by the factor of (2h) 4 , whereas the eight fermion zero modes from the left-moving sector are even under (−1) F L (−1) 2h = (−1) F R and hence gives a factor of 2 4 = 16 in the trace. The rest of the computation involves keeping the right-movers in their ground state and computing the degeneracy of states created by the left-moving oscillators without any weight factor. As a result there is no cancelation, and B g 4 grows at the same rate as the degeneracy, ı.e. exponentially, according to the Cardy formula for a CFT with eight bosons and eight fermions.
The next example involves quarter BPS states in the heterotic string theory on T 6 . Since these states break 12 out of 16 supersymmetries the appropriate index is B 6 . But we can consider a subspace of the moduli space where T 6 factorizes into a product of T 4 and T 2 . In this subspace the theory has an extra discrete symmetry that involves reversing the sign of the four coordinates of T 4 . We identify this as our symmetry g. If we consider charge vectors which carry only momentum and winding charges, and KK monopole and H-monopole charges along the two circles of T 2 then these charges are invariant under g. Thus we can define an index B g 2n for these charges. Under the action of g half of the 16 supersymmetries are odd and half are even, but one can show that all the 8 g-odd supersymmetries are broken by the dyon. Thus these dyons have 4 broken supersymmetries which are even under g, and hence contribute to the index B g 2 . We expect this index to have properties similar to that of B 2 , -the index that is relevant for capturing the spectrum of half BPS states in N = 2 supersymmetric string theories. 13 In particular the wall crossing formula for this index will be controlled by the Kontsevich-Soibelman formula [79,80].