| language | en | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| license | mit | ||||||||||||||||||||||||||||||||||
| library_name | pytorch | ||||||||||||||||||||||||||||||||||
| tags |
|
||||||||||||||||||||||||||||||||||
| datasets |
|
||||||||||||||||||||||||||||||||||
| base_model | Ryukijano/h-cgqe-gic2026 | ||||||||||||||||||||||||||||||||||
| metrics |
|
||||||||||||||||||||||||||||||||||
| model-index |
|
AI-Driven Generative Quantum Circuit Design for Molecular & Materials Discovery
Generative AI × Reinforcement Learning × CUDA-Q × Quantum Hardware
Mitsubishi Chemical Group & AIST Quantum Challenge (GIC 2026)
| RL Training Loop (DAPO/GRPO) | Transformer Architecture |
![]() |
![]() |
| VQE vs H-cGQE Comparison | HPC ↔ QPU Async Workflow |
![]() |
![]() |
Conditional-GQE (H-cGQE) is an artificial intelligence framework that automatically designs quantum computing circuits for chemistry and materials science.
Traditional Quantum Virtual Eigensolvers (VQEs) rely on manual, human-designed quantum circuits that are either too deep for real quantum hardware or get trapped in mathematical dead-ends called barren plateaus and diagonal collapse.
H-cGQE pairs a Chemical Graph Neural Network (GNN) and a Transformer with Quality-Diversity Reinforcement Learning (QD-GRPO) to amortize ansatz design: conditioned on molecular structure and the electronic Hamiltonian, the model proposes compact operator sequences whose continuous angles are refined classically (L-BFGS-B). The goal is chemical accuracy (
┌────────────────────────┐ ┌────────────────────────┐ ┌────────────────────────┐
│ Molecular Structure │ ───► │ AI Transformer Agent │ ───► │ Compact Quantum Circuit│
│ (Atoms, Bonds, Energy) │ │ (GNN + QD-GRPO Policy) │ │ (Optimized for QPUs) │
└────────────────────────┘ └────────────────────────┘ └────────────────────────┘
🔗 Model Weights & Artifacts: Hosted on HuggingFace at
Ryukijano/h-cgqe-gic2026
| Benchmark / Molecule | Active Space / Qubits | Reported Metric | Baseline / Context | Highlight / Caveat |
|---|---|---|---|---|
| Methyl Iodide ( |
8q CAS(4e,4o) |
|
|
Sub-chemical accuracy (results/phase3_final/benchmark_ch3i_consolidated.json). Distinct from the larger GIC methyl_iodide_cas12 Hamiltonian. |
| Hydrogen ( |
4 Qubits |
|
Shot-noise simulator cross-check | Cross-backend energy discrepancy on a shallow circuit (results/eval/simulator_validation.json); not an FCI error. |
| IQM Emerald QPU | 8 Qubits | Ideal bitstring target | 1024-shot hardware run; fidelity is to the expected computational-basis string, not energy accuracy on QPU. | |
| Benzene ( |
40q (QSCI/MPS path) | QSCI subspace estimate (~19 s) | Full SV OOM / infeasible | Runtime scaling demonstration; not a claim of exact FCI/CASCI match. See results/phase3_final/qsci/. |
| Ethylene ( |
28 Qubits | MPS bond-dim. sweep ( |
Full SV stressful / often impractical | ~300 s single-GPU MPS convergence study; accuracy depends on bond dimension. |
| GIC molecule suite | 4q – 28q | Conditioned generation + collapse mitigations | Diagonal / commuting collapse is a known GQE failure mode | UCCSD pools + entanglement constraints are designed to suppress Z-only collapse. Suite-wide chemical-accuracy rates should be reported from eval JSONs, not assumed 100%. |
Notes: Chemical accuracy ≈
4q 12q 20q 28q 40q
│ │ │ │ │
▼ ▼ ▼ ▼ ▼
┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐
│ H₂ │ │ LiH │ │ N₂ │ │ C₂H₄│ │C₆H₆│
│ (4q)│ │(12q)│ │(20q)│ │(28q)│ │(40q)│
└──┬──┘ └──┬──┘ └──┬──┘ └──┬──┘ └──┬──┘
│ │ │ │ │
▼ ▼ ▼ ▼ ▼
┌─────────────────────────────────────────────────────┐
│ CUDA-Q Statevector (nvidia-mqpu, 3× L40S) │
│ ● Fast: <1s per circuit ● RL training rewards │
│ ● B200 SQLite Cache (24k+ entries) │
│ ● QPU Validation (qBraid: IQM, Rigetti) │
└──────────────────────┬──────────────────────────────┘
│ 24q threshold (PCIe L40S)
▼
┌─────────────────────────────────────────────────────┐
│ MPS Tensor Network (bond dim D=32…256) │
│ ● Ethylene 28q: ~300s on single L40S │
│ ● Bond convergence sweep required for accuracy │
└──────────────────────┬──────────────────────────────┘
│ 28q threshold
▼
┌─────────────────────────────────────────────────────┐
│ QSCI + FMO2 (28–40q) │
│ ● Benzene 40q: ~19s QSCI/MPS path (subspace estimate) │
│ ● FMO2: fragment → evaluate → reassemble parent │
│ ● NOT brute-force statevector (scientifically wrong│
│ for 32–40q JW chemistry circuits) │
└─────────────────────────────────────────────────────┘
Unlike standard NLP transformers, C-GQE features an Edge-Aware Message-Passing Graph Neural Network (src/gqe/models/chemistry_encoder.py) that encodes the physical topology of the molecule — conceptually analogous to how AlphaFold's Evoformer processes structural relationships:
- Node Features: Atomic numbers, hybridization states, formal charges, valence, aromaticity.
-
Edge Features: Chemical bond types, 3D interatomic distances
$R_{ij}$ , conjugation, ring membership. -
Global Invariants: Active space qubit count
$N_q$ , total electron count$N_e$ , spin multiplicity$2S+1$ . - Mechanism: 3 layers of edge-weighted message passing → dual pooling (mean + max) → projection to soft prompt tokens that prefix-condition the decoder's cross-attention.
- Why GNN? The molecular graph topology (bond connectivity, atom types) determines which fermionic excitations are chemically relevant. A flat MLP on atom counts would miss the graph structure — the GNN captures local chemical environments (e.g., "this carbon is in an aromatic ring with two neighbors") that inform operator selection.
In early GQE implementations, AI agents discovered a "lazy shortcut": generating commuting std(rewards) = 0).
❌ COLLAPSED SEQUENCE (Z-only, commuting) ✅ ENTANGLED SEQUENCE (UCCSD, non-commuting)
┌─────────────────────────────────┐ ┌─────────────────────────────────┐
│ A₁ = IZIZ (Z-only) │ │ A₁ = YZXI (X+Y entangling) │
│ A₂ = ZZII (Z-only) │ │ A₂ = XZYI (X+Y entangling) │
│ A₃ = IZIZ (duplicate) │ │ A₃ = IYZX (X+Y entangling) │
│ A₄ = ZIIZ (Z-only) │ │ A₄ = ZXIY (X+Y entangling) │
│ │ │ │
│ [A_i, A_j] = 0 ∀ i,j │ │ [A_i, A_j] ≠ 0 (non-commuting) │
│ ∂E/∂θ_i = 0 (zero gradient) │ │ ∂E/∂θ_i ≠ 0 (non-zero grad) │
│ E = E_HF (trapped at baseline) │ │ E < E_HF (energy improvement) │
│ std(rewards) = 0 → no learning │ │ std(rewards) > 0 → RL learns │
└─────────────────────────────────┘ └─────────────────────────────────┘
-
Our Solution:
-
UCCSD Operator Pool: Built from fermionic single/double excitations mapped via Jordan-Wigner, guaranteeing entangling
$X/Y$ operations. Zero Z-only operators by construction. -
Entanglement Enforcement:
force_entanglement=Truein the decoder masks Z-only tokens during sampling, ensuring at least one multi-qubit entangler per sequence. -
Commutator Penalty: Explicit reward penalty
$w_4 \cdot \text{frac}([A_i, A_j] \neq 0)$ for commuting operator sequences.
-
UCCSD Operator Pool: Built from fermionic single/double excitations mapped via Jordan-Wigner, guaranteeing entangling
Verified pool statistics: H₂ (4q): 16 Pauli words, 0 Z-only, 192 pool entries. LiH (12q): 1,408 Pauli words, 0 Z-only. N₂ (20q): 11,088 Pauli words, 0 Z-only. BeH₂ (14q): 3,456 Pauli words, 0 Z-only.
Standard Policy Gradient methods (PPO/GRPO) suffer from mode collapse, finding only one circuit structure. We implement MAP-Elites QD-GRPO (src/gqe/rl/map_elites.py):
-
2D Feature Space: The archive space is discretized into a 10×10 grid indexed by Entanglement Density (ratio of multi-qubit
$X/Y$ terms) and Circuit Depth. -
Adaptive Novelty Bonus: Rewards the policy not just for low energy, but for filling unvisited cells in feature space:
$$\text{Reward} = w_1 \cdot \left(-\frac{E}{|E_{\text{ref}}|}\right) + w_2 \cdot \text{Entanglement} + \lambda \cdot \text{Novelty}$$ - As coverage exceeds
$50%$ ,$\lambda$ decays adaptively to shift focus to energy refinement.
For a generated sequence
-
Truncated mode (RL training): 3–5 iterations,
$\theta_0 = 0.01$ , Spearman$\rho \approx 0.5$ with converged energies,$50\times$ faster than full opt. -
Full mode (final evaluation): 200 iterations,
$\text{ftol} = 10^{-10}$ , machine-precision convergence. -
Why L-BFGS-B? BFGS approximates the inverse Hessian
$H^{-1}$ using rank-2 updates from gradient evaluations — no explicit Hessian computation needed. The bounded variant (L-BFGS-B) handles box constraints on$\theta_i \in [-\pi, \pi]$ . - DedupCache: MD5 hash of operator sequence → energy. Identical circuits are never re-evaluated. SQLite-backed for persistence across training runs.
- SQLite Cache: 24,000+ entries keyed by MD5 hash of operator sequence (
results/train/rl_energy_cache.sqlite). - Offline Pretraining:
src/gqe/data/cache_to_pretrain.pyrecovers 17,408 (operators, energy) pairs by replaying deterministic circuit generation. This allows replay-buffer mixing of known-good circuits without CUDA-Q. - Cache-only mode:
--cache-onlyreturns HF energy for cache misses (no CUDA-Q). Useful for buffer imitation, but on-policy rollouts rarely hit the fixed cache → flat rewards → DAPO advantage collapse. For real RL, use write-through (drop--cache-only) so misses are evaluated and stored. Seebash scripts/train_rl.sh full.
Direct statevector simulation breaks above 28 qubits ($2^{28} \approx 268$M amplitudes). To tackle 32–40 qubit systems required by the GIC challenge, we deploy two scientific scaling pillars:
- QSCI (Quantum Selected Configuration Interaction): Samples circuits to build a determinant subspace, then classically diagonalizes a reduced Hamiltonian. Used here as a scaling path for ~40q systems (e.g. benzene) when full statevector is infeasible — report subspace energies and wall time, not “exact FCI match,” unless an independent CASCI/FCI reference is provided.
-
FMO2 (Fragment Molecular Orbital): Fragments large macromolecules into 8–12 qubit sub-units, evaluates them on quantum hardware, and reassembles parent energies via pairwise additive correction:
$$E_{\text{FMO2}} = \sum_i E_i - \sum_{i<j} (E_{ij} - E_i - E_j)$$
To contextualize C-GQE against contemporary generative quantum eigensolvers, the table below compares H-cGQE with GPT-QE (NVIDIA / U. Toronto / St. Jude, arXiv:2401.09253) and SpinGQE (Mindbeam AI, March 2026, arXiv:2603.24298):
| Technical Dimension | GPT-QE (NVIDIA/Toronto, 2024) | SpinGQE (Mindbeam AI, March 2026) | Our H-cGQE (Quantum-Buddies, 2026) |
|---|---|---|---|
| Target Systems | Single-molecule Fermionic UCCSD ( |
4-qubit Heisenberg Spin Model | 35 GIC 2026 Molecular Hamiltonians (4q–28q, extended to 40q) |
| Model Topology | Unconditional Decoder-Only (GPT-2) | Unconditional Decoder-Only (GPT-2) | Conditional Encoder-Decoder Transformer |
| Conditioning Mode | None (1 model per fixed molecule) | None (1 model per fixed Hamiltonian) | Chemistry GNN + Hamiltonian Term Cross-Attention |
| Training Objective | Softmax Boltzmann weighting |
Weighted MSE Loss: |
DAPO Policy Gradient (GRPO) + Asymmetric Clipping |
| Parameterization | Discretized evolution times |
Discretized evolution times / angle refinement | Two-Stage: Discrete Topology |
| Exploration & Diversity | Inverse temperature schedule |
Inverse temperature schedule |
MAP-Elites Quality-Diversity Archive (QD-GRPO) |
| Diagonal Collapse Mitigation | None | Temperature tuning | UCCSD Excitations + Commutator Loss + Entropy Floor |
| Generalization | Single instance | Single instance | Conditioned for cross-molecule generation (held-out energy tables still needed) |
-
Cross-Molecule Conditioning via Encoder-Decoder:
- SpinGQE & GPT-QE Limit: Decoder-only models are typically trained for a single fixed Hamiltonian; changing geometry often means retraining.
-
H-cGQE Approach:
HamiltonianEncoder+ChemistryEncoder(MPNN) condition a shared policy on$(H, \text{graph})$ . This enables multi-molecule amortization; rigorous leave-one-family-out energy evaluation is the right test of whether that conditioning generalizes.
-
Policy Optimization (DAPO RL) vs. Weighted MSE Loss:
-
SpinGQE Limit: SpinGQE uses a heuristic weighted MSE loss
$L = \sum w(E) \cdot (\text{logits}_t - E_t)^2$ to force discrete categorical token logits to regress onto continuous energy values. This leads to vanishing gradients near energy plateaus. -
H-cGQE Solution: We frame circuit design as pure Reinforcement Learning via DAPO (Decoupled Clip + Dynamic Sampling Policy Optimization) with group-relative advantage
$A_i = \frac{R_i - \mu_R}{\sigma_R}$ . Asymmetric clipping ($\epsilon_{\text{low}}=0.2, \epsilon_{\text{high}}=0.28$ ) and token-level loss stabilize RL updates without surrogate MSE regression.
-
SpinGQE Limit: SpinGQE uses a heuristic weighted MSE loss
-
Decoupled Two-Stage Optimization (Topology vs. Continuous Rotation Angles):
-
SpinGQE & GPT-QE Limit: Both models discretize continuous evolution times into discrete vocabulary tokens (
$e^{i P_j t_k}$ for$t_k \in {0.01, 0.05, 0.1, \dots}$ ), causing vocabulary explosion and limiting expressivity. -
H-cGQE Solution: We decouple discrete structural topology from continuous parameterization. Stage 1 (Transformer) generates the discrete operator sequence
$(P_{j_1}, P_{j_2}, \dots)$ . Stage 2 (L-BFGS-B) optimizes the continuous rotation angles$\vec{\theta}$ over the exact CUDA-Q expectation landscape usingnvidia-mqpu.
-
SpinGQE & GPT-QE Limit: Both models discretize continuous evolution times into discrete vocabulary tokens (
-
Quality-Diversity Archive (MAP-Elites) preventing Diagonal Collapse:
- SpinGQE & GPT-QE Limit: Autoregressive transformers naturally collapse into generating commuting, single-qubit, or Z-only operators (diagonal sequence collapse) because they carry zero entanglement overhead.
-
H-cGQE Solution: We maintain a 2D MAP-Elites archive (Entanglement Density
$\times$ Circuit Depth). Rollouts discovering unoccupied topological niches receive intrinsic novelty bonuses, forcing the agent to learn non-commuting$X/Y$ entangling operators.
The framework is benchmarked across the complete GIC 2026 challenge molecule suite:
| Category | Molecules Included | Qubit Range |
|---|---|---|
| Small Diatomics / Hydrides |
|
4q – 14q |
| Organic & Volatile Compounds |
|
14q – 28q |
| Aromatic & Heteroaromatic Systems | Benzene, Toluene, Anisole, o-Cresol, Phenol | 12q – 24q |
| Heavy-Atom & CAS Systems | Methyl Iodide ( |
12q – 24q |
| Challenge 40q Scaling Set | Benzene / |
40q (subspace / TN estimates) |
git clone https://github.com/Quantum-Buddies/Conditional_GQE.git
cd Conditional_GQE
bash scripts/setup_env.shsetup_env.sh handles everything — no sudo or system conda needed:
- Downloads and installs git-lfs binary to
$HOME/.local/bin(prebuilt, no root) - Pulls all LFS-tracked assets (checkpoints, energy cache, pretrain data)
- Installs Python dependencies via
python3 -m pip(qBraid-safe) - Verifies GPU, CUDA-Q, and audits critical files
LFS artifacts on main:
| File | Purpose |
|---|---|
results/train/h_cgqe_model_b200_sft.pt |
SFT warm-start checkpoint |
results/train/gqe_supervised_dataset.pt |
Supervised training dataset |
results/train/rl_energy_cache.sqlite |
25K circuit→energy cache (4–28q) |
results/train/rl_pretrain_from_cache.json |
24K pretrain bootstrap circuits |
On qBraid Lab, use the Launch on qBraid button or:
For local or HPC setups:
conda env create -f environment-dgx-spark-cudaq.yml
conda activate conditional-gqe-cudaq
pip install -r requirements-qbraid.txtbash scripts/train_rl.sh smokebash scripts/train_rl.sh full # write-through RL from SFT (skips cache-only)
bash scripts/train_rl.sh online-rl # 50 epochs, write-through cache + CUDA-Q misses
bash scripts/train_rl.sh cache-warmup # buffer imitation only (weak on-policy RL)bash scripts/evaluate_rl.sh all # infer → eval → optimize → report
bash scripts/evaluate_rl.sh infer # generate circuits from checkpoint
bash scripts/evaluate_rl.sh eval # CUDA-Q energy evaluation
bash scripts/evaluate_rl.sh optimize # L-BFGS-B coefficient optimizationpython scripts/qpu_preflight.py --dry-run --device qbraid:qbraid:sim:qir-sv
bash scripts/run_hpc_qbraid_workflow.sh --qpu-submit
bash scripts/run_hpc_qbraid_workflow.sh --qpu-retrieve| Script | Purpose |
|---|---|
scripts/setup_env.sh |
One-shot setup: git-lfs, pip deps, GPU verify (no sudo) |
scripts/env_gpu.sh |
Auto-detect GPU, set CUDA-Q gate fusion / mempool env vars |
scripts/train_rl.sh |
Write-through RL from SFT (smoke / cache-warmup / online-rl / full) |
scripts/evaluate_rl.sh |
Evaluation pipeline (infer / eval / optimize / report / all) |
bash scripts/train_rl.sh smoke # 2 epochs, 2 molecules (~2 min)
bash scripts/train_rl.sh full # write-through RL from SFT (skips cache-only)
bash scripts/evaluate_rl.sh all # infer → eval → optimize → report
# Optional: MAX_QUBITS_OVERRIDE=28 bash scripts/train_rl.sh fulltrain_rl.sh modes: full / online-rl use write-through caching (CUDA-Q evaluates misses and stores them). Prefer these for real learning. full always starts from the SFT checkpoint (ignores any stale *_rl_warmup.pt). cache-warmup (--cache-only) is kept for buffer-imitation experiments only — on-policy samples almost never hit the precomputed MD5 keys, so misses get a flat HF penalty and DAPO/GRPO advantages collapse.
GPU auto-detection: env_gpu.sh reads compute capability and sets CUDA-Q gate fusion level (Hopper CC 9.0 → fusion 5, Blackwell CC 10.0 → +FP32 emulation, Ampere CC 8.0 → fusion 4). Molecule lists are auto-generated from the Hamiltonians JSON filtered by GPU-specific qubit limits (train_rl.sh defaults to ≤22q on H200).
Import order note: Triton (torch.compile) and CUDA-Q both embed LLVM. train_rl_dapo.py lazy-imports CUDA-Q after torch.compile. Do not import cudaq before compiling the model in the same process.
Portable entry point: scripts/launch_b200_training.sh
bash scripts/launch_b200_training.sh sft # supervised warm-start
bash scripts/launch_b200_training.sh ablation # RL from scratch (ablation)
bash scripts/launch_b200_training.sh cache # precompute energy cache (≤28q only)
bash scripts/launch_b200_training.sh both # SFT → RL main pipelineEnergy cache: SQLite-backed circuit→energy store for fast RL. Default cap CACHE_MAX_QUBITS=28. Do not precompute 32–40q SV caches — use QSCI/FMO2 instead. train_rl.sh defaults to ≤22q on H200 (override with MAX_QUBITS_OVERRIDE).
# Optional: one-time cache fill (append-safe, skips existing keys)
bash scripts/launch_b200_training.sh cacheBlackwell / B200 env knobs: scripts/env_b200_blackwell.sh (source before import cudaq). GPU auto-env for H100/H200/etc.: scripts/env_gpu.sh.
| File | Molecules | Qubits | Purpose |
|---|---|---|---|
results/data/hamiltonians_gic2026/ |
35 | 4–28 | GIC challenge set |
results/data/hamiltonians_rl_b200/ |
51 | 4–40 | RL scaling curriculum |
results/data/hamiltonians_merged.json |
21 | 4–40 | SFT + baselines |
results/data/fragments/fmo_hamiltonians.json |
— | 4–12 | FMO2 fragments |
Generate new Hamiltonians:
python src/gqe/data/generate_hamiltonians.py --help- Target 4–12 qubit molecules for hardware (
h2,iodobenzene,imeph_cas12). - Preflight skips ZNE if two-qubit gates > 20; skips REM if qubits > 10.
- Use Pauli expectation energy (
cudaq.observe), not raw state probability. - FMO dimers (8–12q) are the best “large system + real QPU” story — not 40q full Hamiltonians on hardware.
python scripts/qpu_preflight.py --dry-run
python src/gqe/eval/submit_qpu.py --helpConditional_GQE/
├── README.md # This file
├── QUICKSTART.md # Short reproduction guide
├── AGENTS.md # Canonical training decisions
├── docs/B200_TRAINING_PLAN.md # B200 / Blackwell notes
├── scripts/
│ ├── launch_b200_training.sh # SFT / RL / cache launcher
│ ├── run_hpc_qbraid_workflow.sh # HPC → QPU orchestration
│ └── phase3/ # Experiment scripts (01–09)
├── src/gqe/
│ ├── models/ # Transformer, train_rl_dapo.py
│ ├── eval/ # evaluate, QSCI, FMO2, submit_qpu
│ ├── rl/ # MAP-Elites, energy_cache
│ └── data/ # Hamiltonians, precompute cache
└── results/
├── train/ # Checkpoints (LFS), metrics, cache
└── phase3_final/ # Published experiment artifacts
| Safeguard | What it prevents |
|---|---|
--gate-auxiliary-rewards |
Reward hacking without energy improvement |
--statevector-max-qubits 24 |
GPU OOM on L40S |
| MPS bond sweep (D=32,64,128,256) | False accuracy from single bond dim |
| QPU preflight (ZNE/REM limits) | Infeasible mitigation on deep circuits |
| RL cache cap at 28q | Wasting GPU weeks on 32q+ SV observe loops |
| Platform | Statevector | MPS | QPU validation |
|---|---|---|---|
| qBraid L40S | ≤24q | 28q+ | Primary dev target |
| qBraid B200 | ≤32q (reference only) | 28–40q | Optional local CUDA-Q |
| AIRE 3× L40S | ≤24q (MQPU task-parallel) | 28q | Slurm jobs |
L40S is PCIe-only: keep
n_qubits ≤ 24fornvidia-mqputo avoid distributed statevector segfaults.
bash scripts/phase3/00_smoke_test.shThis runs 5 verification tests: DedupCache SQLite persistence, offline RL cache-only mode, FMO2 exact reconstruction, QPU manifest generation (QWC grouping), and code import sanity.
The Phase 3 pipeline is a 3-stage hybrid GPU→GPU→QPU workflow:
| Stage | Hardware | What Happens | Script |
|---|---|---|---|
| 1. Precompute | B200 GPU (qBraid) | Generate Hamiltonians, run H-cGQE inference, cache energies to SQLite | scripts/launch_b200_training.sh |
| 2. Offline RL Training | L40S GPU (HPC) | Buffer-imitation / cache lookups; prefer write-through on CUDA-Q GPUs for real RL | train_rl_dapo.py --energy-cache ... (± --cache-only) |
| 3. QPU Validation | Rigetti Cepheus (qBraid) | Execute QWC-grouped measurement circuits on 108q QPU | scripts/phase3/generate_qpu_manifests.py |
# On qBraid B200 instance — generates rl_energy_cache.sqlite
bash scripts/launch_b200_training.sh cachepython src/gqe/models/train_rl_dapo.py \
--molecules h2_0.74 lih_1.6_full \
--qd-mode \
--energy-cache results/train/rl_energy_cache.sqlite \
--cache-only \
--epochs 50 \
--out results/train/h_cgqe_rl_dapo_phase3.ptKey flags:
--energy-cache: Path to SQLite file from Stage 1. DedupCache / PersistentEnergyCache loads precomputed energies.--cache-only: Skips CUDA-Q; uncached circuits get HF penalty. Prefer without--cache-only(write-through) when CUDA-Q is available so novel circuits get real energies. On qBraid:bash scripts/train_rl.sh full.
# Generate 3-fragment iodobenzene Hamiltonians (monomers 4q, dimers 8q, parent 12q)
python scripts/generate_fmo2_fragments.py
# Run FMO2 exact + H-cGQE + L-BFGS-B
python scripts/run_fmo2_scaling.py
python scripts/run_fmo2_lbfgs.py
# Submit dimer/monomer circuits to Rigetti Cepheus QPU
python scripts/submit_fmo2_qpu.py --submit
# Retrieve QPU results + SQD post-processing
python scripts/retrieve_and_sqd.py --meta results/qpu/fmo2_cepheus_submission_meta.json \
--hamiltonians results/data/fragments/dimers.json \
--out results/qpu/fmo2_cepheus_sqd_results.jsonKey result: 12q parent recovered from max 8q circuits (33% qubit reduction). Fragmentation error: 11.3 mHa (nonzero → non-tautological).
# Submit L-BFGS-B optimized + zero-theta circuits to Cepheus
python scripts/submit_lbfgs_qpu.py --submit --include-zero-theta
# Retrieve + SQD
python scripts/retrieve_and_sqd.py --meta results/qpu/lbfgs_cepheus_submission_meta.json \
--hamiltonians results/data/hamiltonians_gic2026/hamiltonians.json \
--out results/qpu/lbfgs_cepheus_sqd_results.jsonBi-level pipeline: RL discovers operator topology (outer loop) → L-BFGS-B optimizes continuous angles (inner loop) → QPU executes → SQD recovers energy.
python scripts/phase3/generate_qpu_manifests.py \
--molecules h2_0.74 lih_1.6_full \
--hamiltonians results/data/hamiltonians_merged.json \
--optimized results/eval/h_cgqe_uccsd_optimized.json \
--out-dir results/qpu/manifests \
--shots 4096Outputs per-molecule JSON manifests with QWC-grouped QASM 2.0 measurement circuits, ready for qBraid submission to Rigetti Cepheus.
| Component | File | Description |
|---|---|---|
| DedupCache (SQLite) | src/gqe/rl/map_elites.py |
Persistent energy cache with from_sqlite() classmethod for offline loading |
| Offline / write-through RL | src/gqe/models/train_rl_dapo.py |
--energy-cache; omit --cache-only for write-through CUDA-Q misses |
| FMO2 Pipeline | src/gqe/eval/run_fmo2.py |
Fragment → GQE → reassemble with MAP-Elites archive integration |
| QPU Manifests | scripts/phase3/generate_qpu_manifests.py |
QWC grouping, QASM export, cost estimation for Rigetti Cepheus |
| Smoke Test | scripts/phase3/00_smoke_test.sh |
Single-command verification for judges |
- Energy cache: SQLite file ensures deterministic rewards across training runs
- MAP-Elites archives: JSON-serialized per-molecule elite circuit libraries
- Chemical accuracy target: ≤ 1.6 mHa (~1 kcal/mol) vs CASCI/FCI within the stated active space
- QPU cost transparency: Per-manifest cost estimates (0.0425 credits/shot + 30 credits/task on Cepheus)
@software{conditional_gqe,
title = {Conditional-GQE: Scalable Generative Quantum Eigensolver with RL, QSCI, and FMO2},
author = {{Ryoushi Quantum Buddies}},
url = {https://github.com/Quantum-Buddies/Conditional_GQE},
year = {2026}
}MIT — © 2025–2026 Ryoushi Quantum Buddies
NVIDIA CUDA-Q · Mitsubishi Chemical Group · AIST · qBraid · PySCF · OpenFermion · Park & Walsh (Chemeleon2, arXiv:2511.07158) · Nakaji et al. (GQE, arXiv:2401.09253)
















