feat(runtime): route sharded adjoint VJP through kernel catalog (#259)
Summary
- route the sharded one-qubit adjoint VJP through the semantic kernel catalog
- bind runtime evidence to
gradient.vjp.adjoint_1q.shardedandFQKI-TRITON-GR-003-A- preserve the generic fallback for unsupported multi-wire VJP decisions
- add policy, capability-mismatch, tensor-contract, and real distributed execution coverage
Validation
80 passed, 4 skipped: statevector reverse and kernel catalog unit suites2 passed: GR-003 Triton numerical differential on NVIDIA A800-SXM4-80GB2 passed: complete two-rank reverse executor suite on jp-a800-172, including NCCL execution on two A800 GPUs- Black, Ruff, focused strict mypy, architecture boundaries, team ownership, and diff checks passed
The A800 run is accelerator execution evidence for this constrained kernel route; it does not by itself introduce or promote a scalability claim.
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
Quantum computing, built for learning.
A PyTorch-first framework for differentiable quantum computing and quantum AI.
Quick start · Documentation · Examples
Turn quantum circuits into trainable models. FlagQuantum brings PyTorch learning, multiple simulation representations, and hardware execution into one workflow. Its long-term goal is a continuous path from local scientific exploration to distributed training, device modeling, and fault-tolerant quantum computing research.
Support is specific to each backend and workload. Local training and selected distributed paths have correctness evidence. See the validation scope for what has been tested and what remains a research goal.
Train your first quantum model
Requires Python 3.10–3.12. Install the released version:
Or install the development version from source (editable, with development tools):
To build a CPU or GPU environment with QSteed and optional JAX, follow the container guide.
Build a two-qubit circuit and learn its rotation angle by minimizing ⟨Z₀⟩.
fq.Moduleexposes the quantum model to PyTorch;outputsselects what to measure after training.For a complete classical–quantum model, follow the hybrid training example.
Same circuit. Different execution targets.
The experimental adapters can evaluate the same observable on a Jiuding GPU workspace or Quafu quantum hardware. Configure the Jiuding workspace and credentials or the Quafu token before running the corresponding call.
Direct Quafu submission requires the development version containing this feature. With the published 0.2.0 release, use the documented local QSteed compilation path.
Jiuding computes a simulated expectation; Quafu estimates it from hardware measurements. The training example runs on your local machine; these calls evaluate the trained circuit remotely. Live provider access is required and is not certified by the local or A800 checks.
Go further
Connect simulation with device observations. Use QPU digital twins to compare calibration-based model predictions with measured counts. See the experiment guide for task binding and the scope of hardware validation.
Toward fault-tolerant quantum computing. Start with a local QEC memory experiment connecting syndrome extraction, decoding, and correction. Logical operations and hardware feedback are longer-term research goals.
Quantum AI tutorials · Distributed statevector · Distributed MPS · ARCHITECTURE.md
Support varies by execution path. See the capability catalog for maturity and limitations.
Benchmarks and validated results
Contributing · Apache License 2.0