Black swallowtail butterflies use carrot and their relatives as host plants, Robyn. Their caterpillars don't look at all like that one you have. They're striped black, yellow and green as I recall. Even when they're very small they would have stripes.