Improving the thermal stability by anchoring both ends of chromophores in the side‐chain nonlinear optical polymers