Skip to content

Commit

Permalink
fix GPU tests
Browse files Browse the repository at this point in the history
  • Loading branch information
renatomello committed Jun 26, 2023
1 parent 9e5d8b2 commit f587061
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_gates_abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,12 @@ def test_unitary_channel_init():
gate = gates.UnitaryChannel(qubits, ops)


def test_pauli_noise_channel_init():
def test_pauli_noise_channel_init(backend):
gate = gates.PauliNoiseChannel(0, list(zip(["X", "Y", "Z"], [0.1, 0.2, 0.3])))
assert gate.target_qubits == (0,)
for g, p in zip(gate.gates, [matrices.X, matrices.Y, matrices.Z]):
assert np.linalg.norm(g.matrix - p) < PRECISION_TOL
p = backend.cast(p, dtype=p.dtype)
backend.assert_allclose(g.asmatrix(backend), p, atol=PRECISION_TOL)


def test_reset_channel_init():
Expand Down

0 comments on commit f587061

Please sign in to comment.