Operator Terms
This module collects routines that operate on the individual terms of an operator, partitioning them based on their structure. The submodules below group related functionality.
Grouping
Please refer to Group operator terms: use the operator structure for a detailed explanation of this module’s functionality.
Members
Rather than always relying on the user to provide the group indices themselves, this module provides a collection of functions which determine the grouping information automatically.
group_terms_by_electronic_structure(op, ...) | Groups the terms of an operator by their electronic structure. |
Filtering
This module provides convenience functions for removing terms from an operator that do not contribute meaningfully to a downstream computation.
Members
filter_diagonal_terms(op) | Filters out the terms of an operator that are diagonal in the occupation-number basis. |
Ordering
This module provides functions to reorder the terms of an operator. While the resulting operators are mathematically identical, the term order can have significant implications on algorithm behavior at runtime, due to the term iteration order.
Unlike canonical_order(), order_terms() has no counterpart in the C API.
Members
canonical_order(op) | Returns a copy of an operator with its terms sorted into a canonical order. |
order_terms(op, key, *[, reverse]) | Returns a copy of an operator with its terms reordered by a user-provided key. |