Controlled ion-beam transformation of electrical, magnetic, and optical materials properties