BPS Spectra, Barcodes and Walls

BPS spectra give important insights into the non-perturbative regimes of supersymmetric theories. Often from the study of BPS states one can infer properties of the geometrical or algebraic structures underlying such theories. In this paper we approach this problem from the perspective of persistent homology. Persistent homology is at the base of topological data analysis, which aims at extracting topological features out of a set of points. We use these techniques to investigate the topological properties which characterize the spectra of several supersymmetric models in field and string theory. We discuss how such features change upon crossing walls of marginal stability in a few examples. Then we look at the topological properties of the distributions of BPS invariants in string compactifications on compact threefolds, used to engineer black hole microstates. Finally we discuss the interplay between persistent homology and modularity by considering certain number theoretical functions used to count dyons in string compactifications and by studying equivariant elliptic genera in the context of the Mathieu moonshine.


Introduction
In supersymmetric theories one often can gain deep insights by studying the properties of protected states. States which preserve a fraction or all of the supersymmetries can be used to get exact results about quantities of physical interest. Such states are usually directly related to geometrical quantities, such as enumerative invariants, or to the mathematical structures underlying the physical models.
For example the BPS spectral problem in quantum field theories is deeply related to the structure of the quantum vacuum and plays an important role in understanding various dualities [1]. In black hole physics, the exact enumeration of microstates is a problem of prime importance as it provides a quantum statistical derivation of gravitational thermodynamics [2,3]. Furthermore in many cases the duality properties of a theory directly imply modular properties of the partition functions. In all these cases the counting problem has roots in various areas of mathematics and has important physical consequences.
In general one is lead to investigate the structures underlying such counting problems. For example if the counting can be organized according to the representation theory of some group or algebra, then one has identified a fundamental principle in the physical theory. The typical situation is however less direct and often a consequence of several structures simultaneously.
Consider for example the case of N = 2 SU(N) super Yang-Mills theories on R 3 × S 1 . The moduli space of vacua is the Hitchin moduli space and is hyperKähler [4]. The latter condition is guaranteed by the fact that the BPS spectrum of the theory obeys a wall-crossing formula [5]. The latter originates from the theory of generalized Donaldson-Thomas invariants, which encodes the behavior of stable objects in a (derived) category under a change of stability conditions [6]. As a consequence the moduli space of vacua is locally a (generalized) cluster variety, the overlap transformations between charts being dictated by a cluster algebra [7]. The BPS spectrum can also be seen as the set of stable representations of the quiver underlying this cluster algebra [8] and has a deep connection with integrable systems [9].
In many physical cases the situation is similar and the study of the structure of the set of supersymmetric states leads to several layers of increasing complexity. In this paper we take a step back and ask the following question: is there any structure at the topological level? In particular we can consider a collection of supersymmetric states simply as a set and study its properties using topological methods. The purpose of this note is to investigate the presence (or absence) of any noticeable topological feature in certain samples of supersymmetric states. In particular we will be interested in how these features change as the parameters of the theory are changed, or if one considers a similar problem in different settings.
To be more precise, with topological features we mean the properties of the spectra as seen from the perspective of persistent homology [10,11]. Persistence is a relatively new approach to homological features of a space or a set, and is at the core of what is by now known as topological data analysis [12,13,14]. This field proposes to handle multidimensional and large sets of data using methods based on topology. This approach has been quite useful in disparate fields, such as biology, neuroscience or complex systems [15,16,17,18,19]. In this note we will apply such methods to supersymmetric spectra, computed directly or extracted from certain number theoretical functions.
In essence topological data analysis is a multi-scale approach to extracting homological features out of a set of data, focused on identifying those features which persist over a long range of scales. The idea consists in defining a family of simplicial complexes which depend on a continuous proximity parameter . For each value of one can pass to the homology of the complex and study how it varies as a function of . At each length scale the homology is characterized by its homology classes; as the length scale changes new homology classes can form or already existing classes can disappear, depending on the evolution of the underlying simplicial complex. The set of data is characterized by the lifespans, or persistence, of said homology classes. These lifespans can be more easily visualized as a collection of intervals on the line, which begin at the value of at which the homology class appears and end when it disappear. Such collections of intervals are called barcodes.
We will consider a supersymmetric spectrum as a dataset, where each point is labelled by the charges or the relevant quantum numbers of a state, and by its degeneracy, or BPS enumerative invariant. We will then proceed to apply the methods of topological data analysis to compute the homology of this set as a function of a proximity parameter and compute its barcodes for each non-trivial homology group. The set of barcodes gives a complete characterization of the persistent homological features of the supersymmetric spectra. We will then discuss how these topological characteristics vary between different datasets. Roughly speaking we will do so in two ways: or by comparing spectra obtained within the same physical theory but as the parameters are varied; or by studying different models which can be however associated with a very similar physical problem.
We will discuss at length how the expected physical features show up in the topological analysis. In many cases this will be apparent from the barcodes, in others a bit more care will be required. Overall we will learn how to apply the methods of topological data analysis to BPS counting problems and argue which kind of information we can hope to extract. We will do so with many examples. In this paper we will focus more in detail on supersymmetric spectra, but the formalism is more general and can be applied to other counting problems. Applications of persistent homology to the study of string vacua will appear in [20].
To keep this note readable we have included very brief reviews of the physical problems at hand. This material is known, but we have chosen to present it in such a way as to highlight the role played by BPS invariants. All the computations in persistent homology have been done with the program matlab using the library javaplex, made available in [22]. The accompanying software and datasets are available in [21]. For the extraction of the BPS invariants and the manipulations of the relevant series we have used mathematica.
This paper is organized as follows. Section 2 will give some background about BPS states, their wall-crossing behavior and their enumerative interpretation. In Section 3 we will give an elementary introduction to the ideas of persistence and discuss the methods of topological data analysis. This Section is meant to be readable by non-experts and to quickly convey the main ideas. Section 4 contains our first application, to N = 2 SU(3) super Yang-Mills, where we compare the topological features of the BPS spectrum in the weak coupling chamber with those in a wild chamber. The interplay between persistent homology and wall-crossing is also the focus of Section 6, which dis-cusses the case of the conifold in detail, using some approximation schemes introduced in Section 5. Section 7 takes a different approach; here we compute the Donaldson-Thomas invariants for a few distinct one parameter compact Calabi-Yaus, compare their distributions and discuss the implications for black hole physics. Section 8 is about a different class of black holes, in N = 4 string compactifications. In this case the relevant partition functions have modular properties and we discuss the interplay between modularity and topology. Section 9 takes a similar approach, now in the context of elliptic genera in the Mathieu moonshine correspondence. In this case, the technical details of the topological analysis are postponed to the Appendix A. We summarize our finding in Section 10.

BPS states and wall-crossing
In this note we will consider certain field and string theories with extended supersymmetry. In this Section we will quickly review some general properties and postpone a more detailed description to later Sections on a case by case basis. The theories we shall consider all have moduli spaces of quantum vacua M. These moduli spaces often have a direct geometrical interpretation, for example parametrizing deformation of a compactification manifold or solutions of certain differential equations. Determining M captures the vacuum structure of the theory. In theories with extended supersymmetry one can often give a remarkably precise local description of the moduli spaces M, in the form of an answer determined at weak coupling plus a series of quantum corrections.
On top of the geometry of M, there is other physical information which can be computed exactly. In this note we will be interested in the spectrum of BPS states, which is very closely related to the series of quantum corrections which determine the moduli space of quantum vacua M. These quantities are particularly important because due to the amount of supersymmetry preserved, they allow for the extrapolation of weakly coupled computations to strong coupling. In other words they are one of the few available sources of non-perturbative information in quantum theories.
Supersymmetric theories have a Hilbert space of states H upon which the supersymmetry generators act as operators. States in H can be organized according to the representation theory of the supersymmetry algebra. BPS states are characterized by the fact that a certain number of supersymmetry generators are represented trivially. The fact that a BPS state is annihilated by certain operators is a rather strong constraint, in many cases strong enough to reduce quantum corrections to a computable form.
To be concrete consider N = 2 theories in four dimensions. We denote by Γ the lattice of electric and magnetic conserved charges, as measured at spatial infinity and at a point in the moduli space of vacua. For example in a string theory compactification or engineering, this lattice can be realized as the homology of a certain variety. The lattice of charges is endowed with the antisymmetric Dirac pairing , This pairing vanishes identically on the charges of particles which are mutually local. The conserved charges of Γ divide the Hilbert space of states into superselection sectors. The BPS degeneracies Ω(γ; u) count with signs the number of BPS states with charge γ ∈ Γ. They are defined as traces over the single particle BPS Hilbert space H BP S u = γ∈Γ H BP S γ;u , filtered by the charge measured at spatial infinity.
The single particle Hilbert spaces H γ;u and the BPS degeneracies Ω(γ; u) depend explicitly on a point u ∈ M. The constraints arising from supersymmetry are such that Ω(γ; u) has a very specific dependence on u ∈ M: it is a piecewise constant function, almost independent on the physical parameters except for certain codimension one walls in M, at which it jumps suddenly. This is the wall-crossing phenomenon. At walls of marginal stability the change in the BPS degeneracies Ω(γ; u) describe physical processes of fusion or fission of BPS particles from or into elementary constituents. The wall-crossing of the BPS degeneracies is a very strong constraint on the consistency of a theory at the quantum level [1]. The moduli space of vacua M is divided by the walls of marginal stability into chambers C . Solving the BPS spectrum of a theory amounts in finding the Ω(γ; u) in each chamber.
Walls of marginal stability MS are defined as the loci in moduli space where the central charges of two or more BPS particles become parallel. In theories with extended supersymmetry the central charge is realized as an holomorphic function over the moduli space M, For example, a two body decay of a state with charge γ into two elementary constituents γ 1 and γ 2 is kinematically allowed at the locus In many cases the central charge function has a very explicit description: in four dimensional quantum field theories is given by the integral of the Seiberg-Witten differential λ over a cycle of the Seiberg-Witten curve whose homology class correspond to a charge γ ∈ Γ. Similarly in Calabi-Yau compactifications of the type II string it is given by an integral of the holomorphic (3, 0)-form over 3-cycles.
More formally we can usually describe BPS states as objects in some abelian category A.
In concrete examples A could be the category of representations of a certain quiver with potential rep (Q, W), or the category of coherent sheaves on a Calabi-Yau threefold X, coh(X). This is not completely correct as a more precise account would require objects in the bounded derived category D(A), but for the purpose of this Section we will neglect these issues. In these cases there is an isomorphism which identifies the lattice of conserved charges Γ with the topological Grothendieck group K(A).
In the above cases the isomorphism is given by the Chern character in the case of coh(X) and by the identification of the simple representations with a basis of BPS states in the case of rep (Q, W).
In any case we can regard the central charge as a stability function on A, at fixed u ∈ M which to any object E ∈ A associates a complex number Z u (E). We say that a BPS state described by an object E is Z-stable if arg Z u (F ) < arg Z u (E) for any proper sub-object F of E. Note that the stability condition explicitly depends on u ∈ M and therefore on the parameters of the theory. As these parameters are varied, the stability condition changes and a stable object may become unstable.
Since all that matters is the phase of the complex number Z u (E), we will loosely speak of a BPS state as a BPS ray γ associated with the BPS state of charge γ, a vector in the complex plane C (which we will refer as the central charge plane), as is by now common use [5,8].
The change in Ω(γ; u) across a wall of marginal stability is governed by a wall-crossing formula [6,23,24]. The Kontsevich-Soibelman wall-crossing formula (KSWCF) states that a certain product of operators, which depends on the stable BPS charges and on the BPS degeneracies, remains invariant across walls of marginal stability as to compensate for the change in the degeneracies Ω(γ; u). To describe the KSWCF we need a few more ingredients. We introduce the torus T Γ = Γ ⊗ Z C * and formal variables X γ for each γ ∈ Γ, which enjoy the property The operators K γ are automorphisms of the algebra of functions on T Γ which act as To state the KSWCF we choose an angular sector A in the central charge plane. Then the KSWCF states that the phase ordered product is invariant across walls of marginal stability, under the assumptions that no BPS state enter or leaves the sector A. See [25] for a more in depth review.
The situation for N = 4 theories is similar. One can still define a central charge function Z as a moduli dependent function which at a point in the moduli space associates to a state a charge dependent complex vector. The BPS condition now depends on the amount of supersymmetry preserved. It is customary to use the notation (P , Q) to indicate the charge of a generic 1/4 BPS dyon, while 1/2 BPS states are necessarily purely electrically or magnetically charged. The degeneracies of BPS states can be defined as certain helicity supertraces over the Hilbert space of states. The main difference in the wall-crossing behavior respect to the N = 2 case is that now only two bodies decays are allowed, namely of a 1/4 dyon into two 1/2 BPS states.
In this Section we have review very briefly some basic properties of BPS states in supersymmetric theories. The set of stable BPS states has clearly a lot of structure, which has lead to deep physical insights and beautiful mathematics. These structures have deep algebraic and geometrical origin in the theory of generalized Donaldson-Thomas invariants and of wall-crossing structures [6,26].
In this note we want to investigate their features from a rather different perspective: we will look at the set of BPS states as a distribution of points and try to understand its topological properties, and how these change upon crossing walls of marginal stability. But first we have to set up the appropriate tools.

