Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
DanPuzzuoli committed Feb 8, 2024
1 parent b9313be commit f32f0c6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
1 change: 1 addition & 0 deletions qiskit_dynamics/perturbation/array_polynomial.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ class ArrayPolynomial:
is similar to ``ap1 @ ap2``, but will result in an :class:`.ArrayPolynomial` in which all
terms of degree larger than ``3`` will not be included in the results.
"""

__array_priority__ = 20

def __init__(
Expand Down
10 changes: 3 additions & 7 deletions test/dynamics/signals/test_signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ def test_complex_value_vectorized(self):
self.asarray(
[
(2 * (1.1**2) + 1j * 1.1) * np.exp(1j * 2 * np.pi * 0.1 * 1.1 + 1j * (-0.1)),
(2 * (1.23**2) + 1j * 1.23)
* np.exp(1j * 2 * np.pi * 0.1 * 1.23 + 1j * (-0.1)),
(2 * (1.23**2) + 1j * 1.23) * np.exp(1j * 2 * np.pi * 0.1 * 1.23 + 1j * (-0.1)),
]
),
)
Expand Down Expand Up @@ -242,8 +241,7 @@ def test_call_vectorized(self):
self.asarray(
[
(2 * (1.1**2) + 1j * 1.1) * np.exp(1j * 2 * np.pi * 0.1 * 1.1 + 1j * (-0.1)),
(2 * (1.23**2) + 1j * 1.23)
* np.exp(1j * 2 * np.pi * 0.1 * 1.23 + 1j * (-0.1)),
(2 * (1.23**2) + 1j * 1.23) * np.exp(1j * 2 * np.pi * 0.1 * 1.23 + 1j * (-0.1)),
]
).real,
)
Expand Down Expand Up @@ -1013,9 +1011,7 @@ def test_jit_grad_eval(self):
+ np.real(self.discrete_signal.samples[5])
* (-2 * np.pi * 2.0)
* np.sin(2 * np.pi * 2.0 * t),
complex_deriv_val=(2.25**2)
* (1j * 2 * np.pi * 3.0)
* np.exp(1j * 2 * np.pi * 3.0 * t)
complex_deriv_val=(2.25**2) * (1j * 2 * np.pi * 3.0) * np.exp(1j * 2 * np.pi * 3.0 * t)
+ self.discrete_signal.samples[5]
* (1j * 2 * np.pi * 2.0)
* np.exp(1j * 2 * np.pi * 2.0 * t),
Expand Down
7 changes: 1 addition & 6 deletions test/dynamics/signals/test_transfer_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,7 @@ def test_convolution(self):

def gaussian(t):
sigma = 4
return (
2.0
* ts[1]
/ np.sqrt(2.0 * np.pi * sigma**2)
* np.exp(-(t**2) / (2 * sigma**2))
)
return 2.0 * ts[1] / np.sqrt(2.0 * np.pi * sigma**2) * np.exp(-(t**2) / (2 * sigma**2))

# Test the simple convolution of a signal without a carrier
convolve = Convolution(gaussian)
Expand Down

0 comments on commit f32f0c6

Please sign in to comment.