All optical switching by entangling quantum dot states in a photonic crystal cavity