Repository navigation
feat(qsearch): packed v2 requests, live ibm_fez context, device compile, provider limits (HW0 N1-N4) - #49
Merged
Conversation
…rget (HW0 N2) compile_program(job, backend=...) transpiles an ibm_fez job against the live backend's Target (coupling map and supported instructions) instead of FakeFez, checks every ISA instruction against that target, and freezes it: the backend name and a structural target digest ride in the ISA metadata (so the QPY bytes bind them), in compile_record and in compiled_plan_digest. The device ISA gets a fixed name so an identical recompile yields the same ATLAS child identity. fake_fez and heron_heavy_hex compile exactly as before (plan digests verified byte-identical to d740bb5); one compile path, target source chosen by target. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ext and provider limits (HW0 N1, N3, N4) N1: on a PredatorCampaignV2 ledger the ibm_fez context is ATLAS resolve_qsearch_context (service, instance, backend), resolved once per run before compiling, and the compiled plan must be bound to that backend's target; a V1 ledger keeps the declared-identity context and stops BLOCKED as before. N3: the child's max_execution_time is the job's limits.max_qpu_s, so the provider limit and the ledger reservation are the job's ceiling. N4: POST /qsearch/v2/submit_request answers only with NANO_QSEARCH_V2=1 (404 NOT_ENABLED before auth otherwise), uses the v1 request auth, cross-checks the descriptor against every job, compiles each job, prepares one ATLAS request and runs it once (run_qsearch_request_dry / submit_qsearch_request). The receipt is predator.qsearch.receipt.v2: per-block raw msb_first counts plus the v1-style audit, hardware and usage blocks, sealed under the v2 hardware domain; anything short of every block is NOT_RUN with no blocks. Requests are recorded before submission, submitted at most once, and re-attached on restart through ATLAS recover_qsearch_submission. Seal parity is tested against Predator's production verifier and client when importable. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tatus, flags before live context H1: once ATLAS has handed a request or job to the provider (QSearchSubmittedPending, or a ledger row with a job id or an ambiguous submission) Nano never seals NOT_RUN: the runtime returns None, the service answers 503 and keeps the row ACCEPTED, and the request finishes through recover_qsearch_submission. A provider-terminal failure (ERROR / CANCELLED / max time) or a submitted result that does not audit is sealed as v2 FAILED (blocks [], block_count 0, reason, hardware with the provider job id, usage; hardware seal), matching Predator's build_failed_v2. A reservation ATLAS released is NOT_RUN. v1 singletons: a submitted job answers 503 until recovery (L1: recover_job re-attaches through ATLAS on repeat or restart, recompiling against the live target and requiring the child's compiled plan digest); a provider failure is REFUSED. M3: GO, LIVE and (N > 1) PACKED are checked in Nano before any live context is resolved, so no QiskitRuntimeService is built when one is missing. Also: prepare_qsearch_request gets client_request_digest; hardware.job_tags carry ATLAS's effective tags (recovery tag first, ledger tag second); a FAILED reason names the provider status only, never provider free text. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prepares Nano's part of the HW0 route (contract PREDATOR_QCOMMS_HW0_PACKED_PILOT_V1 §3) so one packed IBM request can later be submitted, verified and recovered end to end. Everything new is off by default, and no QPU run happened.
What changed and why
PredatorCampaignV2ledger,atlas_campaign_submitand the request path get their ibm_fez context from ATLASresolve_qsearch_context(service, instance, live backend) instead ofSimpleNamespace(backend_name=...). The context is resolved once, before compiling. A V1 ledger behaves as before: the declared context, then BLOCKED.compile_program(job, backend=...)transpiles ibm_fez against the live backend'sTarget, not FakeFez. It then checks every ISA instruction against that target and binds the backend name plus a target digest into the ISA metadata (and so the QPY bytes) and intocompiled_plan_digest. A plan bound to any other target is refused before submission. fake_fez and heron are untouched: their plan digests are byte-identical to d740bb5.max_execution_timeis the job'slimits.max_qpu_s. That sets both the provider limit and the ledger reservation.POST /qsearch/v2/submit_request(S2).NANO_QSEARCH_V2=1. Otherwise it returns 404NOT_ENABLEDbefore auth, so no nonce is burned.run_qsearch_request_dryfor fake_fez,submit_qsearch_requestfor ibm_fez).predator.qsearch.receipt.v2: per-block rawmsb_firstcounts and a v1-style audit, plushardwareandusage.recover_qsearch_submission.NOT_RUNwithblocks: [].runtime_ibm.prepare_request_identitycomputes therequest_sha256that the operator's plan-scoped authority must name. That value is only known after compiling against the live target.Test evidence (laptop,
py -3.12, ATLAS-hw0 at d4b2b57 onNANO_QSEARCH_ATLAS_PATH)test_qsearch_v2_{request,runtime,service}.py(fake ATLAS module),test_qsearch_compile_device.py,test_qsearch_hw0_atlas.py(real ATLAS with a fake service and sampler) andtest_qsearch_v2_predator.py. They include:attach_job(by tag); the sampler ran once;max_execution_time5 and 10 plusjob_tagsreaching the sampler, with the reservation equal to the limit;SamplerV2andQiskitRuntimeServicepatched to raise) proving that a missing GO, LIVE, PACKED orNANO_QSEARCH_V2each blocks.verify_qsearch_receipt(PR AetherAI3/AETHER-PREDATOR-M#450). Predator's ownNanoRuntimeQSearchBackend.submit_requestround-trips over loopback. Tampered, reordered, dropped, duplicated and v1/v2-confused receipts are refused.NANO_QSEARCH_FAKEFEZ_DRY_RUN=1; inside the loaded full suite Aer hitMemoryErrorand the receipt was, correctly, NOT_RUN.test_provenance.py(the siblingaether_protocol_crejects float canonicalisation). They fail identically on base d740bb5.Amendment R3 (pre-flight review), commit 64203b2
QSearchSubmittedPending, or a ledger row with a job id or an ambiguous submission), Nano never seals NOT_RUN. It answers 503, keeps the row accepted, and finishes throughrecover_qsearch_submission.FAILED(no blocks,reason, provider job id, usage, hardware seal).recover_jobre-attaches it through ATLAS (L1).client_request_digestis now passed to ATLAS, andhardware.job_tagscarries ATLAS's effective tags.test_provenance.pyfailures that also fail on d740bb5.No QPU run happened; NANO_QSEARCH_V2 default off.
🤖 Generated with Claude Code
Verified integration disposition
This exact source head
64203b2724bc1f514d3831e7338f1a71782b5af7is an ancestor of actual integration commitcb6ea884d63dcaa8cc0e7c0b952bb88784e8219f, delivered by #82 tomain. The source is included; no duplicate patch or separate source-PR merge is needed.The human explicitly authorized the three integration PRs Nano82/ATLAS188/Predator460 to use reviewed passing LOCAL evidence in place of the earlier self-hosted gate. The waiver is recorded verbatim in those merged integration PR bodies; it is not a passing CI claim or a separate waiver-based admin merge of this source PR. Cloud41322926091 remains FAILED STARTUP with zero jobs/check runs. Local source pins, commands, counts, skips, review limitations, merged trees and actual target branches are recorded there and in the captain evidence bundle.
This source PR is retired as included/superseded by that actual integration. Issue #61 remains open for incomplete service-wire acceptance; other issue closure requires its own acceptance audit. Branches are preserved. No formal GitHub approval, production activation, runner/security/credential change or provider execution occurred.