Repository navigation
Description
Problem grounded in current code
In the reviewed quantum integration b6ba6542b2c311d6354948e528bc64f147911178, purpose="qcomms" is a request label, while every child remains a Predator QUBO job with QAOA fields and p >= 1. The optional basis-preparation rewrite then prepares known bits directly without using those angles.
Sources: job.py, request.py, compile.py, rewrite tests. This plumbing supports the experiments but makes a poor language contract for agents.
Proposal
Define a separate versioned typed operation IR:
prepare_bits: encode declared known classical bits.sample: measure an admitted preparation with explicit bounds.optimize_qubo: execute a declared bounded optimization method with its own objective and audit.- A later, independently reviewed superposition/circuit operation may be added; no ambiguous word implicitly selects it.
Use typed packet and result records for recipient ID, evidence-bank reference and digest, codec/schema version, useful payload width, authentication overhead, bit significance and expected result shape. A pointer selects external evidence; it is not the evidence itself.
Provide a strict source/builder interface plus JSON Schema. Compile to a deterministic proposal; host adapters retain credentials, data resolution, scheduling and external effects. Do not combine a new source grammar, new live executor and new receipt schema in one PR.
Acceptance
- Preparing known bits requires no fabricated QUBO or unused QAOA parameters.
- Optimization and packet-delivery success are separate verdicts.
- Known-bit, one-record and packed-record fixtures lower to the current bridge through explicit compatibility adapters.
- Ideal-simulator round trips pin variable/register/bit ordering; wrong widths, duplicate recipients, missing PUBs, unknown codecs and wrong evidence-bank digests fail explicitly.
- A 400-recipient/1,200-PUB fixture preserves the exact mapping through compilation and decoding.
- Keep legacy request schemas readable. Document migrations and effect changes.
- Demonstrate source/builder → IR → local circuit → fixture samples → verified typed result with no paid calls.
Scientific and engineering boundary
The model runs on classical compute and emits a typed proposal. IBM samples circuits. The deterministic decoder/resolver returns data for the next model; no model is needed between IBM samples and verified records. Do not describe this as executing an LLM on IBM, transporting model weights, encryption, or quantum advantage.
First PR is the language RFC, schema and conformance fixtures; implement kernels in subsequent small PRs. Depend on explicit compile profiles and receipt provenance before promoting a live path. IBM bit conventions and Sampler PUB shape are external compatibility references; pin the SDK behavior used in tests.
Remaining implementation deep spec — native service and prepared-artifact bridge
Verified current state and exact gap
At merged Nano cb6ea884d63dcaa8cc0e7c0b952bb88784e8219f, the operation contract, direct local known-bit lowering/decoding and 400-recipient/1,200-PUB local fixture are implemented. This issue remains OPEN because to_legacy_job adapts optimization only and prepare.py explicitly declares SUPPORTED_OPERATION = "optimize_qubo". Direct local adapter success is not evidence of native prepare/sample service-wire support.
Do not repeat the already-delivered language RFC or wrap preparation as a fabricated QUBO/QAOA job. Complete the missing native path while preserving the old optimization path and independent execution/accounting/decoding verdicts.
Contract-first implementation slices
- Native transport and artifact contract. Specify a versioned native operation request, compile-profile/artifact extension and result mapping. Freeze JSON schemas, canonical fixtures, unsupported-version behavior and a capability matrix before adapting the service. If a schema's admitted meaning changes, name its explicit version; do not silently broaden existing sealed contracts.
- Offline artifact implementation. Admit a checked preparation plus its sampling operation; bind plan digest, operation/preparation IDs, recipient/chunk/slot, PUB/register/bit order, evidence reference/digest, target/profile/compiler identity, layout/ISA and all resource bounds. Build/load the pinned local Qiskit artifact without IBM/runtime imports or network calls. Specify whether a preparation-only artifact is allowed and ensure it carries no sampling result or execution claim.
- Opt-in service adapter. Add an explicit native request entry point/capability using the existing authentication, durable identity/store and lifecycle machinery. Keep legacy v1/v2 optimization schemas readable and their route/default behavior unchanged. Registering native capability must not enable hardware by default. First executable service path uses local simulator/fake runtime only.
- Cross-boundary evidence. Round trip native source/builder → plan → prepared artifact → authenticated local service → fake/local sample result → independently verified typed records. Extend provider adapters only as an explicitly reviewed later slice, not as a prerequisite to offline completion.
Identity, effects and resource rules
A preparation operation is local compilation, not a provider submission. Sampling has explicit backend, shots, circuit count, wall deadline and QPU execution budget; local simulation requires zero QPU seconds. Validate aggregate and per-operation caps before allocation, artifact parsing and job admission. A path/profile/artifact does not itself authorize execution; the host admits the exact target-bound identity.
A changed plan, target, profile, packet map or resource bound must alter the admitted identity. Repeated request identity and restart cannot duplicate execution. Status reads remain read-only. Cancellation/replacement fences and unknown-usage holds from #58/#59 remain authoritative; do not create another ledger or infer terminal zero from simulator output or elapsed time. Local ideal observations never acquire a hardware seal or provider-final accounting claim.
Mandatory acceptance and negative controls
-
Known-bit, one-record and packed-record plans traverse the native artifact/service adapter with no QUBO fields or unused QAOA parameters. Existing optimize_qubo goldens and legacy client/service behavior remain intact.
-
The 400-recipient/1,200-PUB mapping survives actual artifact load and local/fake service execution, not merely a direct call to the existing decoder. Record explicit host test caps needed to admit it; do not silently raise production defaults.
-
Register/bit significance and PUB order are frozen. Wrong width, missing/duplicate/reordered PUB, recipient/chunk collision, stale evidence bank, substituted artifact/profile/target and partial result all fail explicitly.
-
Caller-retained expected identity is used to verify results; the adapter cannot prove identity by comparing a result only to its own mutable manifest.
-
An actual pinned Qiskit local ideal round trip passes; tests separately prove drift, corrupted QPY/canonical metadata, wrong SDK/compiler, unsupported operation/version and resource boundary-plus-one refusal before execution.
-
Wrong authentication, repeated nonce, request-ID conflict, replay/restart, lost acknowledgement and fake-clock cancel→running/done races preserve the existing lifecycle/held-budget semantics.
-
Dependency-free checking/imports and installed-wheel examples work without Qiskit/ATLAS/Predator; optional local compilation loads only declared dependencies. Missing optional capability returns a stable unsupported/dependency diagnostic.
-
Source/operation verification, execution outcome, decoded semantic success and accounting settlement remain separate fields. A local success never establishes hardware qualification or quantum advantage.
Expected owner surfaces: nano/quantum/, nano_qsearch/quantum_adapter.py, prepare.py, service.py, native request adapter and new focused tests; coordinate shared profile/manifest/lifecycle schema changes with #86 and #88 first. Existing receipt versions and ATLAS budget authority are compatibility controls, not free redesign surfaces.
Completion versus follow-up
Completion requires the native offline artifact/service acceptance above and a reproducible exact-source regression run. A schema/RFC-only PR or existing direct-local simulation does not satisfy the missing bridge. Hardware activation, arbitrary circuit synthesis, live IBM submission, production deployment and provider token changes are outside this issue. Roadmap #67 remains open until its own remaining scope is reconciled.
Hillclimb protocol and evidence
Start from a clean, isolated branch and record the actual base SHA; the reviewed baseline is Nano cb6ea884d63dcaa8cc0e7c0b952bb88784e8219f (source). Rebase and recheck if main has advanced. Link this issue to roadmap #67. Before editing, freeze the contract/fixture hashes, reproduce the specific missing behavior, and record a passing adjacent compatibility control. A missing feature is an expected rejection, not an invented production incident.
Use at most three candidate iterations against the frozen development set. Log each hypothesis, minimal diff, command, seed/environment, result and regression delta. Keep any held-out set immutable and report its final evaluation separately; do not tune against it. Stop and report an unresolved failure or dependency rather than weakening validation, increasing caps, deleting a negative control or relabelling skips as passes.
Deliver small reviewable PRs with exact head/base SHAs, commands, pass/fail/skip denominators, fixture/artifact hashes and limitations. Coordinate shared schemas before implementation; only one lane edits each shared contract at a time. Preserve baseline/Intent/executable/package/quantum schema identities independently. Issue creation is planning authorization, not permission to launch agents, merge, deploy, spend or change runner/security/credential settings. Tests are offline, fake-provider or local simulator only. CI startup failure with zero jobs remains a failure; any later merge exception needs its own applicable authority. The prior local-test waiver covered only PRs #82/#188/#460.
Activity
AetherAI3 commentedon Nov 1, 2026
Partial delivery is now included in main
cb6ea884d63dcaa8cc0e7c0b952bb88784e8219fvia #82: typed IR/schema/builders, direct known-bit preparation, separate optimization/delivery verdicts, strict local decoding, legacy readability and the400-recipient/1200-PUB local round trip. Independent audit confirms252 scoped cases passed without skips.State stays OPEN. Native prepare/sample lowering through the existing Q-search service/prepared-artifact path is unfinished:
to_legacy_joband prepared artifacts currently supportoptimize_quboonly. A local native-Qiskit round trip does not establish that missing wire compatibility. The README/status page states this boundary. No live provider, hardware or paid call was used; the human local-test waiver for integration merges is not completion of this criterion.AetherAI3 commentedon Nov 8, 2026
Coordination note from #86: the portable lifecycle wire contract
nano.qsearch.lifecycle-wire.v1(#91) is status-only and adds no native-operation IDs or shared schema identities. A v1 client refuses every operation exceptstatuswithUNSUPPORTED_CAPABILITY, including any #61 native operation, until a follow-up contract version adds them. The goldens and theirSHA256SUMSlive underprotocol/qsearch-lifecycle/v1/and do not touch #61 schemas.