Skip to content

Commit

Permalink
Add project
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos authored Jun 20, 2022
1 parent fefb2ab commit 78bf91a
Show file tree
Hide file tree
Showing 156 changed files with 29,856 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
*.fig binary
*.mat binary
*.mdl binary
*.mdlp binary
*.mexa64 binary
*.mexw64 binary
*.mexmaci64 binary
*.mlapp binary
*.mldatx binary
*.mlproj binary
*.mlx binary
*.p binary
*.sfx binary
*.sldd binary
*.slreqx binary
*.slmx binary
*.sltx binary
*.slxc binary
*.slx binary merge=mlAutoMerge
*.slxp binary

## Other common binary file types
*.docx binary
*.exe binary
*.jpg binary
*.pdf binary
*.png binary
*.xlsx binary
46 changes: 46 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev

# allows to run manually from the Actions tab
workflow_dispatch:

jobs:
build:
name: Run MATLAB Tests
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Setup MATLAB
uses: matlab-actions/setup-matlab@v1
with:
release: R2020b

- name: Run tests and generate artifacts
uses: matlab-actions/run-tests@v1
with:
source-folder: src
select-by-folder: test
test-results-junit: test-results/results.xml
code-coverage-cobertura: code-coverage/coverage.xml

- name: Publish Unit Test Results
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: test-results/results.xml

- name: Code Coverage Summary Report
uses: codecov/codecov-action@v2
with:
files: code-coverage/coverage.xml
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# List of untracked files to ignore
*.asv
.vscode/
_build
.ipynb_checkpoints
docs/src/examples/**/*.m
27 changes: 27 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

build:
os: "ubuntu-20.04"
tools:
python: "3.9"

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

# Optionally build your docs in additional formats such as PDF and ePub
formats:
- htmlzip
#- pdf

submodules:
include: all

# Optionally set the version of Python and requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
27 changes: 27 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Devos"
given-names: "Lukas"
orcid: "https://orcid.org/0000-0002-0256-4200"
- family-names: "Burgelman"
given-names: "Lander"
orcid: "https://orcid.org/0000-0003-1724-5330"
- family-names: "Vanhecke"
given-names: "Bram"
orcid: "https://orcid.org/0000-0001-9557-1591"
- family-names: "Haegeman"
given-names: "Jutho"
orcid: "https://orcid.org/0000-0002-0858-291X"
- family-names: "Verstraete"
given-names: "Frank"
orcid: "https://orcid.org/0000-0003-0270-5592"
- family-names: "Vanderstraeten"
given-names: "Laurens"
orcid: "https://orcid.org/0000-0002-3227-9822"

title: "TensorTrack"
version: 0.0.1
doi: 10.5281/zenodo.6619296
date-released: 2022-06-07
url: "https://github.com/lkdvos/TensorTrack"
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 quantumghent
Copyright (c) 2022 lkdvos

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
190 changes: 189 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,189 @@
# TensorTrack
<div id="top"></div>

<!-- PROJECT SHIELDS -->
<div align="center">

