Viologen-based conjugated ionic polymer for nonvolatile rewritable memory device