Repository navigation
Conversation
…yout The contract's min-atom-distance check compared strictly against the device's min_atom_distance, so it rejected AnalogDevice's own calibrated TriangularLatticeLayout triangle (rounded trap coordinates give 4.9999999836 um vs 5 um). It now allows Pulser's own coordinate-precision slack (10^-COORD_PRECISION um), the same tolerance Pulser's register validation uses. The physical bound is unchanged; 4.9 um is still rejected. The contract also rebuilt every register from bare coordinates, dropping the layout that AnalogDevice requires for QPU submission. Registers whose atoms all sit on traps of a calibrated layout are now defined from that layout, so the built sequence carries it (and it survives the abstract-repr round trip used for submission). Off-lattice registers build as before. Closes #1854 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
jacktrnr
marked this pull request as ready for review
November 23, 2026 22:17
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.
Closes #1854
What
Two defects in
packages/extension/scripts/pasqal-connector/pulse_contract.py:dist < min_atom_distancecomparison rejected AnalogDevice's own calibratedTriangularLatticeLayouttriangle: the layout stores trap coordinates rounded toCOORD_PRECISIONdecimals, so adjacent spacing is 4.9999999836 µm vs. the 5 µm minimum. The check now allowsDISTANCE_TOL = 10**-COORD_PRECISIONµm. That is Pulser's own coordinate-precision tolerance, the same oneBaseDevice._validate_atom_distanceuses. The physical bound is unchanged, and a 4.9 µm pair is still rejected with the existing error.Register.from_coordinates, solayoutwas lost, and AnalogDevice (requires_layout) needs it for QPU submission. The newbuild_registerfunction defines the register from the device's calibrated layout when every atom sits on a distinct trap. Matching uses Pulser'sget_traps_from_coordinates, at Pulser's precision. Qubit ids keep theq<i>names. Off-lattice registers build exactly as before, with no layout.No schema change:
pulse.tomlatomskeeps its meaning.Tests (RED first, then GREEN)
New
TestCalibratedLayoutRegisterintests/test_pulse_contract.py. It reads the triangle (traps 0, 1, 4) offpulser.AnalogDevice.calibrated_register_layoutsand never hardcodes it:min_atom_distanceContractError)layoutset, equal to the calibrated layout, andregister_is_from_calibrated_layoutis Trueto_abstract_repr/from_abstract_repr, the serialization used for cloud submissionq0..q2; an on-lattice pair gets the layout; an off-lattice pair builds with no layoutThe tests make no network calls, need no credentials, and submit nothing.
Local run with the pinned
requirements.txt(pulser 1.8.0):python3 -m unittest discover -s tests→ 80 tests OK (72 before + 8 new).node packages/extension/scripts/assert_provisioned_python.mjs→ all PASS.Note: CI (
.github/workflows/ci.yml) does not currently run the connector's Python unittest suite. It runs only the provisioning gate. The suite was run locally.🤖 Generated with Claude Code