Hi

> sym = kwant.TranslationalSymmetry(
>     lattice.vec((1, 0, 0)),
>     lattice.vec((0, 1, 0)),
>     lattice.vec((0, 0, 1))
> )
>
> [....]
>
> #Hall bar
> def onsite(site, B):
>   (x, y, z) = site.pos
>   return stored_model[site]
>
> def hopping_Ax(site1, site2, B):
>       x1, y1, z1 = site1.pos
>       x2, y2, z2 = site2.pos
>       return stored_model[site1,site2] * np.exp(-0.5j * B * (x1 + x2)
> * (y1 - y2))
>
> kwant_model[lattice.shape(shape, (0, 0, 15))] = onsite
> kwant_model[lattice.neighbors()] = hopping_Ax
>
> kwant_sys = wraparound.wraparound(kwant_model).finalized()
>
>  B = 0.02
> # Obtain the Hamiltonian as a dense matrix
> ham_mat = kwant_sys.hamiltonian_submatrix(args=[B], sparse=True)

The docstring for 'wraparound' [1] says that the wrapped around system will
have additional parameters, corresponding to the momenta. As you have a 3D
system and have wrapped around all 3 dimensions, the parameters will be
'k_x', 'k_y', and 'k_z'.

As you have only supplied a single argument (B) to your system, an error
is raised.
You will need to provide all the arguments to your system:

    kwant_sys.hamiltonian_submatrix(params=dict(k_x=0, k_y=0, k_z=0,
B=B), sparse=True)

Happy Kwanting,

Joe


[1]:
https://kwant-project.org/doc/1/reference/generated/kwant.wraparound.wraparound#kwant.wraparound.wraparound

Reply via email to