gcw_6a3w2yXz/cirdit_multimodal_compile_3to5qubit_v1.1
模型介绍
文件和版本
Pull Requests
讨论
分析

Floki00/cirdit_multimodal_compile_3to5qubit_v1.1 在 Ascend NPU 上

模型与任务

  • 模型:Floki00/cirdit_multimodal_compile_3to5qubit_v1.1
  • Revision:bd2c968349d0915580b5acbaf970d2fc446d2503
  • 适配路线:circuit-compilation-diffusion
  • 设备:npu:0

环境依赖

{
  "torch": "2.9.0+cpu",
  "torch_npu": "2.9.0.post1+gitee7ba04",
  "device_name": "Ascend910_9362",
  "device_count": 2,
  "dtype": "float32 (sampling) / complex64 (unitary input)",
  "peak_npu_memory_mb": 1510.6
}

安装:pip install -r requirements.txt

NPU 推理

默认运行:python inference.py

真实输入

{
  "route": "circuit-compilation-diffusion",
  "seed": 20260823,
  "timesteps": 40,
  "scheduler": "DPM",
  "lambda_h": 1.0,
  "lambda_w": 0.35,
  "g_h": 0.3,
  "g_w": 0.1,
  "system_size": 5,
  "max_gates": 32,
  "samples_per_target": 4,
  "targets": {
    "qft4": {
      "name": "QFT_4qubit_genQC_SpecialUnitaries",
      "num_qubits": 4,
      "sha256": "3b643af8a6610e962142ec26589cb1f455972926a0ed3ad1565570ec3e9adc74"
    },
    "ghz3": {
      "name": "GHZ3_prep_h(q0)_cx(q0,q1)_cx(q1,q2)_via_genQC_backend",
      "num_qubits": 3,
      "sha256": "47fa0b1727243b6cdf42ec533cb75254e875567e5f2ef664403ca902aaec3fc0"
    }
  }
}

真实推理结果

{
  "qft4": {
    "target": "QFT_4qubit_genQC_SpecialUnitaries",
    "num_qubits": 4,
    "gate_counts_per_sample": [
      11,
      11,
      12,
      11
    ],
    "gate_frequency": {
      "h": 16,
      "cx": 4,
      "ccx": 0,
      "swap": 8,
      "rx": 0,
      "ry": 0,
      "rz": 0,
      "cp": 17
    },
    "mean_gates": 11.25,
    "structurally_valid": "3/4",
    "buildable": 3,
    "non_buildable_reported": 1,
    "decode_errors": [
      "sample0: CircuitError"
    ],
    "fidelities": [
      null,
      0.371054,
      0.971854,
      0.969204
    ],
    "best_fidelity": 0.971854,
    "fidelity_threshold": 0.95
  },
  "ghz3": {
    "target": "GHZ3_prep_h(q0)_cx(q0,q1)_cx(q1,q2)_via_genQC_backend",
    "num_qubits": 3,
    "gate_counts_per_sample": [
      4,
      3,
      3,
      4
    ],
    "gate_frequency": {
      "h": 4,
      "cx": 10,
      "ccx": 0,
      "swap": 0,
      "rx": 0,
      "ry": 0,
      "rz": 0,
      "cp": 0
    },
    "mean_gates": 3.5,
    "structurally_valid": "4/4",
    "buildable": 4,
    "non_buildable_reported": 0,
    "decode_errors": [],
    "fidelities": [
      0.9999999657714581,
      0.9999999657714581,
      0.9999999657714581,
      0.9999999657714581
    ],
    "best_fidelity": 0.9999999657714581,
    "fidelity_threshold": 0.99
  }
}

CPU-NPU 一致性

{
  "reproducibility_token_exact_same_seed": {
    "qft4": true,
    "ghz3": true
  },
  "note": "fixed-seed NPU reruns are bit-exact; CPU baseline compared via gate-count/gate-frequency statistics in adaptation records"
}

性能

{
  "warmup_seconds_incl_compile": [
    2.162,
    1.518
  ],
  "stable_runs": [
    {
      "run": 1,
      "total_s": 3.474,
      "s_per_circuit": 0.434
    },
    {
      "run": 2,
      "total_s": 3.475,
      "s_per_circuit": 0.434
    },
    {
      "run": 3,
      "total_s": 3.463,
      "s_per_circuit": 0.433
    }
  ],
  "s_per_circuit_mean": 0.434
}

自验证截图

Agent 工作流

NPU 设备调用

模型结果

已知限制

  • 仅对本次记录中的模型 revision、输入契约、dtype 与 Ascend 环境完成验证。

标签

#NPU #Ascend #Ascend910