diff --git a/examples/reuploading_classifier/qlassifier.py b/examples/reuploading_classifier/qlassifier.py index b7227daff9..e6e7b8f477 100644 --- a/examples/reuploading_classifier/qlassifier.py +++ b/examples/reuploading_classifier/qlassifier.py @@ -119,7 +119,7 @@ def minimize(self, method='BFGS', options=None, compile=True): from qibo import K circuit = self.circuit(self.training_set[0]) for gate in circuit.queue: - if K.name not in {"tensorflow_defaulteinsum", "tensorflow_matmuleinsum"}: + if K.name != "tensorflow": from qibo.config import raise_error raise_error(RuntimeError, 'SGD VQE requires native Tensorflow ' diff --git a/src/qibo/tests/test_evolution.py b/src/qibo/tests/test_evolution.py index 89f612cd3c..46a819d9b9 100644 --- a/src/qibo/tests/test_evolution.py +++ b/src/qibo/tests/test_evolution.py @@ -326,7 +326,7 @@ def test_scheduling_optimization(method, options, messages, trotter, filename): if method == "sgd": from qibo import K - if K.name not in {"tensorflow_defaulteinsum", "tensorflow_matmuleinsum"}: + if K.name != "tensorflow": with pytest.raises(RuntimeError): best, params, _ = adevp.minimize([0.5, 1], method=method, options=options, messages=messages) diff --git a/src/qibo/tests_new/test_models_variational.py b/src/qibo/tests_new/test_models_variational.py index f83c462b39..e2700b62ec 100644 --- a/src/qibo/tests_new/test_models_variational.py +++ b/src/qibo/tests_new/test_models_variational.py @@ -94,7 +94,7 @@ def test_vqe(backend, method, options, compile, filename): """Performs a VQE circuit minimization test.""" original_backend = qibo.get_backend() original_threads = qibo.get_threads() - if (method == "sgd" or compile) and backend != "tensorflow_matmuleinsum": + if (method == "sgd" or compile) and backend != "tensorflow": pytest.skip("Skipping SGD test for unsupported backend.") qibo.set_backend(backend) @@ -281,7 +281,7 @@ def test_qaoa_errors(): @pytest.mark.parametrize(test_names, test_values) def test_qaoa_optimization(backend, method, options, trotter, filename): original_backend = qibo.get_backend() - if method == "sgd" and backend != "tensorflow_matmuleinsum": + if method == "sgd" and backend != "tensorflow": pytest.skip("Skipping SGD test for unsupported backend.") qibo.set_backend(backend) h = hamiltonians.XXZ(3, trotter=trotter)