EN
We report both decrease and increase in the 2D carrier gas density in a simple (Cd,Mn)Te/(Cd,Mg)Te heterostructure with (Cd,Mn)Te quantum well. The two effects were achieved by light with different photon energies. The quantum wells were 10 nm wide with 2D hole gas supplied by surface states. For the sample with 25 nm cap layer thickness, it was possible to tune the hole gas concentration from almost empty well (hole density below 1×10^{10} cm^{-2}) to 45×10^{10} cm^{-2}. The illumination with 425 nm wavelength almost doubled the hole gas density from the initial 24×10^{10} cm^{-2}. The depletion mechanism was most effective for illumination with the orange (575 nm) light.