From cbce5c134f1df6113421cd71e5003ed2d6c09271 Mon Sep 17 00:00:00 2001 From: Didictateur Date: Thu, 26 Oct 2023 11:08:50 +0200 Subject: [PATCH] fixe to list --- QElephant/Matrix.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/QElephant/Matrix.py b/QElephant/Matrix.py index 3c6bd0c..6890389 100644 --- a/QElephant/Matrix.py +++ b/QElephant/Matrix.py @@ -43,12 +43,8 @@ class Matrix: def __str__(self) -> str: return str(self.__m) - @staticmethod - def to_list(matrix: "Matrix") -> list[list[complex]]: - if type(matrix) is not Matrix: - raise ValueError(f"cannot multiply Matrix with {type(matrix)}") - - return matrix._Matrix__m.copy() + def to_list(self) -> list[list[complex]]: + return self._Matrix__m.copy() @staticmethod def I() -> "Matrix":