Dear Adel, Thank you so much for your reply. With the method you mentioned, I found a way to implement the system I have.
Kind regards, Mert On Mon, Jun 1, 2020 at 11:36 AM Abbout Adel <abbout.a...@gmail.com> wrote: > Dear Ahmet, > > Your 4x4 Hamiltonian does already contain the spin degree of freedom, so > including your magnetic impurity will not increase that. > You have just to write your Hamiltonian as for any magnetic system by > including the interaction term: > C^dagger m.sigma C, where sigma is the vector > (sigma_x,sigma_y,sigma_z). > > In kwant it will be something like: > > import tinyarray as ta > > sigma_0 = ta.array([[1., 0.], [0., 1.]])sigma_x = ta.array([[0., 1.], > [1., 0.]])sigma_y = ta.array([[0., -1j], [1j, 0.]])sigma_z = > ta.array([[1., 0.], [0., -1.]])sigma_vec = ta.array([sigma_x, sigma_y, > sigma_z]) > Delta*sum(map(operator.mul, m, sigma_vec)) > > In your case, you need a 4x4 block diagonal matrice, each block is > Delta*sum(map(operator.mul, m, sigma_vec)) > > I hope this helps, > > Adel > > > On Sat, May 30, 2020 at 8:47 PM Ahmet Mert Bozkurt < > mertbozk...@sabanciuniv.edu> wrote: > >> Dear Adel, >> >> The electronic part of the Hamiltonian is 4x4. For a single magnetic >> impurity, I tried to include the magnetic impurity spin degree of freedom >> not by making the total Hamiltonian 8x8 at each site, but making two types >> of lattices, lat_up and lat_down, that describes two spin states of the >> magnetic impurity. The problem with making the Hamiltonian 8x8 and adding >> the magnetic impurity as onsite potential is that, I could not find a way >> to specify the state of the magnetic impurity. The state of the magnetic >> impurity determines whether it interacts with spin-up electrons or spin >> down electrons. >> >> If I were to include the spin-flip interaction as onsite Hamiltonian, I >> would have written: >> >> syst[lat(20,2)] = 0.1*0.5* (np.kron(np.kron(pauli.sp,pauli.s0), pauli.sm >> ) >> + np.kron(np.kron(pauli.sm, pauli.s0), pauli.sp)) >> >> But in this case, this magnetic impurity interacts with both spin-up and >> spin-down electrons, just because I could not incorporate the spin of the >> magnetic impurity. Adding only one term, say s_+ I_- is non-Hermitian so I >> cannot do that either. >> >> I hope I made myself clear. Thank you so much, >> >> Mert >> >> On Sat, May 30, 2020 at 4:50 PM Abbout Adel <abbout.a...@gmail.com> >> wrote: >> >>> Dear Ahmet, >>> >>> I do not understand why you want to put 2N lattices. >>> Electrons interacting with multiple magnetic impurities can be obtained >>> just by adding impurities, the way you did it in your example for one >>> impurity. >>> >>> It would have been more practical if you used one lattice with 4x4 >>> matrices as an onsite potential. >>> >>> Adel >>> >>> On Fri, May 29, 2020 at 3:42 PM Ahmet Mert Bozkurt < >>> mertbozk...@sabanciuniv.edu> wrote: >>> >>>> Dear KWANT developers, >>>> >>>> I would like to add a localized magnetic impurity into a quantum spin >>>> hall system with spin-flip interaction (sigma_plus I_- + sigma_- I_+ where >>>> I is the magnetic impurity spin operator. The spin-flip interaction depends >>>> on the state of the magnetic impurity (whether it is spin-up or spin-down). >>>> If it's spin-up, it needs to interact only with the spin down electrons >>>> (term sigma_+) flip them upwards, while the magnetic impurity state needs >>>> to be updated to spin-down. I've written a code using two different >>>> lattices (lat_up and lat_down) and simply check transmission from one >>>> lattice lead to the other lattice lead. But this method becomes impractical >>>> if i want to add more magnetic impurities because i need to add more and >>>> more lattice (2^N). Is there any easier way to include a scatterer with >>>> internal degree of freedom (which can be updated perhaps using tkwant or >>>> any other way)? >>>> >>>> BTW this is the model I'm working on:https://arxiv.org/abs/1705.04985 >>>> >>>> Below is the relevant part of my code and thank you so much in advance! >>>> >>>> Mert >>>> >>>> # Scattering region >>>> syst[lat_up.shape(shape, (0, 0))] = onsite >>>> syst[lat_down.shape(shape, (0, 0))] = onsite >>>> syst[kwant.HoppingKind((1, 0), lat_up)] = hopx >>>> syst[kwant.HoppingKind((1, 0), lat_down)] = hopx >>>> syst[kwant.HoppingKind((0, 1), lat_up)] = hopy >>>> syst[kwant.HoppingKind((0, 1), lat_down)] = hopy >>>> syst[(lat_up(10, 2), lat_down(10, 2))] = 0.1*0.5*np.kron(pauli.sp, >>>> pauli.s0) >>>> syst[(lat_down(10, 2), lat_up(10, 2))] = 0.1*0.5*np.kron(pauli.sm, >>>> pauli.s0) >>>> # two lines above correspond to spin-flip of the magnetic impurity, >>>> jumping from one #lattice to the other. >>>> >>>> #### Define the leads. #### >>>> >>>> sym_left = kwant.TranslationalSymmetry((-1, 0)) >>>> >>>> lead_up = kwant.Builder(sym_left) >>>> lead_down = kwant.Builder(sym_left) >>>> lead_up[lat_up.shape(lead_shape, (0, 0))] = onsite_lead >>>> lead_down[lat_down.shape(lead_shape, (0, 0))] = onsite_lead >>>> lead_up[kwant.HoppingKind((1, 0), lat_up)] = hopx_lead >>>> lead_up[kwant.HoppingKind((0, 1), lat_up)] = hopy_lead >>>> lead_down[kwant.HoppingKind((1, 0), lat_down)] = hopx_lead >>>> lead_down[kwant.HoppingKind((0, 1), lat_down)] = hopy_lead >>>> >>>> # Attach leads >>>> syst.attach_lead(lead_up) >>>> syst.attach_lead(lead_down) >>>> syst.attach_lead(lead_up.reversed()) >>>> syst.attach_lead(lead_down.reversed()) >>>> >>>> def plot_conductance(sys, p, mu): >>>> # Compute conductance >>>> p.mu = mu >>>> data = [] >>>> smatrix = kwant.smatrix(sys, energy = 0.0, params = dict(p=p)) >>>> no_flip = smatrix.transmission(2, 0) >>>> flip = smatrix.transmission(1,0) >>>> return no_flip, flip >>>> >>> >>> >>> -- >>> Abbout Adel >>> >> > > -- > Abbout Adel >