  Using first principle calculations we examine properties of (Cd,V)Te,
(Cd,Cr)Te, (Hg,V)Te, and (Hg,Cr)Te relevant to the quantum anomalous Hall
effect (QAHE), such as the position of V- and Cr- derived energy levels and the
exchange interactions between magnetic ions. We consider CdTe and HgTe,
containing 12.5% of cation-substitutional V or Cr ions in comparison to the
well-known case of (Cd,Mn)Te and (Hg,Mn)Te, and examine their suitability for
the fabrication of ferromagnetic barriers or ferromagnetic topological quantum
wells, respectively. To account for the strong correlation of transition metal
d electrons we employ hybrid functionals with different mixing parameters aHSE
focusing on aHSE = 0.32, which better reproduces the experimental band gaps in
HgTe, CdTe, Hg0.875Mn0.125Te, and Cd0.875Mn0.125Te. We find that Cr, like Mn,
acts as an isoelectronic dopant but V can be an in-gap donor in CdTe and a
resonant donor in HgTe, similar to the case of Fe in HgSe. From the magnetic
point of view, Cr-doping results in a ferromagnetic phase within the general
gradient approximation (GGA) but interactions become antiferromagnetic within
hybrid functionals. However, (Hg,V)Te is a ferromagnet within both
exchange-correlation functionals in a stark contrast to (Hg,Mn)Te for which
robust antiferromagnetic coupling is found theoretically and experimentally.
Furthermore, we establish that the Jahn-Teller effect is relevant only in the
case of Cr-doping. Considering lower defect concentrations in HgTe-based
quantum wells compared to (Bi,Sb)3Te2 layers, our results imply that HgTe
quantum wells or (Cd,Hg)Te barriers containing either V or Cr show advantages
over (Bi,Sb,Cr,V)3Te2-based QAHE systems but whether (i) ferromagnetic coupling
will dominate in the Cr case and (ii) V will not introduce too many electrons
to the quantum well is to be checked experimentally
