  We study the problem of computing energy density in one-dimensional quantum
systems. We show that the ground-state energy per site or per bond can be
computed in time (i) independent of the system size and subexponential in the
desired precision if the ground state satisfies area laws for the Renyi
entanglement entropy (this is the first rigorous formulation of the folklore
that area laws imply efficient matrix-product-state algorithms); (ii)
independent of the system size and polynomial in the desired precision if the
system is gapped. As a by-product, we prove that in the presence of area laws
(or even an energy gap) the ground state can be approximated by a positive
semidefinite matrix product operator of bond dimension independent of the
system size and subpolynomial in the desired precision of local properties.
