Is there a way to fix the ordering ambiguity of canonical quantization? This question arose from my question on whether the vacuum energy is actually present for a free quantum scalar field
What is the right way to treat the vacuum energy?
Part of this discussion is that the canonical quantization suffers from ordering ambiguities. In essence, before promoting the classical Hamiltonian to an operator, one can add to it
\begin{equation}
H(x,p) \to H(x,p) +(xp-px)f(x,p). \qquad       (1)
\end{equation}
with any $f(x,p)$. This means that upon quantization $H(x,p)$ can be turned into an arbitrary function of operators $x$ and $p$.
Some people in the comments (@Prof.Legolasov at Vacuum energy of a real Klein-Gordon field) suggested that this is a settled issue and I should ask a separate question. Thus, I guess, either the canonical quantization should be equipped with a preferred ordering scheme or there are alternative ways (path integral?) to quantize things, which are free of this problem. Can anyone expand on this or give some references?
Ultimately, I am wondering whether the vacuum energy of a free scalar field is there or it appears as a result of a wrong ordering in canonical quantization.
Discussion
Let me comment on one idea suggested below.
One suggestion was that one should require that the canonical equations of motion for $x$ and $p$ should remain the same as in the classical case. In the simplest case of a free particle, one has
$$\dot x = \frac{p}{m}, \qquad \dot p =0.$$
If we insist that the same equations result from quantum commutators in the quantised case, we end up fixing $[x,H]$ and $[p,H]$. With these commutators fixed, one is only left with the freedom to add a number to the Hamiltonian -- this does not change the commutators above.
In the given case this suggestion seems very reasonable. However, I do not quite see how it can be extended to general Hamiltonians. Namely, for a general Hamiltonian the Poisson brackets $\{ x ,H\}$ and $\{p,H \}$ are some general functions of phase space variables $(x,p)$. Due to ordering ambiguities, there is no unique way how these should be promoted to operators when quantized. The reason why this logic worked for a free particle is that these brackets were ultimately simple $\{ x ,H\} \sim p$, $\{p,H \}\sim 0$: that is the first one is just one of the canonical coordinates, while the other one is zero. And, it seems natural to promote them to operators simply by $p \to \hat p$, $0\to 0$. Instead, for more general $\{ x ,H\}$ and $\{p,H \}$ there is no preferred way to promote them to operators.
In other words, I would say that the question remains open. Overall, the idea that to fix the way how functions on phase space should be promoted to commutators is to demand that their Poisson brackets are consistent with the commutators of the respective operators is problematic, as the algebra of the Poisson bracket and the Heisenberg algebra are different algebras and such a map does not exist. So, I tend to think that there is no preferable quantization. A similar discussion occurred here Physically distinct quantizations
 A: The physical content of a theory is governed by the equations of motion. In quantum theory, these are the Heisenberg equations of motion $\dot{A}(t)= i [H, A(t)]$. Replacing the original Hamiltonian $H(Q,P)$ by $H^\prime(Q,P) = H(Q,P) -i [Q,P] F(Q,P) = H(Q,P)+F(Q,P)$, with some selfadjoint operator $F(Q,P)$, would clearly change the equations of motion (and thus the physical content of the system you want to describe), unless $[F(Q,P), A]= 0$ for all observables $A$. But this implies $F(Q,P) = c \mathbf{1}$ with some arbitrary constant $c$. Thus the ordering ambiguity simply boils down to an energy shift $H \to H+c$, which you are, of course, free to do without changing the equations of motion.
Analogously, in relativistic quantum field theory, one takes advantage of the freedom to chose the origin of the energy scale by imposing the condition $P^\mu | 0 \rangle =0$ for the energy-momentum operator $P^\mu$ acting on the vacuum state $|0\rangle$. (See also the links in the comments by @Qmechanic and @ACuriousMind and the answer given by Valter Moretti in https://physics.stackexchange.com/q/751914 .)
