If you are talking about the ray-traced renderer, it must be certain NVIDIA cards - ideally the ones listed on the system requirements page. That being said, the ray-traced renderer is considered an obsolete feature.
Are you instead talking about the GPU-acceleration of some of AE's native effects like Fractal Noise, Lumetri, Glow, some of the Blurs, etc.? If so, most any decent, dedicated GPU from AMD or NVIDIA will work to accelerate them.
Yes, i am talking about the ray-traced renderer. The ones listed on the system requirements page are older cards. I'd like to know if newer cards (with Pascal architecture) like the QUADRO P4000 are supported or not...
They are not officially supported. The After Effects team is not working on the ray-traced renderer any more. It has not received any development for the past couple of years. It is considered an obsolete feature. See this article from 2014: http://motionworks.net/after-effects-3d-future/
Now, I have heard that if you replace the Optix library in your After Effects install with the newest one downloaded from NVIDIA and you check the "use unsupported cards" checkbox in the AE settings for the ray-traced renderer, it will work. (But it will prevent it from working in CPU mode.) I haven't tried this myself and it's a bit hacky, so, you know, proceed with caution (and don't delete or overwrite any files - just move them so you can put things back later if something goes awry).