Quantum Algorithms, Quantum Computing, Physics, Mathematics, Education.
eigenvalues of µ matrix eigen = np.linalg.eig(mu) vals = eigen[0] vecs = eigen[1].transpose() # order eigenvalues from largest to smallest eig_vals = sorted(vals, reverse=True) idx = [] for val in eig_vals: idx.append(np.where(vals == val)[0][0]) eig_vecs = [] for i in idx: eig_vecs.append(vecs[i])