In this talk, I will describe an algorithm for computing expectation values of observables in the equilibrium states of local quantum Hamiltonians, both at zero and positive temperature. The algorithm is based on convex optimization and relies on a characterization of Gibbs states in terms of energy-entropy balance inequalities. Importantly, the algorithm outputs rigorous lower and upper bounds, which allows us to show that expectation values of local observables can be approximated in finite time, contrasting related undecidability results. Based on joint work with Omar Fawzi and Samuel Scalet (arXiv:2311.18706).