LLNL / Juqbox.jl

Juqbox.jl solves quantum optimal control problems in closed quantum systems
MIT License
42 stars 10 forks source link

Logo

#

Juqbox.jl is a package for solving quantum optimal control problems in closed quantum systems, where the evolution of the state vector is governed by Schroedinger's equation.

The main features of Juqbox include

The numerical methods in Juqbox.jl are documented in these papers:

  1. N. A. Petersson and F. M. Garcia, "Optimal Control of Closed Quantum Systems via B-Splines with Carrier Waves", SIAM J. Sci. Comput. (2022) 44(6): A3592-A3616, LLNL-JRNL-823853, arXiv:2106.14310.
  2. N. A. Petersson, F. M. Garcia, A. E. Copeland, Y. L. Rydin and J. L. DuBois, “Discrete Adjoints for Accurate Numerical Optimization with Application to Quantum Control”, LLNL-JRNL-800457, arXiv:2001.01013.

Installation

The following instructions assume that you have already installed Julia (currently version 1.8.5) on your system. Before proceeding, we recommend that you add the following to the file ~/.julia/config/startup.jl. You may have to first create the config folder under .julia in your home directory. Then add this line to the startup.jl file:

This is an environment variable. It specifies the backend for plotting. Most of the examples in this document uses the GR backend, which assumes that you have installed that package. If you have trouble with GR, you can instead install the "PyPlot" package and set the default backend to "PyPlot".

Start julia and type ] to enter the package manager. First install these packages (unless they are already installed):

Then install Juqbox.jl:

To exit the package manager you type <DEL>, and to exit julia you type exit().

Documentation

The Juqbox.jl documentation can be found here.

Examples

To access the examples, clone the Juqbox.jl git repository:

Then go to the examples directory in the Juqbox.jl folder (on some systems the folder is named juqbox.jl):

Start julia and try the `cnot1-setup.jl' test case:

Examples of the setup procedure can be found in the following scripts in the Juqbox.jl/examples directory (invoke by, e.g. include("cnot1-setup.jl"))

Contributing to Juqbox.jl

Juqbox.jl is currently under development. The prefered method of contributing is through a pull request (PR). If you are interested in contributing, please contact Anders Petersson (petersson1@llnl.gov) or Fortino Garcia (fortino.garcia@colorado.edu).

Credits

Most of the Julia code was written by Anders Petersson and Fortino Garcia. Important contributions were also made by Ylva Rydin and Austin Copeland.

License

Juqbox.jl is relased under the MIT license.

Note: FFTW.jl license

Juqbox.jl uses the Julia package FFTW.jl for post processing of the results. That package is released under the MIT Expat license and provides Julia bindings to the FFTW library for fast Fourier transforms (FFTs), as well as functionality useful for signal processing. Note that the FFTW library is licensed under GPLv2 or higher (see its license file), but the bindings to the FFTW library in the FFTW.jl package are licensed under MIT. As an lternative to using the FFTW libary, the FFTs in Intel's Math Kernel Library (MKL) can be used by setting an environment variable JULIA_FFTW_PROVIDER to MKL and running Pkg.build("FFTW"). MKL will be provided through MKL_jll. Setting this environment variable only needs to be done for the first build of the package; after that, the package will remember to use MKL when building and updating.

Note: Ipopt.jl license

Juqbox.jl uses the Julia package Ipopt.jl for optimizing control functions. That package is released under the MIT Expat License and provides Julia bindings to the Ipopt library, which is released under the Eclipse Public License.