Persistent homology
In this Section we will introduce the concept of persistent homology and explain its uses in the context of topological data analysis. The idea behind persistence is to study topological features of a space as a function of the length scale [10,11]. When applied to a set of datas, the topological analysis extract qualitative features, which are independent on any particular metric or coordinate system used, and robust to noise. In our exposition we will mainly follow the reviews [12,13,14].
The techniques of topological data analysis are increasingly common in many fields such as biology, neuroscience, complex systems or the study of language, see [15,16,17,18,19] for a sample of the literature. An application of these techniques to the study of string vacua appears in [20].

Homology of simplicial complexes
Homology captures intrinsic topological information of a space. To a topological space X we assign a collection of abelian groups H i (X) whose independent elements formally correspond to topological features of X, such as its number of components or holes. The computation of the homology of a space is a standard procedure to study its topology. There are several ways to do this, as well as several homology theories which can be defined.
A very convenient approach uses simplicial complexes. We can think of a simplicial complex as a triangulation of a space, whose elements are vertices, edges and faces and so on, and which can be studied with combinatorial or algebraic techniques. A simplicial complex S is a pair consisting of a finite set V of vertices and a family Σ of non-empty subsets of V . The collection Σ is defined by the property that if σ ∈ Σ and τ ⊆ σ, then τ ∈ Σ, which for example implies that if a certain simplex is part of Σ, so are its faces. The k-simplexes of Σ form the subset Σ k of simplexes with cardinality k + 1.
For example a standard simplicial complex associated to a metric space X is theČech complex. Let B (x) be the standard ball of radius centered at x ∈ X. Assume that we can find a set V ⊂ X so that X = v∈V B (v). Then theČech complex is defined aš This is a particular example of the nerve construction.
In this note we will be interested in a version of this construction, applied to a very particular case. We define a point cloud X as a collection of points {x i } i∈I in R N . To a point cloud X we associate the Vietoris-Rips complex VR (X) as where d( , ) is the standard distance function on R N . In other words a simplex is identified by the pairwise intersection of radius /2 balls. Note that we can generalize immediately the definition of theČech complex to point clouds. The fact that the Vietoris-Rips complex VR (X) is defined only in terms of pairwise intersection makes it much more amenable to algorithmic computations than theČech complexČech (X). These complexes are related by the inclusionš which imply that the Vietoris-Rips complex is a good approximation to theČech complex. Note also that the two complexes have a natural orientation which follows by declaring that a k-simplex [v 0 , · · · , v k ] changes sign under an odd permutation.
To a simplicial complex S we can associate its homology as follows. We define the group of k-chains C k by taking formal linear combinations of k-simplices as c = i a i σ i where a i ∈ Z p for a prime number p. On C k we define the boundary operator ∂ k : where the elementv i is omitted in the right-hand side. This operator can be used to define the chain complex and out of this the homology of S. To this end we introduce the spaces of k-cycles Z k (S) = ker ∂ k and of k-boundaries B k (S) = Im ∂ k+1 . Then the k-th homology group H k (S) is defined as the quotient Z k (S)/B k (S). The Betti numbers are the ranks of the homology groups, b k = dim H k (S) = dim Z k (S) − dim B k (S), and measure the number of k-cycles which are not k-boundaries.
A very important feature of this construction is its functoriality. A simplicial map f between two simplicial complexes S 1 and S 2 , is a map between the corresponding vertex sets such that a simplex σ of S 1 is mapped into a simplex f (σ) of S 2 . A simplicial map takes a p-simplex into a k-simplex, with k ≤ p. A simplicial map f : S 1 −→ S 2 induces a map between the vector spaces of p-chains, . Collecting all the induced maps we form the chain map C • (f ), that is a collection of maps · · · / / C p (S 1 ) In particular a chain map C • (f ) induced by the simplicial map f , induces a map between homology groups f : It will be important for us the case when the simplicial map f is the inclusion. Then by functoriality f keeps track of the individual homology classes of H i (S 1 ) inside H i (S 2 ), that is it contains the information whether an homology class remains non-trivial or not.

Persistent homology and barcodes
In order to define persistent homology we need to introduce a few preliminary notions. Consider a field K. An N-persistence K-vector space (or module) is a collection of vector spaces {V n } n∈N over K indexed by a natural number n ∈ N together with a collection of morphisms ρ i,j : V i −→ V j for every i and j so that i ≤ j. We further require a compatibility condition, that is ρ i,k · ρ k,j = ρ i,j whenever i ≤ k ≤ j. Morphisms between N-persistence vector spaces {V n } and {W m } are naturally defined as a collection of maps f i : commute. The same construction can be generalized to abelian groups, simplicial complexes, chain complexes and so on. More formally a version of these arguments can be applied to any category Cat to define the category of N-persistence objects N pers (Cat).
There is a particular class of N-persistence modules which are of interest in topological data analysis. A persistence module {V i } i∈N is called tame if: i) each V i is finite dimensional, and ii) ρ n,n+1 : V n −→ V n+1 is an isomorphism for large enough n. The reason such modules are interesting is that N-persistence tame K-modules are in one to one correspondence with finitely generated modules over the graded ring K[t]. The fact that the latter are finitely generated allows for a classification theorem for persistence modules, in terms of their barcodes [11].
In order to explain this classification theorem, we define the N-persistence module K (m, n) as where m ≤ n are two integers, m is non-negative and n can be infinity. The morphism ρ is simply ρ i,j = id K for m ≤ i < j ≤ n. K (m, n) is also known as an interval module, which assigns a non-trivial vector space only to a certain interval.
The classification theorem then states that a given tame N-persistence K-module admits the unique (up to ordering of factors) decomposition A tame persistence module is therefore completely specified by a collection of N intervals, for a certain N ∈ N, to which we assign a non-trivial vector space. An important consequence of this theorem is that we can completely specify a persistence module by its barcode. A barcode is simply the collection of non-negative integers (m i , n i ), where 0 ≤ m ≤ n and eventually n can be +∞, which specify when the persistence module is non-trivial. This classification result is a generalization of the well known fact from elementary algebra that ordinary vector spaces are classified up to isomorphisms by their dimension. In a similar fashion persistence modules are characterized by a sequence of intervals. We will represent graphically such a collection of intervals by drawing a series of bars (hence the name barcode).
The reason these facts are important for us is that the persistent homology of a point cloud (or of any topological space) gives a persistent module. Then a barcode becomes a very effective tool to summarize and visualize homological features.
Consider a point cloud X, a collection of points in R N . We denote by X the point cloud X where every point x ∈ X has been replaced by a ball B (x) of radius centered at x. We regard X as a continuous family of topological spaces indexed by the real variable ∈ R ≥0 , with X 0 = X. For any fixed collection of values 0 = 0 < 1 < 2 < · · · , we have the sequence of inclusions Similarly for each X we construct the associated Vietoris-Rips complex VR /2 (X). Again this is a continuous family of simplicial complexes parametrized by . On the other hand only for certain values of the simplicial complexes will be distinct, and again for those parameters we have a sequence of inclusions For each VR (X) we construct the associated chain complex with coefficients in Z p , with p a prime. Then passing to the i-th homology gives the N-persistence module (3.14) Technically both VR (X) and the H i (VR (X); Z p ) are really R-persistence modules, indexed by the real variable . However only for a finite number of 's these complexes are really distinct, and we can therefore talk of N-persistence modules. More formally we pick any order preserving map N −→ R and construct the N-persistence modules out of the R-persistence modules we have just defined, as explained more in detail in [12].
Note that all this construction relies essentially on the functoriality of homology. The maps in (3.14) are those induced by the inclusions of (3.13). Without these maps (3.14) would just be a collection of vector spaces. It is immediate to see, and follows just from the definition of homology and from its functoriality, that these maps obey all the required properties to define a persistence module.
In particular this means that for every i the N-persistence module in (3.14) is completely characterized by a collection of barcodes. These barcodes capture topological features of the point cloud X.
In this case we can also give a perhaps more direct description of the barcodes. The inclusions between topological spaces lift to maps between the homology groups; we call this map for a ≤ b . Then we define the i-th persistent homology group H a,b i = Im f a,b i , or more explicitly , (3.16) where for simplicity we have not written down the inclusions.

