The electric field gradient in Cd−Mg alloys