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.4b2.tar.gz (22.4 kB view details)

Uploaded Source

Built Distributions

green_ac-0.2.4b2-cp312-cp312-manylinux_2_28_x86_64.whl (420.0 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.28+ x86-64

green_ac-0.2.4b2-cp312-cp312-macosx_14_0_arm64.whl (330.7 kB view details)

Uploaded CPython 3.12 macOS 14.0+ ARM64

green_ac-0.2.4b2-cp312-cp312-macosx_13_0_x86_64.whl (362.4 kB view details)

Uploaded CPython 3.12 macOS 13.0+ x86-64

green_ac-0.2.4b2-cp311-cp311-manylinux_2_28_x86_64.whl (420.4 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64

green_ac-0.2.4b2-cp311-cp311-macosx_14_0_arm64.whl (332.4 kB view details)

Uploaded CPython 3.11 macOS 14.0+ ARM64

green_ac-0.2.4b2-cp311-cp311-macosx_13_0_x86_64.whl (363.6 kB view details)

Uploaded CPython 3.11 macOS 13.0+ x86-64

green_ac-0.2.4b2-cp310-cp310-manylinux_2_28_x86_64.whl (419.1 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

green_ac-0.2.4b2-cp310-cp310-macosx_14_0_arm64.whl (331.0 kB view details)

Uploaded CPython 3.10 macOS 14.0+ ARM64

green_ac-0.2.4b2-cp310-cp310-macosx_13_0_x86_64.whl (362.4 kB view details)

Uploaded CPython 3.10 macOS 13.0+ x86-64

green_ac-0.2.4b2-cp39-cp39-manylinux_2_28_x86_64.whl (419.3 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

green_ac-0.2.4b2-cp39-cp39-macosx_14_0_arm64.whl (331.1 kB view details)

Uploaded CPython 3.9 macOS 14.0+ ARM64

green_ac-0.2.4b2-cp39-cp39-macosx_13_0_x86_64.whl (362.5 kB view details)

Uploaded CPython 3.9 macOS 13.0+ x86-64

green_ac-0.2.4b2-cp38-cp38-manylinux_2_28_x86_64.whl (418.9 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64

green_ac-0.2.4b2-cp38-cp38-macosx_14_0_arm64.whl (330.9 kB view details)

Uploaded CPython 3.8 macOS 14.0+ ARM64

green_ac-0.2.4b2-cp38-cp38-macosx_13_0_x86_64.whl (362.3 kB view details)

Uploaded CPython 3.8 macOS 13.0+ x86-64

File details

Details for the file green_ac-0.2.4b2.tar.gz.

File metadata

  • Download URL: green_ac-0.2.4b2.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for green_ac-0.2.4b2.tar.gz
Algorithm Hash digest
SHA256 43fd283d8904d55f6ac5cd9ce58d4bcb94b9cf6b04acce5af9ebe0fcf050a01b
MD5 70e03f145811dc642af6f7eb351c1d48
BLAKE2b-256 3f8554e5402bdb271e62e56d35c74ad293fcc20624983859ffcc7c8f0ce15cd5

See more details on using hashes here.

File details

Details for the file green_ac-0.2.4b2-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.4b2-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 75b8b2c958b5b91ca07d1347bc324f1e58bfd66a9581d7f0a94a69c492cba170
MD5 4ef1ad2da3a2d4277a98d2340792fe30
BLAKE2b-256 a160ad5aed3616773b13366f5cde3b39dd3ccfe2c7673f50a6c49dfcb2f78cd8

See more details on using hashes here.

File details

Details for the file green_ac-0.2.4b2-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.4b2-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 007e4dbbab021fb093a920fa1acac7ba06f33880f68216123ed339534405b3e0
MD5 4e0d4eab662d004bed68552e3903bd9f
BLAKE2b-256 18581948f1499818dfd8d7d5bd8b22d6fde9b1c3e0cc35f32215d32ed886adec

See more details on using hashes here.

File details

Details for the file green_ac-0.2.4b2-cp312-cp312-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.4b2-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 49a55d9a22f49ddf825472547b9ee01a7ae091348e006d30e1444a7f0ac6469c
MD5 b156535e2119e71d6a9ebbc58b1d9f84
BLAKE2b-256 60819c3aa80ecdf57a7d586eda217ac5665e6765a54f978ff3c461b3b44a43e8

See more details on using hashes here.

File details

Details for the file green_ac-0.2.4b2-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.4b2-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0b32469df90817725475bfacda95b3e0c62ca4da1d9b806cbfb118dbc57207ba
MD5 0e8c1de6ce961839bfb4f0dce0784e8a
BLAKE2b-256 0b2a9440332bea97759f7d6e8ee5e914b6a3598a167b5c4cfe004f96061cbf33

See more details on using hashes here.

File details

Details for the file green_ac-0.2.4b2-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.4b2-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 9980a658135bad09cccd99df511730cf0f40cb4ae8d9126e572fbf83f3b41f4b
MD5 48ce05c053b614c960f0506a4407917b
BLAKE2b-256 89cf0365dbfb2bd2c3e9098a290cffe943871661986f7b051056863f68f905be

See more details on using hashes here.

File details

Details for the file green_ac-0.2.4b2-cp311-cp311-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.4b2-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 cca2677d4cc65e75ecb1e660b8610719e3feca742e6fcae719a0e9b2198781cf
MD5 e7eb57401bc94f9e0a4927588b5807c6
BLAKE2b-256 b65126d58ce3b3704f63516612889c2e27b7448b99f565b84450025a6145ee6b

See more details on using hashes here.

File details

Details for the file green_ac-0.2.4b2-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.4b2-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3274c276c56c8e8a53ce79ad76520bcdd6692eb4782c76f5ffde3c1a30a7fa53
MD5 045ae6035c649aa95a28730c6474920d
BLAKE2b-256 ac436e396abab641bc92cb44a41f04a4df826d40ac65259361cfdd83ceaf6d9b

See more details on using hashes here.

File details

Details for the file green_ac-0.2.4b2-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.4b2-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 64cc610efd990bacc6e5ce92fcb99b29055820338596fdc5264368cb7aff2fda
MD5 c1b2b9227c8e94b2d2dd1c1b2c90b2ff
BLAKE2b-256 32528d8015b8ec10a980bf07724e9a527d372fa1a370a26f09c10effba3a1b8b

See more details on using hashes here.

File details

Details for the file green_ac-0.2.4b2-cp310-cp310-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.4b2-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 ed2e4508d201cd97126413247b6db935ab4a39a46b5fbb84cbc03713faafe450
MD5 6359615a6ed3b05d87958d68785027cc
BLAKE2b-256 da1588175e0cdbb95ec21e1e5eec42b3f355980fe3619bfc81eb3255fe36b0df

See more details on using hashes here.

File details

Details for the file green_ac-0.2.4b2-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.4b2-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1bbf4554a571a891af3929be40e3fe56bee0eac731cb6892a72258980d56cfb3
MD5 f872ed0623d0b8ff27e8cbb88986501a
BLAKE2b-256 c81827a4ca2d9f85ca40ec0c9e4dcfb325485b2af8ea2adb7ecc9353f32bc896

See more details on using hashes here.

File details

Details for the file green_ac-0.2.4b2-cp39-cp39-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.4b2-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 0dfdeba5d32f4be1282770cada3440c2f44f92bfc59462897b24a8ef49d6db6f
MD5 f6418ddc30e889195dae4d3dcccf1732
BLAKE2b-256 fd8bebb5e9e7be126fd5d36f147db7e982ec31fd15cb22afac125c69c0013736

See more details on using hashes here.

File details

Details for the file green_ac-0.2.4b2-cp39-cp39-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.4b2-cp39-cp39-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 0d01fa48ab8fbbd0d566ededef4fa369f9c1410a429eab0ba784856ce5092ff9
MD5 9696bd34634d5fe31621d383282af73b
BLAKE2b-256 b6d7da068621202206efcc167557f2bb6f20ef36feeeca73f077b76b3a6f4fae

See more details on using hashes here.

File details

Details for the file green_ac-0.2.4b2-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.4b2-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b67cb5920bbc59f00a5fa2cd4b4a34c5b353d001bcbc2f647e9f654e935e5f9d
MD5 0cbeda71c0bd4ec4c5a2d7339974fe3c
BLAKE2b-256 6eb9f0ee4b6ddab677ce734b6deb7f320f1285fce8b2d1223220f87dd50797b0

See more details on using hashes here.

File details

Details for the file green_ac-0.2.4b2-cp38-cp38-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.4b2-cp38-cp38-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 d9776a36bc2e587bdc4ae9f18506c69b6dab5610ba152e2ac0d7b3095f35ad97
MD5 46542b763b5bda30712a1487af8414eb
BLAKE2b-256 2bbf74119d16a772a7bc6c2bda01585ccc986b706b1c773dcd75cf895f850150

See more details on using hashes here.

File details

Details for the file green_ac-0.2.4b2-cp38-cp38-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for green_ac-0.2.4b2-cp38-cp38-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 282f50911c21ff6cde0e71230faf5459515bf8b688e9abe936728ec82e5b7ce5
MD5 3046e976c27ffbf2ff7f74eda1c52306
BLAKE2b-256 4d41e85ba5ce025a2146777e982834c90c248e47fad95f7e93f6b3275851f69b

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