Describe the issue:
When calculating the determinant of a complex matrix where all values are real, the function throws
RuntimeWarning: divide by zero encountered in det
Reproduce the code example:
import numpy as np
mat = [[1,0],[0,1]]
mat = np.asarray(mat, dtype="complex128")
np.linalg.det(mat)
Error message:
/Users/astralcai/Workspace/pennylane/venv/lib/python3.9/site-packages/numpy/linalg/linalg.py:2180: RuntimeWarning: divide by zero encountered in det
r = _umath_linalg.det(a, signature=signature)
/Users/astralcai/Workspace/pennylane/venv/lib/python3.9/site-packages/numpy/linalg/linalg.py:2180: RuntimeWarning: invalid value encountered in det
r = _umath_linalg.det(a, signature=signature)
Runtime information:
1.26.1
3.9.6 (default, Aug 11 2023, 19:44:49)
[Clang 15.0.0 (clang-1500.0.40.1)]
Context for the issue:
No response
Describe the issue:
When calculating the determinant of a complex matrix where all values are real, the function throws
Reproduce the code example:
Error message:
Runtime information:
1.26.1
3.9.6 (default, Aug 11 2023, 19:44:49)
[Clang 15.0.0 (clang-1500.0.40.1)]
Context for the issue:
No response