Skip to main content

Python toolkit for Quafu-Cloud

Project description

PyQuafu

License

Introduction

PyQuafu is designed for users to construct, compile, and execute quantum circuits on quantum devices on Quafu using Python. With PyQuafu, you can interact with various real quantum backends provided by the experimental group from Quafu.

Installation

Install via PyPI

You can install PyQuafu directly from PyPI:

pip install pyquafu

Build from Source

Alternatively, you can build PyQuafu from the source:

pip install -r requirements.txt
python setup.py install

Graphviz Dependency

If you need to visualize Directed Acyclic Graphs (DAGs), ensure that the Graphviz software is installed on your system. Refer to the graphviz · PyPI page for installation guidance.

GPU Support

To install PyQuafu with GPU-based circuit simulation, you need to build from the source and ensure that the CUDA Toolkit is installed. Use the following command to install the GPU version:

python setup.py install -DUSE_GPU=ON

If you also have cuQuantum installed, you can install PyQuafu with cuQuantum support:

python setup.py install -DUSE_GPU=ON -DUSE_CUQUANTUM=ON

Documentation

For detailed documentation about usage, please visit the PyQuafu documentation website.

Note for Apple Silicon Mac Users

If you encounter the error "illegal hardware instruction" on an Apple silicon Mac, ensure that you have updated to the arm64 version of Anaconda. See this issue for more details.

Examples

Quantum Reinforcement Learning

This example demonstrates how quantum reinforcement learning interacts with Quafu to solve the CartPole environment. For more details, refer to the quantum-RL-with-quafu repository.

Author

This project is developed by the quantum cloud computing team at the Beijing Academy of Quantum Information Sciences.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pyquafu-0.4.2-cp311-cp311-win_amd64.whl (301.7 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

pyquafu-0.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (404.1 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pyquafu-0.4.2-cp311-cp311-macosx_13_0_x86_64.whl (295.9 kB view hashes)

Uploaded CPython 3.11 macOS 13.0+ x86-64

pyquafu-0.4.2-cp311-cp311-macosx_13_0_arm64.whl (278.6 kB view hashes)

Uploaded CPython 3.11 macOS 13.0+ ARM64

pyquafu-0.4.2-cp310-cp310-win_amd64.whl (301.0 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

pyquafu-0.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (402.5 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pyquafu-0.4.2-cp310-cp310-macosx_13_0_x86_64.whl (294.4 kB view hashes)

Uploaded CPython 3.10 macOS 13.0+ x86-64

pyquafu-0.4.2-cp310-cp310-macosx_13_0_arm64.whl (277.1 kB view hashes)

Uploaded CPython 3.10 macOS 13.0+ ARM64

pyquafu-0.4.2-cp39-cp39-win_amd64.whl (300.7 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

pyquafu-0.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (402.7 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pyquafu-0.4.2-cp39-cp39-macosx_13_0_x86_64.whl (294.5 kB view hashes)

Uploaded CPython 3.9 macOS 13.0+ x86-64

pyquafu-0.4.2-cp39-cp39-macosx_13_0_arm64.whl (277.2 kB view hashes)

Uploaded CPython 3.9 macOS 13.0+ ARM64

pyquafu-0.4.2-cp38-cp38-win_amd64.whl (301.1 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

pyquafu-0.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (402.2 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

pyquafu-0.4.2-cp38-cp38-macosx_13_0_x86_64.whl (294.3 kB view hashes)

Uploaded CPython 3.8 macOS 13.0+ x86-64

pyquafu-0.4.2-cp38-cp38-macosx_13_0_arm64.whl (277.0 kB view hashes)

Uploaded CPython 3.8 macOS 13.0+ ARM64

Supported by

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