Text this: Diatomic molecule as a quantum entanglement switch