Landau–Zener transitions and Rabi oscillations in a Cooper-pair box: beyond two-level models