Ion-implantation-induced formation of metal nanoclusters in silicate glasses and in ion-exchanged waveguides