Abstract We study quantum circuits constructed from $\sqrt{iSWAP}$ gates and, more
generally, from the entangling gates that can be realized with the XX+YY
interaction alone. Such gates preserve the Hamming weight of states in the
computational basis, which means they respect the global U(1) symmetry
corresponding to rotations around the z axis. Equivalently, assuming that the
intrinsic Hamiltonian of each qubit in the system is the Pauli Z operator, they
conserve the total energy of the system. We develop efficient methods for
synthesizing circuits realizing any desired energy-conserving unitary using
XX+YY interaction with or without single-qubit rotations around the z-axis.
Interestingly, implementing generic energy-conserving unitaries, such as CCZ
and Fredkin gates, with 2-local energy-conserving gates requires the use of
ancilla qubits. When single-qubit rotations around the z-axis are permitted,
our scheme requires only a single ancilla qubit, whereas with the XX+YY
interaction alone, it requires 2 ancilla qubits. In addition to exact
realizations, we also consider approximate realizations and show how a general
energy-conserving unitary can be synthesized using only a sequence of
$\sqrt{iSWAP}$ gates and 2 ancillary qubits, with arbitrarily small error,
which can be bounded via the Solovay-Kitaev theorem. Our methods are also
applicable for synthesizing energy-conserving unitaries when, rather than the
XX+YY interaction, one has access to any other energy-conserving 2-body
interaction that is not diagonal in the computational basis, such as the
Heisenberg exchange interaction. We briefly discuss the applications of these
circuits in the context of quantum computing, quantum thermodynamics, and
quantum clocks.