diff --git a/mindquantum/algorithm/compiler/decompose/universal_decompose/qs_and_cu_decompose.py b/mindquantum/algorithm/compiler/decompose/universal_decompose/qs_and_cu_decompose.py index b5c5bc553cc20c2207793eafee3eb8708dc23fc9..733764bae27cf17745a76e6ab8c5ba7d254d06eb 100644 --- a/mindquantum/algorithm/compiler/decompose/universal_decompose/qs_and_cu_decompose.py +++ b/mindquantum/algorithm/compiler/decompose/universal_decompose/qs_and_cu_decompose.py @@ -164,6 +164,7 @@ def demultiplex_pair(u1: np.ndarray, u2: np.ndarray, tqs: List[int], cq: int, wi u1u2h = u1 @ u2.conj().T if np.allclose(u1u2h, u1u2h.conj().T): # is hermitian eigvals, v = linalg.eigh(u1u2h) + eigvals = eigvals.astype(np.complex128) else: evals, v = linalg.schur(u1u2h, output='complex') eigvals = np.diag(evals)