Catalog PyPI
PACKAGE EXPLORERView in registry

adapol

PyPI

Adaptive Pole Fitting for Quantum Many-Body Physics

bathdmftfittinghybridizationmatsubara
Versions collected1
Direct dependencies2From release 0.2.0
Last observed20 Oct, 19:04 UTC

README

Version 0.2.0 documentation

adapol: Adaptive Pole Fitting for Quantum Many-Body Physics

CI

adapol ("add-a-pole") is a Python package for constructing compact pole approximations of Matsubara functions,

$$ G(\mathrm{i}\nu_n) \approx \sum_{k=1}^{M} \frac{R_k}{\mathrm{i}\nu_n - p_k}, $$

with real poles $p_k$ and scalar or matrix-valued residues $R_k$, using the AAA rational approximation algorithm and nonlinear optimization. Given Matsubara data, or an existing pole expansion (for example, a discretized spectral density or a discrete Lehmann representation), adapol finds an accurate approximation with a specified maximum number of poles, or as few poles as possible. A typical application is hybridization fitting: constructing a compact bath representation of a given hybridization function.

Installation

pip install adapol

The only dependencies are numpy and scipy.

Usage

adapol provides three main functions:

  • approx_freq_aaa(F, Z, ...) fits frequency data F, sampled at (typically Matsubara) points Z, with a sum of simple poles, using the AAA algorithm. The number of poles is controlled by a pole budget max_n_poles and/or a AAA error tolerance aaa_tol.
  • approx_sop_fast(poles, residues, beta, ...) approximates a given sum of poles by a (hopefully) smaller one in a single AAA pass. The number of poles is again controlled by max_n_poles and/or aaa_tol, and an optional nonlinear_optimization step refines the pole locations.
  • approx_sop_tol(poles, residues, tol, beta, ...) finds the smallest sum of poles whose actual error (in $L^2(\tau)$ and $l^2(i \omega_n)$) is below the tolerance tol.

Examples

Three example notebooks demonstrate the usage of these functions in detail. We recommend reading them in the following order.

  • semicircle.ipynb — fitting data with a continuous spectrum (semicircular density): the stopping criteria, the nonlinear optimization option, and the error metric.
  • discrete.ipynb — fitting multi-orbital data with a discrete spectrum, including an experiment on how the required number of poles scales with the number of orbitals.
  • hubbarddimer.ipynb — analytic continuation benchmark for the Hubbard dimer.

Documentation

The reference documentation for the three functions also describes in detail how to use them, as well as information on the algorithms they implement. The same information is contained in the docstrings, e.g. help(adapol.approx_freq_aaa).

Citation

If you use this package in your research, please include a reference to this GitHub repository, and cite the following references:

  1. Huang, Zhen, Emanuel Gull, and Lin Lin. "Robust analytic continuation of Green's functions via projection, pole estimation, and semidefinite relaxation," Phys. Rev. B 107, 075151 (2023).
  2. Huang, Zhen, Denis Golež, Hugo U. R. Strand, and Jason Kaye. "Automated evaluation of imaginary time strong coupling diagrams by sum-of-exponentials hybridization fitting," SciPost Phys. 19 (5), 121 (2025).

License

adapol is distributed under the GNU General Public License v3.0 (see LICENSE).

Downloads & popularity

