From 0088d266c62d67908aa88b86bf6fbf36f42bac4b Mon Sep 17 00:00:00 2001 From: Janvee Date: Thu, 7 May 2026 18:24:55 +0530 Subject: [PATCH] Fixed pulse validation edge case --- pulser-core/pulser/pulse.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pulser-core/pulser/pulse.py b/pulser-core/pulser/pulse.py index 8bf05b958..b197d0653 100644 --- a/pulser-core/pulser/pulse.py +++ b/pulser-core/pulser/pulse.py @@ -106,9 +106,9 @@ def __init__( ) if np.any(amplitude.samples.as_array(detach=True) < 0): raise ValueError( - "All samples of an amplitude waveform must be " - "greater than or equal to zero." - ) + f"All samples of an amplitude waveform must be >= 0; " + f"found invalid values in amplitude waveform: {amplitude}." + ) object.__setattr__(self, "amplitude", amplitude) object.__setattr__(self, "detuning", detuning) assert not isinstance(phase, Parametrized)