Skip to main content

pyqpanda3

QPanda3 的 Python 接口——本源量子开发的开源量子计算编程框架。 框架内核采用 C++ 开发并经 pybind11 绑定到 Python:既可以用 Python 编写量子程序, 又能享有 C++ 的执行性能。

安装

pip install pyqpanda3

运行期依赖见 requirements.txt(numpy、matplotlib、networkx、graphviz、scipy 等)。

模块结构

模块 内容
pyqpanda3.core 核心虚拟机与量子程序构件:QProg/QCircuit、各类量子门与测量、CPUQVM、GPUQVM(CUDA 构建时)、NoiseModel 噪声模拟、MPS/密度矩阵/单振幅/部分振幅等后端、SIMD 精度控制
pyqpanda3.transpilation 线路编译/转译:布局映射(LightSABRE)、路由、基转换、优化 Pass、pilot_transpile
pyqpanda3.hamiltonian 哈密顿量与泡利算符工具
pyqpanda3.vqcircuit 变分量子线路(VQC)与参数化演化
pyqpanda3.intermediate_compiler OriginIR / QASM 等中间表示的导入导出与转换
pyqpanda3.quantum_info 量子信息工具:态矢量、密度矩阵、信道(Kraus/Chi/PTM/SuperOp)等
pyqpanda3.utils 扩展工具集
pyqpanda3.visualization 线路绘制与指令调度可视化
pyqpanda3.profiling 性能剖析
pyqpanda3.pilot_os / pyqpanda3.pilot_service QPilot 服务对接(USE_EXTENSION 构建时)
pyqpanda3.qcloud 量子云服务(USE_CURL 构建时)

快速上手

from pyqpanda3.core import QProg, H, CNOT, measure, CPUQVM

prog = QProg()
prog << H(0) << CNOT(0, 1) << measure(0, 0) << measure(1, 1)

qvm = CPUQVM()
qvm.run(prog, 1000)
print(qvm.result().get_counts())   # Bell 态: {'00': ~500, '11': ~500}

GPU 后端(需要 CUDA 构建且机器有可用 GPU):

from pyqpanda3.core import QProg, H, CNOT, GPUQVM

prog = QProg()
prog << H(0) << CNOT(0, 1)

qvm = GPUQVM()
qvm.run(prog, 1000)
print(qvm.result().get_state_vector())

更多文档

访问 https://qcloud.originqc.com.cn/document/pyqpanda3-docs/zh/ 即可

Metadata

Release files for pyqpanda3 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pyqpanda3 0.5.0
File
pyqpanda3-0.5.0-cp314-none-win_amd64.whl CPython 3.14 none Windows x86-64 Details
pyqpanda3-0.5.0-cp314-none-manylinux1_x86_64.whl CPython 3.14 none Linux glibc 2.5+ x86-64 Details
pyqpanda3-0.5.0-cp314-cp314-macosx_13_0_arm64.whl CPython 3.14 CPython 3.14 macOS 13.0+ ARM64 Details
pyqpanda3-0.5.0-cp313-none-win_amd64.whl CPython 3.13 none Windows x86-64 Details
pyqpanda3-0.5.0-cp313-none-manylinux1_x86_64.whl CPython 3.13 none Linux glibc 2.5+ x86-64 Details
pyqpanda3-0.5.0-cp313-cp313-macosx_13_0_arm64.whl CPython 3.13 CPython 3.13 macOS 13.0+ ARM64 Details
pyqpanda3-0.5.0-cp312-none-win_amd64.whl CPython 3.12 none Windows x86-64 Details
pyqpanda3-0.5.0-cp312-none-manylinux1_x86_64.whl CPython 3.12 none Linux glibc 2.5+ x86-64 Details
pyqpanda3-0.5.0-cp312-cp312-macosx_13_0_arm64.whl CPython 3.12 CPython 3.12 macOS 13.0+ ARM64 Details
pyqpanda3-0.5.0-cp311-none-win_amd64.whl CPython 3.11 none Windows x86-64 Details
pyqpanda3-0.5.0-cp311-none-manylinux1_x86_64.whl CPython 3.11 none Linux glibc 2.5+ x86-64 Details
pyqpanda3-0.5.0-cp311-cp311-macosx_13_0_arm64.whl CPython 3.11 CPython 3.11 macOS 13.0+ ARM64 Details
pyqpanda3-0.5.0-cp310-none-win_amd64.whl CPython 3.10 none Windows x86-64 Details
pyqpanda3-0.5.0-cp310-none-manylinux1_x86_64.whl CPython 3.10 none Linux glibc 2.5+ x86-64 Details
pyqpanda3-0.5.0-cp310-cp310-macosx_13_0_arm64.whl CPython 3.10 CPython 3.10 macOS 13.0+ ARM64 Details

