From db9001b91906931d5dc9ae4f6f428def9b562cb4 Mon Sep 17 00:00:00 2001 From: Takuya Yoshioka <88071178+yoshioka1128@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:08:46 +0900 Subject: [PATCH] Switched from NumPy to SciPy for determinant calc --- src/openqaoa-core/openqaoa/algorithms/fqaoa/fqaoa_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openqaoa-core/openqaoa/algorithms/fqaoa/fqaoa_utils.py b/src/openqaoa-core/openqaoa/algorithms/fqaoa/fqaoa_utils.py index 67d3c491..4449cbf5 100644 --- a/src/openqaoa-core/openqaoa/algorithms/fqaoa/fqaoa_utils.py +++ b/src/openqaoa-core/openqaoa/algorithms/fqaoa/fqaoa_utils.py @@ -109,7 +109,7 @@ def get_statevector(orbitals: np.ndarray) -> np.ndarray: for i, j in enumerate(indices): cof[:, i] = orbitals[:, j] # Calculate the determinant and store it in the statevector - statevector[inum] = np.linalg.det(cof) + statevector[inum] = linalg.det(cof) return statevector