Is every observable a function of position and momentum? In the first answer of this question it is said that every quantum observable, let's say $\hat{A}$, can be represented as a function of position and momentum observables. In other words, as I understand it, if $H$ is the Hilbert space spanned by position eigenkets, then every observable could be represented as:
\begin{equation}
\hat{A}=\hat{A}(\hat{x},\hat{p})
\end{equation}
But,  what are the mathematical (or physical?) reasons for this to be true?
Assuming this is true, then what happens if we consider the spin part of Hilbert space? Will there appear another pair of operators $(\hat{s_1},\hat{s_2})$ such that every observable in spin space can be represented as functions of $(\hat{s_1},\hat{s_2})$?
I know that this are a many questions, but I am mainly interested on the first one. Thanks!
 A: *

*In classical physics, the definition of an observable is that it is a (reasonably smooth) function of position and momentum. Therefore, quantum systems obtained purely by quantization of a classical system also have that all their observables are functions of position and momentum.

*In quantum physics, an observable is just an operator designate to belong to the "algebra of observables". There is no a priori reason to even have position and momentum operators, and indeed, systems with finite-dimensional state spaces (such as qubits or other system without a positional degree of freedom) don't have a position or momentum operator to begin with because the CCR $[x,p] = \mathrm{i}\hbar$ cannot hold on a finite-dimensional space.

