From 7a14bffef2a36bc85b2c262193d1111adc480be8 Mon Sep 17 00:00:00 2001 From: Thomas Alexander Date: Wed, 25 Sep 2019 09:29:36 -0400 Subject: [PATCH] Test pulse clipping fix Osx #1. --- qiskit/pulse/commands/sample_pulse.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qiskit/pulse/commands/sample_pulse.py b/qiskit/pulse/commands/sample_pulse.py index ca3240bb7bf0..cbecdc361039 100644 --- a/qiskit/pulse/commands/sample_pulse.py +++ b/qiskit/pulse/commands/sample_pulse.py @@ -55,7 +55,7 @@ def samples(self): """Return sample values.""" return self._samples - def _clip(self, samples: np.ndarray, epsilon: float = 1e-6): + def _clip(self, samples: np.ndarray, epsilon: float = 1e-5): """If samples are within epsilon of unit norm, clip sample by reducing norm by (1-epsilon). If difference is greater than epsilon error is raised. @@ -86,8 +86,10 @@ def _clip(self, samples: np.ndarray, epsilon: float = 1e-6): return samples - def draw(self, dt: float = 1, style: Optional['PulseStyle'] = None, - filename: Optional[str] = None, interp_method: Optional[Callable] = None, + def draw(self, dt: float = 1, + style: Optional['PulseStyle'] = None, + filename: Optional[str] = None, + interp_method: Optional[Callable] = None, scaling: float = 1, interactive: bool = False): """Plot the interpolated envelope of pulse.