  In superconducting qubits, the interaction of the qubit degree of freedom
with quasiparticles defines a fundamental limitation for the qubit coherence.
We develop a theory of the pure dephasing rate \Gamma_{\phi} caused by
quasiparticles tunneling through a Josephson junction and of the inhomogeneous
broadening due to changes in the occupations of Andreev states in the junction.
To estimate \Gamma_{\phi}, we derive a master equation for the qubit dynamics.
The tunneling rate of free quasiparticles is enhanced by their large density of
states at energies close to the superconducting gap. Nevertheless, we find that
\Gamma_{\phi} is small compared to the rates determined by extrinsic factors in
most of the current qubit designs (phase and flux qubits, transmon, fluxonium).
The split transmon, in which a single junction is replaced by a SQUID loop,
represents an exception that could make possible the measurement of
\Gamma_{\phi}. Fluctuations of the qubit frequency leading to inhomogeneous
broadening may be caused by the fluctuations in the occupation numbers of the
Andreev states associated with a phase-biased Josephson junction. This
mechanism may be revealed in qubits with small-area junctions, since the
smallest relative change in frequency it causes is of the order of the inverse
number of transmission channels in the junction.
