2025-03-24 17:52:33 +08:00

16 lines
234 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 检查是否为厄米矩阵相对误差为1e-5)
import guan
matrix1 = [
[2, 1.00001-1j],
[1+1j, 1]
]
print(guan.is_hermitian(matrix1))
matrix2 = [
[2, 1.00002-1j],
[1+1j, 1]
]
print(guan.is_hermitian(matrix2))