An ultraviolet based spin-electronics device includes a Si-based substrate, an n-type semiconductor layer located on the Si-based substrate, wherein the n-type semiconductor layer includes an Sn-doped β-Ga2O3 material, a p-type semiconductor layer located on the n-type semiconductor layer to form a p-n junction, the p-type semiconductor layer including MnO quantum dots, QDs, and first and second electrodes electrically connected to the n-type semiconductor layer and the p-type semiconductor layer, respectively. Spins of charge carriers in the p-type semiconductor layer are aligned according to a first direction when incident UV light has a first polarization, and according to a second direction, opposite to the first direction, when the incident UV light has a second polarization, different from the first polarization.