Cloud Backends
◐ Design-level API
This page documents qalgora-Q API design, architecture, or adaptation workflows. Code examples illustrate intended usage and are not guaranteed to run in the current reference implementation.Documented adapter/export workflows for managed quantum services. The open reference build runs locally; real submission requires the provider's SDK and account credentials.
Amazon Braket
import qalgora
# Runnable: validate locally on the CPU statevector simulator first.
qalgora.set_target("qpp-cpu")
counts = qalgora.sample(bell, shots_count=1000)
# Planned remote submission (adapter/export workflow — not native in the reference build):
# export AWS credentials first; Braket device ARNs must include a region:
# qalgora.set_target("braket", machine="arn:aws:braket:us-east-1::device/qpu/ionq/Forte-1")
# counts = qalgora.sample(bell, shots_count=1000)Reference build runs locally — not real hardware
This example targets a remote cloud/QPU, but the open reference build does not submit to a real machine — it warns and falls back to the local CPU statevector simulator, returning simulated results. Submitting to an actual device (e.g. 天衍/TianYan, IBM, IonQ, Origin) requires the vendor’s own SDK and credentials.Other brokers
| Service | Target |
|---|---|
| Amazon Braket | braket |
| Scaleway QaaS | scaleway |
| qBraid | qbraid |
| Fermioniq (cloud tensor-network simulator) | fermioniq |
These short names (braket, scaleway, qbraid, fermioniq) are
qalgora-Q target aliases for adapter/export workflows — not native real-QPU submission
endpoints in the reference build.
Fermioniq is a managed tensor-network backend: set
the target to fermioniq to run large, low-entanglement circuits in the cloud without
hosting the simulator yourself.
Sessions
Cloud QPUs are billed per shot and may queue. Open a session to amortize setup across many
submissions, and always prefer the async APIs.
云端后端
◐ 设计接口
本页描述的是 qalgora-Q 的接口设计、架构设计或适配工作流。相关代码用于说明预期用法,当前参考实现不保证可以直接运行。面向托管量子服务的适配/导出工作流(文档)。开放参考实现本地运行;真正提交需供应商 SDK 与账号凭证。
Amazon Braket
import qalgora
# 可运行:先在本地 CPU 态矢量模拟器上验证。
qalgora.set_target("qpp-cpu")
counts = qalgora.sample(bell, shots_count=1000)
# 规划中的远程提交(适配/导出工作流 参考实现非原生):
# export AWS credentials first;Braket 设备 ARN 必须包含区域:
# qalgora.set_target("braket", machine="arn:aws:braket:us-east-1::device/qpu/ionq/Forte-1")
# counts = qalgora.sample(bell, shots_count=1000)参考实现仅本地运行 · 非真机
此示例虽指向远程云端/QPU,但开放参考实现不会真正提交到真机 —— 它会给出告警并回退到本地 CPU 态矢量模拟器,返回模拟结果,不会真正提交到天衍等真机。真正提交真机需使用对应厂商的 SDK 与凭证。其他中间件服务
| 服务 | 目标后端 |
|---|---|
| Amazon Braket | braket |
| Scaleway QaaS | scaleway |
| qBraid | qbraid |
| Fermioniq(云端张量网络模拟器) | fermioniq |
这些简称(braket、scaleway、qbraid、fermioniq)是 qalgora-Q 的目标后端别名,对应适配/导出工作流,并非参考实现中的原生真机提交端点。
Fermioniq 是一个托管的张量网络后端。把目标设成 fermioniq,就能在云端跑大规模、低纠缠的线路,不必自己运维模拟器。
会话
云端 QPU 按采样次数计费,还可能要排队。开启会话能把初始化开销摊到多次提交上,建议优先用异步 API。