Eötvös Quantum Utilities  v5.0.144
Providing the Horsepowers in the Quantum Realm
test_skew_coupling.m
Go to the documentation of this file.
1 %% Eotvos Quantum Transport Utilities
2 % Copyright (C) 2019 Peter Rakyta, Ph.D
3 %
4 % This program is free software: you can redistribute it and/or modify
5 % it under the terms of the GNU General Public License as published by
6 % the Free Software Foundation, either version 3 of the License, or
7 % (at your option) any later version.
8 %
9 % This program is distributed in the hope that it will be useful,
10 % but WITHOUT ANY WARRANTY; without even the implied warranty of
11 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 % GNU General Public License for more details.
13 %
14 % You should have received a copy of the GNU General Public License
15 % along with this program. If not, see http://www.gnu.org/licenses/.
16 %
17 %> @addtogroup unit_tests Unit Tests
18 %> @{
19 %> @file test_CreateHamiltonians.m
20 %> @brief Testfile to check the skew coupling matrix elements in the transport calculations.
21 %> @Available
22 %> EQuUs v5.0.144 or later
23 %> @}
24 %> @brief Testfile to check the skew coupling matrix elements in the transport calculations. (Constant vector potential and transverse momentum included in the test)
25 function test_skew_coupling()
26 
27 
28 filename = mfilename('fullpath');
29 [directory, fncname] = fileparts( filename );
30 
31  % filename containing the input XML
32  inputXML = 'Basic_Input_Graphene_SOC_Lattice.xml';
33  % Parsing the input file and creating data structures
34  [Opt, param] = parseInput( fullfile( directory, inputXML ) );
35 
36 
37  % setting the on-site potentials
38  param.Leads{1}.epsilon = -0.34;
39  param.Leads{2}.epsilon = -0.24;
40  param.scatter.epsilon = -0.34;
41 
42  % staggered A-B potential
43  param.Leads{1}.deltaAB = 0*param.Leads{1}.vargamma;
44  param.Leads{2}.deltaAB = 0*param.Leads{1}.vargamma;
45  param.scatter.deltaAB = 0*param.Leads{1}.vargamma;
46 
47  % setting the Rashba-type SOC
48  param.Leads{1}.Rashba = 0.0*param.Leads{1}.vargamma;
49  param.Leads{2}.Rashba = 0.0*param.Leads{1}.vargamma;
50  param.scatter.Rashba = 0.0*param.Leads{1}.vargamma;
51 
52  % setting the Intrinsic SOC
53  param.Leads{1}.Intrinsic = 0.01*param.Leads{1}.vargamma;
54  param.Leads{2}.Intrinsic = 0.01*param.Leads{1}.vargamma;
55  param.scatter.Intrinsic = 0.01*param.Leads{1}.vargamma;
56 
57  % setting the Valley Zeeman SOC
58  param.Leads{1}.ValleyZeeman = 0.00*param.Leads{1}.vargamma;
59  param.Leads{2}.ValleyZeeman = 0.00*param.Leads{1}.vargamma;
60  param.scatter.ValleyZeeman = 0.00*param.Leads{1}.vargamma;
61 
62 
63  %> length of the junction (number of unit cells)
64  height = 1016;
65 
66 
67  % setting the transverse momentum
68  q = 0;
69 
70  %% Testing the transport using the whole Hamiltonian of the scattering region without the vector potential
71  disp( '***** Testing the transport using the whole Hamiltonian of the scattering region without the vector potential *****' );
72 
73  % turning off the vector potential
74  Opt.magnetic_field = false;
76 
77  % creating the Ribbon class representing the twoterminal setup
78  cRibbon = Ribbon('width', 2, 'height', height, 'Opt', Opt, 'param', param, 'q', q );
79  conductance = Transport_q( cRibbon, true, false );
80 
81 
82  % Transport through the connected leds without the scattering region)
83  cRibbon_Leads = Ribbon_Leads('width', 2, 'height', height, 'Opt', Opt, 'param', param, 'q', q );
84  conductance_leads = Transport_q( cRibbon_Leads, [], false );
85 
86 
87  checkpoint = norm( conductance - conductance_leads );
88  if checkpoint > 1e-6
89  warning(['EQuUs:Tests:', fncname, ':checkpoint failed with error ', num2str( checkpoint)]);
90  end
91 
92  %% Testing the transport using the whole Hamiltonian of the scattering region including the vector potential
93  disp( '***** Testing the transport using the whole Hamiltonian of the scattering region including the vector potential *****' );
94 
95  % turning off the vector potential
96  Opt.magnetic_field = true;
98 
99  % creating the Ribbon class representing the twoterminal setup
100  cRibbon = Ribbon('width', 2, 'height', height, 'Opt', Opt, 'param', param, 'q', q );
101  conductance = Transport_q( cRibbon, true, false );
102 
103 
104  % Transport through the connected leds without the scattering region)
105  cRibbon_Leads = Ribbon_Leads('width', 2, 'height', height, 'Opt', Opt, 'param', param, 'q', q );
106  conductance_leads = Transport_q( cRibbon_Leads, [], false );
107 
108  checkpoint = norm( conductance - conductance_leads );
109  if checkpoint > 1e-6
110  warning(['EQuUs:Tests:', fncname, ':checkpoint failed with error ', num2str( checkpoint)]);
111  end
112 
113 
114  %% Testing the transport using the translational invariant method without the vector potential
115  disp( '***** Testing the transport using the translational invariant method without the vector potential *****' );
116 
117  % turning off the vector potential
118  Opt.magnetic_field = false;
120 
121  % creating the Ribbon class representing the twoterminal setup
122  cRibbon = Ribbon('width', 2, 'height', height, 'Opt', Opt, 'param', param, 'q', q );
123  conductance = Transport_q( cRibbon, false, false );
124 
125 
126  % Transport through the connected leds without the scattering region)
127  cRibbon_Leads = Ribbon_Leads('width', 2, 'height', height, 'Opt', Opt, 'param', param, 'q', q );
128  conductance_leads = Transport_q( cRibbon_Leads, [], false );
129 
130  checkpoint = norm( conductance - conductance_leads );
131  if checkpoint > 1e-6
132  warning(['EQuUs:Tests:', fncname, ':checkpoint failed with error ', num2str( checkpoint)]);
133  end
134 
135  %% Testing the transport using the translational invariant method including the vector potential
136  disp( '***** Testing the transport using the translational invariant method including the vector potential *****' );
137 
138  % turning off the vector potential
139  Opt.magnetic_field = true;
141 
142  % creating the Ribbon class representing the twoterminal setup
143  cRibbon = Ribbon('width', 2, 'height', height, 'Opt', Opt, 'param', param, 'q', q );
144  conductance = Transport_q( cRibbon, false, false );
145 
146 
147  % Transport through the connected leds without the scattering region)
148  cRibbon_Leads = Ribbon_Leads('width', 2, 'height', height, 'Opt', Opt, 'param', param, 'q', q );
149  conductance_leads = Transport_q( cRibbon_Leads, [], false );
150 
151  checkpoint = norm( conductance - conductance_leads );
152  if checkpoint > 1e-6
153  warning(['EQuUs:Tests:', fncname, ':checkpoint failed with error ', num2str( checkpoint)]);
154  end
155 
156 
157 
158 
159  %% Testing the transport using the whole Hamiltonian of the scattering region including the vector potential, comapring to the self-energy results
160  disp( '***** Testing the transport using the whole Hamiltonian of the scattering region including the vector potential, comapring to the self-energy results *****' );
161 
162  % turning off the vector potential
163  Opt.magnetic_field = true;
165 
166  % creating the Ribbon class representing the twoterminal setup
167  cRibbon = Ribbon('width', 2, 'height', height, 'Opt', Opt, 'param', param, 'q', q );
168  conductance_self_energy = Transport_q( cRibbon, true, true );
169 
170 
171  % creating the Ribbon class representing the twoterminal setup
172  cRibbon = Ribbon('width', 2, 'height', height, 'Opt', Opt, 'param', param, 'q', q );
173  conductance = Transport_q( cRibbon, true, false );
174 
175  checkpoint = norm( conductance - conductance_self_energy );
176  if checkpoint > 1e-6
177  warning(['EQuUs:Tests:', fncname, ':checkpoint failed with error ', num2str( checkpoint)]);
178  end
179 
180 
181 
182  %% Testing the transport using the whole Hamiltonian of the scattering region including the vector potential, comapring to the self-energy results
183  disp( '***** Testing the transport using the translational invariant method including the vector potential, comapring to the self-energy results *****' );
184 
185  % turning off the vector potential
186  Opt.magnetic_field = true;
188 
189  % creating the Ribbon class representing the twoterminal setup
190  cRibbon = Ribbon('width', 2, 'height', height, 'Opt', Opt, 'param', param, 'q', q );
191  conductance_self_energy = Transport_q( cRibbon, false, true );
192 
193 
194  % creating the Ribbon class representing the twoterminal setup
195  cRibbon = Ribbon('width', 2, 'height', height, 'Opt', Opt, 'param', param, 'q', q );
196  conductance = Transport_q( cRibbon, false, false );
197 
198  checkpoint = norm( conductance - conductance_self_energy );
199  if checkpoint > 1e-6
200  warning(['EQuUs:Tests:', fncname, ':checkpoint failed with error ', num2str( checkpoint)]);
201  end
202 
203 
204 %% Transport_q
205 %> @brief Calculates the transvere momemntum resolved conductance for a given energy
206 %> @param Energy The energy value.
207 %> @param B The magnetic field
208 %> @param selfEnergy Logical value. Set true to use the self energy in the calculations or false to use the surface Green operator.
209  function Conductance = Transport_q( cRibbon_loc, gfininvfromHamiltonian, useSelfEnergy )
210 
211  % creating funcfion handles for the constant vector potentials
212  Aconst = 1;
213 
214  % creting the funciton handles of the vector potentials
215  hLandauy = @(x,y)([zeros(size(x)), ones(size(x))*Aconst] );
216 
217  cRibbon_loc.setHandlesForMagneticField('scatter', hLandauy, 'lead', hLandauy );
218 
219  % seeting the Energy value in the Ribbon class
220  cRibbon_loc.setEnergy( 0 )
221 
222  % Calculates the surface Green operator of the scattering region
223  if gfininvfromHamiltonian
224  cRibbon_loc.CalcFiniteGreensFunctionFromHamiltonian();
225  elseif ~gfininvfromHamiltonian
226  cRibbon_loc.CalcFiniteGreensFunction();
227  end
228 
229  % creating function handle for the Dyson Eq.
230  Dysonfunc = @()cRibbon_loc.CustomDysonFunc( 'constant_channels', false, 'SelfEnergy', useSelfEnergy );
231 
232  % Evaluate the Dyson Eq.
233  cRibbon_loc.FL_handles.DysonEq( 'CustomDyson', Dysonfunc );
234 
235  % Calculating the Scattering matrix
236  cRibbon_loc.FL_handles.SmatrixCalc();
237 
238  % Calculate the conductance
239  Conductance = cRibbon_loc.FL_handles.Conduktance();
240 
241  Conductance = Conductance(1,2);
242 
243  %disp( ['E = ', num2str(Energy), ' conductance = ', num2str(Conductance)])
244 
245  end
246 
247 
248 
249 end
function test(arg1, arg2)
Brief description of the function.
function test_skew_coupling()
Testfile to check the skew coupling matrix elements in the transport calculations....
lead_param Leads
A list of structures lead_param containing the physical parameters for the scattering region.
Definition: structures.m:49
function setEnergy(Energy)
Sets the energy for the calculations.
Property q
The tranverse momentum for transverse computations.
magnetic_field_trans_invariant
Set true (default) if a magnetic field is translational invariant along the scattering center,...
Definition: structures.m:70
Structure Opt contains the basic computational parameters used in EQuUs.
Definition: structures.m:60
A class for calculations on a ribbon of finite width for equilibrium calculations mostly in the zero ...
Definition: Ribbon.m:34
Property version
The current version of the package.
function Transport(Energy, B)
Calculates the conductance at a given energy value.
function Transport_q(cRibbon_loc, gfininvfromHamiltonian, useSelfEnergy)
length of the junction (number of unit cells)
Property param
An instance of the structure param.
Structure param contains data structures describing the physical parameters of the scattering center ...
Definition: structures.m:45
scatter_param scatter
An instance of the structure scatter_param containing the physical parameters for the scattering regi...
Definition: structures.m:47
Property Opt
An instance of structure Opt.
Definition: Messages.m:31
function test_CreateHamiltonians()
Testfile to check functionalities of the class CreateHamiltonians.
magnetic_field
Set true if a magnetic field is involved in the calculations, false (default) otherwise.
Definition: structures.m:68
function parseInput(filename)
This function parses the input file containing the input parameters.
function structures(name)