Skip to content

J2 compile options on the HW-0 route (64203b2): c2-calib-layout for the packed ibm_fez request (J3) - #51

Closed
AetherAI3 wants to merge 8 commits into
claude/qcomms-hw0-nanofrom
claude/qcomms-j2-on-hw0-r3
Closed

AetherAI3 wants to merge 8 commits into
claude/qcomms-hw0-nanofrom
claude/qcomms-j2-on-hw0-r3

Conversation

@AetherAI3

@AetherAI3 AetherAI3 commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Summary

The J2 compile options (#50) on top of the HW-0 route (claude/qcomms-hw0-nano 64203b2, R3), so lane J3 can send one packed hardware request with the selected J2 variant c2-calib-layout enabled. #50 alone does not apply cleanly here: nano_qsearch/compile.py conflicts with the N2 device compile. This branch carries the hand resolution (c147331), the review fixes (8957e07) and a clean merge onto 64203b2 (9c94103).

  • compile_program(job, *, backend=None, options=None): the live-backend device compile (N2) and the default-off J2 rewrites compose. With both env options unset the compile, record and digest are exactly N2's.
  • The device path picks the options up from the Nano process environment: IbmRuntime._compiled → default_compile(job, backend=context.backend) → compile_program(job, backend=…) with options=None → CompileOptions.from_env(). One function serves the v1 run and the v2 packed request.
  • With a live ibm_fez backend: NANO_QSEARCH_LAYOUT=calibration:<snapshot> ranks the snapshot's ibm_fez entry (width checked against the live target; another device's entry is refused); NANO_QSEARCH_LAYOUT=target ranks the live target's own errors and records their digest. The placement goes into the device transpile as initial_layout, check_isa still runs, and backend_name / target_digest stay in the record and digest.
  • New test test_the_runtime_device_compile_picks_the_options_up_from_the_environment covers exactly that path.

Enable for J3 (Nano service process env): NANO_QSEARCH_BASIS_PREP=1 and NANO_QSEARCH_LAYOUT=calibration:/home/aether-admin/skt/j/heron_calibration_<UTC>.json (fresh snapshot). Each receipt's compile.rewrites shows what was applied. Recipe and evidence: Predator bench/qcomms/j2_compile/REPORT_J2.md §6 (AetherAI3/AETHER-PREDATOR-M#452).

Integration branch for lane J3 / J5; not intended for main by itself (#49 and #50 land there).

Test plan

  • all tests/test_qsearch_*.py on skt-d-01 (~/skt/venv) with ATLAS 1fc4200: 416 passed, 1 failure that also fails on pristine 64203b2 (test_cleanup_errors_are_ignored)
  • same with the I6 ATLAS pin 5d8c19b2: 2 failures, both also on pristine 2c02197/64203b2 with that pin
  • CI (self-hosted runners)
  • J3 FakeFez rehearsal of the packed request with the env set, before the hardware job

🤖 Generated with Claude Code

Verified integration disposition

This exact source head 998938dde1186d5064fe96fe7b19511f96b77d88 is an ancestor of actual integration commit cb6ea884d63dcaa8cc0e7c0b952bb88784e8219f, delivered by #82 to main. 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.

AetherAI3 and others added 8 commits October 31, 2026 08:12
…agonal QUBOs, calibration-ranked layout

CompileOptions (env NANO_QSEARCH_BASIS_PREP=1, NANO_QSEARCH_LAYOUT=target|calibration:<snapshot.json>,
NANO_QSEARCH_LAYOUT_BACKEND) extends compile_program (options=None reads the env; unset = unchanged compile
and digest). basis_prep: a strictly diagonal QUBO is prepared as its unique minimiser (x + measure), so the
output no longer depends on the QAOA angles. layout: a circuit without two-qubit gates on a Fez target puts
logical bit i on the i-th best qubit by readout + half x error, skipping qubits with missing error or T1,
ranked from the transpile target or a calibration snapshot. The compile record and digest carry a rewrites
block when any option is on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…get and the layout ranking

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ot collide with the HW-0 device compile

compile_program(job, *, options=None) composes with HW-0 N2's compile_program(job, *, backend=None);
FEZ_TARGETS / _fez_backend replace DEVICE_TARGETS / _device_backend, which N2 defines with another meaning.
No behaviour change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
compile_program(job, *, backend=None, options=None): the live-backend device compile (N2) and the
default-off J2 rewrites compose; with a live backend the layout ranks the live target's qubits
(layout=target) or a snapshot entry checked against its width (layout=calibration), and the placement
is passed to the device transpile as initial_layout. Integration branch for lane J3; not for main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- layout=calibration ranks only the job's own device entry (a fake_fez rehearsal may read ibm_fez); another
  device's same-width entry is refused instead of placing fez qubits by its errors
- layout_backend without layout=calibration is refused, not silently ignored
- layout=target records errors_digest, a digest of the error numbers it ranked
- calibration entries are shape-checked and read for qubits 0..num_qubits-1 only (ValueError otherwise)
- diagonal_ground refuses a non-finite entry instead of reading it as a 0 bit

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…he Nano process environment

env -> IbmRuntime default_compile(job, backend=<live>) -> compile_program(options=None) -> from_env:
basis prep + snapshot layout applied on an ibm_fez live-target compile; another device's entry refused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant