A two sites impurity on an infinite one-dimensional chain (double quantum dot)

Dear Author, I am trying to reproduce the 2.7 section of Tkwant tutorial: Green Function. When i try to calculate the lesser and retard greens's function occurred this error: green_lesser = [] green_retard = [] for time in times: green.evolve(time, 0) green.refine_intervals() green_lesser.append(green.lesser(site_0, site_0)) green_retard.append(green.retarded(site_0, site_0)) /home/gabriel/.local/lib/python3.9/site-packages/kwantspectrum/kwant_spectrum.py:361: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray. pvec = np.array([b * b / 3, 0, a * a]) --------------------------------------------------------------------------- ImportError Traceback (most recent call last) /tmp/ipykernel_158862/3957660185.py in <module> 7 green.refine_intervals() 8 ----> 9 green_lesser.append(green.lesser(site_0, site_0)) 10 green_retard.append(green.retarded(site_0, site_0)) ~/.local/lib/python3.9/site-packages/tkwant/greenfunctions.py in lesser(self, i, j, root) 375 def lesser(self, i, j, root=0): 376 if self._green_lesser is None: --> 377 self._init_lesser() 378 self._do_jobs(self._jobs_lesser) 379 return self._green_lesser.evaluate(i, j, root) ~/.local/lib/python3.9/site-packages/tkwant/greenfunctions.py in _init_lesser(self) 430 def _init_lesser(self): 431 logger.debug('init G^<') --> 432 self._green_lesser = _GreenGeneric(*self._args, **self._kwargs) 433 434 def _init_retarded(self): ~/.local/lib/python3.9/site-packages/tkwant/greenfunctions.py in __init__(self, refine, *args, **kwargs) 36 37 # no refine on individual wave function based on density ---> 38 self._state0 = manybody.State(*args, **kwargs, refine=False) 39 self._state1 = manybody.State(*args, **kwargs, refine=False) 40 ~/.local/lib/python3.9/site-packages/tkwant/manybody.py in __init__(self, syst, tmax, occupations, params, spectra, boundaries, intervals, refine, combine, error_op, scattering_state_type, manybody_wavefunction_type, mpi_distribute, comm) 1511 tasks.update(tasks_) 1512 -> 1513 self.comm = mpi.get_communicator(comm) 1514 1515 psi_init = self._calc_initial_state(tasks, self.comm) ~/.local/lib/python3.9/site-packages/tkwant/mpi.py in get_communicator(comm) 66 if comm is None: 67 if _COMM is None: ---> 68 communicator_init() 69 comm = _COMM 70 return comm ~/.local/lib/python3.9/site-packages/tkwant/mpi.py in communicator_init(comm) 48 if _COMM is None: 49 if comm is None: ---> 50 from mpi4py import MPI 51 _COMM = MPI.COMM_WORLD.Dup() 52 else: ImportError: libmpi.so.12: cannot open shared object file: No such file or directory Someone knows what should i do? I am beginner in python and kwant.

Dear Gabriel, it seems that mpi4py is not installed correctly. You can try to run "from mpi4py import MPI" in python which in that case will cause an error. Best, Thomas
participants (2)
-
Gabriel Garcia
-
thomas.kloss@neel.cnrs.fr