Dear all, I would like to discuss methods for plotting current densities in Kwant. Anyone is welcome to participate in this discussion. Please make sure that you always CC the mailing list in your replies. Wouldn’t it be nice if there was a nice standard way to plot current densities (and other vector fields) in Kwant? Now it is easy to calculate the current on each hopping of Kwant’s system graph (let’s assume that there is one orbital per site for simplicity), but how to display this information in a useful way that works for general graphs? Daniyar once implemented current density plotting that first smooths the vector field and then plots this using matplotlib’s streamplot. The result looks really nice (first attached image), but this method has at least one arbitrary parameter: the length scale of the smoothing. Adrien tried out an alternative “more direct” method inspired by [1]: the idea is to calculate the current on each hopping and interpret it as the flow of some (classical, i.e. not quantum) “liquid” between sites. In the beginning, the liquid of most sites is transparent, except for a few sites where it is colored by an “ink”. The second attached image shows a “long exposure” snapshot of this method for the QHE system of the Kwant paper. The ink intensity was set to 0 (white) for most sites and to 1 (black) for a few sites. Then, the intensity was let to evolve as described in the previous paragraph for some time. The image does not show the final state, but rather a time average over the evolution for some time. As you can see, the new method does not produce very nice images. In particular, streamlines do not behave isotropically: streamlines parallel to hoppings do not spread much, while diagonal ones spread dramatically. This is not surprising of course, but I think that the image is still interesting. What do you think would be a useful way to plot currents in Kwant? Daniyar’s method produces clearer pictures, but does interpolating the current densities on hoppings into a vector field actually make physical sense (on a general graph)? Is the anisotropy of the second method just an artifact (of disregarding coherence?), or is it actually a feature in some sense? I can imagine an interpolation scheme (Adrien implemented a proofofconcept version already) that preserves the total current that pierces any given surface as an invariant. Given a graph with perhopping currents, that interpolation method returns the currents that flow through the sides/faces of regularly spaced squares/cubes. This is not yet a vector field (because x and y components are spatially separated), but can be easily interpolated into one. I’m curious to hear what people think about all this. Christoph [1] http://www.paraview.org/Wiki/ParaView/Line_Integral_Convolution
participants (1)

Christoph Groth