Quantum-nondemolition measurements using dissipative atom-field coupling: Monte Carlo wave-function approach | Synapse