Hi
      Using the Kwant package to calculate the spin-resolved conductance of a 
graphene nanoribbon, where the device region incorporates Rashba spin-orbit 
coupling (RSOC) in its Hamiltonian while the leads do not. The left lead is 
numbered 0 and the right lead is numbered 1. The goal is to obtain the 
conductance from spin-up electrons in the left lead to spin-down electrons in 
the right lead. How should the program be written?
      We tried the program in the attachment, but the result was unsatisfactory.
      Any help and guidance would be appreciated!
import kwant
import numpy as np
from matplotlib import pyplot
from tinyarray import array

# 定义Pauli矩阵
sigma_0 = array([[1, 0], [0, 1]])
sigma_x = array([[0, 1], [1, 0]])
sigma_y = array([[0, -1j], [1j, 0]])
sigma_z = array([[1, 0], [0, -1]])

# 定义石墨烯格点
graphene = kwant.lattice.general([(1, 0), (0.5, np.sqrt(3) / 2)],
                                 [(0, 0), (0, 1 / np.sqrt(3))],norbs=2)
a, b = graphene.sublattices


# 定义散射区域
def make_system(W=10, L=30, t=1.0, alpha=0.1):
    syst = kwant.Builder()

    def circle(pos):
        x, y = pos
        return abs(x)<=L and abs(y)<=W

    syst[graphene.shape(circle, (0, 0))] = (4 * t * sigma_0 + alpha * sigma_y)

    # 添加跃迁项
    syst[graphene.neighbors()] = -t * sigma_0

    # 定义电极
    def lead_shape(pos):
        return abs(pos[1]) < W

    lead = kwant.Builder(kwant.TranslationalSymmetry((1, 0)))
    lead[graphene.shape(lead_shape, (0, 0))] = 4 * t * sigma_0
    lead[graphene.neighbors()] = -t * sigma_0

    # 连接电极
    syst.attach_lead(lead)
    syst.attach_lead(lead.reversed())

    return syst


# 计算电导
def plot_conductance(syst, energies):
    data = []
    for energy in energies:
        smatrix = kwant.smatrix(syst, energy)
        # 计算从0导线自旋向上到1导线自旋向下的电导
        data.append(smatrix.transmission((1, 1), (0, 0)))  # 
假设自旋向上和向下的通道分别为0和1

    pyplot.figure()
    pyplot.plot(energies, data)
    pyplot.xlabel("energy [t]")
    pyplot.ylabel("conductance [e^2/h]")
    pyplot.show()

# 主函数
def main():
    syst = make_system()
    kwant.plot(syst)  # 查看系统结构
    syst = syst.finalized()
    plot_conductance(syst, energies=[0.01 * i for i in range(100)])


if __name__ == "__main__":
    main()

Reply via email to