def _initialize_transformation(self, transformation=None, *args, **kwargs):
    if (transformation is None):
        transformation = 'JordanWigner'
    trafo_args = {k.split('__')[1]: v for (k, v) in kwargs.items() if (hasattr(k, 'lower') and ('transformation__' in k.lower()))}
    trafo_args['n_electrons'] = self.n_electrons
    trafo_args['n_orbitals'] = self.n_orbitals
    if hasattr(transformation, 'upper'):
        transformation = transformation.replace('_', '').replace('-', '').upper()
        encodings = known_encodings()
        if (transformation in encodings):
            transformation = encodings[transformation](**trafo_args)
        else:
            raise TequilaException('Unkown Fermion-to-Qubit encoding {}. Try something like: {}'.format(transformation, list(encodings.keys())))
    return transformation
def _initialize_transformation(self, transformation=None, *args, **kwargs):
    if (transformation is None):
        transformation = 'JordanWigner'
    trafo_args = {k.split('__')[1]: v for (k, v) in kwargs.items() if (hasattr(k, 'lower') and ('transformation__' in k.lower()))}
    trafo_args['n_electrons'] = self.n_electrons
    trafo_args['n_orbitals'] = self.n_orbitals
    if hasattr(transformation, 'upper'):
        transformation = transformation.replace('_', ).replace('-', ).upper()
        encodings = known_encodings()
        if (transformation in encodings):
            transformation = encodings[transformation](**trafo_args)
        else:
            raise TequilaException('Unkown Fermion-to-Qubit encoding {}. Try something like: {}'.format(transformation, list(encodings.keys())))
    return transformation