How soon?

How many weeks after having sex can you check to see if you're pregnant?