  We propose a general correspondence which associates a non-perturbative
quantum-mechanical operator to a toric Calabi-Yau manifold, and we conjecture
an explicit formula for its spectral determinant in terms of an M-theoretic
version of the topological string free energy. As a consequence, we derive an
exact quantization condition for the operator spectrum, in terms of the
vanishing of a generalized theta function. The perturbative part of this
quantization condition is given by the Nekrasov-Shatashvili limit of the
refined topological string, but there are non-perturbative corrections
determined by the conventional topological string. We analyze in detail the
cases of local P2, local P1xP1 and local F1. In all these cases, the
predictions for the spectrum agree with the existing numerical results. We also
show explicitly that our conjectured spectral determinant leads to the correct
spectral traces of the corresponding operators. Physically, our results provide
a non-perturbative formulation of topological strings on toric Calabi-Yau
manifolds, in which the genus expansion emerges as a 't Hooft limit of the
spectral traces. Since the spectral determinant is an entire function on moduli
space, it leads to a background independent formulation of the theory.
Mathematically, our results lead to precise, surprising conjectures relating
the spectral theory of functional difference operators to enumerative geometry
