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 .

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.

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

If you're not sure about the file name format, learn more about wheel file names.

pyquafu-0.4.5-cp313-cp313-win_amd64.whl (328.6 kB view details)

Uploaded CPython 3.13Windows x86-64

pyquafu-0.4.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (433.2 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

pyquafu-0.4.5-cp313-cp313-macosx_13_0_x86_64.whl (324.5 kB view details)

Uploaded CPython 3.13macOS 13.0+ x86-64

pyquafu-0.4.5-cp313-cp313-macosx_13_0_arm64.whl (298.5 kB view details)

Uploaded CPython 3.13macOS 13.0+ ARM64

pyquafu-0.4.5-cp312-cp312-win_amd64.whl (328.5 kB view details)

Uploaded CPython 3.12Windows x86-64

pyquafu-0.4.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (433.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

pyquafu-0.4.5-cp312-cp312-macosx_13_0_x86_64.whl (324.5 kB view details)

Uploaded CPython 3.12macOS 13.0+ x86-64

pyquafu-0.4.5-cp312-cp312-macosx_13_0_arm64.whl (298.5 kB view details)

Uploaded CPython 3.12macOS 13.0+ ARM64

pyquafu-0.4.5-cp311-cp311-win_amd64.whl (327.2 kB view details)

Uploaded CPython 3.11Windows x86-64

pyquafu-0.4.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (432.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pyquafu-0.4.5-cp311-cp311-macosx_13_0_x86_64.whl (323.3 kB view details)

Uploaded CPython 3.11macOS 13.0+ x86-64

pyquafu-0.4.5-cp311-cp311-macosx_13_0_arm64.whl (297.5 kB view details)

Uploaded CPython 3.11macOS 13.0+ ARM64

pyquafu-0.4.5-cp310-cp310-win_amd64.whl (326.5 kB view details)

Uploaded CPython 3.10Windows x86-64

pyquafu-0.4.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (432.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pyquafu-0.4.5-cp310-cp310-macosx_13_0_x86_64.whl (321.7 kB view details)

Uploaded CPython 3.10macOS 13.0+ x86-64

pyquafu-0.4.5-cp310-cp310-macosx_13_0_arm64.whl (296.1 kB view details)

Uploaded CPython 3.10macOS 13.0+ ARM64

pyquafu-0.4.5-cp39-cp39-win_amd64.whl (327.2 kB view details)

Uploaded CPython 3.9Windows x86-64

pyquafu-0.4.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (432.6 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

pyquafu-0.4.5-cp39-cp39-macosx_13_0_x86_64.whl (321.8 kB view details)

Uploaded CPython 3.9macOS 13.0+ x86-64

pyquafu-0.4.5-cp39-cp39-macosx_13_0_arm64.whl (296.2 kB view details)

Uploaded CPython 3.9macOS 13.0+ ARM64

File details

Details for the file pyquafu-0.4.5-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pyquafu-0.4.5-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 328.6 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for pyquafu-0.4.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0b6237387f61d206cb17be69d8b7e19a3b9678c738a1bbad2d01acfd8e0446e9
MD5 ca8c2242c8e7924707840ad1e8333900
BLAKE2b-256 2e1c1c0a7f2f661b51c4c120e36cbaacfe620c0f2ada632257757e012f0493fb

See more details on using hashes here.

File details

Details for the file pyquafu-0.4.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyquafu-0.4.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a9a5207267e64a35c602b78298c50d971203627e0849fc3ddf7bee42bb562ce3
MD5 d910e427103ef53a212f49fc548e70c8
BLAKE2b-256 69d9ecb1f1d924d01db0a3ba019da41b1278d8b61eaff1c174574c10d424ab59

See more details on using hashes here.

File details

Details for the file pyquafu-0.4.5-cp313-cp313-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for pyquafu-0.4.5-cp313-cp313-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 be94d7f92db2039521e1fa6ed8fa9e18a344cba362333a4c60203001ba60dcc9
MD5 0b8000a8990567c2b02037e42f3beb47
BLAKE2b-256 4e2f66c515968acebf617e0c266407eeca0190c66d595de4097afd37e95792de

See more details on using hashes here.

File details

Details for the file pyquafu-0.4.5-cp313-cp313-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for pyquafu-0.4.5-cp313-cp313-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 9932166ac382533f2213eb896914cd680c105fdb633c6ed893c729d201423826
MD5 5bc9f72d8d47e083f1cb18aeade72737
BLAKE2b-256 8360fdf76d61dc5a25f13b03b49f364c874ad591e35e0e60853b5cc2d647a676

See more details on using hashes here.

File details

Details for the file pyquafu-0.4.5-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pyquafu-0.4.5-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 328.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for pyquafu-0.4.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d350c1fa0666e92b5a7eae6a78d31230523071927820c49d8c227db1e550985a
MD5 6727ba5918aeee57d1974561ca7ba5ee
BLAKE2b-256 3da4df12c23dfb81665e1bc60f9fb53b0039bd66dd56fc34530415360c45e4b6

See more details on using hashes here.

File details

Details for the file pyquafu-0.4.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyquafu-0.4.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 613cf378e4f4b8bdc010bdba85d2a3e7fb6e3bd0dbf0f1cb12442a73de54ecad
MD5 38bbec79f93be90710da4fc1bf14fdc1
BLAKE2b-256 f3b7be9b7140ab6562f5ca2c46129dce3a55a29a90f171ebc5149b38792c491d

See more details on using hashes here.

File details

Details for the file pyquafu-0.4.5-cp312-cp312-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for pyquafu-0.4.5-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 c64681461ae6f149620583f4f6da38f2e2fd2420658c10fd76ad85e099329921
MD5 811889948d63ca0fbd7f4c871a81ffae
BLAKE2b-256 453b8ff13b5aff924f1675d7eb795dcf97619a9bb575a6833dc839106ec8de76

See more details on using hashes here.

File details

Details for the file pyquafu-0.4.5-cp312-cp312-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for pyquafu-0.4.5-cp312-cp312-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 915c73c7321596f71ea9a1685cf37276daf5c53a4631d07a0bf39cbdc44d834a
MD5 8d8f9bbd986bcbf21a3510b45f991812
BLAKE2b-256 4f4604ed0c7f66e712f6215bdc4fb81fc3052aa1eada1202397749b3cabf8edf

See more details on using hashes here.

File details

Details for the file pyquafu-0.4.5-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pyquafu-0.4.5-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 327.2 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for pyquafu-0.4.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7bc5381f42f06053eb1451dd8e2ea1c8d500ab2cffe0968998fd95aaa5b40b61
MD5 dfb0c790c35a8c94b8caed48733ed592
BLAKE2b-256 2c7d12f4ef6cd2faa6eb8709352dc173af42197f6887683cde4b8b1bddf2bc05

See more details on using hashes here.

File details

Details for the file pyquafu-0.4.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyquafu-0.4.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dac37917eee54966f60239923c7d0b366b4a582f80d455603f348bb1c3cdbb60
MD5 d33fff5ef6164ddf5b226c8aff6ffb72
BLAKE2b-256 458a2ba5073a22e5d643ea1e621ce5e76d12aed211d410ce1ed4ef7a7ad28bb5

See more details on using hashes here.

File details

Details for the file pyquafu-0.4.5-cp311-cp311-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for pyquafu-0.4.5-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 80fdc5f797978dc7b0c5628b6fbaf0d8cc9d8f669fca4d460808395d47913453
MD5 4a2176b92a8e98f01e8d7a966cc28074
BLAKE2b-256 af8963c5179df7142be4fe75f0b14dd9c0ac31c8f247df3ec1332e4e873b2324

See more details on using hashes here.

File details

Details for the file pyquafu-0.4.5-cp311-cp311-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for pyquafu-0.4.5-cp311-cp311-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 4dbb981ef6a8730856958b0f3b5797331a8b999462c4c2db6686bdf90b136f1f
MD5 8fcb8b7f83fa8d6fccc1ebac0b7b7abc
BLAKE2b-256 db4e15a78238f2849e98364c1d379f0fa41586f38ec2255259b91927baa3bf6f

See more details on using hashes here.

File details

Details for the file pyquafu-0.4.5-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pyquafu-0.4.5-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 326.5 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for pyquafu-0.4.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 22c2e42317a3f6f2d608cee1eafb3bb037efc1862034005fbae48243b070c2ef
MD5 ba2d3a6a650a416838267d301507afd2
BLAKE2b-256 1fed678baf8f0999319f17f2e76a89df30ceb3761811231b1d0889b3b004f54c

See more details on using hashes here.

File details

Details for the file pyquafu-0.4.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyquafu-0.4.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9c6e72b80b90fae016ccabfbc84d5d3fb1f678957226c6ced9630b6fdaf3e2cf
MD5 46f87bee8fece65edc2d9c0e5086c847
BLAKE2b-256 eab76507420a3c5b6775edb15bf05b6d85cc911ef1d54127ff696d66b340495f

See more details on using hashes here.

File details

Details for the file pyquafu-0.4.5-cp310-cp310-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for pyquafu-0.4.5-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 64398ed94cb8c5b7e99409fe7cf42b5ec370e60a5b70357a2e1b59509ff38642
MD5 51851bec42adeaa4758843de84b1fb44
BLAKE2b-256 a04dde47e1f196113490b9d4365fc5c4d48a8498c306f9034d5bae8061ac0707

See more details on using hashes here.

File details

Details for the file pyquafu-0.4.5-cp310-cp310-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for pyquafu-0.4.5-cp310-cp310-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 5e8047f6f0a6ccebcabbc4a5f52b34e50d6d6fdf425ff5aa5a2124969ec1f6f5
MD5 c3d16a39695cfc3b89bd878b56068a66
BLAKE2b-256 508c69b955fc964647f6d3b352bad23ef56bd04fce7d0932757d13f2a35318d1

See more details on using hashes here.

File details

Details for the file pyquafu-0.4.5-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pyquafu-0.4.5-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 327.2 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for pyquafu-0.4.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2be45466a9d955efb1560d314c65e9b01a1bfdf9f9d28417d918ddc0c930fd20
MD5 28f07e8712dd39f85573ac6f43769384
BLAKE2b-256 30136b8cc382efad5d7d4c79dcd5ecb940c3e771da0dbf2a3e5baecd410ed5e8

See more details on using hashes here.

File details

Details for the file pyquafu-0.4.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyquafu-0.4.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 52eb1b2f466b7b862d6db37c89c6d4d4f2c3ebf152ec35af132d00edd097c42d
MD5 35c3d1202dba2c199bb79b9efaf93ae7
BLAKE2b-256 f003a2a9bc83d80a1c1309d4227c14045e462d8b74af1599a289f3fde7fd0bae

See more details on using hashes here.

File details

Details for the file pyquafu-0.4.5-cp39-cp39-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for pyquafu-0.4.5-cp39-cp39-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 37a9ddf1b702c98cdf522a5f7325249810b3a1638d9eb1bc203e298cab2a879a
MD5 0e2ea01cc79939866a97f5c5667c2ace
BLAKE2b-256 a8239b0283713f74c211d670c10ad661d13084dec66593463b25a98f5590fdec

See more details on using hashes here.

File details

Details for the file pyquafu-0.4.5-cp39-cp39-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for pyquafu-0.4.5-cp39-cp39-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 bcc31ad72ecf44a1f21ad1e24be950d8b10a42c71555cff10ccb6323076d3b69
MD5 2625172f1913e104cb1711893a17c6b8
BLAKE2b-256 3983910a3e582f453457215715a582e11a80116cb916f3e0443a18496f59c05f

See more details on using hashes here.

Supported by

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