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
, orIndexType.INTERMEDIATE
is returned. TheIndexType.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, thenIndexType.UNKNOWN
is returned.注釈
The first of
IndexType.CHEMIST
,IndexType.PHYSICIST
, andIndexType.INTERMEDIATE
, in that order, to pass the tests is returned. Iftwo_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.
- 戻り値の型: