Skip to content

Commit

Permalink
Merge pull request #1236 from qiboteam/cuquantum_test
Browse files Browse the repository at this point in the history
Fix `cuquantum` test bug in `test_backends_clifford.py`
  • Loading branch information
renatomello authored Feb 29, 2024
2 parents 7190eae + e8585d4 commit 31bbbb4
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions tests/test_backends_clifford.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@
import pytest

from qibo import Circuit, gates, set_backend
from qibo.backends import (
CliffordBackend,
GlobalBackend,
NumpyBackend,
TensorflowBackend,
)
from qibo.backends import CliffordBackend, GlobalBackend, NumpyBackend
from qibo.backends.clifford import _get_engine_name
from qibo.noise import DepolarizingError, NoiseModel, PauliError
from qibo.quantum_info.random_ensembles import random_clifford
Expand All @@ -18,11 +13,12 @@


def construct_clifford_backend(backend):
if isinstance(backend, TensorflowBackend):
if backend.__class__.__name__ in ["TensorflowBackend", "CuQuantumBackend"]:
with pytest.raises(NotImplementedError):
clifford_backend = CliffordBackend(backend.name)
else:
return CliffordBackend(_get_engine_name(backend))
pytest.skip("Clifford backend not defined for the this engine.")

return CliffordBackend(_get_engine_name(backend))


THETAS_1Q = [
Expand Down

0 comments on commit 31bbbb4

Please sign in to comment.