*In relativistic quantum field theory (which is a type of quantum theory, in the end), there are no position operators, the closest are the so-called Newton-Wigner operators, so the question dissolves because it doesn't make sense anymore. Additionally, the momentum operator is a function of the field operators, but not vice versa - you cannot restore the field from the total momentum operator alone, like you cannot restore a function from the value of a definite integral.
A: Ok, maybe this is a proof; it is not complete, but almost.
In quantum mechanics each self adjoint operator is an observable, and so also the projector on position eigenstates $| x \rangle \langle x'|$.
Moreover, if you think to operators in $\hat{x}$ basis you can represent each one with it's matrix elements in this basis (is a bijective mapping), that is: all operators are decomposable in a sum (continuous sum $\rightarrow$ an integral) of projectors:
$$\hat{A} = \int \text{d} x~\text{d} x' \alpha(x,x') |x'\rangle \langle x|$$
So we now try to construct all the projectors in terms of $\hat{x}$ and $\hat{p}$ operators.
Restrict the case to one particle in one dimension so you have one position operator and one momentum operator (for easyness, but is general).
Diagonal elements
For the diagonal projector we can consider the operator $C ~\delta(\hat{x} - x)$, with $C$ a normalization constant. I claim that:
$$ C ~\delta(\hat{x} - x) = |x\rangle \langle x|$$
if we can choose that constant $C$ in the right way to "normalize" the delta function (you can prove that, aside from the normalization, the previous equations is true apllying it to the position eigenstates).
In this way all the diagonal element are found.
Off-diagonal elements (momentum operator)
For the off-diagonal elements $|x'\rangle \langle x|~, x \neq x'$ we can't use the only $\hat{x}$, because it has only diagonal elements but searching the matrix elements of $\hat{p}$ we find:
$$ \langle x' | \hat{p} | \alpha \rangle = - i \hbar \frac{\partial}{\partial x'} \langle x' | \alpha \rangle $$
and imposing $| \alpha \rangle = | x \rangle$ we obtain:
$$ \langle x' | \hat{p} | x \rangle = - i \hbar \frac{\partial}{\partial x'} \langle x' | x \rangle = - i \hbar \frac{\partial}{\partial x'} \delta(x-x') $$
that, if we interpret the delta as a function (that is null on all the point but $0$), means there aren't diagonal elements for $\hat{p}$, but this not sounds to me (because if true it commutes with $\hat{x}$, and this is not).
On this point I suggest:


*

*the page of Wikipedia, that support the equation

*this question, that deepens the expression of $\hat{p}$ in position basis

*this question, exactly about the problem


Generic operator
Because I can't find a univocal answer at the previous point I proceed with a two branch proof:


*

*$\hat{p}$ has only diagonal elements:
This case is clearly false, as I say previously, I continue this way to find another absurdum.
So if you have an operator $\hat{A}$ and we assume that is a function only of $\hat{x}$ and $\hat{p}$ we can expand in Taylor series:
$$ \hat{A} = A(\hat{x},\hat{p}) = \sum A_{\alpha, \beta} ~\hat{x}^\alpha ~\hat{p}^\beta $$
we can do this, because even if $\hat{x}$ and $\hat{p}$ don't commute their commutator is a scalar, so if we have a mixed term $\hat{x} \hat{p} \hat{x} \dots$ we can reorder it finding a term with the same number of operators and other terms with less operators (of lower "order", that is with lower number of operators), and we can repeat this algorithm to obtain a series with only "ordered" terms, as the one that we have write above.
Now if we calculate the matrix elements of $\hat{A}$ we find:
$$ \langle x' | A | x \rangle = \sum A_{\alpha, \beta} ~\langle x' | \hat{x}^\alpha ~\hat{p}^\beta | x \rangle = \int \text{d} x'' \sum A_{\alpha, \beta} ~\langle x' | \hat{x}^\alpha |x''\rangle \langle x'' | \hat{p}^\beta | x \rangle = \\ = \sum A_{\alpha, \beta} \int \text{d} x'' ~x'^\alpha ~\delta(x'' - x') \langle x'' | \hat{p}^\beta | x \rangle = \sum A_{\alpha, \beta}x'^\alpha ~ \langle x' | \hat{p}^\beta | x \rangle $$
But if $\hat{p}$ has not off-diagonal elements, this demonstrates that also $\hat{A}$ can't have diagonal elements, so the number of operators writable as a function of $\hat{x}$ and $\hat{p}$ are limited to the operators diagonal in position basis, that is that one that commutes with $\hat{x}$.
This is absurdum, and we proof one more time that $\hat{p}$ has to have diagonal elements in position representation.


*

*$\hat{p}$ has off-diagonal elements:
that is the only realistic case.
So I can write the expression of $\hat{p}$ in terms of position projectors, and I can select only one of them in a way similar as before:
$$ \delta(\hat{x} - x') \hat{p} \delta(\hat{x} - x) = \delta(\hat{x} - x') \left(\int \text{d} y ~\text{d} y' ~a(y,y') ~|y'\rangle \langle y| \right)  \delta(\hat{x} - x)  = \\ = \int \text{d} y ~\text{d} y' ~a(y,y') ~\big[\delta(\hat{x} - x') |y'\rangle \big]\big[\langle y| \delta(\hat{x} - x)\big]   = \\ =  \int \text{d} y ~\text{d} y' ~a(y,y') ~\delta(y'- x') |y'\rangle \langle y| \delta(y - x)   = a(x,x') |x'\rangle \langle x|$$
so with the operators $\delta(\hat{x} - x') \hat{p} \delta(\hat{x} - x)$ we can isolate all the off-diagonal elements presents in $\hat{p}$.
Conclusion
The last part of the proof is show that $\hat{p}$ operators contains all the off-diagonal elements; I give you one attempt, but is a little bit sloppy (and maybe the statement is false, but I don't find literature about, so I'll ask another question on this point):


*

*$\hat{p}$ has at least one off-diagonal element, else it commutes with $\hat{x}$ and it isn't;

*$\hat{p}$ is invariant under reference translations (think on it's eigenstates $\langle x | p \rangle = \varphi_p (x) = exp(\frac{ixp}{\hbar})$), so it matrix elements depends only on the "distance" $x - x'$ (and it's sign, because it has to be hermitian)

*under scale transformations of positions $\hat{p} \rightarrow \lambda \hat{p}$ (think again on the action on its eigenstates)


so if one elements is not null also the others has to be not null, because their distance can be reduce to the one of the not-null elements with a scale transformation.
So all the off-diagonal elements of $\hat{p}$ are not null, and I can extract them to construct the off-diagonals projectors.
Since I have construct all the projectors with only $\hat{x}$ and $\hat{p}$  now I can construct all the operators as sum, dependent only on that two operators.
