Skip to content

simonkrekels/BdGTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BdGTools.jl

A Julia module for constructing and solving Bogoliubov-de Gennes (BdG) Hamiltonians on 2D tight-binding lattices. Designed for studying superconducting systems, Josephson junctions, and Yu-Shiba-Rusinov (YSR) states from magnetic impurities.

Features

  • BdG Hamiltonian construction on arbitrary n x m lattices with configurable boundary conditions
  • Self-consistent order parameter calculation via iterative diagonalization
  • Magnetic impurity models for YSR states (single-site, star-shaped, and square-shaped geometries)
  • Josephson junction analysis with current-phase relation computation
  • Complex boundary conditions support for extended Hamiltonian studies

Getting Started

Dependencies

  • Julia (tested on 1.x)
  • LinearAlgebra (stdlib)
  • ProgressLogging
  • BenchmarkTools (examples only)
  • Makie (visualization only)

Usage

include("src/BdGTools.jl")
using .BdGTools

# Define a 20x10 lattice with a Josephson junction (weak link of half-width 2)
s = Setup(20, 10, 1.0, -1.0, 0.0, 0.1, 0.0, false, true, 2)
#        n   m   t    U0   μ0   Δ0   ϵ0  pbc_x pbc_y L

# Build the BdG Hamiltonian
H = H_BdG(s.n, s.m, s.t, s.µ, s.ϵ, s.Δ, pbc_x=s.pbc_x, pbc_y=s.pbc_y)

# Run self-consistent calculation
β = 10.0  # inverse temperature
Δ_sc = get_self_consistent(s.n, s.m, s.t, s.µ, s.µ0, s.ϵ, s.Δ, s.U, s.pbc_x, s.pbc_y, β)

Running Tests

julia test/runtests.jl

Module Structure

File Description
src/BdGTools.jl Main module and Setup struct
src/lattice.jl Adjacency matrices (Ad1D, Ad2D), block_diagonal, Kronecker product
src/hamiltonian.jl H_block, T_block, H_BdG — Hamiltonian construction
src/selfconsistency.jl update_H!, calc_Δ, get_self_consistent
src/impurity.jl Magnetic impurity models and YSR Hamiltonians
src/current.jl fermi_dirac, bond current Jᵢⱼ, supercurrent calculation
src/josephson.jl Current-phase relations, phase/step profiles
src/boundaryconditions.jl Complex boundary condition extensions
src/visualization.jl matshow heatmap visualization (requires Makie)

Formalism

The Hamiltonian is built in the Nambu particle-hole basis [u↑, v↓], where each lattice site i maps to matrix indices 2i-1 (particle) and 2i (hole). On-site blocks take the form:

H_block = [ 4t + ϵ - μ      Δ     ]
          [ conj(Δ)     -4t - ϵ + μ ]

The full Hamiltonian is assembled via Kronecker products of adjacency matrices with hopping blocks, plus a block-diagonal of on-site terms.

License

All rights reserved.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages