  Nonstoquastic Hamiltonians are hard to simulate due to the sign problem in
quantum Monte Carlo simulation. It is however unclear whether nonstoquasticity
can lead to advantage in quantum annealing. Here we show that YY-interaction
between the qubits makes the adiabatic path during quantum annealing, and
therefore the performance, dependent on spin-reversal transformations. With the
right choice of spin-reversal transformation, a nonstoquastic Hamiltonian with
YY-interaction can outperform stoquastic Hamiltonians with similar parameters.
We introduce an optimization protocol to determine the optimal transformation
and discuss the effect of suboptimality.
