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:
- 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.