Say one has a classical Hamiltonian system with generalised coordinates $q$ and conjugate momenta $p$. After canonical quantization, promoting them to operators $\hat{q}, \hat{p}$, how can one determine if their eigenvalues are discrete or not ?
For example the eigenvalues for the position operator $\hat{x}$ are almost always taken to be continuous. But for $\hat{p}_x$ it depends on the phase space, if $x\in [a,b]$ then the eigenvalues are discrete, if $x\in \mathbb{R}$ they are not. So is there a general procedure (which also works for more abstract coordinates than e.g. position) by which one can get the appropriate Hilbert space and determine if the eigenvalues are continuous or not ?
I assume one needs some basic understanding of mathematical quantum mechanics/ functional analysis.