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?
Of course the tank still needs wall power for the heating elements, but would use less wall power and entail less conversion loss.
I don’ t think I’ve ever heard or read that about compressors. I also know that brownouts aren’t good for them since they have to work harder by pulling more current to compensate for the reduced voltage. That causes them to run hotter. It’s also not taking into account any controller electronics that may be in the mix which are also sensitive. Granted, this is all based on knowledge from refrigerators, but the components are basically the same.
However, I have read people running the electric heating elements in hot water heaters directly from PV, either directly or as a dump load. If I recall, the thing to watch out for with that is the thermostat; they’re not made for DC and can fail to work properly. Not sure what the fix is for that (possibly replace it with one rated for a larger AC current, but I don’t recall).
The electric elements are just “dumb” resistance loads and generally don’t care what kind of power goes into them. Compressors are quite a bit more complex, so I’d be wary about feeding them anything but the “type” of power they expect.