An optical device is provided. The optical device includes an optical grating. The optical grating includes two electrodes arranged opposite to each other and a liquid crystal (LC) composition sandwiched between the electrodes. The two electrodes provide a driving voltage to the optical grating. The LC mixture includes a host LC and one or more LC dimers dissolved as a guest in the host LC. The host LC and the one or more LC dimers have respective dielectric anisotropies of opposite signs in nematic phase. A net dielectric anisotropy of the LC mixture is substantially neutral at a predetermined temperature.