We present a method to approximate partition functions of quantum systems using mixed-state quantum computation. For positive semi-definite Hamiltonians, our method has expected running-time that is almost linear in ((M/(\epsilon_{\rm rel}\mathcal{Z} ))^2), where (M) is the dimension of the quantum system, (\mathcal{Z}) is the partition function, and (\epsilon_{\rm rel}) is the relative precision. It is based on approximations of the exponential operator as linear combinations of certain operators related to block-encoding of Hamiltonians or Hamiltonian evolutions. The trace of each operator is estimated using a standard algorithm in the one clean qubit model. For large values of (\mathcal{Z}), our method may run faster than exact classical methods, whose complexities are polynomial in (M). We also prove that a version of the partition function estimation problem within additive error is complete for the so-called DQC1 complexity class, suggesting that our method provides a super-polynomial speedup for certain parameter values. To attain a desired relative precision, we develop a classical procedure based on a sequence of approximations within predetermined additive errors that may be of independent interest.