From Quantum Curves to Topological String Partition Functions

This paper describes the reconstruction of the topological string partition function for certain local Calabi–Yau (CY) manifolds from the quantum curve, an ordinary differential equation obtained by quantising their defining equations. Quantum curves are characterised as solutions to a Riemann–Hilbert problem. The isomonodromic tau-functions associated to these Riemann–Hilbert problems admit a family of natural normalisations labelled by the chambers in the extended Kähler moduli space of the local CY under consideration. The corresponding isomonodromic tau-functions admit a series expansion of generalised theta series type from which one can extract the topological string partition functions for each chamber.


Introduction
Topological string theory on Calabi-Yau (CY) manifolds is a subject which has attracted considerable interest both from theoretical physics and from mathematics. From the point of view of physics, it can provide non-perturbative information on various string compactifications with possible applications to supersymmetric field theories and black hole physics. The subject is mathematically related to various curve counting invariants and to the phenomenon of mirror symmetry. A very fruitful interplay between mathematics and physics on this subject has emerged, with duality conjectures motivated by arguments from theoretical physics suggesting profound and unexpected relations between different parts of mathematics, and mathematical research providing the groundwork for making the ideas from physics sufficiently precise for extracting the relevant predictions, and understanding the theoretical foundations.
A key object in topological string theory is the topological string partition function. String theory dualities suggest that it has dual interpretations as generating function of the enumerative invariants associated with the names Gromov-Witten, Donaldson-Thomas and Gopakumar-Vafa. These interpretations do not easily lead to a conceptual characterisation of the topological partition functions as mathematical objects of their own right, as the relevant generating functions are without further input only defined in the sense of formal series. Various alternative characterisations have been proposed, including matrix models, topological recursion, Chern-Simons theory and the quantisation of the moduli spaces of geometric structures of the relevant families of CY manifolds.
These approaches all have their virtues and drawbacks, as usual, and it seems to us that there is still room for an improvement of our understanding of the topological partition functions as a mathematical object of its own right. Our paper is an attempt to improve our understanding of the topological string partition functions for a certain class of local CY manifolds. The manifolds of our interest can be locally described by equations of the form uv − R(x, y) = 0, (1.1) The approach taken here is inspired by previous work of many authors including [N, OP, LMN, NO, ADKMV], indicating a deep interplay between topological string partition functions, free fermions on algebraic curves, and the theory of classically integrable hierarchies. Our approach can be seen in particular as a concrete realisation of some ideas discussed in [ADKMV] suggesting that a non-commutative deformation of the curve Σ, often referred to as "quantum curve", can be used to characterise the topological string partition functions. It seems to us, however, that these ideas have not been realised concretely for the local CY of class Σ yet. We will here offer a precise definition of the quantum curves for the cases of our interest, and explain how the quantum curve can be used to define the topological string partition functions.
Another source of inspiration for us were the works [DHSV, DHS] where it has been argued on the basis of string dualities that there exists a dual description for the topological string in terms of a system of D4 and D6 branes intersecting along the surface Σ. This leads to the prediction that the topological string partition function can be extracted from the partition function of free fermions on Σ. Having a nonzero value of the topological string coupling λ corresponds to turning on a B-field on the D6-branes. The effect of the B-field can be described in terms of a non-commutative deformation of Σ. In [DHS] it has been proposed that in the case of local CY of class Σ it is possible to describe the relevant deformation of Σ by a differential equation, or equivalently a D-module, on the underlying base curve C. A generalisation of the Krichever correspondence [Kr77a,Kr77b] is proposed in [DHS] leading to a construction of the relevant free fermion partition as Fredholm determinants of certain operators build from the solutions of the differential equation defining the quantum curve. This proposal can lead to an elegant mathematical characterisation of the topological string partition function whenever one knows how to define the partition functions of free fermionic field theories on the relevant non-commutative surfaces, and how exactly to extract the topological string partition functions from these objects. The program suggested in [DHSV, DHS] has been realised in some basic examples. Our goal here is to realise it in a case that is sufficiently rich to indicate what needs to be done to generalise this approach to much wider classes of cases.
We will observe that two main issues that need to be addressed. It will, on the one hand, be crucial in our approach to allow certain quantum corrections to the equation of the quantum curve, represented by terms of higher order in λ. The quantum corrections turn out to be determined by the integrable structures of the problem. We will furthermore observe that the issue of normalisation of the solutions plays a crucial role: Different normalisations for the solutions yield different partition functions. It turns out that there exist distinguished choices of normalisation which are mathematically very natural, and are found to define partition functions which coincide with the results of topological vertex calculations. The impatient reader may jump to Section 10.1 or the overview in Section 1.1 for slightly more precise summaries of our results.
In the context of Donaldson-Thomas theory for toric CY there is an interesting approach to the emergence of the quantum curve [O09], revealing the origin of the integrable structures of the topological string [OR]. Our goals are different. We use the quantum curve as a key ingredient in a precise description of the topological string partition functions as analytic objects. The results can be described as products of certain Fredholm determinants with explicit meromorphic functions. Other approaches to the reconstruction of the topological string partition functions from the quantum curve have been proposed in [ACDKV, GS, GHM, MS] 1 .
The precise relation between free fermion partition functions and topological string partition functions established in this paper can be seen as a prediction of the duality conjectures used in [DHSV, DHS]. From a mathematical point of view one may find this relation quite nonobvious. One may, in particular, regard our results as a rather non-trivial quantitative check of the string duality conjectures predicting such relations. We'd ultimately hope that learning to define the topological string partition function non-perturbatively may provide the groundwork for a mathematical understanding of various string dualities.

Overview
Our goal is to define and calculate the topological string partition functions for the families Y z,u of local CY, vw − R(x, y) = 0, (1.2) where Σ = Σ z,u is the double cover of a Riemann surface C defined by the equation R(x, y) = 0, where R(x, y) = q(x) − y 2 , q(x) being a quadratic differential on C. This will be fully worked out in the case C = C 0,4 , which is prototypical enough to suggest a conjecture for the case of general C. For C = C 0,4 one has The solution will be described in the following steps.
• Section 2: Review of the discussion in [DHSV]: String dualities predict that there exists a theory of free fermions on a non-commutative deformation of Σ z,u governed by a parameter λ allowing one to define a free fermionic partition function Z ff (σ, z; λ) related to the topological string partition functions by an expansion of the form Z ff (σ, τ ; z; λ) = n∈Z e inτ Z top (σ + n; z; λ), (1.4) with λ being identified with the topological string coupling in Z top (σ; z; λ). Validity of (1.4) would imply that Z top (σ; z; λ) can be computed from Z ff (σ, τ ; z; λ).
• Section 3: We summarise the relevant features of the geometry of the family Y z,u of local CY, and of their mirror manifolds X z,u which can be described as certain limits of a family of toric CY. The extended Kähler moduli space of the relevant toric CY can be decomposed into chambers C α defined by positivity of the real parts of the Kähler parameters. Vanishing of these real parts defines the walls separating the chambers. The passage through walls separating adjacent chambers is described by flop transitions.
• Section 4: We introduce the differential equations defining the quantum curves. A new feature is the occurrence of certain quantum corrections. We explain how these quantum corrections are determined by the integrable structures of this problem, the Hitchin integrable system, and its "deformation" to the isomonodromic deformation problem.
• Section 5: We argue that the free fermion partition function Z ff is proportional to the isomonodromic tau-function T (µ; z) for the case at hand, a function of the monodromy data µ specifying the relevant D-modules via the Riemann-Hilbert correspondence, and the complex structure parameter z for the family of base curves C = C 0,4 playing the role of the deformation parameter in our case. We thereby arrive at the proposal that there exists a function N (µ) of the monodromy data such that Z ff (σ, τ ; z; λ) = N (µ)T (µ(σ, τ ); z), (1.5) assuming that (σ, τ ) are coordinates µ = µ(σ, τ ) for the space M = M flat (C 0,4 ) of monodromy data. The tau-functions T (µ; z) depend on λ through the D-module defining them.
• Section 6: Representing C 0,4 by gluing two three holed spheres leads to a factorisation of the relevant Riemann-Hilbert problem, on the one hand defining natural parameters (σ, τ ) for the monodromy data µ(σ, τ ), and on the other hand leading to expansions of the form T (σ, τ ; z) = n∈Z e inτ T n (σ; z). (1.6) The coordinates (σ, τ ) are uniquely defined only after choosing the normalisations for the solutions of the Riemann-Hilbert problems on the subsurfaces from which C 0,4 is constructed. Changing the normalisations changes both the coordinate τ and the coefficients T n (σ; z) in (1.6).
• Section 7: The exists a rather small family of choices for the coordinate τ where the expansion coefficients T n (σ; z) in (1.6) take the form T n (σ; z) = 1 N (σ) G(σ + n; z). (1.7) In these cases one may choose the function N (µ) in such a way that the partition function Z ff (σ, τ ; z) = N (σ)T (σ, τ ; z) has an expansion of generalised theta-series type, Z ff (σ, τ ; z) = n∈Z e inτ G(σ + n; z) ; (1.8) The coordinates (σ, τ ) corresponding to these normalisation choices are called FN-type coordinates, relatives of the Fenchel-Nielsen coordinates which are particular Darboux coordinates for M.
• Section 8: We revisit the calculation of the topological string partition functions with the help of the topological vertex formalism. It is observed that the result is not invariant under flop transitions, as has previously been claimed in the literature. Instead we will find simple rules relating the topological string partition functions Z α top (σ; z) associated to different chambers C α . For some, but not all possible choices of τ ≡ τ α we find a match Z α top (σ; z) = G Nα (σ; z), with G Nα (σ; z) defined by replacing τ by τ α in (1.6)-(1.8).
• Section 9: A subset of the coordinate systems giving theta series expansions (1.8) can be defined by a procedure called Abelianisation in [HN]. Their definition depends on a graph called FN-network on C which depends on the choice of quadratic differential q(x).
We observe that to each chamber C R,α in the extended Kähler moduli space introduced in Section 4 there corresponds a topological type of FN-network. For each chamber C R,α one gets a system of coordinates (σ, τ α ) from abelianisation, a corresponding normalisation factor N α (σ) from (1.6), (1.7), and thereby a function G Nα (σ; z) via (1.8). We find that Z α top (σ; z) = G Nα (σ; z).
(1.9) This is our main result. It proves that (1.4) is true for the case studied here.
• Section 10: After presenting a concise summary of our results we present two observations which shed further light on the role of integrable structures in the context.

Predictions from string dualities
We start with a review of predictions of [DHSV], [DHS]: The Fourier-Transformation of topological string partition function is a free fermion partition function on a non-commutative deformation of spectral curve which is called the quantum curve.
In [DHSV] it was argued that the list of dual representations of the topological string partition functions includes the so-called I-brane system, a system of D6-branes and D4-branes intersecting along a two-dimensional surface Σ. The topological string coupling constant λ gets mapped to the parameter of a constant B-field on the D-branes. The topological string partition functions get related to the partition functions of free fermion systems on a non-commutative deformation of Σ, where the fermions represent the open strings between D4-and D6-branes, and λ is the parameter controlling the non-commutative deformation. The rest of this section will present a very brief review of some of the results of [DHSV, DHS].
A chain of dualities was proposed in [DHSV] relating the following three string theories: i) I-brane: Type IIA string theory on R 3 × B × R 2 × S 1 with B being C × C with coordinates (u, v), in the presence of a D6-brane on B × R 2 × S 1 , and a D4-brane on R 3 × Σ, Σ being the curve in B defined by the equation R(u, v) = 0.
ii) Geometric: Type IIB string theory on and T N is the Taub-NUT space.
iii) D-branes: Type IIA string theory on R 3 ×S 1 ×X, where X is the mirror of the Calabi-Yau Y manifold in ii), with a D6-brane wrapping S 1 × X.
The partition function in the duality frame associated to ii) above is the usual partition function of topological string B-model on the Calabi-Yau Y . The duality between backgrounds ii) and iii) above is related to the conjectures in [MNOP, INOV] which can be motivated from string duality conjectures [Ka, DVV]. It implies the relation where Z DT (t; λ) is the partition function naturally associated to the duality frame iii) above, with t ∈ H 2 (x) being the complexified Kähler class related to the complex structure moduli u of Y by the mirror map. Z DT (t; λ) can be mathematically defined as the generating function of Donaldson-Thomas invariants counting bound states of D-branes in the D0-D2-D6-system, The partition function Z DT (t; λ) is closely related to the partition function of the D0-D2-D4-D6-system, naturally defined as where the summation is over all allowed values of p, d , n . The new variable ξ is a chemical potential for the number p of D4-branes. The relation between Z DT (t; λ) and Z DT (ξ, t; λ) follows from the observation made in [DHSV] that the presence of p additional D4-branes will not modify the BPS-degeneracies, in the sense that with charges n and d of the D0 and D2-branes in the presence of the D4-branes related to the corresponding charges n and d in the absence of D4 branes according to n → n (n, d, p) = n + dp + 1 6 p 3 + 1 24 pc 2 .
It is furthermore argued in [DHSV] that only the massless fermionic strings between D4 and D6-brane contribute to the partition function, identifying Z I (ξ, t; λ) with the partition function Z ff (ξ, t; λ) of a two-dimensional system of chiral free fermions supported on Σ. The dualities relate λ to a B-field on the I-brane system, inducing a non-commutative deformation of Σ.
This line of thought seems to offer a potentially very powerful approach to a fairly general characterisation of the topological string partition functions for local CY in terms of free fermions on a quantum deformation of a covering Σ → C. It was furthermore argued in [DHSV, DHS] that the quantum deformation of Σ can be described in terms of certain D-modules on C. In the following we will see, however, that some important additional ingredients are needed in order to turn these ideas into a general and sufficiently precise way to characterise the topological string partition functions mathematically.
Remark 1. Considering purely imaginary ξ one may regard (2.6) as a Fourier-series. However, the form of the coefficients in (2.6) is by no means generic, the arguments of Z top (t, λ) being shifted by lattice translations. The requirement that Z I (ξ, t; λ) should admit expansions of this form will turn out to constrain these functions very severely. We will in the following refer to series of the form (2.6) as generalised theta series. This terminology can be motivated in two ways. Weighted sums over functions with arguments shifted by lattice translations are sometimes called theta series in the mathematical literature. We will show, on the other hand, that ordinary theta functions can be recovered from Z I (ξ, t; λ) in the limit λ → 0. We may therefore regard the partition functions Z I (ξ, t; λ) as deformations of ordinary theta functions.

