Skip to main content

Analytical continuation suits for Green Software Package

Project description

GitHub license GitHub license

grids codecov

 █▀▀█ █▀▀█ █▀▀ █▀▀ █▀▀▄
 █ ▄▄ █▄▄▀ █▀▀ █▀▀ █  █
 █▄▄█ ▀ ▀▀ ▀▀▀ ▀▀▀ ▀  ▀

 █▀▀█ █▀▀█ █▀▀▄ ▀▀█▀▀  ▀  █▀▀▄ █  █ █▀▀█ ▀▀█▀▀  ▀  █▀▀█ █▀▀▄
 █    █  █ █  █   █   ▀█▀ █  █ █  █ █▄▄█   █   ▀█▀ █  █ █  █
 █▄▄█ ▀▀▀▀ ▀  ▀   ▀   ▀▀▀ ▀  ▀  ▀▀▀ ▀  ▀   ▀   ▀▀▀ ▀▀▀▀ ▀  ▀

Green/Continuation is an Analytical continuation toolkit for Green Software Package

Installation

Green/Continuation comes in two forms

  • C++ application
  • Python package

Dependencies

Green/Continuation has the following required external dependencies

  • HDF5 library version >= 1.10.2
  • Message Passing Interface >= 3.1 (for C++ application)
  • Eigen3 library >= 3.4.0
  • GNU Multiprecision library
  • pybind11 (optional to build python wrapper)

To build Green/Continuation CMake version 3.18 or above is required

Build and Install C++ application

The following example will build, test and install Green/Continuation to /path/to/weakcoupling/install/dir directory.

$ git clone https://github.com/Green-Phys/green-ac
$ cd green-ac
$ mkdir build && cd build
$ cmake -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/path/to/install/dir ..
$ make
$ make test
$ make install

Installation of Python package

We provide pre-built binaries for major Linux distributions and recent MacOS version via pip. For installation using pip simply type pip install green-ac. If pre-built binaries can not be used, package will be built from sources.

Usage

C++ application

After the Green/Continuation is built and installed, spectral function could be obtained by calling

<install dir>/bin/ac.exe  --BETA <Inverse temperature> --grid_file <grid file>    \
   --input_file <input file> --output_file <output file> --group <HDF5 group with data> \
   --e_min -5.0 --e_max 5.0 --n_omega 4000 --eta 0.01 \
   --kind Nevanlinna
  • BETA -- the inverse temperature that was used to obtain results
  • grid_file -- name of the grid file that was used to obtain results
  • input_file -- name of the file that contains imaginary time data
  • output_file -- name of the file to store results of the continuation
  • group -- name of the group that contains data and mesh datasets with imaginary time data and grid
  • e_min -- lowest frequency on the real axis
  • e_max -- largest frequency on the real axis
  • n_omega -- number of frequency points on the real axis
  • eta -- broadening parameter
  • kind -- type of continuation to be used (current version only supports Nevanlinna)

After the completetion, results will be stored in group HDF5 group in the output_file file.

Python

In addition to C++ application, Green/Continuation provides a convinient Python package that can work directly with numpy arrays. It supports two types of parallelism, using ProcessPoolExecutor from concurrent.futures and MPI parallelization using mpi4py library.

To use Green/Continuation simply import it in your script as

import green_ac

and call solve function with the following parameters:

  • Type of the continuation (currently we only provide Nevanlinna)
  • Matsubara frequency grid
  • Real frequency grid
  • Data in Matsubara frequency domain
  • Precision

Here is an example how to obtain real frequency Green's function for a simple two-pole non-interacting Green's function with precision at least 512 bits:

imgrid = (2*np.linspace(-50,49,100) + 1) * 1.j *np.pi/ 2
grid = np.linspace(-2,2,1001) + 0.01j
data = 0.5*(1/(imgrid + 0.5) + 1/(imgrid - 0.5))
data_out = green_ac.solve("Nevanlinna", imgrid, grid, data, 512)

