  Gate-based universal quantum computers form a rapidly evolving field of
quantum computing hardware technology. In previous work, we presented a quantum
algorithm for lattice protein folding on a cubic lattice, tailored for quantum
annealers. In this paper, we introduce a novel approach for solving the lattice
protein folding problem on universal gate-based quantum computing
architectures. Lattice protein models are coarse-grained representations of
proteins that have been used extensively over the past thirty years to examine
the principles of protein folding and design.These models can be used to
explore a vast number of possible protein conformations and to infer structural
properties of more complex atomistic protein structures. We formulate the
problem as a quantum alternating operator ansatz, a member of the wider class
of variational quantum/classical hybrid algorithms. To increase the probability
of sampling the ground state, we propose splitting the optimization problem
into hard and soft constraints. This enables us to use a previously
under-utilised component of the variational algorithm to constrain the search
to the subspace of solutions that satisfy the hard constraints.
