Heat pump water heaters already exist. These are hybrid things where a traditional electric water heater is fitted with a heat pump. The heat pump can increase the water temp but cannot deliver enough, so heating elements are still needed to reach a usable temp.

I’m wondering if that design can be improved on this way: instead of powering the heat pump from the wall, the heat pump can be connected directly to a PV. I think that would be more efficient and cheaper because PV output is not normally directly usable. IIUC, it’s variable D/C which must be regulated and/or inverted to A/C involving more hardware, conversion, and waste. But exceptionally, I’ve heard that a PV can directly power a compressor with no middleware. Any reasons this would be infeasible or uninteresting?