Efficiency of simple quantum engines: The Joule‐Brayton and Otto cycles