Hi Joe, Thanks for getting back so quickly!
I realized after sending my initial email that I made a mistake in the ordering of the Python functions. You are indeed correct that I should be summing after taking the modulus squared of the transmission coefficient matrix elements. Before we finish the discussion, I just wanted to verify that the indices of the modes I am finding match up with the indices of the submatrix. You mentioned that I had the right idea, but did not comment on that. I just want to be sure. Thanks again, Kevin > On Aug 1, 2018, at 7:45 AM, Joseph Weston <joseph.westo...@gmail.com> wrote: > > Hi Kevin, > > Thanks for the well-posed and focused question! > >> I would like to calculate the valley polarized conductance for a graphene >> nanoribbon with 2 leads (let’s say in the x-direction). My current approach >> is this: >> >> 1) Get the S-matrix for a certain energy >> 2) Find the indices of the modes with positive velocities >> 3) Separate these modes by positive and negative momenta >> 4) Get the sub matrix from the S-matrix >> 5) Sum the transmission coefficients for positive and negative momenta > > This is the right idea. > >> 2) Find the indices of the modes with positive velocities > > We only care about selecting (by their valley) the correct *incoming* > modes. In Kwant's convention these are the modes with *negative*, not > positive, velocity. > > This is in an obscure part of the documentation [1], where we say > >> positive velocity and momentum directions are defined with respect to > the translational symmetry direction of the [lead] > > When leads are attached to a scattering region, their symmetry direction > points *away* from the scattering region "towards infinity", which means > that the incoming modes have negative velocity in Kwant's convention. > > >> The code below illustrates these 5 steps: >> >> import progressbar >> def valleyPolarizability(syst, energies, lead_start=0, lead_end=1): >> KPs = [] >> Ks = [] >> bar = progressbar.ProgressBar() >> for energy in bar(energies): >> smatrix = kwant.smatrix(syst, energy, params={'phi': phi}) >> positives = np.where(smatrix.lead_info[lead_start].velocities >= 0)[0] >> momentas = smatrix.lead_info[lead_start].momenta[positives] >> K_prime_indices = np.where(momentas < 0)[0] >> K_indices = np.where(momentas >= 0)[0] >> submatrix = smatrix.submatrix(lead_end, lead_start) >> K_prime_T = np.absolute(np.sum(submatrix[:, K_prime_indices]))**2 >> K_T = np.absolute(np.sum(submatrix[:, K_indices]))**2 >> KPs.append(K_prime_T) >> Ks.append(K_T) >> return KPs, Ks > > This is almost correct except for a couple of things. Firstly we should > select the modes that have negative velocity, as already discussed. > Secondly: > >> K_prime_T = np.absolute(np.sum(submatrix[:, K_prime_indices]))**2 > > Here you're summing the scattering *amplitudes*, when you really want to > sum the scattering *probabilities*: > >> K_prime_T = np.sum(np.abs(submatrix[:, K_prime_indices]))**2 > > i.e. you need to take the absolute square before summing. > > > Happy Kwanting, > > Joe > > > [1]: > https://kwant-project.org/doc/1.3/reference/generated/kwant.physics.PropagatingModes > >