We study the behaviour of a single Cooper-pair box with a SQUID loop interacting with a magnetic field. We demonstrate the strong dependence of the population and the Pancharatnam phase on the magnetic flux and study the modifications when a temporal drift is present on the magnetic field. Moreover, we show that the Pancharatnam phase is more sensitive to the excitation parameters than the populations, suggesting a sensitive method for controlling the system and/or detecting flux variations.