  Quantum spin systems with strong geometric restrictions give rise to rich
quantum phases such as valence bond solids and spin liquid states. However, the
geometric restrictions often hamper the application of sophisticated numerical
approaches. Based on the stochastic series expansion method, we develop an
efficient and exact quantum Monte Carlo "sweeping cluster" algorithm which
automatically satisfies the geometrical restrictions. Here we use the quantum
dimer model as a benchmark to demonstrate the reliability and power of this
algorithm. Comparing to existing numerical methods, we can obtain higher
accuracy results for a wider parameter region and much more substantial system
sizes.
