I'm a maths student who would also like to know a bit about quantum physics. I keep reading that possible states of a system are represented by elements of a certain Hilbert space $\mathcal{H}$. This question is about which Hilbert space $\mathcal{H}$ is supposed to be.
From a few brief conversations I have had with people smarter than me, I've gathered that $\mathcal{H}$ is supposed to be $L^2(X)$ for some measure space $X$. But this just raises further questions. First of all, and most importantly, why have I never come across this information officially? In textbooks, lecture notes and some information that I have found online, they just tell us that quantum physics takes place on $\mathcal{H}$, which is some Hilbert space, not $L^2$ specifically. Is this because the details of $L^2$ are irrelevant to the physics? This surprises me, since in Terence Tao's An Epsilon of Room Part I, exercise 1.12.36 is to prove Heisenberg's Uncertainty Principle using just facts from Fourier analysis about $L^2$!
Supposing that we do indeed have $\mathcal{H}=L^2(X)$, what on earth is $X$ supposed to be? If $\psi\in L^2(X)$ with $||\psi||_{L^2(X)}=1$ is supposed to be a wavefunction, then it makes sense to me that for a single particle we would have $X=\mathbf{R}^3$, because then $|\psi|^2$ would be just a probability density for the position of the particle. The problem would then be if there were a lot of particles in the system of interest. What happens, for instance, if there are countably many particles?
Another problem with this hypothesis that $\mathcal{H}=L^2$ is that restricting our attention to only those $\psi\in L^2$ with $||\psi||=1$ seems to get rid of the point of working in a vector space. It no longer makes sense to add and subtract the elements because then they will no longer be wavefunctions. Moreover, we will only be working with the very specific class of linear operators that preserve norms. Even worse is the apparent restriction that $\psi$ be smooth, as in the Heisenberg and Schrodinger equations. Maybe this means that we have to restrict our attention to those $\psi\in \mathcal{S}\subseteq L^2$ like in Tao's question 1.12.36 (not forgetting that $||\psi||=1$). This seems even more restrictive.
I suppose there are other Hilbert spaces of interest, such as certain Sobolev spaces. I don't know a huge amount about these except for that they are pretty similar to $L^p$ spaces but with differentiation. Using these solve the conundrum about the Heisenberg/Schrodinger equations, but would just make me more confused as (a) it would no longer make sense for $\psi\in H$ to be like analogous to a probability density and (b) Tao's question 1.12.36 would no longer make as much sense.
This is a pretty wordy question which might be answered in just a single sentence or two, but I certainly would appreciate the help.
Edit: I think this question is appreciably different to the one Daniel asked. My question is on a lower level of understanding for one. Another difference is that Daniel's question is specifically about replacing $L^2$ with Sobolev space rather than asking about the general use of Hilbert spaces in quantum physics.