{'fraction_non_alphanumeric': 0.04990849592108936, 'fraction_numerical': 0.029250286919569466, 'mean_word_length': 4.229521492295215, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Spectral determinants and quantum theta functions

It has been recently conjectured that the spectral determinants of operators associated to mirror curves can be expressed in terms of a generalization of theta functions, called quantum theta functions. In this paper we study the symplectic properties of these spectral determinants by expanding them around the point hbar=2pi, where the quantum theta functions become conventional theta functions. We find that they are modular invariant, order by order, and we give explicit expressions for the very first terms of the expansion. Our derivation requires a detailed understanding of the modular properties of topological string free energies in the Nekrasov-Shatashvili limit. We derive these properties in a diagrammatic form. Finally, we use our results to provide a new test of the duality between topological strings and spectral theory.


Introduction
Topological string theory was introduced in the '80s as a simplified model of string theory which captures information on the background geometry [1]. Since then, this theory has led to many new results in mathematical physics.
Originally this model was defined only perturbatively by a formal asymptotic expansion. When the background geometry is a toric Calabi-Yau (CY), one can compute the coefficients of this series at any order in perturbation theory [2][3][4][5]. Many aspects of the large order behavior of this formal expansion have been studied in a series of papers starting with the seminal paper [6] and leading to several insights on a possible non-perturbative definition of the theory [7][8][9][10][11][12][13][14][15][16]. Recently, by using the so-called Fermi gas formalism, a non-perturbative completion of topological strings on toric CY has been proposed. This formalism was first introduced in the context of ABJM theory [17] and further extended to topological string theory in [18], by using the insights from [19,20].
In the non-perturbative formulation of [18] one associates a trace class, positive definite operator,ρ X , to any toric Calabi-Yau 3-fold X whose mirror geometry has genus one (the higher genus generalization was later worked out in [21]) . Physically, this operator corresponds to the density matrix of an ideal Fermi gas with a positive and discrete spectrum. Such a spectrum can be elegantly organized into the so-called spectral (or Fredholm) determinant Ξ(κ, ) = det (1 + κρ X ) . (1.1) In [18] it has been conjectured an explicit expression for this spectral determinant in terms of (un)refined Gopakumar-Vafa invariants of X. At the orbifold point (κ = 0), the spectral determinant, denoted by Ξ X (κ, ), has the following expression where Z(N, ) can be identified with the partition function of a one dimensional ideal Fermi gas with N particles. The proposal of [18] is that Z(N, ) provides a non-perturbative definition for the topological string partition function where the string coupling g s is identified with the inverse of the Planck constant . This gives a duality between topological string theory and quantum mechanics similarly to the AdS/CFT correspondence [22] where on the AdS side we have topological string theory on toric CYs while the role of the CFT is played by a one dimensional Fermi gas. In this formalism the perturbative expansion of standard (or unrefined) topological strings emerges when we study the t' Hooft limit of the gas, namely These non-perturbative corrections are determined by the so-called Nekrasov-Shatashvili (NS) limit of the refined topological string [18,19]. By combining the results of [18,23] with the Cauchy identity [17], one can write Z(N, ) as a matrix model whose 't Hooft expansion reproduces the perturbative expansion of topological strings in the conifold frame [24,25]. The explicit expression for the spectral determinant in terms of enumerative invariants proposed in [18,21] is based on an expansion at the large radius point of the moduli space where κ 0. (1.5) However, to fully understand Ξ(κ, ) at a generic point of the moduli space one would need a Gopakumar-Vafa-like resummation [26] away from the large radius point. Although, there are evidences and concrete examples to believe that such a resummation should exist [27,28], at present it is not known. Nevertheless, there are some special cases, called the "maximally supersymmetric" cases, where it is possible to write down a closed form expression for the spectral determinant in terms of hypergeometric and conventional theta functions [18,29]. In these cases we have a good control of the spectral determinant over the full moduli space. Such a simplification occurs for instance when = 2π. Therefore in our formalism the simplest regime is a quantum regime where = 2π and not the classical one. The strategy in this paper is to study Ξ(κ, ) at a generic point of the moduli space (parametrized by κ) by performing an expansion around the special value = 2π (1. 6) At each order in the expansion one can write down a closed form expression for the spectral determinant in term of unrefined and NS free energies where the n th order is completely determined by the free energies F g and F NS h with g, h ≤ n. In this paper we will work out in details the very first few terms in this expansion (1.6).
It is well known [30,31] that different points in the moduli space correspond to different choices of symplectic frames. The transformations properties of the unrefined free energies under such a change of frame have been worked out in detail in [30,31] where it was shown that the unrefined free energies transform as a wave function while moving around the moduli space. In this paper we will see that a similar behavior holds also for the NS free energies. By using these considerations we argue that, order by order in the − 2π expansion (1.6), the spectral determinant is invariant under a change of symplectic frame. This paper is organized as follows. In sections 2 and 3 we review some of the results concerning the special geometry of toric Calabi-Yaus and the conjecture of [18]. In section 4 we organize the modular properties of the Nekrasov-Shatashvili free energies by using diagrammatic rules and in section 5 we study the expansion of the spectral determinant around = 2π. In section 6 we use these results to give further evidence for the topological string/quantum mechanics duality proposed in [18].

Special Geometry
We consider a toric Calabi Yau 3-fold X whose mirror geometry is encoded in a Riemann surface of genus g Σ : W X (e x , e p , κ) = 0, x, p ∈ C, are the complex deformation parameters describing the geometry (2.1), see [32,33] for more details.
Let A I , B I be a symplectic basis of cycle for the above surface The classical periods for the geometry (2.1) are given by where p(x) is determined by (2.1). For sake of simplicity we omit the dependence on κ in p(x). The classical mirror map I and the genus zero free energy F 0 of topological string on X, can be computed from these periods as [34] Sometimes we refer to I as classical Kähler parameter. When performing a modular transformation of the cycles the classical periods transform according to [31] This is what it is called a change of symplectic frame. In the following we will use the term symplectic (or modular) transformation to refer to such a change of frame.
In [35], based on earlier works [36][37][38][39][40], it was argued that one can quantize the curve (2.1) by promoting x and p to operators fulfilling the standard commutation relation (2.8) The differential p(x)dx is then promoted to a quantum differential The corresponding quantum periods are defined by These periods are related to the so-called Nekrasov-Shatashvili (NS) free energy (3.13) through In [32], based on earlier work [37,41], it was argued that (2.14) where Π i (κ) are differential operators of order i. We give a concrete example in appendix A.2. It follows that the quantum periods transform according to To make contact with the results of [18,21] it is useful to introduce t I (κ, ) = − 1 (2πi) 1/2 C IJ J (κ, ), I, J = 1, · · · g Σ . (2.17) The matrix C IJ is a g Σ × g Σ matrix which can be read off from the toric data of X as explained in [21,42]. We also use Depending on the kind of computation it is more convenient to use T, t or .

Spectral determinant and topological strings
In this section we will review some aspects of the work [18] and its generalization to mirror curves of higher genus [21]. A pedagogical review of this conjecture and its implications has been presented in [43]. The starting point is the quantization of the mirror curve (2.1) which leads to g Σ trace class operators (see [23] for a rigorous mathematical proof) The operators (3.1) have a discrete spectrum which can be elegantly organized into a generalized spectral determinant Ξ X (κ, ) = det (1 + κ 1ρ1 ) det 1 + κ 2ρ2 More precisely, the spectrum of the operatorsρ i (κ i ) is determined by vanishing locus of Ξ X (κ, ) as explained in [21]. In the case of a genus one mirror curve the generalized spectral determinant (3.3) becomes the standard Fredholm determinant where e −En are the eigenvalues ofρ X .
As an example we consider the anti canonical bundle over CP 2 . For this geometry the mirror curve (2.1) reads W (x, p, κ) = e x + e p + e −x−p + κ, (3.5) and the corresponding quantum operator iŝ An important achievement of [18,21] is that one can compute (3.3) explicitly in term of (refined) Gopakumar-Vafa (GV) invariants of X. These topological invariants determine (3.3) through the so-called topological string grand potential J X (µ, ) which was first introduced in [17] and then further studied in [18,19,[44][45][46][47][48][49][50]. More precisely we define and where n d g are the standard GV invariants of X. This quantity is sometimes called the instanton part of the topological string free energy whose full expression reads We denote by F g the genus g free energies of standard topological strings 1 .
The refined invariants N d j L ,j R appear through the functions J c and J b . These are defined as (3.12) Generically, the geometry of the mirror curve to toric CYs is parametrized by two set of variables: the "true" moduli (3.2) and the mass parameters m i . In this paper we set these parameters to the particular value which guarantee the vanishing of the corresponding algebraic mirror map. As a consequence one has a particularly simple relation between the b 's and c 's coefficients given in (3.12) (see [18,49] for more details). Notice that J b is closely related to the NS free energy  1 Notice that in our notation F2g have a -sign w.r.t. the notation in [18,21].
The parameter B appearing in (3.7) is a geometrical parameter which is related to the canonical class of the geometry X, we refer to it as B field [19]. The function A( ) in (3.7) is the so-called constant map contribution [5] and it is necessary to guarantee the correct normalization of the spectral determinant, namely Ξ X (0, ) = 1. (3.14) The conjecture of [18,21] states that where Z(N, ) defines the non-perturbative partition function of topological strings on X. As explained in [18] it corresponds to the partition function of an ideal Fermi gas. This conjecture and its consequences have been further tested in [23-25, 28, 49, 51-53]. In [54,55] this conjecture has been used to obtain exact quantization conditions for the integrable systems of Goncharov and Kenyon and for the relativistic Toda lattice. In [56], by using recent developments in the context of Painlevé equations [57][58][59], a proof of the conjecture in a limiting case was provided. The sum in (3.15) can be implemented formally and we write defines the quantum theta function whose zeros determine the spectrum of the operators (3.1). Moreover, according to the conjecture, its inclusion cures the non-analyticity of the grand potential in such a way that the resulting spectral determinant is an analytic function in κ. As explained in [18,21], the grand potential (3.7) leads to an explicit expression for the quantum theta function in terms of (refined) GV invariants valid near the large radius region of the moduli space and, for real values of , it has good convergence properties. However away from this region very little is known. There are few exceptions to this, among them we have the self-dual point with = 2π. For this value the quantum theta function becomes a conventional theta function an one can write a closed form expression for (3.17) at any point of the moduli space in terms of hypergeometric and theta functions 2 .
In this paper we explore the other regions of the moduli space away from the large radius point by performing an expansion around this special value of = 2π. As first pointed out in a related context [29], it is straightforward to see that for this value of only genus zero and genus one free energies contribute to (3.10) and (3.13). For toric Calabi-Yaus these are typically known in closed form in term of Meijer and hypergeometric functions. Hence we can write down a closed form expression for Ξ X (κ, 2π) at any point of the moduli space in term of these special functions. Let us define (3.20) In [18,21] it was argued that t(2π) can be obtained from t(0) by switching the sign 3 in some of the complex deformations parameter describing the mirror geometry to X. Therefore, under a change of symplectic frame have the same tranformation properties of It was found in [18,21] that, when = 2π, the spectral determinant takes a particularly simple form, namely Notice that τ is modular parameter of the spectral curve (2.1) therefore Im( τ ) > 0. The constant β in (3.23) can be computed explicitly in term of b I , b NS J , a IJK [18,49]. The theta function Θ α,β is defined as [60] Moreover the Kähler parameters in (3.24) are evaluated at = 2π. As first noticed in [29], the spectral determinant evaluated at = 2π is similar to the leading order of the background independent partition function proposed in [60][61][62]. However, there are two main differences. The first one consists in the fact that the theta function has now an oscillatory behavior with no need to impose additional constraints on the moduli as was required in [60][61][62]. This improvement of the convergence properties is related to the fact that to compute the spectral determinant (3.15) one has to sum over imaginary shifts of the moduli, whereas in [60][61][62] the sum runs over real shifts. Moreover the proposal of [60][61][62] is defined by a formal 1/N 't Hooft like expansion (1.3) which misses important non-perturbative effects in e −N that in our formalism are determined by the NS free energies. These differences become even more important at higher orders in the expansion (1.6). In particular the NS quantities do not simply factorize as in (3.26) but they mix with the unrefined free energies and their derivatives. We work out some explicit example in section 5 and in appendix B.
Notice that F GV , J b and J c in (3.7) are ill defined for = 2π due to the presence of some poles. However when we sum them up these poles disappear and we are left with a well defined quantity: the grand potential J X . This is the so-called HMO cancellation mechanism [45] and to guarantee such a mechanism the NS free energies play a crucial role.
As we will see in the next section, the genus one free energy F NS 1 is modular invariant. Therefore it follows from the computations of [60], that Ξ(κ, 2π) is invariant under (2.6) up to a phase and change of characteristic in the theta function. Let us review how this goes. By using 4 it is straightforward to see that the combination In particular one can show that, up to an overall phase factor, we have [60] where (M ) d is a vector whose components are the diagonal element of the matrix M . Hence from (3.28),(3.29) and (3.31) it follows that Ξ(κ, 2π) is invariant under a change of symplectic frame (2.6), up to a phase factor and a change of characteristic in the theta function.
Notice that the τ matrix in (3.24) reads Similarly we define

Change of symplectic frame
We are interested in studying the spectral determinant at a generic point of the moduli space. As explained in [30,31] different points in the moduli space correspond to different choices of symplectic frames (2.6). Therefore we have to study the symplectic properties of the quantities which determine the spectral determinant Ξ(κ, ), in particular the standard and NS free energies (3.10), (3.13). For the standard free energy (3.10) these properties have been worked out in [31,63] where it was shown than these can be formulated in a compact way thanks to the wave function behavior of the unrefined partition function. A discussion of the modular properties of the NS free energies has been done in [41,64]. In the following we organize them by using diagrammatic rules in a wave function like behavior which is controlled by the same action of the unrefined theory.

The Nekrasov-Shatashvili free energies
In this section we study how the NS free energies transform under (2.6). For that we need to integrate Π B I ( , κ) by carefully taking into account the dependence in the quantum A period ( , κ). We will use F NS g =F NS g (t(0)), Then we have (∂ I = ∂ I ) (4.2) where we denote by ∂ I F NS g the derivative w.r.t. the classical period I (0) evaluated at = 0. Since the index structure of (4.2) is clear we will simply denote it by By carefully computing the expansion on the l.h.s and on the r.h.s. of (2.16) and by performing the integration over we observe that the modular properties of F NS g can be encoded by using diagrammatic rules similar to the ones used for standard free energy [63,65].
Let us represent ∂ s F NS g by a Riemann surface of genus g with s punctures. We observe that, under the modular transformation (2.6), the free energy F NS g transforms into itself plus the sum of all possible connected (via propagators) Riemann surfaces of total genus g fulfilling where m is the number of propagators and n the number of surfaces connected by propagators. As in [63,65] we require at least 3 punctures on a surface of genus zero and the propagators are given by K = −C (Cτ + D) −1 . Moreover the weight 1/s of each graph is obtained simply by counting the multiplicity of each surface inside the graph as in the unrefined case. This is shown for instance on Fig. 1 where we used that ∂ 3 F 0 behaves as a weak Jacobi form of weight -3 under (2.6) as shown for instance in [31]. By integrating (4.6) we obtain that F NS 1 is modular invariant while Similarly one can show that  Figure 2. A graphical representation of (4.11) (top), and of (4.12) (bottom). (4.9) The above transformations have been worked out by an explicit computation from (2.16), however it is easy to check that they can be derived by using the diagrammatic rules explained around equation (4.4). Similarly we have explicitly check these diagrammatic rules also for higher F g . The structure of the indices in (4.8) and (4.9) is always such that the corresponding diagram is connected. For instance let us consider the term appearing in the modular transformation of F 4 in (4.8). The correct structure of the indices is This is represented by the diagram in the top of Fig. 2. As an example let us consider the following index structure  (4) . The blue dashed surfaces represent the n "satellites" and the red ones represent ∂ n+1 F NS g This is represented by the diagram in the bottom of Fig. 2. This diagram is disconnected, and (4.12) has indeed the wrong index structure. It could be that there are two "connected" index structures for a single term. This is the case for instance for the term appearing in the modular transformation of F 2 (B.5). In this case one has to consider all the connected index structures with the corresponding symmetry factor. For instance (4.13) reads (4.14)

The quantum Kähler parameters
Likewise, we notice that the transformation properties of the n th component of the A period, (n) , can be encoded by using diagrammatic rules. By doing an explicit computation one can show that (2.16) leads to (4.15) We encode the above transformation by saying that where G(k) can be represented as a sum of diagrams. Each of these diagrams is made of one Riemann surface of genus g with one leg sticking out and n ≥ 0 "satellites" of genus k > g i ≥ 1 ( representing (g i ) ) such that This is shown on Fig. 3 for k = 4. The multiplicity is computed in the standard way.
In appendix A we check by an explicit computation the rules (4.15) in the case of the local P 2 geometry. The comparison between our results (4.15) and the direct computation leads to interesting identities, as for instance (A.15),(A.18), (A.19), which can be checked explicitly.

The wave function and the holomorphic anomaly
We observe that the diagrammatic rules described in section (4.1) can be encoded in some kind of wave function behavior similar to the one for the standard free energies [31,63]. Let us define [63] 2 S( , η, , where K is defined in (4.5) and denotes here the classical period (2.5). Then the previous transformation rules can be written as where by | g fixed we mean that at each order in the 2g−2 expansion we keep only diagrams with total genus g. We use F NS ( , , K) to note the NS free energy obtained after performing the modular transformation (2.6). When K = 0 we simply note F NS ( , ). To implement the constraint | g fixed , it is useful to introduce an extra variable y and consider The transformations rules for the F NS g 's can then be computed by doing a saddle point analysis of the integral appearing on the r.h.s. of (4. 19) or (4.20) . It is easy to see that the saddle point for small is given by η = . (4.21) We explicitly checked that the saddle point analysis of (4.19) agrees with (4.7), (4.8), (4.9) which have been at first derived from (2.16). When we compute the saddle point of (4.20), at each order in the 2g−2 expansion, the diagrams with total genus g are multiplied by a factor of y −1 .
Similarly the diagrams with total genus g < g are multiplied by a positive power of y. For instance at order 2 the saddle point of (4.20) gives Therefore we have a systematic way to compute the l.h.s. of (4.19) as: Notice that if we set y = 1 we recover the wave function behavior of the standard topological string free energy [31,63]. By following [63], one can derive from (4.20) the holomorphic anomaly equation for the NS free energies and check that it reproduce the well known result [41,64,66]. Let us introduce a non-holomorphic dependence in I by setting [63] K 0 = (τ − τ ) −1 (4.25) and define (4.26) Then we have 1 where · denotes the expectation value w.r.t. the integral in the first line of (4.26). Similarly one has 1 (4.28) In particular When y = 1 (4.29) takes the form of the holomorphic anomaly equation of unrefined topological strings [5,63]. If instead we take y → 0 in (4.29), by using (4.24), we recover the refined holomorphic anomaly equation for the NS free energies [41,64,66] (4.31)

Symplectic invariance and the spectral determinant
We are now going to use the results of section 4 to investigate the modular properties of the spectral determinant (3.15). As explained previously the strategy is to expand the spectral determinant around = 2π: where the leading order n = 0 is given by (3.23). We find that the n th order in this expansion can be written in closed form in terms of F g , F NS h with g, h ≤ n and derivatives of the theta function (3.25). In the following we work out the first few orders in the expansion (5.1) and we show modular invariance by and explicit computation. We will then argue that this is the case at each order in the − 2π expansion. This is done by using the combinatorial techniques developed in [60] together with the rules worked out in section 4. We use the shortcut notation Θ = Θ 0,β ( ξ, τ ), The modular properties of Θ (n) have been worked out in [60] and they can be schematically represented as where K is given in (3.30). Notice that when we refer to modular invariance we always mean up to a change of characteristic in the theta function (3.26) as in [60]. In the following we will omit the constant map contribution A( ) appearing in the spectral determinant (3.7) since it clearly does not affect the modular properties. To be more concrete we will do the analysis in the case of a mirror curve with genus one.

First order
Let us look at the first order in the − 2π expansion. After some computations we find where we used ∂ T | =2π = 0. By using the modular properties of the unrefined free energy [31,60], together with (5.4) we have .

(5.7)
From the invariance of F NS 1 it follows that Therefore (5.6) is manifestly modular invariant as expected.

Second order
At the second order we have × e J(µ+2πin,2π) (5.9) One can show from (3.7) that (5.10) Similarly where we use that 12) and B is the B field. It follows that 1 2 When the NS quantities are set to zero, modular invariance of (5.13) is straightforward from [60]. Therefore it is enough to show that the following term is invariant under (2.6): (5.14) By using the transformation properties of the standard free energy [31,60,63] together with (4.6) and (5.4) we find (5.18) By summing up (5.15),(5.16),(5.17) and (5.18) we obtain modular invariance up to an additional term given by K 2πi .

(5.19)
For the last term in (5.14) we have (5.20) In particular the second term in (5.20) precisely cancels the one in (5.19). Hence modular invariance is manifest also at the second order.

The general mechanism
The general structure of the n th > 0 order term in the expansion (5.1) is the following. There is a part which involves only standard topological strings By using the combinatorial rules of [60] it follows that this part is modular invariant. However we also have two other contributions of the form (g i , g j < n) Let us look at the first term (5.22). Since the number of derivatives acting on Θ is the same as acting on the free energy, when we apply a symplectic transformation we recover the same term plus an extra factor. The same happens also for the second term (5.23). Indeed T (k) get a multiplicative factor of (C τ + D) under modular transformations as explained in section 4.2.
Notice that (5.23) appears when we consider the dependence of T . None of the terms (5.22) and (5.23) is modular invariant: they both transform into itself plus an additional factor. At each order in the − 2π expansion, the extra factor coming from (5.22) cancels the one coming from (5.23). Although we don't have a general proof of this cancellation, we have checked it by an explicit computation up to order 4. The details of the computations at order 3 are given in Appendix B.
6 Testing the topological string/quantum mechanics duality By now several tests of the conjecture [18] have been done. In the analytic tests an important roles is played by the Fermionic spectral traces Z(N, ) (6.1) appearing in the small κ expansion of the spectral determinant (3.16). These can be computed analytically on both side of the conjecture. In the topological string side this is done by computing explicitly the small κ expansion of (3.15) while in the operator theory side one gets an analytic expression for (6.1) by computing the traces of the operators (3.1) as we will explain below.
In this section we are interested in the derivative of the Fermionic spectral traces Let us consider the simplest example, namely the local P 2 geometry. The small κ expansion (3.16) of the spectral determinant at = 2π was computed in [18] and reads Ξ(κ, 2π) = 1 + Similarly by using (3.15), (5.6) we have 4) where we denote by ϑ 2 (τ, v) the Jacobi theta function of characteristic two and we use To compute the small κ expansion of (6.4) one has to analytically continue the free energy and the Kähler parameter to the orbifold point. By using the expression of appendix A.3, A.1 for To derive this result one has to use non trivial identities involving derivatives of the theta function evaluated at some special points. For instance we found that and we denote by ψ (1) the polygamma function of order one (see appendix A.3). To our knowledge this identity is not known in the literature however one can easily check it numerically with arbitrarily high precision. Therefore, on the string side of the duality [18] we have (6.10) Alternatively, these results can be derived by using the Airy function method, namely where C is the standard Airy contour. It is easy to check that a numerical evaluation of the integral (6.11) with the method of [45] leads to (6.7).
We are now going to reproduce (6.10) in the operator side of the duality. The kernel of (3.6) was computed in [23] and reads and Φ b is the Faddeev's quantum dilogarithm [68,69] whose integral representation is 14) The spectral traces for the operator ρ P 2 are defined by where e −En denotes the spectrum of the operator (3.6). It was shown in [23] that where we used 19) where we used the properties of the quantum dilogarithm to write (see for instance [70], [67]) By using the relation between the spectral traces (6.15) and the Fermionic spectral traces (6.1) (6.22) it is easy to check that (6.17), (6.19) reproduce (6.10) as expected from the topological strings/spectral theory duality.

Conclusions
We studied the behavior of the Nekrasov-Shatashvili free energies under a change of symplectic frame and we found that it can be organized by means of simple diagrammatic rules. We used these results to investigate the symplectic properties of the spectral determinants of operators associated to mirror curves. In turn, these can be expressed in term of a quantum theta Θ X (κ, ) (7.1) which, at least as an asymptotic expansion, is manifestly well defined and has a clear nonperturbative meaning as a spectral determinant [18,21]. In particular when = 2π, this quantum theta function becomes a conventional theta function whose modular properties are well known. By expanding around this special point we found that, order by order the − 2π expansion, the corresponding spectral determinants are invariant under a change of symplectic frame. In view of these results, we provided a new test the conjecture [18].
In this paper we performed a further step in understanding the general properties of the quantum theta function away from the large radius region of the moduli space. However to have a complete understanding of this object it would be interesting to find a closed form expression for (7.1) at any point in the moduli space and for all values of . This would require a Goparkumar-Vafa like resummation away from the large radius point which, at present, it is not known.
Moreover we observed that the Nekrasov-Shatashvili partition function behaves as a wave function and it is well known [6,71] that in the unrefined case this kind of behavior is closely related to the topological recursion of Eynard and Orantin [65]. Therefore, given the above diagrammatic rules, one would expect that it exists a simple "refined" topological recursion also for the NS free energies compatible with (A.15), (A.18), (A.19). We hope to report on this in the near future.
The NS free energies of the local P 2 geometry be computed by using the refined topological vertex [2] or the refined holomorphic anomaly [41,64,66]. We have 5 (A.7) where we denote t = t (0) and we use the BPS N d j L ,j R invariants listed in [72].

A.2 An explicit computation
In this section we use the computation of [41] to check explicitly the modular transformations (4.15). We consider the example of local P 2 . In this case there is one single complex moduli z = κ −3 and the operators in (2.14) read By using the transformation of the classical periods (2.4) together with the relation found in [41] (z∂ z ) 2 ∂F 0 = τ (z∂ z ) 2 (0) + ∂ 3 F 0 (z∂ z (0) ) 2 , (A.12) we get However in (4.15) we have that (1) → C ∂F NS 1 + (1) τ + D (1) . (A.14) For the local P 2 geometry it is easy to check that where the expressions for F 0 , F NS 1 , are given in appendix A. Therefore the transformation (A.14) derived by using diagrammatic rules matches precisely the one obtained by explicit computation.