Skip to main content

Parament Integrator

Project description

Documentation Status CI codecov Maintainability

Parament

Parallelized Matrix Exponentiation for Numerical Time evolution

Parament is a GPU-accelerated solver for time-dependent linear differential equations. Notably, it solves the Schrödinger's equation with arbitrary time-dependent control terms. Parament is open-source and is released under the Apache Licence.

Documentation

The official documentation of Parament is available on Read The Docs.

Try it out

You can try Parament for free, in the browser, via Google Colab (no local GPU required!).

Installation

Prerequisites (Windows)

  1. Install Microsoft Visual Studio (Community Edition is sufficient)

  2. Install the CUDA toolkit. Make sure the version of CUDA supports your GPU.

  3. Add the MSVC compiler to your PATH. For Visual Studio 2019, it can be found at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\Hostx64\x64.

    You will have to substitute the exact version of the compiler you are using.

Prerequisites (Linux)

CUDA toolkit must be installed.

Building parament

Note: this step is for building the shared library (DLL). If you are only interested in using parament from Python, skip ahead. The python installer will build the library automatically.

Run build.bat or build.sh in the tools folder. The working directory must be set to the repository root. The script will create a /build folder, containing the binaries.

Any extra command line arguments are forwarded directly to nvcc. Use this to e.g. to compile for an older GPU architecture, that is not targeted by the default nvcc settings.

Building & installing pyparament

Pyparament is the official Python wrapper. It requires Python >=3.6.

At this time, pyparament is not yet available via PyPI. You can still install the latest pyparament directly from Github by typing:

pip install git+https://github.com/parament-integrator/parament#subdirectory=src

This will automatically compile the C library, and install it alongside the Python wrapper.

If you need to pass special arguments to the nvcc compiler, you can do so by setting a NVCC_ARGS environment variable. For instance, if you are targeting a Tesla K80 GPU (compute capability 3.7) from CUDA 11+, run (Windows and Linux, respectively):

set NVCC_ARGS=-arch=compute_37
pip install git+https://github.com/parament-integrator/parament#subdirectory=src
NVCC_ARGS="-arch=compute_37"
pip install git+https://github.com/parament-integrator/parament#subdirectory=src

After you have installed pyparament, you can run the test suite (requires pytest to be installed).

pytest --pyargs parament

Source tree structure

This is a rough overview of the most important files and folders in this repository.

├── _docs                       The source code for the documentation.
├── _src                        The root of the parament source.
│   ├── _cuda                   CPP source code.
│   └── _python                 Source code of Python wrapper.
│       └── _test               Built-in test-suite. See above.
├── _tests                      Runner script to execute test suite on Kaggle.     
└── _tools                      Various scripts, mainly related to building.
    └── build.bat               Build script for Windows. See above.
    └── build.sh                Build script for Linux. See above.

Various other scripts in /tools are mostly used in our internal automated build system.

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

parament-0.1.0.tar.gz (31.6 kB view details)

Uploaded Source

File details

Details for the file parament-0.1.0.tar.gz.

File metadata

  • Download URL: parament-0.1.0.tar.gz
  • Upload date:
  • Size: 31.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for parament-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a46289063b775690ed3e704ab01134e5f4c2500d29d6addee47102c7a9b76d6e
MD5 d272e70dcf6e9bde276eeb55f8d259bf
BLAKE2b-256 53e9c712ebf14d38f7a593f0b00eb94c694865e3df0d1e20d6edb8c5ea1f357a

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