Quantum heat engine with long-range advantages