as soon as the H-1B is filed you can do it.
Also, I would suggest wait for USCIS to issue the case receipt, as properly filed, before actually "jumping ship" and starting to work for the new employer.