Skip to content

Commit

Permalink
adding check to make sure AHS is compiled with local detuning capabil…
Browse files Browse the repository at this point in the history
…ities. (#893)
  • Loading branch information
weinbe58 committed Jan 29, 2024
1 parent 0211bd3 commit f05d4ab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bloqade/compiler/passes/hardware/define.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,12 @@ def generate_ahs_code(
extra_sm = set(level_couplings[sequence.rydberg][pulse.detuning]) - {field.Uniform}

if extra_sm:
if capabilities is not None and capabilities.capabilities.rydberg.local is None:
raise ValueError(
"Device does not support local detuning, but the program has a "
"non-uniform spatial modulation for detuning."
)

sm = extra_sm.pop()

lattice_site_coefficients = GenerateLatticeSiteCoefficients(
Expand Down

0 comments on commit f05d4ab

Please sign in to comment.