fix: remove runcard argument from qmatchatea backend and fix self.precision in the same backend

This commit is contained in:
MatteoRobbiati
2025-07-30 10:05:45 +02:00
parent 374d7b3f8c
commit f0b28d87c4
2 changed files with 4 additions and 2 deletions

View File

@@ -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

View File

@@ -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,