Skip to content

Commit

Permalink
Merge pull request #230 from BBN-Q/feature/tanh-check
Browse files Browse the repository at this point in the history
Typo in assert warning for tanh.  -MW
  • Loading branch information
matthewware committed Sep 24, 2019
2 parents c93c80f + 7f1e574 commit bfb46f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions QGL/PulseShapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ def tanh(amp=1, length=0, sigma=0, cutoff=2, sampling_rate=1e9, **params):
x1 = -length / 2 + cutoff * sigma
x2 = +length / 2 - cutoff * sigma
assert x1 < 0 and x2 > 0, (f'Pulse length must be greater than'
'2 * cutoff (={cutoff}) * sigma '
'(={sigma}s). Consider '
'using a Gaussian pulse instead.')
f'2 * cutoff (={cutoff}) * sigma '
f'(={sigma}s). Consider '
f'using a Gaussian pulse instead.')
return amp * 0.5 * (np.tanh((xPts - x1) / sigma) + np.tanh(
(x2 - xPts) / sigma)).astype(np.complex)

Expand Down

0 comments on commit bfb46f8

Please sign in to comment.