Total release size: 412.7 MB

Release files / pyqpanda3-0.5.0-cp314-none-win_amd64.whl

Download URL pyqpanda3-0.5.0-cp314-none-win_amd64.whl
Size 23.8 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
436b466147e80a96ac8ec782a03fab48138ae5e8286fd311e9e1e3981a1f4ae9
BLAKE2b-256 checksum
How to use checksums
5309a84aaa9445ea74029f1f3f888e1c3cfa1059dae18609be42145d462cc11e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release files / pyqpanda3-0.5.0-cp314-none-manylinux1_x86_64.whl

Download URL pyqpanda3-0.5.0-cp314-none-manylinux1_x86_64.whl
Size 37.0 MB
Tags CPython 3.14 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
e9e6232765c38ff957189d45c7c5c92c45b42a7064a8bef18176f31efcd78c10
BLAKE2b-256 checksum
How to use checksums
2f84daf08cb7e291f2ea48e6631456feb1abab0ef4f8e11ca263474a87d0739c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release files / pyqpanda3-0.5.0-cp314-cp314-macosx_13_0_arm64.whl

Download URL pyqpanda3-0.5.0-cp314-cp314-macosx_13_0_arm64.whl
Size 21.7 MB
Tags CPython 3.14 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
5c1b131810e32ce44fc3afaca31a8c2f576bc8f9a3ef86f0c85b4cdee6d64573
BLAKE2b-256 checksum
How to use checksums
46e6c7869b77115311f08fb3b797154277a870a18ccf578e736f57d572a0d5d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release files / pyqpanda3-0.5.0-cp313-none-win_amd64.whl

Download URL pyqpanda3-0.5.0-cp313-none-win_amd64.whl
Size 23.8 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
161f3adf60ad03bc89dc6c2a33d18ad9ed99b1265d06e440119ac3c51bc77413
BLAKE2b-256 checksum
How to use checksums
d56d6cc34ffbe016bf63acd8a64976e0c4ed354b657c25cefb32f3b902b39b85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release files / pyqpanda3-0.5.0-cp313-none-manylinux1_x86_64.whl

Download URL pyqpanda3-0.5.0-cp313-none-manylinux1_x86_64.whl
Size 37.0 MB
Tags CPython 3.13 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
d28c35e89eaaf126ebeed8af8581d354b9da97ee9706fc878286af7203b85cd3
BLAKE2b-256 checksum
How to use checksums
2455931594423a8ba57274be6cdc3095ed417ed7813803dd16d5a76c368e7030
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release files / pyqpanda3-0.5.0-cp313-cp313-macosx_13_0_arm64.whl

Download URL pyqpanda3-0.5.0-cp313-cp313-macosx_13_0_arm64.whl
Size 21.7 MB
Tags CPython 3.13 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
f23e74bdfd7794436d934ddb0cce7439d02233bef441824206fe256651f6bac1
BLAKE2b-256 checksum
How to use checksums
309792befd4904ae6b5af497fb4910532bb821bf1b54f1baea766b3dde3ea024
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release files / pyqpanda3-0.5.0-cp312-none-win_amd64.whl

Download URL pyqpanda3-0.5.0-cp312-none-win_amd64.whl
Size 23.8 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
c9442162be03af1813fe25093c5ab3d6257b79a95d1ac905da584b1ba4d2a00e
BLAKE2b-256 checksum
How to use checksums
7800898d0209cd5c78af09e6bda42fdcdb597653c09034f2f9979648da95540b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release files / pyqpanda3-0.5.0-cp312-none-manylinux1_x86_64.whl

