Quantum theory of nonconservative systems