We analyze the decay of quantum oscillations in a charge qubit consisting of a Cooper pair box connected by a Josephson junction to a finite-size superconductor. We concentrate on the contribution of quasiparticles in the superconductors to the decay rate. Passing of a quasiparticle through the Josephson junction leads to the escape of the qubit out of its Hilbert space, and thus determines the decay rate of quantum oscillations. We find the temperature dependence of the quasiparticle contribution to the decay rate for open and isolated systems. The former case is realized if a normal-state trap is included in the circuit, or if just one vortex resides in the qubit; we find exponential suppression of the rate, Γ ∝ exp (−∆/T ), at low temperatures (here, ∆ is the superconducting gap). In a superconducting qubit isolated from the environment Γ ∝ exp (−2∆/T ) if the number of electrons is even, while for an odd number of electrons the decay rate remains finite in the limit T → 0. We estimate Γ for realistic parameters of a qubit.