[kwant] Introducing KPM Tools: Advanced KPM Expansions for Kwant

Dear Kwant Community, I'm pleased to announce the release of "KPM Tools," an open-source Python package specifically designed to extend the Kernel Polynomial Method (KPM) functionalities within Kwant, focusing on closed tight-binding systems. ## Acknowledgment to Kwant: KPM Tools builds upon the solid foundation of Kwant. The package aims to complement and enhance Kwant's existing KPM features, adhering to the high-quality standards established by the Kwant project. See the original KPM implementation in Kwant: https://kwant-project.org/doc/1/tutorial/kpm https://kwant-project.org/doc/1/reference/kwant.kpm ## About KPM Tools: KPM Tools expands the KPM capabilities in Kwant, offering advanced expansions of spectral functions like Density of States, Green's Functions, Kubo Conductivity, and Chern Markers. We introduce enhanced tools systems with periodic boundaries, including new KPM vector factories and adapted velocity and distance operators. Last but not least, I include an extremely efficient time evolution operator expansion. All the features are exemplified in the tutorials: https://kpm-tools.readthedocs.io/en/latest/tutorials.html KPM Tools is available for installation via pip: `` $ pip install kpm-tools ``` You can find more details in the `kpm-tools` repository: https://github.com/piskunow/kpm-tools and the documentation: https://kpm-tools.readthedocs.io https://kpm-tools.readthedocs.io/en/latest/api.html ## Contributions Welcome: I invite contributions, particularly in improving documentation and the 'concatenator' function/module. The documentation consists mainly of Jupyter Notebooks, allowing for easy local testing and updates. As my time to dedicate to further development is limited, your contributions, whether in code, documentation, or ideas, are not just welcome but crucial for the growth of KPM Tools. Pull requests and collaborative efforts will significantly enhance the utility and reach of this package. Looking forward to your insights, feedback, active participation in improving KPM Tools, and seeing how KPM Tools can contribute to your research and projects. Best regards, Pablo Piskunow

Dear Pablo and Kwant users: I'm very interested in this new package and want to try it out. However, I encounter some problems during installation. Basically I install this package inside conda environment using pip install. The install has no errors but import kpm_tools throw an import error as the follows: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\xxxx\.conda\envs\kpm\lib\site-packages\kpm_tools\__init__.py", line 3, in <module> from .bloch import _hopping_distance File "C:\Users\xxxx\.conda\envs\kpm\lib\site-packages\kpm_tools\bloch.py", line 13, in <module> from kwant._common import memoize ImportError: cannot import name 'memoize' from 'kwant._common' (C:\Users\xxxx\.conda\envs\kpm\lib\site-packages\kwant\_common.py) I've filed an issue on github https://github.com/piskunow/kpm-tools/issues/67 . I hope you can give me some guidance on the installation. Thank you in advance. I am also ready to provide any further information if needed. Best, Tommy

hiluming@gmail.com wrote:
I've filed an issue on github https://github.com/piskunow/kpm-tools/issues/67 . I hope you can give me some guidance on the installation. Thank you in advance. I am also ready to provide any further information if needed.
Thanks. It looks like KPM-tools depends in several places on non-public interfaces of the development version of Kwant. I gave more context in the issue you opened. Christoph

Thank you both for raising the issue and pointing to the core of the problem. With the latest release (v0.0.8) I fix the dependency on the Kwant development version. Please note that Kwant is still a required dependency. For the KPM Tools package is marked as an extra dependency. This means that Kwant is not installed by default when installing KPM Tools, unless you specify ``` pip install kpm-tools[kwant] ``` The reason is that installing Kwant from PyPi (like `pip install kwant` or `pip install kpm-tools[kwant]`) might fail, depending on the environment. I have maintained experimental support for Kwant development version, so if you already have Kwant installed, either the latest stable version or the development version, then installing and using KPM Tools should work. Feel free to raise any further issues directly on https://github.com/piskunow/kpm-tools/issues Thanks! Best, Pablo On Wed, Dec 20, 2023 at 6:05 PM Christoph Groth <christoph.groth@cea.fr> wrote:
hiluming@gmail.com wrote:
I've filed an issue on github https://github.com/piskunow/kpm-tools/issues/67 . I hope you can give me some guidance on the installation. Thank you in advance. I am also ready to provide any further information if needed.
Thanks. It looks like KPM-tools depends in several places on non-public interfaces of the development version of Kwant. I gave more context in the issue you opened.
Christoph
participants (4)
-
Christoph Groth
-
hiluming@gmail.com
-
Pablo Piskunow
-
pablo.perez.piskunow@gmail.com