  Superconducting circuits reveal themselves as promising physical devices with
multiple uses. Within those uses, the fundamental concept of the geometric
phase accumulated by the state of a system shows up recurrently, as, for
example, in the construction of geometric gates. Given this framework, we study
the geometric phases acquired by a paradigmatic setup: a transmon coupled to a
superconductor resonating cavity. We do so both for the case in which the
evolution is unitary and when it is subjected to dissipative effects. These
models offer a comprehensive quantum description of an anharmonic system
interacting with a single mode of the electromagnetic field within a perfect or
dissipative cavity, respectively. In the dissipative model, the non-unitary
effects arise from dephasing, relaxation, and decay of the transmon coupled to
its environment. Our approach enables a comparison of the geometric phases
obtained in these models, leading to a thorough understanding of the
corrections introduced by the presence of the environment.
