LLNL / quandary

Optimal control for open quantum systems
MIT License
50 stars 9 forks source link

Quandary - Optimal control for open and closed quantum systems

Quandary implements an optimization solver for open and closed optimal quantum control. The underlying quantum dynamics model open or closed quantum systems, using either Schroedinger's equation for a state vector (closed), or Lindblad master equation for a density matrix (open). The control problem aims to find control pulses that drive the system to a desired target, such as a target unitary solution operator or to a predefined target state. Quandary targets deployment on High-Performance Computing platforms, offering various levels for parallelization using the message passing paradigm.

It is advised to look at the user guide in doc/, describing the underlying mathematical models, their implementation and usage in Quandary.

Feel free to reach out to Stefanie Guenther [guenther5@llnl.gov] for any question you may have.

Dependencies

This project relies on Petsc [https://petsc.org/release/] to handle (parallel) linear algebra. Optionally Slepsc [https://slepc.upv.es] can be used to solve some eigenvalue problems if desired (e.g. for the Hessian...)

Petsc on LLNL's LC

Petc is already installed on LLNL LC machines, see here [https://hpc.llnl.gov/software/mathematical-software/petsc]. It is located at '/usr/tce/packages/petsc/'. To use it, export the 'PETSC_DIR' variable to point to the Petsc folder, and add the 'lib' subfolder to the 'LD_LIBRARY_PATH` variable:

The 'PETSC_ARCH' variable is not needed in this case.

Depending on your setup, you might need to load some additional modules, such as openmpi, e.g. as so:

Installation

Adapt the beginning of the 'Makefile' to set the path to your Petsc (and possibly Slepsc, python path, and fitpackpp) installation, if not exported. Then,

It is advised to add Quandary to your PATH, e.g.

Optional: To run Quandary from within a Python environment, you should have a working python interpreter with numpy and matplotlib installed. Then, append Quandary's location to your PYTHONPATH, e.g. with

Running

The code builds into the executable quandary. It takes one argument being the name of the test-case's configuration file. The file config_template.cfg, lists all possible configuration options. The configuration file is filled with comments that should help users set up their test case and match the options to the description in the user guide. Also compare the examples folder.

Community and Contributing

Quandary is an open source project that is under heavy development. Contributions in all forms are very welcome, and can be anything from new features to bugfixes, documentation, or even discussions. Contributing is easy, work on your branch, create a pull request to master when you're good to go and the regression tests in 'tests/' pass.

Publications

License

Quandary is distributed under the terms of the MIT license. All new contributions must be made under this license. See LICENSE, and NOTICE, for details.

SPDX-License-Identifier: MIT