Skip to content
Merged
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
127 changes: 2 additions & 125 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,134 +1,11 @@
stages:
- test
- build_doc
- publish

default:
tags: [k8s]


pages:
image: git.physik.uni-wuerzburg.de:25812/alf/alf_docker/pyalf-doc/jupyter
image: git.physik.uni-wuerzburg.de:25812/z03/pdi/debian:bookworm-buildd
stage: build_doc
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
tags:
- k8s
script:
- git config --global --add safe.directory $PWD
- git checkout $CI_COMMIT_BRANCH
- pip install --editable .
- (cd doc && make)
- mkdir public
- mv doc/_build/html/* public
- echo '<meta http-equiv="refresh" content="0; URL=https://alf.physik.uni-wuerzburg.de/pyalf-doc" />' > public/index.html
artifacts:
paths:
- public


check_docstrings:
stage: test
allow_failure: true
image: python:alpine
rules:
- changes:
- py_alf
- .gitlab-ci.yml
script:
- pip install ruff
- ruff check --select D


build_test:
stage: publish
image: ghcr.io/astral-sh/uv:alpine
rules:
- if: '$CI_COMMIT_BRANCH != "master"'
script:
- apk add git
- uv build


build:
stage: publish
image: ghcr.io/astral-sh/uv:alpine
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
script:
- apk add git
- uv build
- uv publish --username $TWINE_USERNAME --password $TWINE_PASSWORD


test:
stage: test
image: git.physik.uni-wuerzburg.de:25812/alf/alf_docker/pyalf-requirements/$IMAGE_MINOR
rules:
- changes:
- py_alf
- tests
- .gitlab-ci.yml
parallel:
matrix:
- MACHINE: GNU
IMAGE_MINOR: [bullseye, bookworm, trixie, tumbleweed]
script:
- pip install pylint ruff pytest
- pylint -E py_alf/
- ruff check --exclude doc
- pip install .
- pytest
- alf_run --machine $MACHINE --sims_file py_alf/cli/Sims


exec_notebook:
stage: test
image: git.physik.uni-wuerzburg.de:25812/alf/alf_docker/pyalf-requirements/$IMAGE_MINOR
rules:
- changes:
- Notebooks/*
parallel:
matrix:
- MACHINE: GNU
IMAGE_MINOR: [bullseye, bookworm, trixie, tumbleweed]
NOTEBOOK:
- parallel_tempering.ipynb
- projective_algorithm.ipynb
- pyALF_new_features.ipynb
- testing_against_ED.ipynb
- trotter_error.ipynb
- tV_model.ipynb
script:
- pip install jupyter nbconvert .
- cd Notebooks/
- jupyter-nbconvert --execute --inplace $NOTEBOOK


warn_pylint:
stage: test
image: git.physik.uni-wuerzburg.de:25812/alf/alf_docker/pyalf-requirements/$IMAGE_MINOR
rules:
- changes:
- py_alf
- .gitlab-ci.yml
parallel:
matrix:
- IMAGE_MINOR: [bullseye, bookworm, trixie, tumbleweed]
allow_failure: true
script:
- pip install pylint
- pylint py_alf/

warn_ruff:
stage: test
image: git.physik.uni-wuerzburg.de:25812/alf/alf_docker/pyalf-requirements/$IMAGE_MINOR
rules:
- changes:
- py_alf
- .gitlab-ci.yml
parallel:
matrix:
- IMAGE_MINOR: [bullseye, bookworm, trixie, tumbleweed]
script:
- pip install ruff
- ruff check --exclude doc
4 changes: 2 additions & 2 deletions Notebooks/minimal_ALF_run.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In this bare-bones example we use the [pyALF](https://git.physik.uni-wuerzburg.de/ALF/pyALF/-/tree/master/) interface to run the canonical Hubbard model on a default configuration: a $6\\times6$ square grid, with interaction strength $U=4$ and inverse temperature $\\beta = 5$. \n",
"In this bare-bones example we use the [pyALF](https://github.com/ALF-QMC/pyALF) interface to run the canonical Hubbard model on a default configuration: a $6\\times6$ square grid, with interaction strength $U=4$ and inverse temperature $\\beta = 5$. \n",
"\n",
"Bellow we go through the steps for performing the simulation and outputting observables.\n",
"\n",
Expand All @@ -33,7 +33,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"**2.** Create an instance of `ALF_source`, downloading the ALF source code from the [ALF repository](https://git.physik.uni-wuerzburg.de/ALF/ALF/-/tree/master/), if `alf_dir` does not exist. Gets alf_dir from environment variable `$ALF_DIR`, or defaults to \"./ALF\", if not present:"
"**2.** Create an instance of `ALF_source`, downloading the ALF source code from the [ALF repository](https://github.com/ALF-QMC/ALF/-/tree/master/), if `alf_dir` does not exist. Gets alf_dir from environment variable `$ALF_DIR`, or defaults to \"./ALF\", if not present:"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion Notebooks/parallel_tempering.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"ALF is compiled from source, which is downloaded from the [ALF repository](https://git.physik.uni-wuerzburg.de/ALF/ALF) when not found locally."
"ALF is compiled from source, which is downloaded from the [ALF repository](https://github.com/ALF-QMC/ALF) when not found locally."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions Notebooks/projective_algorithm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In this example we use the [pyALF](https://git.physik.uni-wuerzburg.de/ALF/pyALF/-/tree/master/) interface to run ALF's projective algorithm with the Mz choice of Hubbard Stratonovich transformation on a 4-site ring.\n",
"In this example we use the [pyALF](https://github.com/ALF-QMC/pyALF) interface to run ALF's projective algorithm with the Mz choice of Hubbard Stratonovich transformation on a 4-site ring.\n",
"\n",
"The projective approach is the method of choice if one is interested in ground-state properties. The starting point is a pair of trial wave functions, $|\\Psi_{T,L/R} \\rangle$, that are not orthogonal to the ground state $|\\Psi_0 \\rangle$:\n",
"$$\n",
Expand All @@ -23,7 +23,7 @@
"\t \\frac{ \\langle \\Psi_{T,L} | e^{-\\theta \\hat{H}} e^{-(\\beta - \\tau)\\hat{H} }\\hat{O} e^{- \\tau \\hat{H} } e^{-\\theta \\hat{H}} | \\Psi_{T,R} \\rangle } \n",
"\t { \\langle \\Psi_{T,L} | e^{-(2 \\theta + \\beta) \\hat{H} } | \\Psi_{T,R} \\rangle } ,\n",
"$$\n",
"where $\\beta$ defines the imaginary time range where observables (time displaced and equal time) are measured and $\\tau$ varies from $0$ to $\\beta$ in the calculation of time-displace observables. For further details, see Sec. 3 of [ALF documentation](https://git.physik.uni-wuerzburg.de/ALF/ALF/-/blob/master/Documentation/doc.pdf).\n",
"where $\\beta$ defines the imaginary time range where observables (time displaced and equal time) are measured and $\\tau$ varies from $0$ to $\\beta$ in the calculation of time-displace observables. For further details, see Sec. 3 of [ALF documentation](https://alf.physik.uni-wuerzburg.de/doc.pdf).\n",
"\n",
"---\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion Notebooks/pyALF_new_features.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"**3.** Compile ALF, downloading it first from the [ALF repository](https://git.physik.uni-wuerzburg.de/ALF/ALF/-/tree/master/) if not found locally. This may take a few minutes:"
"**3.** Compile ALF, downloading it first from the [ALF repository](https://github.com/ALF-QMC/ALF/-/tree/master/) if not found locally. This may take a few minutes:"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions Notebooks/tV_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In this example we use the [pyALF](https://git.physik.uni-wuerzburg.de/ALF/pyALF/-/tree/master/) interface to run the one dimensional t-V model of spinless fermions, given by:\n",
"In this example we use the [pyALF](https://github.com/ALF-QMC/pyALF) interface to run the one dimensional t-V model of spinless fermions, given by:\n",
"$$\n",
"\\hat{H} = -t \\sum_{i} \\left( \\hat{c}^{\\dagger}_{i} \\hat{c}^{\\phantom\\dagger}_{i+a} + \\hat{c}^{\\dagger}_{i+a} \\hat{c}^{\\phantom\\dagger}_{i} \\right) - V \\sum_{i} \\left( \\hat{c}^{\\dagger}_{i} \\hat{c}^{\\phantom\\dagger}_{i+a} + \\hat{c}^{\\dagger}_{i+a} \\hat{c}^{\\phantom\\dagger}_{i} \\right)^2.\n",
"$$\n",
Expand Down Expand Up @@ -67,7 +67,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"**3.** Compile ALF, downloading it first from the [ALF repository](https://git.physik.uni-wuerzburg.de/ALF/ALF/-/tree/master/) if not found locally. This may take a few minutes:"
"**3.** Compile ALF, downloading it first from the [ALF repository](https://github.com/ALF-QMC/ALF/-/tree/master/) if not found locally. This may take a few minutes:"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion Notebooks/testing_against_ED.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In this example we use the [pyALF](https://git.physik.uni-wuerzburg.de/ALF/pyALF/-/tree/master/) interface to run ALF with the Mz choice of Hubbard Stratonovitch transformation on a four site ring, at $U/t=4$ and inverse temperature $\\beta t = 2$. For this set of parameters, the exact internal energy reads: \n",
"In this example we use the [pyALF](https://github.com/ALF-QMC/pyALF) interface to run ALF with the Mz choice of Hubbard Stratonovitch transformation on a four site ring, at $U/t=4$ and inverse temperature $\\beta t = 2$. For this set of parameters, the exact internal energy reads: \n",
"$$\n",
" \\left\\langle -t \\sum_{\\langle i,j\\rangle, \\sigma} \\hat{c}_{i,\\sigma}^{\\dagger} \\hat{c}_{j,\\sigma}^{\\phantom\\dagger} + U \\sum_{i=1}^{N} \\hat{n}_{i,\\uparrow}\\hat{n}_{j,\\downarrow} \\right\\rangle = -1.47261997 t \n",
"$$\n",
Expand Down
11 changes: 8 additions & 3 deletions Notebooks/trotter_error.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In this example we use the [pyALF](https://git.physik.uni-wuerzburg.de/ALF/pyALF/-/tree/master/) interface to run ALF with the Mz choice of Hubbard-Stratonovich transformation (i.e., coupled to the $z$-component of the spin) on a $6\\times 6$ site square lattice, at $U/t=4$ half-band filling, and inverse temperature $\\beta t = 5$.\n",
"In this example we use the [pyALF](https://github.com/ALF-QMC/pyALF) interface to run ALF with the Mz choice of Hubbard-Stratonovich transformation (i.e., coupled to the $z$-component of the spin) on a $6\\times 6$ site square lattice, at $U/t=4$ half-band filling, and inverse temperature $\\beta t = 5$.\n",
"\n",
"We carry out a systematic $\\Delta \\tau t$ extrapolation keeping $\\Delta \\tau t L_\\text{Trotter} = 2$ constant. Recall that the formulation of the auxiliary field QMC approach is based on the symmetric Trotter decomposition \n",
"$$\n",
"e^{ -\\Delta \\tau \\left( \\hat{A} + \\hat{B} \\right) } = e^{ -\\Delta \\tau \\hat{A}/2} e^{ -\\Delta \\tau \\hat{B} } e^{ -\\Delta \\tau \\hat{A}/2} + \\mathcal{O} \\left (\\Delta \\tau^3\\right)\n",
"$$\n",
"The overall error produced by this approximation is of the order $\\Delta \\tau^2$. \n",
"\n",
"Bellow we go through the steps for performing this extrapolation: setting the simulation parameters, running it and analysing the data. A reference plot for this analyses is found in [ALF documentation](https://git.physik.uni-wuerzburg.de/ALF/ALF/-/blob/master/Documentation/doc.pdf), Sec. 2.3.2 (Symmetric Trotter decomposition).\n",
"Bellow we go through the steps for performing this extrapolation: setting the simulation parameters, running it and analysing the data. A reference plot for this analyses is found in [ALF documentation](https://alf.physik.uni-wuerzburg.de/doc.pdf), Sec. 2.3.2 (Symmetric Trotter decomposition).\n",
"\n",
"---\n",
"\n",
Expand Down Expand Up @@ -377,8 +377,13 @@
"source": [
"---\n",
"## Exercises\n",
"1. Try out the four different combinations for `Checkerboard` and `Symm` settings in order to observe their effect on the output and run time. Reference: Sec. 2.3.2 - Symmetric Trotter decomposition - of the [ALF documentation](https://git.physik.uni-wuerzburg.de/ALF/ALF/-/blob/master/Documentation/doc.pdf), especially Fig. 2."
"1. Try out the four different combinations for `Checkerboard` and `Symm` settings in order to observe their effect on the output and run time. Reference: Sec. 2.3.2 - Symmetric Trotter decomposition - of the [ALF documentation](https://alf.physik.uni-wuerzburg.de/doc.pdf)), especially Fig. 2."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
}
],
"metadata": {
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## pyALF

A Python package building on top of [ALF](https://git.physik.uni-wuerzburg.de/ALF/ALF), meant to simplify the different steps of working with ALF, including:
A Python package building on top of [ALF](https://github.com/ALF-QMC/ALF), meant to simplify the different steps of working with ALF, including:

* Obtaining and compiling the ALF source code
* Preparing and running simulations
Expand Down Expand Up @@ -35,7 +35,7 @@ pyALF can be installed via the Python package installer [pip](https://pip.pypa.i
pip install pyALF
```

For running ALF, you will additionaly need the [ALF prerequsites](https://git.physik.uni-wuerzburg.de/ALF/ALF#prerequisites).
For running ALF, you will additionaly need the [ALF prerequsites](https://github.com/ALF-QMC/ALF#prerequisites).

Alternatively, one could use [this Docker image](https://hub.docker.com/r/alfcollaboration/jupyter-pyalf-full), which has ALF, pyALF and a Jupyter server pre-installed.

Expand All @@ -51,7 +51,7 @@ or a
The following example shows how to install pyALF in development mode using venv.

```bash
git clone https://git.physik.uni-wuerzburg.de/ALF/pyALF.git
git clone https://github.com/ALF-QMC/pyALF.git
cd pyALF
python -m venv .venv
source .venv/bin/activate
Expand Down
2 changes: 1 addition & 1 deletion doc/_templates/sidebar_pdf_commit_.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ul class="navbar-icon-links navbar-nav" aria-label="Icon Links">
<li class="nav-item">
<a href="/Jonas_schwab/pyalf-docu/doc.pdf" class="nav-link" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom" aria-label="Download PDF" data-bs-original-title="Download PDF">
<a href="https://alf.physik.uni-wuerzburg.de/pyalf-doc/doc.pdf" class="nav-link" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom" aria-label="Download PDF" data-bs-original-title="Download PDF">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="96" height="20" role="img" aria-label="Download: PDF">
<title>Download PDF</title>
<linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
Expand Down
6 changes: 3 additions & 3 deletions doc/source/examples/Nematic_example_1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
},
"source": [
"## ALF_source\n",
"Create instance of `ALF_source`, then we download the `Nematic_Dirac` Hamiltonian from the [Hamiltonian repository](https://git.physik.uni-wuerzburg.de/ALF/hamiltonians/).\n",
"Create instance of `ALF_source`, then we download the `Nematic_Dirac` Hamiltonian from the [Hamiltonian repository](https://github.com/ALF-QMC/Hamiltonians/).\n",
"\n",
"Reminder: Directory containing the ALF code is taken from environment variable `$ALF_DIR`, if present."
]
Expand Down Expand Up @@ -81,7 +81,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"id": "78cd3fec-dfec-41e6-90b4-5674baf77513",
"metadata": {
"editable": true,
Expand Down Expand Up @@ -112,7 +112,7 @@
"source": [
"ham_name = \"Nematic_Dirac\"\n",
"urlretrieve(\n",
" f'https://git.physik.uni-wuerzburg.de/ALF/hamiltonians/-/raw/main/Hamiltonians/{ham_name}/Hamiltonian_{ham_name}_smod.F90',\n",
" f'https://raw.githubusercontent.com/ALF-QMC/Hamiltonians/refs/heads/main/Hamiltonians/{ham_name}/Hamiltonian_{ham_name}_smod.F90',\n",
" os.path.join(alf_src.alf_dir, \"Prog\", \"Hamiltonians\", f\"Hamiltonian_{ham_name}_smod.F90\")\n",
")"
]
Expand Down
2 changes: 1 addition & 1 deletion doc/source/front.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Aiming to address this challenge, pyALF is a set of Python scripts built on top
- Preparing and running simulations
- Postprocessing and displaying the data obtained during the simulation

The source codes for both ALF and pyALF are publicly available at [https://git.physik.uni-wuerzburg.de/ALF](https://git.physik.uni-wuerzburg.de/ALF).
The source codes for both ALF and pyALF are publicly available at [https://github.com/ALF-QMC](https://github.com/ALF-QMC).

This documentation is structured in the following way:

Expand Down
Loading
Loading