Eötvös Quantum Utilities  v4.8.128
Providing the Horsepowers in the Quantum Realm
Square_Lead_Hamiltonians.m
Go to the documentation of this file.
1 %% Eotvos Quantum Transport Utilities - Square_Lead_Hamiltonians
2 % Copyright (C) 2009-2015 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 basic Basic Functionalities
18 %> @{
19 %> @file Square_Lead_Hamiltonians.m
20 %> @brief Class to create the Hamiltonian of one unit cell in a translational invariant lead made of square lattice structure, including the SSH model.
21 %> @}
22 %> @brief Class to create the Hamiltonian of one unit cell in a translational invariant lead made of square lattice structure, including the SSH model.
23 %%
25 
26 
27 methods (Static = true)
28 %% SquareLattice_Lead_Hamiltonians
29 %> @brief Creates Hamiltonians H_0 and H_1 for square lattice structure
30 %> @param lead_param An instance of structure lead_param containing the physical parameters of the ribbon
31 %> @param M Number of sites in the cross section of the lead.
32 %> @param varargin Optional parameters (https://www.mathworks.com/help/matlab/ref/varargin.html):
33 %> @param 'q' The transverse momentum. Set to empty (default) for computations without transverse momentums.
34 %> @return [1] The Hamiltonian of one slab in the ribbon.
35 %> @return [2] The coupling between the slabs.
36 %> @return [3] The transverse coupling between the slabs for transverse calculations.
37 %> @return [4] A structure #coordinates containing the coordinates of the sites.
38  function [H0, H1, H1_transverse, coordinates] = SquareLattice_Lead_Hamiltonians( lead_param, M, varargin)
39 
40  if isempty(M)
41  error(['EQuUs:', class(obj), ':SquareLattice_Lead_Hamiltonians'], 'The input parameter M is empty')
42  end
43 
44  p = inputParser;
45  p.addParameter('q', []);
46 
47  p.parse(varargin{:});
48  q = p.Results.q;
49 
50  epsilon = lead_param.epsilon;
51  vargamma = lead_param.vargamma;
52 
53  H0 = sparse(1:M,1:M,epsilon,M,M) - sparse(1:M-1,2:M,vargamma,M,M) - sparse(2:M,1:M-1,vargamma,M,M);
54  H1 = sparse(1:M,1:M,-vargamma,M,M);
55 
56  coordinates = structures('coordinates');
57  coordinates.x = transpose(1:M);
58  coordinates.y = zeros(M,1);
59  coordinates.a = [0; 1];
60 
61  if M == 1
62  H0 = full(H0);
63  H1 = full(H1);
64  end
65 
66  if isempty(q)
67  H1_transverse = [];
68  return
69  end
70 
71  coordinates.b = [M,0];
72  H1_transverse = sparse(M,1,-vargamma,M,M);
73 
74 
75  end
76 
77 %% SSH_Lead_Hamiltonians
78 %> @brief Creates Hamiltonians H_0 and H_1 of the SSH model.
79 %> @param lead_param An instance of structure lead_param containing the physical parameters of the ribbon
80 %> @param varargin Optional parameters (https://www.mathworks.com/help/matlab/ref/varargin.html):
81 %> @param 'q' The transverse momentum. Set to empty (default) for computations without transverse momentums.
82 %> @return [1] The Hamiltonian of one slab in the ribbon.
83 %> @return [2] The coupling between the slabs.
84 %> @return [3] The transverse coupling between the slabs for transverse calculations.
85 %> @return [4] A structure #coordinates containing the coordinates of the sites.
86  function [H0, H1, H1_transverse, coordinates] = SSH_Lead_Hamiltonians(lead_param, varargin)
87 
88  p = inputParser;
89  p.addParameter('q', []);
90 
91  p.parse(varargin{:});
92  q = p.Results.q;
93 
94  epsilon = lead_param.epsilon;
95  vargamma1 = lead_param.vargamma1;
96  vargamma3 = lead_param.vargamma3;
97  deltaAB = lead_param.deltaAB;
98  if isempty( deltaAB )
99  deltaAB = 0;
100  end
101 
102  H0 = zeros(2,2);
103  H1 = zeros(2);
104 
105  H0(1,2) = -vargamma1;
106  H0(2,1) = -vargamma1;
107  H0(1,1) = deltaAB/2 + epsilon;
108  H0(2,2) = -deltaAB/2 + epsilon;
109 
110  H1(2,1) = -vargamma3;
111 
112  H1_transverse = [];
113 
114  coordinates = structures('coordinates');
115  coordinates.x = transpose(1:2);
116  coordinates.y = zeros(2,1);
117  coordinates.a = [0; 1];
118 
119  if ~isempty(q)
120  error('Transverse computations are not allowed in the SSH model')
121  end
122 
123 
124  end
125 
126 %% Lieb_Lead_Hamiltonians
127 %> @brief Creates Hamiltonians H_0 and H_1 for Lieb lattice structure
128 %> @param lead_param An instance of structure lead_param containing the physical parameters of the ribbon
129 %> @param M Number of sites in the cross section of the lead.
130 %> @param varargin Optional parameters (https://www.mathworks.com/help/matlab/ref/varargin.html):
131 %> @param 'q' The transverse momentum. Set to empty (default) for computations without transverse momentums.
132 %> @return [1] The Hamiltonian of one slab in the ribbon.
133 %> @return [2] The coupling between the slabs.
134 %> @return [3] The transverse coupling between the slabs for transverse calculations.
135 %> @return [4] A structure #coordinates containing the coordinates of the sites.
136  function [H0, H1, H1_transverse, coordinates] = Lieb_Lead_Hamiltonians( lead_param, M, varargin)
137 
138  if isempty(M)
139  error(['EQuUs:', class(obj), ':Lieb_Lead_Hamiltonians'], 'The input parameter M is empty')
140  end
141 
142  p = inputParser;
143  p.addParameter('q', []);
144 
145  p.parse(varargin{:});
146  q = p.Results.q;
147 
148  epsilon = lead_param.epsilon;
149  vargamma = lead_param.vargamma;
150  N = 3*M;
151 
152 
153  h00=toeplitz([epsilon,-vargamma,0]);
154  h01=-vargamma*[0 0 0; 0 0 0; 0 1 0];
155  h1=-vargamma*[0 1 0; 0 0 0; 0 0 0];
156 
157  if isempty(q)
158  H1_transverse = [];
159  H0=sparse([],[],[], N+2,N+2);
160  H1=sparse([],[],[], N+2,N+2);
161 
162  for l=1:3;
163  for m=1:3;
164  H0 = H0 + sparse(l:3:N,m:3:N,h00(l,m),N+2,N+2) + sparse(l:3:N-3,m+3:3:N,h01(l,m),N+2,N+2) + sparse(l+3:3:N,m:3:N-3,h01(m,l),N+2,N+2);
165  H1 = H1 + sparse(l:3:N,m:3:N,h1(l,m),N+2,N+2);
166  end
167  end
168  H0(N+1:N+2,N+1:N+2)=[epsilon, -vargamma; -vargamma, epsilon];
169  H0(N,N+2)=-vargamma;
170  H0(N+2,N)=-vargamma;
171  H1(N+1,N+2)=-vargamma;
172 
173  coordinates = structures('coordinates');
174  coordinates.x = zeros(N+2,1);
175  coordinates.x(1:3:N+2) = transpose(1:M+1);
176  coordinates.x(2:3:N+2) = transpose(1:M+1);
177  coordinates.x(3:3:N) = transpose(1:M)+0.5;
178  coordinates.y = zeros(N+2,1);
179  coordinates.y(1:3:N+2) = 0.5;
180  coordinates.a = [0; 1];
181 
182  return
183  end
184 
185  H0=sparse([],[],[], N,N);
186  H1=sparse([],[],[], N,N);
187 
188  for l=1:3;
189  for m=1:3;
190  H0 = H0 + sparse(l:3:N,m:3:N,h00(l,m),N,N) + sparse(l:3:N-3,m+3:3:N,h01(l,m),N,N) + sparse(l+3:3:N,m:3:N-3,h01(m,l),N,N);
191  H1 = H1 + sparse(l:3:N,m:3:N,h1(l,m),N,N);
192  end
193  end
194 
195  coordinates = structures('coordinates');
196  coordinates.x = zeros(N,1);
197  coordinates.x(1:3:N) = transpose(1:M);
198  coordinates.x(2:3:N) = transpose(1:M);
199  coordinates.x(3:3:N) = transpose(1:M)+0.5;
200  coordinates.y = zeros(N,1);
201  coordinates.y(1:3:N) = 0.5;
202  coordinates.a = [0; 1];
203 
204  if M == 1
205  H0 = full(H0);
206  H1 = full(H1);
207  end
208 
209  H1_transverse = sparse([],[],[], N,N);
210  for l=1:3;
211  for m=1:3;
212  H1_transverse = H1_transverse + sparse(3*M-3+l,m,h01(l,m),3*M,3*M);
213  end
214  end
215  coordinates.b = [M,0];
216 
217  end
218 
219 end % methods static
220 
221 
222 end
vargamma3
A physical parameter, see the individual lattice documentations for details.
Definition: structures.m:103
Class to create the Hamiltonian of one unit cell in a translational invariant lead made of square lat...
function Transport(Energy, B)
creating the Ribbon class representing the twoterminal setup
function Hamiltonians(varargin)
Function to create the custom Hamiltonians for the 1D chain.
Structure containing the physical parameters describing a given lead.
Definition: structures.m:85
vargamma
A physical parameter, see the individual lattice documentations for details.
Definition: structures.m:89
Structure param contains data structures describing the physical parameters of the scattering center ...
Definition: structures.m:45
vargamma1
A physical parameter, see the individual lattice documentations for details.
Definition: structures.m:99
Structure sites contains data to identify the individual sites in a matrix.
Definition: structures.m:247
epsilon
A physical parameter, see the individual lattice documentations for details.
Definition: structures.m:87
deltaAB
A physical parameter, see the individual lattice documentations for details.
Definition: structures.m:93
function structures(name)