Python implementation of Krotov's method for quantum optimal control
Project description
Krotov Python Package
Python implementation of Krotov’s method for quantum optimal control.
This implementation follows the original implementation in the QDYN Fortran library. The method is described in detail in D. M. Reich, M. Ndong, and C. P. Koch, J. Chem. Phys. 136, 104103 (2012) (arXiv:1008.5126)
The krotov package is built on top of QuTiP.
Development happens on Github. You can read the full documentation at ReadTheDocs.
Prerequisites
The Krotov package is available for Python versions >= 3.5. Its main dependency is QuTiP (apart from the core packages of the Python scientific ecosystem). Thus, you should consider QuTiP’s installation instructions.
In any case, using some sort of virtual environment is strongly encouraged. Most packages in the Python scientific ecosystem are now available as wheels, making installation via pip easy. However, QuTiP currently does not provide wheels. Thus, on systems that do not have the necessary compilers installed (Windows, macOS), the conda package manager provides a good solution.
Assuming conda is installed (e.g. through Miniconda), the following commands set up a virtual (conda) environment into which the Krotov package can then be installed:
$ conda create -n qucontrolenv python=3.6
$ conda activate qucontrolenv
$ conda config --append channels conda-forge
$ conda install qutip
Installation
To install the latest released version of krotov into your current (conda) environment, run this command in your terminal:
$ pip install krotov
This is the preferred method to install the krotov package, as it will always install the most recent stable release.
You may also do
$ pip install krotov[dev,extras]
to install additional development dependencies, including packages required to run the example notebooks.
If you don’t have pip installed, this Python installation guide, respectively the Python Packaging User Guide can guide you through the process.
To install the latest development version of krotov from Github:
$ pip install git+https://github.com/qucontrol/krotov.git@master#egg=krotov
Usage
To use Krotov’s method for quantum optimal control in a Python script or Jupyter notebook, start with:
import krotov
Then,
define the necessary quantum operators and states using QuTiP.
create a list of objectives, as instances of krotov.Objective
call krotov.optimize_pulses to perform an optimization of an arbitrary number of control fields over all the objectives.
See Using Krotov with QuTiP and Examples for details.
History
0.1.0 (2018-12-24)
Initial release with complete implementatin of first-order Krotov’s method
Support for state-to-state and gate optimization, for both closed and open systems
0.0.1 (2018-11-06)
Non-functional placeholder release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file krotov-0.1.0.post1.tar.gz
.
File metadata
- Download URL: krotov-0.1.0.post1.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96fd29826aff0c8fce817f5f49c3eea90b1967c68ed6e7a65e76a670072317de |
|
MD5 | ff85471fc98728900a2eacf7daf5719a |
|
BLAKE2b-256 | c8bbd7a927613a42830c0651b0287676d9ff49b7204ec64e122dc7ce88322f1e |
File details
Details for the file krotov-0.1.0.post1-py2.py3-none-any.whl
.
File metadata
- Download URL: krotov-0.1.0.post1-py2.py3-none-any.whl
- Upload date:
- Size: 35.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9788222dd597ba06eb651b589f3ec3b8fb8da71989b471322ddceab6fc0904ab |
|
MD5 | 23bce2da477963e4a7beb129e4400a57 |
|
BLAKE2b-256 | 237ad7a473d30a6072ab4551ea4c49c603ebb52a238ccdda201cd252465fb040 |