From d4c54572e1f9bc7787af6b085cf1c27b6b276dcb Mon Sep 17 00:00:00 2001 From: Charles MOUSSA Date: Tue, 3 Sep 2024 14:58:09 +0200 Subject: [PATCH] revert tensor --- pyqtorch/tensors.py | 8 -------- pyqtorch/utils.py | 5 ++++- 2 files changed, 4 insertions(+), 9 deletions(-) delete mode 100644 pyqtorch/tensors.py diff --git a/pyqtorch/tensors.py b/pyqtorch/tensors.py deleted file mode 100644 index 5ae25258..00000000 --- a/pyqtorch/tensors.py +++ /dev/null @@ -1,8 +0,0 @@ -from torch import Tensor -from pyqtorch.apply import apply_operator, apply_operator_dm - -class StateVector(Tensor): - pass - -class DensityMatrix(Tensor): - pass \ No newline at end of file diff --git a/pyqtorch/utils.py b/pyqtorch/utils.py index f3717526..fb83253e 100644 --- a/pyqtorch/utils.py +++ b/pyqtorch/utils.py @@ -19,7 +19,6 @@ import pyqtorch as pyq from pyqtorch.matrices import DEFAULT_MATRIX_DTYPE, DEFAULT_REAL_DTYPE, IDIAG, IMAT -from pyqtorch.tensors import DensityMatrix State: TypeAlias = Tensor Operator: TypeAlias = Tensor @@ -36,6 +35,10 @@ logger = getLogger(__name__) +class DensityMatrix(Tensor): + pass + + def qubit_support_as_tuple(support: int | tuple[int, ...]) -> tuple[int, ...]: """Make sure support returned is a tuple of integers.