Here we have 100 positive and negative Matsubara frequencies, define real frequency grid to have 1000 points and to be from -2 to 2 with broadening parameter 0.01, We define Green's function on Matsubara grid with poles at -0.5 and 0.5. Real frequency data will be stored in data_out array.

Acknowledgements

This work is supported by National Science Foundation under the award OCA-2310582

Project details


Download files

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

Source Distribution

green_ac-0.2.6.tar.gz (135.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

green_ac-0.2.6-cp312-cp312-manylinux_2_28_x86_64.whl (436.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

green_ac-0.2.6-cp312-cp312-macosx_14_0_arm64.whl (358.2 kB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

green_ac-0.2.6-cp311-cp311-manylinux_2_28_x86_64.whl (434.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

green_ac-0.2.6-cp311-cp311-macosx_14_0_arm64.whl (356.6 kB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

green_ac-0.2.6-cp310-cp310-manylinux_2_28_x86_64.whl (432.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

green_ac-0.2.6-cp310-cp310-macosx_14_0_arm64.whl (355.4 kB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

green_ac-0.2.6-cp39-cp39-manylinux_2_28_x86_64.whl (433.3 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

green_ac-0.2.6-cp39-cp39-macosx_14_0_arm64.whl (355.5 kB view details)

Uploaded CPython 3.9macOS 14.0+ ARM64

green_ac-0.2.6-cp38-cp38-manylinux_2_28_x86_64.whl (433.0 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ x86-64

green_ac-0.2.6-cp38-cp38-macosx_14_0_arm64.whl (355.3 kB view details)

Uploaded CPython 3.8macOS 14.0+ ARM64

File details

Details for the file green_ac-0.2.6.tar.gz.

File metadata

  • Download URL: green_ac-0.2.6.tar.gz
  • Upload date:
  • Size: 135.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for green_ac-0.2.6.tar.gz
Algorithm Hash digest
SHA256 201c76e4fbecb3f7ccde6f78427d312fca0b696ff9dedd47107c9ef663a3ac05
MD5 0ffdd091887936501881c2a3aef3a09a
BLAKE2b-256 56cdeb797a7afe5b3ec8acac9382318aab8fd49780611753b380f1606c86035a

See more details on using hashes here.

Provenance

The following attestation bundles were made for green_ac-0.2.6.tar.gz:

Publisher: build_wheels.yml on Green-Phys/green-ac

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file green_ac-0.2.6-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.6-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 128097e7e215fda6e66c4521535052edfcc2b38b53bcc2a1523c505174d0c4a6
MD5 407f2684e1d01a92218a5186699aee12
BLAKE2b-256 33539bc8e6af66de0861a46f7ab0bb613dfec3a0e65a0c24ab8abf9d21f1ac55

See more details on using hashes here.

Provenance

The following attestation bundles were made for green_ac-0.2.6-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on Green-Phys/green-ac

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file green_ac-0.2.6-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.6-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 39dfa91207c8e940e4d1e33f0d05430365a15dd2c2635d6fb098f2b70eceffaf
MD5 cbaaa01d520dfd13469145c71bb651fe
BLAKE2b-256 55a11b107aeb89c470a1cb262e7a97f1b9e51ae2c8a8767cf389d40160f86f69

See more details on using hashes here.

Provenance

The following attestation bundles were made for green_ac-0.2.6-cp312-cp312-macosx_14_0_arm64.whl:

Publisher: build_wheels.yml on Green-Phys/green-ac

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file green_ac-0.2.6-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.6-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d7468ab93e63d367ab367d5e40a2eda89c34d9bdfa9b9f2e47ba9669b94c6eb4
MD5 02d9f20d3712f5f5cebc19623b491c9f
BLAKE2b-256 c589bb98c39aaedc609db74954e12b10eaa6c50ace13c93132ea900e72ab4e7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for green_ac-0.2.6-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on Green-Phys/green-ac

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file green_ac-0.2.6-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.6-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 925f5261eed6a65bada0d669bf785b22c209c5054464df612a08dc8d009af511
MD5 e9862a73f7a5f4d2fa134ccc024c1470
BLAKE2b-256 dea907dc8e740a93f340f64567270af00f3279dfc3aba77f3c65c8c81b03d744

See more details on using hashes here.

Provenance

The following attestation bundles were made for green_ac-0.2.6-cp311-cp311-macosx_14_0_arm64.whl:

Publisher: build_wheels.yml on Green-Phys/green-ac

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file green_ac-0.2.6-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.6-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 add6ffaa6add40d888cb79b4f52affe02ab82d944c604e723e89d2bbcd6fb350
MD5 6ffaafb03224388c91f3927554755a9f
BLAKE2b-256 50581ba327478b1a3a5d5d8dabb739780a7f45187bcfed3e0d516b62260bcd84

See more details on using hashes here.

Provenance

The following attestation bundles were made for green_ac-0.2.6-cp310-cp310-manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on Green-Phys/green-ac

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file green_ac-0.2.6-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.6-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 b8c2bac9ff28b2fc88a6ae387d8c02377c7700632af0635363397e358d248e0b
MD5 b468ee0d0ab7e07776eadee6e6b129ae
BLAKE2b-256 2d9e48d38a01330b346a169160e3d3a519bccce42097c9c3719d3aad0d4ffe60

See more details on using hashes here.

Provenance

The following attestation bundles were made for green_ac-0.2.6-cp310-cp310-macosx_14_0_arm64.whl:

Publisher: build_wheels.yml on Green-Phys/green-ac

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file green_ac-0.2.6-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.6-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f6aa3d9f9239e7fd72b655163c35bdd81c15a95ed76e8b0c8d9f64a6308d8c27
MD5 d87e7bb0a3e3da336fcf376767e0e04e
BLAKE2b-256 5a038eb46b834f1cdab072a98026e60f040cc231d5f1a3a00ce9bfefcd8f2ff2

See more details on using hashes here.

Provenance

The following attestation bundles were made for green_ac-0.2.6-cp39-cp39-manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on Green-Phys/green-ac

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file green_ac-0.2.6-cp39-cp39-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.6-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 d33b6f06f985e43127a7371f40cff8630d0850f45bf65fd6e37754c27c0f56f3
MD5 5ed7783f57b2cd389e747e537d5f98c4
BLAKE2b-256 cf62458737f7a980d2565a3bf57cb9631523943515e0ad92e2e0412e5a6b4af3

See more details on using hashes here.

Provenance

The following attestation bundles were made for green_ac-0.2.6-cp39-cp39-macosx_14_0_arm64.whl:

Publisher: build_wheels.yml on Green-Phys/green-ac

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file green_ac-0.2.6-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.6-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 64090b35c3b8b8c8906840be42ba2b206e9faff269fc19ff598d85414d443c4d
MD5 fa98659082bcca000eb0e22d1fb1afba
BLAKE2b-256 065ee0ee92ff7d3d144a58d4babcef9754ad9fcd19e072ccc2b98e25086239ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for green_ac-0.2.6-cp38-cp38-manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on Green-Phys/green-ac

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file green_ac-0.2.6-cp38-cp38-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.6-cp38-cp38-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 96f5dad288d636c3a4a48b5bdfc80055a7b4b24b97cb7d7a0b916a41ccefe709
MD5 d37148a8a6dd66b4d9241ff15ea8f44b
BLAKE2b-256 739e45de9239177c245c092a748b3219766b9cad538f1a2e9aa40cf1d6263e2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for green_ac-0.2.6-cp38-cp38-macosx_14_0_arm64.whl:

Publisher: build_wheels.yml on Green-Phys/green-ac

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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