Electric heat pumps are more efficient than any of those. Whole system included. The combination of {heat engine + heat pump} -- i.e., the power plant generating electricity, followed by the electricity powering a heat pump in your house -- is more efficient than using the same heat in your house directly. E.g.: 1 Joule of heat, in a power plant, can bring to you 2 Joules of heat in your house (through an intermediate of 0.5 Joules of electricity).
This doesn't violate the 1st law of thermodynamics. You are not converting 1 Joule of heat into 2 Joules of heat. You are using 1 Joule of heat to move 2 Joules of heat out of a large heat sink (the outside atmosphere, or maybe the ground).
It doesn't violate the 2nd law either. A power plant runs on very high temperature differences -- Carnot ratio Th/Tc as high as 5.0 (1,500 K / 300 K). A heat pump runs on very small temperature differences, maybe 1.1 (e.g. 300 K / 280 K). Together, you can translate a small movement of heat, at a high temperature difference, into a large movement of heat, at a low temperature difference.