Skip to content

Commit

Permalink
telling quimb to use same threads as qibojit
Browse files Browse the repository at this point in the history
  • Loading branch information
scarrazza committed Mar 1, 2024
1 parent 6e42375 commit 77c0475
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/qibo/backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@


def construct_backend(backend, **kwargs):
print(backend)
if backend == "qibojit":
from qibojit.backends import CupyBackend, CuQuantumBackend, NumbaBackend

Expand Down
7 changes: 6 additions & 1 deletion tests/test_backend_qibotn.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
from qibotn.backends.quimb import QuimbBackend
import os

import qibo

# Force quimb to use qibojit default number of threads.
os.environ["NUMBA_NUM_THREADS"] = f"{qibo.get_threads()}"
from qibotn.backends.quimb import QuimbBackend

from qibo.backends import GlobalBackend


Expand Down

0 comments on commit 77c0475

Please sign in to comment.