  We study a four-stroke Otto engine whose working fluid is a quantum Ising
chain. The thermodynamic cycle consists in sweeps of the transverse magnetic
field occurring in thermal isolation, alternated by thermalisation strokes with
reservoirs at different temperatures. The system-environment coupling is
modelled in a thermodynamically consistent way by means of a nonlocal Lindblad
master equation. We show that the engine may operate in four different
operation modes, depending on the various parameters, in particular it can act
as a heat engine and as a refrigerator. We detect an enhancement of the
thermodynamic performance as the critical point is crossed, and investigate it
in detail.
