Make the sauce: In a small bowl, whisk together the tamarind paste, brown sugar, soy sauce, lime juice, sriracha (if using), and peanut butter (if using). Set aside.
Cook the noodles: Cook the rice noodles according to package directions until just tender. It is best to slightly undercook them, as they will finish cooking in the pan. Drain and rinse briefly with cold water to stop the cooking, then set aside.
Cook the tofu: Heat 1 tablespoon of oil in a large skillet or wok over medium-high heat. Add the tofu and cook for 6–8 minutes, turning occasionally, until golden and lightly crisp. Transfer to a plate and set aside.
Cook the vegetables: Add the remaining 1 tablespoon of oil to the skillet. Add the shredded carrot, the white and light green parts of the green onions, and the garlic. Cook for 1–2 minutes, stirring often, until fragrant and the carrots begin to soften.
Add the noodles and sauce: Add the cooked noodles to the skillet and pour over the sauce. Toss gently for 1–2 minutes, until the noodles are evenly coated and the sauce thickens slightly. If the noodles look dry, add 1–2 tablespoons of water to loosen.
Finish the pad thai: Add the cooked tofu, bean sprouts, and dark green parts of the green onions. Toss for about 1 minute, just until everything is heated through. Do not overcook the bean sprouts, they should stay a little crisp.
Serve: Divide into bowls and top with chopped peanuts, cilantro, and a squeeze of fresh lime juice.