One says that a pair (P,Q) of ordinary differential operators specify a quantum
curve if [P,Q]=const. If a pair of difference operators (K,L) obey the relation KL=const LK
we say that they specify a discrete quantum curve. This terminology is prompted by well
known results about commuting differential and difference operators, relating pairs of such
operators with pairs of meromorphic functions on algebraic curves obeying some conditions.
The goal of this paper is to study the moduli spaces of quantum curves. We will show how to
quantize a pair of commuting differential or difference operators (i.e. to construct the
corresponding quantum curve or discrete quantum curve). The KP-hierarchy acts on the moduli
space of quantum curves; we prove that similarly the discrete KP-hierarchy acts on the
moduli space of discrete quantum curves.