[![Documentation Status](https://readthedocs.org/projects/tensortrack/badge/?version=latest)](https://tensortrack.readthedocs.io/en/latest/index.html)
[![CI](https://github.com/quantumghent/TensorTrack/actions/workflows/CI.yml/badge.svg)](https://github.com/quantumghent/TensorTrack/actions/workflows/CI.yml)
[![Codecov](https://codecov.io/gh/quantumghent/TensorTrack/branch/main/graph/badge.svg?token=1I0XEB69TQ)](https://codecov.io/gh/quantumghent/TensorTrack)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![DOI](https://zenodo.org/badge/481924253.svg)](https://zenodo.org/badge/latestdoi/481924253)

</div>

<!-- PROJECT LOGO -->
<br />
<div align="center">
<a href="https://github.com/quantumghent/TensorTrack">
<img src="docs/src/img/logo.png" alt="Logo" width="800">
</a>

<p align="center">
An open-source tensor network library for MATLAB.
<br />
<a href="https://tensortrack.readthedocs.io/en/latest/"><strong>Explore the docs »</strong></a>
<br />
<br />
<a href="https://tensortrack.readthedocs.io/en/latest/examples/examples.html">View Demo</a>
·
<a href="https://github.com/quantumghent/TensorTrack/issues">Report Bug</a>
·
<a href="https://github.com/quantumghent/TensorTrack/issues">Request Feature</a>
</p>
</div>

<!-- TABLE OF CONTENTS -->
<details>
<summary>Table of Contents</summary>
<ol>
<li>
<a href="#about-the-project">About The Project</a>
</li>
<li>
<a href="#getting-started">Getting Started</a>
<ul>
<li><a href="#requirements">Requirements</a></li>
<li><a href="#installation">Installation</a></li>
</ul>
</li>
<li><a href="#usage">Usage</a></li>
<li><a href="#contributing">Contributing</a></li>
<li><a href="#license">License</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="#acknowledgments">Acknowledgments</a></li>
</ol>
</details>


<!-- ABOUT THE PROJECT -->
## About The Project

<!-- [![Product Name Screen Shot][product-screenshot]](https://example.com) -->
This is a package which aims to efficiently implement the various elementary algorithms that arise in the context of tensor networks. Currently, this includes:

* Various basic and utility tensor operations, such as creation routines, various linear algebra routines (norms, traces, overlaps, ...), index permutations, ...
* Tensor contraction routines, both pairwise as well as through a network contraction routine.
* Tensor factorizations, such as QR, LQ and polar decompositions, eigendecompositions and singular value decompositions.
* Solver algorithms for eigen systems and linear systems.

Additionally, these tensors support a general global symmetries, in which case both memory and CPU usage are optimized. The framework is able to support both Abelian and non-Abelian symmetries, as well as symmetry groups with multiplicities, which can have bosonic or fermionic braiding rules.
The design of the algorithms is chosen such that the inclusion of symmetries should not alter the code after the creation of the tensors. Currently, the following symmetries are implemented:

* Z2
* U1
* SU2
* O2
* Direct product groups

<p align="right">(<a href="#top">back to top</a>)</p>


<!-- GETTING STARTED -->
## Getting Started

### Requirements

This project depends on the following:
- MATLAB version R2020b or newer
- [Parallel Computing Toolbox](https://de.mathworks.com/products/parallel-computing.html)
- A C++ compiler compatible with your MATLAB version for MEX-file compilation.

### Installation
1. Clone the repo into a local folder.
```sh
git clone https://github.com/quantumghent/TensorTrack.git mylocalfolder
```

2. Add the folder and subfolders to your MATLAB path.
- Via the MATLAB UI:
Home > Environment > Set Path > Add with Subfolders > mylocalfolder/src
- Via the MATLAB Command Window:
```matlabsession
addpath(genpath('mylocalfolder/src'))
```
By default, the path is reset every time you close the application. You can permanently add this package to the path by calling ```savepath```.
3. Precompile the necessary mex files.
Within the MATLAB Command Window, call:
```matlabsession
GetMD5
uninit
```

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- USAGE EXAMPLES -->
## Usage

_For examples, please refer to the [Documentation](https://tensortrack.readthedocs.io/en/latest/examples/examples.html)_

<p align="right">(<a href="#top">back to top</a>)</p>


<!-- CONTRIBUTING -->
## Contributing

Contributions as well as feature requests are greatly appreciated.

If you have a suggestion that would make this project better, please do not hesitate to open an issue with the tag "enhancement". Alternatively, you could also fork the repo and create a pull request:

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

Don't forget to give the project a star! Thanks again!

<p align="right">(<a href="#top">back to top</a>)</p>


<!-- LICENSE -->
## License

Distributed under the MIT License. See `LICENSE.txt` for more information.

<p align="right">(<a href="#top">back to top</a>)</p>


<!-- CONTACT -->
## Contact
Lukas Devos - [lkdvos](https://github.com/lkdvos) - [email protected]

Lander Burgelman - [leburgel](https://github.com/leburgel) - [email protected]

Project Link: [https://github.com/quantumghent/TensorTrack](https://github.com/quantumghent/TensorTrack)

<p align="right">(<a href="#top">back to top</a>)</p>


<!-- ACKNOWLEDGMENTS -->
## Acknowledgments
This project has been made possible through the work of the following people:
* [Lukas Devos](https://orcid.org/0000-0002-0256-4200)
* [Lander Burgelman](https://orcid.org/0000-0003-1724-5330)
* [Bram Vanhecke](https://orcid.org/0000-0001-9557-1591)
* [Jutho Haegeman](https://orcid.org/0000-0002-0858-291X)
* [Frank Verstraete](https://orcid.org/0000-0003-0270-5592)
* [Laurens Vanderstraeten](https://orcid.org/0000-0002-3227-9822)
* ...


<p align="right">(<a href="#top">back to top</a>)</p>


<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
[contributors-shield]: https://img.shields.io/github/contributors/github_username/repo_name.svg?style=for-the-badge
[contributors-url]: https://github.com/github_username/repo_name/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/github_username/repo_name.svg?style=for-the-badge
[forks-url]: https://github.com/github_username/repo_name/network/members
[stars-shield]: https://img.shields.io/github/stars/github_username/repo_name.svg?style=for-the-badge
[stars-url]: https://github.com/github_username/repo_name/stargazers
[issues-shield]: https://img.shields.io/github/issues/github_username/repo_name.svg?style=for-the-badge
[issues-url]: https://github.com/github_username/repo_name/issues
[license-shield]: https://img.shields.io/github/license/github_username/repo_name.svg?style=for-the-badge
[license-url]: https://github.com/github_username/repo_name/blob/master/LICENSE.txt
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[linkedin-url]: https://linkedin.com/in/linkedin_username
[product-screenshot]: images/screenshot.png
21 changes: 21 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 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
SPHINXPROJ = TensorTrack
SOURCEDIR = src
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)
9 changes: 9 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
sphinx==4.5.0
sphinx-rtd-theme==0.5.1
sphinxcontrib-matlabdomain==0.12.0
sphinx-prompt
nbsphinx==0.8.9
sphinx-gallery==0.10.1
myst-parser==0.17.2
linkify-it-py==2.0.0

Loading

0 comments on commit 78bf91a

Please sign in to comment.