Download URL pyqpanda3-0.5.0-cp312-none-manylinux1_x86_64.whl
Size 37.0 MB
Tags CPython 3.12 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
812af7a53140e7a791b0b803ead998a3581731d6dabbd8489fe2b83697ec0ae4
BLAKE2b-256 checksum
How to use checksums
2a9f140289d9198bba4145163026fdd7df580c02edc2f62d61419ee684b4c349
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release files / pyqpanda3-0.5.0-cp312-cp312-macosx_13_0_arm64.whl

Download URL pyqpanda3-0.5.0-cp312-cp312-macosx_13_0_arm64.whl
Size 21.7 MB
Tags CPython 3.12 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
560f1295ef76c60ddf26852ff65f46c942cf2922be20ee66040a17bbecaead8f
BLAKE2b-256 checksum
How to use checksums
03e89844b25a48f4807bbb3c79dedd858c490536a7883293a73f3ec19bde0a51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release files / pyqpanda3-0.5.0-cp311-none-win_amd64.whl

Download URL pyqpanda3-0.5.0-cp311-none-win_amd64.whl
Size 23.8 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
70cbd22df0543bf87395cf5c4ee337b80749ea6a063d5f2cc20fb406c74b64e3
BLAKE2b-256 checksum
How to use checksums
ff7772d2d42f104034019032a18f67357476df2349f938134489928136360a35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release files / pyqpanda3-0.5.0-cp311-none-manylinux1_x86_64.whl

Download URL pyqpanda3-0.5.0-cp311-none-manylinux1_x86_64.whl
Size 37.0 MB
Tags CPython 3.11 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
4d2cf0e9b8d930da699bdad50c0cab923daf97472f6d4185c12d0a3de753e227
BLAKE2b-256 checksum
How to use checksums
5a9c5bb0ee6fb3977e9cd4f83f017700ed280ddf3b6ecba4c5ae1dd4ec1d9f1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release files / pyqpanda3-0.5.0-cp311-cp311-macosx_13_0_arm64.whl

Download URL pyqpanda3-0.5.0-cp311-cp311-macosx_13_0_arm64.whl
Size 21.7 MB
Tags CPython 3.11 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
97fb34523179db2d912e9d03fcb6c73a9583977292c5cbc26ef9ff632d0de08a
BLAKE2b-256 checksum
How to use checksums
f413c2dabb0c98ee41b7cfab827b1f774770cba76cbf5ee824fed83839530a5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release files / pyqpanda3-0.5.0-cp310-none-win_amd64.whl

Download URL pyqpanda3-0.5.0-cp310-none-win_amd64.whl
Size 23.8 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
104c0ea98eec3fb4f40d1149a8fc5a146a06941c63d9236f27a46449aabd0b80
BLAKE2b-256 checksum
How to use checksums
c8025ca19cea79a554ea40d0d8fb48a093c776f5a1752b6efac32cc6f346b3e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release files / pyqpanda3-0.5.0-cp310-none-manylinux1_x86_64.whl

Download URL pyqpanda3-0.5.0-cp310-none-manylinux1_x86_64.whl
Size 37.0 MB
Tags CPython 3.10 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
0cbdb1b8c8e526e3961bcce63407895b6af18933ce757919f77c641774e544ee
BLAKE2b-256 checksum
How to use checksums
f59aede99eb26df68eda79a33257fca2868dc0f23c99ee3528dd8074e0a05719
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release files / pyqpanda3-0.5.0-cp310-cp310-macosx_13_0_arm64.whl

Download URL pyqpanda3-0.5.0-cp310-cp310-macosx_13_0_arm64.whl
Size 21.7 MB
Tags CPython 3.10 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
04adc8941d571a01d4d3e1f49cb7946fd43f6fa19294c50e8d7b8ebaaacbbdab
BLAKE2b-256 checksum
How to use checksums
36ac557c1c1a96bebbbdd0a1c0eba546093c2e9b2d17306d2503de6811784fee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.5.0 This release

15 release files

0.4.1

15 release files

0.3.5

15 release files

0.3.4

15 release files

0.3.3

15 release files

0.3.2

20 release files

0.3.1

15 release files

0.3.0

15 release files

0.2.2

15 release files

0.2.1

12 release files

0.2.0

12 release files

0.1.2

12 release files

0.1.1

12 release files

0.1.0

8 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page