Skip to content

Commit 12c3304

Browse files
daxfohlrht
authored andcommitted
Fix scipy.linalg import in swap_gates_test (quantumlib#4749)
Fix scipy.linalg import that broke pytest-changed-files in github.
1 parent d7dc61f commit 12c3304

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cirq-core/cirq/ops/swap_gates_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
import numpy as np
1616
import pytest
17-
import scipy
1817
import sympy
18+
from scipy import linalg
1919

2020
import cirq
2121

@@ -207,7 +207,7 @@ def test_riswap_hamiltonian(angle_rads):
207207
y = np.array([[0, -1j], [1j, 0]])
208208
xx = np.kron(x, x)
209209
yy = np.kron(y, y)
210-
expected = scipy.linalg.expm(+0.5j * angle_rads * (xx + yy))
210+
expected = linalg.expm(+0.5j * angle_rads * (xx + yy))
211211
assert np.allclose(actual, expected)
212212

213213

0 commit comments

Comments
 (0)