Eötvös Quantum Utilities  v4.9.146
Providing the Horsepowers in the Quantum Realm
ThreeTerminalHamiltonians.m
Go to the documentation of this file.
1 % Creates Hamiltonians for Three-terminal setup - based on EQuUs v4.9
2 % Copyright (C) 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 unit_tests Unit Tests
18 %> @{
20 %> @brief Function to create custom Hamiltonians for unit tests on a Three-terminal setup.
21 %> @Available
22 %> EQuUs v4.9 or later
23 %> @}
24 %
25 %> @brief Function to create custom Hamiltonians for unit tests on a Three-terminal setup.
26 %> @param Opt An instance of structure #Opt.
27 %> @param Opt An instance of structure #param.
28 %> @param varargin Cell array of optional parameters identical to #Custom_Hamiltonians.LoadHamiltonians.
29 %> @return [1] Cell array of Hamiltonians of one slab in the leads
30 %> @return [2] Cell array of overlap integrals of one slab in the leads
31 %> @return [3] Cell array of couplings between the slabs of the leads
32 %> @return [4] Cell array of overlap integrals between the slabs of the leads
33 %> @return [5] Cell array of transverse coupling between the unit cells of the lead
34 %> @return [6] Cell array of #coordinates of the leads
35 %> @return [7] Hamiltonian of the scattering region
36 %> @return [8] Overlap integrals of the scattering region
37 %> @return [9] Transverse coupling for the scattering region
38 %> @return [10] Overlap integrals for the transverse coupling in the scattering region
39 %> @return [11] #coordinates of the scattering region
40 %> @return [12] Cell array of couplings between the scattering region and the leads
41 %> @return [13] Cell array of overlap integrals between the scattering region and the leads
42  function [H0, S0, H1, S1, H1_transverse, coordinates, Hscatter, Sscatter, Hscatter_transverse, Sscatter_transverse, coordinates_scatter, Hcoupling, Scoupling] = ThreeTerminalHamiltonians( Opt, param, varargin )
43  p = inputParser;
44  p.addParameter('q', []);
45  p.parse(varargin{:});
46 
47  q = p.Results.q;
48 
49  % setting lattice type to Squere
50  Opt.Lattice_Type = 'Square';
51  % turn of the BdG model
52  Opt.BdG = false;
53 
54  % turning off custom Hamiltonians
56 
57  % creating structures of physical parameters for the scattering region
58  param_scatter_loc = param_Square_scatter();
59  param_scatter_loc = param_scatter_loc.CopyParameters( param.scatter );
60  param.scatter = param_scatter_loc;
61 
62  % creating structures of physical parameters for the leads
63  for idx = 1:length( param.Leads )
64  param_lead_loc = param_Square_Lead();
65  param_lead_loc = param_lead_loc.CopyParameters( param.Leads{idx} );
66  param.Leads{idx} = param_lead_loc;
67  end
68 
69 
70  % Create class to crate the Hamiltonian of the scattering region
71  createH = CreateHamiltonians( Opt, param, 'q', q );
72  % Creating Hamiltonian for the scattering region
73  createH.CreateScatterH();
74  % read out Hamiltonian and coordinates
75  Hscatter = createH.Read('Hscatter');
76  Sscatter = createH.Read('Sscatter');
77  coordinates_scatter = createH.Read('coordinates');
78 
79 
80 
81  % preallocating arrays for the Hamiltonians of the leads
82  coordinates = cell(size(param.Leads));
83  H0 = cell(size(param.Leads));
84  H1 = cell(size(param.Leads));
85  S0 = cell(size(param.Leads));
86  S1 = cell(size(param.Leads));
87  H1_transverse = cell(size(param.Leads));
88  Leads = cell(size(param.Leads));
89  Hscatter_transverse = [];
90  Sscatter_transverse = [];
91 
92  % setting the width of the third lead
93  if numel(param.Leads) > 2
94  param.Leads{3}.M = param.scatter.shape.width;
95  end
96 
97  % creating Hamiltonians for the leads
98  for jdx = 1:length(param.Leads)
99 
100  % creating class to describe a given lead
101  Lead_Orientation = param.Leads{jdx}.Lead_Orientation;
102  Leads{jdx} = CreateLeadHamiltonians( Opt, param, 'Hanyadik_Lead', jdx, 'q', q, 'Lead_Orientation', Lead_Orientation);
103 
104  % creating the Hamiltonian of a given lead
105  Leads{jdx}.CreateHamiltonians();
106 
107 
108  % Read out the Hamiltonians and coordinates
109  H0{jdx} = Leads{jdx}.Read('H0');
110  H1{jdx} = Leads{jdx}.Read('H1');
111  S0{jdx} = Leads{jdx}.Read('S0');
112  S1{jdx} = Leads{jdx}.Read('S1');
113  H1_transverse{jdx} = Leads{jdx}.Read('H1_transverse');
114  coordinates{jdx} = Leads{jdx}.Read('coordinates');
115 
116  end
117 
118 
119 
120 
121  % preallocating arrays for the Hamiltonians of the interface regions
122  Hcoupling = cell(size(param.Leads));
123  Scoupling = cell(size(param.Leads));
124 
125  % creating coupling Hamiltonians
126  Hcoupling{1} = sparse( 1:param.Leads{1}.M, 1:param.Leads{1}.M, param.Leads{1}.vargamma_sc, param.Leads{1}.M, size(Hscatter,2));
127  Hcoupling{2} = sparse( 1:param.Leads{2}.M, param.scatter.shape.width-param.Leads{2}.M+1:param.scatter.shape.width, param.Leads{2}.vargamma_sc, param.Leads{2}.M, size(Hscatter,2));
128 
129  if numel(param.Leads) > 2
130  Hcoupling{3} = sparse( 1:param.Leads{3}.M, size(Hscatter,1)-param.Leads{3}.M+1:size(Hscatter,1), param.Leads{3}.vargamma_sc, param.Leads{3}.M, size(Hscatter,2));
131  end
132 
133 
134 
135 
136 
137 
138  end
function LoadHamiltonians(varargin)
Obtain the Hamiltonians from the external source.
Lattice_Type
String describing the preprogrammed lattice type. See the documentation of lattice types for details.
Definition: structures.m:80
lead_param Leads
A list of structures lead_param containing the physical parameters for the scattering region.
Definition: structures.m:49
Structure Opt contains the basic computational parameters used in EQuUs.
Definition: structures.m:60
Class to create and store Hamiltonian of the translational invariant leads.
function Hamiltonians(varargin)
Function to create the custom Hamiltonians for the 1D chain.
function ThreeTerminalHamiltonians(Opt, param, varargin)
Function to create custom Hamiltonians for unit tests on a Three-terminal setup.
A class to import custom Hamiltonians provided by other codes or created manually
custom_Hamiltonians
Set 'siesta' to import Hamiltonians from Siesta, 'custom' to use custom defined Hamiltonians.
Definition: structures.m:96
BdG
Set 1 to use the Bogoliubov de Gennes model, 0 (default) for normal systems.
Definition: structures.m:64
Class containing physical parameters of a particular lead defined on a square lattice.
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
Class containing physical parameters of a scattering center defined on a square lattice.
function structures(name)
A class to create and store Hamiltonian of the scattering region.