We study BPS bound states of D0 and D2 branes on a single D6 brane wrapping a CalabiYau 3-fold X. When X has no compact 4-cycles, the BPS bound states are organized into a free field Fock space, whose generators correspond to BPS states of spinning M2 branes in M-theory compactified down to 5 dimensions by a Calabi-Yau 3-fold X. The generating function of the D-brane bound states is expressed as a reduction of the square of the topological string partition function, in all chambers of the Kähler moduli space.2010 Mathematics Subject Classification: 14N35. Keywords: string theory, bound state, Fock space, Calabi-Yau manifold. §1. IntroductionThe topological string theory gives solutions to a variety of counting problems in string theory and M-theory. From the worldsheet perspective, the A-model topological string partition function Z top generates the Gromov-Witten invariants, which count holomorphic curves in a Calabi-Yau (CY) 3-fold X. On the other hand, from the target space perspective, Z top computes the Gopakumar-Vafa (GV) invariants, which count BPS states of spinning black holes in 5 dimensions constructed from M2 branes in M-theory on X [9]. Moreover, the absolute-valueThis is a contribution to the special issue "The golden jubilee of algebraic analysis".Communicated by M. Kashiwara.