Development#

This page describes how to download Hiperwalk from GitHub, how to test it, and how to generate its documentation. Before that, if you wish to contribute or extend Hiperwalk’s capabilities by implementing new quantum walk models, please contact the developers (see the next section).

Bug Report and Contact#

To send a bug report, add a new issue on Hiperwalk’s github.

A good way to start contributing to Hiperwalk is to solve any of the open issues.

Alternatively, to send a bug report, contribute to Hiperwalk or contact the developers, write an email to hiperwalk@gmail.com.

Downloading#

The main branch is the main development area for new features. To contribute, first clone the repository.

git clone https://github.com/hiperwalk/hiperwalk.git

Hiperwalk is built upon several Python libraries. Before developing for Hiperwalk, these libraries need to be installed. These libraries include numpy, scipy, networkx, and matplotlib. It is recommended to install these libraries in a new virtual environment.

Suppose Hiperwalk was installed in the ~/hiperwalk directory. To create a new virtual environment on this directory, issue the command

python3 -m venv ~/hiperwalk/.venv

To activate the virtual environment use the command

source ~/hiperwalk/.venv/bin/activate

With the appropriate virtual environment activated, the required libraries can be installed. To install the required libraries, use the following commands:

pip3 install numpy
pip3 install scipy
pip3 install networkx
pip3 install matplotlib

Next, make the desired modifications and submit a pull request. We strongly recommend reading best practices for pull requests.

Testing#

Tests are located in the hiperwalk/tests/ directory. If a complete installation (including GPU support) was performed, execute:

Warning

Do not forget to activate the virtual environment before running the tests.

./run_all.sh

If you installed the standalone version (without any HPC support), execute:

./run_hpc_none.sh

Documentation#

There are likely to be new features in the main branch. These features are documented online in the latest version.

Install Requirements#

To generate the current, under-development documentation locally, all Hiperwalk requirements must be installed (see Hiperwalk section in the installation guide).

Assuming that all Hiperwalk requirements are installed, the following commands install the remaining documentation-specific requirements.

sudo apt install python3-sphinx
sudo apt install graphviz

Warning

Do not forget to activate the virtual environment before installing the following Python packages.

pip3 install numpydoc
pip3 install sphinx-autodoc-typehints
pip3 install pydata-sphinx-theme

Generate Documentation#

Within the hiperwalk/docs/ directory, execute:

Warning

Do not forget to activate the virtual environment before generating the documentation.

./go

View Generated Documentation#

If the process was successful, the newly compiled documentation is now available for local access. To view (and test) it, open the file hiperwalk/docs/build/html/index.html in your preferred browser – for instance, by double-clicking on it.