Skip to main content

intermediate representation (IR) basis for electronic propagator

Project description

irbasis3 - A library for the intermediate representation of propagators

This library provides routines for constructing and working with the intermediate representation of correlation functions. It provides:

  • on-the-fly computation of basis functions for arbitrary cutoff Λ
  • basis functions and singular values are accurate to full precision
  • routines for sparse sampling

Installation

pip install irbasis3 xprec

Though not strictly required, we strongly recommend installing the xprec package alongside irbasis3 as it allows to compute the IR basis functions with greater accuracy.

Quick start

Here is some python code illustrating the API:

# Compute IR basis for fermions and β = 10, W <= 4.2
import irbasis3, numpy
K = irbasis3.KernelFFlat(lambda_=42)
basis = irbasis3.FiniteTempBasis(K, statistics='F', beta=10)

# Assume spectrum is a single pole at ω = 2.5, compute G(iw)
# on the first few Matsubara frequencies. (Fermionic/bosonic Matsubara
# frequencies are denoted by odd/even integers.)
gl = basis.s * basis.v(2.5)
giw = gl @ basis.uhat([1, 3, 5, 7])

# Reconstruct same coefficients from sparse sampling on the Matsubara axis:
smpl_iw = irbasis3.MatsubaraSampling(basis)
giw = -1/(1j * numpy.pi/basis.beta * smpl_iw.wn - 2.5)
gl_rec = smpl_iw.fit(giw)

You may want to start with reading up on the intermediate representation. It is tied to the analytic continuation of bosonic/fermionic spectral functions from (real) frequencies to imaginary time, a transformation mediated by a kernel K. The kernel depends on a cutoff, which you should choose to be lambda_ >= β*W, where β is the inverse temperature and W is the bandwidth:

One can now perform a singular value expansion on this kernel, which generates two sets of orthonormal basis functions, one set v[l](w) for real frequency side w, and one set u[l](tau) for the same obejct in imaginary (Euclidean) time tau, together with a "coupling" strength s[l] between the two sides.

By this construction, the imaginary time basis can be shown to be optimal in terms of compactness.

License

This software is released under the MIT License. See LICENSE.txt.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

irbasis3-3.0a8-py3-none-any.whl (32.9 kB view details)

Uploaded Python 3

File details

Details for the file irbasis3-3.0a8-py3-none-any.whl.

File metadata

  • Download URL: irbasis3-3.0a8-py3-none-any.whl
  • Upload date:
  • Size: 32.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for irbasis3-3.0a8-py3-none-any.whl
Algorithm Hash digest
SHA256 c4f257b6a05d80ed937d498e29b04d0df168e53fb0c5bb211dc4ca7f269f4f4d
MD5 b3be2308aa22a6e2ba4b88abc1d97b50
BLAKE2b-256 580dc238fc0bb23a6c6711d8c09d12abfaf7fcca51198d81afa694dfdcedd3aa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page