A family of local CY
In this section we will discuss the relevant geometric features of the families of local CYmanifolds studied in the paper. As algebraic varieties one may define the manifolds Y by equations of the form vw − R(x, y) = 0, where R(x, y) is a polynomial in two variables. Important geometric features of Y are encoded in the curve Σ defined by the equation R(x, y) = 0. Families of curves Σ define families Y ≡ Y Σ of local CY via (3.1).

Curves
We will mainly focus our attention on the family Y u,z ≡ Y Σu,z of local CY associated to the family of curves Σ u,z defined as with κ = a 2 1 + a 2 2 + a 2 3 − a 2 4 . It has a complex two-dimensional moduli space parameterised by the complex variables z and u. We will see below that the defining equation for Σ u,z can be brought into the form R(x, v) = 0 with a polynomial R(x, v) by a change of coordinates v = v(x, y). The curve Σ u,z is a two-fold covering of the four-punctured sphere C z ≡ C 0,4 = P 1 \ {0, z, 1, ∞}. The variable u determines how Σ covers the base curve C z , in particular the positions of the four branch points.
The description simplifies in a useful way in the limit z → 0 corresponding to a degeneration of the base curve C z . Let γ s be the cycle on C z that is pinched when z → 0, and letγ s be a lift of γ s to Σ u,z which is odd under the involution exchanging the sheets. We will be interested in degenerations keeping the period of the canonical differential ydx alongγ s finite for z → 0. This will be the case if we consider families (z, u z ) such that u z = 1 z (a 2 − a 2 1 − a 2 2 ), with a ∈ C finite. Indeed, setting u = 1 z (a 2 − a 2 1 − a 2 2 ) in (3.2), it is straightforward to see that the region on Σ u,z with x = O(1) for z → 0 can be approximately represented by the branched cover Σ out of C 0,3 = P 1 \ {0, 1, ∞} defined by the equation 3) is easy to see that the integral γs ydx is proportional to a, as required.
The region in Σ u,z with x = tz, with t finite when z → 0, may be represented as another branched cover Σ in of C 0,3 , defined by We see that Σ u,z degenerates into the union of Σ out and Σ in for z → 0. The parameter a determining the behaviour of the parameter u in the degeneration of Σ u,z is found to describe the singular behaviour at the points of Σ out and Σ in corresponding to the double point on Σ u,z arising in the degeneration. Figure 1: The toric graph of the mirror X R;U,z to the local CY Y R;U,z .

Four-dimensional limit and local mirror symmetry
It will later be useful to recall that the family of curves Σ u,z can be represented as the limit R → 0 of a certain family of curves Σ R;U,z in C * × C * related by mirror symmetry to the family of toric Calabi-Yau manifolds 2 having the toric graph depicted in Figure 1. The Kähler parameters t 1 , . . . , t 4 , t F , t B of the toric Calabi-Yau manifolds will be parameterised through the variables Q i = e −t i , i = 1, . . . , 4, Q F = e −t F , Q B = e −t B assigned to the edges of the toric graph in Figure 1.
We will consider a certain scaling limit of the Kähler parameters which has been used for the geometric engineering [KKV, KMV] of the four-dimensional, N = 2 supersymmetric gauge theory with gauge group SU (2) and four flavors within string theory, see e.g. [HIV] for a review discussing this case. The relevant limit, in the following referred to as four-dimensional (4d) limit, is most easily defined by parameterising the Kähler parameters t 1 , . . . , t 4 , t F , t B as and sending R → 0. To simplify the exposition we will assume that m i ∈ R for i = 1, . . . , 4. In (3.5) we are anticipating a parameterisation which will turn out to be useful later. It is based on the fact that the Kähler parameter associated to an edge with equation rx + sv = c and length l is simply given as l/ √ r 2 + s 2 . Applying this rule to the toric graph in Figure 1 gives a direct relation between the parameters m i ∈ R, i = 1, . . . , 4, in (3.5) and the values of the coordinate v of the corresponding horizontal external edges indicated in Figure 1.
Local mirror symmetry [CKYZ] relates this family of toric CY to a family of local CY denoted by Σ R;U,z . Based on the duality with brane constructions it has been argued in [BPTY] 3 that the curves Σ R;U,z can be defined by the equations We are using the notation M = M 1 M 2 M 3 M 4 . Considering fixed values for M 1 , . . . , M 4 , we will regard the two variables z and U as parameters for the family of curves Σ R;U,z . The parameters M 1 , . . . , M 4 , U, z of the curve defined by the equation (3.6) are related to the Kähler parameters by the mirror map, expressing t 1 , . . . , t 4 , t F , t B as periods of the canonical one-form along a suitable set of cycles. The rules of local mirror symmetry imply a simple relation between the parameters M 1 , . . . , M 4 in (3.6) and the parameters m 1 , . . . , m 4 introduced via (3.5), M i = e −Rm i for i = 1, . . . , 4. Indeed, it is easy to see that x → ∞ implies that the coordinate v = − 1 R log(w) must approach one of the values v = m 1 or v = m 2 , and similarly for x → 0. The relation between the parameters U, z in (3.6) and the parameters t B , t F = 2Ra is more complicated. There exists cycles γ B and γ F on Σ R;U,z allowing us to represent the parameters t B and t F as the periods t B = γ B λ and t F = γ F λ, respectively.
As discussed in detail in Appendix B of [BPTY], taking the limit R → 0 of the equation (3.6) with w being of the form w = e −Rv yields the following equation with parameter h being related to the higher order terms in the expansion of U in powers of R. This curve can be identified with the curve defined in (3.2) by the change of coordinates withm = m 1 + m 2 + m 3 + m 4 , bringing the equation for the curve to the form This is easily recognised as the curve (3.2), assuming a certain relation between h and u that won't be needed in the following.

Extended Kähler moduli space
It will be important for us to notice that only a part of the moduli space of the complex structures of Σ R;U,z is covered by the mirror duals of the toric CY having toric graph depicted in Figure 1.
To cover the full moduli space of complex structures one will need other toric CY, related to the one considered above by flop transitions. We may introduce an extended Kähler moduli space which can be described as a collection of chambers representing the Kähler moduli spaces of all toric CY having a mirror dual of the same topological type, joined along walls associated to flop transitions.
Our next goal is to describe the chamber structure of the extended Kähler moduli space in the case R → 0 of our main interest. It is instructive to first analyse the situation in the limit z → 0 where Σ u,z can be described as the union of Σ out and Σ in . The curves Σ in and Σ out are determined by the parameters a 2 , a 2 i , i = 1, . . . , 4. We get an unambiguous parameterisation assuming Re(a) ≥ 0 and Re(a i ) ≥ 0, i = 1, . . . , 4. The equation for Σ in can be written as with D(a) = (a + a 1 + a 2 )(a − a 1 − a 2 )(a + a 1 − a 2 )(a − a 1 + a 2 ). (3.13) In the case a 1 > a 2 we see that there exist three chambers, The boundaries of the chambers correspond to zeros of D(a). Vanishing of D(a) implies that the two branch points of the covering Σ in → C 0,3 coalesce. We may note, on the other hand, that it follows from (3.5) and (3.11) that Vanishing of D is therefore equivalent to the vanishing of a Kähler parameter. The case where Re(t i ) > 0 for i = 1, 2 corresponds to the chamber C in 1 . A similar decomposition into chambers can be introduced for the parameter space of Σ out . Taken together we arrive at a decomposition of the extended Kähler moduli space of Σ u,z for Figure 2: Representation of the flop transition on a subgraph of a toric graph.
z → 0 into nine chambers denoted C i,j , with i = 1, 2, 3 labelling the chambers of Σ out , and j = 1, 2, 3 labelling the chambers of Σ in .
The resulting qualitative picture can be expected to hold more generally at least in some neighbourhood of the boundary component corresponding to the degeneration z → 0. The Kähler parameters t i , i = 1, . . . , 4 can be represented as periods of the canonical one-forms along cycles surrounding suitable pairs of branch points. Coalescence of the branch points implies vanishing of the corresponding periods. When one of the periods corresponding to a Kähler parameter t i becomes negative, one can no longer represent the mirror of the curves Σ R;U,z as the toric CY having the graph in Figure 1. The mirror of Σ R;U,z may instead be represented by another toric graph obtained from the one in Figure 1 by the local modification depicted in Figure 2. This transition is often referred to as a flop. In Figure 2 we have also indicated the choice of Kähler parameters on the toric graph related to the original one by a flop. For the case at hand it is easy to verify that the rule indicated in Figure 2 is necessary to preserve the values of m i in Figure 1.
At least in the case where z is sufficiently small, we expect to get all relevant toric graphs by applying flops to the toric CY having the toric graph depicted in Figure 1.

Quantum curves, D-modules and integrability
One of the main ideas in [DHSV, DHS] is to regard the relevant free fermion partition functions as deformations of the chiral free fermion partition functions on the curves Σ generated by turning on a B-field proportional to λ on the D6-branes. The deformation induces a noncommutativity of the coordinates (x, y), turning the curves Σ into objects called a quantum curves described by certain ordinary differential equations. We are later going to formulate a precise proposal how to associate a free fermion partition function to a quantum curve. In this section we will explain what a quantum curve is, and why it is natural to allow for quantum corrections in the definition of the quantum curve represented by terms of higher order in λ.
In Subsection 4.1 below we will observe that the limit λ → 0 has a natural relation to the Hitchin integrable system. The relevant quantum corrections are basically determined by the requirement to have a consistent deformation of the integrable structure that is present at λ = 0, which will be briefly reviewed in 4.1. A general discussion of the differential equations representing the non-commutative deformation of Σ is given in Section 4.2. It is then observed that the moduli space of holomorphic connections on C is a natural one-parameter deformation of the Hitchin system. The moduli space of flat holomorphic connections has an equivalent representation as the moduli space of the second order differential operators representing the quantum curves if one allows quantum corrections in the quantum curve related to apparent singularities. The integrable flows of the Hitchin system get "deformed" into the isomonodromic deformation flows. These flows can be represented as motions of the positions of apparent singularities, which is how the λ-deformed integrable structure of the Hitchin system is represented by quantum corrected quantum curves.
To simplify the exposition we will mostly restrict to the case of surfaces C of genus 0 from now on. It is, however, not hard to generalise the following discussion to more general cases.

Relation to the Hitchin system
To motivate our proposal let us revisit the case λ = 0, recalling that the chiral free fermion partition functions on Σ can be represented as theta functions [AMV], schematically Z Σ (ϑ, u) = n e i n·ϑ e i 2 n·τ Σ (u)·n e F 1 (u) . (4.1) The tuples of integers n represent the fermion fluxes through cycles of Σ, and τ Σ (u) is the period matrix of Σ ≡ Σ u . The variables ϑ in (4.1) are naturally interpreted as coordinates on the Jacobian of Σ parameterising degree zero line bundles L on Σ. The free fermion partition function Z Σ (ϑ, u) is thereby recognised as a function of the pair of data (Σ, L). It provides a local description of a section of a holomorphic line bundle on the Jacobian fibration over the base manifold B with coordinates u parameterising the complex structures of Σ.
Such Jacobian fibrations naturally arise in the theory of Hitchin systems [Hi] studying Higgs pairs (E, ϕ) consisting of a holomorphic bundle E and an element ϕ ∈ H 0 (C, End(E) ⊗ K C ) modulo gauge transformations. The integrability of the Hitchin system is realised through the one-to-one correspondence between Higgs pairs and pairs (Σ, L), where Σ is the spectral curve, and L is the line bundle on Σ of degree zero having fibres which can be identified with the one-dimensional space spanned by an eigenvector of ϕ. Conversely, given a pair (Σ, L), where Σ ⊂ T * C is a double cover of C, and L a holomorphic line bundle on Σ, one can recover (E, ϕ) via (E, ϕ) = (π * (L), π * (y)), where π is the covering map Σ → C, and π * is the direct image.
To make this construction more explicit, let us consider the case of holomorphic SL(2)-bundles E, and introduce a suitably normalised eigenvector Φ(x) of ϕ(x) called Baker-Akhiezer function. It can locally be represented as where y = y(x) is the eigenvalue satisfying y 2 = q(x), q(x) = ϕ 2 0 +ϕ + ϕ − . The Baker-Akhiezer function Φ(x) defined in this way has zeros at the pointsx k projecting to a zero x k of ϕ − where furthermore ϕ 0 = y, and poles atx k = σ(x k ), with σ being the sheet involution. The divisor To further simplify the exposition let us now restrict attention to the case where the surface C has genus zero g = 0 with n punctures at z 1 , . . . , z n . The Hitchin system will then coincide with the Gaudin model. The quadratic differential q(x) defining the curve Σ then has the form Fix a canonical basis {α 1 , . . . , α n−3 , β 1 , . . . , β n−3 } for H 1 (Σ). The periods of ydx along α k , k = 1, . . . , n − 3, give local coordinates a k for B. The Abel-map of the divisor D, with {ω l ; l = 1, . . . , n − 3} being a basis for H 1 (Σ, K) such that α k ω l = δ kl , and γ in (4.5) being a one-dimensional chain 4 such that ∂γ = D, provides coordinates on the Jacobian parameterising the choices of the line bundle L. The coordinates (a, ϑ), a = (a 1 , . . . , a n−3 ), ϑ = (ϑ 1 , . . . , ϑ n−3 ) are action-angle coordinates for the Hitchin system. There is a locally defined function F(a) allowing to express the periods a D k along the dual cycles β k as a D k = ∂ ∂a k F(a). The period matrix τ Σ is obtained from F as τ Σ kl = ∂ 2 ∂a k ∂a l F(a). Another useful description of the integrable structure of the Hitchin system uses the pairs (x k , y k ), with y k = y(x k ) for k = 1, . . . , n − 3 as basic coordinate functions. This description, often referred to as the Separation of Variables (SoV) representation 5 , represents the phase space as the symmetric product (T * C) [n−3] with Darboux coordinates (x k , y k ), k = 1, . . . , n−3.
It is worth noting that such Jacobian fibrations arise very naturally in the context of local CY of the type considered in this paper. For the case of compact base curves C it has been shown in [DDDHP, DDP] that the corresponding Jacobian fibrations are isomorphic to the intermediate Jacobian fibrations of the associated family Y Σ of local CY.

