 Associated with any observable is its spectrum, the range of possible values that the observable can take on.  Given any physical system and any observable for that system, one can always form a Hilbert-space representation for the quantum theory of that system by considering complex-valued functions on the spectrum of that observable.  The set of such functions form a vector space. Given a measure on the spectrum of the observable, we can form a Hilbert space out of the set of complex-valued square-integrable functions on the spectrum by treating functions that differ only on a set of zero measure as equivalent (that is, the elements of our Hilbert space are really equivalence classes of functions), and by using the measure to define an inner product (see  entry on Quantum Mechanics  if this terminology is unfamiliar).