Skip to content
Merged

Docs #59

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* Added references and examples to the docstrings. Slight modification to the docstring format [(#47)](https://github.com/polyquantique/haarpy/pull/47).
* `get_conjugacy_class()` has been sped up [(#51)](https://github.com/polyquantique/haarpy/pull/51).
* `weingarten_...()` and `haar_integral_...()` have been sped up by building logic to simplify rational functions in `utils._simplify` [(#53)](https://github.com/polyquantique/haarpy/pull/53).
* Added documentation [(#59)](https://github.com/polyquantique/haarpy/pull/59).

### Bug fixes

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'

- name: Install dependencies
shell: bash
Expand Down
21 changes: 21 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-24.04
tools:
python: "3.12"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Set the requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ pip install haarpy

## Compiling from source
Haarpy has the following dependencies:
* [Python](https://www.python.org/) >= 3.9
* [Python](https://www.python.org/) >= 3.10
* [SymPy](https://www.sympy.org) >= 1.14


Expand Down
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
8 changes: 8 additions & 0 deletions docs/code/circular_ensembles.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Circular ensembles
==================

This module provides tools for computations of integrals of polynomials on the circular ensembles.

.. automodule:: haarpy.circular_ensembles
:members:
:member-order: bysource
8 changes: 8 additions & 0 deletions docs/code/orthogonal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Orthogonal group
================

This module provides tools for computations of integrals of polynomials on the orthogonal group.

.. automodule:: haarpy.orthogonal
:members:
:member-order: bysource
8 changes: 8 additions & 0 deletions docs/code/partition.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Partition
=========

Description

.. automodule:: haarpy.partition
:members:
:member-order: bysource
8 changes: 8 additions & 0 deletions docs/code/permutation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Permutation matrices
====================

This module provides tools for computations of integrals of Haar random permutation matrices.

.. automodule:: haarpy.permutation
:members:
:member-order: bysource
8 changes: 8 additions & 0 deletions docs/code/quantum.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Quantum groups
==============

This module provides tools for computations of integrals of polynomials on the quantum groups.

.. automodule:: haarpy.quantum
:members:
:member-order: bysource
8 changes: 8 additions & 0 deletions docs/code/symmetric.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Symmetric group
===============

This module provides tools to work with the symmetric group in the context of Weingarten calculus.

.. automodule:: haarpy.symmetric
:members:
:member-order: bysource
8 changes: 8 additions & 0 deletions docs/code/symplectic.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Symplectic group
================

This module provides tools for computations of integrals of polynomials on the symplectic group.

.. automodule:: haarpy.symplectic
:members:
:member-order: bysource
8 changes: 8 additions & 0 deletions docs/code/unitary.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Unitary group
=============

This module provides tools for computations of integrals of polynomials on the unitary group.

.. automodule:: haarpy.unitary
:members:
:member-order: bysource
45 changes: 45 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import sys, os
import haarpy

sys.path.insert(0, os.path.abspath(".."))

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'Haarpy'
copyright = '2026, Yanic Cardin, Hubert de Guise, Nicolás Quesada'
author = 'Yanic Cardin, Hubert de Guise, Nicolás Quesada'
release = haarpy.version()

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
"sphinx.ext.autosummary",
"sphinx_autodoc_typehints",
"myst_parser",
"nbsphinx",
"sphinx_copybutton",
]

bibtex_bibfiles = ["references.bib"]

autosummary_generate = True

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'pydata_sphinx_theme'
html_static_path = ['_static']
40 changes: 40 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.. Haarpy documentation master file, created by
sphinx-quickstart on Tue Jun 2 16:04:12 2026.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Haarpy Documentation
====================

A Python library for Weingarten calculus and integration of groups and ensembles equipped with the Haar measure.

.. toctree::
:maxdepth: 1
:caption: Getting started

tutorials/installation
tutorials/guide.ipynb

..
toctree::
:maxdepth: 1
:caption: Background on Weingarten calculus

.. theory/weingarten
theory/compact
theory/circular
theorry/quantum
theory/permutation

.. toctree::
:maxdepth: 1
:caption: Haarpy API

code/symmetric
code/partition
code/permutation
code/unitary
code/orthogonal
code/symplectic
code/circular_ensembles
code/quantum
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
Empty file added docs/references.bib
Empty file.
11 changes: 11 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
docutils
sphinx
sphinx_copybutton
nbsphinx
pydata-sphinx-theme
myst-parser
sphinx-autodoc-typehints
sphinx-copybutton
sphinx-autobuild
sympy>=1.14
ipykernel
5 changes: 5 additions & 0 deletions docs/theory/unitary.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The Unitary group
=================

.. math::
\text{Wg}^U = \sum\delta,
Loading
Loading