Lecture Notes on the Theory of Open Quantum Systems