Barcodes and topological features
Let us expand a bit on the interpretation of the barcodes. Barcodes are a visual device which represent the number of persistent generators in the i-th homology group H i (VR (X); Z p ). Given two values of the proximity parameter 1 < 2 , a persistent homology class along the interval [ 1 , 2 ] is a non-trivial homology class in H i (VR 1 (X); Z p ) which is mapped into a non-trivial homology class in H i (VR 2 (X); Z p ).
Consider the barcodes at a fixed value of . This means that we are looking at the point cloud X at a certain characteristic scale given by . At this scale the generators of H i (VR (X); Z p ) capture topological features of the data set: they represent i-dimensional configurations of points shaped as cycles which are not boundaries, meaning delimiting "holes" which are not filled up by other points. The persistence of these generators is a measure of how long these holes last as the value of the proximity parameter increases. Intuitively the clearer is the topological feature, for example if a certain hole contains none or very few points in its interior, the longer the persistent homology class lasts. A non-trivial long-lived persistent class in H i (VR (X); Z p ) indicates that the points in the data set cluster around a i-cycle without "filling it up".
For example persistent homology classes in H 0 (VR (X); Z p ) measure the number of connected components in the point cloud as a function of the length scale. At very small values of each barcode correspond to a point in the original point cloud X. As increases, neighbor points will form a single connected component. Long-lived barcodes are evidence for clustering of data into different regions. This could indicate for example that the data have a tendency to accumulate towards a certain point or area. A clear division into connected areas with similar behavior, for example the repetition of the same pattern in the barcodes, could also be regarded as evidence of an existing symmetry in the underlying physical problem.
A similar reasoning holds for higher homology groups. A persistent generator of H 1 (VR (X); Z p ) which is long-lived implies that at different length scales a certain area of the point cloud X is naturally well approximated by a one-dimensional manifold with the topology of an empty circle S 1 . Similarly non-trivial elements of H i (VR (X); Z p ) will generically suggest that a certain region of the point cloud X can be approximated by a higher dimensional manifold with a given topology. The fact that data live on a certain shape can for example suggest a good coordinate system to approximate the point cloud; in general the presence of non-trivial persistent topologies in X is a hint of the existence of correlations between the data points, for example in the form of a set of equations which constrain regions of X.
When discussing the barcode distribution for H i (VR (X); Z p ), we will loosely use the terminology: barcodes at Betti number i, barcodes in degree i, or barcodes for H i .

An example
Before we proceed to apply these techniques to the study of BPS states, let us go through a simple example. We take for our point cloud X the simple configuration of points shown in Figure 1. We want to understand its topological features using persistent homology, and in the process explain how to apply the relevant techniques step by step.
The configuration of points in Figure 1 has a clear hexagonal shape. From a topological perspective this is equivalent to say that the points are distributed along a circle. While this is clear just by looking at the Figure, we would like to abstract this information in a collection of barcodes. What we gain in this abstraction will be clear in the following Sections, where we will have to confront higher dimensional point clouds where no simple visualization tool is available. We draw the relevant barcodes in Figure 1 on the right. As with all the persistent homology computations in this paper, to obtain the barcodes we wrote a matlab program available in [21]. Let us follow the formation and demise of persistent homology classes in "time" .
We draw different stages of the evolution in Figure 2. At = 0 we just have the original six points and there is nothing worth noticing: the homology obviously gives six distinct connected components and no further feature. At = 1 two edges form, as shown in Figure 2. As a consequence the first homology of the Vietoris-Rips complex should capture the four connected components of X =1 . Indeed we see that precisely at = 1 two homology classes disappear, corresponding to the formation of two edges connecting the respective vertices. Therefore immediately before = 1 there are six persistent homology classes in degree 0 corresponding to six barcodes; immediately after two of these classes have become trivial in homology (two vertices are the boundary of an edge) and only four barcodes are left. At = 1.5 we see that a 1-cycle form has formed. Any point has an edge connecting it to its two nearest neighbors. By now each individual zeroth homology class but one has died by merging into a single class, and the only barcode left for H 0 signals the only connected component of the simplex. On the other hand we see a non trivial barcode for H 1 , corresponding to the non-trivial cycle in the Vietoris-Rips complex.
When we reach = 2.5 each one of the six original points of the hexagon is now at a distance less then from each other point. As a consequence a face of the simplex has formed. The persistent homology class of H 1 has already disappeared, corresponding to the fact that the non-trivial one In yellow the balls around the points of the point cloud X, whose radius /2 is determined by the proximity parameter. At = 1 we see the formation of two edges and at = 1.5 a complete one-cycle. As we increase new simplexes form and the one-cycle becomes the boundary of a face in the Vietoris-Rips complex, thus disappearing from the homology.
cycle we saw at = 1.5 is now the boundary of the face shown in Figure 2.
In this way the persistent homology of the point cloud X captures its essential topological features: the number of points is determined by the H 0 barcodes at small values of the proximity parameters; the existence of a long-lived persistent homology class at H 1 is tantamount to the statement that the point cloud X has "the shape of a circle"; finally the number of H 0 barcodes present at large values of , in this case just one, is an information on the number of clusters in the distribution of points.
Note that whether we call a class long-lived or short-lived depends somewhat on the context. In this case we could identify the barcode at H 1 directly as an interesting topological feature of the hexagonal point cloud X because we knew of its shape. In general one needs some physical input from the problem at hand, as we will see repeatedly in the following Sections.

BPS spectra in theories of class S[A K ]
We have discussed techniques to extract topological information out of a distribution of points. In this Section we will apply these techniques to BPS states in supersymmetric quantum field theory. We will consider N = 2 SU(3) super Yang-Mills and construct two point clouds X out of the distribution of BPS states in two different chambers. Then we will use the tools of persistent homology to compare their features. We will also learn how to extract physical information out of the barcodes.
Most of the recent progress in understanding BPS spectra has been focussed on theories of class These theories can be seen as the low energy limit of the compactification on R 3,1 × C of the six dimensional N = (2, 0) superconformal theory. This perspective provides an alternative description of many physical quantities in terms of the geometry of the curve C.
In this context the moduli space of quantum vacua is the Coulomb branch B which parametrizes tuples u = (φ 2 , · · · , φ K ) of meromorphic differentials with prescribed singularities. The Wilsonian effective action of the theory in the Coulomb branch is completely determined by a family of curves Σ u , which are K-fold branched coverings of C. Σ u inherits a natural holomorphic one form λ u which descends from the Liouville one-form on C.
The lattice of electric and magnetic charges Γ is identified with a quotient of H 1 (Σ u ; Z) by the lattice of flavor charges. For any state of charge γ ∈ Γ, the central charge is given by where we have identified the charge γ with an homology class in H 1 (Σ u ; Z). Given the pair (Σ u , λ u ) the central charge is in principle known at any point u ∈ B.
The BPS spectra of theories of class S[A K ] have striking and unexpected features for K > 2.
Firstly these theories will generically have higher spin BPS supermultiplets at generic points in their Coulomb branch. Secondly, and more surprisingly, they have wild spectra: chambers where the number of BPS states with mass less or equal to a given mass M grows exponentially with M . These features were demonstrated explicitly for SU (3) super Yang-Mills with N = 2 in [27] and are believed to hold generically. This phenomenon gives a striking example of the type of understanding of quantum field theory that we gain by studying the wall-crossing behavior of BPS states. With these techniques available to perform controlled computations at various values of the coupling constant, even a relatively simple quantum field theory such as SU(3) Yang-Mills with N = 2 is full of surprises.
We will now apply the formalism outlined in Section 3 to this theory. In particular we will discuss the topological features of the BPS spectrum in a weak coupling chamber and study their behavior as we cross a wall of marginal stability into a wild chamber. We will see that the differences are quite striking, even at the topological level.
In this particular case, the Seiberg-Witten curve Σ is a three sheeted covering of C, which has the topology of a cylinder, with six ramification points: One way to compute the BPS spectra is to start from a chamber where the spectrum is known and then apply the wall-crossing formula (2.7). The strong coupling region is characterized by small values of the moduli u 2 and u 3 and has a finite spectrum consisting of six hypermultiplets. The spectrum generator decomposes as For this theory the rank of the charge lattice Γ is four and we have picked a basis {γ i }, with i = 1, 2, 3, 4, so that γ 1 , γ 2 = γ 2 , γ 3 = γ 3 , γ 4 = −2 and γ 1 , γ 3 = γ 2 , γ 4 = 1 and all the other parings are vanishing.
From a mathematical perspective the study of the BPS spectrum can be recast in terms of quiver representation theory [8]. In this case the relevant quiver has the form We have labelled the nodes of the quiver such that the simple representation at a node • i corresponds to a BPS hypermultiplet of charge γ i . The signed number of arrows connecting the node • i with the node • j is the pairing γ i , γ j .
We can be a bit more precise with the enumerative problem we are considering. Given a certain quiver Q, we consider the path algebra of the quiver CQ over C as the algebra of paths, where the product is defined as concatenation of paths in Q whenever possible, or zero otherwise. The Jacobian algebra J W = CQ/ ∂ W arise by considering the quotient by the equations of motion which follow from the superpotential W. Then physical states are described in terms of the category of left modules J W − mod, which is equivalent to the category of quiver representations with relations rep(Q, W).
We can use the central charge Z γ (u) at a point u ∈ B to impose stability conditions on the physical states. More precisely identifying the simple representations of Q with a basis of charges gives an isomorphism between Γ and K(rep(Q)) so that we can let the central charge act on representations of Q. Since the central charge is linear, it is enough to specify its action on a the objects of rep(Q) corresponding to a basis of Γ. In particular at a point u ∈ B, the central charge function Z γ (u) specifies an ordering for the phases of the objects corresponding to a basis of charges of Γ. Since what defines the walls of marginal stability are the phases of the central charge for the physical states, this identifies a chamber C in the moduli space B.
Therefore at any point in u ∈ B we know, in principle, the value of the central charge and we can identify stable BPS states with Z-stable representations of Q, modulo isomorphisms classes of representations. We denote by M Z d (Q) the moduli space which parametrizes isomorphism classes of Z-stable representations of Q with dimension vector d. The dimension vector determines the charge of a BPS state as γ = i d i γ i , where the sum runs over a basis of Γ. Then we obtain the physical moduli space of BPS states M Z d (Q, W) as the scheme-theoretical critical locus of the superpotential W.
Finally we identify the BPS degeneracies with the Donaldson-Thomas invariants of M Z d (Q, W) defined as the virtual Euler characteristics of the moduli space of stable BPS states [28]. The virtual Euler characteristic of a scheme X is defined as as an integral against the Euler characteristic of Behrend's constructible function ν X : X −→ Z. At a smooth point of X, ν X is just a sign. The Donaldson-Thomas invariant (4.6) is basically an Euler characteristic weighted with signs, similarly to the physical definition of degeneracies as a trace over an Hilbert space weighted with signs.
We will now apply this discussion to the quiver (4.4). For a point u ∈ B the central charge function Z γ (u) identifies a chamber and a stable BPS spectrum. We have shown the spectrum in the strong coupling chamber in (4.3). By moving in B we cross walls of marginal stability and the BPS spectrum changes accordingly. Each time we can compute the spectrum with the wall-crossing formula (2.7). This allows us to determine the BPS degeneracies in the weak coupling chamber and study the persistent homology of its distribution. From the weak coupling chamber we will move in the wild chamber, where again the enumerative invariants can be computed (albeit not in closed form) with the wall-crossing formula. We shall see that the distribution of Donaldson-Thomas invariants in the wild chamber has striking features which are visible already at the level of the barcodes. From a more mathematical viewpoint our results concern the topological variations in the distribution of virtual Euler characteristics of moduli spaces of stable quiver representations, as the stability condition changes.

