Skip to main content

SheQ: 量子接入平权计划 (Quantum Access Equality Project)

SheQ 旨在打破硬核科技的门槛与话语权壁垒,让不懂底层“黑话”与物理指令集的创造者,也能通过自然语言和统一接口自由指挥前沿的量子算力。


🎯 核心目标

  1. 量子通用中间层 (Unified Quantum Layer):以 OpenQASM 2.0 为统一输入,提供跨平台的翻译、适配与运行能力。
  2. 说“人话”的量子智能体 (Natural Language Agent):支持通过自然语言生成/修复量子电路、智能推荐执行后端。
  3. 量子-经典混合编译 (Hybrid-QASM & RISC-V):将混合了经典控制流的量子电路编译为 RISC-V 汇编与量子序列,探索量子软硬件一体化设计。

📦 支持后端

目前 SheQ 规划并打通以下后端的适配:

  • 量旋云 / SpinQit (支持 Taurus 超导真机及模拟器)
  • 本源量子云 (QPanda3 / OriginIR,支持悟空真机)
  • AWS Braket (支持 OpenQASM 3.0 与本地模拟器)

🚀 快速开始

安装

pip install SheQ

核心接口使用示例

import sheq

# 1. 线路转译 (Transpile OpenQASM 2.0 to Target Backend Native Code)
qasm_code = """
OPENQASM 2.0;
include "qelib1.inc";
qreg q[2];
creg c[2];
h q[0];
cx q[0], q[1];
measure q -> c;
"""
target_code = sheq.transpile(qasm_code, target="braket")
print("Braket QASM 3.0:\n", target_code)

# 2. 统一运行接口 (Run on Target Backend)
result = sheq.run(qasm_code, target="spinq", shots=1024)
print("Execution Result:\n", result)

# 3. 智能体交互 (Interactive Quantum Agent)
response = sheq.agent_chat("帮我生成一个 3 比特 GHZ 最大纠缠态线路")
print("Agent:\n", response)

# 4. 混合控制流编译 (Hybrid Compilation to RISC-V Assembly)
quantum_ops, riscv_asm = sheq.compile_hybrid("""
OPENQASM 2.0;
qreg q[2];
creg c[2];
h q[0];
measure q[0] -> c[0];
classical {
    if (c[0] == 1) {
        r1 = 1;
    }
}
""")

📄 开源协议

本项目采用 MIT 协议开源。

Metadata

Release files for SheQ 0.1.0

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

Source distribution (sdist)

Source distribution for SheQ 0.1.0
File Size Uploaded
sheq-0.1.0.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for SheQ 0.1.0
File Interpreter ABI Platform
sheq-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 kB

Release files / sheq-0.1.0.tar.gz

Download URL sheq-0.1.0.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7990c65a71eafc17d3e08f02fa6f5be68b6cb99411672442e472da7b4d2513a6
BLAKE2b-256 checksum
How to use checksums
8bffd5a66394f9995477adfe973cde59ae03e472c78bbc1377e96b58716aab5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / sheq-0.1.0-py3-none-any.whl

Download URL sheq-0.1.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a09e6a5072121e7963b32c2c85850f797d682adaed28ae1213fda34a358453fc
BLAKE2b-256 checksum
How to use checksums
95c4b370585305a9774b63d4c32b2101e73c3642aa8dd8d70b437637ca242e21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 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