def METHOD_NAME(ova,fav,pT,coeff):
   # Compute expectation value
   pTnew = 2.0*reduce(numpy.dot,(coeff.T,ova,pT,ova,coeff))
   nocc  = numpy.diag(pTnew)
   index = numpy.argsort(-nocc)
   ncoeff = coeff[:,index]
   nocc = nocc[index]
   enorb = numpy.diag(reduce(numpy.dot,(coeff.T,ova,fav,ova,coeff)))
   enorb = enorb[index]
   return ncoeff,nocc,enorb