Weak coupling chamber
From the strong coupling chamber we follow a path p in the Coulomb branch B towards the region of weak coupling. This path crosses four walls of marginal stability: MS(γ 1 + γ 3 , γ 2 + γ 4 ), MS(γ 1 , γ 2 ), MS(γ 3 , γ 4 ) and MS(γ 1 , γ 2 + γ 4 ), in this order, ending within a chamber C . For each of these walls the two charges whose central charge becomes parallel have pairing equal to two: each time the situation is a direct analog of the transition from strong to weak coupling in pure SU(2) super Yang-Mills, and each time a similar spectrum is generated consisting of a vector multiplet shrouded by an infinite cloud of hypermultiplets. In this chamber the spectrum can be written down explicitly. Following [27] we introduce the notation where k n means that the product is taken in order so that the value of k increases from left to right starting from n, and similarly for k m. Then the spectrum in C This spectrum contains four vectormultiplets and an infinite series of dyonic stable hypermultiplets.
Now we look at the topological structures of this spectrum, using the Rips-Vietoris complex. That is we consider a point cloud X in R 5 where each vector has the form x = (d 1 , d 2 , d 3 , d 4 , Ω(γ; u)), where γ = 4 i d i γ i is the charge of a stable particle and u ∈ C . After constructing the filtered Rips-Vietoris complex as explained in Section 3, we pass to the homology over Z 2 and compute the barcodes. They are shown in Figure 3. The point cloud consists of 84 states and the construction of the filtered Vietoris-Rips complex involves a total of 5348 simplices 1 . Non-trivial persistent homology classes are present only for H 0 and H 1 .
For future reference we show in Figure 3 on the right the barcodes with the logarithm of the (absolute value of the) degeneracies, that is obtained from the point cloud (d 1 , d 2 , d 3 , d 4 , log |Ω(γ; u)|). Note that this change does not really modify the BPS point cloud substantially, since all the non vanishing degeneracies are 1 or −2 for hypermultiplets and vector multiplets respectively. On the other hand the relative distance between points are now different and as a consequence the total number of simplices changes, in this case increases to 13708. The distribution of barcodes does not deviate significantly between Figure 3 on the left and on the right, as expected.

Wild chamber
Now we cross the wall MS(2γ 1 + γ 2 , γ 2 + γ 4 ) to enter into the wild chamber C . Note that 2γ 1 + γ 2 , γ 2 + γ 4 = 3, which implies that in this chamber the BPS quiver has a representative in its mutation class which contains the 3-Kronecker quiver as a subquiver. In crossing the wall a plethora of higher spin multiplets is generated with wild degeneracies. The spectrum is given by where Ξ(2γ 1 + γ 2 , γ 2 + γ 4 ) is a so-called 3 cohort in [27]. The 3 cohort does not have a closed form Figure 4: Barcodes for the BPS spectrum in the wild chamber C expression and its BPS degeneracies have been computed in [27] only up to a total charge γ of 15. From this result we use (4.10) to construct a sample of 144 points corresponding to as many BPS states. The Vietoris-Rips complex runs over a total of 210156 simplices and its persistent homology classes (again over Z 2 ) are shown in the left in Figure 4. The exponential growth of the degeneracies shows up as the presence of many very long-lived barcodes in degree 0. This is easy to understand; due to the exponential growth of the point cloud the homology of the Vietoris-Rips complex sees many points as individual connected components for very large values of the proximity parameter .
Since the degeneracies are exponentially growing it is useful to consider also the point cloud obtained by taking the logarithm of the modulus of the degeneracies. This is merely a trick to simplify the computations of the simplices. This significantly reduces the lifespan of long-lived homology classes, also altering the number of simplices. On the other hand the features of the barcode distribution are easier to visualize, and shown in Figure 4 on the right. The total number of simplices for which there are interesting topological features is now reduced to 27766.
Across the wall we see distinctively a transition at the level of the topology of the point cloud. This is clear for example in Figure 4 (left) where the barcodes for H 0 are very long-lived. If we compare with Figure 3 (left) we see that the wild chamber has a much larger number of connected component at very large scales . This is indeed a consequence of the exponential growth in the number of states: since the degeneracies Ω(γ; u) grow exponentially the points are further and further apart and therefore at the same scale at which the points in Figure 3 are already grouped in a single cluster, the degeneracies in Figure 4 still look like many connected components. In other words at a certain threshold the values of the degeneracies begin to grow too far apart for the Vietoris-Rips complex to form edges and the homology sees each point as an individual connected component.
To have a more meaningful comparison, we turn to the logarithm of the degeneracies, so to damp the exponential growth. We will see in the next Sections that there are more refined methods, but for the moment this will be enough. We now compare the results in Figures 3 and 4 (right). The transition between the two chambers is still very clear: the barcodes in the weak coupling chamber are very regular and the dependence on the scale rather mild. On the other hand we see in Figure  4 how persistent homology captures the wilderness of the BPS spectrum. The homological features are very irregular, especially for H 1 and non-trivial 1-cycles persist at every -scale. This features terminate in Figure 4 at a certain value of only because we are using a finite sample, with roughly the same number of points as in the weak coupling chamber, but would continue indefinitely were we to increase the number of degeneracies computed via the wall-crossing formula.
This is an example of the kind of information we can get on the BPS spectra using the formalism of persistent homology. In this Section we have just compared the topological features of the BPS spectrum in two different chambers. Topology gives a clear meaning to the statement that these chambers are qualitatively different. The topological features of the two distributions are captured by the basic topological invariants of the N-persistence modules, namely the barcodes. It is remarkable that upon crossing the wall of marginal stability, the transition between the two chambers is very sharp even at the topological level.
We will now discuss a similar problem in a string theory compactification, namely the BPS spectra in various chambers of the conifold. But before that we need to refine our techniques in the next Section.

Witness and lazy witness
We have shown how to use the Vietoris-Rips complex VR to extract topological information from the BPS spectra in the form of barcodes. The computation of the barcodes is done exactly by evaluating the homology of the simplicial complex for any value of the proximity parameter . However in many cases the point cloud X is too large for a direct computation. In this cases certain approximation schemes are available, which we will now describe. These approximation schemes are suited to deal efficiently with large sets of data. The main idea is to use certain criteria to select only a certain subset L of the point cloud X, which is then used to form a simplicial complex which approximates the Vietoris-Rips complex [12].
The operator which performs such a choice is a landmark selector. The most used landmark selectors are: 1. Random selector. The most straightforward way to choose a subset L ⊂ X is by picking a number of points at random. This procedure is quite useful, although in practice it is better to choose various random subsets L and perform homological computations for each one separately. Indeed it is quite possible that a random selection would miss essential features of a point cloud X. The limitations of random selection are well known from Monte Carlo algorithms and will not be repeated here.
2. Minmax selector. This operator selects a collection of points L which, in a very specific sense, is as spread out as possible. The minmax algorithm works inductively by maximizing the distance of a point from a previously chosen set. More in detail, the algorithm starts from a randomly chosen point x 0 . Let d( , ) : X 2 −→ R be the standard distance function between points (which is inherited from the ambient metric of R N where the point cloud is embedded). The choice of the remaining points in the set L proceeds by induction. Denote by L i the minmax selection of i points in X. Then L i+1 consist of the same set to which a single point z is added, in such a way that the function d(x j , z) is maximized for each x j ∈ L i . Because of this inductive definition, the landmark selected set L will consists of points which are spread apart from each other as much as possible. Therefore in general we expect this selector to capture features of a point cloud X better than a random selector. On the other hand one has to keep in mind that there are cases where this expectation will fail: for example since the minmax selector will generically pick out outlier points, a random selector might work better with very dense sets.
Having chosen a landmark set L, we can define a version of the Vietoris-Rips complex which is based on it. We shall use two such simplicial complexes, the witness complex W(X, L, ) and the lazy witness complex LW ν (X, L, ). In both cases the vertex set is given by L; what changes is the definition of the simplices. These are defined as follows: 1 These definitions are those implemented in javaplex. It is easy to see that if 1 < 2 , then we have W(X, L, 1 ) ⊂ W(X, L, 2 ) and LW ν (X, L, 1 ) ⊂ LW ν (X, L, 2 ).
We can now use the same arguments of Section 3 to argue that by letting vary we induce filtrations of witness and lazy witness complexes and that taking the i-th homology of any such sequence as a function of defines a N-persistence module. Therefore we can easily define persistent homology groups and barcodes and use the complexes W(X, L, ) and LW ν (X, L, ) to study persistent topological features of distributions of BPS states. Unless specified otherwise, when using the lazy witness complex we will always set ν = 1 and omit it from the notation.

