{"id":19705702,"url":"https://github.com/llnl/quandary","last_synced_at":"2025-04-29T15:31:08.571Z","repository":{"id":41253393,"uuid":"328780409","full_name":"LLNL/quandary","owner":"LLNL","description":"Optimal control for open quantum systems","archived":false,"fork":false,"pushed_at":"2024-11-04T19:01:10.000Z","size":29237,"stargazers_count":49,"open_issues_count":6,"forks_count":9,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-04T20:17:55.052Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LLNL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-11T20:14:32.000Z","updated_at":"2024-11-04T19:01:13.000Z","dependencies_parsed_at":"2024-02-26T22:31:27.129Z","dependency_job_id":"b0438d3a-eeb8-4016-a1a8-e4437fb31fea","html_url":"https://github.com/LLNL/quandary","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LLNL%2Fquandary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LLNL%2Fquandary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LLNL%2Fquandary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LLNL%2Fquandary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LLNL","download_url":"https://codeload.github.com/LLNL/quandary/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224178645,"owners_count":17268922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T21:29:40.246Z","updated_at":"2024-11-11T21:29:40.798Z","avatar_url":"https://github.com/LLNL.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quandary - Optimal control for open and closed quantum systems\nQuandary 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. \n\nIt is advised to look at the user guide in `doc/`, describing the underlying mathematical models, their implementation and usage in Quandary. \n\nFeel free to reach out to Stefanie Guenther [guenther5@llnl.gov] for any question you may have. \n\n## Dependencies\nThis 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...)\n* **Required:** Install Petsc:\n\n    Check out [https://petsc.org/release/] for the latest installation guide. On MacOS, you can also `brew install petsc`. As a quick start, you can also try the below:\n    * Download tarball for Petsc here [https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/].   \n    * `tar -xf petsc-\u003cversion\u003e.tar.gz`\n    * `cd petsc-\u003cversion\u003e`\n    * Configure Petsc with `./configure`. Please check [https://petsc.org/release/install/install_tutorial] for optional arguments. For example, \n        `./configure --prefix=/YOUR/INSTALL/DIR --with-debugging=0 --with-fc=0 --with-cxx=mpicxx --with-cc=mpicc COPTFLAGS='-O3' CXXOPTFLAGS='-O3'`\n    * The output of `./configure` reports on how to set the `PETSC_DIR` and `PETSC_ARCH` variables\n        * `export PETSC_DIR=/YOUR/INSTALL/DIR`\n        * `export PETSC_ARCH=/YOUR/ARCH/PREFIX`\n    * Compile petsc with `make all check'\n    * Append Petsc directory to the `LD_LIBRARY_PATH`:\n        * `export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PETSC_DIR/$PETSC_ARCH/lib`\n\n* **Optional:** Install Slepsc\n    * Read the docs here: [https://slepc.upv.es/documentation/slepc.pdf]\n\n###  Petsc on LLNL's LC\nPetc 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/\u003cversion\u003e'. 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: \n* `export PETSC_DIR=/usr/tce/packages/petsc/\u003cversion\u003e` (check the folder name for version number)\n* `export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PETSC_DIR/lib`\n\nThe 'PETSC_ARCH' variable is not needed in this case. \n\nDepending on your setup, you might need to load some additional modules, such as openmpi, e.g. as so:\n* `module load openmpi`\n\n## Installation\nAdapt the beginning of the 'Makefile' to set the path to your Petsc (and possibly Slepsc, python path, and fitpackpp) installation, if not exported. Then,\n* `make cleanup` to clean the build directory. (Note the *up* in *cleanup*.)\n* `make quandary` to build the code (or 'make -j quandary' for faster build using multiple threads)\n\nIt is advised to add Quandary to your `PATH`, e.g.\n* `export PATH=$PATH:/path/to/quandary/`\n\n**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  \n* `export PYTHONPATH=$PYTHONPATH:/path/to/quandary/`\nand have a look into the examples.\n \n\n## Running\nThe 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.\n* `./quandary config_template.cfg`\n* `mpirun -np 4 ./quandary config_template.cfg --quiet`\n\n\n## Community and Contributing\n\nQuandary 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.\n\n## Publications\n* S. Guenther, N.A. Petersson, J.L. DuBois: \"Quantum Optimal Control for Pure-State Preparation Using One Initial State\", AVS Quantum Science, vol. 3, arXiv preprint \u003chttps://arxiv.org/abs/2106.09148\u003e (2021)\n* S. Guenther, N.A. Petersson, J.L. DuBois: \"Quandary: An open-source C++ package for High-Performance Optimal Control of Open Quantum Systems\", submitted to IEEE Supercomputing 2021, arXiv preprint \u003chttps://arxiv.org/abs/2110.10310\u003e (2021)\n\n## License\n\nQuandary is distributed under the terms of the MIT license. All new contributions must be made under this license. See LICENSE, and NOTICE, for details. \n\nSPDX-License-Identifier: MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllnl%2Fquandary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fllnl%2Fquandary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllnl%2Fquandary/lists"}