Structural and electronic properties of wide band gap Zn1-xMgxSe alloys