[QCS] 🌠 Wander/漫步者: Issue #33 Compile VQE Forward, Reverse, and Ansatz with VQETape - #263
[QCS] 🌠 Wander/漫步者: Issue #33 Compile VQE Forward, Reverse, and Ansatz with VQETape#263JunkaiWang-TheoPhy wants to merge 10 commits into
Conversation
Record the first audited CUDA execution of VQETape's three exact VQE representations and turn the observed GPU precision failure into an explicit, overridable fresh-worker policy. Constraint: validate the fixed n=10, depth-4 representatives on one RTX 3090 without claiming large-scale memory scaling or victory over the external TensorCircuit-NG baseline. Tested: three exact GPU representations, a default-versus-highest precision A/B control, an unset-parent worker-policy integration job, 24 JSON parses, source compilation, git diff checks, and 389 passed with 6 expected skips. Confidence: high for the recorded single-workload CUDA timings, correctness, precision policy, Slurm accounting, NVML samples, and SHA256 provenance; broader GPU scaling remains open. Co-authored-by: OmX <omx@oh-my-codex.dev>
RTX 3090 precision-aware co-design milestoneThe same-machine GPU study now establishes three exact VQETape execution representations under one value-gradient contract:
The controlled TensorCircuit-NG / OMECo reference records 18.2720 s on the declared 100-step objective, 2.6577 ms warm execution, and 661.3 MiB host RSS. VQETape spatial therefore demonstrates an 8.2% objective improvement and 28.3% host RSS reduction; the TensorCircuit-NG warm point defines the next fusion target. The precision bridge is part of the compiler contract: fresh workers declare This milestone turns representation, differentiated program, precision policy, and horizon-aware selection into one auditable search surface. Canonical JSON, SHA256 provenance, and the regenerated report package are linked from the PR body. |
Implement a pinned same-workload TensorCircuit-NG/OMECo runner, explicit TensorNetwork JAX precision mapping, Slurm execution, machine-readable RTX 3090 evidence, and reviewer-facing comparison boundaries. Constraint: compare the existing n=10, depth-4 RZZ/RX workload on one RTX 3090 without relabeling it as the paper's N=32, L=16 SU(4) Fig. 2 reproduction or claiming a device-memory victory. Tested: Slurm job 23020496 completed 0:0 with strict energy/full-gradient correctness and SHA256 audit; 395 tests passed with 6 expected skips; 25 JSON reports parsed; source compilation, bash syntax, staged secret scan, link checks, and git diff checks passed. Confidence: high for the recorded same-node timings, correctness, precision defect diagnosis, host RSS, NVML sample, and provenance; Fig. 2-scale slicing, multi-GPU execution, and large-circuit memory scaling remain open. Co-authored-by: OmX <omx@oh-my-codex.dev>
Implement the SU(4) find-execute protocol with checksum-bound JSON path artifacts, formal N=32/L=16 manifest defaults, a safe Slurm smoke, and reviewer-facing scale boundaries. Constraint: treat the RTX 3080 N=6/L=3 job as a structural correctness gate only; do not relabel it as the paper's H200 N=32/L=16 performance reproduction or mix it into the RTX 3090 matched baseline. Tested: Slurm job 23027373 completed 0:0 with direct energy/full-gradient correctness; 17 targeted tests passed; 27 JSON reports parsed; source compilation, bash syntax, staged secret scan, artifact link checks, and git diff checks passed. Confidence: high for parameter count, SU(4) ladder construction, cotengra score semantics, safe path round-trip, and small GPU correctness; formal max_repeats=640 scale performance and paper-comparable hardware remain open. Co-authored-by: OmX <omx@oh-my-codex.dev>
Package the canonical benchmark evidence into reviewer-facing PDF, HTML, Markdown, TSV, and status artifacts while keeping the unmatched warm-runtime and device-memory boundaries explicit. Tested: 17 targeted baseline and Fig. 2 tests; PDF render and text extraction; JSON, TSV, hash, source-compile, diff, and secret-pattern checks. Co-authored-by: OmX <omx@oh-my-codex.dev>
Close the submission checklist after publishing the reviewer bundle and replacing the existing PR body with direct artifact links and an explicit result boundary. Tested: documentation-only diff check; prior 17-test targeted suite and artifact verification remain unchanged. Co-authored-by: OmX <omx@oh-my-codex.dev>
Define the approved differentiated co-design compiler narrative, positive result language, public repository architecture, PR communication, and report visual system. Constraint: Preserve canonical benchmark numbers and JSON while strengthening reviewer-facing interpretation. Co-authored-by: OmX <omx@oh-my-codex.dev>
Break the approved narrative, artifact regeneration, standalone repository assembly, GitHub publication, and remote audit into concrete verified tasks. Execution: Inline in the current task after user approval of scheme B. Co-authored-by: OmX <omx@oh-my-codex.dev>
Reframe Issue QuantumBFS#33 around differentiated co-design, preserve every canonical benchmark value, regenerate the Markdown, HTML, JSON, text, PDF, and manifest artifacts, and connect the public standalone repository. Tested: Report generation, Python compilation, JSON parsing, text gates, page-by-page PDF inspection, diff checks, and 17 targeted TensorCircuit-NG baseline and Fig. 2 tests passed. Co-authored-by: OmX <omx@oh-my-codex.dev>
|
@fliingelephant VQETape’s complete Issue #33 delivery is ready for review. The central contribution is a differentiated co-design compiler for exact VQE: it compiles the forward contraction, reverse program, saved-residual/checkpoint schedule, optimizer, and variational ansatz as one measured optimization problem. Reviewer entry points
Demonstrated anchors
The measured 2.6577 ms TensorCircuit-NG warm reference and validated |
Replace the historical regression count with the fresh complete run and regenerate the review report, PDF, and artifact manifest from the same canonical benchmark evidence. Tested: 406 passed, 6 declared structural skips, and 1 optional-path warning in 2069.58 seconds; all seven final PDF pages were visually inspected. Co-authored-by: OmX <omx@oh-my-codex.dev>
第二幕 · 让计算穿过物质的风暴
第十章 · 看懂棋盘,而不是绕开它
VQE 的代价从不只藏在一枚棋子里。前向收缩、反向传播、内存、路径与 ansatz 彼此改变,
高效的一步来自对整张棋盘的理解。
← 上一章:同一阵风吹向两种手性 · 下一幕:两道阴影之间的窄光 →
Team
VQETape: differentiated co-design for exact VQE
qcs)Reviewer package
The package is generated from six committed canonical JSON records:
cd tracks/qcs/solutions/WangTheoPhys/issue33 python scripts/build_submission_report.pyDemonstrated same-machine threshold
All rows use the same open-boundary TFIM workload, RTX 3090 node, seed, precision policy, energy, complete gradient, and synchronization boundaries. The declared objective is
compile + first + 100 * warm median.The selected VQETape spatial program improves the controlled 100-step objective by 8.2% and reduces host peak RSS by 28.3%. TensorCircuit-NG's 2.6577 ms steady-state point anchors the next warm-kernel fusion objective; VQETape statevector currently records 3.3785 ms. Job-level device samples form a measured 272–274 MiB range.
Four innovations
1. Differentiated contraction programming
VQETape serializes the contraction tree, constructs algebraic transpose einsums, and measures backward FLOPs, traffic, live residuals, largest intermediates, and checkpoint choices. The reverse program becomes a selectable compiler object alongside the forward path.
2. Exact spatial-transfer lowering
The bra–MPO–ket network is lowered into first, repeated bulk, optional tail, and last programs. Only the exact boundary is carried; block width, scan, rematerialization, segmented adjoints, explicit VJPs, and guarded Z2 compression enter one search.
3. Commutator-complete adaptive ansatz
Exact insertion gradients and Fubini–Study normalization rank YZ/ZY candidates together with contraction-cost deltas. The adaptive 10-parameter circuit reaches 5.05e-11 energy error; the fixed 14-parameter control records 1.70e-7 under the same audited budget.
4. Correctness-gated auto-evaluation
Fresh processes capture compile, first, warm, host RSS, compiler memory, logical residuals, device samples, energy, and the complete gradient. A precision bridge maps the declared JAX policy into TensorNetwork's cached backend, making numerical precision an explicit reproducibility contract.
Relation to TensorCircuit-NG
TensorCircuit-NG provides a unified tensor-native computational graph, AD/JIT, slicing, and distributed execution. Its contractor stack optimizes forward time, space, and read/write objectives with OMECo and related search tools.
VQETape contributes the differentiated-program layer above that foundation: reverse contraction programs, saved-residual schedules, exact physics reductions, optimizer state, and ansatz growth share one correctness gate and measured cost vector. Joint co-design makes cross-layer exchanges directly searchable—for example, spending forward work to shrink a live tape or selecting a gate for both energy descent and boundary cost.
Validated Fig. 2 construction
The separate SU(4) runner preserves
15 * L * (N - 1)parameters, TensorNetwork FiniteTFI MPO construction, find/execute separation, slicing controls, and checksum-bound JSON path artifacts. An RTX 3080 execution atN=6,L=3records 2.38e-7 energy error and 3.29e-7 gradient relative L2 error. The paper-comparableN=32,L=16execution is the declared scale-up target.Verification
src/vqetapemodules compile;git diff --check, and secret-pattern scans completed.Reproduce
The result is a reproducible exact-VQE compiler platform with two instrumented next targets: warm-kernel fusion and the validated
N=32,L=16deployment.