5downloads
1-day window · source-reported counts19 Oct 2026
80400
2026-07-23: 3 · observed 2026-10-20T19:07:26.6675529Z · period 2026-07-23–2026-07-232026-07-27: 2 · observed 2026-10-20T19:07:26.6675529Z · period 2026-07-27–2026-07-272026-08-01: 1 · observed 2026-10-20T19:07:26.6675529Z · period 2026-08-01–2026-08-012026-08-02: 1 · observed 2026-10-20T19:07:26.6675529Z · period 2026-08-02–2026-08-022026-08-03: 3 · observed 2026-10-20T19:07:26.6675529Z · period 2026-08-03–2026-08-032026-08-09: 1 · observed 2026-10-20T19:07:26.6675529Z · period 2026-08-09–2026-08-092026-08-11: 1 · observed 2026-10-20T19:07:26.6675529Z · period 2026-08-11–2026-08-112026-08-13: 2 · observed 2026-10-20T19:07:26.6675529Z · period 2026-08-13–2026-08-132026-08-14: 6 · observed 2026-10-20T19:07:26.6675529Z · period 2026-08-14–2026-08-142026-08-17: 2 · observed 2026-10-20T19:07:26.6675529Z · period 2026-08-17–2026-08-172026-08-20: 1 · observed 2026-10-20T19:07:26.6675529Z · period 2026-08-20–2026-08-202026-08-22: 3 · observed 2026-10-20T19:07:26.6675529Z · period 2026-08-22–2026-08-222026-08-23: 3 · observed 2026-10-20T19:07:26.6675529Z · period 2026-08-23–2026-08-232026-08-24: 7 · observed 2026-10-20T19:07:26.6675529Z · period 2026-08-24–2026-08-242026-08-28: 1 · observed 2026-10-20T19:07:26.6675529Z · period 2026-08-28–2026-08-282026-08-29: 1 · observed 2026-10-20T19:07:26.6675529Z · period 2026-08-29–2026-08-292026-08-31: 2 · observed 2026-10-20T19:07:26.6675529Z · period 2026-08-31–2026-08-312026-09-01: 1 · observed 2026-10-20T19:07:26.6675529Z · period 2026-09-01–2026-09-012026-09-07: 3 · observed 2026-10-20T19:07:26.6675529Z · period 2026-09-07–2026-09-072026-09-09: 1 · observed 2026-10-20T19:07:26.6675529Z · period 2026-09-09–2026-09-092026-09-12: 5 · observed 2026-10-20T19:07:26.6675529Z · period 2026-09-12–2026-09-122026-09-21: 80 · observed 2026-10-20T19:07:26.6675529Z · period 2026-09-21–2026-09-212026-09-22: 14 · observed 2026-10-20T19:07:26.6675529Z · period 2026-09-22–2026-09-222026-09-23: 3 · observed 2026-10-20T19:07:26.6675529Z · period 2026-09-23–2026-09-232026-09-24: 10 · observed 2026-10-20T19:07:26.6675529Z · period 2026-09-24–2026-09-242026-09-25: 3 · observed 2026-10-20T19:07:26.6675529Z · period 2026-09-25–2026-09-252026-09-26: 4 · observed 2026-10-20T19:07:26.6675529Z · period 2026-09-26–2026-09-262026-09-27: 2 · observed 2026-10-20T19:07:26.6675529Z · period 2026-09-27–2026-09-272026-09-28: 3 · observed 2026-10-20T19:07:26.6675529Z · period 2026-09-28–2026-09-282026-09-29: 6 · observed 2026-10-20T19:07:26.6675529Z · period 2026-09-29–2026-09-292026-09-30: 1 · observed 2026-10-20T19:07:26.6675529Z · period 2026-09-30–2026-09-302026-10-01: 1 · observed 2026-10-20T19:07:26.6675529Z · period 2026-10-01–2026-10-012026-10-02: 1 · observed 2026-10-20T19:07:26.6675529Z · period 2026-10-02–2026-10-022026-10-04: 2 · observed 2026-10-20T19:07:26.6675529Z · period 2026-10-04–2026-10-042026-10-05: 3 · observed 2026-10-20T19:07:26.6675529Z · period 2026-10-05–2026-10-052026-10-06: 1 · observed 2026-10-20T19:07:26.6675529Z · period 2026-10-06–2026-10-062026-10-07: 2 · observed 2026-10-20T19:07:26.6675529Z · period 2026-10-07–2026-10-072026-10-08: 4 · observed 2026-10-20T19:07:26.6675529Z · period 2026-10-08–2026-10-082026-10-09: 4 · observed 2026-10-20T19:07:26.6675529Z · period 2026-10-09–2026-10-092026-10-10: 1 · observed 2026-10-20T19:07:26.6675529Z · period 2026-10-10–2026-10-102026-10-11: 2 · observed 2026-10-20T19:07:26.6675529Z · period 2026-10-11–2026-10-112026-10-12: 4 · observed 2026-10-20T19:07:26.6675529Z · period 2026-10-12–2026-10-122026-10-13: 4 · observed 2026-10-20T19:07:26.6675529Z · period 2026-10-13–2026-10-132026-10-14: 2 · observed 2026-10-20T19:07:26.6675529Z · period 2026-10-14–2026-10-142026-10-15: 3 · observed 2026-10-20T19:07:26.6675529Z · period 2026-10-15–2026-10-152026-10-18: 1 · observed 2026-10-20T19:07:26.6675529Z · period 2026-10-18–2026-10-182026-10-19: 5 · observed 2026-10-20T19:07:26.6675529Z · period 2026-10-19–2026-10-19
23 Jul19 Oct

