Eötvös Quantum Utilities  v4.9.146
Providing the Horsepowers in the Quantum Realm
SSH_Josephson.m
Go to the documentation of this file.
1 % DC Josephson current through an SSH chain including a topological band inversion - Based on EQuUs v4.7
2 % Copyright (C) 2016 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 function SSH_Josephson( filenum )
18 
19 if ~exist('filenum', 'var')
20  filenum = 1;
21 end
22 
23 
24 
25 
26 filename = mfilename('fullpath');
27 [directory, fncname] = fileparts( filename );
28 
29 outfilename = [fncname,'_',num2str( filenum )];
30 outputdir = [];
32 
33 EF = 0.06;
34 width = 1;
35 height = 30;
36 silent = 1;
37 
38 phi1 = 0;
39 phi2vec = [];
40 
41 Edb = 1113;
42 
43 inputXML1 = fullfile( directory, 'Basic_Input_SSH_Josephson_1.xml');
44 inputXML2 = fullfile( directory, 'Basic_Input_SSH_Josephson_2.xml');
45 
46 
47 Ribbons = cell(2,1);
48 combineribbons = [];
49 
50 currentvec_continuum = [];
51 currentvec_continuum_scattering = [];
52 current_surf = [];
53 currentvec_ABS = [];
54 currentvec_NBS = [];
55 DeltaPhi_vec = [];
56 currentvec_1range = [];
57 
58 
59 % combined ribbon
60 setvectors();
62 EgeszAbra();
63 
64 
65 
66 %% set vectors
68  phi_db = 40;
69  deltaPhi = pi/(phi_db+1);
70  phi2vec = 0:deltaPhi:pi;
71  %phi2vec = pi/3;
72 
73  end
74 
77 
78 
79  DeltaPhi_vec = phi2vec - phi1;
80 
81  createRibbons();
82  combineribbons = CombineRibbons('Ribbons', Ribbons );
83 
84  % continuum contribution
85  SNSJosephson_handles = SNSJosephson('ribbon', combineribbons, 'gfininvfromHamiltonian', 1);
86  if isempty(currentvec_continuum_scattering)
87 % [currentvec_continuum_scattering, current_surf] = SNSJosephson_handles.CurrentCalc_continuum( DeltaPhi_vec, 'Edb', Edb );
88 % save( [outputdir,'/',outfilename,'.mat'], 'DeltaPhi_vec', 'currentvec_continuum', 'currentvec_continuum_scattering', 'current_surf', 'currentvec_ABS', 'currentvec_NBS', 'currentvec_1range', 'width', 'height', 'EF', 'Edb');
89 % EgeszAbra();
90  end
91  if isempty(currentvec_continuum)
92  currentvec_continuum = SNSJosephson_handles.CurrentCalc_discrete( DeltaPhi_vec, 'range', 'CONT', 'Edb', Edb );
93  save( [outputdir,'/',outfilename,'.mat'], 'DeltaPhi_vec', 'currentvec_continuum', 'currentvec_continuum_scattering', 'current_surf', 'currentvec_ABS', 'currentvec_NBS', 'currentvec_1range', 'width', 'height', 'EF', 'Edb');
94  EgeszAbra();
95  end
96 
97  % contribution from Andreev bound states
98  if isempty(currentvec_ABS)
99  currentvec_ABS = SNSJosephson_handles.CurrentCalc_discrete( DeltaPhi_vec, 'range', 'ABS', 'Edb', Edb );
100  save( [outputdir,'/',outfilename,'.mat'], 'DeltaPhi_vec', 'currentvec_continuum', 'currentvec_continuum_scattering', 'current_surf', 'currentvec_ABS', 'currentvec_NBS', 'currentvec_1range', 'width', 'height', 'EF', 'Edb');
101  EgeszAbra();
102  end
103 
104  % contribution from normal bound states
105  if isempty(currentvec_NBS)
106  currentvec_NBS = SNSJosephson_handles.CurrentCalc_discrete( DeltaPhi_vec, 'range', 'NBS', 'Edb', Edb );
107  save( [outputdir,'/',outfilename,'.mat'], 'DeltaPhi_vec', 'currentvec_continuum', 'currentvec_continuum_scattering', 'current_surf', 'currentvec_ABS', 'currentvec_NBS', 'currentvec_1range', 'width', 'height', 'EF', 'Edb');
108  EgeszAbra();
109  end
110 
111  if isempty(currentvec_1range)
112  currentvec_1range = SNSJosephson_handles.CurrentCalc_discrete( DeltaPhi_vec, 'range', 'ALL', 'Edb', Edb );
113  save( [outputdir,'/',outfilename,'.mat'], 'DeltaPhi_vec', 'currentvec_continuum', 'currentvec_continuum_scattering', 'current_surf', 'currentvec_ABS', 'currentvec_NBS', 'currentvec_1range', 'width', 'height', 'EF', 'Edb');
114  end
115 
116 
117 
118 
119  end
120 
121 
122 
123 
124 %% sets the output directory
126  resultsdir = 'results';
127  resultsdir = fullfile( directory, resultsdir );
128  mkdir(resultsdir );
129  outputdir = resultsdir;
130  end
131 
132 
133 %% createRibbons
134 % Fills ribbon list
136  Ribbons{1} = Ribbon('E', 0, 'EF', EF, 'width', width, 'height', height, 'silent', silent, 'phi', [phi1, phi1+DeltaPhi_vec(1)], 'filenameIn', inputXML1, 'filenameOut', fullfile( outputdir, [outfilename,'_1.xml']) );
137  Ribbons{2} = Ribbon('E', 0, 'EF', EF, 'width', width, 'height', height, 'silent', silent, 'phi', [phi1, phi1+DeltaPhi_vec(1)], 'filenameIn', inputXML2, 'filenameOut', fullfile( outputdir, [outfilename,'_2.xml']) );
138 end
139 
140 
141 
142 
143 
144 
145 %% plotfunction
146  function EgeszAbra()
147 
148  figure1 = figure();
149 
150  fontsize = 16;
151 
152 
153 
154  Position = [0.18 0.18 0.53 0.53];
155  axes1 = axes('Parent',figure1, 'Position', Position,...
156  'Visible', 'on',...
157  'FontSize', fontsize,... 'xlim', x_lim,... 'ylim', y_lim,... 'XTick', XTick,... 'YTick', YTick,...
158  'Box', 'on',...
159  'FontName','Times New Roman');
160  hold on;
161 
162  % Create xlabel
163  xlabel('\Delta\phi/\pi','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes1);
164 
165  % Create ylabel
166  ylabel('I','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes1);
167 
168  legend_labels = [];
169 
170  if ~isempty( currentvec_continuum )
171  indexes = logical( currentvec_continuum );
172  plot(DeltaPhi_vec(indexes)/pi, currentvec_continuum(indexes), 'b-', 'Parent', axes1)
173  legend_labels{end+1} = 'CONT';
174  end
175 
176  if ~isempty( currentvec_continuum_scattering )
177  indexes = logical( currentvec_continuum_scattering );
178  plot(DeltaPhi_vec(indexes)/pi, currentvec_continuum_scattering(indexes), 'b--', 'Parent', axes1)
179  legend_labels{end+1} = 'CONT S-matrix';
180  end
181 
182  if ~isempty( currentvec_ABS )
183  indexes = ~isnan( currentvec_ABS );
184  plot(DeltaPhi_vec(indexes)/pi, currentvec_ABS(indexes), 'Linestyle', '-', 'Color', [0 0.83 0], 'Parent', axes1)
185  legend_labels{end+1} = 'Andreev bound states';
186  end
187 
188  if ~isempty( currentvec_NBS )
189  indexes = ~isnan( currentvec_NBS );
190  plot(DeltaPhi_vec(indexes)/pi, currentvec_NBS(indexes), 'r-', 'Parent', axes1)
191  legend_labels{end+1} = 'Normal bound states';
192  end
193 
194  if (~isempty( currentvec_NBS )) && (~isempty( currentvec_continuum )) && (~isempty( currentvec_NBS ))
195  total = currentvec_continuum+currentvec_ABS+currentvec_NBS;
196  indexes = ~isnan( total );
197  plot(DeltaPhi_vec(indexes)/pi, total, 'k-', 'Parent', axes1)
198  legend_labels{end+1} = 'Total current';
199  end
200 
201 
202  if ~isempty( currentvec_1range )
203  indexes = ~isnan( currentvec_1range );
204  plot(DeltaPhi_vec(indexes)/pi, currentvec_1range(indexes), 'c-', 'Parent', axes1)
205  legend_labels{end+1} = 'ALL';
206  end
207 
208 
209 
210  fig_legend = legend(axes1, legend_labels);
211  set(fig_legend, 'FontSize', fontsize, 'FontName','Times New Roman', 'Box', 'off', 'Location', 'NorthEast')
212 
213 
214  xlabel('\Delta\phi/\pi')
215  ylabel('I')
216 
217 
218  print('-depsc2', fullfile(outputdir, [outfilename,'.eps']))
219  close(figure1)
220 
221 
222 
223 
224  end
225 
226 end
227 
228 
229 
230 
A class for calculations on a ribbon of finite width for equilibrium calculations mostly in the zero ...
Definition: Ribbon.m:34
function createRibbons()
function EgeszAbra()
function setOutputDir()
function setvectors()
A class to calculate the DC Josephson current.
Definition: SNSJosephson.m:24
function currentVSDeltaPhi()
function()
function SSH_Josephson(filenum)
An object for combining multiple ribbon parts of equal width and from the same material in a two term...