Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
kwant-bot
@kwant-bot
jbweston:
is it the building or the finalizing that takes the time?
quaeritis
@quaeritis
I think so because I always do an add_peierls_phase
kwant-bot
@kwant-bot
jbweston:
if you use that then you're not going to be able to just add more sites to the system
jbweston:
or at least you'd need to be careful
jbweston:
if you call add_peierls_phase on the Builder twice it will add the peierls phase twice
quaeritis
@quaeritis

So a system would have to be extended and copied in order to then make add_peierls_phase, in order to then always extend against the copy. But which probably has the same performance as creating a new system.

With dask I create the systems in parallel so it's not that bad either.

sorry if the english is incomprehensible I hope you understand what I want to say
kwant-bot
@kwant-bot
jbweston:
something like this:
syst = make_system(...)
for delta in deltas
      add_sites(syst, deltas)
      syst2, gauge = kwant.builder.add_peierls_phase(syst)
      syst2 = syst2.finalize()
      kwant.smatrix(syst2, ...)
quaeritis
@quaeritis
that's exactly what i mean, just that i use for every system :
def spectrum(syst, params=default_params.copy(), k=20):
    ham = syst.hamiltonian_submatrix(params=params, sparse=True)
    energies, wfs = mumps_eigsh(ham, k=k, sigma=0)
    return energies, wfs
then i plot the state density with the help of kwant.operator.Density (syst) and itkwidgets in 3D
kwant-bot
@kwant-bot
jbweston:
ah I forgot that add_peierls_phase returns a new Builder, so it's fine
quaeritis
@quaeritis
add_peierls_phase makes also `finalize thus:
syst = make_system(...)
for delta in deltas:
      add_sites(syst, deltas)
      syst2, gauge = kwant.builder.add_peierls_phase(syst)
      kwant.smatrix(syst2, ...)
kwant-bot
@kwant-bot
jbweston:
sure
kwant-bot
@kwant-bot
anton:
Check out this neat sphinx theme: https://pandas-sphinx-theme.readthedocs.io/en/latest/index.html
anton:
Ping @cwg here
kwant-bot
@kwant-bot
cwg:
Looks nice and clean, do you think we should use it?
anton:
Yes. As far as collapsible details go, we should use a sphinx extension.
kwant-bot
@kwant-bot
cwg:
Ah, this scheme has collapsible details?
kwant-bot
@kwant-bot
anton:
No, but the proper approach to collapsible details is a theme-independent sphinx extension.
kwant-bot
@kwant-bot
anton:
... Which, I hear, is being developed right as we speak.
Kewei Li
@likewei92
hey guys, is there any news on when kwant 1.5.0 will be released? The vectorized value functions look really cool and it would be great to start using it soon :)
Anton Akhmerov
@akhmerov
@likewei92 thanks, they do look awesome indeed.
Unfortunately there's still a fair bit of work to be done: https://gitlab.kwant-project.org/kwant/kwant/-/milestones/9
Do you have a specific application for vectorized evaluation in mind?
Speaking of cool things: did you also see the plotly plotter over here: https://kwant-project.org/doc/dev/tutorial/plotting (search for plotly in the page).
Anton Akhmerov
@akhmerov
Ah, since you're at Microsoft, I'll hazard a guess that it's for large systems and including electrostatics and time-dependence.
Since @jbweston is moving your way now, he can help it happen sooner ;)
Kewei Li
@likewei92
ok thanks! Yeah we're looking to speed up the construction of our Hamiltonians. Also vectors are much easier to inspect and debug than functions. I'll check with @jbweston when he joins then :)
kwant-bot
@kwant-bot
anton:
@cwg mind releasing kwant 1.4.2 from current stable?
kwant-bot
@kwant-bot
anton:
Contains fixes to qsymm integration.
kwant-bot
@kwant-bot
cwg:
Sure, I'll do it this week.
cwg:
BTW, how about moving the qsymm integration into qsymm? I.e. moving kwant.qsymm to qsymm.kwant. Of course we'd do it in a backwards-compatible way, i.e. if qsymm is available kwant would expose it as kwant.qsymm for now.
kwant-bot
@kwant-bot
anton:
Yes, all for it.
cwg:
That would require a modification and release of qsymm. I guess we could add the stuff to qsymm right now and start using it in Kwant with 1.5.
kwant-bot
@kwant-bot
anton:
Hmm but we're also changing the system API
anton:
Maybe better wait until that with implementing qsymm.kwant
cwg:
Right, if it has to be changed anyway, it's better not to move the old code over to qsymm yet.
kwant-bot
@kwant-bot
anton:
Qsymm now works with builders, but we still might want to revisit that
kwant-bot
@kwant-bot
anton:
A quick summary of the discussion of vectorized systems between @cwg and me.

anton:
The next logical step is implementing the n-dimensional vectorized systems, #316.

Right now the format already groups the Hamiltonian terms by symmetry element, so the current system format already supports ND systems. The graph attributes are right now present in all systems, those we will have to make optional and only generate if dimensionality is less than 2.

anton:
I proposed to access a Hamiltonian of an ND system at a specific k-vector by adding extra parameters to the params dictionary expected by the syst.hamiltonian_submatrix. This effectively makes those systems work as if they are produced with wraparound.
kwant-bot
@kwant-bot
anton:
Before it was impossible because cell_hamiltonian and inter_cell_hopping were implemented using hamiltonian_submatrix, but in the new format this isn't the case anymore.

anton:
Related to that, we could generalize inter_cell_hopping to allow querying general inter-cell hoppings in a system by adding a new argument to it—symmetry element corresponding to the hopping. So it would have a signature inter_cell_hopping(args=(), sparse=False, which=(1,), *, params=None) (here params would not have the extra k arguments).

This idea is by @dvarjas .

anton:
Further we have discussed removing args from vectorized systems.
anton:
We have also discussed further updates in implementing operators that would not depend on systems having a graph, but decided to postpone this until after finalized systems are implemented.
anton:
CC @jbweston in case you're curious.
kwant-bot
@kwant-bot
anton:
Anyone here: if you have any feedback or questions, that's absolutely great—ask right away.