Josephson Junctions using tkwant
Dear tkwant community,
Has anyone recently tried to simulate Josephson Junctions using tkwant?
I tried to follow the examples and tutorials, but several of them do not
work in the last tkwant version. I am sending attached and you can find
below the code that I am running but the current does not oscillate as a
function of time and the IV curve is linear. Any suggestions on what may be
wrong? Any help or comment is appreciated.
Here is the code:
import kwant
import tkwant
import tinyarray
import numpy as np
import matplotlib.pyplot as plt
import scipy.constants as ct
import time as comp_time
from mpi4py import MPI
comm=MPI.COMM_WORLD
start = comp_time.time()
tau_x = tinyarray.array([[0, 1], [1, 0]])
tau_y = tinyarray.array([[0, -1j], [1j, 0]])
tau_z = tinyarray.array([[1, 0], [0, -1]])
tau_0 = tinyarray.array([[1, 0], [0, 1]])
c_e = tinyarray.array([[1, 0], [0, 0]], complex)
c_h = tinyarray.array([[0, 0], [0, -1]], complex)
### parameters
Delta=0.02 #superconducting gap
barrier=0.9 #barrier in the N region
N=3 #size of the N region
S=10 #size of the S region
t=1
mu=t
I_time_avg=[]
V_values = np.linspace(-1.5*Delta, 1.5*Delta, 31)
def make_system(a=1):
lat = kwant.lattice.square(norbs=2)
syst = kwant.Builder()
#### Define junction. ####
### S
syst[(lat(x, 0) for x in range(-S, 0))] = (2 * t - mu) * tau_z + Delta
* tau_x
#### N
syst[(lat(x, 0) for x in range(0, N))] = (2 * t - mu + barrier) * tau_z
### S
syst[(lat(x, 0) for x in range(N, N+S))] = (2 * t - mu) * tau_z + Delta
* tau_x
# Hoppings
syst[lat.neighbors()] = -t * tau_z
### add JJ phase
syst[(lat(-1,0),lat(0,0))] = -t*np.exp(1j*phase(time))*c_e
-t*np.exp(-1j*phase(time))*c_h ### JJ phase
#### Define the leads. ####
lead_left = kwant.Builder(kwant.TranslationalSymmetry((-1, 0)))
lead_left[lat(0, 0)] = (2 * t - mu) * tau_z + Delta * tau_x
lead_left[lat.neighbors()] = -t * tau_z
lead_right = lead_left.reversed()
syst.attach_lead(lead_left)
syst.attach_lead(lead_right)
return syst
def phase(time):
### int_{0}^{t}A(1-cos(pi*t'/tau))dt'
def g(time,tau,A):
return A*time-A*tau/np.pi*np.sin(np.pi*time/tau)
if time<0:
return 0
elif time
Hi Denise,
Has anyone recently tried to simulate Josephson Junctions using tkwant? I tried to follow the examples and tutorials, but several of them do not work in the last tkwant version.
Unfortunately tkwant does not presently have a maintainer, and no developer time has been allocated to it. This may change in the future, but at this point we cannot provide any promises. tkwant was anyway an experimental code that is not "production ready" in the same way that kwant is.
I am sending attached and you can find below the code that I am running but the current does not oscillate as a function of time and the IV curve is linear. Any suggestions on what may be wrong? Any help or comment is appreciated.
Just skimming your code I notice the following:
### add JJ phase syst[(lat(-1,0),lat(0,0))] = -t*np.exp(1j*phase(time))*c_e -t*np.exp(-1j*phase(time))*c_h ### JJ phase
Here you are assigning a *constant value* to the hopping. Presumably you would like instead to have a *function* that depends on time. You should instead write something like: def hopping(site_a, site_b, time): return -t*np.exp(1j*phase(time))*c_e -t*np.exp(-1j*phase(time))*c_h syst[(lat(-1,0),lat(0,0))] = hopping Happy (t)kwanting, Joe
Hi again Denise, I'm just writing again to clarify something I wrote in my previous reply:
Unfortunately tkwant does not presently have a maintainer, and no developer time has been allocated to it. This may change in the future, but at this point we cannot provide any promises. tkwant was anyway an experimental code that is not "production ready" in the same way that kwant is.
This is not actually true; there has recently been quite a bit of work on tkwant recently, and Thomas Kloss is the current maintainer. I was aware of this, but have been out of the loop on tkwant development, which lead to me writing the misleading statement quoted above. If the tutorials do not work with the current version of tkwant then this is a bug (either in the documentation or tkwant itself), and I would encourage you to open an issue on the tkwant issue tracker [1]. Sorry again for the misleading message. Happy tkwanting, Joe [1]: https://gitlab.kwant-project.org/kwant/tkwant/issues/new
participants (2)
-
Denise Puglia
-
Joseph Weston