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

Uploaded Source

Built Distributions

green_ac-0.2.4b3-cp312-cp312-manylinux_2_28_x86_64.whl (420.5 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.28+ x86-64

green_ac-0.2.4b3-cp312-cp312-macosx_14_0_arm64.whl (331.2 kB view details)

Uploaded CPython 3.12 macOS 14.0+ ARM64

green_ac-0.2.4b3-cp312-cp312-macosx_13_0_x86_64.whl (362.9 kB view details)

Uploaded CPython 3.12 macOS 13.0+ x86-64

green_ac-0.2.4b3-cp311-cp311-manylinux_2_28_x86_64.whl (420.9 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64

green_ac-0.2.4b3-cp311-cp311-macosx_14_0_arm64.whl (332.9 kB view details)

Uploaded CPython 3.11 macOS 14.0+ ARM64

green_ac-0.2.4b3-cp311-cp311-macosx_13_0_x86_64.whl (364.1 kB view details)

Uploaded CPython 3.11 macOS 13.0+ x86-64

green_ac-0.2.4b3-cp310-cp310-manylinux_2_28_x86_64.whl (419.6 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

green_ac-0.2.4b3-cp310-cp310-macosx_14_0_arm64.whl (331.5 kB view details)

Uploaded CPython 3.10 macOS 14.0+ ARM64

green_ac-0.2.4b3-cp310-cp310-macosx_13_0_x86_64.whl (362.9 kB view details)

Uploaded CPython 3.10 macOS 13.0+ x86-64

green_ac-0.2.4b3-cp39-cp39-manylinux_2_28_x86_64.whl (419.8 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

green_ac-0.2.4b3-cp39-cp39-macosx_14_0_arm64.whl (331.6 kB view details)

Uploaded CPython 3.9 macOS 14.0+ ARM64

green_ac-0.2.4b3-cp39-cp39-macosx_13_0_x86_64.whl (363.0 kB view details)

Uploaded CPython 3.9 macOS 13.0+ x86-64

green_ac-0.2.4b3-cp38-cp38-manylinux_2_28_x86_64.whl (419.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64

green_ac-0.2.4b3-cp38-cp38-macosx_14_0_arm64.whl (331.4 kB view details)

Uploaded CPython 3.8 macOS 14.0+ ARM64

green_ac-0.2.4b3-cp38-cp38-macosx_13_0_x86_64.whl (362.8 kB view details)

Uploaded CPython 3.8 macOS 13.0+ x86-64

File details

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

File metadata

  • Download URL: green_ac-0.2.4b3.tar.gz
  • Upload date:
  • Size: 135.2 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.4b3.tar.gz
Algorithm Hash digest
SHA256 c66033aff99fb5e33ff6e0524ba6fc279a5e38a1c80228ae5c7f12918d462582
MD5 530fc8883cf06ff6b9edadf062df177f
BLAKE2b-256 1a61940bb987f44aff24a9c9770447814958bc115c8af8c8b3cb31a7f61f1b78

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4b3-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 821f3fd342777bdfaf812a446c0097856112453c0a9af137766188e061224985
MD5 602d18f447c16ab9f5c9250e0cc8381b
BLAKE2b-256 90d4ddfc47f97904126ea00847d5f2513289d325e67ee63202619636e475b8b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4b3-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 8a9fa51abaf7c5f215dc5f42a981e784bc58742b1e8811f3b31824ef18bbbac8
MD5 1e4a81f2c376376c22dc985a77b3eb1b
BLAKE2b-256 5d83d4ebb19c1b653e70d41ecb8dc625b421b2d16bc73011496273e319d615e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4b3-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 8fede8eb0d72dec10fec83291c6c5064fbe6b573b25267ba236231bf29e07077
MD5 bac0b04f975e991256b295ec56fa5da4
BLAKE2b-256 21f66033d98949662fbb31158df61f3129c17b8249412cfeacaf38dea477fea6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4b3-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e5387996254253ead1db69304d8b6951ffa5a8fccdb64abe3374887ed7f9d952
MD5 31f359b6ec1e2ba83ab458e83106a144
BLAKE2b-256 7a9b3a618127ae84aa65bb93ebf4a584a324d033fe2cd863b845f4ce42b8ec65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4b3-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 92fe68d0e0ad9444637a41206c6d9293781be55321cffc80ce5941e2fb517b0e
MD5 e5f914192804e88535e83bbc8cafbe12
BLAKE2b-256 7e9c20f2e7850545c7419d636b99cd86f72a3bda1b942f3ca4aad61dc648ef89

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4b3-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 1af290f4f11ebff00fe8db3e21b7216df060b4cd908d33b83cd5b285076b2ee5
MD5 6a86690e57cc67d9896610158e8b73a1
BLAKE2b-256 30a89ee8ad812be6abe9300c71936746543bbe674bc1ca815f6f1480bcf65ab6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4b3-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4c79f5064d8954774ced65537d5558709aa5224688dd2429a1d57e903568ebeb
MD5 3b37024027b8527b66bba28f12738e34
BLAKE2b-256 1fdff73796117d5175fcd5d2052d626fc9dee3ab07d442d779f1159e14093726

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4b3-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 4d06850a4d7539ce0b651426c470d7db76c748063a5e202b6c9e85248b86552b
MD5 f3dd4b97340c532e243139f1638bd943
BLAKE2b-256 91987cf5ad0a0ed464f69cac78620582666351ca000263e7c1e2409ec646f8f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4b3-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 9c5fdfa964fdfced1125aba99d7d789f350dd58334dc1529013447184b479391
MD5 9730188b5ff24285d863e7bda0cdfa7a
BLAKE2b-256 94fbb2130be5d1524ca0001e5b43224c9404d33c29cc4d0360d0c701573b1449

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4b3-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 050cbc89f88cd02c7d6627a74368da18c55719b5d197c37c8eb55bc160465c02
MD5 9369e1ab8d0edec4221dc5a6383ea355
BLAKE2b-256 d0ba05591f10dd0632eaef3a00eb28ce1105d4951fb0c7637e9c5a85004ea178

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4b3-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 56da1821548f49f86ab71a722fa6b03bd3fd369bba2b6e176374cc6ab015f922
MD5 2b00e118031638603808110d89bd8f7b
BLAKE2b-256 db837d7ee06d7fdcaaf30b7d9c9969ecab7dc4cedc19d36e3a3221ef260c3d77

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4b3-cp39-cp39-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 0d1423d180085370c5fcaa6161b65ab3af7894fa12a74265e060ac004250f648
MD5 605573b66c99d271b3f3c0f17dc1b319
BLAKE2b-256 fa65088d72ac9db121eb2ea3d29bf038ab494bea74ee43f1fca460db73a128a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4b3-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 45945aa60a69d18a35b3d4a1455651d54d76c1d3ab1079a206be9cbc68b45995
MD5 177b0efde5e9697167afaa2c1630c946
BLAKE2b-256 a066753f8753036305c686f70f2f03b7281bf6531570904fb4dbae25036fad56

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4b3-cp38-cp38-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 8604a97c0d0e8c9bf63489f0a8e67455842fb13f9df4d2ff4fa05eb49929061a
MD5 f269e45fe863bdf2abc6eb6a042e036a
BLAKE2b-256 9330f95cca8ac0a793b49856768e9ed1dd34dd1d130514280f91f512ef9d37d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4b3-cp38-cp38-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 bf269baf20cc76da4be585bc33e74b7dfb58066f07ab0a32d8c2b5314d952b4b
MD5 71d9b5b6b9010c4dd5416b690883ce30
BLAKE2b-256 b7209f951e6cd51196f7786c792c35852e70e5f3f7514dac7c68bb61138c6304

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