Commit 232b6f34 authored by Christoph Groth's avatar Christoph Groth
Browse files

bugfix: do not fail when the Hamiltonian has no non-zero entries

parent be9e81b4
......@@ -148,7 +148,7 @@ class SparseSolver(object):
lhs = lhs - energy * sp.identity(lhs.shape[0], format=self.lhsformat)
num_orb = lhs.shape[0]
if check_hermiticity:
if check_hermiticity and len(lhs.data):
rtol = 1e-13
atol = 1e-300
tol = rtol * np.max(np.abs(lhs.data)) + atol
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment