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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 412.9 MB
Release files / pyqpanda3-0.5.1-cp314-none-win_amd64.whl
| Download URL | pyqpanda3-0.5.1-cp314-none-win_amd64.whl |
|---|---|
| Size | 23.9 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
115f7d83dbe0b758c19b86893abac7b2f339f160c1f05196dfe1566cc536a259
|
|
BLAKE2b-256 checksum How to use checksums |
ced251b448447c00ef6402c9164273d5aabe2488103c43e4e1913f0ac7f4c4e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.0
|
Release files / pyqpanda3-0.5.1-cp314-none-manylinux1_x86_64.whl
| Download URL | pyqpanda3-0.5.1-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 |
ee346e8a35d8dc2c3e95321475fb7207244eda7eda624fc9c182f0a16b5114bd
|
|
BLAKE2b-256 checksum How to use checksums |
e6c9f5903e7be187c5b6fbd881a366a10153e730ad589b6d659f2a8b2d0479f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.0
|
Release files / pyqpanda3-0.5.1-cp314-cp314-macosx_13_0_arm64.whl
| Download URL | pyqpanda3-0.5.1-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 |
188ea50d8b82ecbc320612d87368c07b800f1cb0ce9bd423c0f4ffcfd0cc2318
|
|
BLAKE2b-256 checksum How to use checksums |
d1cec335681c3ba288073b9905b08e53bec009cb52dc76cb7f4ec64406428583
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.0
|
Release files / pyqpanda3-0.5.1-cp313-none-win_amd64.whl
| Download URL | pyqpanda3-0.5.1-cp313-none-win_amd64.whl |
|---|---|
| Size | 23.8 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
eec40733929daf96b40c6f303ac328d8204ca84c94a0fba165f42b855ded69ce
|
|
BLAKE2b-256 checksum How to use checksums |
f317b21dc3497f06ff8552fcb4c063aa2ec30e1f792b15e4197d5f0aedb59591
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.0
|
Release files / pyqpanda3-0.5.1-cp313-none-manylinux1_x86_64.whl
| Download URL | pyqpanda3-0.5.1-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 |
731e3c8f46f7ceffa977633c995a9a1096ac3389cb87e334ef3a48989a93b44c
|
|
BLAKE2b-256 checksum How to use checksums |
a5dbd5d02d859eb9692fc3045ad0b24c12e535f90c5e33c9a752998a20a0732c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.0
|
Release files / pyqpanda3-0.5.1-cp313-cp313-macosx_13_0_arm64.whl
| Download URL | pyqpanda3-0.5.1-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 |
96a6f26e75244cf21d3ef05d1644b50b43f7efab2d8587dff8b007d2536d9c34
|
|
BLAKE2b-256 checksum How to use checksums |
5f3862ef52af19ad88519599acd10079ad1fea475a97d53ce078ab4224e5abfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.0
|
Release files / pyqpanda3-0.5.1-cp312-none-win_amd64.whl
| Download URL | pyqpanda3-0.5.1-cp312-none-win_amd64.whl |
|---|---|
| Size | 23.8 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f962d4fe62147aa2f0149676b5289c955a0b8f13634fb6ea94f1bc846a105f2a
|
|
BLAKE2b-256 checksum How to use checksums |
2c14d8a8a8b4770d0955769b43f4de5d162408000fa84ad5dbbb0c099916e2b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.0
|
Release files / pyqpanda3-0.5.1-cp312-none-manylinux1_x86_64.whl
| Download URL | pyqpanda3-0.5.1-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 |
8435c42dc37747e04beee32e3a82f5123eb532bbd668e37eb328bf069df80d57
|
|
BLAKE2b-256 checksum How to use checksums |
624b080d73b85461a57e8e547ab89a471bd18f71258027ed0dd7db43dbbe04ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.0
|
Release files / pyqpanda3-0.5.1-cp312-cp312-macosx_13_0_arm64.whl
| Download URL | pyqpanda3-0.5.1-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 |
8b651a6043a6481407930442f701478ae4088cff8bbeac7975d6833347ff7e30
|
|
BLAKE2b-256 checksum How to use checksums |
6c81b7875913aa235aaf9243f4e64d68ad0097d934118433dfdd9fb93343273b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.0
|
Release files / pyqpanda3-0.5.1-cp311-none-win_amd64.whl
| Download URL | pyqpanda3-0.5.1-cp311-none-win_amd64.whl |
|---|---|
| Size | 23.8 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5b8930117db146291ebcbd091b9c9215075bab6edd87a8fcefd9914f24bfac83
|
|
BLAKE2b-256 checksum How to use checksums |
0e9d1ced6ca14d4cbffab3d2b198c98c836c2d1465850e9454a5c670ba897e39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.0
|
Release files / pyqpanda3-0.5.1-cp311-none-manylinux1_x86_64.whl
| Download URL | pyqpanda3-0.5.1-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 |
3b0e979e3b7c6c4e87a76c290bae808b2a81e2b9d44fbe974f83aa3276cb7f47
|
|
BLAKE2b-256 checksum How to use checksums |
50f3eda25bc0364ffbb27cc72ad317ec2453c6399a855a4d955e3e080dc9fe00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.0
|
Release files / pyqpanda3-0.5.1-cp311-cp311-macosx_13_0_arm64.whl
| Download URL | pyqpanda3-0.5.1-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 |
d5fe76952d592299ecbd2b106ada8e32a022c88da44aa88ef3161469450c5d3f
|
|
BLAKE2b-256 checksum How to use checksums |
5e31e5e49aea57db775268a2eae9f516f86e7c3ba0e8e6f89b7e72bde573a952
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.0
|
Release files / pyqpanda3-0.5.1-cp310-none-win_amd64.whl
| Download URL | pyqpanda3-0.5.1-cp310-none-win_amd64.whl |
|---|---|
| Size | 23.8 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
c8128c583d690be7cf5a374ed91d1252fce9b9c29a50fd1e9ec3a9cd31623db7
|
|
BLAKE2b-256 checksum How to use checksums |
cbbfa1b7701a1060a478eec14bda72f66393401349d8ec8460b323079fd69e03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.0
|
Release files / pyqpanda3-0.5.1-cp310-none-manylinux1_x86_64.whl
| Download URL | pyqpanda3-0.5.1-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 |
a01830ebf53795f9863083f84563d2147273ad506ed793b6ae3e208bd5a7591b
|
|
BLAKE2b-256 checksum How to use checksums |
92323663c0a3b0da0bbd0b431e289d11832f8e49fdbb8e44fc4593c03e6b1495
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.0
|
Release files / pyqpanda3-0.5.1-cp310-cp310-macosx_13_0_arm64.whl
| Download URL | pyqpanda3-0.5.1-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 |
81cbc37453d0e34eeb2407cec39f6771898b6c00d81a3bf1f4eec238b40c1084
|
|
BLAKE2b-256 checksum How to use checksums |
e5a6ab0338b1a077db32c8deabde9d020dbdbbbeca982cf4da89fb9fe33b7b77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.0
|
Security for pyqpanda3 0.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.