Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulse clipping fix for Travis Osx #3144

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions qiskit/pulse/commands/sample_pulse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.

Expand Down