QP Cost as a function of trial