Pregnancy test

How long should you wait after having sex to take a pregnancy test