  Given a locally consistent set of reduced density matrices, we construct
approximate density matrices which are globally consistent with the local
density matrices we started from when the trial density matrix has a tree
structure. We employ the cavity method of statistical physics to find the
optimal density matrix representation by slowly decreasing the temperature in
an annealing algorithm, or by minimizing an approximate Bethe free energy
depending on the reduced density matrices and some cavity messages originated
from the Bethe approximation of the entropy. We obtain the classical Bethe
expression for the entropy within a naive (mean-field) approximation of the
cavity messages, which is expected to work well at high temperatures. In the
next order of the approximation, we obtain another expression for the Bethe
entropy depending only on the diagonal elements of the reduced density
matrices. In principle, we can improve the entropy approximation by considering
more accurate cavity messages in the Bethe approximation of the entropy. We
compare the annealing algorithm and the naive approximation of the Bethe
entropy with exact and approximate numerical simulations for small and large
samples of the random transverse Ising model on random regular graphs.
