def make_upccgsd_indices(self, key, reference_orbitals=None, *args, **kwargs):
    if (reference_orbitals is None):
        reference_orbitals = [i for i in range((self.n_electrons // 2))]
    indices = []
    if (hasattr(key, 'lower') and (key.lower() == 'ladder')):
        indices = [[(n, (n + 1))] for n in range((self.n_orbitals - 1))]
    elif (hasattr(key, 'lower') and ('g' not in key.lower())):
        indices = [[(n, m)] for n in reference_orbitals for m in range(self.n_orbitals) if ((n < m) and (m not in reference_orbitals))]
    elif (hasattr(key, 'lower') and ('g' in key.lower())):
        indices = [[(n, m)] for n in range(self.n_orbitals) for m in range(self.n_orbitals) if (n < m)]
    else:
        raise TequilaException('Unknown recipe: {}'.format(key))
    indices = [self.format_excitation_indices(idx) for idx in indices]
    return indices
def make_upccgsd_indices(self, key, reference_orbitals=None, *args, **kwargs):
    if (reference_orbitals is None):
        reference_orbitals = [i for i in range((self.n_electrons // 2))]
    indices = []
    if (hasattr(key, 'lower') and (key.lower() == 'ladder')):
        indices = [[(n, (n + 1))] for n in range((self.n_orbitals - 1))]
    elif (hasattr(key, 'lower') and ('g' not in key.lower())):
        indices = [[(n, m)] for n in reference_orbitals for m in range(self.n_orbitals) if ((n < m) and (m not in reference_orbitals))]
    elif (hasattr(key, 'lower') and ('g' in key.lower())):
        indices = [[(n, m)] for n in range(self.n_orbitals) for m in range(self.n_orbitals) if (n < m)]
    else:
        raise TequilaException('Unknown recipe: {}'.format(key))
    indices = [self.format_excitation_indices(idx) for idx in indices]
    return indices