From quantum curves to D-modules
In [DHSV, DHS] it is argued that turning on a B-field on the D6-branes induces a noncommutative deformation of the algebra of functions on Σ described in terms of the coordinates (x, y) by the commutation relations [x, y] = iλ. The deformed algebra of functions can naturally be identified with the Weyl algebra of differential operators with generators x and −iλ∂ x . It seems natural to describe the resulting deformation of the curve Σ with the help of a deformed version of the equation y 2 − q(x) = 0 defining Σ which is obtained by replacing y by −iλ∂ x . The equation of the curve gets replaced by the differential equation A useful framework for making these ideas precise is provided by the theory of D-modules.

D-modules, differential equations and flat connections
We will now introduce the basic notions of the theory of D-modules, and later explain why it is consistent with the point of view of [DHS] to allow certain quantum corrections to the quantum curve obtained by canonical quantisation of the equation for the classical curve Σ u,z .
A D-module is a sheaf of left modules over the sheaf D V of differential operators on a smooth complex algebraic variety V . For each open subset U ⊂ V we are given a module F(U ) over D(U ), the algebra of differential operators on U . The various modules F(U ) attached to subsets U satisfy the compatibility conditions defining a sheaf.
An important class of D-modules is associated to systems of differential equations. Let G V be a sub-algebra of the algebra D V of differential operators on V , generated by commuting differential operators D i , i = 1, . . . , m. To the system of differential equations one may associate the D-module A solution Ψ of the system (4.7) defines a D-module homomorphism sending 1 ∈ ∆ G V to Ψ. Conversely, having a D-module homomorphism from ∆ G V to a sheaf F one gets a solution Ψ to (4.7) with Ψ ∈ F as the image of 1 ∈ ∆ G V . The discussion above suggests that we are looking for D-modules of this type, with G V being generated by a single differential operator D q of the form D q = λ 2 ∂ 2 x + q(x). One may note, on the other hand, that another simple type of D-module is the sheaf of sections of a complex vector bundle E on V with a holomorphic flat λ-connection ∇ λ . The connection ∇ λ , locally represented as with ϕ 0 , ϕ ± holomorphic on C, defines the action of the differential operators in D(U ) on the sections of E. The D-modules defined from pairs (E, ∇ λ ) can be regarded as a natural λ-deformation of the Higgs pairs (E, ϕ).
Within the moduli space M flat (C) of pairs (E, ∇ λ ) there is a half-dimensional subspace represented by λ-connections which are gauge equivalent to λ-connections of the form.
Flat connections of this form are called opers. The horizontality condition ∇ Op Looking for a deformed version of the free fermion partition function associated to quantum curves one may note that the D-modules defined by opers only depend on half as many variables as the function Z Σ (ϑ, u) does. The D-modules associated to pairs (E, ∇ λ ), on the other hand, depend on just the right number of variables.

Opers with apparent singularities
We are now going to observe that allowing certain quantum corrections in the defining equations produces quantum curves in a natural one-to-one correspondence to flat connections. To this aim we will use the fact that any holomorphic connection is gauge equivalent to an oper connection away from certain singularities of a very particular type which may occur at a collection of points x k ∈ C 0,n , k = 1, . . . , d. Given a λ-connection of the form ∇ λ = λ∂ x + ϕ 0 ϕ + ϕ − −ϕ 0 it can be shown by an elementary calculation that ∇ λ can be brought to oper form λ∂ x + 0 q λ 1 0 by means of a gauge transformation h, which is well-defined on a cover of C branched at the zeros The resulting formula for the matrix element q λ is found to be of the form (4.12) Assuming that ∇ λ is holomorphic on C 0,n , it follows from (4.11) that the monodromy of ∇ Op around the points x k is proportional to the identity matrix and therefore trivial in PSL(2, C).
Singularities having this property are called apparent singularities. Having an apparent singularity at x = x k is equivalent to the fact that the parameters (x k , y k ) introduced in (4.12) satisfy the equations (4.13) Taking into account the constraints (4.13) and the constraints from regularity at infinity it is not hard to see that for fixed a r , r = 1, . . . , n, in (4.12) one gets a family of quadratic differentials q λ on C depending on 2(n − 3) independent parameters.
Conversely, if the constraints (4.13) are satisfied, and if d ≤ n − 3, there exists a unique gauge transformation h holomorphic on a double cover of C 0,n \ {x 1 , . . . , x d } with branch points only at x 1 , . . . , x d such that the connection ∇ λ defined from ∇ Op = λ∂ x + 0 q λ 1 0 by means of (4.11) is holomorphic on C 0,n with first order poles only at x = z r . Indeed, by defining and using these functions to build we find that the connection ∇ is holomorphic on C 0,n .
Allowing quantum corrections to the quantum curve represented by apparent singularities therefore gives us a way to represent all the data characterising a gauge equivalence class of holomorphic connections in terms of meromorphic opers. The equivalence between flat sl 2 -connections ∇ λ on C 0,n and opers ∇ Op observed above can be seen as a deformation of the Separation of Variables (SOV) for the classical Gaudin model [Sk, DM] with deformation parameter λ. Comparing with (4.3) we see that the positions (x 1 , . . . , x d ) of the apparent singularities are directly related to the divisor D characterising the line bundle L in the limit λ → 0.

Isomonodromic deformations
We are now going to observe that the deformation of the Higgs pairs (E, ϕ) into λ-connections leads to a natural deformation of the integrable flows of the Hitchin system, given by the isomonodromic deformation flows. It will turn out that this integrable structure controls how the free fermion partition function gets deformed when λ is non-zero.

Riemann-Hilbert correspondence
The Riemann-Hilbert correspondence assigns holomorphic connections to representations ρ : π 1 (C) → G of the fundamental group π 1 (C) in a group G, here taken to be G = SL(2, C).
Considering curves C of genus 0 with a base point x 0 one may characterise the representations ρ by the matrices M r representing closed curves γ r around the punctures z r . We will consider the cases where the matrices M r are diagonalizable, M r = C −1 r e 2πiDr C r , for a fixed choice of diagonal matrices D r . The Riemann-Hilbert problem is to find a multivalued analytic matrix function Ψ(x) on C 0,n such that the monodromy along γ r is represented by (4.16) The solution to this problem is unique up to left multiplication with single valued matrix functions. In order to fix this ambiguity we need to specify the singular behaviour of Ψ(x) at x = z r , leading to the following refined version of the Riemann-Hilbert problem: Find a matrix function Ψ(x) such that the following conditions are satisfied.
i) Ψ(x) is a multivalued, analytic and invertible on C 0,n , and satisfies a normalisation condition.
ii) There exist neighborhoods of z k , k = 1, . . . , n where Ψ(x) can be represented as withŶ (k) (x) holomorphic and invertible at x = z k , C k ∈ G, and D k being diagonal matrices for k = 1, . . . , n.
A standard choice of a normalisation condition is to require that Ψ(x 0 ) = 1 at a fixed point x 0 ∈ C. Other options are to fix the matrixŶ (k) (z k ) appearing in (4.17) for one particular value of k. If such a function Ψ(x) exists, it is uniquely determined by the monodromy data C = (C 1 , . . . , C n ) and the diagonal matrices D = (D 1 , . . . , D n ). It is known that the solution to the Riemann-Hilbert problem exists for generic representations ρ : π 1 (C 0,n ) → G.

Isomonodromic deformations
We shall now briefly indicate how the Riemann-Hilbert problem is related to the isomonodromic deformation problem. Given a solution Ψ(x) = Ψ(x; µ, z) to the Riemann-Hilbert problem we may define a connection A(x) as It follows from ii) that A(x) is a rational function of x which has the form A variation of the position of the punctures z for fixed monodromy data µ leads to a variation of the matrix residues A r . It is not hard to show (see e.g. [BBT]) that the resulting variations are described by a nonlinear first order system of partial differential equations called the Schlesinger equations. Variations of the positions z r will not change the monodromies of the connection A(y) provided that the matrix residues A k = A k (z) satisfy the following equations, (4.20) In the limit x 0 → ∞ one finds the Schlesinger equations The Schlesinger equations are nonlinear partial differential equations for the matrices A r . In special cases n = 4 it is known that one may reduce these equations to the Painlevé VI-equation.
The Schlesinger equations represent Hamiltonian flows generated by the Hamiltonians using the Poisson structure where P denotes the permutation matrix.

Garnier system
With the help of the equivalence between holomorphic connections and meromorphic opers one may describe the isomonodromic deformation flows as the flows describing isomonodromic deformations of the second order differential operator D q λ . It is worth noting that (i) the Hamiltonians H r generating the isomonodromic deformation flows are related to the residues H r in (4.12) by the transformation from holomorphic connections to opers with apparent singularities, (ii) the equations (4.13) are a system of linear equations for the residues H r in (4.12) which can be solved explicitly to get H r ≡ H r (x, y; λ), x = (x 1 , . . . , x n−3 ), y = (y 1 , . . . , y n−3 ), (iii) the isomonodromic deformation equations can then be represented in Hamiltonian form as (iv) the coordinates (x, y) are Darboux coordinates for the Poisson structure (4.23), as equations (4.24) suggest.
The proof of these statements can be found in [Ok, IKSY, DM]. In this form it becomes easy to see that the isomonodromic deformation flows turn into flows of the Hitchin integrable system for λ → 0, with (x, y) being the variables in the SOV representation [DM]. One may recall, in particular, that the variables x k defining the divisor D are nothing but the zeros of ϕ − (x), and note that the functions H r (x, y; λ) turn into the Hamiltonians of the Hitchin system for λ → 0.

Isomonodromic tau-function
Out of the matrix residues A r one may construct The isomonodromic tau-function T (µ, z) is then defined as the generating function for the Hamiltonians H r , It can be shown that the integrability of (4.26) is a direct consequence of the Schlesinger equations. Equation (4.26) determines T (µ, z) only up to addition of a function of the monodromy data. Having fixed this freedom by suitable supplementary conditions, one may use the Schlesinger equations to determine the dependence of T (µ, z) on z via (4.25) and (4.26).
We will see in the following that the free fermion partition functions we want to associate to the D-modules representing the quantum curves can be identified with the isomonodromic tau functions coming from the Riemann-Hilbert problem characterising the relevant D-modules.

From quantum curves to free fermion partition functions
We are now going to explain how to define free fermion partition functions from the solutions of the differential equation defining the quantum curve. This construction generalises the deformed version of the Krichever construction used in [DHS]. The relation to the theory of infinite Grassmannians and of the Sato-Segal-Wilson tau-functions used in [DHS] is explained in Appendix B. The free fermion partition functions defined in this way turn out to be closely related to conformal blocks of the free fermion vertex operator algebra (VOA). The conformal Ward identities determininig the dependence of the free fermion partition functions with respect to the complex structure of C are equivalent to the equations defining the isomonodromic taufunctions. It will follow that a suitable choice of normalisation factors, which may still depend on the monodromy data characterising the equation of the quantum curve through the Riemann-Hilbert correspondence, allows us to relate the free fermion partition functions of our interest to isomonodromic tau-functions.
5.1 From D-modules to free fermion states

Free fermions
The free fermion super VOA is generated by fields ψ s (z),ψ s (z), s = 1, . . . , N , The fields ψ s (z) will be arranged into a row vector ψ(z) = (ψ 1 (z), . . . , ψ N (z)), whileψ(z) will be our notation for the column vector with componentsψ s (z). The modes of ψ(z) andψ(z), introduced as (5.27) are row and column vectors with components ψ s,n andψ s,n satisfying the commutation relations We will here consider a representation generated from a highest weight vector f 0 satisfying The Fock space F is generated from f 0 by the action of the modes ψ s,n , n < 0, andψ s,m , m ≤ 0.
We will also consider the conjugate representation F * , a right module generated from a highest weight vector f * 0 satisfying The Fock space F * is generated from f * 0 by the right action of the modes ψ s,n , n ≥ 0, andψ s,m , m > 0. A natural bilinear form F * ⊗ F → C is defined by the expectation value, where

Free fermion states from the Riemann-Hilbert correspondence
A simple and natural way to characterise a state f ≡ f G ∈ F is through the matrix G(x, y) ≡ G f (x, y) of two-point functions having matrix elements Indeed, given a function G(x, y) such that with A(x, y) having an expansion of the form there exists a state f G , unique up to normalisation, such that its two-point function is given by G(x, y). States f G having this property can be constructed as with matrices A kl defined by the expansion (5.34), and N G ∈ C being a normalisation constant. This can be verified by a straightforward computation.
We will be mainly interested in two-point functions G(x, y) that have a multi-valued analytic continuation with respect to both x and y to the Riemann surfaces C = C 0,n with given monodromies. The monodromies describing the analytic continuation in x are required to act on G(x, y) from the left, while the analytic continuation in y generates monodromies acting from the right. Consistency with having a pole at x = y with residue being the identity matrix requires This means that the family of functions G x (y) := G(x, y) is a solution to a generalisation of the Riemann-Hilbert problem formulated above where one allows a first order pole at y = x, and the family G y (x) := G(x, y) is a solution to a conjugate version of this Riemann-Hilbert problem. Uniqueness of the solution to the Riemann-Hilbert problem implies that G(x, y) must have the following form with Ψ(y) being a solution to the Riemann-Hilbert problem formulated in Section 4.3.1.
The construction of the fermionic states f G described above therefore gives us a natural way to assign fermionic states f Ψ ≡ f G Ψ to solutions Ψ of the Riemann-Hilbert problem.

Free fermion conformal blocks from D-modules
We are now offering a useful change of perspective by re-interpreting the fermionic states associated to D-modules as free fermion conformal blocks. This will allow us to use methods and ideas from conformal field theory which will be useful for the computation of tau-functions. To this aim we will show that the states f Ψ ∈ F constructed in Section 5.1.2 are characterised by a set of Ward identities defined from a solution Ψ(x) of the RH problem. Given that conformal blocks can be defined as solutions to such Ward identities 6 we are led to identify the states f Ψ ∈ F as conformal blocks for the free fermion algebra.
Let us define the following infinite-dimensional spaces of multi-valued vector functions on C 0,n : wherev and v are row and column vectors with N components, respectively, and C[P 1 \{∞}] is the space of meromorphic functions on P 1 having poles at ∞ only. The elements of the spaceW represent solutions of a generalisation of the RH problem from Section 4.3.1 where the condition of regularity at infinity has been dropped.
Let us next note that the vectors f Ψ defined in (5.35) can equivalently be characterised up to normalisation by the conditions with C being a circle separating ∞ from z 1 , . . . , z n .
Indeed, it can easily be shown that the vector f Ψ is defined uniquely up to normalisation by the identities (5.39). Let us note that the columns ofḠ l (x), l ≥ 0, and the rows of the matrix-valued functions G k (y), k > 0, defined through the expansions (5.41) generate bases for the spacesW and W associated to Ψ(x), respectively. The conditions (5.39) are equivalent to the validity of The definition of f Ψ through the identities (5.39) is analogous to the definition of Virasoro conformal blocks through the conformal Ward identities. The uniqueness of f Ψ implies that the space of conformal blocks for the free fermionic VOA is one-dimensional.

Chiral partition functions as isomonodromic tau-functions
Out of the free fermion VOA one may define a representation of the Virasoro algebra by introducing the energy-momentum tensor as ( 5.43) Conformal blocks for the free fermion VOA represent conformal blocks for the Virasoro algebra defined via (5.43). On the space of conformal blocks of the Virasoro algebra there is a canonical connection [FS] allowing us to represent the variations of a conformal block induced by variations of the complex structure of the underlying Riemann surface C 0,n in the form 7 with H r being suitable linear combinations of the modes of T (z). This connection preserves the one-dimensional space of free fermion conformal blocks due to the fact that the adjoint action of the Virasoro algebra acts geometrically on the free fermions, transforming them as half-differentials.
The operators H r generate a commutative subalgebra of the Virasoro algebra, embedded into the Lie algebra generated by fermion bilinears via (5.43). Keeping in mind the fact that only the normalisation of f Ψ was left undetermined by (5.39) one sees that the equations (5.44) together with (5.39) can be used to determine f Ψ (z) unambiguously in terms of f Ψ (z 0 ) for any given path connecting z and z 0 in M 0,n , the moduli space of complex structures on C 0,n . Using only the Ward identities one can show that 8 with H r being the isomonodromic deformation Hamiltonians defined in (4.25). This means that the isomonodromic tau-function coincides up to a function N (µ) of the monodromy data with relating the isomonodromic tau-functions to free fermion conformal blocks.
Remark 2. Starting from a Lagrangian description of the free fermions on a Riemann surface C one would naturally arrive at a description of the free fermion partition functions as determinants of Cauchy-Riemann-operators on C. Such determinants have been studied for C = C 0,n in [Pa] where it was shown that they are related to the isomonodromic tau-functions. This offers an alternative approach to the relation between free fermion partition functions and isomonodromic tau-functions expressed in (5.46).
A solution to the Riemann Hilbert problem has first been constructed using fermionic twist fields in [SMJ], and the relation to conformal field theory was previously discussed in [Mo].

Issues to be addressed
Two points should be noted at this stage: First, let us note that the Riemann-Hilbert correspondence relates the moduli space M flat (C 0,n ) of flat connections ∂ y −A(y) on C 0,n to the character variety M ch (C 0,n ) = Hom(π 1 (C 0,n ), SL(2, C))/SL(2, C). The definition above therefore defines the tau-function as a function of two types of data: The variables z specifying the complex structure of C, and the monodromy data M , represented by the matrices M r appearing in the Riemann-Hilbert problem. Picking a parameterisation M r = M r (µ), µ = (µ 1 , . . . , µ 2n−6 ), of the monodromy data M r is equivalent to introducing coordinates µ for the character variety. Doing this will allow us to represent the tau-functions as actual functions T (µ, z) depending on two types of variables. The identification of the tau-function T (µ, z) with the free fermion partition function Z ff (ξ, t; λ) must therefore involve a map between the variables (t, ξ) and the geometric data (µ, z) that needs to be determined.
Second, the definition above defines the tau-function up to multiplication with functions of the monodromy data which do not depend on z. For the time being we will call a tau-function any function T (µ, z) satisfying H r = ∂ zr log T (µ, z), r = 1, . . . , n − 3. We will later find natural ways to fix this ambiguity. Remarkably it will turn out that the choice of coordinates µ for M ch (C 0,n ) will determine natural ways for fixing the normalisation of Z ff (µ, z).

Factorising the tau-functions
The definition of the free fermion partition functions given in the previous section, elegant as it may be, is not immediately useful for computations. Recently it has been shown in [GIL, ILT] how to compute the series expansions for the isomonodromic tau-functions T (µ, z) in crossratios of the positions z r explicitly. This result has been re-derived in [GL16] by a different method which can be seen as a special case of the general relations between Riemann-Hilbert factorisation problems and tau-functions discussed in [CGL].
In this section we are going to explain how the existence of the combinatorial expansions found in the references above is naturally explained from the theory of free chiral fermions. The factorisation over a complete set of intermediate states will lead to expressions which in the case C = C 0,4 take the schematic form This will allow us to determine the precise relation between the variables σ, κ in (6.1) and certain coordinates for the moduli space M flat (C 0,4 ) of flat SL (2)-connections on C 0,4 , addressing one of the main issues formulated at the end of Section 5.

Coordinates from factorisation of Riemann-Hilbert problems
Let us first discuss how the factorisation of Riemann-Hilbert problems leads to the definition of coordinates for the space of monodromy data. Within this subsection we will specialise to the case N = 2.

Fenchel-Nielsen type coordinates
Useful sets of coordinates for M ch (C g,n ) are e.g. given by the trace functions L γ := tr ρ(γ) associated to simple closed curves γ on C g,n [Go]. Conjugacy classes of irreducible representations of π 1 (C 0,4 ) are uniquely specified by seven conjugation invariants L k = Tr M k = 2 cos 2πθ k , k = 1, . . . , 4, (6.2a) generating the algebra of invariant polynomial functions on M char (C 0,4 ). These trace functions satisfy the quartic equation For fixed choices of θ 1 , . . . , θ 4 in (6.2a) one may use equation (6.3) to describe the character variety as a cubic surface in C 3 . This surface admits a parameterisation in terms of coordinates (σ, τ ) of the form (6.5) Equation (6.3) only constrains the product C + (σ)C − (σ), leaving the freedom to trade a redefinition of κ in (6.4) for a redefinition of C + (σ) and C − (σ) which leaves C + (σ)C − (σ) unchanged. We will in the rest of this subsection discuss natural ways to fix this ambiguity. The coordinates defined in this way will be called coordinates of Fenchel-Nielsen type.

Factorising Riemann-Hilbert problems
Let us assume |z| < 1. We may represent the surfaces C 0,4 = P 1 \ {0, z, 1, ∞} by gluing two three-punctured spheres C in and C out . Let us represent both C in and C out as P 1 \ {0, 1, ∞}, and let A in = {x ∈ C in ; |1| < |x| < |z| −1 } and A out = {x ∈ C out ; |z| < |x| < 1} be annuli in C in and C out , respectively. By identifying points x in A in with points x in A out iff x = zx one recovers the Riemann surface C 0,4 from C in and C out .
Having represented the Riemann surface C 0,4 by means of the gluing construction there is an obvious way to define Riemann-Hilbert problems for C in and C out using the matrices M 1 , M 2 and M 3 , M 4 , respectively. A solution Ψ(x) to the Riemann-Hilbert problem on C 0,4 allows us to define solutions Ψ in (x) and Ψ out (x) to the corresponding Riemann-Hilbert problems on the open surfaces D in = {x ∈ C; |x| < |z| −1 } and D out = {x ∈ P 1 ; |x| > |z|} in an obvious way, setting Ψ out (x) = Ψ(x)T in on D out and Ψ in (x) = Ψ(zx)T out on D in , with T in , T out ∈ SL(2, C) being fixed matrices describing a possible change of normalisation condition in the definition of the Riemann-Hilbert problems on C in and C out . By choosing T in , T out appropriately we can get functions Ψ in (x) and Ψ out (x) both having diagonal monodromy along the boundary circles of D in and D out , respectively. The matrices T in , T out which ensure this condition can only differ by a diagonal matrix, leading to a relation of the form Ψ in (x) = Ψ out (zx)T, for x ∈ A.
Coordinates for the moduli space of flat connections M flat (C 0,4 ) can then be obtained by choosing a parameterisation for the two pairs of matrices (M 1 , M 2 ) and (M 3 , M 4 ), and using the parameter κ for the family of matrices T κ = diag(e iκ , e −iκ ) as a complementary coordinate for M flat (C 0,4 ). An equivalent representation can be obtained by trading a nontrivial choice of the matrix T for an overall conjugation of M 1 , M 2 by T . It will be convenient to consider Ψ in z,κ (x) :

Coordinates from the gluing construction
Representing C = C 0,4 by the gluing construction as described in Section 6.1.2 one needs the solutions of the Riemann-Hilbert problem for C in C 0,3 and C out C 0,3 . It is a classical result that the solutions to the Riemann-Hilbert problem on C 0,3 can be expressed through the hypergeometric function. We may, in particular, choose Ψ out as Ψ out (x) = χ + χ − χ + χ − , with for = ±1, where ν out are normalisation factors to be specified later, F (A, B, C; x) is the Gauss hypergeometric function and Ψ in , on the other hand, may be chosen as Ψ in = The well-known formulae for the monodromies of the hypergeometric function then yield, in particular, formulae for the monodromy M out . (6.8) A similar formula gives the monodromy M in 2 of Ψ in (x) around 1. Keeping in mind the set-up introduced in Section 6.1.2 it is easy to see that tr(M 2 M 3 ) gets represented as where N 0 is κ-independent, and T = diag(e iκ/2 , e −iκ/2 ). The parameters (σ, κ) introduced in this way represent coordinates for M flat (C 0,4 ) of Fenchel-Nielsen type. From equations (6.8) and (6.9) it is easy to see, in particular, that the definition of the coordinate κ is directly linked to the choice of normalisation factors ν out ± , ν in ± in the definition of Ψ out , Ψ in . Two choices appear to be particularly natural from this point of view. One may, on the one hand, choose ν out + = 1, ν in − = 1 and ν out − = (1 − 2σ) −1 , ν in + = (1 − 2σ) −1 in order to ensure that (i) the determinant of Ψ out (x) and Ψ in (x) is equal to 1, and (ii) the coefficients appearing in the series expansions of Ψ in (x) and Ψ in (x) are rational functions of σ, θ i , i = 1, . . . , 4. In that case we easily see that C ± (σ) = C ± r (σ), with (6.10) The normalisation factors ν out ± , ν in ± can alternatively be chosen such that µ − 2 µ + 3 = 1, in which case we have (sin (2πσ) sin π(σ + sθ 1 + s θ 2 ), (6.11) leading to C + (σ) = 1 and 2 sin π(σ + sθ 1 + s θ 2 )) 2 sin π(σ + sθ 3 + s θ 4 )) (6.12) It is worth noting that C ± (σ) are polynomials in L s in this parameterisation.

Factorisation of free fermion conformal blocks
We had previously observed that the free fermion state associated with the solution Ψ of the Riemann-Hilbert problem on C defines a conformal block of the free fermion vertex algebra on C. A standard construction in conformal field theory allows us to represent conformal blocks on Riemann surfaces C obtained by gluing two surfaces C in and C out in terms of the conformal blocks associated to C in and C out , respectively. Adapting this construction to our case will allow us to represent the free fermion partition functions as overlaps of the form where f out , f in are states in the free fermion Fock space defined by factorising the RH problem along a contour γ separating C into two open surfaces C out and C in as described in Section 6.1.2. The representation (6.14) for Z ff (µ, z) can be used to calculate the free fermion partition functions more explicitly.

Twisted representations
As a further preparation we will need to generalise the construction from Section 5.2 a bit. We will need twisted representations F σ of the free fermion algebra labelled by a tuple σ = (σ 1 , . . . , σ N ) where the fermions have non-trivial monodromy around z = 0, We will consider Fock space representation V p labelled by a tuple p = (p 1 , . . . , p N ) generated from vectors v p satisfying a n,s v p = 0, n > 0, for all s = 1, . . . , N , with e s being the unit vector having 1 at the s-th component, and δ ∈ R.
The direct sum of Fock spaces is a representation of the free fermion VOA generated by the fields ψ s (x) =: e iφs(x) : ,ψ s (x) =: e −iφs(x) : , (6.20) from the vector f σ ≡ v σ satisfying the usual highest weight conditions. As before we may introduce a conjugate right module F * σ . The spaces F * σ and F σ are naturally paired by the bilinear form ., . Fσ : F * σ ⊗ F σ → C defined in the same way as previously done for σ = 0.

