  We propose that the grand canonical topological string partition functions
satisfy finite-difference equations in the closed string moduli. In the case of
genus one mirror curve these are conjectured to be the q-difference Painlev\'e
equations as in Sakai's classification. More precisely, we propose that the
tau-functions of q-Painlev\'e equations are related to the grand canonical
topological string partition functions on the corresponding geometry. In the
toric cases we use topological string/spectral theory duality to give a
Fredholm determinant representation for the above tau-functions in terms of the
underlying quantum mirror curve. As a consequence, the zeroes of the
tau-functions compute the exact spectrum of the associated quantum integrable
systems. We provide details of this construction for the local
$\mathbb{P}^1\times \mathbb{P}^1$ case, which is related to q-difference
Painlev\'e with affine $A_1$ symmetry, to $SU(2)$ Super Yang-Mills in five
dimensions and to relativistic Toda system.
