It's all about earning it's trust. One of the best ways to do that (if you have a secure space to do it) is to let it come to you on it's own. I don't' think I've ever taken one of my Carpets out of it's enclosure - I've always let them come out on their own.
They don't particularly like being touched, so if you can convince it that you're not a threat, it'll eventually come out by itself and
then it's easier to handle them because they're mildly distracted by the surroundings they can explore and don't seem to mind being gently picked-up at that point.
If you do have a secure space that it can roam, let it do a few laps of that space while you slowly go about your business. It'll get used to your movements, sounds and gestures as you do your thing and it'll eventually learn that you're not out to hurt it. Once it's been out for a while and is exploring, wait for the opportune time to gently pick it up and put it back. If it wants back out, awesome, let 'r rip and repeat this a few times to it gets to understand that you're not the enemy.
Of course, when you do handle it, slow and gentle is the key. Never shuffle a snake around from hand to hand or flip it around so that it can't gain it's balance because that's how they learn to really dislike people