On a 2n-dimensional phase-space with coordinates $x$ and $p$, the Moyal product can be written explicitly as

$$g(x,p) \star h(x,p) = g(x,p) e^{\frac{i}{2}\left( \overleftarrow{\partial_x} \cdot \overrightarrow{\partial_p} - \overrightarrow{\partial_x} \cdot \overleftarrow{\partial_p}\right)} h(x,p) \, .$$

Assume now that we have something like $f(x,p)=g(x,p)\star h(x,p),$ where we have to solve for $g(x,p)$. I suppose it's not always possible, but how would one go about solving that when it is? And what would the invertibility conditions even be? I can't seem to find the answer anywhere.

Maybe even a simpler problem, $f(x,p)=g(x,p)\star g(x,p) $ with $f(x,p)$ known. How would one take the $\star$-square root and when would it be possible?

**EDIT:** *It just dawned on me that $f=g \star g \implies g=\sqrt{f}$ since all derivatives vanish in the expansion. Of course they do... $\partial_xg \cdot \partial_p g - \partial_p g \cdot \partial_x g = 0$, so the simpler problem is actually trivial.*