Hamiltonian
\(H = -\mu\sum_{\mathbf{i}}c_{\mathbf{i}}^{\dagger}c_{\mathbf{i}} + t\sum_{\langle \mathbf{i}\mathbf{j}\rangle}c_{\mathbf{i}}^{\dagger}c_{\mathbf{j}}\)
Code
#include <complex>
using namespace std;
using namespace TBTK;
using namespace Visualization::MatPlotLib;
complex<double> i(0, 1);
int main(){
const unsigned int SIZE_X = 40;
const unsigned int SIZE_Y = 40;
const double t = -1;
const double mu = 0;
for(unsigned int x = 0; x < SIZE_X; x++){
for(unsigned int y = 0; y < SIZE_Y; y++){
if(x+1 < SIZE_X){
t,
{x+1, y},
{x, y}
) + HC;
}
if(y+1 < SIZE_Y){
t,
{x, y+1},
{x, y}
) + HC;
}
}
}
const double SCALE_FACTOR = 5;
const unsigned int NUM_COEFFICIENTS = 500;
const unsigned int ENERGY_RESOLUTION = 1000;
propertyExtractor.setEnergyWindow(
-SCALE_FACTOR*0.99,
SCALE_FACTOR*0.99,
ENERGY_RESOLUTION
);
Plotter plotter;
plotter.plot({_a_, SIZE_Y/2}, ldos);
plotter.save("figures/LDOS.png");
}
Output