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 transition spectrum of the transmon allows us to probe the ground-state parity of the quantum dot as a function of the gate voltages, the external magnetic flux, and the 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-π qubits and Andreev qubits.Received 28 February 2022Revised 23 May 2022Accepted 24 May 2022DOI:https://doi.org/10.1103/PRXQuantum.3.030311Published by the American Physical Society under the terms of the Creative Commons Attribution 4.0 International license. Further distribution of this work must maintain attribution to the author(s) and the published article's title, journal citation, and DOI.Published by the American Physical SocietyPhysics Subject Headings (PhySH)Research AreasCircuit quantum electrodynamicsCoulomb blockadeHybrid quantum systemsImpurities in superconductorsJosephson effectKondo effectLifetimes & widthsProximity effectQuantum phase transitionsSpin-singlet pairingPhysical SystemsJosephson junctionsNanowiresQuantum dotsSemiconductorsSuperconducting qubitsSuperconductorsTechniquesMicrowave techniquesNumerical Renormalization GroupCondensed Matter, Materials & Applied PhysicsQuantum Information