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

Browser Playground

Build a small quantum circuit and run it right here — a real statevector simulator runs in your browser, computes the amplitudes, and samples a measurement histogram. No install, no backend.

Presets:
Target: Control:
Angle: 90°
Circuit:

How it works

  • Pick a target qubit, then click a gate to append it. For CNOT, set both a control and a target.
  • Run evolves the state |0…0⟩ through your gates and samples 1000 shots.
  • The same circuit as a qalgora-Q kernel would use h, x.ctrl, and mz — see Building Quantum Kernels.
Exporting code
The exported code reflects the current canvas; after picking a preset, confirm the gates were added. With an empty canvas, the export contains only the initial-state measurement.
Exact simulation
This is a full complex-amplitude statevector simulator (up to 4 qubits here). The planned GPU target is intended to support larger simulation scales with GPU acceleration; the open reference build currently simulates only in the browser or on a local CPU.

浏览器在线模拟

在这里直接搭一个小型量子电路并运行——一个真正的态矢量模拟器跑在你的浏览器里,算出振幅并采样出测量直方图。无需安装,无需后端。

预设:
目标比特: 控制比特:
角度: 90°
电路:

工作原理

  • 先选一个目标比特,再点门即可把它追加到电路。对 CNOT,需同时指定控制比特与目标比特。
  • 运行 会让初态 |0…0⟩ 经过你搭的门演化,并采样 1000 次。
  • 同样的电路写成 qalgora-Q 内核会用到 hx.ctrlmz——参见 构建量子内核
导出代码
导出代码反映当前画布;选择预设后请确认门已添加;画布为空时导出只含初态测量。
精确模拟
这是一个完整的复振幅态矢量模拟器(这里最多 4 个量子比特)。规划中的 GPU 目标计划以 GPU 加速支持更大模拟规模;开放参考实现当前仅用浏览器或本地 CPU 模拟。