BPS invariants on the conifold
In our second example we consider BPS states in a local string theory compactification, the resolved conifold. The geometry is given by the total space of the fibration X = O(−1) ⊕ O(−1) −→ P 1 and has one Kähler modulus t, the complexified size of the base P 1 . We are interested in a particular class of BPS states which are given by bound states of a gas of light D0 branes and D2 branes wrapping the P 1 , with a single D6 brane wrapping the full non compact total space. Such invariants have been computed in quite some detail at any point of the moduli space [29,30,31,32].
Since the geometry is non-compact, to properly define the charges it is necessary to embed it into a compact Calabi-Yau and then take a local limit. This is done by considering a compact Calabi-Yaũ X and taking the limit where the Kähler moduli of all the homology classes become large, with the sole exception of the Kähler class of a rigid rational curve.
Since we are taking a local limit, it is enough to consider the compact Calabi-YauX in the large radius approximation. BPS states are labeled by charge vectors γ ∈ Γ, where By Poincaré duality D-branes wrapping p-cycles correspond to charges as The Dirac-Schwinger-Zwanziger pairing has the geometric definition In the large radius limit the central charge of a BPS state with charge γ is given by the integral wheret = B + i J is the complexified Kähler form given by the background supergravity two-form B-field and the Kähler (1, 1)-form J ofX. Now we take the local limit, following [29]. We parametrize the Kähler form as where t P 1 and t ⊥ are classes in H 2 (X; C) such that Now we take the local limit by sending L −→ +∞.
In this limit the relevant BPS configurations are multi-centered solutions with core charge γ c = (1, 0, 0, 0) and halo charge γ h = (0, 0, −β, n). Conventionally we write the latter as γ h = (0, 0, −m, n), where m denotes the number of times the class β wraps 2 the P 1 , β = m [P 1 ]. Walls of marginal stability can be computed explicitly as a function of m and n. In the local limit the central charges retain some dependence on the parameter ϕ. Therefore the walls of marginal stability can be parametrized on the space (z, ϕ), where the Kähler moduli space is extended by the parameter ϕ due to the local limit. Physically ϕ represent the density of the components of the B-field normal to the exceptional locus.
The walls of marginal stability are [29,30,32] MS m n = (z, ϕ) : ϕ = with n ≥ 0 and m ≥ 0. We will denote a chamber between two walls as C [MS m 1 n 1 , MS m 2 n 2 ]. Now we will study the topological features of the BPS spectra in various chambers and compare them. From a physical perspective this is similar to what we have done in Section 4, except that the BPS spectra count states in string theory and not in quantum field theory (albeit we have rendered gravity non-dynamical by taking a local limit).
This problem is also interesting from a mathematical perspective. Indeed a proper treatment of BPS particles in string theory requires to work at the level of a derived category, in this case D(coh(X)). However for practical computations one typically chooses to work in a simpler abelian category. Indeed choosing a stability condition on D(coh(X)) corresponds to the choice of an abelian category A and a stability condition on A. In this case we will discuss, for example, BPS states computed from the moduli space of ideal sheaves at large radius, or from the moduli space of cyclic modules of a quiver in a certain chamber. These objects are mathematically quite different, yet describe the same physical setting up to wall-crossings. We will provide a new viewpoint using persistent topology.

Chambers
We begin by considering the chambers of the form C [MS 1 n+1 , MS 1 n ]. These chambers are directly connected to the core region, where only the D6 brane exists as a stable state, situated near the wall with φ = 1 3 arg z + π 3 . The partition function in each chamber can be obtained by applying the KSWCF (2.7). Because of the particularly simple charge configuration of the bound states, the wall-crossing formula reduces to the semi-primitive version [33], which amounts in multiplying the partition function by the partition function of a halo of D0 and D2 branes. After crossing the appropriate walls of marginal stability, the core D6 brane will be bound to a halo of charge γ h = (0, 0, −m, n). In decreasing φ from the core region, the first walls encountered are of the form MS 1 n .
We introduce the standard notation q = e λ where λ is the topological string coupling, and Q = e −z . The resulting partition function in the chambers In these chambers the physical BPS spectrum is particularly simple and can be obtained simply by expanding (6.10) at any fixed n ≥ 0.

Large radius
At large radius the effective dynamics of the bound states is captured by a six dimensional topological field theory, which arise as the topological twist of the N = 2 supersymmetric abelian theory obtained as low energy approximation to the DBI action on the D6 brane worldvolume [34,35].
To reach this chamber one has to cross all the chambers of the form C [MS −1 n+1 , MS −1 n ] by taking smaller values for φ, for n −→ ∞. A notable feature of the large radius chamber, as well as other chambers in local threefolds, is that walls of marginal stability accumulate towards it, leaving a certain ambiguity to the statement "crossing all the walls". The behavior is similar to what happens in quantum field theory with BPS rays, which accumulate to higher spin fields. Luckily in this situation the limit can be taken analytically. The computation of the BPS spectrum can also be done directly by other means, confirming the wall crossing prediction.
Indeed BPS bound states in this chamber can be realized as singular instanton configurations [34]. More precisely the relevant physical configurations correspond to ideal sheaves, torsion free sheaves of rank one with trivial determinant. The partition function of the topological theory can be computed explicitly using equivariant localization with respect to the natural toric action on the moduli space of ideal sheaves, induced by the toric action on the resolved conifold. An equivalent but more geometric perspective is obtained by recalling that an ideal sheaf I sits in the short exact sequence where Y is a subscheme of X. The sequence (6.11) identifies the moduli space of ideal sheaves with fixed characteristic classes with the Hilbert scheme of points and curves Hilb n,β (X) parametrizing subschemes Y ⊂ X with no component of codimension one and such that where with χ we denote the holomorphic Euler characteristic.
The BPS degeneracies are given by the (ordinary) Donaldson-Thomas invariants of these moduli spaces. In this case they can be computed directly via virtual integration Ω X (n, β) = DT n,β (X) := The gauge theory partition function Z X gauge (q, Q) = k β q k Q β DT k,β (X) (6.14) can be evaluated explicitly by equivariant localization. In our notation Q β = e −m z . Such a partition function receives contributions from point like instantons located at the toric fixed points, say at the north and south pole of the base P 1 , as well as extended instantons fibered over the P 1 .
In the case of the conifold the result can be written in closed form as [34] Z We have used the partition function (6.15) to compute a large number of enumerative invariants and used them to construct a point cloud.

Noncommutative crepant resolution
In the noncommutative crepant resolution (NCCR) chamber, geometrical concepts are replaced by algebraic ones. We reach this chamber by taking smaller and smaller values of φ, crossing all walls of the form MS −1 n until we reach the region 1 3 arg z < φ < 1 3 arg(z − 1). The conifold point lies at the boundary of this region. Indeed in a noncommutative crepant resolution ordinary geometrical notions don't hold anymore and geometry is replaced by a certain algebra. Such a phenomenon is generic in toric threefolds. This algebra is the Jacobian algebra of an appropriate quiver. The center of this algebra is the equation of the singular limit of the threefold; in this sense the Jacobian algebra is a "resolution" of the singularity. The physics of such resolutions can be understood in terms of a certain deformation of a cohomological TQFT, called "stacky gauge theory", which has been discussed at length in [35,36,37]. We refer the interested reader to the review [38] for more details.
In the case of the conifold the relevant BPS states can be understood in terms of the representation theory of the framed quiver [31] a * * • a 1 5 5 The path algebra is given explicitly by where e • and e • are the trivial paths of length zero at the nodes • and •. In particular it is easy to see that the center of the algebra is the equation of the conifold singularity. In this sense the full path algebra is a noncommutative resolution of the singularity.
Again we can define BPS invariants which correspond to the degeneracies of bound states of Dbranes, the noncommutative Donaldson-Thomas invariants. Physically we can describe bound states of D2/D0 branes with a D6 brane as ground states of a supersymmetric quiver quantum mechanics with superpotential derived from (6.16). The framing node represents the infinitely massive non-compact D6 brane. From a representation theory perspective the simple representations at the unframed nodes correspond geometrically to the generators of K c (X), the K-theory group of sheaves on the conifold with compact support (equivalently sequences of vector bundles which are exact outside the exceptional locus). For more details of the correspondence between representation theory of quivers and large radius geometry in the context of BPS state counting, see [37].
The ground states of the supersymmetric quiver quantum mechanics are described in representation theory by cyclic modules. More precisely, consider the framed representation space This is precisely the situation described in Section 2. The BPS degeneracies are now defined as (weighted) Euler characteristic of the moduli spaces M n 0 ,n 1 (Q). In particular they can be computed explicitly using equivariant localization at the level of the quiver quantum mechanics, with respect to the natural toric action which rescales all the field associated with the arrows, while keeping the F-term equations ∂ a W = 0 invariant. The result can be summarized in the partition function [31] Again we can compute the BPS degeneracies by a direct expansion and we will momentarily use persistent homology to study their distribution.

Beyond the NCCR chamber
Now we move to the study of the chambers C [MS −1 −n , MS −1 −n−1 ]. In those chambers, a different qualitative phenomenon happens, namely the crossing of certain conjugation walls S after which the core charge of the bound states, identified with the D6 brane at large radius, changes [30]. These conjugation walls are associated with particles becoming massless. As a consequence there is a monodromy around the locus where the state becomes massless in the moduli space. Upon crossing such walls the core charge changes according to the monodromy, while an extra halo of particles appears to ensure charge conservation.
The partition function can be computed using the wall-crossing formula, giving [30] Here the presence of the factor n k=1 (q k Q) k is a consequence of the monodromy which a core charge Γ 0 undergoes after crossing the conjugation walls S (γ 1,l , Γ 0 ) for l = 1, . . . , n.
Each time a conjugation wall S (γ 1,l , Γ 0 ) is crossed, the core charge changes accordingly to the above monodromy, and an halo appears, made of a filled Fermi sea of particles with charge γ 1,l . Therefore the nature of the bound states changes in a qualitative fashion, and we are interested in seeing how does this change affects the distribution of BPS invariants.

Topological analysis
As we have seen the structure of BPS states on the conifold has very distinctive features in each chamber. We want now to understand at the qualitative level offered by the topological analysis how the nature of the BPS bound states differs from one chamber to another. We use the partition functions we have described above to generate a rather large number of BPS invariants, as the coefficients of the expansion In our case this partition function is given by (6.10), (6.15), (6.21) and (6.22) respectively. We have shown explicitly the chamber dependence as well as the charge vector of a state.
Since for Calabi-Yau manifolds the degeneracies of BPS states grow rather fast, we take the log of Ω(γ; C ). Therefore in all the cases our point cloud X contains vectors of the form x = (k, m, log |Ω(γ; C )|), where the chamber C is specified by the value of the moduli (z, φ). Let us understand what kind of topological information we can infer. Consider firstly Figure 5.
On the left we have the chambers close to the core region, while on the right the large radius chamber. The transition is very clear and by looking at the homology in degree one, we see that the large radius chamber presents many more topological features. In a sense moving towards large radius there is an increase in complexity as more cycles form in an irregular pattern. We interpret this as evidence that the stability condition which identifies the large radius chamber offers more possibilities to construct BPS states, while the enumerative problem in chambers nearby the core region is comparatively poorer. Interestingly the length of the long-lived persistent classes is roughly comparable. Looking at the zeroth Betti number in both cases most homology classes have died by 1.5. Also quite interesting are the similarities between the large radius chamber, Figure 5 on the right, where BPS invariants count ideal sheaves on the resolved conifold, and the noncommutative crepant resolution chamber, Figure 6 on the left, where BPS invariants count cyclic modules over the path algebra of the framed conifold quiver. Despite the difference between the enumerative problems the shapes of the barcode diagrams are roughly comparable, the main dissimilarity being the presence of more homology classes in degree zero which persist over 3 in the large radius region. Of course while we are discussing the distribution of barcodes, the actual homology classes have a different behavior in both cases, and it would be very interesting to try to interpret each interval, especially in degree one. The abundance of non-trivial 1-cycles in both cases points out that, if we try to interpret the point clouds as a discretization of an underlying geometry, at a generic point within this geometry there should exist a canonical set of circle coordinates 3 . Another intriguing phenomenon happens when continuing beyond the noncommutative crepant resolution chamber, to chambers of the form We have computed the persistent homology in Figure 6 on the right and Figure 7 for two values of the chamber label n. As n increases the barcode distribution interpolates between the noncommutative chamber and the large radius chamber. In Figure  7 the similarities with Figure 5 on the right, are striking, despite the actual generating functions being distinct. A physical interpretation of these chambers is non straightforward; as explained in [30], proceeding by keeping z fixed while sending φ to zero, makes the large radius approximation to the periods used to compute the central charges, less reliable. What we seem to be finding is that getting further and further from the noncommutative chamber, one reproduces a similar structure to large radius. Indeed this is reminiscent of the result of [31] which relates the partition function of large radius Donaldson-Thomas invariants, and the partition function of noncommutative Donaldson-Thomas invariants, with the large radius partition function of the flipped conifold, where a topology changing transition has replaced the exceptional divisor with a topologically distinct P 1 . According to this interpretation, the shape of the barcode distribution in Figure 7 seem to imply that the only difference with the large radius BPS states is the core charge, which has changed due to crossing a large number of conjugation walls S . It would be very interesting to have an independent check in the low energy effective theory.