pypistats · 47 observations shown. Missing days are unknown. Source category: overall: without mirrors.

View observed values
Date / source periodValueObserved at
2026-10-19 – 2026-10-1952026-10-20T19:07:26.6675529Z
2026-10-18 – 2026-10-1812026-10-20T19:07:26.6675529Z
2026-10-15 – 2026-10-1532026-10-20T19:07:26.6675529Z
2026-10-14 – 2026-10-1422026-10-20T19:07:26.6675529Z
2026-10-13 – 2026-10-1342026-10-20T19:07:26.6675529Z
2026-10-12 – 2026-10-1242026-10-20T19:07:26.6675529Z
2026-10-11 – 2026-10-1122026-10-20T19:07:26.6675529Z
2026-10-10 – 2026-10-1012026-10-20T19:07:26.6675529Z
2026-10-09 – 2026-10-0942026-10-20T19:07:26.6675529Z
2026-10-08 – 2026-10-0842026-10-20T19:07:26.6675529Z
2026-10-07 – 2026-10-0722026-10-20T19:07:26.6675529Z
2026-10-06 – 2026-10-0612026-10-20T19:07:26.6675529Z
2026-10-05 – 2026-10-0532026-10-20T19:07:26.6675529Z
2026-10-04 – 2026-10-0422026-10-20T19:07:26.6675529Z
2026-10-02 – 2026-10-0212026-10-20T19:07:26.6675529Z
2026-10-01 – 2026-10-0112026-10-20T19:07:26.6675529Z
2026-09-30 – 2026-09-3012026-10-20T19:07:26.6675529Z
2026-09-29 – 2026-09-2962026-10-20T19:07:26.6675529Z
2026-09-28 – 2026-09-2832026-10-20T19:07:26.6675529Z
2026-09-27 – 2026-09-2722026-10-20T19:07:26.6675529Z
2026-09-26 – 2026-09-2642026-10-20T19:07:26.6675529Z
2026-09-25 – 2026-09-2532026-10-20T19:07:26.6675529Z
2026-09-24 – 2026-09-24102026-10-20T19:07:26.6675529Z
2026-09-23 – 2026-09-2332026-10-20T19:07:26.6675529Z
2026-09-22 – 2026-09-22142026-10-20T19:07:26.6675529Z
2026-09-21 – 2026-09-21802026-10-20T19:07:26.6675529Z
2026-09-12 – 2026-09-1252026-10-20T19:07:26.6675529Z
2026-09-09 – 2026-09-0912026-10-20T19:07:26.6675529Z
2026-09-07 – 2026-09-0732026-10-20T19:07:26.6675529Z
2026-09-01 – 2026-09-0112026-10-20T19:07:26.6675529Z
2026-08-31 – 2026-08-3122026-10-20T19:07:26.6675529Z
2026-08-29 – 2026-08-2912026-10-20T19:07:26.6675529Z
2026-08-28 – 2026-08-2812026-10-20T19:07:26.6675529Z
2026-08-24 – 2026-08-2472026-10-20T19:07:26.6675529Z
2026-08-23 – 2026-08-2332026-10-20T19:07:26.6675529Z
2026-08-22 – 2026-08-2232026-10-20T19:07:26.6675529Z
2026-08-20 – 2026-08-2012026-10-20T19:07:26.6675529Z
2026-08-17 – 2026-08-1722026-10-20T19:07:26.6675529Z
2026-08-14 – 2026-08-1462026-10-20T19:07:26.6675529Z
2026-08-13 – 2026-08-1322026-10-20T19:07:26.6675529Z
2026-08-11 – 2026-08-1112026-10-20T19:07:26.6675529Z
2026-08-09 – 2026-08-0912026-10-20T19:07:26.6675529Z
2026-08-03 – 2026-08-0332026-10-20T19:07:26.6675529Z
2026-08-02 – 2026-08-0212026-10-20T19:07:26.6675529Z
2026-08-01 – 2026-08-0112026-10-20T19:07:26.6675529Z
2026-07-27 – 2026-07-2722026-10-20T19:07:26.6675529Z
2026-07-23 – 2026-07-2332026-10-20T19:07:26.6675529Z

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.2.021 Sept 20262

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
flatironinstitute/adapol

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:04 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:20ad7c8dd19726ebc149b201712a7edc7641645b4bfe3e4b3beacb0b87e47b25