The best heat pump arrangements run heat transfer lines in the ground. Hoses looped in buried back yard trenches transfer heat into to ground to cool in summer and heat is extracted from the ground to heat in winter.

Could lines carry water to a heat exchanger where heat is used to boil a refrigerant to generate power. The refrigerant drives a motor generator. In winter refrigerant is condensed by a fan blowing air through a radiator. In summer the arrangement reverses.

Efficiency is low. based on the Second Law of the Thermodynamics, the maximal effectivity of any heat engine is 1−TC/TH. TC and TH are the temperatures of the cold and warm heat tanks.
But we do not care about efficiency if enough power is generated to meet needs. A working system which keeps a building at a comfortable temperature would work until a component fails. Low efficiency would mean a lot of coils in the ground. But that is out of sight out of mind. Literally. Low Efficiency pushes the break even point out a few years. That is also out of sight.
Efficiencies would be 10% or less, and that explains why nobody has put much effort in this direction. The wide availability of cheap fossil fuels keeps interest in geothermal solutions on the back burner.
Perhaps a competition can 'unearth' needed technical details like the a maze robot solving competition has done for maze solving robots.

Micromouse Rules <-- Robot competition rules.
However, I doubt many nerds in inner city or (outer city) apartments have back yards with which to experiment with heat pump systems.