Quantum geometry of compact threefolds
Now we want to discuss BPS invariants for a few compact Calabi-Yau varieties. So far we have fixed an underlying compactification and we have studied how the BPS spectra are affected by crossing walls of marginal stability. We will now take a somewhat different perspective, by comparing BPS spectra in different compactifications but in the "same" chamber, at large radius. What we mean by the same chamber is as follows. The topological string on a compact Calabi-Yau X captures a particular collection of BPS states which play a role in the microscopic description of certain five dimensional black holes [3], the Gopakumar-Vafa invariants [39,40]. It is generically believed, and in some cases proven, that the generating function of Gopakumar-Vafa invariants coincides with the generating function of Donaldson-Thomas invariants in a certain chamber, upon a change of variables. This chamber captures physically BPS spectra of bound states of D0/D2 branes with a single D6 brane. Having a single D6 brane means that the relevant moduli space is the moduli space of ideal sheaves on X. Implicit in the definition of an ideal sheaf, is a notion of a chamber, for which ideal sheaves represent stable objects. We will compare BPS spectra in such a chamber for different Calabi-Yaus.
We have chosen certain one parameter varieties for which a great deal is known about Gopakumar-Vafa invariants, and the topological string explicitly solved up to a certain genus [41]. Thanks to Castelnuovo's theory of curves, these results allow for the computation of several Donaldson-Thomas invariants [42].

Topological strings on one parameter CY
We will discuss the distributions of BPS invariants on certain one-parameters models where the topological string amplitudes were computed explicitly in [41] to high genus. These models have all the form of complete intersection Calabi-Yaus in weighted projective spaces. Complete intersection manifolds are constructed as the zero locus of a finite number of homogeneous polynomials in a product of projective spaces. If we denote a weighted projective space by P n−1 (w 1 , . . . , w n ), then a complete intersection CY of degree (d 1 , . . . , d k ) will be denoted by X d 1 ,...,d k (w 1 , . . . , w n ) and w m will denote the m times repetition of the weight w. For example the quintic threefold X 5 (1) is obtained as the zero locus of a single degree 5 polynomial in P 4 .
A collection of 13 such threefolds was discussed in [41]. All these one-parameter models have the property that their mirror has a Picard-Fuchs system with three regular singular points. The moduli spaces have the form M(X) = P 1 \ {0, 1, ∞} where the point denoted by ∞ denotes the point of maximal monodromy at large radius, where we will discuss BPS spectra of D-branes bound states. The other two points correspond to a conifold point and a point with rational branching, for example an orbifold point corresponding to a Gepner model. The constraints imposed by modularity on the topological string amplitudes implies that these can be written as polynomials over a ring generated by certain modular objects.
In particular the holomorphic ambiguity in the topological amplitude is fixed by the specific form of the amplitude near the conifold and orbifold points; for example at the conifold points, the "gap condition" determines the form of the poles in the amplitude via knowledge of the light BPS states, and this structure is universal [41].

BPS invariants
To the Calabi-Yaus X under consideration one can associate the partition function The topological string free energy F (X; q, t) = log Z GV (X; q, t) was computed in [41] using the techniques outline above, up to high genus. Here t represents the Kähler modulus of the Calabi-Yau, while q = e i λ , with λ the topological string coupling. The integers GV g,d are the Gopakumar-Vafa invariants of [39,40]. The free energy F (X; q, t) has an interpretation as a certain coupling in the low energy N = 2 supergravity. This term can be obtained by a one-loop computation in a constant graviphoton background, where it receives contribution from BPS particles engineered by an M2 brane wrapping a degree d curve, in the M-theory limit of the type IIA string. The Gopakumar-Vafa invariant GV g,d is a twisted supersymmetric index which captures the contribution of these particles to the effective coupling. The quantum numbers of these particles can be labelled by the representation of the little group SO(4) ∼ SU(2) L ⊗ SU(2) R . It turns out that only supersymmetric particles with quantum number g associated with representations of SU(2) L of the form contribute to the index.
These couplings and the invariants GV g,d play a very important role in the microscopical description of black holes in quantum gravity. A five dimensional black hole can be engineered via an M-theory compactification on a Calabi-Yau, by an M2 brane wrapping a curve β = d t ∈ H 2 (X, Z). The microscopic degeneracies of such a black hole, with charge β and angular momentum m in SU(2) L can be computed as functions of the invariants GV g,d , and reproduce precisely the macroscopic entropy [3].
In this Section we will be more interested in certain D-brane bound states which are dual to the above description. We will study numerical Donaldson-Thomas invariants of the moduli space of ideal sheaves of X which physically represent the degeneracies of BPS bound states of a D6 brane wrapping X with a gas of D0/D2 branes. Conjecturally the duality has the form where is the MacMahon function. Using the knowledge of the topological string amplitude computed in [41] we will follow the approach of [42] to compute the BPS invariants DT n,d up to a certain d.
By expanding (7.3) one sees that the invariant DT n,d with fixed d, receives contributions from all the invariants GV g,d with d ≤ d, but arbitrary g. Therefore in principle one should know the full right hand side of (7.3) to compute the invariants DT g,d . However for the models at hand there is an enormous simplification coming from Castelnuovo theory. Roughly speaking Castelnuovo's theory provides a bound on the genus g of a degree d curve in a projective space, and certain generalizations thereof. For the models we are studying, the Castelnuovo bound is either known or estimated in [42]. Due to the Castelnuovo bound, given a degree d, there is a g max so that for g > g max all the GV g,d are vanishing. For example for the quintic X 5 (1) Taking as inputs the invariants GV g,d of [41,42] and using Castelnuovo's theory, we have computed all the BPS degeneracies DT n,d up to d = 9 and n = 9 for the complete intersection varieties X 5 (1), X 3,3 (1 6 ), X 4,2 (1 6 ), X 3,2,2 (1 7 ), X 2,2,2,2 (1 8 ) and X 4,3 (1 5 , 2), to have an homogenous set of data to use as a point cloud. We have similar computations for the remaining of the 13 one parameter models, but with less data; the results are in line with what we will discuss momentarily but we will not include them here.

Topological analysis
We collect and discuss here our results. Out of our physical settings we construct a number of point clouds X which have the form x = (d, n, log |DT n,d |) for x ∈ X. Again we are taking the logarithm of the degeneracies. As we have already stressed this should be handled with care, since the logarithm is likely to wash out more subtle topological features in the BPS spectra. However as already explained this is not a problem in our case, since we are not using persistent homology to determine the properties of a BPS spectrum on its own, but to compare various spectra. From a purely computational perspective, taking the logarithm is almost a necessity. The BPS degeneracies that we are discussing correspond to black hole microstates and on general grounds in quantum gravity these numbers grow exponentially.
Let us apply our formalism. We construct the point cloud X with BPS spectra consisting of 108-135 states, depending on the geometry. These are all the non-vanishing Donaldson-Thomas invariants DT n,d of the compact threefold up to degree d = 9, and n = 9 (chosen in order to have point clouds of roughly the same order). Out of X we construct the family of topological spaces X and the Vietoris-Rips complex VR (X). Then we pass to the homology H i (VR (X); Z 2 ) and look at the topological features of the N-persistence modules.
One immediate feature of Figures 8-10 is that they all look rather similar. The differences between the distributions of barcodes are minimal. For certain geometries the H 0 barcodes are slightly more long-lived and for others the H 1 distribution is a bit more regular. However these differences, despite the damping due to the logarithmic scale, are still very small and it is natural to think that there is a physical mechanism behind this.
Of course there is a natural candidate for the problem at hand: the universality expected for black hole physics. The degeneracies of black hole microstates must be such as to recover the macroscopic entropy, given by the area law: for the large charges the entropy scales with the area of the black hole horizon. Furthermore the area law receives an infinite series of higher derivative corrections [43] which are expected to be determined by the topological string [44,33,45,46]. What we are seeing here is that also the topological features of the BPS spectra (but not the actual values of the BPS invariants, which fluctuate wildly between different geometries) appear to be universal. Note that the usual ideas about black hole universality refers to the emergence of universal features in the large charges expansion. Here we are dealing with the BPS spectrum without any limit (although it should be noted that from a similar partial knowledge, the authors of [42] could extrapolate a large order result which agrees with the macroscopic predictions). It is natural to believe that what we are seeing is how universal aspects of black hole physics impact the topological features of the distribution of BPS states. In particular it is not just the shape of the barcode distribution, but the actual lengths and positions of the barcodes which are comparable, both in degree zero and one. We stress again that the values of the BPS invariants and the corresponding point clouds are very different from case to case. It is natural to conjecture that this phenomenon would become more pronounced were we to increase the number of BPS invariants in the point clouds.
To be more precise we put forward the following conjecture, which we expect to be valid at least for one-parameter Calabi-Yaus: as the number of BPS invariants increases, approaching the large charge limit, the N-persistence modules associated with H 0 and H 1 tend to universal N-persistence modules. Note that if we interpret the point clouds as a discretization of an underlying surface, we can rephrase the above statement in terms of a single universal homotopy class of surfaces, governing the distribution of BPS states.
Assuming that such a conjecture is true, it would seem natural to imagine that such a homotopy class of surfaces is determined by the attractor mechanism. Unfortunately we do not now how such an explicit link could be realized.
It is clear that we cannot draw any conclusive statement from the limited spectra we have analyzed here. To check our conjecture directly would require a better knowledge of the BPS spectra to higher values of the curves' degree, and possibly for a larger sample of Calabi-Yaus.

