  We realize a hybrid superconductor-semiconductor transmon device in which the
Josephson effect is controlled by a gate-defined quantum dot in an InAs/Al
nanowire. Microwave spectroscopy of the transmon's transition spectrum allows
us to probe the ground state parity of the quantum dot as a function of gate
voltages, external magnetic flux, and magnetic field applied parallel to the
nanowire. The measured parity phase diagram is in agreement with that predicted
by a single-impurity Anderson model with superconducting leads. Through
continuous time monitoring of the circuit we furthermore resolve the
quasiparticle dynamics of the quantum dot Josephson junction across the phase
boundaries. Our results can facilitate the realization of semiconductor-based
$0-\pi$ qubits and Andreev qubits.
