Skip to content

Releases

h4lat 0.3.0

Choose a tag to compare

@Tag-E Tag-E released this 02 Nov 14:36

Documentation wiki, the operators of two more papers, faster loading of the bundled data, and bug fixes.

Install or upgrade with pip install -U h4lat.

Added

  • get_paper_operators: the operators of Dolgov et al. (LHPC and SESAM, 2002), "LHPC:2002xzk", and of Göckeler et al. (1996), "Gockeler:1995wg". The axial operators of Göckeler et al. (1996) use the polarisation projector gamma_pol_index=1, which polarises the nucleon in the 2-direction as in the paper.
  • Wiki with the documentation: a user guide, and the theory behind the library (the group H(4), the Clebsch-Gordan coefficients from Sakata's formula, the operators, their kinematic factor, C-parity and mixing). Its pages are in wiki/ and are published by a GitHub Actions workflow.

Changed

  • The README is a short overview, with links to the wiki, which now holds the detailed usage and the notes on past changes of results ("Until October 2026 …"). PyPI lists the wiki as the documentation.
  • cg_calc reads the H(4) matrices (cg_calc.h4_mat) only when it computes new CG coefficients, and then once per session and folder: loading a product from a database no longer reads 7680 files (0.15 s → under 1 ms). The arrays in h4_mat are shared between instances and read-only.

Fixed

  • Operator_from_file reads Windows paths whose folder names contain _, and also accepts a Path.
  • Operator.save refuses operators without id, irrep, block or index_block (those built with + or -) with a ValueError pointing to operator_list_to_h5. It used to raise a TypeError, or to write a file that Operator_from_file could not read.
  • operator_show(show=True) (the default) and h4lat-catalogue --open open the PDF on macOS and Windows too, not only with xdg-open. If no viewer can be started, a warning replaces the error, and the PDF is kept, even with remove_pdf=True.
  • The docstring of Kfactor_from_diracO gave the denominator of K with an extra factor 1/(2E), and said that K = 1 for the scalar operator. The computed K is unchanged: K = 1 for ψ̄γ₄ψ (and m_N/E for ψ̄ψ).

Full changelog: v0.2.0...v0.3.0

h4lat 0.2.0

Choose a tag to compare

@Tag-E Tag-E released this 23 Oct 14:18

First public release of h4lat, a Python library for the hypercubic group H(4), the symmetry group of a four-dimensional hypercubic lattice. It provides Clebsch-Gordan coefficients of H(4) and H(4)-irreducible lattice operators ψ̄ Γ D⋯D ψ for moments of parton distribution functions, with their kinematic factors, C-parity, trace condition and index symmetry.

Installation

pip install h4lat            # core: numpy, sympy, tqdm
pip install "h4lat[full]"    # all optional features (HDF5, PDF catalogue, numba, …)

h4lat needs Python ≥ 3.11. The README and the example notebooks show how to use it.

Highlights

  • A bundled database of 1360 operators: every Dirac structure (S, P, V, A, T) with zero to three derivatives, loaded in about a second with get_OperatorList() / get_OperatorDict() and selectable by Dirac structure and number of derivatives.
  • Every bundled operator has a definite C-parity, and kinematic factors are computed in exact arithmetic.
  • get_paper_operators: the operators used in published lattice works (Göckeler et al. 2005, Bürger et al. 2022, Rodekamp et al. 2024, Taggi et al. 2026, Alexandrou et al. 2026), selected by INSPIRE texkey or DOI.
  • cg_calc computes the CG coefficients of new tensor products with Sakata's projection formula, numerically and optionally in parallel: (6,1) ⊗ (4,1)³ takes about a minute.
  • The h4lat-catalogue command writes a PDF catalogue of the operators with their kinematic factors.
  • The PDF catalogue attached to this release lists all 1360 operators with their kinematic factors, for those without a LaTeX installation.
  • HDF5 input and output of operators, and a selectable polarisation matrix for the kinematic factors.

If you used h4lat from GitHub before this release

Some changes alter results or code:

  • Operator IDs are now ordered by number of derivatives, then S, P, V, A, T. The README has the table that maps old IDs to new ones.
  • When an irrep appears more than once in a tensor product, its copies are chosen with definite C-parity, so operators in such irreps can refer to different copies than before.
  • The H(4) generators were corrected (all 20 irreps are now representations), and the bundled data were regenerated.
  • make_operator_database and CGmat_from_block have new signatures.

The full list is in CHANGELOG.md.

How to cite

If you use h4lat in your research, please cite this version: use the "Cite this repository" button on the repository page or the Zenodo DOI of this release.