N = 4 dyons and quantum black holes
As next example we now consider dyons in an N = 4 compactification on K3 × T 2 . The reason to consider this example is that contrary to the cases discussed in the previous section, the BPS invariants are directly constrained by modularity and appear as coefficients of certain number theoretical functions. Indeed in this case the high degree of supersymmetry and the action of the modular group SL(2; Z) × SO (22,6; Z) of S-and T-dualities allows for explicit counting functions for BPS states [47]. The number of 1/4 BPS states can be written as coefficients of the Fourier expansion of 1/Φ 10 , where Φ 10 is the Igusa cusp form of weight 10. These coefficients represent indices of BPS bound states computed at weak string coupling; as the string coupling grows the geometry backreacts and a black hole can form. Certain Fourier coefficients of this expansion then represent degeneracies of black holes microstates which can then be compared with the macroscopic thermodynamical quantities [48,45,49,50]. We will be interested in the interplay between such counting functions and modularity; the relevant counting functions are meromorphic Jacobi forms and the associated mock Jacobi forms are interpreted as partition functions of single-centered black holes [51]. We want to discuss how (mock) modularity of the microscopic degeneracies impacts the topological features of the distribution of BPS states. For a macroscopic supergravity perspective on how modularity affects the counting functions, see [52,53].
The charges of the BPS states take values in the lattice of electric-magnetic charges Γ 6,22 e ⊕ Γ 6,22 m , where each factor is isomorphic to the lattice H 2 (K3; Z) ⊕ 3 Γ 1,1 , and Γ 1,1 is an hyperbolic lattice. The microscopic degeneracies can be labelled by three T-duality invariants (n, l, m). They can be extracted from the expansion of the Siegel modular form of weight 10, Φ 10 (τ, z, v), which is itself a function of the chemical potentials for the T-duality invariants [47]. By writing w = e 2π i v , we can expand where the functions ψ m (τ, z) are meromorphic Jacobi forms of index m [51]. Similarly we will also introduce the notation q = e 2π i τ and ζ = e 2π i z . A meromorphic Jacobi form ψ(τ, z) of weight k and index m is holomorphic in τ and meromorphic in z and transforms as under the modular group, and enjoys the elliptic transformation ψ(τ, z + λ τ + µ) = e −2π i m(λ 2 τ +2λ z) ψ(τ, z) , (8.3) under translations of z by Z τ + Z, where λ , µ ∈ Z.
All the expansions we shall consider in this Section are meaningful for a particular choice of the compactification moduli which correspond to the attractor region. Explicitly we can write the meromorphic Jacobi forms ψ m (τ, z) in terms of the elliptic genus of a symmetric product of K3 surfaces [51] ψ m (τ, z) = 1 A(τ, z) We have introduced the standard notation . (8.7) and the last function will be used momentarily. The first few ψ m functions can be written down explicitly [51] We have introduced the Eisenstein series E k of weight k, with k ≥ 2, with σ k−1 (n) = d|n d k−1 and B k the k-th Bernoulli number. We will use the explicit form of these functions to compute the degeneracies of single centered black holes and study their distributions.
Meromorphic Jacobi forms are associated to mock Jacobi forms. This in practice means that the functions ψ m can be written as a sum of a finite part and a polar part Both are holomorphic in τ , but while the finite part is holomorphic also in z the polar part is not and is indeed completely determined by the poles of ψ m . The finite part ψ F m does not transform as a Jacobi form, but (8.2) is recovered upon adding the polar part ψ P m . Both ψ F m and ψ P m still enjoy the elliptic transformation (8.3).
Physically this decomposition corresponds to the fact that the Fourier coefficients of ψ F m capture the degeneracies of single centered black holes, while the polar part ψ P m determines the jump in the degeneracies due to decay into two centered black holes at walls of marginal stability [51]. More complicated decays are forbidden by N = 4 supersymmetry (in the sense that too many supercharges realized non-linearly produce too many fermionic zero modes to contribute to the relevant indices). The presence of the polar part is necessary by consistency with wall-crossing, but its contribution has to be subtracted to determine the degeneracies of single centered black holes [51]. In particular the polar part of ψ m is known for all m ψ P m (τ, z) = The function p n (m) counts integer partitions of m with n available slots. The finite part ψ F m is a mock Jacobi form of index m, which means that it can be completed by ψ P m to give the Jacobi form ψ m . If we expand ψ F m = n,l c(n, r)q n ζ l , (8.12) then the precise physical statement is that the microscopic degeneracies d(n, l, m) corresponding to single centered black holes are related to the coefficients of ψ m as d(n, l, m) = (−1) l+1 c(n, l) for n ≥ m. Furthermore on can restrict to the range 0 ≤ l ≤ m due to elliptic invariance of ψ m .
We have computed the barcodes for the coefficients of ψ F m and ψ m for m = 1, 2, 3, 4, up to a certain value of n. We want to understand the impact on the degeneracies of subtracting the two centered contribution. We have also computed the persistent homology for ψ F m relaxing the condition 0 ≤ l ≤ m to see explicitly the constraint imposed by elliptic invariance on the data set. The results are presented in Figures 11 and 12. Let us now discuss them. Consider Figure 11. The point cloud is constructed out of degeneracies d(n, l, m) of microstates of single centered black holes, obtained from subtracting the polar part from ψ m . Differently from all the cases we have seen in the previous Sections, the persistent homology of N = 4 single centered black hole degeneracies has non-trivial classes in degree 2. These are not much long-lived, albeit their lifespan is comparable with those we see in the classes for the first Betti number. These classes represent 2-cycles regularly distributed within the point cloud. One interesting feature is that their lifespans are mostly distributed around the same scale ∼ 3. Around this scale a number of 2-cycles appear simultaneously an with the same size, since all the lifespans have comparable lengths. This pattern is somewhat reminiscent of the "voids" found in the distribution of flux vacua in rigid Calabi-Yaus in [54]. In those class of type IIB string flux compactification the only complex structure parameter in the flux superpotential is the axion-dilaton τ ad . When one studies the distribution of minima of the flux superpotential in a fundamental domain of SL(2; Z) in the τ ad -plane, one discovers empty regions of the form of circles of various sizes, with a big degeneracy of vacua at the center. This pattern is due to the SL(2; Z) symmetry. It is natural to suspect that the similar structure we see in Figure 11 is due to the (mock) modularity of the degeneracy partition function. Partial evidence comes from a persistent homology study of the flux vacua of [54], discussed in [20], where a similar pattern in the persistent homology is reproduced. Figure 12: Barcodes for the spectrum of N = 4 dyons, the point cloud has the same form as in Figure 11. Left. The degeneracies include the contribution of two-centered states, and are obtained from the expansion of ψ m . The point cloud contains 254 BPS states and the persistent homology computation runs over a total of 255260 simplices. Right. Single centered degeneracies, but now relaxing the condition 0 ≤ l ≤ m, that is including modular ellitpic images. The point cloud contains 707 states and the homological computation runs over 1318999 simplices.
In Figure 12 on the left, we show the results of the same computation, now done including also two-centered black holes. The generating function is now the full ψ m and not ψ F m . The barcode distributions are essentially identical to those in Figure 11 (again we stress that the actual numbers in the point cloud are in general different). In other words the presence of two-centered solutions has no effect whatsoever at the level of persistent homology. One should note however that the expansions we are using are valid in a region of the moduli space corresponding to the attractor region. It is therefore natural that the contribution of single centered black holes is dominating. The situation in other regions of the moduli space might be rather different.
Finally Figure 12 on the right, shows again the persistent homology of single centered black holes, but relaxing the condition 0 ≤ l ≤ m. We are therefore computing the coefficients of ψ F m this time including the images under elliptic transformations. Perhaps unsurprisingly the barcode distribution is again basically the same, where however every feature is more pronounced 4 . Here we see at the level of topology the structure of a (mock) modular form: the barcodes give a visual representation of the mechanism which connects various coefficients via elliptic transformations.

