Polymer-based hybrid integrated optical photochromic switch