Necessary and sufficient conditions for a function to be the Wigner function of state For any quantum state defined with a continuous position, the Wigner function is a quasiprobability distribution on phase space. It has many properties, such as that its marginal are probability distributions, although the function itself can be negative.
Usually, people refer to the Wigner function (or any of several related function such as the Q-function, the Husimi-function, etc.) in the way that they have a quantum state and ask about the properties of its Wigner functions. Or, given Wigner functions with certain properties, what are the corresponding properties of their quantum states.
Q: I'm interested in the other direction. Given an arbitrary function from phase-space, what are necessary and sufficient conditions for this function to be the Wigner function of a quantum state?
Certainly, all mathematical properties listed in the Wikipedia article linked to above are necessary, although some are probably redundant. But are they sufficient? This paper "Wigner functions and Weyl transforms for pedestrians" also gives certain properties, but I could not find an answer to my question, neither there, nor anywhere else.
 A: Your question has, indeed, been beaten to a pulp in the 70 years of the formulation, and, as you suggested, the necessary conditions are not all independent, so parts are redundant. 
For a pure state real $f(x,p)$ the sufficient condition is straightforward,
eqn (6) of Ref. 1:
Given its Fourier transform 
(the cross-spectral density) must ``left-right" factorize,
$$ 
\tilde{f}(x,y)=\int dp ~e^{ipy} f(x,p) ~ = ~
 g^{*}_L (x-\hbar y/2) ~g_R (x+\hbar y/2)~,
$$
that is,
$$
{\partial^2 ~~~\ln \tilde{f} \qquad \qquad \phantom{a} \over 
\partial(x-\hbar y/2)~\partial(x+\hbar y/2)}
=0  ~,   
$$
so that, for real $f$,  $g_L=g_R$. Eqn (25) later achieves the same more compactly, if you know the * convention.
For mixed states, you need to do some mental footwork incorporating off-diagonal WFs. The Narkowich 1986, 1987 references in that book cover much of the waterfront.
(Basically a mixed state WF has a non-negative overlap phase-space integral with all pure state WF on the planet; so, choosing a convenient complete basis, such as oscillator eigenstates, it might be practical to check sufficiency.)
Recall the phase space moments of any and all WFs are automatically constrained to satisfy the uncertainty principle, which holds for all pure states, (and, hence, mixed ones), by the structure imposed by the above condition.
References:


*

*Thomas L. Curtright, David B. Fairlie, & Cosmas K. Zachos,  A Concise Treatise on Quantum Mechanics in Phase Space, World Scientific, 2014. The PDF file is available here.  

A: The inverse of the Wigner map is the Weyl quantization map.
Let $a(x,\xi)$ be a function of the phase space (i.e. the symbol, in mathematical terms).


*

*If $a$ is real-valued, then $(a)^{Weyl}$ is symmetric;

*Let $g(x,\xi)\in C^\infty(\mathbb{R}^{2d}; \mathbb{R}_+^*)$ such that $\partial_{(x,\xi)}^\alpha g=O(g)$ for any $\alpha\in \mathbb{N}^{2d}$ and uniformly on $\mathbb{R}^{2d}$. Then $g$ is called an order function. Now consider an order function $g$ that is also in $L^1(\mathbb{R}^{2d})$, and construct the space of symbols $S_{2d}(g)$: $a\in S_{2d}(g)$ if $a$ is smooth in $(x,\xi)$, and for any $\alpha\in\mathbb{N}^{2d}$, $\partial_{(x,\xi)}^\alpha a=O(g)$.
Then for any $a\in S_{2d}(g)$, $(a)^{Weyl}$ is trace class on $L^2(\mathbb{R}^d)$; furthermore
$$Tr (a)^{Weyl}=\frac{1}{(2\pi \hbar)^d}\int a(x,\xi)dxd\xi\; .$$
Therefore you have sufficient conditions on the symbol to be the Wigner function of a trace class symmetric operator, with trace one. Only positivity of the operator has to be checked to give a state. Unluckily I do not know how to check a priori that the Weyl quantization of a given symbol is a positive operator.
As a reference on the Weyl quantization procedure, I suggest you this book by Martinez.
A: A quantum version of the Bochner's theorem, discussed for example by Bröcker and Werner and Srinivas and Wolf, gives a necessary and sufficient condition for the Wigner function (and P- or Q- functions which can be obtained from Wigner functions by convolution/deconvolution) to correspond to a valid density operator (or a positive operator in general) by checking its Fourier transform.
