def test_sparse(self, ham2, backend): h = qu.sparse(ham2) el = qu.eigvalsh_window(h, 0.5, 2, w_sz=0.1, backend=backend) assert_allclose(el, [1, 1.1])
def test_sparse_cut(self, ham1): h = qu.sparse(ham1) el = qu.eigvalsh_window(h, 0.5, 5, w_sz=0.3) assert_allclose(el, [1, 2, 3])
def test_dense(self, ham2): h = ham2 el = qu.eigvalsh_window(h, 0.5, 2, w_sz=0.1) assert_allclose(el, [1, 1.1])