A 25-year-old male of African descent presents to the emergency department with complaints of fatigue, jaundice, and dark-colored urine for the past two days. He had a febrile illness one week ago and recently took a sulfa-based antibiotic prescribed by a local physician. On physical examination, he has scleral icterus, pallor, and mild splenomegaly. Laboratory results reveal anemia, elevated reticulocyte count, and a peripheral smear showing Heinz bodies and bite cells. Question: What is the underlying cause of hemolysis in this patient?