  The application of quantum algorithms to the study of many-particle quantum
systems requires the ability to prepare wavefunctions that are relevant in the
behavior of the system under study. Hamiltonian symmetries are an important
instrument, to classify relevant many-particle wavefunctions, and to improve
the efficiency of numerical simulations. In this work, quantum circuits for the
exact and approximate preparation of total spin eigenfunctions on quantum
computers are presented. Two different strategies are discussed and compared:
exact recursive construction of total spin eigenfunctions based on the addition
theorem of angular momentum, and heuristic approximation of total spin
eigenfunctions based on the variational optimization of a suitable cost
function. The construction of these quantum circuits is illustrated in detail,
and the preparation of total spin eigenfunctions is demonstrated on IBM quantum
devices, focusing on 3- and 5-spin systems on graphs with triangle
connectivity.
