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

Uploaded Source

Built Distributions

green_ac-0.2.4-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.4-cp312-cp312-macosx_14_0_arm64.whl (331.2 kB view details)

Uploaded CPython 3.12 macOS 14.0+ ARM64

green_ac-0.2.4-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.4-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.4-cp311-cp311-macosx_14_0_arm64.whl (332.9 kB view details)

Uploaded CPython 3.11 macOS 14.0+ ARM64

green_ac-0.2.4-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.4-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.4-cp310-cp310-macosx_14_0_arm64.whl (331.5 kB view details)

Uploaded CPython 3.10 macOS 14.0+ ARM64

green_ac-0.2.4-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.4-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.4-cp39-cp39-macosx_14_0_arm64.whl (331.6 kB view details)

Uploaded CPython 3.9 macOS 14.0+ ARM64

green_ac-0.2.4-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.4-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.4-cp38-cp38-macosx_14_0_arm64.whl (331.4 kB view details)

Uploaded CPython 3.8 macOS 14.0+ ARM64

green_ac-0.2.4-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.4.tar.gz.

File metadata

  • Download URL: green_ac-0.2.4.tar.gz
  • Upload date:
  • Size: 135.3 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.4.tar.gz
Algorithm Hash digest
SHA256 beb9df74cb7714bdfb42918518550774c4aa9fba04fac2e4ffb49a1da2fa29e7
MD5 4e3f4831b992198f32a82dccde7bc6bc
BLAKE2b-256 22e79a59df2f033bb2840346fb3f75ba682b30eb752437abe85ccf8d78e16d12

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 322ee911a044d2c59bf12dbd34cb0bf023dd41fec9b658b620b112451f76b231
MD5 d9694ca5aa1acc07b5e30728146ed3bd
BLAKE2b-256 bea97e0f7186982f6af69ff04b993bc73f792ac08d37dcda7fe36490494164b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 6b7688b419f12625f84674adc607590fd4650de49c12259d9eb6beda5f9e75a6
MD5 77369c8be24cbbcf855a3119ef9def85
BLAKE2b-256 2b5007c6013b9a6341285c6ac7a02fa4881731735ab555710bada9d2580dd7ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 13ca1720545be82f4419cfbd269dfadef77d4df1549490fb772eac984df4a0c5
MD5 2e378528e0179fa90dedef8b44611cf8
BLAKE2b-256 78d9df9f05b9a13eb316ee8bdf6c747e46d356cfca3fba29612238f6b34dabe0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c2553ebd176cbf82b690dec2d49222a06297d636d9323ddf4e41e61d000676f7
MD5 5d6e7dc5f8acdfb6ce79a186fecce99b
BLAKE2b-256 73c4335d69ee174f554b1dcbfee8dab733b0b7b1d9442b8fe56048d2c1dbc5e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 01ff4e54844fc40768048dd610dbc3c3844fee3820366087186de58abf196948
MD5 5f585b90b2ba7c4be5f04a082775624d
BLAKE2b-256 8f6dcc33e7cad6a49b37410ac5b03a01256eb040467ac7a7642e7d244a6238d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 05687a9c2ac1de3d4141c1fea548cfd25d63dad6ae430bb3a2476c1e452df91d
MD5 41aef41d6e59e887d8edb22151a8b60c
BLAKE2b-256 04498e39a4f368219882d3701c07f071a6b549671ea42b4caf472c7733e143d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1f335330370a9535d1d19c48feac48174d373ff785ec49daa815503c49d4de79
MD5 38f51ec48b4f384ae8872928a9dd057c
BLAKE2b-256 9de5b1f0b6cd2a252b54d4d6bd834a67728e4d9ae988082b11f0e35db7a6b438

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 12f14cea2f2c24566af5cbde445206c0185dc6f0fee76ddf5a38ef170fb2ef14
MD5 fbaf81c2d20d9721a0d16946b143454d
BLAKE2b-256 eab7a1fccaa6aa5533a024b360765b805c073c8d1cc4eeca7f83a536a93e8cfc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 d86a1b5ff5ea2181b40a85efb27d8f7ff602d00eaf5ca770b671e2e47c52f7a5
MD5 a688a194e13790cf91bcb72e7dedb985
BLAKE2b-256 2c1240f4ff7de2ac557880dd9620173d76802e994111f7934b21c30b3bf77636

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e6314fc4ac84675614c9d6961b39593c56631d74398f2e801913ea5299e3c22c
MD5 2884a581bdd9a3f9f5c2ccaa9fc98b6e
BLAKE2b-256 b223e7af85a076b58de7a529a8ae22854d2fdce8070bf92fe6d270b60b74376a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 c0b600bbbf28fa4216b9e0c5b6162f60a1e8029f4c3401c79b9a853350eb266f
MD5 0ee809e9b68982dc24875194af026cc0
BLAKE2b-256 734f054de781fb02776b0187b28e9e47bd2eb3b79be4a700cf9c32403d0a6c99

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4-cp39-cp39-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 e944c600492c794792b0d87732a772f9848fa5bd7a7301ec42a208b7cd9efcbb
MD5 99e4c24fab338fa8e0c186ad8a9846df
BLAKE2b-256 a21fc8e2ed08f481307ed16cfa1792e95e79bc7790bd8d854580f03256fe3b65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f4ab368ad96b3d0934951c6f0b533037ad0c553ec4ed94e724f9473a7919fcbc
MD5 7672955d5872e5fb1dddd98d743b43f0
BLAKE2b-256 ab3f23bcb5133505e350212cbcc066ac46cd8a8826d236bc5513f8eb5832f95c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4-cp38-cp38-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 9e18b6073ab95dd2ac64458e0228bffe4d7689c289e214233680fd0de2da4427
MD5 d1042ec846150ee62a72c77400fc7004
BLAKE2b-256 0460f5ad2166e83f6a3bd20d0753b47825d7ad09a7fc571f8eb5483c98493583

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for green_ac-0.2.4-cp38-cp38-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 0fc9696f7af91b10fbe4aed900ed524fbe62a0c8750d04a9988b00ac7e7119a3
MD5 ec32a742da77a0ca1bf8023f062c2c65
BLAKE2b-256 8ea86b7e8f44a88ea90ab2379ade991115b8c41b50141951ec3f9165ac218c54

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