  We introduce a $q$-deformation that generalises in a single framework
previous works on classical and enriched $P$-partitions. In particular, we
build a new family of power series with a parameter $q$ that interpolates
between Gessel's fundamental ($q=0$) and Stembridge's peak quasisymmetric
functions ($q=1$) and show that it is a basis of $\QSym$ when
$q\notin\{-1,1\}$. Furthermore we build their corresponding monomial bases
parametrised with $q$ that cover our previous work on enriched monomials and
the essential quasisymmetric functions of Hoffman.
