  We develop randomized matrix-free algorithms for estimating partial traces.
Our algorithm improves on the typicality-based approach used in [T. Chen and
Y-C. Cheng, Numerical computation of the equilibrium-reduced density matrix for
strongly coupled open quantum systems, J. Chem. Phys. 157, 064106 (2022)] by
deflating important subspaces (e.g. corresponding to the low-energy
eigenstates) explicitly. This results in a significant variance reduction for
matrices with quickly decaying singular values. We then apply our algorithm to
study the thermodynamics of several Heisenberg spin systems, particularly the
entanglement spectrum and ergotropy.
