  Andreev bound states are fermionic states localized in weak links between
superconductors which can be occupied with spinful quasiparticles. Microwave
experiments using superconducting circuits with InAs/Al nanowire Josephson
junctions have recently enabled probing and coherent manipulation of Andreev
states but have remained limited to zero or small fields. Here we use a
flux-tunable superconducting circuit in external magnetic fields up to 1T to
perform spectroscopy of spin-polarized Andreev states up to ~250 mT, beyond
which the spectrum becomes gapless. We identify singlet and triplet states of
two quasiparticles occupying different Andreev states through their dispersion
in magnetic field. These states are split by exchange interaction and couple
via spin-orbit coupling, analogously to two-electron states in quantum dots. We
also show that the magnetic field allows to drive a direct spin-flip transition
of a single quasiparticle trapped in the junction. Finally, we measure a gate-
and field-dependent anomalous phase shift of the Andreev spectrum, of magnitude
up to approximately $0.7\pi$. Our observations demonstrate new ways to
manipulate Andreev states in a magnetic field and reveal spin-polarized triplet
states that carry supercurrent.
