Skip to main content

QM_sim

Python library for simulation of quantum mechanical systems. The documentation is available on GitHub pages.

Build docs

Features

  • 1D, 2D, and 3D systems
  • Choice of finite difference scheme
  • Zero and periodic boundary conditions
  • Stationary and temporal solutions
  • Plots

Planned features

  • Transfer matrix for transmission ect.
  • Proper testing

Installation

pip install qm-sim

To be able to use the PyTorch backend for eigenvalue calculations, run the following command:

pip install qm-sim[torch]

This will install the cpu-version of the package. To run GPU calculations, install the version for your system at the PyTorch website instead.

Usage

Examples are provided in the examples/-folder. These are enumerated with increasing level of simulation complexity.

Contribution

To contribute, please open a pull request to the dev-branch on GitHub.

Linting

When opening a PR, a linting check is performed. To ensure your contribution passes the checks, you can run the following

$ pip install .[linting]
$ black src/qm_sim
$ isort src -m 3 --trailing-comma
$ pylint src --fail-under=7

Setup

The following is an example of how to set up VS Code for development, adapt to your IDE of choice.

TL;DR:

  • pip install -e . to install in an editable state

Requirements

  • VS Code
    • Python extension
  • Python 3.10 or above

Steps

  1. Clone the repo recursively and open the repo in VS Code. If not cloned recursively, initialize the submodules with git submodule update --init
  2. Press f1, and run Python: Create Environment. Select .venv
  3. Open a new terminal, which should automatically use the virtual environment. If not, run .venv\Scripts\activate on Windows, or source .venv/bin/activate on Unix
  4. In the same terminal, run pip install -e .[test] to install the current directory in an editable state, and the testing utility Pytest
  5. To run tests, press f1 and run Python: Configure Tests. Choose pytest. Run tests in the testing menu

Metadata

Release files for qm-sim 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qm-sim 0.1.2
File Size Uploaded
qm-sim-0.1.2.tar.gz 28.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qm-sim 0.1.2
File Interpreter ABI Platform
qm_sim-0.1.2-cp310-cp310-manylinux_2_35_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.35+ x86-64 Details

Total release size: 54.9 kB

Release files / qm-sim-0.1.2.tar.gz

Download URL qm-sim-0.1.2.tar.gz
Size 28.2 kB
Tags Source
SHA-256 checksum
How to use checksums
98af7284d87ca5dab649b848fc09429b9da5bdfab830393a427aa97ace69bc31
BLAKE2b-256 checksum
How to use checksums
a673fe202b89863db7732b7830cb1474bc9d3579b64b41e7210f3eaaacc6b151
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.4

Release files / qm_sim-0.1.2-cp310-cp310-manylinux_2_35_x86_64.whl

Download URL qm_sim-0.1.2-cp310-cp310-manylinux_2_35_x86_64.whl
Size 26.7 kB
Tags CPython 3.10 Linux glibc 2.35+ x86-64
SHA-256 checksum
How to use checksums
823c1aa7ab18c9efc0d20f9f0c977e4c77a45d1b57bf8775a78f2962ef9ee27b
BLAKE2b-256 checksum
How to use checksums
7967ee1801340dd70b23158c55eab1f89e4066434cb65d0a9f591be5d3fc50a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page