replace matlab's QP solver with our own reduced gradient