From f0b28d87c409997fe67e5901a362ccbefdadd678 Mon Sep 17 00:00:00 2001 From: MatteoRobbiati Date: Wed, 30 Jul 2025 10:05:45 +0200 Subject: [PATCH] fix: remove runcard argument from qmatchatea backend and fix self.precision in the same backend --- src/qibotn/backends/__init__.py | 2 +- src/qibotn/backends/qmatchatea.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qibotn/backends/__init__.py b/src/qibotn/backends/__init__.py index 1547a3d..416a384 100644 --- a/src/qibotn/backends/__init__.py +++ b/src/qibotn/backends/__init__.py @@ -26,7 +26,7 @@ class MetaBackend: if platform == "cutensornet": # pragma: no cover return CuTensorNet(runcard) elif platform == "quimb": # pragma: no cover - return QuimbBackend(runcard) + return QuimbBackend() elif platform == "qmatchatea": # pragma: no cover from qibotn.backends.qmatchatea import QMatchaTeaBackend diff --git a/src/qibotn/backends/qmatchatea.py b/src/qibotn/backends/qmatchatea.py index 27239ec..a5261f4 100644 --- a/src/qibotn/backends/qmatchatea.py +++ b/src/qibotn/backends/qmatchatea.py @@ -23,6 +23,9 @@ class QMatchaTeaBackend(QibotnBackend, NumpyBackend): self.name = "qibotn" self.platform = "qmatchatea" + # Default precision + self.precision = "double" + # Set default configurations self.configure_tn_simulation() self._setup_backend_specifics() @@ -87,7 +90,6 @@ class QMatchaTeaBackend(QibotnBackend, NumpyBackend): # TODO: once MPI is available for Python, integrate it here self.qmatchatea_backend = qmatchatea.QCBackend( - backend="PY", # The only alternative is Fortran, but we use Python here precision=qmatchatea_precision, device=qmatchatea_device, ansatz=self.ansatz,