Skip to main content

SheQ: 量子接入平权计划 (Quantum Access Equality Project) - 统一量子中间层与智能体适配器

Project description

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 协议开源。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sheq-0.1.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

sheq-0.1.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file sheq-0.1.0.tar.gz.

File metadata

  • Download URL: sheq-0.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for sheq-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7990c65a71eafc17d3e08f02fa6f5be68b6cb99411672442e472da7b4d2513a6
MD5 15cf808c89c36af6f1a047212d16ab70
BLAKE2b-256 8bffd5a66394f9995477adfe973cde59ae03e472c78bbc1377e96b58716aab5e

See more details on using hashes here.

File details

Details for the file sheq-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sheq-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for sheq-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a09e6a5072121e7963b32c2c85850f797d682adaed28ae1213fda34a358453fc
MD5 5d516fa60df7bc20737e1c00611dab79
BLAKE2b-256 95c4b370585305a9774b63d4c32b2101e73c3642aa8dd8d70b437637ca242e21

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