A teacher who was found to have repeatedly had sex with one of her former pupils has been banned from the profession.