code: def restriction(self, lam, mean_field):
          
          self.update_H(mean_field, lam)
          restric = np.array([self.expected(op) - n for op, n in zip(self.oper['Sz+1/2'], self.param['populations'])])
          return restric
docs: Lagrange multiplier in lattice slave spin