  We study the non-perturbative quantum geometry of the open and closed
topological string on the resolved conifold and its mirror. Our tools are
finite difference equations in the open and closed string moduli and the
resurgence analysis of their formal power series solutions. In the closed
setting, we derive new finite difference equations for the refined partition
function as well as its Nekrasov-Shatashvili (NS) limit. We write down a
distinguished analytic solution for the refined difference equation that
reproduces the expected non-perturbative content of the refined topological
string. We compare this solution to the Borel analysis of the free energy in
the NS limit. We find that the singularities of the Borel transform lie on
infinitely many rays in the Borel plane and that the Stokes jumps across these
rays encode the associated Donaldson-Thomas invariants of the underlying
Calabi-Yau geometry. In the open setting, the finite difference equation
corresponds to a canonical quantization of the mirror curve. We analyze this
difference equation using Borel analysis and exact WKB techniques and identify
the 5d BPS states in the corresponding exponential spectral networks. We
furthermore relate the resurgence analysis in the open and closed setting. This
guides us to a five-dimensional extension of the Nekrasov-Rosly-Shatashvili
proposal, in which the NS free energy is computed as a generating function of
$q$-difference opers in terms of a special set of spectral coordinates.
Finally, we examine two spectral problems describing the corresponding quantum
integrable system.
