I am a PhD student of Hong Kong University of Science and Technology. I
want to use KWANT to caculate Hall resistance of a Hall bar structure.We
can get the conductance between 6 electrodes, but how to get hall
resistance? Can you give me some help? Thank you very much.
I am using Kwant to study a system with both spins and electron and hole,
so the hopping matrix is 4X4. Now I want to know how to separate the spins,
electron and hole. I study this through the "2.6. Superconductors: orbital
degrees of freedom, conservation laws and symmetries"
smatrix = kwant.smatrix(syst, energy)
data.append(smatrix.submatrix((0, 0), (0, 0)).shape
-smatrix.transmission((0, 0), (0, 0)) +smatrix.transmission((0, 1), (0, 0)))
I do not find more information about this for kwant.
For my system, if I have 3 leads, and the hopping and onsite energy is set
in this order:
(e↑,0,0,0)- spin up electron,first row of the 4X4matrix
(0,e↓,0,0)- spin down electron,second row of the 4X4matrix
(0,0, h↑ ,0)- spin up hole,third row of the 4X4matrix
(0,0, 0, h ↓ )- spin down hole,fourth row of the 4X4matrix
I want to obtain the transmissions from 0 →2.
smatrix = kwant.smatrix(syst, energy)
The transmission from h↑ to e↑ is: smatrix.transmission((2, 1), (0, 2))
The transmission from h ↓ to e↑ is: smatrix.transmission((2, 1), (0, 3))
Is my understanding correct?
Thanks very much in advance!
Dear Kwant community,
Hope you are doing well.
I'm trying to run some of thee Kawant tutorials, after loading some
required packages as bellow
import holoviews as hv
import numpy as np
# Local imports
from funcs import constants, discretized_hamiltonian, get_cuts, add_vlead,
def plot_CPR(syst, hopping, params, tol=0.01, max_frequencies=1000):
phases = np.linspace(-np.pi, np.pi, 51)
H_0_cache = 
I = [funcs.current_at_phase(syst, hopping, params, H_0_cache, phase,
for phase in phases]
return hv.Curve((phases, I), kdims=['phase'], vdims=['$I$'],
When I want to make a 1D system via command "syst, hopping =
funcs.make_1d_wire(a=10, L=100, L_sc=100)",
I'm getting an error
TypeError: __init__() missing 1 required positional argument: 'parameters'
I will highly appreciate it if you guide me on how to fix it.
Thank you in advance.
I have a question regarding the conductance in normal-superconductor junctions. I expect the conductance to be particle-hole symmetric, since the scattering region and the leads obey PHS. However, downloading the tutorial 2.6 and extending the energy interval, for which the conductance is calculated, to negative values, results in a not particle-hole symmetric conductance spectrum above the gap. The conductance takes larger values for positive energies above the gap. Removing the superconducting lead and choosing a long superconducting section leads to the same sub-gap conductance. This was already discussed in the Kwant forum and makes sense to me. However, in this setup I observe a symmetric spectrum for large energies. The conductance for negative and positive energies agree. What is reason for this behaviour?
The code "3_advanced_concepts", which was shared in the recent Kwant workshop, gives the same result. I mean the Majorana part and not the topological insulator example. This effect of broken PHS is strongly pronounced near the topological phase transition, since the gap closes. If I consider a NSN junction, then I observe even not particle hole symmetric sub gap states: The sub-gap states are at the same bias but do not have always the same peak height in the conductance.
Why does this happen? Maybe it is obvious, but I can not see it right now. The PHS is not broken! What I am missing here and what is the physical explanation?
I am new to Kwant and I am trying to get the 2D band structure of systems
with translational symmetry in 2 directions. My goal is to focus on one
particular band in the system. I have used "kwant.wraparound.plot_2d_bands"to
get the plot of the entire band structure. I want to know if there is a
function that gives me the band structure as a matrix or as a data file of
"kx ky F(kx,ky)" so that I can perform some operations on certain
particular bands before plotting them.
Defining the system using wraparound, you have access to the momentum dependent Hamiltonian as:
Then, you can apply various functionalities to it at different momenta.
I'm trying to implement the Haldane model but for some reason my code seems
to be incorrect.
I implemented a zigzag edge graphene ribbon at the parameters (M = 0.2,
t=1.0,t2 = 0.5, phi = pi/2) but my result is really different from what it
is shown at topocondmat
Thank you for the time and help.
Is it possible to obtain the edge or surface states of a TI from its LDOS on a semi-infinite slab? I'm attaching a single lead to a scattering region consistent of a single layer of the same H as the lead, then I ask for the LDOS at the scattering region, which would be the surface of the semi-infinite system.
The problem is that kwant uses the propagating modes of the lead to calculate the LDOS, and consequently I only get the surface states on energy ranges where the bulk bands exist, but I'm interested in the LDOS at the surface and within the bulk gap.
I need to use the following hamiltonian to test if the rest of my code is correct, however I haven't been able to implement it in Kwant. Reading the examples, all the discretize ones are for polynomial dependences on k but mine isn't.
H = sin(k_x)*sigma_x +sin(k_y)*sigma_y +B*(2+M-cos(k_x)-cos(k_y))*sigma_z
When I implement it on a square grid I obtain the following output:
# Discrete coordinates: x y
# Onsite element:
_cache_0 = (
array([[ 1.+0.j, 0.+0.j],
[ 0.+0.j, -1.+0.j]]))
_cache_1 = (
[ 0.+0.j, 1.+0.j]]))
_cache_2 = (
[ 0.+0.j, 1.+0.j]]))
_cache_3 = (
array([[ 2.+0.j, 0.+0.j],
[ 0.+0.j, -2.+0.j]]))
_cache_4 = (
_cache_5 = (
def onsite(site, B, M, cos, k_x, k_y, sin):
_const_0 = (cos(k_x))
_const_1 = (cos(k_y))
_const_2 = (sin(k_x))
_const_3 = (sin(k_y))
return (B*M) * (_cache_0) + (B*_const_0) * (_cache_1) + (B*_const_1) * (_cache_2) + (B) * (_cache_3) + (_const_2) * (_cache_4) + (_const_3) * (_cache_5)
My issues are:
1. The constants are just my sines and cosines of k_x/k_y, so what happened here?
2. I think because of that it can't find the hopping terms;
3. It doesn't plot any lattice, however if I set hamiltonian = "k_x+k_y" i does plot the square lattice.
I know the hamiltonian can be linearized in k, but if possible I want to implement it as it is.
Thanks in advance.