pyFM.optimize.base_functions.oplist_commutation_and_grad

pyFM.optimize.base_functions.oplist_commutation_and_grad(C, op_list)

Compute the operator commutativity constraint and its gradient for a list of pairs of operators.

Can be used with a list of descriptor multiplication operators.

Parameters:
  • C ((K2, K1) np.ndarray) – Functional map.

  • op_list (list of tuple) – Each element is a tuple ((K1, K1) np.ndarray, (K2, K2) np.ndarray) of operators on the first and second basis.

Returns:

  • energy (float) – Sum of the operators commutativity squared norms.

  • gradient ((K2, K1) np.ndarray) – Gradient of the sum of the operators commutativity squared norms.