  Exactly-solvable Hamiltonians that can be diagonalized using relatively
simple unitary transformations are of great use in quantum computing. They can
be employed for decomposition of interacting Hamiltonians either in
Trotter-Suzuki approximations of the evolution operator for the quantum phase
estimation algorithm, or in the quantum measurement problem for the variational
quantum eigensolver. One of the typical forms of exactly solvable Hamiltonians
is a linear combination of operators forming a modest size Lie algebra. Very
frequently such linear combinations represent non-interacting Hamiltonians and
thus are of limited interest for describing interacting cases. Here we propose
the extension where coefficients in these combinations are substituted by
polynomials of the Lie algebra symmetries. This substitution results in a more
general class of solvable Hamiltonians and for qubit algebras is related to the
recently proposed non-contextual Pauli Hamiltonians. In fermionic problems,
this substitution leads to Hamiltonians with eigenstates that are single Slater
determinants but with different sets of single-particle states for different
eigenstates. The new class of solvable Hamiltonians can be measured efficiently
using quantum circuits with gates that depend on the result of a mid-circuit
measurement of the symmetries.
