Skip to main content

Quantum Optimization Toolkit

Project description

Quantum Optimization Toolkit

Tests arXiv PyPi version PyPI download month PyPI pyversions PyPI license

This repository contains fast CPU and GPU simulators for benchmarking the Quantum Approximate Optimization Algorithm, as well as scripts for generating matching quantum circuits for execution on hardware. See the examples folder for a demo of this package and check out the blog post describing the simulators.

Install

Creating a virtual environment is recommended before installing.

python -m venv qokit
source qokit/bin/activate
pip install -U pip

Install requires python>=3.10 and pip >= 23. It is recommended to update your pip using pip install --upgrade pip before install.

git clone https://github.com/jpmorganchase/QOKit.git
cd QOKit/
pip install -e .

Some optional parts of the package require additional dependencies.

  • GPU simulation: pip install -e .[GPU-CUDA12]
  • Generating LP files to solve LABS using commercial IP solvers (qokit/classical_methods and examples/advanced/classical_solvers_for_LABS/): pip install -e .[solvers]

Please note that the GPU dependency is specified for CUDA 12x. For other versions of CUDA, please follow cupy installation instructions.

If compilation fails, try installing just the Python version using QOKIT_PYTHON_ONLY=1 pip install -e ..

Installation can be verified by running tests using pytest.

MaxCut

For MaxCut, the datasets in qokit/assets/maxcut_datasets must be inflated

Cite

For the simulators and other software tools, please cite

@inproceedings{Lykov2023,
  series = {SC-W 2023},
  title = {Fast Simulation of High-Depth QAOA Circuits},
  url = {http://dx.doi.org/10.1145/3624062.3624216},
  DOI = {10.1145/3624062.3624216},
  booktitle = {Proceedings of the SC ’23 Workshops of The International Conference on High Performance Computing,  Network,  Storage,  and Analysis},
  publisher = {ACM},
  author = {Lykov,  Danylo and Shaydulin,  Ruslan and Sun,  Yue and Alexeev,  Yuri and Pistoia,  Marco},
  year = {2023},
  month = nov,
  collection = {SC-W 2023}
}

For LABS data, please cite

@article{https://doi.org/10.48550/arxiv.2308.02342,
  doi = {10.48550/ARXIV.2308.02342},
  url = {https://arxiv.org/abs/2308.02342},
  author = {Shaydulin,  Ruslan and Li,  Changhao and Chakrabarti,  Shouvanik and DeCross,  Matthew and Herman,  Dylan and Kumar,  Niraj and Larson,  Jeffrey and Lykov,  Danylo and Minssen,  Pierre and Sun,  Yue and Alexeev,  Yuri and Dreiling,  Joan M. and Gaebler,  John P. and Gatterman,  Thomas M. and Gerber,  Justin A. and Gilmore,  Kevin and Gresh,  Dan and Hewitt,  Nathan and Horst,  Chandler V. and Hu,  Shaohan and Johansen,  Jacob and Matheny,  Mitchell and Mengle,  Tanner and Mills,  Michael and Moses,  Steven A. and Neyenhuis,  Brian and Siegfried,  Peter and Yalovetzky,  Romina and Pistoia,  Marco},
  keywords = {Quantum Physics (quant-ph),  Statistical Mechanics (cond-mat.stat-mech),  Emerging Technologies (cs.ET),  FOS: Physical sciences,  FOS: Physical sciences,  FOS: Computer and information sciences,  FOS: Computer and information sciences},
  title = {Evidence of Scaling Advantage for the Quantum Approximate Optimization Algorithm on a Classically Intractable Problem},
  howpublished = {Preprint at https://arxiv.org/abs/2308.02342},
}

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

qokit-0.1.4.tar.gz (12.8 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

qokit-0.1.4-cp311-cp311-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl (13.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

qokit-0.1.4-cp311-cp311-macosx_10_9_x86_64.whl (13.0 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

qokit-0.1.4-cp310-cp310-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl (13.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

qokit-0.1.4-cp310-cp310-macosx_10_9_x86_64.whl (13.0 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

Details for the file qokit-0.1.4.tar.gz.

File metadata

  • Download URL: qokit-0.1.4.tar.gz
  • Upload date:
  • Size: 12.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for qokit-0.1.4.tar.gz
Algorithm Hash digest
SHA256 ed0f4beb48b1d100b0611eca16cf21ecc4c5a1d8835a859f5b3596f9321f7c95
MD5 a8224966979584117c3e02ac1083be46
BLAKE2b-256 977ec48aedd7a5fad0dea7968dd2d3f10cffb6a4bee158a287cf0f028a322c0f

See more details on using hashes here.

File details

Details for the file qokit-0.1.4-cp311-cp311-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for qokit-0.1.4-cp311-cp311-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c90eb81bfa209ce209523634a0ab0ef170c6226bd53d70b571152f6b4b7a0163
MD5 c7b8975a1f55e384b514d613ec027e8d
BLAKE2b-256 488bbd470877899c6931e8c8b36b4a46c1f8172fc4f4991bafdbcf76fa44e4fe

See more details on using hashes here.

File details

Details for the file qokit-0.1.4-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for qokit-0.1.4-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b0ee20aa3e2119eed8f58cf624aa09dd6c6491e54c646976afc11622c24ccb3a
MD5 2c69ad8aa864ce78b64e056afc56673a
BLAKE2b-256 697ef5bbde2db5b237685fa958bc3939a96932c7c9cd385771342059fb34bcad

See more details on using hashes here.

File details

Details for the file qokit-0.1.4-cp310-cp310-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for qokit-0.1.4-cp310-cp310-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 0219a23cef187b10e90345506814fce47b259e6413e2d8121606932ff0cfe5e2
MD5 f3fad33f09af12217eff5442bec5490f
BLAKE2b-256 a1f55b4e86fb0a20474cf9445d87b48c0ab2d4d6818183e0ae12bf115dd4162d

See more details on using hashes here.

File details

Details for the file qokit-0.1.4-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for qokit-0.1.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fd7204e5538728690fe2a50cd9c62b867375eebd8404aa6646ecd58062ab1d28
MD5 27429af1107549e01044f1283844a98e
BLAKE2b-256 940bb3f09a1c51964c0b9a5386a1f67fa72059e2fbdc92b726a92de6f642255b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page