def format_excitation_indices(self, idx):
    '\n        Consistent formatting of excitation indices\n        idx = [(p0,q0),(p1,q1),...,(pn,qn)]\n        sorted as: p0<p1<pn and pi<qi\n        :param idx: list of index tuples describing a single(!) fermionic excitation\n        :return: tuple-list of index tuples\n        '
    idx = [tuple(sorted(x)) for x in idx]
    idx = sorted(idx, key=(lambda x: x[0]))
    return tuple(idx)
Consistent formatting of excitation indices
idx = [(p0,q0),(p1,q1),...,(pn,qn)]
sorted as: p0<p1<pn and pi<qi
:param idx: list of index tuples describing a single(!) fermionic excitation
:return: tuple-list of index tuples
def format_excitation_indices(self, idx):
    '\n        Consistent formatting of excitation indices\n        idx = [(p0,q0),(p1,q1),...,(pn,qn)]\n        sorted as: p0<p1<pn and pi<qi\n        :param idx: list of index tuples describing a single(!) fermionic excitation\n        :return: tuple-list of index tuples\n        '
    idx = [tuple(sorted(x)) for x in idx]
    idx = sorted(idx, key=(lambda x: x[0]))
    return tuple(idx)