Representing conformal blocks within twisted representations
The construction of free fermion states corresponding to the solutions of the Riemann-Hilbert problem described in Section (5.1.2) can now easily be generalised to the cases where one of the points where Ψ(x) can be singular is equal to 0 or ∞. We will look for a state f Ψ,σ ∈ F characterised through the matrix G Ψ (x, y) of two-point functions with matrix elements However, in order to apply (5.35) and (5.34) we now need to use a modified form of the relation between the two-point function and the function A(x, y), taking into account that In a similar way one may define a state f * Ψ,σ ∈ F * σ such that (6.23) The states f Ψ,σ and f * Ψ,σ are as before defined uniquely up to normalisation.

Factorisation of free fermion conformal blocks
Using these constructions, and referring back to the factorisation of the Riemann-Hilbert problem described in Section 6.1.2, we can now associate a state f in ≡ f in (z, κ) ∈ F σ to Ψ in z,κ , and a state f * out ∈ F * σ to Ψ out . Using the variable z as coordinate for M 0,4 in the case C = C 0,4 one may, on the other hand, use (5.44) to define the family of states f Ψ (z) up to a z-independent normalisation factor. We claim that f Ψ (z) can be normalised in such a way that we have In Appendix C it is explained how the relation (6.24) can be derived using ideas from conformal field theory. It basically represents the free fermion conformal block by the gluing construction from CFT associated to the decomposition of C into C in and C out described in Section 6.1.2. It is well-known that the gluing construction defines families of conformal blocks satisfying (5.44). It follows from (6.24) and (5.46) that with T (µ; z) being the isomonodromic tau-function.

Factorisation expansions
It is furthermore explained in Appendix B how to represent the matrix element occurring in (6.24) in terms of the Fredholm determinant with A in being the operator represented by the matrices A in kl defined from Ψ in q,κ by first defining and then expanding A in (x, y) in a double series of the form (5.41). The operator A out is defined in an analogous way. According to (6.25) one may identify the function T (σ, κ; θ; z) as the isomonodromic tau-function defined with a specific choice of normalisation condition. Representing f * out , f in Fσ in terms of a Fredholm determinant makes it manifest, in particular, that Z ff (µ, z) is mathematically well-defined.
Standard identities for determinants allow us to express det(1+A out A in ) as sum over products of sub-determinants of the infinite matrices formed out of the matrices A in kl and A out kl , respectively, see [CGL] or Appendix B.3 for more details. In this way it is not hard to see that in the case C = C 0,4 equation (6.26) yields series expansions of the following form: (6.28) To understand this structure it may be useful to recall that the matrix elements A in kl of A in are 2 × 2-matrices in the case N = 2 of our interest. It easily follows from the discussion in Section 6.1.2 together with (6.27) that the dependence of the 2 × 2-matrices A in kl on κ is for all k, l given by the same factors e ±iκ in the off-diagonal matrix elements of A in kl . It follows easily that the summation index n simply counts the difference of numbers of upper-and lower off-diagonal elements of matrices A in kl in the sub-determinants appearing in the expansion of det(1+A out A in ).
One should furthermore note that f 0 , f in Fσ has a dependence on z of the form (6.29) as follows from the relation between f in and a conformal block on C 0,3 = P 1 \ {∞, z, 0} using the conformal Ward identities, N in being a constant.
The discussion in this section clarifies in particular how the normalisation factors ν out entering the definition of Ψ out (x), Ψ in (x) given in Section 6.1 via equation (6.6) determine unambiguously both (i) the precise definition of the variable κ in (6.28), and (ii) how κ is related to the coordinates for M flat (C 0,4 ) defined in Section 6.1. A canonical choice is of course ν out = 1 corresponding to the coordinates (σ, κ) defined in Section 6.1 using (6.4) together with formula (6.10) for C ± (σ). In this case one will get an expansion of the form (6.28) with coefficients R n,m (σ, θ) which are rational functions of (σ, θ). This follows easily from the fact that the matrix elements of A in kl and A out kl are assembled from the power series expansion coefficients of the hypergeometric function, which are rational functions of (σ, θ).
Remark 3. The resulting picture is closely related to the recent work [CGL]. Indeed, using the basic results from the theory of chiral free fermions summarised in Appendix B one may recognise the Fredholm determinants discussed in [CGL] as the free fermion matrix elements appearing here. A more direct proof that the Fredholm determinant on the right of (6.26) is the isomonodromic tau-function can be found in [CGL]. The normalisation prescription following from the definition (6.26) of the tau-functions is equivalent to the one used in [ILP].

Representing free fermion partition functions as generalised theta-series
The results of the last section imply that Z ff (σ, κ; z) := f * out , f in Fσ can be expanded as Z ff (σ, κ; z) = n∈Z e inκ F n (σ, θ). (7.1) The string duality conjectures briefly reviewed in Section 2 predict that the functions F n (σ, θ) can be identified with the topological string partition function. A necessary condition is that F n (σ, θ) depends on n only through σ + n, F n (σ, θ) ≡ F(σ + n, θ).
So far we had not fixed a normalisation for the states f * out and f in , leaving the normalisation factors N out = f * out , f 0 Fσ and N in = z θ 2 1 +θ 2 2 −σ 2 f 0 , f in Fσ entering the relation (6.26) between free fermion partition partition functions and Fredholm determinants arbitrary up to now. Considering generic choices for N out and N in we will observe that the free fermion partition functions Z ff (σ, κ; z) do not admit series expansions of the desired form.
However, we will also see that there exist a few distinguished choices for N out ≡ N out (µ) and N in ≡ N in (µ) depending on the monodromy data µ, combined with suitable choices of coordinates µ = µ(σ, κ), such that the free fermion partition function Z ff (σ, κ; z) admits a series expansion of the required form.

Explicit form of the factorisation expansion
Explicit series expansions for the isomonodromic tau functions have first been conjectured in [GIL]. Proofs of this conjecture were given in [ILT], [BS] and [GL16] by rather different methods. The proof closest to the formulation used in this paper is the one in [GL16]. It proceeds by explicit calculation of the determinant on the right side of (6.26) using an expansion as sum over sub-determinants. After stating the result we will discuss some of its features that will be important in the following.
• F( σ , θ ; z ) can be represented by a power series of the following form where the summation is extended over pairs (ξ, ζ) of partitions. The explicit formulae for the coefficients F ξ,ζ (σ, θ) can be found in [GIL,GL16], where it is also observed that they are related to the instanton partition functions in the four-dimensional, N = 2supersymmetric SU (2)-gauge theory with four flavors.

Rewriting as generalised theta series
The discussion in Section 2 suggests that the relevant fermionic partition functions should admit an expansion taking the form (2.6) of a generalised theta series. Formula (7.2) is not of this form, the summand depends on the variable σ not only in the combination σ + n. One may note, however, that there are two types ambiguities involved in the definition of the partition functions in general, and in the form of its series expansion in particular: • There is generically a normalisation freedom in the definition of partition functions. While the dependence w.r.t. the variable z is governed by Ward identities, mathematically expressed in the definition (4.26) of the isomonodromic tau-function, the normalisation ambiguities leave the freedom to multiply the tau-function by a function depending only on the monodromy data.
• The coefficients in the series expansions of tau-functions like (7.2) depend on the precise definition of the coordinate κ. A change of coordinates from (σ, κ) to (σ, τ ) with τ satisfying e iκ = e iτ D(σ, θ) would change the coefficients F n in (7.2) by a factor of (D(σ, θ)) n .
By combining these observations we will find a renormalised version of the tau-functions which will indeed admit an expansion of generalised theta-series type.

Alternative representations as theta series
In this section we will identify a small family of normalisation conditions defining tau-functions sharing the feature to admit an expansion as a theta-series as expected from the discussion in Section 2. We will observe that all normalisation conditions in this class are obtained from (7.10) by combining a redefinition of the normalising factors N (θ 3 , θ 2 , θ 1 ) with a modification of the definition of the coordinate τ . Each such choice of normalisation thereby corresponds to a particular set of coordinates for the space of monodromy data.
There are, of course, a few other options similar to (7.11) one might consider. It is natural to restrict attention to redefinitions of the function N (θ 3 , θ 2 , θ 1 ) in order to preserve a form of the expansion adapted to the pants decomposition it corresponds to. By redefinitions similar to (7.11) one can change the sign of the argument of each of the four G-functions appearing in (7.8), giving sixteen options in total.

Discussion
According to the discussion in Section 2 one might expect that there exists particular normalisations such that the expansion coefficients of the partition functions defined by such normalisations can be identified with the topological string partition functions of the local CY Y u,z . We now see that the requirement that the free fermion partition functions admit an expansion of generalised theta-series type restricts the normalisation freedom considerably. Only very special choices of possibly monodromy-dependent normalisation factors have this property. However, the requirement to have a generalised theta series expansion does not fix the normalisation choice uniquely, there is a small family of choices which all yield expansions of theta series type. The comparison with the topological vertex computations performed in the following section will show that there exist some normalisation choices having generalised theta series expansions with coefficients related to topological string partition functions, while other normalisation choices are not related to the topological string partition functions in this way. We will later see what distinguishes the normalisations corresponding to these two cases.
One should also note that the discussion in Section 7.2 does not determine the choice of the functions N (θ 3 , θ 2 , θ 1 ) uniquely. Multiplying N (θ 3 , θ 2 , θ 1 ) with an arbitrary function of θ 2 and θ 1 would also do the job. In (7.8) we have adopted a choice which appears to be natural.

The topological vertex calculations
We have seen that the requirement that the tau-function should admit an expansion of thetaseries form restricts the remaining normalisation ambiguities in the definition of the fermionic partition function considerably, but not completely. In order to motivate the proposal we are about to formulate we will now consider an alternative computation of the topological string partition function which can be done with the help of the topological vertex [AKMV].
The topological string partition functions have been computed previously for the case of our interest in [IK03a,IK03b,EK,HIV,IK04]. A key issue for our goals is the behaviour of the partition functions under flops, which was previously studied in [IK04,KM]. The partition functions of toric CY related by a flop differ by a factor depending only on the Kähler parameter degenerating in the transition. As the precise form of this factor will be important for us, we'll revisit the necessary calculations. We will furthermore observe that the 4d limit is subtle for the case of our interest. As we could not find a discussion of this issue in the literature, we include such a discussion here.

The topological vertex formalism
To compute the topological partition function, we use the topological vertex formalism [AKMV]. For completeness we begin by sketching the rules for reading off the topological string partition function from a toric graph.
Let G be a toric graph with set of vertices G 0 and set of internal 10 edges G 1 . To each internal edge e ∈ G 1 let us associate a Kähler parameter Q e , a Young diagram Y e , and the following function of Q e and Y e , Figure 3. We will also associate a Young diagram to each external edge. The unrefined topological vertex is the function C λµν of three Young diagrams defined as where s µ (x) and s µ/ν (x) are the Schur and skew-Schur functions of a possibly infinite vector x = (x 1 , . . .), respectively [Mac]. We use the notation that for a partition ν = (ν 1 , ν 2 , . . . ), the vector q ρ+ν is given by The function C λµν has cyclic invariance C µνλ = C νλµ = C λµν . If the three edges meeting at v in clockwise order all carry arrows pointing into the vertex and are decorated with the Young diagrams λ v , µ v and ν v , respectively, we will assign to this vertex the function C λvµvνv . Changing the orientation of an edge meeting at the vertex v is represented by replacing the corresponding Young diagram by its transpose.
The topological vertex formalism leads to an expression for the topological string partition function of the following form This gives an expression for a Z top as a formal series in the Kähler parameters Q e .

The strip geometry
The toric graph depicted in Figure 1 has a subgraph called strip depicted in Figure 4. Figure 4: The strip graph.
The contribution associated to the strip graph can be computed as follows: . In appendix A.1 it is explained how to perform the summations over Young diagrams in (8.5). The final result can be brought into the form Figure 5: A second version of the strip geometry, related to the first one via flopping.
using the notations We will find it useful to factorise the functions R Y 1 Y 2 (Q) in (8.6) as follows (1 − Qt i q j ) for |t| < 1, |q| < 1, (8.10) converging for all Q. This allows us to write (8.6) as

Flopping the strip geometry
The flop transition in the previous section would produce a toric CY in which the toric subgraph depicted in Figure 4 is replaced by the graph in Figure 5.
To understand the resulting modifications of the topological string partition function, we begin by calculating from scratch the topological string partition function for the toric diagram in Figure 5. In the same way as in the case above, we compute the topological string partition function for the second version of the strip depicted on the right of Figure 5, . (8.13) Comparing the expression for the original strip partition function (8.6) and it's flopped version (8.13) we observe that Factoring the function R Y 1 Y 2 (Q, q) as in (8.8), defining the function (8.15) and using the relation we may write (8.14) in the form A very similar formula will describe the effect of the flop transition applied to the subgraph on the left of Figure 5 containing the edge having Kähler parameter Q 3 assigned.
Remark 4. An identity has been proposed in [IK04] expressing the function S(Q) in terms of more elementary functions. To see that such an identity can not possibly hold it suffices to note that S(Q) = (Γ(Qq; q, q)) −1 , where Γ(z; p, q) is the elliptic gamma function, (8.18) which is quite non-elementary.

