remove testing string for travis
# =============================================================================
try:
- from qiskit.providers.aer import Aer
-except ImportError as e:
- print("can not use Aer, error: {}".format(e), flush=True)
+ from qiskit import Aer
+except ImportError:
from qiskit import BasicAer
import logging
@@ -44,8 +43,7 @@ warnings.showwarning = my_warning_wrapper
def get_aer_backends():
try:
backends = Aer.backends()
- except Exception as e:
- print("can not use Aer, error: {}".format(e), flush=True)
+ except:
backends = BasicAer.backends()
return backends
@@ -53,7 +51,6 @@ def get_aer_backends():
def get_aer_backend(backend_name):
try:
backend = Aer.get_backend(backend_name)
- except Exception as e:
- print("can not use Aer, error: {}".format(e), flush=True)
+ except:
backend = BasicAer.get_backend(backend_name)
return backend
