def test_construct_lanczos_tridiag_beta_breakdown(self, bsz): a = rand_herm(8) alpha, beta, scaling = last(construct_lanczos_tridiag(a, bsz=bsz, K=9)) assert alpha.shape == (8,) assert beta.shape == (8,) el, ev = lanczos_tridiag_eig(alpha, beta) assert el.shape == (8,) assert el.dtype == float assert ev.shape == (8, 8) assert ev.dtype == float
def test_construct_lanczos_tridiag(self, bsz): a = rand_herm(2**5) alpha, beta, scaling = last( construct_lanczos_tridiag(a, bsz=bsz, K=20)) assert alpha.shape == (20,) assert beta.shape == (20,) el, ev = lanczos_tridiag_eig(alpha, beta) assert el.shape == (20,) assert el.dtype == float assert ev.shape == (20, 20) assert ev.dtype == float