From bd394826d77f1c7f651b8bdd9106561f30f7b701 Mon Sep 17 00:00:00 2001 From: Alessandro Candido Date: Wed, 21 Aug 2024 18:27:21 +0200 Subject: [PATCH] fix: Fix error type raised by backend construction --- src/qibo/backends/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qibo/backends/__init__.py b/src/qibo/backends/__init__.py index f9334d00c1..b10357e805 100644 --- a/src/qibo/backends/__init__.py +++ b/src/qibo/backends/__init__.py @@ -228,7 +228,7 @@ def construct_backend(backend, **kwargs) -> Backend: if provider not in e.msg: raise e raise_error( - ValueError, + ImportError, f"The '{backend}' backends' provider is not available. Check that a Python " f"package named '{provider}' is installed, and it is exposing valid Qibo " "backends.",