Commit 5fd117c1 authored by Christoph Groth's avatar Christoph Groth
Browse files

kwant.physics.Bands: allow vectorized systems

parent 3cacf427
......@@ -53,7 +53,8 @@ class Bands:
def __init__(self, sys, args=(), *, params=None):
syst = sys
ensure_isinstance(syst, system.InfiniteSystem)
ensure_isinstance(syst, (system.InfiniteSystem,
self.ham = syst.cell_hamiltonian(args, params=params)
if not np.allclose(self.ham, self.ham.T.conj()):
raise ValueError('The cell Hamiltonian is not Hermitian.')
Supports Markdown
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