Pregnancy test Q

Hope
How long after unprotected sex should I take a pregnancy test?