An improvement in a method of controlling lasing in a semiconductor laser
fabricated in a photonic crystal laser having a plurality of holes into
which a birefringent material with low refractive losses and low optical
loses with controllable spatial refractive index orientation has been
infiltrated comprises the step of rotating the molecular orientation or
changing the physical orientation of the birefringent material
infiltrated into the holes of the photonic crystal laser to switch cavity
modes. The liquid crystal is aligned by use of an alignable photo
addressable polymer layer adjacent to the liquid crystal. The cavity
modes are optically switched within the laser without any requirement of
external energy to maintain the lasing state of the laser, which allows
its use as a memory element.