Discontinuous Hamiltonian Monte Carlo for discrete parameters and discontinuous likelihoods

Maybe this discussion would be helpful.