  We study the photon shot noise dephasing of a superconducting transmon qubit
in the strong-dispersive limit, due to the coupling of the qubit to its readout
cavity. As each random arrival or departure of a photon is expected to
completely dephase the qubit, we can control the rate at which the qubit
experiences dephasing events by varying \textit{in situ} the cavity mode
population and decay rate. This allows us to verify a pure dephasing mechanism
that matches theoretical predictions, and in fact explains the increased
dephasing seen in recent transmon experiments as a function of cryostat
temperature. We investigate photon dynamics in this limit and observe large
increases in coherence times as the cavity is decoupled from the environment.
Our experiments suggest that the intrinsic coherence of small Josephson
junctions, when corrected with a single Hahn echo, is greater than several
hundred microseconds.