Mathieu moonshine
As a final example we will apply our techniques to study the coefficients of certain number theoretical functions which play an important role in string theory compactifications on K3 geometries. Mathieu moonshine is based on the observation of Eguchi, Ooguri and Tachikawa [55] that the coefficients of the Fourier expansion of the elliptic genus of K3 can be written as sum of dimensions of the irreducible representation of the Mathieu group M 24 . This observation is a generalization of the monstrous moonshine, where the fact that sums of the dimensions of the irreducible representations of the monster group appear as coefficients in the J-function, has an explicit realization via certain modules in bosonic conformal field theory. These facts have been reviewed in [56,57,58], to which we refer the reader for further references, and whose presentation we will follow. We shall also assume that the relevant conjecture formulated in the moonshine literature are true.
In the case at hand the monster group, the largest sporadic group, is replaced by the Mathieu group M 24 , which is a subgroup of the group of permutations with 24 elements which preserves a certain fixed set, known as the extended binary Golay code. The conformal field theory is a N = 4 superconformal sigma model with target space K3. The spectrum of supersymmetric string states is encoded in the elliptic genus where q = e 2π i τ and y = e 2π i z , and L 0 , L 0 , J 0 and J 0 are the zero modes of the corresponding operators in the superconformal algebra. The trace is taken over the Ramond-Ramond sector and only the right moving ground states contribute. As a result the elliptic genus is independent of τ . Such states form a subspace of H RR which decomposes according to the representations of the N = 4 supersymmetry algebra. As a consequence the elliptic genus can be decomposed as E (τ, z) = 20 ch 1 4 ,0 (τ, z) − 2 ch 1 are the characters over the irreducible representation spaces H h,j labeled by the conformal dimension h and the su(2) spin j. In particular the A n are dimension of representations R n of M 24 (the same is also true for the first two coefficients interpreted as virtual representations).
Of course this construction is closely related to the situation of Section 8. In that case the partition function of N = 4 dyons in a string compactification on K3 × T 2 is proportional to the generating function of the elliptic genera of the symmetric products of K3s, via (8.4). In this Section we will focus on elliptic genera from a different perspective.
The elliptic genus (9.1) has an interesting equivariant (or twisted) generalization. Given an element g ∈ M 24 , we have In this case a version of (9.2) holds, where the dimension of the representations are replaced by tr Rn g (e similarly for the virtual representations) 5 . In particular we can rewrite (9.4) as where χ g = tr R g is the character of the defining representation R n of M 24 and µ(τ, z) = i y 1/2 θ 1 (τ, z) n∈Z (−1) n y n q n(n+1)/2 1 − y q n , (9.6) is an Appell-Lerch sum. The Mathieu McKay-Thompson series H g (τ ) are weight 1 2 mock modular forms, with shadow χ g η(τ ) 3 , and can be expanded as where K = ∞ n=1 K n is an infinite dimensional M 24 module [59,60,61,62]. When g = 1 1, (9.7) is the generating function of the degeneracies of massive irreducible representations of the worldsheet N = 4 conformal algebra, as they appear in (9.1) and (9.2).
The equivariant elliptic genus has the Fourier expansion E g (τ, z) = n≥0,l∈Z c g (n, l) q n y l . (9.8) Due to modularity one has c g (n, l) = c g (4n−l). These coefficients satisfy c g (k) = strK k g, whereK k is the degree k component of a certain infinite dimensional Z-graded M 24 module, obtained from K, and whose precise form is known but not relevant for the present discussion. The coefficients c g (n) thus have a precise relation to the irreducible representations of M 24 . From the determination of the exact coefficients, their distribution and asymptotic formulae, one gathers essential informations about the representation theory of M 24 and its realization as a vertex operator algebra. Now we want to address the problem from a different angle and use our formalism to understand topological features of the distributions of the coefficients of the equivariant elliptic genera E g (τ, z).
We construct a point cloud X g whose elements have the form x = (log |c g (n, l)|, n, l) for each conjugacy class associated to an element g ∈ M 24 . Using the results of [57] we construct explicitly E g (τ, z) and compute the first non-vanishing coefficients up to q 20 . Again the coefficients are growing very fast, and the logarithm of the degeneracies makes it easier to capture the essential features using persistent topology. In all cases the point cloud consists of 259 points. For each [g] listed as above, we construct the N-persistence modules H i (VR (X g ); Z 2 ) and compute their barcodes.
We collect all the results in Appendix A. All the conjugacy classes present similar topological features. It is quite likely that the explanation for this fact is modularity, which as we have seen in the previous Section produces strong constraints on the allowed persistent homology classes. We stress that we are not suggesting any relation whatsoever between the coefficients of different elliptic genera; apparently modularity has a subtle way of showing up in the topological characterization of point clouds. It would be very interesting to pursue this issue further, if one general grounds given the information of modularity one can predict persistent features in the distribution of barcodes. In this paper we will have nothing more to say on the issue.
Taking at face value that modularity constrains the persistent homology groups, there are still interesting more subtle feature in the barcode spectra. Indeed, even at the qualitative level, the barcode distributions associated with the elliptic genera E g (τ, z), fall into two families.
The first family contains the conjugacy classes: 2B, 3B, 4A, 4C, 6B, 10A, 12A, 12B, 21AB; the second family the remaining classes. What singles out the first class is that, despite having a similar form, the barcodes for the zeroth and first homology are consistently more short-lived than those in the second family. In the Betti number zero distribution, the persistent classes all die for values of the proximity parameter ∼ 2. In degree one the features are less clear-cut, the barcode distribution tends to be centered around smaller values of , and most persistent classes disappear before ∼ 3. Another striking feature is the number of simplices involved in the computation of persistent homology, which is not apparent just by looking at the Figures in Appendix A. All the classes in the second family, namely 1A, 2A, 3A, 4B, 5A, 6A, 7AB, 8A, 11A, 14AB, 15AB and 23AB generate a number of simplices roughly comparable, around 65000-68000. On the other hand the number of simplices generated in the Vietoris-Rips complex for the first family fluctuates wildly, roughly in the range 38000-135000. This indications are very qualitative, but from the behavior of the persistent homology it is natural to wonder if there is any particular property that distinguish these families. At the technical level there is a simple explanation of the appearance of these two families. The above classes in the first family all appear to have χ g = 0, which therefore acts as a relative shift of the coefficients with respect to the elliptic genera of the second family. What is however interesting here is that, with a bit of hindsight, such behavior could have been predicted just by looking at the equivariant elliptic genera, for example computed via conformal field theory, without any knowledge of the representation theory of Mathieu's groups. At a very qualitative level such features are captured by persistent homology.

Discussion
In this paper we have taken the perspective of persistent homology to analyze certain enumerative BPS invariants which arise in some physical and number theoretical problems. The focus of this paper has been the comparison between the topological features which characterize different distributions. We have done so in different ways, by studying the same theory in different limits or chambers, or by studying different theories in a similar situation. The underlying theme has been that the distributions of supersymmetric states are rich in topological information, which often can be clearly traced back to physical properties of the system under consideration. This information is qualitative, and concerns the overall structure of the space of supersymmetric states. In a sense it is a measure of its topological complexity.
On a more practical level, this note has taken to the task of exemplifying the uses of new methods based on persistent homology to study physical problems in string and field theory; as well as calling the attention of the computational topology community on the wealth of enumerative and number theoretical datasets which arise in string/field theories. From a physical perspective, to have a meaningful enumerative problem it is necessary to resort to protected quantities, in this case supersymmetric states.
In the first part of the paper we have applied the tools of topological data analysis to the wallcrossing phenomenon in N = 2 theories. The indices of BPS protected quantities jump at walls of marginal stability and the effect of the jump can be in principle computed using a wall-crossing formula. In Sections 4 and 6 we have studied how the topological properties of the BPS spectra change upon crossing certain walls. We have done so for a quantum field theory, namely SU(3) N = 2 pure Yang-Mills, which is the simple example of a theory containing wild chambers, and for string theory on the conifold. Both theories exhibit physically interesting phenomena and we have shown their impact on the persistent homology of the BPS spectra. In SU(3) Yang-Mills we have analyzed the difference at the topological level between the spectra in the weak coupling and wild chamber, where there is an exponential growth of states and higher spin particles appear. At the level of the barcodes the transition is striking, going from an ordered simple pattern to an irregular ("wild") distribution. This provides a qualitative measure of the complexity of the spectrum in wild chambers. In the case of the conifold the transitions are less apparent. In this case the physical features, for example the fact that physical states are realized as very different objects in the large radius geometrical chamber or in the noncommutative crepant resolution chamber, or the presence of conjugation walls where the core of the bound states changes, appear as rather small fluctuations in the BPS barcodes. On the other hand the conifold is known to be a very simple geometry, where all the BPS generating functions are known in closed form. It would be interesting to carry on this analysis for more complicated non-compact threefolds.
In Sections 7, 8 and 9 we have considered BPS spectra in compact Calabi-Yaus. Interestingly the series of Donaldson-Thomas invariants corresponding to black hole microstates in the large radius limit of one parameter compact threefolds, all exhibit very similar persistent features. We interpret this fact as another sense in which the microstate counting of black holes is universal. Note that in general when talking about black hole universality, one refers to the large charge limit, where the supergravity approximation is reliable. In this limit the entropy obeys the area law and the subleading corrections are expressed in terms of certain higher derivative terms [43]. Here we are looking at the first few hundreds of microstates; these data are enough to extrapolate the large order behavior, which agrees with the supergravity expectations [42]. Therefore some universal behavior is somewhat expected; it is interesting to see it arise at the level of the barcodes. Sections 8 and 9 are concerned with another aspect of the enumerative BPS problems, more precisely in a few cases where the degeneracies of microstates arise as coefficients of known functions. In this cases the relevant functions have modular properties, and we have focused on the interplay between modularity and topology. Indeed we have seen experimentally in a series of examples that modularity strongly constrains the shape of the barcode distributions. For example we have seen in Section 9 that the barcodes associated with different elliptic genera present clear similarities. Note that these functions are very different, in the sense that there is no relation between the coefficients of the Fourier expansions of different elliptic genera. On the other hand their topological features are quite similar and we interpret this fact as a consequence of modularity, although we don't have any a priori argument based on topology. Quite remarkably, the subtle differences in the barcode distributions can be explained in term of the different families of conjugacy classes of the Mathieu group M 24 .
We consider this note as a first step to understand the role that topological data analysis can play in string/field theory problems. Clearly much is left to be understood and more extensive computations of enumerative invariants are needed to put the results of this paper on firmer grounds. Also there are several other problems which seem to be amenable to a topological analysis as we have done in this paper. We list here a few which we are currently investigating: • It would be interesting to generalize this formalism to the study of string vacua. In particular a lot of compactifications of string theory are known, with N = 2 or N = 1 supersymmetry. The vacuum selection problem consists in the choice of one compactification, or a class thereof, over the others due to some particular features. It is natural to wonder if persistent homology has anything to say about this, if for examples the distributions of vacua with certain features have distinctive topological properties with respect to others. A first step in this direction appears in [20].
• A similar problem concerns the distribution of attractor points in the Calabi-Yau moduli space. These points corresponds to black holes via the attractor mechanism, and as argued in [63] they are deeply related to certain arithmetic aspects of string compactifications.
• One of the original motivations of this paper was if there is any particular distinctive feature of BPS states in quantum field theory in the presence of defects. When a theory is modified by the presence of a defect, new BPS states appear, those which can bound to the defect. For example in six dimensional topological quantum field theories such a modification is related to the conjectural enumerative problem of Donaldson-Thomas invariants for moduli spaces of parabolic sheaves [64]. In four dimensions, it was shown in [65] that for theories in which a line defect can be engineered via laminations on a curve [66], line defects come in distinct families, which are generated by the action of a cluster algebra. Each family is generated by the repeated action of a certain sequence of cluster transformations and can contain an infinite number or a finite number of elements (including just one element). It is natural to wonder if the analysis we have performed in Section 4 can be of any use in the classification problem for defects.
• Persistent homology is very closed in spirit to Morse theory. It would be interesting to give a more physical description of persistent homology classes via the correspondence between Morse theory and supersymmetric quantum mechanics [67]. Viceversa, generalization of this correspondence, for example along the lines of Floer theory, are likely to provide interesting variants of persistent homology.
• The equivariant elliptic genera that we have discussed in Section 9 are just a small set of functions which arise in the field of moonshine. It would be very interesting to generalize our formalism to other similar problems. For example, it is an open problem to understand the distribution of coefficients of the McKay-Thompson series for the monster moonshine modules. Partial results on the asymptotics are in [56] and it would be interesting to see what are the persistent features of these distributions.
We hope to report on these matters in the near future.

A Moonshine barcodes
In this appendix we collect all of the barcodes computed in Section 9. Every point cloud X g is constructed out of vectors of the form x = (log |c g (n, l)|, n, l) computed via the equivariant elliptic genus E g (τ, z). The labels of the conjugacy classes [g] are indicated on top of each Figure. Each point cloud consists of 259 states. For each conjugacy class [g] we use the Vietoris-Rips complex to compute the persistence modules H i (VR (X g ); Z 2 ). This Appendix contains all the associated barcodes distributions, each Figure labelled by the conjugacy class.