  We perform a tensor network simulation of the (1+1)-dimensional $O(3)$
nonlinear $\sigma$-model with $\theta=\pi$ term. Within the Hamiltonian
formulation, this field theory emerges as the finite-temperature partition
function of a modified quantum rotor model decorated with magnetic monopoles.
Using the monopole harmonics basis, we derive the matrix representation for
this modified quantum rotor model, which enables tensor network simulations. We
employ our recently developed continuous matrix product operator method [Tang
et al., Phys. Rev. Lett. 125, 170604 (2020)] to study the finite-temperature
properties of this model and reveal its massless nature. The central charge as
a function of the coupling constant is directly extracted in our calculations
and compared with field theory predictions.
