Any faith that does not recognize the principle of the separation of church and state (rightly understood) is not compatible with liberal democracy and constitutional government. This is also true of some remaining Christian sects.In other words, Carson has good reason to be chary of an openly Muslim president; our current Muslim sympathizer is trouble enough. While the Long War alternately rages and smolders, openly declared by a substantial fraction of the ummah, Carson's advice is sensible.
Just about every Islamic constitution you can look up specifies not only a religious test for public office, but that Sharia codes shall be the basis for the positive law of the regime.
My analogy: electing a Muslim president now would be like electing a Communist president during the Cold War, equally nonsensical.