  The relation between supersymmetric gauge theories in four dimensions and
quantum spin systems is exploited to find an explicit formula for the Jost
function of the $N$ site $\mathfrak{sl}_{2}$ $XXX$ spin chain (for infinite
dimensional complex spin representations), as well as the $SL_N$ Gaudin system,
which reduces, in a limiting case, to that of the $N$-particle periodic Toda
chain. Using the non-perturbative Dyson-Schwinger equations of the
supersymmetric gauge theory we establish relations between the spin chain
commuting Hamiltonians with the twisted chiral ring of gauge theory. Along the
way we explore the chamber dependence of the supersymmetric partition function,
also the expectation value of the surface defects, giving new evidence for the
AGT conjecture.
