find_index_order#

find_index_order(two_body_tensor, *, rtol=1e-05, atol=1e-08)[ソース]#

Return the index-order convention of the provided rank-four tensor.

The index convention is determined by checking symmetries of the tensor. If the indexing convention can be determined, then one of IndexType.CHEMIST, IndexType.PHYSICIST, or IndexType.INTERMEDIATE is returned. The IndexType.INTERMEDIATE indexing may be obtained by applying _chem_to_phys() to the physicists』 convention or _phys_to_chem() to the chemists』 convention. If the tests for each of these conventions fail, then IndexType.UNKNOWN is returned.

注釈

The first of IndexType.CHEMIST, IndexType.PHYSICIST, and IndexType.INTERMEDIATE, in that order, to pass the tests is returned. If two_body_tensor has accidental symmetries, it may in fact satisfy more than one set of symmetry tests. For example, if all elements have the same value, then the symmetries for all three index orders are satisfied.

パラメータ:
  • two_body_tensor (np.ndarray | SparseArray | SymmetricTwoBodyIntegrals) – the rank-four tensor whose index order to determine.

  • rtol (float) – the relative tolerance used during the comparison.

  • atol (float) – the absolute tolerance used during the comparison.

戻り値:

The index order of the provided rank-four tensor.

戻り値の型:

IndexType