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 "TBTK/PropertyExtractor/Diagonalizer.h"
#include <complex>
using namespace std;
using namespace TBTK;
using namespace Visualization::MatPlotLib;
complex<double> i(0, 1);
int main(){
const unsigned int SIZE_X = 30;
const unsigned int SIZE_Y = 30;
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 LOWER_BOUND = -5;
const double UPPER_BOUND = 5;
const unsigned int RESOLUTION = 1000;
propertyExtractor.setEnergyWindow(
LOWER_BOUND,
UPPER_BOUND,
RESOLUTION
);
const double SMOOTHING_SIGMA = 0.1;
const unsigned int SMOOTHING_WINDOW = 101;
dos = Smooth::gaussian(dos, SMOOTHING_SIGMA, SMOOTHING_WINDOW);
Plotter plotter;
plotter.plot(dos);
plotter.save("figures/DOS.png");
= propertyExtractor.calculateWaveFunctions(
{{_a_, _a_}},
{_a_}
);
plotter.clear();
plotter.plot({_a_, _a_}, 37, waveFunctions);
plotter.save("figures/WaveFunction.png");
}
Output