QC-020 Dual-Path Qualification (OQ/PQ vs Live Miner)
Document ID: gaiaftcl.qc020.dual_path.v1
Companion: QC21_QUANTUM_VM_VALIDATION_REVIEW.md, PEER_REVIEW_QC020_QC021_CIRCUIT_REWRITE.md, GAMP5_QUALIFICATION.md
---
1. Why two parallel paths
Bitcoin PoW qualification must not conflate:
| Path | Clock | Claim | Purpose |
|---|---|---|---|
| QC-020-HIST | Decoupled (no mempool race) | pow_ledger_oq_pq |
OQ/PQ: sealed headers, ExtraNonce, Merkle root as static entropy |
| QC-020-LIVE | Template window (~30s) inside network thermodynamic window (~10min) | pow_live_miner_l7_l8 |
Close the window, learn, adjust live miner |
Algorithmic qualification is independent of the live network clock. Any historical block is a globally verifiable test vector for the QA primitives.
---
2. Historical deterministic path (OQ/PQ)
Inputs: qc020_difficulty_ledger rungs + frozen block 100000 vector (V152 seed).
Checks:
1. Swift verify_qc020_rungs — CryptoKit digest ↔ ledger literals ↔ target
2. Block 100000 — nBits=0x1b04864c, nonce=274148111, header hex sealed in chain state
3. Substrate invoke — SubstrateAmplitudeAmplifier.amplifyAgainstSHA256Oracle on historical header shape (easy target for OQ invoke proof; real difficulty verified in step 1–2)
Reproducibility: Lean BTCPreimageLarge.lean codegen from ledger; infinite re-runs return the same algebra.
Export: evidence/research/qc020_dual_path_latest.json → paths[QC-020-HIST]
cells/xcode/scripts/export_qc020_dual_path_research.sh
---
3. Live window-limited path (miner)
Inputs: QC020Surface + five-window orchestrator + M8BTCSubstrateMiner.
| Constraint | Value |
|---|---|
| Template TTL | 30 seconds (QC020Surface) |
| Parallel windows | 5 disjoint S⁴ embeddings per template |
| Network clock | ~600s between blocks (thermodynamic invariant) |
| L8 | qc020_substrate_research_telemetry — Grover-bound law |
| L7 | onChainRewardOK only when chain_accepted (never simulated) |
Export: same JSON → paths[QC-020-LIVE] + liveWindowPolicy
---
4. Substrate backend honesty
| Circuit family | Backend | Notes |
|---|---|---|
| QC-001…QC-021 (except PoW) | vqbit_metal |
Metal-only; no CPU fallback |
| QC-001-ECDLP | vqbit_metal |
QC001_ECDLP.metal |
| QC-020 PoW | vqbit_cpu_projection |
M8MeasurementComposer + SHA256 oracle; Metal shader exists but metalQC020Ready=false |
Research export carries substrateComputeBackendNote so reviewers do not read global vqbit_metal as applying to PoW projection.
---
5. Substrate bypass audit
The dual-path export includes substrateBypassAudit — known non-production paths:
| Location | Role | Mitigation |
|---|---|---|
BitcoinPreimageOracle.classicalEvaluate |
Verifier only | Not a search loop |
M8QC020BootstrapRungCapture |
Ledger seed | Classical bootstrap; preflight blocks classical-placeholder producers |
find_nonce in BTCPreimageLargeGate |
Codegen | Offline ledger seed only |
QC020_BTCPreimage.metal |
Orphaned shader | Not wired to production path |
BTCPreimageLarge.lean |
Codegen Lean | Deferred from strict export until ledger sync |
---
6. Publication checklist
# Dual-path row
cells/xcode/scripts/export_qc020_dual_path_research.sh
# Full VM matrix (includes qc020DualPath in validation block)
cells/xcode/scripts/peer_review_research_dataset.sh
# Unit/integration
cd cells/xcode && swift run VQbitMathTestRunner
cd cells/xcode && swift run M8QC020DualPathQualificationEval
Frozen artifacts:
| File | Schema |
|---|---|
evidence/research/qc020_dual_path_latest.json |
gaiaftcl.qc020.dual_path.v1 |
evidence/research/qc_vm_validation_latest.json |
gaiaftcl.qc_vm.research.v4 with validation.qc020DualPath |
---
7. Franklin / Python (GAMP 5)
Historical block ingestion for Sprout OQ/PQ:
1. Pull getblockheader(height) (or use frozen block 100000 from ledger)
2. Feed header prefix + nBits target into vQbit VM QC-020 invoke
3. Compare substrate LVC + ledger literals → audit artifact
Franklin Python socket (local operator host):
{"method": "historical_block_header", "args": {"height": 100000}}
Returns frozen corpus fields (header_hex, header_prefix_hex, nonce, nbits_hex, target_decimal, clock_decoupled: true). Live getblockheader for other heights: QC020HistoricalBlockReplay.resolve(height:client:).
FranklinClient.research_telemetry and evaluate_algorithm document the live path.
7534845c2008596ec9dbe3f78f8f97481e16e8019a59bc54b1caf3d647ee9578.
This page serves with a substrate-honest pending-signature notice until the operator's Franklin signer cosigns it.