feat: removed self.np references + dep and lock

This commit is contained in:
BrunoLiegiBastonLiegi
2025-11-27 13:16:51 +01:00
parent 2c49c2b38c
commit 828c86c0a8
3 changed files with 8 additions and 8 deletions

6
poetry.lock generated
View File

@@ -2488,8 +2488,8 @@ qulacs = ["qulacs (>=0.6.4,<0.7.0) ; python_version < \"3.13\""]
[package.source]
type = "git"
url = "https://github.com/qiboteam/qibo"
reference = "HEAD"
resolved_reference = "a582ddc9fe011e39362a440a6c2c2d21a6de7649"
reference = "backends"
resolved_reference = "2bfe46abdfcf84486cbfddb4fe4c9164a47e8486"
[[package]]
name = "qiskit"
@@ -3329,4 +3329,4 @@ qmatchatea = ["qiskit", "qmatchatea", "qtealeaves"]
[metadata]
lock-version = "2.1"
python-versions = ">=3.11,<3.14"
content-hash = "6ca68814561b66decbfb6b314e5f8cd91552f95548ed501e43e4a915d1079680"
content-hash = "e7fa6e7a211343674411b5fb57f7cd79a5ebbb06ad755a7978f5f81bca1e8ca1"

View File

@@ -21,7 +21,7 @@ packages = [{ include = "qibotn", from = "src" }]
[tool.poetry.dependencies]
python = ">=3.11,<3.14"
qibo = { git="https://github.com/qiboteam/qibo" }
qibo = { git="https://github.com/qiboteam/qibo", branch="backends" }
quimb = { version = "^1.10.0", extras = ["tensor"] }
cupy-cuda11x = { version = "^13.1.0", optional = true }
cuquantum-python-cu11 = { version = "^24.1.0", optional = true }

View File

@@ -104,15 +104,15 @@ def setup_backend_specifics(
if quimb_backend == "jax":
import jax.numpy as jnp
self.np = jnp
self.engine = jnp
elif quimb_backend == "numpy":
import numpy as np
self.np = np
self.engine = np
elif quimb_backend == "torch":
import torch
self.np = torch
self.engine = torch
else:
raise_error(ValueError, f"Unsupported quimb backend: {quimb_backend}")
@@ -260,7 +260,7 @@ def expectation_observable_symbolic(
expectation_value = expectation_value + coeff * exp_values
return self.np.real(expectation_value)
return self.real(expectation_value)
def _qibo_circuit_to_quimb(