Realization of an ion trap quantum classifier