Skip to content

Commit 5919598

Browse files
committed
test gates
1 parent 4e9df5b commit 5919598

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_gates.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ def test_exp_gate():
2525
),
2626
theta=tc.gates.num_to_tensor(np.pi / 2),
2727
)
28-
assert np.allclose(c.wavefunction()[0], -1j)
28+
np.testing.assert_allclose(c.wavefunction()[0], -1j)
2929

3030

3131
def test_any_gate():
3232
c = tc.Circuit(2)
3333
c.any(0, unitary=np.eye(2))
34-
assert np.allclose(c.expectation((tc.gates.z(), [0])), 1.0)
34+
np.testing.assert_allclose(c.expectation((tc.gates.z(), [0])), 1.0)
3535

3636

3737
def test_iswap_gate():

0 commit comments

Comments
 (0)