  Variational hybrid quantum-classical algorithms are some of the most
promising workloads for near-term quantum computers without error correction.
The aim of these variational algorithms is to guide the quantum system to a
target state that minimizes a cost function, by varying certain parameters in a
quantum circuit. This paper proposes a new approach for engineering cost
functions to improve the performance of a certain class of these variational
algorithms on today's small qubit systems. We apply this approach to a
variational algorithm that generates thermofield double states of the
transverse field Ising model, which are relevant when studying phase
transitions in condensed matter systems. We discuss the benefits and drawbacks
of various cost functions, apply our new engineering approach, and show that it
yields good agreement across the full temperature range.
