Lets consider this particular problem. We are interested in computing the expected value of a distribution $p(x|z)$ under $p(z)$. A common choice is to use importance sampling and the example considered here will use the posterior distribution $p(z|x)$ as the proposal.
\begin{equation} p(x) = \frac{1}{K} \underset{k}{\sum} \frac{p(x,z_k)}{p(z_k|x)};\, z_k \sim p(z_k|x) \end{equation}
The problem I am interested in is when the posterior distribution is not computable. In this case, we can still draw samples from the posterior using Hamiltonian Monte Carlo. However, in this case, how can we evaluate the density in the denominator $p(z_k|x)$ for the $z_k$ samples drawn from the Markov Chain?
Thanks.