In this article we continue our study of chiral fermions on a quantum curve. This system is embedded in string theory as an I-brane configuration, which consists of D4 and D6-branes intersecting along a holomorphic curve in a complex surface, together with a B-field. Mathematically, it is described by a holonomic D-module. Here we focus on spectral curves, which play a prominent role in the theory of (quantum) integrable hierarchies. We show how to associate a quantum state to the I-brane system, and subsequently how to compute quantum invariants. As a first example, this yields an insightful formulation of (double scaled as well as general Hermitian) matrix models. Secondly, we formulate c = 1 string theory in this language. Finally, our formalism elegantly reconstructs the complete dual Nekrasov-Okounkov partition function from a quantum Seiberg-Witten curve.