Read the 2nd Amendment, why are Ahmadis declared non-Muslim?
Also, read the definition of Muslim in the constitution, Article 260: "a person who believes in the unity and oneness of Almighty Allah, in the absolute and unqualified finality of the Prophethood of Muhammad (peace be upon him), the last of the Prophets and does not believe in, or recognize as a prophet or religious reformer, any person who claimed or claims to be a prophet, in any sense of the word or of any description whatsoever, after Muhammad (peace be upon him)"
According to this problematic definition of Muslim, which is quite arbitrary and was obviously formulated simply to exclude Ahmadis from the definition of Muslim, anyone who rejects the other fundamental doctrines of Islam not mentioned in Article 260 is still a Muslim, such as someone who doesn't believe in the other Prophets, or in the Angels, or in the Resurrection, or in Heaven and Hell, or in the Holy Quran.
According to Article 260, a Muslim is anyone who believes in the Oneness of Allah and that Prophet Muhammad صلى الله عليه وآله وسلم is the last Prophet. There is no mention of believing in other Prophets, the Quran, Angels, the Resurrection. There is no mention of the Five Pillars of Islam either. What an arbitrary and defective definition of "Muslim" according to the so-called Islamic Republic.
If you read the Munir Commission Report, it was recommended in the submissions that the State should avoid religious matters, because none of the Ulama and none of the sects of Islam can agree on a proper definition of Muslim. Each scholar that was consulted during the inquiry came up with a different definition of Muslim. Furthermore, major sects and their Ulama don't recognize each other as Muslim, for example, Sunnis don't recognize Shi'ah as Muslim and vice versa. Wahhabis don't recognize Barelawis as Muslim and vice versa.
There are sects of "Muslims" in Pakistan that have very strange beliefs, such as that Sayyidina Ali bin Abi Talib رضى الله عنه is divine, or that the text of the Quran has been changed, or that the Prophet صلى الله عليه وسلم is made from God's Light and isn't human, or that it is not necessary to follow the Shari'ah and the Five Pillars (belief of many Sufis and Isma'ilis), or that God is capable of lying (God forbid), or that the Twelve Imams are superior to the Prophets of God, or that the institution of Wilayah (sainthood) is higher than Nubuwwah (Prophesy), and so on and so forth.
So when Pakistani State decides to declare one sect (Ahmadis) non-Muslim, because of political pressure of Saudi Arabia, the Mullas, and Islamist political parties, they have opened a Pandora's Box where it will be demanded that sect xyz also be declared non-Muslim, and this chaos will never end.