Metal complex polymer for second harmonic generation and electroluminescence applications