Shihab al-Din abu l-‘Abbas Ahmad ibn Mohammed ibn Mohammed ibn Ahmed ibn Ali ibn 'Abd ar-Rahman ibn Abi'l-'Afiyya al-Miknasi az-Zanati (Arabic: ابن القاضي المكناسي), known simply as Ahmad ibn al-Qadi or Ibn al-Qadi (1552/1553–1616), was a Moroccan polygraph. He was the leading writer from Ahmad al-Mansur's court in Morocco next to Abd al-Aziz al-Fishtali. He was also a renowned judge and mathematician.