Sex after miscarriage

How long after an early miscarriage did you wait to have sex?