Providing only the unperturbed Hamiltonian in a list does not return a valid BlockSeries
Providing a list containing only a (diagonal) unperturbed Hamiltonian to Pymablock does not yield a valid BlockSeries
but returns an exception stating the unperturbed Hamiltonian was not diagonal.
Minimal code:
import numpy as np
import pymablock as pmb
import scipy
ham = np.random.random((50,50)) + 1j * np.random.random((50,50))
ham += ham.conj().T
eigs, vecs = scipy.linalg.eigh(ham)
ham_n = vecs.conj().T @ ham @ vecs
n_vecs = np.eye(ham.shape[0])
pmb.block_diagonalize([ham_n], subspace_eigenvectors=(n_vecs[:,:3], n_vecs[:,3:]))[0]