How can I protect a heat pump from heavy snow?
There are several advantages to having a permanent roof over an outdoor heat pump:


keeps direct sunlight off during cooling season
keeps rain, leaves, twigs, and branches further away and keeps the unit cleaner
no freezing rain can put the blower out of balance with lopsided icing
keeps snow away from the top and sides where it would impede airflow
possibly provide some noise reduction


The first installation manual I could find says (page 7) there should be a 48 inch (120 cm) minimum space above the unit.

Depending on the typical maximum snow accumulation, I would extend the roof out at least three feet from the edges of the unit.  This also avoids the problem of the roof supports from blocking service access (some units have hinged panel doors).