  The Moyal product is used to cast the equation for the metric of a
non-hermitian Hamiltonian in the form of a differential equation. For
Hamiltonians of the form $p^2+V(ix)$ with $V$ polynomial this is an exact
equation. Solving this equation in perturbation theory recovers known results.
Explicit criteria for the hermiticity and positive definiteness of the metric
are formulated on the functional level.
