Got A_dagger_solve and dz/dp gradient to work for case3.