Metadata-Version: 2.1
Name: qm-sim
Version: 0.1.0
Summary: Quantum mechanics simulation library
Author-Email: Viljar Femoen <author@example.com>
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Project-URL: Homepage, https://viljarjf.github.io/QM_sim/
Project-URL: Bug tracker, https://github.com/viljarjf/QM_sim/issues
Project-URL: Source, https://github.com/viljarjf/QM_sim
Requires-Python: >=3.10
Requires-Dist: numpy>=1.23
Requires-Dist: scipy>=1.10
Requires-Dist: tqdm>=4.64.1
Requires-Dist: matplotlib>=3.6
Requires-Dist: pytest; extra == "test"
Requires-Dist: matplotlib; extra == "test"
Requires-Dist: torch; extra == "torch"
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: sphinx-rtd-theme; extra == "docs"
Provides-Extra: test
Provides-Extra: torch
Provides-Extra: docs
Description-Content-Type: text/markdown

# QM_sim

Python library for simulation of quantum mechanical systems.

[![.github/workflows/build_docs.yml](https://github.com/viljarjf/QM_sim/actions/workflows/build_docs.yml/badge.svg?branch=main&event=page_build)](https://github.com/viljarjf/QM_sim/actions/workflows/build_docs.yml)

## 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.
- Testing

## Installation

`pip install qm-sim`

To be able to use the [PyTorch](https://pytorch.org/) 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](https://pytorch.org/get-started/locally/) 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](https://www.github.com/viljarjf/QM_sim/pulls).

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
- `pip install .` to (re)compile the C++ (subsequent python file edits will not be recognized before another reinstall)

### Requirements
- VS Code
    - Python extension
- Python 3.10 or above

### Setup
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
