# pyquafu **Repository Path**: whatalee/pyquafu ## Basic Information - **Project Name**: pyquafu - **Description**: 北京量子信息科学研究院(BAQIS)量子云计算团队开发的Python SDK,用于在 Quafu量子云平台上构建、编译和执行量子线路。量子线路构建构建复杂线路。 编译与优化:内置编译器将抽象线路适配到指定量子硬件的拓扑结构,支持噪声自适应优化。 硬件执行:远程调用 Quafu 平台的真实超导量子芯片(ScQ-P10、ScQ-P18、Baiwang-136 等)执行线路。 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-23 - **Last Updated**: 2026-05-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # PyQuafu [![License](https://img.shields.io/github/license/ScQ-Cloud/pyquafu.svg?style=popout-square)](https://opensource.org/licenses/Apache-2.0) [![](https://github.com/ScQ-Cloud/pyquafu/actions/workflows/unittest.yml/badge.svg)](https://github.com/ScQ-Cloud/pyquafu/actions/workflows/unittest.yml) [![](https://img.shields.io/github/release/ScQ-Cloud/pyquafu.svg?style=popout-square)](https://github.com/ScQ-Cloud/pyquafu/releases) [![](https://img.shields.io/pypi/dm/pyquafu?style=popout-square)](https://pypi.org/project/pyquafu/) ## Introduction **PyQuafu** is designed for users to construct, compile, and execute quantum circuits on quantum devices on [Quafu](http://quafu.baqis.ac.cn/) using Python. With PyQuafu, you can interact with various real quantum backends provided by the experimental group from [Quafu](http://quafu.baqis.ac.cn/). ## Installation ### Install via PyPI You can install PyQuafu directly from PyPI: ```bash pip install pyquafu ``` ### Build from Source Alternatively, you can build PyQuafu from the source: ```bash pip install . ``` ### Development Installation For developers, it is recommended to use the editable installation below, which automatically includes development dependencies (`pytest`, `pre-commit`): ```bash pip install -e ".[dev]" ``` To run unit tests, you can use: ```bash python -m pytest tests ``` ### Graphviz Dependency If you need to visualize Directed Acyclic Graphs (DAGs), ensure that the [Graphviz software](https://graphviz.org/) is installed on your system. Refer to the [graphviz · PyPI](https://pypi.org/project/graphviz/#description) 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](https://developer.nvidia.com/cuda-downloads) is installed. Use the following command to install the GPU version: ```bash python setup.py install -DUSE_GPU=ON ``` If you also have [cuQuantum](https://developer.nvidia.com/cuquantum-sdk) installed, you can install PyQuafu with cuQuantum support: ```bash python setup.py install -DUSE_GPU=ON -DUSE_CUQUANTUM=ON ``` ## Documentation For detailed documentation about usage, please visit the [PyQuafu documentation website](https://scq-cloud.github.io/). ## 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](https://github.com/abess-team/abess/issues/310) 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](https://github.com/enchanted123/quantum-RL-with-quafu). ## Author This project is developed by the quantum cloud computing team at the Beijing Academy of Quantum Information Sciences.