Gibbs-like ensembles and the inference of pure states