def make_upccgsd_singles(self, indices='UpCCGSD', spin_adapt_singles=True, label=None, angle_transform=None, assume_real=True, neglect_z=False, *args, **kwargs):
    if (neglect_z and ('jordanwigner' not in self.transformation.name.lower())):
        raise TequilaException('neglegt-z approximation in UpCCGSD singles needs the (Reversed)JordanWigner representation')
    if hasattr(indices, 'lower'):
        indices = self.make_upccgsd_indices(key=indices)
    U = QCircuit()
    for idx in indices:
        assert (len(idx) == 1)
        idx = idx[0]
        if spin_adapt_singles:
            angle = (idx, 'S', label)
            if (angle_transform is not None):
                angle = angle_transform(angle)
            if neglect_z:
                targeta = [self.transformation.up(idx[0]), self.transformation.up(idx[1])]
                targetb = [self.transformation.down(idx[0]), self.transformation.down(idx[1])]
                U += gates.QubitExcitation(angle=angle, target=targeta, assume_real=assume_real, **kwargs)
                U += gates.QubitExcitation(angle=angle, target=targetb, assume_real=assume_real, **kwargs)
            else:
                U += self.make_excitation_gate(angle=angle, indices=[((2 * idx[0]), (2 * idx[1]))], assume_real=assume_real, **kwargs)
                U += self.make_excitation_gate(angle=angle, indices=[(((2 * idx[0]) + 1), ((2 * idx[1]) + 1))], assume_real=assume_real, **kwargs)
        else:
            angle1 = (idx, 'SU', label)
            angle2 = (idx, 'SD', label)
            if (angle_transform is not None):
                angle1 = angle_transform(angle1)
                angle2 = angle_transform(angle2)
            if neglect_z:
                targeta = [self.transformation.up(idx[0]), self.transformation.up(idx[1])]
                targetb = [self.transformation.down(idx[0]), self.transformation.down(idx[1])]
                U += gates.QubitExcitation(*kwargs, angle=angle1, target=targeta, assume_real=assume_real)
                U += gates.QubitExcitation(*kwargs, angle=angle2, target=targetb, assume_real=assume_real)
            else:
                U += self.make_excitation_gate(angle=angle1, indices=[((2 * idx[0]), (2 * idx[1]))], assume_real=assume_real, **kwargs)
                U += self.make_excitation_gate(angle=angle2, indices=[(((2 * idx[0]) + 1), ((2 * idx[1]) + 1))], assume_real=assume_real, **kwargs)
    return U
def make_upccgsd_singles(self, indices='UpCCGSD', spin_adapt_singles=True, label=None, angle_transform=None, assume_real=True, neglect_z=False, *args, **kwargs):
    if (neglect_z and ('jordanwigner' not in self.transformation.name.lower())):
        raise TequilaException('neglegt-z approximation in UpCCGSD singles needs the (Reversed)JordanWigner representation')
    if hasattr(indices, 'lower'):
        indices = self.make_upccgsd_indices(key=indices)
    U = QCircuit()
    for idx in indices:
        assert (len(idx) == 1)
        idx = idx[0]
        if spin_adapt_singles:
            angle = (idx, 'S', label)
            if (angle_transform is not None):
                angle = angle_transform(angle)
            if neglect_z:
                targeta = [self.transformation.up(idx[0]), self.transformation.up(idx[1])]
                targetb = [self.transformation.down(idx[0]), self.transformation.down(idx[1])]
                U += gates.QubitExcitation(angle=angle, target=targeta, assume_real=assume_real, **kwargs)
                U += gates.QubitExcitation(angle=angle, target=targetb, assume_real=assume_real, **kwargs)
            else:
                U += self.make_excitation_gate(angle=angle, indices=[((2 * idx[0]), (2 * idx[1]))], assume_real=assume_real, **kwargs)
                U += self.make_excitation_gate(angle=angle, indices=[(((2 * idx[0]) + 1), ((2 * idx[1]) + 1))], assume_real=assume_real, **kwargs)
        else:
            angle1 = (idx, 'SU', label)
            angle2 = (idx, 'SD', label)
            if (angle_transform is not None):
                angle1 = angle_transform(angle1)
                angle2 = angle_transform(angle2)
            if neglect_z:
                targeta = [self.transformation.up(idx[0]), self.transformation.up(idx[1])]
                targetb = [self.transformation.down(idx[0]), self.transformation.down(idx[1])]
                U += gates.QubitExcitation(*kwargs, angle=angle1, target=targeta, assume_real=assume_real)
                U += gates.QubitExcitation(*kwargs, angle=angle2, target=targetb, assume_real=assume_real)
            else:
                U += self.make_excitation_gate(angle=angle1, indices=[((2 * idx[0]), (2 * idx[1]))], assume_real=assume_real, **kwargs)
                U += self.make_excitation_gate(angle=angle2, indices=[(((2 * idx[0]) + 1), ((2 * idx[1]) + 1))], assume_real=assume_real, **kwargs)
    return U