Gluing two strips
By gluing two strip geometries we obtain the toric graph depicted in Figure 1. This toric graph has been associated with chamber C 1,1 in Section 3.3. The partition function for this toric diagram is then given as The toric diagram on the right of Figure 6 is associated to chamber C 1,2 . The corresponding partition function is found to be The identity (8.20) also follows from Theorem 4.4 in [KM].
Continuing is this way we arrive at the conclusion that the partition functions Z top i,j associated to the chambers C i,j can be represented the form, The factor denoted Z inst in (8.21) is known in the literature as the five dimensional Nekrasov instanton partition function [N]. This part is independent of the choice of a chamber. Of main interest for us are the factors Z out i , Z in j . In the case (i, j) = (3, 3) corresponding to the octagonal toric diagram depicted on the right of Figure 7 we find, for example, The results for the other chambers are similar, differing by factors S(Q i ), i = 1, 2, 3, 4, which can easily be found from the discussion of flop transitions above. In this way we can define Z top as a piecewise analytic function on the union of the chambers C ij which is at least continuous at the walls corresponding to the flop transitions.

Four-dimensional limit and final result
Taking the limit R → 0 of the topological string partition functions is delicate as the functions M(Q) diverge in this limit. In Appendix A.2 it is shown that the limit exists. It follows from the existence of a limit forZ top 2,2 that the singular behavior of Z top 2,2 does not depend on the variables σ = − 1 λR log Q F and z = Q B . While there do exist alternatives for the definition of finite quantities from Z top 2,2 in the limit R → 0, it is both unnecessary and unnatural to introduce extra factors altering the dependence on σ and z in the definition of this limit.
Comparing with the discussion in Section 7 we see that the topological string partition functions Z top i,j for all chambers C i,j are obtained as generalised theta series expansion coefficients for suitable choices of coordinates (σ, τ ). However, only a subset of the normalisation factors giving generalised theta series expansions appears in this way. We will next see that there is a canonical relation between the coordinates determining the partition functions Z top i,j and coordinates defined using abelianisation [HN].

Abelianisation
We had seen in the previous sections that there is a direct correspondence between natural normalisations of the tau-functions and choices of coordinates for M flat (C 0,4 ). It was furthermore found that the topological string partition functions for the local CY manifolds of class Σ represent theta series coefficients of tau-functions for certain choices of coordinates, as expected. So far it is not clear, however, what distinguishes the coordinates giving topological string partition functions in the theta series expansions from others. We will now observe that there is a natural way to define a system of coordinates for M flat (C) associated to each chamber in the space of quadratic differentials on C defined above. The relevant systems of coordinates will be defined by a procedure introduced in [HN] called abelianisation.

Spectral Networks
The curves Σ ∈ T * C defined in Section 3.1 as two-fold coverings of base curves C, with C representing a punctured sphere, were specified by quadratic differentials q(x) in equations (3.2)-(3.4).
A quadratic differential q(x) defines a singular foliation F(q) on C, with singularities at the zeros and poles of this differential. Let P = P 0 ∪ P ∞ be the set of points that are the zeros (also called turning or branch points) and respectively the poles of the quadratic differential q(x).
A trajectory of q(x) is a leaf of the foliation on C\P defined by Im x q(x )dx = constant . (9.29) A Stokes curve is a trajectory of q(x) with one end point at a turning point. In a local coordinate Figure 8: (Left) Stokes curves or walls emanating from a simple zero of the quadratic differential with q(x) = x. (Right) Walls emanating from a branch point of the quadratic differential q(x) defining the double cover Σ → C are labeled by pairs of integers i, j ∈ {1, 2} corresponding to the sheets of Σ.
x on C, a Stokes curve emanating from a turning point a ∈ P 0 is defined by Let q θ (x) = e 2iθ q(x) be a new quadratic differential. A Stokes curve in the direction θ ∈ R/2πZ emanating from a turning point a ∈ P 0 is defined by There are exactly three trajectories emanating from a simple zero and which are Stokes curves, as depicted in Figure 8 on the left. For a double pole p ∈ P ∞ , there are three cases to distinguish for Stokes curves, depending on the residue r p = Res x=p q(x)dx: (a) radial arcs entering p, when r p ∈ R; (b) closed trajectories around p, when r p ∈ iR; (c) clockwise or counterclockwise logarithmic spirals wrap onto p, when r p / ∈ R ∪ iR.
A Stokes curve can be: a saddle trajectory, flowing into points in P 0 at both ends; a separating trajectory, one of whose endpoints belongs to P 0 , while the other belongs to P ∞ or a divergent trajectory, the latter however will not play a role here. Of particular interest for us will be saddle trajectories. These are of regular type if they connect two different points in P 0 and of degenerate type if they form a loop around a double pole p ∈ P ∞ .
The spectral network W θ (q) or Stokes graph for a quadratic differential q(x) is a graph on C with vertices at the points in P and oriented edges (called walls) given by the Stokes curves of q(x) [IN]. W θ (q) can therefore be obtained from the critical locus of the singular foliation F(q) [HK].
For practical purposes, it is useful to choose a trivialization of the covering, that is a choice of branch cuts on the base C and labels for the sheets of Σ. Each wall of the network is then ji ij ij ji Figure 9: Possible resolutions are infinitesimal ways of displacing the walls in a double wall.
labeled by an ordered pair of integers i, j ∈ {1, 2} corresponding to the sheets i and j. Given a positively oriented tangent vector v to the wall and θ ∈ R/2πZ, this wall carries the label ji if [HK]. A branch point where sheets i and j coincide is a turning point from which three walls of type ij or ji emanate, as depicted in Figure 8 on the right.
Punctures, boundaries and annuli on C\W are then assigned decorations [HN]. These are orderings of the sheets of Σ → C over every puncture, for each direction around the punctures and compatible with the labelings of the walls around them. Over a boundary component or annulus (equivalently pants curve), they are orderings of the sheets for each way of going around the boundary or annulus, compatible with the labelings of the wall around it. 11 A Stokes graph in direction θ consists of the Stokes curves in direction θ and the points in P . By varying θ continuously, the topology of the spectral network changes when a saddle trajectory appears. For special values of q(x) and θ, two walls ij and ji overlap and create a double wall. When this occurs there exist two possible resolutions, which are the infinitesimal ways of displacing the walls with respect to each other depicted in Figure 9.
When the quadratic differential q(x) obeys the Strebel condition γ i q(x)dx ∈ R + for the period integrals around the curves {γ i } defining a pair of pants decomposition of C, all leaves of the foliation are compact, either closed or saddle trajectories. The corresponding spectral network is called a Fenchel-Nielsen (FN) network and is composed of double walls only. Such networks can be seen as a limiting case of spectral networks coming from a general quadratic differential on C. A FN network respects a pair of pants decomposition of the Riemann surface C, in the sense that the restriction of such a network to every three-punctured sphere in this decomposition is a network of only double walls.

Three-punctured sphere
When the base curve is C 0,3 = P 1 \{0, 1, ∞}, the quadratic differential defining the branched covering Σ in → C 0,3 was given in equation (3.4) by Figure 10: Fenchel-Nielsen networks on the three-punctured sphere for different values of the parameters a, a 1 , a 2 , with punctures depicted by the blue dots at positions z = 0, 1 while the third puncture is at infinity. The different isotopies occur in different regions of the parameter space. They correspond to the possible choices of a chamber C R,α in a real subspace of the space of quadratic differentials on C 0,3 . For example Molecule I, as depicted by the FN network a), corresponds to the chamber C in 1 in Section 3.3, while the Molecule I depicted by the FN network b) corresponds to the chamber C in 3 . Lastly, Molecule II pictured on the bottom row corresponds to the chamber C in 2 .
There exist two inequivalent types of FN networks and these can have one of two topologies, called Molecule I on the top line of Figure 10 or Molecule II, on the bottom line 12 . For each of these topologies, there is a choice for the resolution. This can be British, where the outer walls of the network are oriented clockwise, or American, where the outer walls are oriented counterclockwise. To simplify the discussion let us assume that all the parameters a are real, t ∈ R and that θ = π. The branch points will then either be real, or come in complex conjugate pairs. The transitions between different types of molecules occur when two branch points coalesce, corresponding to the flop transitions discussed in Section 3.3. The branch points t ± are easily read off from equation (3.12), giving Flop transitions occur when a 2 = (a 1 + a 2 ) 2 and a 2 = (a 1 − a 2 ) 2 . It is easy to show that  Figure 10 a) corresponds to the chamber C in 1 in Section 3.3, the molecule in Figure 10 b) corresponds to the chamber C in 3 , while the networks on the bottom row correspond to the chamber C in 2 . On a general Riemann surface C, FN networks can be defined with respect to a pants decomposition of C and found by gluing together molecules in the same resolution on the individual pants. One needs to fix a branched cover Σ → C over each pair of pants. Molecules are then glued along the boundaries of the pants, inserting a circular branch cut around the gluing curve and lastly specifying the decoration [HN]. The reason for inserting the branch cut is such that the decorations of the two glued boundaries agree. The label for each way of going around the annulus where pants are glued is then chosen to match the decoration around the nearest wall. Fixing the decoration of one wall therefore fixes the decorations of all walls.

W-framed flat connections on C
For a punctured Riemann surface C, let ∇ be a flat SL(2)-connection in a complex vector bundle E over C with fixed conjugacy class D k = diag(e 2πiθ k , e −2πiθ k ) at the k th puncture. For a fixed a branched cover π : Σ → C, let then W be a Fenchel-Nielsen network subordinate to this covering. W decomposes the base curve into annular regions A i , like for example in Figure  11 in the case C = C 0,4 , over which the flat connection ∇ can be diagonalised. Figure 11: Fenchel-Nielsen network on the four-punctured sphere.
Fix P C to be the set of distinguished points on C consisting of two base points on either side of each wall of the network and points along the boundary components of C. These points are marked by black dots in Figure 11. Let G C be the set of all paths ℘ that begin and end at points of P C , up to homotopy. A path ℘ ∈ G C is called "short" if it does not cross any walls.
For a choice of basis (s 1 , s 2 ) of the vector bundle E at any point on C\W, the parallel transport of (s 1 , s 2 ) over a short path ℘ ⊂ C\W is represented as follows: (a) within a pair of pants and not crossing a branch cut, it is given by a diagonal matrix D ℘ = diag(d, d −1 ) ∈ SL(2); 21 12 J w 21 J w 12 Figure 12: The jump matrices of equation (9.36) associated to a wall in terms of its decoration.
(b) traversing an annulus between two pairs of pants, it is given by a diagonal matrix T ℘ = diag(e iτ /2 , e −iτ /2 ); (c) crossing a branch cut emanating from a simple branch point ij, it is represented by Across a single wall w ∈ W of the Fenchel-Nielsen network, the non-abelian parallel transport of (s 1 , s 2 ) is represented by a non-diagonal jump matrix J w , which is either upper or lower triangular and whose precise form depends on the decoration assigned to the wall 13 [HK] J w 12 = 1 0 * 1 , J w 21 = 1 * 0 1 (9.36) like in Figure 12. The entries marked with a " * " are determined uniquely in terms of the matrices D ℘ by consistency conditions. These state that over every composition of paths ℘ contractible to a turning point (marked with an orange " × " in Figure 11), the corresponding parallel transport is represented by a product of matrices which is equal to the identity. The determination of the off-diagonal elements of the matrices J w ij is described in more detail in Appendix D. Note that the map from the path groupoid G C to the corresponding SL(2) matrices is an anti-homomorphism. Having a composition ℘ = ℘ 1 ℘ 2 of a path ℘ 1 from point i 1 to i 2 with a path ℘ 2 from i 2 to i 3 one composes the holonomy matrices D ℘ 1 and D ℘ 2 associated to ℘ 1 and ℘ 2 , respectively, as D ℘ = D ℘ 2 D ℘ 1 .

Four-punctured sphere
Following the rules to determine the monodromy and wall crossing matrices, which were outlined in Section 9.2, one can repeat the process for FN networks on the four-punctured sphere. Consider the pants decomposition defined by the dashed orange curve in Figure 13, separating the punctures with labels 1 and 2 on the left from those labelled by 3 and 4 on the right. A combination of molecules that respects this pants decomposition is depicted in the British resolution in Figure 13. The monodromy around the orange pants curve is (9.37) corresponding to the invariant L s in Section 6.1. The clockwise monodromy around punctures 23 is computed by (9.38) and determines the FN coordinate which supplements σ, with the matrix T = diag(e iτ /2 , e −iτ /2 ) representing abelian parallel transport. This monodromy matrix has trace where P + = e i(τ +2πσ) , (9.40) after setting d 2 d 4 d 4 = −d 2 d 3 2 for the coefficients of the D-type parallel transport matrices by gauge transformations at the walls of the network. The coefficients in equation (9.39) are (2 sin(2πσ)) 2 N 0 = − 2 [cos 2πθ 1 cos 2πθ 4 + cos 2πθ 2 cos 2πθ 3 ] (9.41) + 2 cos 2πσ [cos 2πθ 1 cos 2πθ 3 + cos 2πθ 2 cos 2πθ 4 ] ,
(9.42) Note that switching the resolution of the network in Figure 13 changes equation (9.38) to which is equivalent to replacing P + by P −1 + .

