Quantum theory of the dissipative Josephson parametric amplifier. (18th May 2017)