From Probabilistic Cloud to Pycloud — A Control-Layer Language for Quantum Computing and Hardware Validation
Abstract
Probabilistic cloud state machine (PCSM) theory [1] formalises the classical control layer of quantum computation as a geometric model on the space of stable probability distributions. This paper reports the implementation path from that theory to a usable Python programming interface, together with hardware-validation results on the "Origin Wukong" superconducting quantum chip. The six-layer technology stack is: physical calibration layer, symbol-table layer, structure layer, semantic-resolution layer, compiler layer, and pycloud API layer. A software engineer with no background in quantum physics can prepare, transform and measure a probability-cloud symbol in three lines of Python; decide() provides branching decisions based on measurement feedback and natively composes with Python control flow. Engineering extensions (all offline simulation and modelling): (instruction set) the probabilistic cloud state machine instruction-set architecture specification is finalised: 27 instructions in five classes — core computation (5), structure management (6), execution/compilation (5), runtime (4), resource management (7) — with a data-type system, 6 error codes and a synchronous/asynchronous/blocking three-state timing model; the core-computation and runtime paths have prototype implementations (§7.1); (runtime) the pycloud API provides the runtime instructions WAIT/RESET/TRACE/SAVE_CONTEXT, together with the context data structure ContextData (symbol table + edge table + task ID + operation history + resource-allocation snapshot), making runtime state savable, loadable and auditable (§7.5); (scheduler) prototypes of a static scheduler (priority descending → qubit-count filtering → lowest-noise greedy allocation) and a dynamic scheduler (noise-drift modelling + execution-time management + exception handling) are complete: in simulation, when the noise of reg_A rises to 0.09, the affected p_Bell task is automatically migrated to reg_E, and reg_A enters the recalibrating state and recovers two time steps later (§7.3–7.4) — the runtime-level engineering realisation of "the symbol table must be calibrated dynamically"; (three-qubit symbols) a three-qubit simulated symbol table is constructed under the typical Origin Wukong noise model (depolarising 0.001, readout error 0.01): all 8 candidate symbols pass the consistency screening (√JS convention, A≈0.975–0.990), and 7 remain after de-duplication (including the GHZ state, A=0.97506) 【offline simulation】(§7.2); (tests) a test suite of 38 items passes completely, covering the compiler, symbol table, structure graph, scheduler, numerical precision, boundary cases and integration paths (§7.6). Hardware results: (1) the anchoring fidelity of single-qubit and two-qubit symbols in a single hardware calibration session is A=0.889–0.998A=0.889–0.998 (√JS convention; for the two-qubit conversions see the data note of §5.3, where the unusable symbol AA is as low as 0.22 — the two-qubit symbol h_i, whose old-convention value 0.5836 is stored in pycloud/data/wukong_2qubit_symbols.json and whose √JS-convention value is 0.2249); the upper bound of deterministic symbols is about A≈0.915A≈0.915, determined by the readout error and not improvable by more shots (§4.2); (2) parametrised rotation gates show significant anomalies at specific angles (RY(π/4) deviation 0.136 ≈ 8.6σ, RZ(π/2) deviation 0.167 ≈ 7.4σ), while RY(0), RY(π/2) and RY(π) are normal; the discrete gates (H, X, CNOT, S) are normal in this dataset (§4.4). This paper reports the anomaly truthfully and states that the present data are insufficient to determine the root cause; (3) the three-qubit GHZ state yields M=3.9541M=3.9541 and M=3.9720M=3.9720 in two measurements, both far beyond the classical bound 2, confirming the physical realisability of multipartite entanglement (§4.5). The two measurements are technical replicates with the same circuit, the same device and the same calibration window, and do not constitute independent experiments; (4) a recalibration record of 40 intermittent sampling points (2026-09-05 08:34–15:08, spanning about 6.6 hours, 500 shots per point) shows that the standard deviation of P(0)P(0) of the ∣+⟩∣+⟩ symbol prepared by the H gate is 2.71 times the pure shot-noise expectation, and the mean deviates from 0.5 by 5.6 standard errors — a real deviation beyond statistical fluctuation; hence "calibrate once, use indefinitely" is unreliable (§4.3). Note: the sampling is intermittent, and no drift rate or time scale is claimed on this basis; (5) the theory paper gives two ceilings for the control layer: the first is the hardware layer (the readout error determines A≤0.915A≤0.915, §4.2); the second is the coherence blind spot (theorem-level, hardware-independent): ∣+⟩∣+⟩ and ∣−⟩∣−⟩ have classical anchoring A=1A=1 and are completely indistinguishable in the computational basis, while their quantum JS distance is the maximum ln2ln2 — regardless of shots and readout quality, the control layer's ability to distinguish the family of same-diagonal pairs is identically zero (§5.6). This paper further gives a third ceiling (predictive-gain ceiling, theorem-level, hardware-independent): for the ensemble {12,∣+⟩;12,∣−⟩}{21,∣+⟩;21,∣−⟩}, the Holevo quantity is χ=ln2χ=ln2 while the control layer's relationality is I=0I=0 (I≤χI≤χ, the fourth row of the fourfold projection) — the control layer's predictive gain on the family of same-diagonal pairs is identically zero (§5.6). "Symbols must be bound to a measurement basis" is thereby promoted from an engineering requirement to a necessity of the projection structure; (6) directionality monitoring primitive: the third cumulant TT and the asymmetry difference (the difference of the two KL divergences, ≈−16T dθ3≈−61Tdθ3) can serve as a directionality probe into the blind spot of second-order statistics (AA), for testing the relation between directionality defects and the parametrised-gate anomalies (§5.7, not yet on hardware · proposal); (7) mathematical grounding (based on the mathematics paper [10]; no hardware data are changed): the three edge-definition conditions of §2.4 are the engineering instances of Theorems 2 and 3 of the mathematics paper; the symbol drift of §5.1 is the theoretically expected failure of the regularity condition R3 (the recalibration loop is the quasi-stationary compensation); the directionality monitoring of §5.7 gains logical-side support from Theorems 7 and 4; the structure layer of §2.6 is an instance of the structure–symbol sample space (mathematics paper Definitions 2.1/2.2); the priority 0 of §8.2 acquires theoretical necessity. Convention note: the theoretical presentation of this paper is aligned with the four-dimensional convention of Constraints of Logical Space [11] — the four dimensions are directionality ΔSΔS, determinacy HH, consistency (anchoring strength) AA, and relationality II, whose quantum completion is the fourfold projection (H≥SvNH≥SvN, ΔS≤SqΔS≤Sq, JS≤JQJS≤JQ, I≤χI≤χ); the name of the third dimension is consistency, AA being the anchoring strength, and "anchoring fidelity" is the engineering metric name retained in this paper. Keywords: probabilistic cloud state machine; quantum programming language; pycloud; anchoring fidelity; hardware validation; GHZ; Mermin inequality; Origin Wukong; coherence blind spot; predictive-gain ceiling; directionality monitoring; instruction-set architecture; scheduler; context management; fourfold projection; relationality; Holevo quantity 概率云状态机理论 [1] 将量子计算的经典控制层形式化为稳定概率分布空间上的几何模型。本文报告从该理论到可用 Python 编程接口的实现路径,以及在"本源悟空"超导量子芯片上的真机验证结果。 六层技术栈为:物理标定层、符号表层、结构层、语义解析层、编译器层、pycloud API 层。软件工程师无需量子物理背景,即可用三行 Python 代码完成概率云符号的准备、变换与测量;decide() 提供基于测量反馈的分支决策,并原生兼容 Python 的控制流。 工程扩展(全部为离线仿真与模拟): (指令集)概率云状态机指令集架构规范定稿:27 条指令,分核心计算(5)、结构管理(6)、执行编译(5)、运行时(4)、资源管理(7)五类,含数据类型系统、6 类错误码与同步/异步/阻塞三态时序模型;核心计算与运行时路径已实现原型(§7.1); (运行时)pycloud API 提供运行时指令 WAIT/RESET/TRACE/SAVE_CONTEXT,配合上下文数据结构 ContextData(符号表 + 边表 + 任务 ID + 操作历史 + 资源分配快照)实现运行时状态的可保存、可加载、可审计(§7.5); (调度器)静态调度器(优先级降序 → 比特数过滤 → 最低噪声贪心分配)与动态调度器(噪声漂移模拟 + 执行时间管理 + 异常处理)原型完成:模拟中 reg_A 噪声升至 0.09 时,受影响的 p_Bell 任务自动迁移至 reg_E,reg_A 进入重标定态并在两个时间步后恢复(§7.3–7.4)——这是"符号表必须动态标定"在运行时层的工程实现; (三比特符号)在本源悟空典型噪声模型(去极化 0.001、读出误差 0.01)下构建三比特仿真符号表:8 个候选符号全部通过一致性筛选(√JS 约定,A≈0.975–0.990),去冗余后保留 7 个(含 GHZ 态,A=0.97506)【离线仿真】(§7.2); (测试)测试套件 38 项全部通过,覆盖编译器、符号表、结构图、调度器、数值精度、边界情形与集成路径(§7.6)。 真机结果: (1)单比特与两比特符号在单次真机标定中的锚定保真度为 A=0.889–0.998A=0.889–0.998(JSJS 约定;两比特符号的换算见 §5.3 数据注记,其中不可用符号 AA 低至 0.22——即两比特符号 h_i,其旧约定值 0.5836 存储于 pycloud/data/wukong_2qubit_symbols.json,√JS 约定值为 0.2249);确定性符号的上限约 A≈0.915A≈0.915,该上限由读出误差决定,提高 shots 不能改善(§4.2); (2)参数化旋转门在特定角度出现显著异常(RY(π/4) 偏差 0.136 ≈ 8.6σ、RZ(π/2) 偏差 0.167 ≈ 7.4σ),而 RY(0)、RY(π/2)、RY(π) 正常;离散门(H、X、CNOT、S)本次数据正常(§4.4)。本文如实报告该异常,并说明现有数据不足以判定根因; (3)三比特 GHZ 态两次测得 M=3.9541M=3.9541 与 M=3.9720M=3.9720,均远超经典极限 2,确认多体纠缠的物理可实现性(§4.5)。两次测量为同一线路、同一校准窗口内的技术重复,不构成独立实验; (4)40 个断续采样点(2026-09-05 08:34–15:08,跨度约 6.6 小时,每点 500 shots)的重标定记录显示:H 门制备的 ∣+⟩∣+⟩ 符号其 P(0)P(0) 的标准差是纯散粒噪声期望的 2.71 倍,均值偏离 0.5 达 5.6 个标准误——存在超出统计涨落的真实偏差,故"一次标定、长期沿用"不可靠(§4.3)。注意:断续采样,不据此主张漂移速率或时间尺度; (5)理论论文给出控制层的两层天花板:第一层是硬件层(读出误差决定 A≤0.915A≤0.915,§4.2);第二层是相干盲区(定理级、硬件无关):∣+⟩∣+⟩ 与 ∣−⟩∣−⟩ 在计算基下经典锚定 A=1A=1 且完全不可区分,而其量子 JS 距离为最大值 ln2ln2——无论 shots 与读出质量如何,控制层对同对角对家族的区分能力恒为零(§5.6)。本文进一步给出第三层天花板(预测增益天花板,定理级、硬件无关):对 {12,∣+⟩;12,∣−⟩}{21,∣+⟩;21,∣−⟩} 系综,Holevo 量 χ=ln2χ=ln2,而控制层的关联性 I=0I=0(I≤χI≤χ,四重投影第四行)——控制层对同对角对家族的预测增益恒为零(§5.6)。"符号绑定测量基"由此从工程要求升级为投影结构的必然; (6)方向性监测原语:三阶累积量 TT 与不对称差(正反两向 KL 之差 ≈−16T dθ3≈−61Tdθ3)可作为对二阶统计(AA)盲区的方向性探针,用于检验方向性缺陷与参数化门异常的关系(§5.7,未上机·提案); (7)数学依据(依据数学论文 [10],不改变任何真机数据):§2.4 边定义三条件 = 数学论文定理 2、定理 3 的工程实例;§5.1 的符号漂移 = 正则条件 R3 失败的理论预期(重标定循环 = 拟平稳补偿);§5.7 方向性监测获定理 7、定理 4 的逻辑侧支撑;§2.6 结构层 = 结构–符号样本空间的实例(数学论文定义 2.1/2.2);§8.2 优先级 0 获理论必然性。 约定注记:本文的理论表述与《逻辑空间的约束》[11] 的四维约定对齐——四个维度为方向性 ΔSΔS、确定性 HH、一致性(锚定强度)AA、关联性 II,其量子完成为四重投影(H≥SvNH≥SvN、ΔS≤SqΔS≤Sq、JS≤JQJS≤JQ、I≤χI≤χ);第三维的维度名为一致性,AA 即锚定强度,"锚定保真度"为本文沿用的工程指标名。 关键词:概率云状态机;量子编程语言;pycl