GithubHelp home page GithubHelp logo

keldysh.jl's Introduction

Keldysh.jl

Build Status

Keldysh.jl provides a set of tools for working with non-equilibrium Keldysh Green's functions. It contains types to represent contours, grids defined on these contours, and two-time Green's functions defined on these grids. Additionally, it provides functions for generating Green's functions, performing integration on a contour and hdf5 serialization.

Credit to Andrey Antipov and Igor Krivenko for designing a first version of the abstractions implemented here.

Usage

The following code constructs a Green's function object from a spectral density and plots the Matsubara, retarded, and lesser Keldysh components.

using Keldysh, PyPlot

# first define a contour
tmax = 5.0
β = 10.0
c = FullContour(; tmax, β)

# now define a grid which represents a discretization of the contour
nt = 51
ntau = 101
grid = FullTimeGrid(c, nt, ntau)

# construct a spectral density
dos = flat_dos(; D=5.0, ν=10.0)

# construct a Green's function from a spectral density
G = FullTimeGF(dos, grid)

fig, axes = plt.subplots(nrows=2, ncols=2)
make_plot = (ax, xlabel, ylabel, t, f...) -> begin
  map(fi -> ax.plot(t, fi), f)
  ax.set_xlabel(xlabel); ax.set_ylabel(ylabel)
end

ω = range(-10.0, 10.0, length=1001)
t = realtimes(grid)
τ = imagtimes(grid)

make_plot(axes[1], L"ω", L"Γ(ω)/π", ω, dos.(ω))
make_plot(axes[2], L"τ", L"G^M(τ)", τ, G[:matsubara])
make_plot(axes[3], L"t", L"G^<(t, 0)", t, real(G[:lesser][:,1]), imag(G[:lesser][:,1]))
make_plot(axes[4], L"t", L"G^R(t, 0)", t, real(G[:retarded][:,1]), imag(G[:retarded][:,1]))

fig.tight_layout()
fig.savefig("keldysh_components.jpg", dpi=200)

This produces the following output: keldysh_components

See also anderson_nca.jl which implements a NCA solver for the anderson impurity model using Keldysh.jl.

keldysh.jl's People

Contributors

hugostrand avatar kleinhenz avatar krivenko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

keldysh.jl's Issues

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

No arithmetic operations for GF objects

Hey Joseph,

I wonder why Base.:+, Base.:- and Base.:* are defined for subtypes of AbstractStorage but not for the Green's function types.
Am I missing something? Looks like a mere omission to me.

Igor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.