cuda-quantum


Namecuda-quantum JSON
Version 0.7.0 PyPI version JSON
download
home_page
SummaryPython bindings for the CUDA Quantum toolkit for heterogeneous quantum-classical workflows.
upload_time2024-03-18 21:31:10
maintainerNVIDIA Corporation & Affiliates
docs_urlNone
authorNVIDIA Corporation & Affiliates
requires_python>=3.8
licenseApache License Version 2.0 Copyright (c) 2023 NVIDIA Corporation & Affiliates All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
keywords cuda-quantum cuda quantum quantum computing nvidia high-performance computing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Welcome to the CUDA Quantum Python API

CUDA Quantum is a comprehensive framework for quantum programming. It features:

- A programming model which extends C++ and Python with quantum kernels,
  enabling high-level programming in familiar languages
- A high-performance quantum compiler, `nvq++`, based on the industry standard
  LLVM toolchain
- Interoperability with all of the leading models and tools for accelerated
computing, including CUDA, ISO standard parallelism, OpenMP, and OpenACC
- The ability to utilize and seamlessly switch between different quantum
  technologies, including state-of-the-art simulator backends with NVIDIA
  cuQuantum and a number of different physical quantum processors (QPUs)

The CUDA Quantum Python wheels contain the Python API and core components of
CUDA Quantum. More information about available packages as well as a link to the
documentation and examples for each version can be found in the [release
notes][cudaq_docs_releases]. System requirements and compatibility are listed in
the Getting Started section of the linked documentation.

[cudaq_docs_releases]:
    https://nvidia.github.io/cuda-quantum/latest/releases.html

## Installation Including GPU-Acceleration

