Praise be to Allaah.
This hadeeth was narrated by Abu Dawood in his Sunan (4961), Kitaab al-Sunnah, Baab fi'l-Qadar:
It was narrated from Ibn Umar (may Allah be pleased with him) from the Prophet (blessings and peace of Allah be upon him) that he said: The Qadaris (those who deny al-qadar) are the Magians of this ummah. If they get sick, do not visit them and if they die, do not attend (their funerals).
It was also narrated by al-Haakim (286), al-Bayhaqi (21391), al-Tabaraani in al-Awsat (2494), al-Baghawi in Sharh al-Sunnah (1/78), Ibn Asaakir in Tareekh Dimashq (19/62), Ibn Abi Aasim in al-Sunnah (268) and others, from the hadeeth of Ibn Umar (may Allah be pleased with him). It was classed as saheeh by Ibn al-Qattaan in Bayaan al-Wahm wa'l-Eehaam (5/446) and as hasan by al-Albaani in Saheeh Abi Dawood and elsewhere. Al-Safaareeni said in Lawaa'ih al-Anwaar: It is no less than hasan.
The beginning of it was narrated via numerous other isnaads. Ibn al-Qayyim (may Allah have mercy on him) said:
Something similar was narrated from the Prophet (blessings and peace of Allah be upon him) from Ibn Umar, Hudhayfah, Ibn Abbaas, Jaabir ibn Abd-Allah, Abu Hurayrah, Abd-Allah ibn Amr ibn al-Aas and Raafi ibn Khadeej.
End quote from Tahdheeb Sunan Abi Dawood, 2/347
Al-Bayhaqi (may Allah have mercy on him) said:
They are called Qadariyyah because they affirmed al-qadar (power of decree) for themselves but they denied it for Allah, may He be glorified and exalted. They denied that He created their deeds and affirmed that for themselves. By attributing some acts of creation to Him but not others they became like the Magians in their belief in the two principles of light and darkness and that good is the action of light and evil is the action of darkness.
End quote from al-Itiqaad, p. 245
Al-Khattaabi (may Allah have mercy on him) said: The Prophet (blessings and peace of Allah be upon him) likened them to Magians because their views were similar to the views of the Magians who believe in two principles, light and darkness, and they claimed that good is the action of the light and evil is the action of darkness, so they became believers in dualism. Similarly, the Qadaris attribute good to Allah, may He be exalted, and they attribute evil to someone other than Him, but Allah, may He be glorified and exalted is the Creator of both good and evil; neither of them could happen except by His will, so they are attributed to Him in the sense that He created them and brought them into being, and they are attributed to the ones who do them of His slaves in the sense that they commit these actions. End quote.
Sharh Muslim, 1/154
And Allah knows best.