Pyquafu
PyQuafu is designed for users to construct, compile, and execute quantum circuits on quantum devices on Quafu using Python.
Install / Use
/learn @ScQ-Cloud/PyquafuREADME
PyQuafu
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 .
Development Installation
For developers, it is recommended to use the editable installation below, which automatically includes development dependencies (pytest, pre-commit):
pip install -e ".[dev]"
To run unit tests, you can use:
python -m pytest tests
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.
Related Skills
clearshot
Structured screenshot analysis for UI implementation and critique. Analyzes every UI screenshot with a 5×5 spatial grid, full element inventory, and design system extraction — facts and taste together, every time. Escalates to full implementation blueprint when building. Trigger on any digital interface image file (png, jpg, gif, webp — websites, apps, dashboards, mockups, wireframes) or commands like 'analyse this screenshot,' 'rebuild this,' 'match this design,' 'clone this.' Skip for non-UI images (photos, memes, charts) unless the user explicitly wants to build a UI from them. Does NOT trigger on HTML source code, CSS, SVGs, or any code pasted as text.
openpencil
2.0kThe world's first open-source AI-native vector design tool and the first to feature concurrent Agent Teams. Design-as-Code. Turn prompts into UI directly on the live canvas. A modern alternative to Pencil.
HappyColorBlend
HappyColorBlendVibe Project Guidelines Project Overview HappyColorBlendVibe is a Figma plugin for color palette generation with advanced tint/shade blending capabilities. It allows designers to
Flyaro-waffle-app
Waffle Delight - Full Stack MERN Application Rules & Documentation Project Overview A comprehensive waffle delivery application built with MERN stack featuring premium UI/UX, admin management, a
