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

kwant.physics.Bands: allow vectorized systems

parent 3cacf427
......@@ -53,7 +53,8 @@ class Bands:
@deprecate_args
def __init__(self, sys, args=(), *, params=None):
syst = sys
ensure_isinstance(syst, system.InfiniteSystem)
ensure_isinstance(syst, (system.InfiniteSystem,
system.InfiniteVectorizedSystem))
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.')
......
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