  Constructing Driver Hamiltonians and Mixing Operators such that they satisfy
constraints is an important ansatz construction for quantum algorithms. We give
general algebraic expressions for finding Hamiltonian terms and analogously
unitary primitives, that satisfy constraint embeddings and use these to give
complexity characterizations of the related problems. Finding operators that
enforce classical constraints is proven to be NP-Complete in the general case;
algorithmic procedures with worse-case polynomial runtime to find any operators
with a constant locality bound, applicable for many constraints. We then give
algorithmic procedures to turn these algebraic primitives into Hamiltonian
drivers and unitary mixers that can be used for Constrained Quantum Annealing
(CQA) and Quantum Alternating Operator Ansatz (QAOA) constructions by tackling
practical problems related to finding an appropriate set of reduced generators
and defining corresponding drivers and mixers accordingly. We then apply these
concepts to the construction of ansaetze for 1-in-3 SAT instances. We consider
the ordinary x-mixer QAOA, a novel QAOA approach based on the maximally
disjoint subset, and a QAOA approach based on the disjoint subset as well as
higher order constraint satisfaction terms. We empirically benchmark these
approaches on instances sized between 12 and 22, showing the best relative
performance for the tailored ansaetze and that exponential curve fits on the
results are consistent with a quadratic speedup by utilizing alternative
ansaetze to the x-mixer. We provide very general algorithmic prescriptions for
finding driver or mixing terms that satisfy embedded constraints that can be
utilized to probe quantum speedups for constraints problems with linear,
quadratic, or even higher order polynomial constraints.
