# QFactor implementation on GPUs using JAX
`bqskit-qfactor-jax` is a Python package that implements circuit instantiation with [QFactor](https://arxiv.org/abs/2306.08152) on GPUs to accelerate [BQSKit](https://github.com/bqskit/bqskit). It uses [JAX](https://jax.readthedocs.io/en/latest/index.html) as an abstraction layer of the GPUs, seamlessly utilizing JIT compilation and GPU parallelism.
## Installation
`bqskit-qfactor-jax` is available for Python 3.8+ on Linux.
First, install JAX with GPU support, you may refer to JAX's [installation instructions](https://github.com/google/jax#installation).
Next, install this package with pip:
```sh
pip install bqskit-qfactor-jax
```
# Running bqskit-qfactor-jax
Please set the environment variable XLA_PYTHON_CLIENT_PREALLOCATE=False when using this package.
Please take a look at the [examples](https://github.com/BQSKit/bqskit-qfactor-jax/tree/main/examples) to see some basic usage.
When using several workers on the same GPU, we recommend using [Nvidia's MPS](https://docs.nvidia.com/deploy/mps/index.html). You may initiate it using the command line
```sh
nvidia-cuda-mps-control -d
```
You can disable it by running this command line:
```sh
echo quit | nvidia-cuda-mps-control
```
# References
Kukliansky, Alon, et al. "QFactor:A Domain-Specific Optimizer for Quantum Circuit Instantiation." arXiv preprint [arXiv:2306.08152](https://arxiv.org/abs/2306.08152) (2023).
## License
The software in this repository is licensed under a **BSD free software
license** and can be used in source or binary form for any purpose as long
as the simple licensing requirements are followed. See the
**[LICENSE](https://github.com/BQSKit/bqskit-qfactor-jax/blob/main/LICENSE)** file
for more information.
## Copyright
Quantum Fast Circuit Optimizer (QFactor) JAX implementation Copyright (c) 2023,
U.S. Federal Government and the Government of Israel. All rights reserved.
Raw data
{
"_id": null,
"home_page": "https://github.com/BQSKit/bqskit-qfactor-jax",
"name": "bqskit-qfactor-jax",
"maintainer": "",
"docs_url": null,
"requires_python": "<4,>=3.8",
"maintainer_email": "",
"keywords": "bqskit quantum partitioning qfactor instantiation",
"author": "Alon Kukliansky",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/66/59/53783da70a7c7a3dad874546a78af462e3f2b962e85400b7b54f1d0a9f75/bqskit-qfactor-jax-0.0.1.tar.gz",
"platform": null,
"description": "# QFactor implementation on GPUs using JAX\n`bqskit-qfactor-jax` is a Python package that implements circuit instantiation with [QFactor](https://arxiv.org/abs/2306.08152) on GPUs to accelerate [BQSKit](https://github.com/bqskit/bqskit). It uses [JAX](https://jax.readthedocs.io/en/latest/index.html) as an abstraction layer of the GPUs, seamlessly utilizing JIT compilation and GPU parallelism.\n\n## Installation\n`bqskit-qfactor-jax` is available for Python 3.8+ on Linux.\n\nFirst, install JAX with GPU support, you may refer to JAX's [installation instructions](https://github.com/google/jax#installation).\n\nNext, install this package with pip:\n\n```sh\npip install bqskit-qfactor-jax\n```\n\n# Running bqskit-qfactor-jax\nPlease set the environment variable XLA_PYTHON_CLIENT_PREALLOCATE=False when using this package.\n\nPlease take a look at the [examples](https://github.com/BQSKit/bqskit-qfactor-jax/tree/main/examples) to see some basic usage.\n\nWhen using several workers on the same GPU, we recommend using [Nvidia's MPS](https://docs.nvidia.com/deploy/mps/index.html). You may initiate it using the command line\n```sh\nnvidia-cuda-mps-control -d\n```\n\nYou can disable it by running this command line:\n```sh\necho quit | nvidia-cuda-mps-control\n```\n\n# References\nKukliansky, Alon, et al. \"QFactor:A Domain-Specific Optimizer for Quantum Circuit Instantiation.\" arXiv preprint [arXiv:2306.08152](https://arxiv.org/abs/2306.08152) (2023).\n\n## License\nThe software in this repository is licensed under a **BSD free software\nlicense** and can be used in source or binary form for any purpose as long\nas the simple licensing requirements are followed. See the\n**[LICENSE](https://github.com/BQSKit/bqskit-qfactor-jax/blob/main/LICENSE)** file\nfor more information.\n\n## Copyright\n\nQuantum Fast Circuit Optimizer (QFactor) JAX implementation Copyright (c) 2023,\nU.S. Federal Government and the Government of Israel. All rights reserved.\n",
"bugtrack_url": null,
"license": "BSD 3-Clause License",
"summary": "QFactor GPU implementation in BQSKit using JAX",
"version": "0.0.1",
"project_urls": {
"Bug Tracker": "https://github.com/BQSKit/bqskit-qfactor-jax/issues",
"Documentation": "https://bqskit.readthedocs.io/en/latest",
"Homepage": "https://github.com/BQSKit/bqskit-qfactor-jax",
"Source Code": "https://github.com/BQSKit/bqskit-qfactor-jax"
},
"split_keywords": [
"bqskit",
"quantum",
"partitioning",
"qfactor",
"instantiation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "665953783da70a7c7a3dad874546a78af462e3f2b962e85400b7b54f1d0a9f75",
"md5": "8c85bc2506a5c7ac94e2c22367b55c5e",
"sha256": "27661dbe5d5c306b9b7c023bd780e5ce2d0c0039d86bd931a4d59b6bf3662136"
},
"downloads": -1,
"filename": "bqskit-qfactor-jax-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "8c85bc2506a5c7ac94e2c22367b55c5e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.8",
"size": 15087,
"upload_time": "2023-10-19T05:21:38",
"upload_time_iso_8601": "2023-10-19T05:21:38.918734Z",
"url": "https://files.pythonhosted.org/packages/66/59/53783da70a7c7a3dad874546a78af462e3f2b962e85400b7b54f1d0a9f75/bqskit-qfactor-jax-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-19 05:21:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "BQSKit",
"github_project": "bqskit-qfactor-jax",
"github_not_found": true,
"lcname": "bqskit-qfactor-jax"
}