We derive a system of TBA equations governing the exact WKB periods in
one-dimensional Quantum Mechanics with arbitrary polynomial potentials. These
equations provide a generalization of the ODE/IM correspondence, and they can
be regarded as the solution of a Riemann-Hilbert problem in resurgent Quantum
Mechanics formulated by Voros. Our derivation builds upon the solution of
similar Riemann-Hilbert problems in the study of BPS spectra in N=2
gauge theories and of minimal surfaces in AdS. We also show that our TBA
equations, combined with exact quantization conditions, provide a powerful
method to solve spectral problems in Quantum Mechanics. We illustrate our
general analysis with a detailed study of PT-symmetric cubic oscillators and
quartic oscillators.Comment: 42 pages, Typos corrected, references are added, published versio