CUDA Quantum does not require a GPU to use, but some components are GPU-accelerated.
If you have access to an NVIDIA GPU, you can enable GPU-acceleration within
CUDA Quantum by installing the CUDA as well as a CUDA-aware MPI implementation.
We recommend using [Conda](https://docs.conda.io/en/latest/) to do so.
If you are not already using Conda,
you can install a minimal version following the instructions
[here](https://docs.conda.io/projects/miniconda/en/latest/index.html). The
following commands will create and activate a complete environment for CUDA
Quantum with all its dependencies:

[//]: # (Begin conda install)

```console
    conda create -y -n cuda-quantum python=3.10 pip
    conda install -y -n cuda-quantum -c "nvidia/label/cuda-11.8.0" cuda
    conda install -y -n cuda-quantum -c conda-forge mpi4py openmpi cxx-compiler cuquantum
    conda env config vars set -n cuda-quantum LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$CONDA_PREFIX/envs/cuda-quantum/lib"
    conda env config vars set -n cuda-quantum MPI_PATH=$CONDA_PREFIX/envs/cuda-quantum
    conda run -n cuda-quantum pip install cuda-quantum
    conda activate cuda-quantum
    source $CONDA_PREFIX/lib/python3.10/site-packages/distributed_interfaces/activate_custom_mpi.sh
```

[//]: # (End conda install)

You must configure MPI by setting the following environment variables:

[//]: # (Begin ompi setup)

```console
  export OMPI_MCA_opal_cuda_support=true OMPI_MCA_btl='^openib'
```

[//]: # (End ompi setup)

*If you do not set these variables you may encounter a segmentation fault.*

**Important**: It is *not* sufficient to set these variable within the Conda
environment, like the commands above do for `LD_LIBRARY_PATH`. To avoid having
to set them every time you launch a new shell, we recommend adding them to
`~/.profile` (create the file if it does not exist), and to `~/.bash_profile` or
`~/.bash_login` if such a file exists.

MPI uses [SSH](https://en.wikipedia.org/wiki/Secure_Shell) or
[RSH](https://en.wikipedia.org/wiki/Remote_Shell) to communicate with each node
unless another resource manager, such as
[SLURM](https://slurm.schedmd.com/overview.html), is used. If you are
encountering an error "The value of the MCA parameter `plm_rsh_agent` was set to
a path that could not be found", please make sure you have an SSH Client
installed.

## Running CUDA Quantum

You should now be able to import CUDA Quantum and start building quantum
programs in Python!

```console
import cudaq

kernel = cudaq.make_kernel()
qubit = kernel.qalloc()
kernel.x(qubit)
kernel.mz(qubit)

result = cudaq.sample(kernel)
```

Additional examples and documentation are linked in the [release
notes][cudaq_docs_releases].

## Contributing

There are many ways in which you can get involved with CUDA Quantum. If you are
interested in developing quantum applications with CUDA Quantum, our [GitHub
repository][github_link] is a great place to get started! For more information
about contributing to the CUDA Quantum platform, please take a look at
[Contributing.md](https://github.com/NVIDIA/cuda-quantum/blob/main/Contributing.md).

## License

CUDA Quantum is an open source project. The source code is available on
[GitHub][github_link] and licensed under [Apache License
2.0](https://github.com/NVIDIA/cuda-quantum/blob/main/LICENSE). CUDA Quantum
makes use of the NVIDIA cuQuantum SDK to enable high-performance simulation,
which is held to its own respective license.

[github_link]: https://github.com/NVIDIA/cuda-quantum/

## Feedback

Please let us know your feedback and ideas for the CUDA Quantum platform in the
[Discussions][discussions] tab of our [GitHub repository][github_repo], or [file
an issue][cuda_quantum_issues]. To report security concerns please reach out to
[cuda-quantum@nvidia.com](mailto:cuda-quantum@nvidia.com).

[discussions]: https://github.com/NVIDIA/cuda-quantum/discussions
[cuda_quantum_issues]: https://github.com/NVIDIA/cuda-quantum/issues
[github_repo]: https://github.com/NVIDIA/cuda-quantum

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "cuda-quantum",
    "maintainer": "NVIDIA Corporation & Affiliates",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "cuda-quantum cuda quantum quantum computing nvidia high-performance computing",
    "author": "NVIDIA Corporation & Affiliates",
    "author_email": "",
    "download_url": "",
    "platform": null,
    "description": "# Welcome to the CUDA Quantum Python API\n\nCUDA Quantum is a comprehensive framework for quantum programming. It features:\n\n- A programming model which extends C++ and Python with quantum kernels,\n  enabling high-level programming in familiar languages\n- A high-performance quantum compiler, `nvq++`, based on the industry standard\n  LLVM toolchain\n- Interoperability with all of the leading models and tools for accelerated\ncomputing, including CUDA, ISO standard parallelism, OpenMP, and OpenACC\n- The ability to utilize and seamlessly switch between different quantum\n  technologies, including state-of-the-art simulator backends with NVIDIA\n  cuQuantum and a number of different physical quantum processors (QPUs)\n\nThe CUDA Quantum Python wheels contain the Python API and core components of\nCUDA Quantum. More information about available packages as well as a link to the\ndocumentation and examples for each version can be found in the [release\nnotes][cudaq_docs_releases]. System requirements and compatibility are listed in\nthe Getting Started section of the linked documentation.\n\n[cudaq_docs_releases]:\n    https://nvidia.github.io/cuda-quantum/latest/releases.html\n\n## Installation Including GPU-Acceleration\n\nCUDA Quantum does not require a GPU to use, but some components are GPU-accelerated.\nIf you have access to an NVIDIA GPU, you can enable GPU-acceleration within\nCUDA Quantum by installing the CUDA as well as a CUDA-aware MPI implementation.\nWe recommend using [Conda](https://docs.conda.io/en/latest/) to do so.\nIf you are not already using Conda,\nyou can install a minimal version following the instructions\n[here](https://docs.conda.io/projects/miniconda/en/latest/index.html). The\nfollowing commands will create and activate a complete environment for CUDA\nQuantum with all its dependencies:\n\n[//]: # (Begin conda install)\n\n```console\n    conda create -y -n cuda-quantum python=3.10 pip\n    conda install -y -n cuda-quantum -c \"nvidia/label/cuda-11.8.0\" cuda\n    conda install -y -n cuda-quantum -c conda-forge mpi4py openmpi cxx-compiler cuquantum\n    conda env config vars set -n cuda-quantum LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH:$CONDA_PREFIX/envs/cuda-quantum/lib\"\n    conda env config vars set -n cuda-quantum MPI_PATH=$CONDA_PREFIX/envs/cuda-quantum\n    conda run -n cuda-quantum pip install cuda-quantum\n    conda activate cuda-quantum\n    source $CONDA_PREFIX/lib/python3.10/site-packages/distributed_interfaces/activate_custom_mpi.sh\n```\n\n[//]: # (End conda install)\n\nYou must configure MPI by setting the following environment variables:\n\n[//]: # (Begin ompi setup)\n\n```console\n  export OMPI_MCA_opal_cuda_support=true OMPI_MCA_btl='^openib'\n```\n\n[//]: # (End ompi setup)\n\n*If you do not set these variables you may encounter a segmentation fault.*\n\n**Important**: It is *not* sufficient to set these variable within the Conda\nenvironment, like the commands above do for `LD_LIBRARY_PATH`. To avoid having\nto set them every time you launch a new shell, we recommend adding them to\n`~/.profile` (create the file if it does not exist), and to `~/.bash_profile` or\n`~/.bash_login` if such a file exists.\n\nMPI uses [SSH](https://en.wikipedia.org/wiki/Secure_Shell) or\n[RSH](https://en.wikipedia.org/wiki/Remote_Shell) to communicate with each node\nunless another resource manager, such as\n[SLURM](https://slurm.schedmd.com/overview.html), is used. If you are\nencountering an error \"The value of the MCA parameter `plm_rsh_agent` was set to\na path that could not be found\", please make sure you have an SSH Client\ninstalled.\n\n## Running CUDA Quantum\n\nYou should now be able to import CUDA Quantum and start building quantum\nprograms in Python!\n\n```console\nimport cudaq\n\nkernel = cudaq.make_kernel()\nqubit = kernel.qalloc()\nkernel.x(qubit)\nkernel.mz(qubit)\n\nresult = cudaq.sample(kernel)\n```\n\nAdditional examples and documentation are linked in the [release\nnotes][cudaq_docs_releases].\n\n## Contributing\n\nThere are many ways in which you can get involved with CUDA Quantum. If you are\ninterested in developing quantum applications with CUDA Quantum, our [GitHub\nrepository][github_link] is a great place to get started! For more information\nabout contributing to the CUDA Quantum platform, please take a look at\n[Contributing.md](https://github.com/NVIDIA/cuda-quantum/blob/main/Contributing.md).\n\n## License\n\nCUDA Quantum is an open source project. The source code is available on\n[GitHub][github_link] and licensed under [Apache License\n2.0](https://github.com/NVIDIA/cuda-quantum/blob/main/LICENSE). CUDA Quantum\nmakes use of the NVIDIA cuQuantum SDK to enable high-performance simulation,\nwhich is held to its own respective license.\n\n[github_link]: https://github.com/NVIDIA/cuda-quantum/\n\n## Feedback\n\nPlease let us know your feedback and ideas for the CUDA Quantum platform in the\n[Discussions][discussions] tab of our [GitHub repository][github_repo], or [file\nan issue][cuda_quantum_issues]. To report security concerns please reach out to\n[cuda-quantum@nvidia.com](mailto:cuda-quantum@nvidia.com).\n\n[discussions]: https://github.com/NVIDIA/cuda-quantum/discussions\n[cuda_quantum_issues]: https://github.com/NVIDIA/cuda-quantum/issues\n[github_repo]: https://github.com/NVIDIA/cuda-quantum\n",
    "bugtrack_url": null,
    "license": "Apache License Version 2.0  Copyright (c) 2023 NVIDIA Corporation & Affiliates All rights reserved.  Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.",
    "summary": "Python bindings for the CUDA Quantum toolkit for heterogeneous quantum-classical workflows.",
    "version": "0.7.0",
    "project_urls": {
        "Documentation": "https://nvidia.github.io/cuda-quantum",
        "Homepage": "https://developer.nvidia.com/cuda-quantum",
        "Releases": "https://nvidia.github.io/cuda-quantum/latest/releases.html",
        "Repository": "https://github.com/NVIDIA/cuda-quantum"
    },
    "split_keywords": [
        "cuda-quantum",
        "cuda",
        "quantum",
        "quantum",
        "computing",
        "nvidia",
        "high-performance",
        "computing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c46e35942d86587afc82684dca6a71e8308d3f3120c00129a0698a2cf9196dd1",
                "md5": "86f6b1975103d4f9c6f14350c7bd72a6",
                "sha256": "e2725e3387518b79c6f228d58b7b7710489b70b94650bdce051f28642b4ca5ef"
            },
            "downloads": -1,
            "filename": "cuda_quantum-0.7.0-cp310-cp310-manylinux_2_28_aarch64.whl",
            "has_sig": false,
            "md5_digest": "86f6b1975103d4f9c6f14350c7bd72a6",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 98254461,
            "upload_time": "2024-03-18T21:31:10",
            "upload_time_iso_8601": "2024-03-18T21:31:10.941611Z",
            "url": "https://files.pythonhosted.org/packages/c4/6e/35942d86587afc82684dca6a71e8308d3f3120c00129a0698a2cf9196dd1/cuda_quantum-0.7.0-cp310-cp310-manylinux_2_28_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d97461ab3b4cdc9d4da8c58ee3bcd5dfc71ee1264a25cdb64e3ef85587e371d7",
                "md5": "e0418ba59a6e525ed6b68106d31718c4",
                "sha256": "06921e59f679c776959e4ce738f0f0a2ba861478caa49a7102801d30f465b6f9"
            },
            "downloads": -1,
            "filename": "cuda_quantum-0.7.0-cp310-cp310-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "e0418ba59a6e525ed6b68106d31718c4",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 104414603,
            "upload_time": "2024-03-18T21:31:59",
            "upload_time_iso_8601": "2024-03-18T21:31:59.833738Z",
            "url": "https://files.pythonhosted.org/packages/d9/74/61ab3b4cdc9d4da8c58ee3bcd5dfc71ee1264a25cdb64e3ef85587e371d7/cuda_quantum-0.7.0-cp310-cp310-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9dec0073ba3578ce3c9373a54ae53a80c9088206c116693c96920222ed26147b",
                "md5": "95d9a70f4a575b40d6cea3386db2dda4",
                "sha256": "92ad3698003b14810ecba24f23846548dca51f9500a0bc98e82042f0a12b07df"
            },
            "downloads": -1,
            "filename": "cuda_quantum-0.7.0-cp311-cp311-manylinux_2_28_aarch64.whl",
            "has_sig": false,
            "md5_digest": "95d9a70f4a575b40d6cea3386db2dda4",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 98247300,
            "upload_time": "2024-03-18T21:32:51",
            "upload_time_iso_8601": "2024-03-18T21:32:51.427863Z",
            "url": "https://files.pythonhosted.org/packages/9d/ec/0073ba3578ce3c9373a54ae53a80c9088206c116693c96920222ed26147b/cuda_quantum-0.7.0-cp311-cp311-manylinux_2_28_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eede2378133190e1924b245fcb528fdee8de076dee7ccce136187d63f63de606",
                "md5": "714700ce25e654c46b37c9dc934b451b",
                "sha256": "1b1a92611115fef1af88b9a5ac22c05bb09dce30dea7624ddbe6ab5ef48e4164"
            },
            "downloads": -1,
            "filename": "cuda_quantum-0.7.0-cp311-cp311-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "714700ce25e654c46b37c9dc934b451b",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 104407103,
            "upload_time": "2024-03-18T21:34:42",
            "upload_time_iso_8601": "2024-03-18T21:34:42.589891Z",
            "url": "https://files.pythonhosted.org/packages/ee/de/2378133190e1924b245fcb528fdee8de076dee7ccce136187d63f63de606/cuda_quantum-0.7.0-cp311-cp311-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0b45a3dc3c4c1d66978019c8b8e66d80f678fe743cdea5e70473ca17916ce948",
                "md5": "32efdb52fe751903a86ea62deecd4a57",
                "sha256": "08688d9ad580dba6c3af8f376df2ccb4b34cf19c5b6d12c73fb028aa8ad2ee8d"
            },
            "downloads": -1,
            "filename": "cuda_quantum-0.7.0-cp38-cp38-manylinux_2_28_aarch64.whl",
            "has_sig": false,
            "md5_digest": "32efdb52fe751903a86ea62deecd4a57",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 98251843,
            "upload_time": "2024-03-18T21:37:13",
            "upload_time_iso_8601": "2024-03-18T21:37:13.034539Z",
            "url": "https://files.pythonhosted.org/packages/0b/45/a3dc3c4c1d66978019c8b8e66d80f678fe743cdea5e70473ca17916ce948/cuda_quantum-0.7.0-cp38-cp38-manylinux_2_28_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "814f6c39f250055faa88554236d790036760818b0d066930ba97164d1f9ad6af",
                "md5": "48bf365bb0a0baafb0359fdde8c9e60d",
                "sha256": "e3513d7372ce7d14a9d85c0f4145933c054fd966dc7f542b2054a5e285017986"
            },
            "downloads": -1,
            "filename": "cuda_quantum-0.7.0-cp38-cp38-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "48bf365bb0a0baafb0359fdde8c9e60d",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 104412553,
            "upload_time": "2024-03-18T21:38:08",
            "upload_time_iso_8601": "2024-03-18T21:38:08.609860Z",
            "url": "https://files.pythonhosted.org/packages/81/4f/6c39f250055faa88554236d790036760818b0d066930ba97164d1f9ad6af/cuda_quantum-0.7.0-cp38-cp38-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a5e6ee69b00a484db9ce01e0b095a11718d4b6c5e8fa93de3c6ea87438048490",
                "md5": "a0855ee836868d8f6e5eb6906888ce46",
                "sha256": "31c407a142ffcc4f22e3c9b498c7303e3426f39321e9a425f56110cc1e0b00cb"
            },
            "downloads": -1,
            "filename": "cuda_quantum-0.7.0-cp39-cp39-manylinux_2_28_aarch64.whl",
            "has_sig": false,
            "md5_digest": "a0855ee836868d8f6e5eb6906888ce46",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 98256026,
            "upload_time": "2024-03-18T21:38:38",
            "upload_time_iso_8601": "2024-03-18T21:38:38.099473Z",
            "url": "https://files.pythonhosted.org/packages/a5/e6/ee69b00a484db9ce01e0b095a11718d4b6c5e8fa93de3c6ea87438048490/cuda_quantum-0.7.0-cp39-cp39-manylinux_2_28_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ea511144b53c44e28722b6437f39b681ed53ecddc15baf7a9c31a783f8964a80",
                "md5": "eba187cec48b5a609155be55e5d67d90",
                "sha256": "e98f79daff4f74ace69dc10bc19bd038597deb708af675e14657df8f288d2969"
            },
            "downloads": -1,
            "filename": "cuda_quantum-0.7.0-cp39-cp39-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "eba187cec48b5a609155be55e5d67d90",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 104416350,
            "upload_time": "2024-03-18T21:39:03",
            "upload_time_iso_8601": "2024-03-18T21:39:03.456517Z",
            "url": "https://files.pythonhosted.org/packages/ea/51/1144b53c44e28722b6437f39b681ed53ecddc15baf7a9c31a783f8964a80/cuda_quantum-0.7.0-cp39-cp39-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-18 21:31:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "NVIDIA",
    "github_project": "cuda-quantum",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cuda-quantum"
}
        
Elapsed time: 0.21451s