pasqal-io / Pulser

Library for pulse-level/analog control of neutral atom devices. Emulator with QuTiP.
Apache License 2.0
159 stars 57 forks source link

Register.max_connectivity: Allow to use device with minimal distance=0 if spacing>0 #603

Closed a-corni closed 7 months ago

a-corni commented 7 months ago

When building a register using Register.max_connectivity, we first check that minimal distance is greater than 0 before taking actions if spacing is None or checking the validity of spacing with the minimal distance.

Error: Due to this, Register.max_connectivity(3, device=MockDevice, spacing=4) raises an error because the minimal distance is 0, whereas the code is perfectly able to run and propose a result.

Proposition: Do in this order: