Maximum-Entropy Inference with a Programmable Annealer