A new method uses light and special dopants to create confining potentials in semiconductors. This allows light to enter without harming crystal quality. It makes it possible to create periodic potentials.