A cluster update (the ``operator loop'') is developed within the framework of a numerically exact quantum Monte Carlo method based on the power series expansion of $\mathrm{exp}(\ensuremath{-}\ensuremath{\beta}H)$ (stochastic series expansion). The method is generally applicable to a wide class of lattice Hamiltonians for which the expansion is positive definite. For some important models the operator-loop algorithm is more efficient than loop updates previously developed for ``worldline'' simulations. The method is here tested on a two-dimensional anisotropic Heisenberg antiferromagnet in a magnetic field.
Recently the present authors showed that the stretched-exponential critical relaxation is widely observed in classical spin systems in the nonequilibrium relaxation process of cluster algorithms. In the present article we find that this behavior can be generalized to quantum phase transitions analyzed with the continuous-time loop algorithm, where the cluster update is introduced
aprior. As an example, we consider the Neel-dimer quantum phase transition in the two-dimensional
S=1/2 columnar-dimerized antiferromagnetic Heisenberg model on a square lattice, and confirm the stretched-exponential critical relaxation consistent with the three-dimensional classical Heisenberg model in the Swendsen-Wang algorithm.