Google is using software to extend YouTube HDR support to the Pixel and Pixel XL according to a recent statement from someone at Google. It's doing this by creating a software decoder and rendering stack that was created specifically for this purpose so that the Pixel and Pixel XL would support HDR videos on YouTube. Normally the HDR support would be handled by the hardware itself, like on the Samsung Galaxy S8 and Galaxy S8+ which Google recently rolled out an update to YouTube for so that it could enable HDR videos on the platform. Since Google's current Pixel phones don't have the hardware that takes care of this kind of thing, Google had to create a special software decoder that would do the job.
In addition to creating this special software decoder for HDR videos on YouTube, Google also reportedly noted that future devices would perform even better due to having hardware acceleration, which sounds like the next-gen Pixel and Pixel XL may have hardware support for HDR videos like the LG V30, while also being able to take advantage of that new decoder and essentially improving that performance. That said Google doesn't allude to which devices it was referring to when talking about future devices, or if it plans to make this software decoder available to other OEMs for use or keep it all to itself. In any case, those with the currently available Pixel and Pixel XL should feel happy that HDR videos on YouTube are supported, just in a different way.
Since this is being handled by a software decoder and rendering stack to help decode the HDR content, you won't find the HDR option in the quality settings on videos like you would on a hardware accelerated device, which means everything is probably just happening automatically instead of requiring the user to select HDR, and with that being the case you should just be able to open up any videos you want and view the content as it was intended. Whether or not it looks the same or as good as on phones with hardware accelerated HDR support remains to be seen, but having it is certainly better than not having it.