code: def gradient(self):
          
          return (self.functional.gradient +
                  (2 * self.quadratic_coeff) * IdentityOperator(self.domain) +
                  ConstantOperator(self.linear_term))
docs: Gradient operator of the functional.