Skip to main content

GitHub license GitHub license

grids codecov

Sparse grid utilities for IR and Chebyshev representations

Essential contents for a temperature-independent sparse grid

  • stats: Bose or Fermi statistics.
  • xgrid: Real space grid points in $x \in (-1, 1)$.
  • ngrid: Frequency space grid points in Matsubara indices $n$, such that $\omega_n = (2n+\zeta)\pi/\beta$.
  • wgrid: Frequency space grid points assuming $\beta=1$.
  • uxl: Transformation matrix from the basis representation l to real space grid points x.
  • ulx: Inverse of uxl.
  • u1l_pos: Basis representation for $x=+1$.
  • u1l_neg: Basis representation for $x=-1$.
  • uwl: Transformation matrix from the basis representation l to frequency space grid points w.
  • ulw: Inverse of uwl.
  • metadata: Group for representation-depend information, for example:
    • For Chebyshev: ncoeff for maximum number of coefficients.
    • For IR: lambda for dimensionless cutoff $\Lambda$, ncoeff for maximum number of coefficients.

Directory structure

  • python/sparse_grid/: python code for generating and parsing sparse grid data.
    • python/sparse_grid/ir/: IR-specific code.
    • python/sparse_grid/chebyshev/: Chebyshev-specific code.
    • python/sparse_grid/repn.py: Common module interface for representations.
    • python/generate.py: Script for generating HDF5 archives.
  • c++/: C++ interface for loading and representing sparse grid data.
    • green/grids/: Public headers.
  • data/: Pre-generated data files.
  • examples: Usage examples.

Dependencies

  • Python:
  • C++:
    • Green/h5pp: for compatibility with h5py
    • Green/ndarrays: for compatibility with numpy.ndarray
    • Green/params: for command-line parameters
    • CMake: Version 3.27 or later

Installation

C++ installation uses CMake in a straightforward manner:

mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=.
make -j 4
make install
make test  # Test the code

The Python package for green-grids can be installed using PyPI:

pip install green-grids

or simply by building from source as:

git clone https://github.com/Green-Phys/green-grids
cd green-grids
pip install .

Acknowledgements

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

Metadata

Release files for green-grids 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for green-grids 0.3.0
File Size Uploaded
green_grids-0.3.0.tar.gz 15.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for green-grids 0.3.0
File Interpreter ABI Platform
green_grids-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 32.6 kB

Release files / green_grids-0.3.0.tar.gz

Download URL green_grids-0.3.0.tar.gz
Size 15.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3fca4c1de5964f9c135f2d6179a137fbf08af79e733868df8d380e4cbaeb860d
BLAKE2b-256 checksum
How to use checksums
782ce77f8c07ee6ba7b8a40a1385dd6e4746517c1389791f93f15829d9ad754e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 14, 2026.

Transparency log

Release files / green_grids-0.3.0-py3-none-any.whl

Download URL green_grids-0.3.0-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65d6b83ee893dfc842b3705002b02f21f003dfc100cf6c9c44017e91f099bbf0
BLAKE2b-256 checksum
How to use checksums
3771f4c9421ca1e9a3a7fe48bee96a9367c288558202473741287996df2ab2cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page