qalgora-Q Docs Hub量子文档 ✦ Ask AI✦ 问问文档

Photonic GBS Applications

○ Planned · Not yet implemented
The capabilities described on this page are planned and not yet implemented or released. They explain future design directions and should not be interpreted as delivered features.

Photonic samplers like Jiuzhang and TuringQ run Gaussian Boson Sampling (GBS). GBS is not just a benchmark — it underlies a family of graph and chemistry algorithms that map onto photonic sampling.

What GBS computes

Encoding a symmetric matrix into squeezed light makes photon-count patterns sample subgraphs weighted by matrix hafnians — the Gaussian-state analogue of the permanent that governs standard boson sampling — the basis of several useful algorithms.

Algorithm family

ApplicationIdea
Dense subgraphFrequent samples concentrate on dense subgraphs
Max cliquePost-process GBS samples to grow cliques
Graph similaritySample distributions form feature vectors for graph kernels
Molecular vibronic spectraMap vibrational modes onto the interferometer

Caveat: every entry needs classical post-processing and verification, is not guaranteed to return an optimal answer, and depends on the graph/molecule embedding and device calibration.

Finding dense subgraphs

No local fallback
GBS has no local fallback: a CPU state-vector simulator cannot reproduce real-scale GBS. The code below is a draft spec interface, not a runnable API in the open reference implementation.
import qalgora
# Conceptual API only. Not included in the open reference implementation.
program = qalgora.photonic.GBSProgram.from_adjacency(adjacency, n_modes=16, shots_count=20000)
samples = qalgora.photonic.run(program, target="jiuzhang")
dense = qalgora.photonic.densest_subgraph(samples, size=4)
print("densest 4-node candidate:", dense)
Specification API — not in the open reference build yet
This example shows a qalgora-Q specification API (or a third-party library) that the open reference build does not bundle today. It documents the intended interface; to run code now, use the reference build’s supported core API.
Special-purpose, with caveats
GBS hardware does not run arbitrary gate circuits. On some problems that map to GBS sampling, a photonic sampler can explore sampling regimes hard for gate-model NISQ devices; the actual application still depends on embedding, post-processing, and verification. A planned adapter could select the matching photonic sampling workflow based on task type.

光子 GBS 应用

○ 规划中
本页所述能力属于规划功能,当前尚未发布或尚未实现。相关内容仅用于说明未来设计方向,不应理解为已交付能力。

Jiuzhang(九章)和 TuringQ(图灵量子)等光子采样器可运行高斯玻色采样(GBS)。GBS 不仅是一项基准测试,还支撑着一系列可映射到光子采样的图算法与化学算法。

GBS 的计算原理

把对称矩阵编码到压缩光中,光子计数模式就会按一定权重采样出子图,权重由矩阵的 hafnian(哈夫尼安)决定——它正是标准玻色采样中 permanent(积和式)在高斯态下的对应量,也是一系列实用算法的根基。

算法家族

应用场景核心思路
稠密子图高频采样集中于稠密子图
最大团后处理 GBS 采样结果,逐步扩大团
图相似度采样分布构成图核的特征向量
分子振动光谱将振动模式映射至干涉仪

注意:表中每一项都需要经典后处理与验证,不保证返回最优解,并且依赖于图/分子的嵌入方式与设备标定。

寻找稠密子图

GBS 无本地回退
GBS 无本地回退:CPU 态矢量模拟器无法重现真实规模 GBS;以下为规范接口草案,不是参考实现可运行 API。
import qalgora
# 仅为概念性 API,未包含在开源参考实现中。
program = qalgora.photonic.GBSProgram.from_adjacency(adjacency, n_modes=16, shots_count=20000)
samples = qalgora.photonic.run(program, target="jiuzhang")
dense = qalgora.photonic.densest_subgraph(samples, size=4)
print("densest 4-node candidate:", dense)
规范接口 · 参考实现暂未包含
此示例展示的是 qalgora-Q 规范中的接口(或第三方库),开放参考实现目前尚未内置,仅用于说明预期用法;如需立即运行,请使用参考实现已支持的核心 API。
专用机的能力与边界
GBS 硬件跑不了任意门电路。在某些可映射为 GBS 采样的问题上,光子采样器能探索门模型 NISQ 设备难以达到的采样规模;但具体应用仍依赖嵌入、后处理和验证方法。规划中的适配器可根据任务类型选择对应的光子采样工作流。