Hilbert Space-Phase Space map Given that a classical phase space quantity $A_{cl}(x, p_{x})$ is related to the quantum operator $\hat{A}$ in Hilbert space as
$
A_{cl} = e^{-ik_{x}x} \langle x|\hat{A}|k_{x}\rangle = \langle x|\hat{A}|k_{x}\rangle \langle k_{x}|x\rangle
$
By integrating over phase space one obtains the following expression:
$
\int dx \int \frac{dp}{2\pi\hbar}  A_{cl}(x,p_{x}) = \int dx \langle x|\hat{A}|x\rangle = Tr( \hat{A})
$
However, it is not clear to me how the Hilbert space operator can now be expressed via the following expression:
$
\hat{A} = \int dx \int \frac{dp}{2\pi\hbar} |x\rangle \langle x|\hat{A}|k_{x}\rangle \langle k_{x}|
$
 A: This can be shown by noting that
$$
\hat{A} = 
\operatorname{id} \hat A \operatorname{id} 
=\left(\int dx\, |x\rangle \langle x|\right)  \hat{A}\left(\int \frac{dp}{2\pi\hbar} |k_{x}\rangle \langle k_{x}|\right)
$$
A: We have the completeness relations
\begin{align}
\int \mathrm dx \lvert x\rangle\langle x\rvert &= \hat 1
&
\int \frac{\mathrm dp}{2\pi\hbar}\lvert k_x\rangle\langle k_x\rvert &= \hat 1
\end{align}
where $\hat 1$ is the identity operator.
Seeing that $\lvert x\rangle\langle x\rvert \hat A$ does not depend on $p$, one can move that vactor out of the $p$ integral:
\begin{align}
\int\mathrm dx \int \frac{\mathrm dp}{2\pi\hbar} \lvert x\rangle \langle x\rvert\hat{A}\lvert k_{x}\rangle \langle k_{x}\rvert &= \int\mathrm dx \lvert x\rangle \langle x\rvert\hat{A}\int \frac{\mathrm dp}{2\pi\hbar} \lvert k_{x}\rangle \langle k_{x}\rvert\\
&= \int\mathrm dx \lvert x\rangle \langle x\rvert\hat{A}\hat 1 = \int\mathrm dx \lvert x\rangle \langle x\rvert\hat{A}
\end{align}
Similarly, $A$ also does not depend on $x$, therefore on the left side one can use the completeness relation for $x$ in the same way.
