Multistate electrically controlled photoluminescence switching