Skip to content

Commit

Permalink
Fixing test of array
Browse files Browse the repository at this point in the history
  • Loading branch information
a-corni committed Nov 16, 2023
1 parent 67d14b0 commit 8a64c78
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pulser-core/pulser/channels/dmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,18 @@ def validate_pulse(
if np.any(round_detuning > 0):
raise ValueError("The detuning in a DMM must not be positive.")
# Check that detuning on each atom is above bottom_detuning
if (
self.bottom_detuning is not None
and np.max(detuning_map.weights) * round_detuning
if self.bottom_detuning is not None and np.any(
np.max(detuning_map.weights) * round_detuning
< self.bottom_detuning
):
raise ValueError(
"The detunings on some atoms go below the local bottom "
f"detuning of the DMM ({self.bottom_detuning} rad/µs)."
)
# Check that distributed detuning is above global_bottom_detuning
if self.global_bottom_detuning is not None and np.any(
np.sum(detuning_map.weights) * round_detuning
if (
self.global_bottom_detuning is not None
and np.sum(detuning_map.weights) * round_detuning
< self.global_bottom_detuning
):
raise ValueError(
Expand Down

0 comments on commit 8a64c78

Please sign in to comment.