Flop transitions
We will now analyse how the choice of network affects the equations defining the corresponding coordinates. In Section 9.1.1 we had associated to each chamber C out j and C in i , i, j = 1, 2, 3 unique FN-networks on C out 0,3 and C in 0,3 , respectively, and observed a correspondence between flop transitions and changes of topological type of the FN-networks. We are now going to derive rules describing the effect of flop transitions on the coordinates defined by abelianisation. Considering the FN network in Figure 14, for example, we'd find in a similar way as above the monodromy matrix (9.44) which has a trace given by the formula (9.45) and where the coefficient P + is (9.46) In this way one can find a simple set of rules for the changes of coordinates induced by flop transitions. The result is summarised in Table 1. 14 14 In Section 9.3 gauge transformations at the walls of the FN network were used to fix the coefficients of the D-matrices such that d 2 d 4 d 4 = −d 2 d 3 2 . Thus the trace function L u of the monodromy which describes parallel transport around the punctures 23 on C 0,4 contains the term P + as determined by equation (9.40). Similarly, it is necessary to fix a gauge for the other possible FN networks on C 0,4 that combine the remaining isotopies for type I or II molecules depicted in Figure 10, and which appear on the three-punctured spheres in a pants decomposition of C 0,4 . For example when changing the type I molecules in Figure 13 to type II in Figure 14, in order to arrive at equation (9.46) it is necessary to set d 2 /d 2 = e πi(σ−θ1−θ2) d 1 d 12 /d 2 and d 4 d 4 /d 3 2 = e −πi(σ−θ3−θ4) d 4 /d 3 d 34 .
Such conditions can be found systematically by sequentially changing to the isotopy class of any one molecule, starting with the FN network in Figure 13.
Enclosed punctures (12) 2i sin π(σ − θ 1 − θ 2 ) 2i sin π(σ + θ 1 − θ 2 ) 2i sin π(σ − θ 1 + θ 2 ) Table 1: The relations between the change of FN coordinates on a four-punctured sphere to changes in the isotopy class of the molecules on the three-punctured spheres in a pair of pants decomposition. When the FN network consists of type I molecules, like in Figure 13, equation (9.39) computes the trace function L u around punctures 23. Changing the isotopy class of either molecule as depicted on the top row above leads to dividing the term containing P + in the expression for L u by the factors in the second row of this table.

Comparison
In Subsection 6.1 we had explained how the factorisation of Riemann-Hilbert problems described in Section 6.1.2 can be used to define coordinates for M flat (C 0,4 ). To round off the picture, let us now observe that the coordinates defined by abelianization are of course special cases of the coordinates from the factorisation of Riemann-Hilbert problems.
Indeed, it is clear from the discussion in Section 6.1 that it suffices to fix the ratio ν out − /ν out + of normalisation factors in (6.6) appropriately in order to ensure that the coordinates (σ, η) defined in this way coincide with FN-type coordinates defined by abelianisation. The abelianisation approach will then simply amount to a representation of the monodromy matrices M in 2 and M out 3 in (6.9) in the form J −1 2 D 2 J 2 and J −1 3 D 3 J 3 , making (9.38) equivalent to (6.9). Changing the ratio ν out − /ν out + scales the two off-diagonal elements of M 3 by factors which are inverse to each other, which is equivalent to the effect of conjugation of the matrix M 3 by a diagonal matrix. In this way one can relate all the different coordinate systems defined using abelianisation with a fixed pants decomposition.
Let us next recall, on the one hand, that to each chamber C i,j , i, j = 1, 2, 3 there corresponds a toric diagram from which we can calculate the topological string partitions using the topological vertex. We had, on the other hand, explained above how each molecule defines corresponding coordinates for M flat (C 0,4 ), and how each such system determines a normalisation for the free fermion partition functions admitting a theta-series expansion, leading to a correspondence between molecules and the functions appearing as coefficients in the theta series expansions. We see that the functions defined in this way indeed coincide with the topological string partition functions if the molecules labelling the different theta series expansions are identified with the chambers C i,j according to the dictionary stated in Section 9.1.1 above.
This holds for a specific choice of resolution, as specified above. However, changing the resolution is equivalent to a change of coordinates (σ, τ ) = (−σ , −τ ), which does not give anything substantially new in our context.

Exact WKB expansion
In Section 6.1 we had observed a direct relation between the normalisation choices for the solutions to the Riemann-Hilbert problem and the choices of coordinates for M flat (C 0,4 ). Abelianisation provides distinguished coordinates associated to FN-networks. We are now going to observe that the solutions to the Riemann-Hilbert problem associated to the coordinates defined by abelianisation are distinguished by the feature that they can be obtained by Borel-summation of the λ-expansion for the solutions to (λ 2 ∂ 2 x + q λ (x))χ(x) = 0. These solutions are therefore determined by the quantum curve in the most canonical way.
The solutions of the basic ODE (λ 2 ∂ 2 x + q λ (x))χ(x) = 0 can be represented as an expansion in the parameter λ. This expansion, often referred to as the WKB-expansion can be conveniently described by first expanding the solution η of the Ricatti equation q λ = η 2 − λη as (9.47) The family of functions {η k (x); k ≥ −1} must satisfy the recursion relations The first of the equations (9.48) is recognised as the equation for Σ. Picking a solution η −1 (x) is related to picking a sheet of this covering. The series (9.47) is usually not convergent, but may be Borel summable, see [IN] for a careful discussion of the relevant results.
With the help of the solutions χ to the Ricatti equation obtained by Borel summation one may define two linearly independent solutions χ ± (x) of the ODE (λ 2 ∂ 2 x + q λ (x))χ(x) = 0 characterised by leading asymptotics for λ → 0 of the form The solutions χ ± (x, λ) are analytic in the annular region A. In the vicinity of a puncture at x = 0 we have q 0 (x) ∼ m 2 x 2 . It follows from (9.48a) that χ −1 (x) ∼ ± m x . We thereby see that the two solutions defined by (9.49) both have diagonal monodromy around x = 0.
For any given Fenchel-Nielsen network the Borel summation defines a collection of distinguished bases, one for each annular region. The analytic continuation of the basis elements defines solutions to the Riemann-Hilbert problem normalised in a particular way. In the case of the three-punctured sphere the two solutions defined in this way must therefore coincide with the solutions defined in (6.6) for particular choices of normalisation constants ν out . The normalisation factors ν out defined by the Borel-resummation are not easy to calculate, but the ratio ν out + /ν out − can be determined indirectly by matching the monodromy matrices determined by abelianisation to (6.8).

The result
To conclude, let us reformulate our results in a way that suggests various generalisations. Our results amount to a reconstruction of the topological string partition functions from the quantum curve at least for certain degenerating families C z of base curves parameterised by a complex number z which controls the degeneration occurring for z → 0.
We had observed that the extended Kähler moduli space admits a chamber decomposition with chambers separated by walls associated to flop transitions. The chambers admit a natural complexification. The union of the complexified chambers should be mirror dual to the moduli space of the complex structures of Σ u,z . To each chamber there corresponds a unique Fenchel-Nielsen network separating C into annular regions.
The quadratic differential q λ (x) appearing in the equation defining the quantum curve, is defined for given monodromy data µ = µ(σ, τ ) through the Riemann-Hilbert correspondence. The Borel resummation of the WKB expansion for the solutions χ ± to (10.1) defines distinguished solutions to this equation in each annular region defined by a Fenchel-Nielsen network. From the solutions χ ± one may uniquely construct the tau-functions T (σ, τ ; z) as the Fredholm determinants of an integral operator canonically associated to χ ± . The tau-functions T (σ, τ ; z) admit an expansion in powers of z around the degeneration point z = 0. If σ, τ are the coordinates defined by abelianisation with the given Fenchel-Nielsen network, there exist distinguished normalisations defining free fermion partition functions admitting generalised theta series expansions, The coefficient functions G N (σ; z) appearing in the expansions (10.2) have been shown to be equal to the topological string partition functions for the chambers associated to the respective Fenchel-Nielsen networks.
It may look surprising that there is an essentially unambiguous way to reconstruct the partition function from the quantum curve. The key ingredients fixing conceivable ambiguities are: • Integrability controls possible quantum corrections to the quantum curve as explained in Section 4.
• The Borel-resummation of the λ-expansion for the solutions to (10.1) provides a distinguished basis for the space of solutions, defining the free fermion two point function.
• A one-to-one correspondence between the bases from WKB-resummation and normalisations for the free fermion partition function admitting generalised theta series expansions.

Role of integrable structures I
A source of motivation for our proposal has been the relation between the free fermion partition function at λ = 0, Z Σ (ϑ, a) = n e i n·ϑ e i 2 n·τ (a)·n e F 1 (u) . (10.3) and the Hitchin integrable system, established by the identification of the variables (a, ϑ) as action-angle variables of the Hitchin integrable system. The goal of this and the following subsection is to clarify in which sense our proposal above can be regarded as a deformation of the integrable structure of the Hitchin system. To begin with, we will demonstrate how (10.3) is recovered in the limit λ → 0.

Deformation of the Baker-Akhiezer function
We are first going to explain in which sense the solution of the Riemann-Hilbert problem Ψ(y) is a natural deformation of the Baker-Akhiezer function Φ(y) of the Hitchin system. The basic observation is simple. The horizontality condition (∂ x + 1 λ ϕ(x))Ψ(x) can be solved to leading order in λ in the form already indicating that the function Φ(x) in (10.4) can be identified with the Baker-Akhiezer function defined in (4.3). However, one should keep in mind that the normalisation of the eigenvector of ϕ adopted in (4.3) relates the zeros and poles of Φ(x) to the coordinates x k of the SOV-representation. We need to verify that the same is true for the function Φ(x) in (10.4).
To this aim it will be convenient to work in a gauge where ∂ x + 1 λ ϕ(x) is of oper form with ϕ(x) = ( 0 q λ 1 0 ). This allows us to represent Ψ(x) in the form Ψ = ∂xχ + ∂xχ − χ + χ − , with χ ± being the solutions to the equation defined by the deformed quantum curve λ 2 ∂ 2 x + q λ (x). Expanding q λ (x) as q λ (x) = q(x) + λq 1 (x) + O(λ 2 ) it is straightforward to show that the leading behaviour of the solutions χ ± (x, λ) for λ → 0 can be represented in the form (9.49). Let us consider the term q 1 2 √ q 0 in (9.49). It is not hard to see that this term defines a meromorphic one-form ω D on Σ which has poles at the lifts of x k with residues ±1. The third kind differential ω D = q 1 2 √ q 0 dx is characterised by the divisor D = k (x k −x k ), withx k ,x k : lifts of x k to different sheets of Σ. It follows that χ + (x, λ) is of the form where ζ + (x, λ) = exp u ω D is meromorphic on Σ with zeros at x =x k and poles at x =x k .
This makes it easy to verify that the vector yχ + χ + represents the Baker-Akhiezer function (4.3) in the gauge where ϕ(x) = ( 0 q 1 0 ) with q = y 2 .

Undeformed limit of free fermion partition function
We'd now like to indicate how to recover the partition functions (4.1) from our proposal in the limit λ → 0. We may use the inverse of the Abel map in order to recover the divisor (x 1 , . . . , x n−3 ) from (ϑ 1 , . . . , ϑ n−3 ). The holonomy map combined with the definition of FNtype coordinates (σ, τ ) gives us functions (σ(a, ϑ; λ), τ (a, ϑ; λ)) parameterically depending on λ. By using (9.49) and the Riemann bilinear identity 16 it follows that the leading order behavior of the coordinates (σ, τ ) is of the form with δ k ≡ δ k (a, ϑ) being the periods of ω D along α k .
Inverting the relation between σ and a, to leading order represented in (10.8a), allows us to regard τ as function of σ and ϑ, τ = τ (σ, ϑ; λ). This corresponds to parameterising families of deformed quantum curves through (x, y) with x ≡ x(ϑ) determined by a point on the Jacobian with coordinates θ through the inverse of the Abel map, and y = y(σ, ϑ; λ) determined by the condition that the trace function L γ associated to any cutting curve γ is given as L γ = 2 cos(2πσ γ ). From (10.8) we get the expansion (10.9) Using (10.8) and log Z top ( 1 λ a) = 1 λ 2 F(a) + F 1 (a) + O(λ 2 ), we easily find that log e i n·τ ( 1 λ a,ϑ;λ) Z top (λ −1 a + n) = (10.10) This implies that in the limit λ → 0 with a and ϑ fixed. Equation (10.11) clarifies in which sense Z Σ λ is a "quantum" deformation of Z Σ .

Role of integrable structures II
It seems to intriguing to observe that the dependence on both (σ, τ ) and z appears to be controlled by the integrable structures of the problem, as can be expressed by the pairs of equations The factors H r appearing on the right hand side of (10.12a) are defined through the Riemann-Hilbert correspondence as functions H r = H r (σ, τ ; z). The definition of the coordinate τ k appearing on the right of (10.12b), on the other hand, is unambiguously fixed by using the solutions χ ± (x) obtained by Borel summation in the definition of coordinates described in Sections 6.1 and 9.
While (10.12a) is the definition of the isomonodromic tau-function through a solution to the Schlesinger equations, the difference equations (10.12b) are associated to the integrable structure of M flat (C 0,n ) manifested in the Fenchel-Nielsen type coordinates, allowing one to regard the coordinates σ as action-variables, and τ as angle coordinates, together forming a system of Darboux coordintates for the natural symplectic structure on M flat (C 0,n ). Equations (10.8) indicate that the integrable structure of M flat (C 0,n ) expressed through the Darboux coordinates

Topological vertex and beyond
It is not known if the series defined by the topological vertex formalism are convergent, in general, see however [FM] for recent results allowing to prove the convergence in some cases. For the theories of class Σ one may infer the fact that the series obtained using the topological vertex yield well-defined functions with the help of the Fredholm determinant representations discussed in this paper.
It is worth noting, however, that the class of theories for which the approach taken in this paper suggests an answer includes many cases for which it is not known how to represent the local CY as limits of toric CY. This will be the case for coverings of surfaces C of higher genus and the so-called Sicilian quivers. It should be possible to generalise our approach to arrive at precise predictions for this class of local CY for which not much seems to be known at present.

N = 1 theories
Going beyond the various applications of topological string theory to the study of N = 2 supersymmetric field theories studied in the literature, there should also be interesting applications to field theories having only N = 1 supersymmetry in four dimensions. Intriligator and Seiberg have made a first step in this direction by generalizing the Seiberg-Witten theory [IS]. Using their work we can characterize the low-energy physics of field theories with an abelian Coulomb branch by spectral curves in a way which is somewhat analogous to the cases with N = 2 supersymmetry. It would be very interesting if the technology developed in this paper could be generalized to predict partition functions for N = 1 theories for which only very few tools exist, see [CPTY, MP, BP] for some previous work in this direction.

A. Details on the topological vertex computation
A.1 The strip The contribution (8.5) associated to the strip graph depicted in Figure 4 can be computed as follows: To obtain the last expression we substitute the explicit form of the topological vertex (8.2) and use the homogeneity properties of skew Schur functions At this stage we observe that we can perform all the sums over partitions obtaining a factorised form for the topological string amplitude for the strip geometry depicted in Figure 4 by employing the Cauchy formulae [Mac] µ where we have been using that s ∅/µ = δ µ,∅ in the second step, and we found it useful to introduce the special function R Y 1 Y 2 (Q) defined as Performing the summations over µ 1 , µ 3 in this way will be followed by using (A.3) for the summation over µ 2 . We may then perform the summations over ν and λ by again using (A.3), creating terms containing s ∅/ν and s ∅/λ which only give non-vanishing contributions for ν = ∅ and λ = ∅. Finally, we perform the summation over µ 2 using (A.3) once more. The final result is equation (8.6) in the main text.
A.2 The four-dimensional limit

A.2.1 Instanton part
The limit R → 0 of the factor Z inst in (8.21) is straightforward and well-known. It can be found by rewriting the normalized partition function for the strip geometry in the form The limit R → 0 of (A.6) is now straightforward, reproducing the instanton partition function of the four-dimensional N = 2 supersymmetric SU (2) gauge theory with four flavors [N].

A.2.2 Factorising off the singular part
The existence of a well-defined limit R → 0 for the remaining factors Z out i and Z in j is less obvious as the functions M(Q) representing the building blocks for Z out i , Z in j have a rather singular behaviour in the limit R → 0. In Section A.2.3 it is shown that the renormalised partition functioñ has a well-defined limit for R → 0, given as where G(x) is the Barnes double Gamma function satisfying G(x + 1) = Γ(x)G(x). A similar result holds forZ out 2 := M(Q 4 /Q 3 )M(1) Z out 2 . It follows that the renormalised partition func-tionZ top 2,2 := M(Q 1 /Q 2 )M(Q 4 /Q 3 )(M(1)) 2 Z top 2,2 has a well-defined limit. We conclude from this observation in particular that the singular behaviour of Z top 2,2 does not affect the dependence on the variables σ and z which is of particular interest for us. While possible alternative definitions of renormalised partition functions may well differ fromZ top 2,2 by factors depending on θ 2 and θ 3 , it is not necessary to consider renormalisations of Z top 2,2 which involve additional factors depending on σ and z.
Having fixed a renormalisation prescription for Z top 2,2 it is natural to extend it to a renormalisation prescription for Z top i,j for all i, j = 1, 2, 3 as follows. We had seen that the expression for Z top 2,2 contains a factor of the form G(1 + t/λ) with t being the period undergoing a sign change in one of the flop transitions. The partition function associated to the chamber reached in this transition will then be obtained from Z top 2,2 by replacing G(1 + t/λ) by G(1 − t/λ).

A.2.3 Limit of the regular part
For the following discussion it will be helpful to use the notation G R (x) = (q x ; q, q) ∞ , q = e −λR . Using the relation between the variables Q F and Q i , and the variables σ and θ i , i = 1, 2 specified in equation (8.26) we may writẽ (A.10) Let us consider, a bit more generally, infinite products of the form with |q| < 1, |t| < 1 represented as q = e −λR . Pairs (a, b) of tuples of complex numbers will be called perfectly balanced if l k=1 (a k − b k ) = 0 and l k=1 (a 2 k − b 2 k ) = 0. It is easy to check thatZ in 2 is represented by a perfectly balanced product. Our goal is to show that the limit lim R→0 P R (a, b; q) exists, and is given as with G(x) being the Barnes function satisfying G(x + 1) = Γ(x)G(x). To this aim let us recall the infinite product representation for the Barnes function, with c 1 and c 2 being numerical constants which are not relevant here. The exponential factors under the product are necessary to make the infinite product in (A.13) convergent. The right hand side of (A.12) can then be represented as the infinite product (i,j) =(0,0) a k + i + j b k + i + j , (A.14) as follows easily when (a, b) is perfectly balanced. This means that we do not need any exponential factors in the product (A.14) in order to get convergent product representations for the ratios of Barnes functions with perfectly balanced arguments.
With the help of these observations it is getting clear that one can indeed safely exchange the limit R → 0 with the infinite product defining the function P R (x, y; q) in (A.12), giving the right hand side of (A.14).

B. Grassmannians and Sato-Segal-Wilson tau-function
The construction of free fermion partition function proposed in [DHS] was based on the theory of infinite Grassmannians pioneered in [Sa, SW]. We will here compare our formulation to the one used in [DHS].

B.1.1 Infinite Grassmannians
Let H = L 2 (S 1 , C N ), where S 1 will often be identified with the equator of P 1 . Elements of H will be represented as vectors having functions on S 1 in each of their N components. We have H = H + ⊕ H − , where the functions in H + (H − ) can be continued analytically inside S 1 (outside of S 1 and vanish at infinity). The Segal-Wilson Grassmannian Gr(H) is the set of all closed subspaces W of H such that (i) the orthogonal projection W → H + is a Fredholm operator, and (ii) the orthogonal projection W → H − is a compact operator. A subspace W in Gr(H) is spanned by the columns of the rectangular matrix w = ( w + w − ) called a frame of W . Frames related by right multiplication with elements of the group C of invertible operators t such that t − 1 is trace class describe the same point in Gr(H).
A frame is called admissible if w + − 1 is a trace-class operator on H + . A frame for a space W can be transformed into an admissible frame if w + is invertible, This means that the space W can the be described as the graph of the operator A : H + → H − , A := w − w −1 + . Such a space W is called transverse to H − . A natural line bundle on the Segal-Wilson Grassmannian Gr(H) is the dual of the determinant bundle Det * , which can be represented by pairs (w, λ) with (w, λ) and (w , λ ) considered to be equivalent iff w = wt and λ = λdet(t) for t ∈ C. Det * has a canonical section σ represented by the pairs (w, det(w + )).

B.1.2 Definition of Sato-Segal-Wilson tau-functions
Let Γ be the group of continuous maps S 1 → GL (N ), regarded as multiplication operators on H. The subgroups Γ + and Γ − are represented by real analytic functions f which extend holomorphically inside the unit circle satisfying f (0) = 1 and outside of the unit circle with f (∞) = 1, respectively. Noting that the multiplication by g −1 ∈ Γ + is represented on H = H + ⊕ H − by a matrix of the form a b 0 d (B.2) one may define the tau-function τ W (g) for W transverse to H − as a function on Γ + by setting where g −1 σ is the natural action of g −1 on sections of Det * , see [SW] for details. It is not hard to see that the function τ W can be represented as the Fredholm determinant This construction can be applied in particular to the case W = Ψ −1 · H + , with Ψ being the fundamental solution matrix of holonomic D-modules which can be analytically continued outside of S 1 and is twice differentiable on S 1 . In this way we get a natural way to associate points in Gr(H) to D-modules.

B.2 Free fermion states associated to points in the infinite Grassmannian
We are now going to show that the tau-function defined in (B.4) can be represented as a matrix element in the fermionic Fock space. This connection was part of the motivation for the proposal made in [DHS] that the free fermion partition functions relevant for topological string theory can be defined using the above-mentioned connection between D-modules and points in Gr(H). The approach described in the main text realises these ideas for the case of our interest.
Recall that the spaces W Segal-Wilson Grassmannian can be specified by graphs of operators A : H + → H − . Let the operator A : H + → H − be represented by matrices A kl with respect to the bases B + and B − for the Hilbert spaces H + and H − , respectively, where B + = {e s z l , s = 1, . . . , N ; l = 0, 1, . . . }, and B − = {e s z −k , s = 1, . . . , N ; k = 1, 2 . . . }, with {e s , s = 1, . . . , N } being the canonical basis of C N . We may then define a vector f A ∈ F as A function Ψ(y) : S 1 → GL(N, C) analytic outside of S 1 and twice-differentiable on S 1 defines a multiplication operator on H allowing us to define the operator where Π ± : H → H ± are the canonical projections. The operator Π − Ψ −1 Π + is trace-class [SW,Propositon 2.3], from which it follows that A Ψ is trace-class as well. One may represent A Ψ as an integral operator From (B.7) it is clear that the matrices representing A Ψ with respect to this basis are defined using (5.37) and (5.34). We recover the construction used in Section 5.1 to define free fermion states f Ψ ∈ F from solutions to the Riemann-Hilbert problem.
An operator B : H − → H + represented by matrices B lk can in a similar way be used to define l · B lk · ψ k . (B.8) One may again associate such operators in particular to functions Ψ(y) analytic inside of S 1 and twice differentiable on S 1 . Representing the multiplication operator (Ψ out ) −1 with respect to H H + ⊕ H − in the form ( a b 0 d ), allows us to define a trace-class operator B Ψ : H − → H + , B Ψ = a −1 b and a state f * Ψ ∈ F * in a way which is analogous to the definition of A Ψ and f Ψ given above.
The Fredholm determinants representing the Sato-Segal-Wilson tau-functions τ W (g) via (B.4) can now be represented as matrix elements in the free fermion Fock-space, det H + (1 + B g A) = f * Bg , f A , (B.9) see the following subsection B.3 for a self-contained proof of the identity (B.9).

B.3 Determinant representation of fermionic matrix elements
Our goal in this subsection is to prove the identity (B.10) where A : H + → H − and B : H − → H + are trace-class operators, and f A ∈ F and f * B ∈ F * are the states defined from A and B in (B.5) and (B.8), respectively. Identities like (B.10) are probably known, but we did not find a convenient reference for the proof.
It will be useful to represent the elements of H = L 2 (S 1 , C N ) using an isomorphism H L 2 (S 1 , C) called blending. Introducing the canonical basis (e 1 , . . . , e N ) of C N , one may map where D S is the matrix obtained from D by deleting all rows and columns in Z \ S.
We may further decompose S ⊂ Z into two sets P = S ∩ Z ≥0 and H = S ∩ Z <0 . The block structure of D implies that P and H have the same cardinality. Using the blending isomorphism we may represent A as a Z ≥0 × Z <0 -matrix A b , and B as a Z <0 × Z ≥0 -matrix B b . Due to the block structure of D one may factorise det(D S ) as det(D S ) = det(B HP )det(A PH ), (B.14) where A PH is obtained from A b by deleting all rows with indices not contained in P and all columns having indices not in H, with B HP defined in an analogous way.
The formula following by inserting (B.14) into (B.13) can be directly compared to the representation of f * B , f A in terms of the expansion with {f ı ; ı ∈ I} and {f * ı ; ı ∈ I} being bases for F and F * , respectively, such that f *  , f ı = δ ı, .
The blending isomorphism relates N-component vectors ψ(z),ψ(z) on a punctured disc to fermions φ(z),φ(z) on an N-fold cover of the punctured disc with modes being related as φ nN +s−1 = ψ s,n ,φ nN +s =ψ s,n . The Fock-space F thereby gets an alternative representation as Fock space of a single species of free fermions. A useful pair of dual bases for F and F * can be generated from the vectors To prove (B.17a) one may use the identities (B.18) following directly from the definition of f A , allowing us to calculate A b m 1 n l (−) l−1 f * 0 , φ np . . . φ n l+1 φ n l−1 . . . φ n 1φ m 2 . . .φ mp f A Using this identity recursively, and comparing the result with Laplace's formula for det(A PH ) one gets the identity (B.17a). The proof of (B.17b) is completely analogous.

C. On the factorisation of free fermion conformal blocks
Given the relation between tau-functions and conformal blocks pointed out above, the representations of the form (6.24) can be recognised as special instances of the gluing construction in conformal field theory, allowing one to construct conformal blocks on a Riemann surface C which can be decomposed into two subsurfaces C out and C in by cutting along a simple closed curve from the conformal blocks associated to the subsurfaces. The goal of the rest of this subsection is to outline a proof of (6.24) based on such ideas from conformal field theory.
As a preparation let us consider solutions Ψ(x) to the Riemann-Hilbert problem on C = C 0,n in the case where z 1 = 0. For this case we will first introduce operators Y Ψ : F σ → F 0 satisfying for ı = 0, ∞, with C ∞ being a circle separating ∞ from z 1 , . . . , z m , C 0 being a circle separating z 1 = 0 from z 2 , . . . , z m , ∞, and g ∈ W ∞,0 ,f ∈W ∞,0 , with 3) The intertwining conditions (C.1) can be used to determine all matrix elements of Y Ψ up to the constant f * 0 , Y Ψ · f σ F . One may fix the normalisations of Y Ψ , f Ψ and f * Ψ,σ in such a way that Let us recall from Section 6.1.2 the factorisation of the Riemann-Hilbert problem induced by the decomposition of C into C in and C out . We are now going to demonstrate that the state f Ψ can be represented in the factorised form To this aim let us verify that the right hand side satisfies the identities (5.39) defining f Ψ uniquely up to a constant. This is not hard. Restricting g ∈ W to C out clearly defines an element g out of W ∞,0 (Ψ out ). We may therefore calculate The first two terms cancel due to (C.1). According to the discussion in Section 6.1.2 we have g out (x) = g in (q −1 x)T = g in q,κ (x) on A ⊂ C. As f in satisfies by definition ψ ∞ [g in q,κ ] · f in = 0, we see that the last term in (C.6) also vanishes. The other half of the identities (5.39) is verified in a completely analogous same way.
One should keep in mind that the space of conformal blocks of the free fermion VOA is onedimensional. This means that the conformal block f Ψ is proportional to a conformal block defined by the gluing construction. By choosing the normalisations of Y out and f in appropriately we may ensure that the representation (C.5) for f Ψ holds. It remains to notice that in order to complete the proof of (6.24).