Grammar-aware sentence classification on quantum computers