Skip to main content

KPM Tools

Project description

KPM Tools

PyPI Status Python Version License

Read the documentation at https://kpm-tools.readthedocs.io/ Tests Codecov

pre-commit Black

KPM Tools is an open-source Python package that extends the Kernel Polynomial Method (KPM) functionalities of Kwant, a popular software for quantum transport simulations in tight-binding models. Our package specifically enhances the KPM expansion capabilities within the realm of closed tight-binding systems.

Features

  • Advanced KPM expansion of typical spectral functions like Density of States, Green's Functions, Kubo Conductivity, and Chern Markers.
  • Extremely efficient time evolution operator expansion
  • Additional functionalities like KPM vector factories producing tiles, and velocity and distance operators adapted to periodic boundaries.

Requirements

  • Python >=3.9
  • Kwant >= 1.4.4

Installation

Installing KPM Tools

You can install KPM Tools via pip from PyPI:

$ pip install kpm-tools

Important Note on Kwant Dependency

While KPM Tools requires Kwant to function, direct installation of Kwant via pip can sometimes be problematic due to its specific build requirements. To ensure a smooth setup, we recommend the following installation approach:

  1. Try installing with pip (optional):

    You can attempt to install Kwant along with KPM Tools via pip:

    $ pip install kpm-tools[kwant]
    

    If this installation fails, proceed to the next step.

  2. Install Kwant using Conda or follow Kwant's installation guide:

    We recommend using Conda to install Kwant, which typically handles its build requirements more reliably:

    $ conda install -c conda-forge kwant
    

    Alternatively, refer to the Kwant installation page for detailed instructions on installing Kwant in different environments.

After installing Kwant, you can then install KPM Tools using pip as shown above.

Python API

Please see the python api reference for details.

Contributing

Contributions, especially in documentation and the 'concatenator' function/module, are very welcome. For more information, see our Contributor Guide.

License

Distributed under the terms of the BSD 2-Clause license, KPM Tools is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

Many of the ideas implemented in KPM Tools originate from the early work on KPM expansion on the paper

Computation of topological phase diagram of disordered PbSnTe using the kernel polynomial method.

Phys. Rev. Research 2, 013229 (2020) arXiv:1905:02215

Consider citing that work if you use this package on a publication.

Acknowledgments to Kwant

KPM Tools is built upon the robust and efficient foundation provided by Kwant. We extend our gratitude to the Kwant authors and contributors for their work in developing a versatile platform for quantum transport simulations. KPM Tools aims to complement Kwant's capabilities in KPM expansions, adhering to the high standards of quality and performance set 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

Project Template

This project was generated from @cjolowicz's Hypermodern Python Cookiecutter template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kpm_tools-0.0.9.tar.gz (30.5 kB view details)

Uploaded Source

Built Distribution

kpm_tools-0.0.9-py3-none-any.whl (32.7 kB view details)

Uploaded Python 3

File details

Details for the file kpm_tools-0.0.9.tar.gz.

File metadata

  • Download URL: kpm_tools-0.0.9.tar.gz
  • Upload date:
  • Size: 30.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for kpm_tools-0.0.9.tar.gz
Algorithm Hash digest
SHA256 04658ed0c4aa0f19c8b3656fcab79dfbac8f0ae0c51c264e606185ef5d3a9c59
MD5 2279b7b82cd824df0d0e1c009ec194f7
BLAKE2b-256 37f0119c87a2b2fb7fcc323e9025bbf93a11a9dd55a036e4d46cf603743b9da9

See more details on using hashes here.

File details

Details for the file kpm_tools-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: kpm_tools-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 32.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for kpm_tools-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 2cea3615d3497ffd10c98ecbf0b155de5f8f01aa27b002c91be97ffade909ef3
MD5 aa9b904936b21311d5634c3a30c70544
BLAKE2b-256 5b1bf981df088508d691de833b88bcbffa46b1d269c69075ce61d2b613e8300c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page