What is the smartphone with the best camera?

Best quality photo is the Pixel and Pixel XL which are currently available for pre-order. You also get top notch photos from the Samsung S6, S7, S7 Edge, Note 5 and Note 7 as well as the HTC 10, Moto Z Force, LG G5 and iPhone 7 Plus.

The highest resolution that I'm aware of was that Nokia with the 41MP camera, which I believe was the 1020. From a resolution standpoint that's HUGE, but from a quality standpoint, it's currently ranked in a 3 way tie for 39th place of phone cameras evaluated. It was fairly terrible at color reproduction and at capturing motion in low light but excellent at still shots in great lighting conditions as long as the user was capable of setting up the shot to avoid flare.
 
Samsung Galaxy S7/S7 Edge, next to LG V20, then Google Pixel(because DXOMark scored it 89 marks), but we have to wait the Google Pixel review.
 
In my opinion, I think Samsung devices take extremely good pictures. I have seen superb Galaxy S, Edge and Note series photos... I think the entire manufacturing line does a good job at camera quality.
 
As an outsider, I think the MS Lumia 950 & 950XL have great cameras. The new HP X3 has had a couple of hardware and software camera upgrades and is getting good reviews as well. I have a Note 5 and a 950XL so my comments come from the direct comparison between these two phones.