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
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: Bug report
about: Something isn't working as expected
title: ""
labels: bug
---

## Description

A clear and concise description of what went wrong, and what you expected to happen instead.

## Minimal working example (MWE)

Please include the smallest possible piece of code that reproduces the issue.
Trim away everything that is not needed to trigger the bug (unrelated setup, unused imports, etc).

```julia
using MPSKit, TensorKit

# ...
```

## Error / output

Paste the full error message and stacktrace (or the incorrect output), if any.

```
paste here
```

## Version info

Please include the versions of MPSKit and its main dependencies.
From the Julia REPL:

```julia-repl
julia> using Pkg
julia> Pkg.status(["MPSKit", "TensorKit"])
```

Also include the Julia version:

```julia-repl
julia> versioninfo()
```

## Additional context

Anything else that might help (OS, whether it also happens on the latest `main`, related issues, etc).
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Open-ended discussion
url: https://github.com/QuantumKitHub/MPSKit.jl/discussions
about: Ideas, feature brainstorming, or anything that isn't a specific question or bug report. For a concrete question about using MPSKit, use the Question template above.
- name: Documentation
url: https://quantumkithub.github.io/MPSKit.jl/stable/
about: The manual and examples, which may already cover what you are after.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Question
about: Ask a question about using MPSKit
title: ""
labels: question
---

## What are you trying to do?

Describe the physics or the workflow you are trying to set up.

## What have you tried?

If applicable, include the code you have so far, and what result you got (or expected but didn't get).

```julia
using MPSKit, TensorKit

# ...
```

## Version info (optional but helpful)

```julia-repl
julia> using Pkg
julia> Pkg.status(["MPSKit", "TensorKit"])
```
10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Description

Briefly describe what this PR changes and why.

## Checklist

- [ ] Tests pass locally (`julia --project=test test/runtests.jl`, or the relevant subset)
- [ ] Documentation updated, if this PR changes public API (docstrings, `docs/src/`)
- [ ] Runic formatter is run
- [ ] Changelog entry added under `[Unreleased]` in `docs/src/changelog.md`, if this PR is user-facing (new feature, behavior change, bug fix, deprecation, or removal)
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ benchmark/results
**/.vitepress/cache/
**/.vitepress/dist/
package-lock.json

# generated from CONTRIBUTING.md by docs/make.jl
docs/src/contributing.md
20 changes: 18 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,23 @@ authors:
orcid: "https://orcid.org/0000-0002-0858-291X"

title: "MPSKit"
version: 0.13.11
version: 0.13.13
doi: 10.5281/zenodo.10654900
date-released: 2026-05-04
date-released: 2026-06-09
url: "https://github.com/QuantumKitHub/MPSKit.jl"

references:
- type: article
authors:
- family-names: "Devos"
given-names: "Lukas"
orcid: "https://orcid.org/0000-0002-0256-4200"
- family-names: "Haegeman"
given-names: "Jutho"
orcid: "https://orcid.org/0000-0002-0858-291X"
title: "TensorKit.jl: A Julia package for large-scale tensor computations, with a hint of category theory"
journal: "arXiv"
year: 2025
doi: "10.48550/arXiv.2508.10076"
url: "https://arxiv.org/abs/2508.10076"
notes: "MPSKit is built on TensorKit.jl; please consider citing it as well."
112 changes: 112 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Contributing to MPSKit.jl

Thanks for taking the time to contribute!
We are open to any and all suggestions and welcome new and advanced developers alike.
This document is a short, practical guide to reporting issues, asking questions, and submitting changes.

## Asking questions and reporting bugs

Use [GitHub issues](https://github.com/QuantumKitHub/MPSKit.jl/issues) for both.
There are two templates to help you:

- **Bug report** — for something that doesn't work as expected.
- **Question** — for anything else, from "how do I model X" to "is Y possible".

Open-ended discussion that isn't really a question or a bug is also welcome on [GitHub Discussions](https://github.com/QuantumKitHub/MPSKit.jl/discussions).

A good bug report is one we can act on immediately, and it typically needs two things:

1. A minimal working example (MWE): the smallest snippet of code that reproduces the problem.
Strip away everything not needed to trigger the bug — unrelated setup, unused imports, alternative approaches you also tried.
2. Version information for MPSKit, TensorKit, and Julia, obtained with:

```julia-repl
julia> using Pkg
julia> Pkg.status(["MPSKit", "TensorKit"])
```

```julia-repl
julia> versioninfo()
```

Please also include the full error message and stacktrace, if there is one.

## Contributing code

We are very happy to take contributions, and will gladly make the time to review code.
Note that this might take a bit of time, so please be patient with us.

For small issues, fixes and typos, feel free to open a PR directly.
For larger amounts of work, it might be beneficial to open an issue first, so we can discuss the solution strategy beforehand.
Often, it might be the case that there are other ideas, or partial solutions that already were in the make, and we want to avoid duplicate or wasted work as much as possible.

There is no restriction for the use of AI-tooling to assist you, although we do ask that you take the time to review the code yourself.
Additionally, please do not just copy-paste LLM generated responses into code reviews or discussions, as we take the time and effort to review your code and expect the same amount of effort from you.
Do note however, that this means that overly large PRs might not get reviewed, since the review process for these is too resource-intensive.

### Development setup

Fork and clone the repository, then point Julia at your local checkout instead of the released version:

```julia-repl
pkg> dev /path/to/your/clone/MPSKit.jl
```

Alternatively, you can tell Julia to clone the repository automatically, which will put it in a local `dev/` folder next to your Project.toml:

```julia-repl
pkg> dev --local MPSKit
```

If you just want to try out the current `main` without a fork, `pkg> add MPSKit#main` is enough.

### Running the tests

The repository root is a Julia workspace (`Project.toml` lists `test`, `docs`, and `examples` as workspace projects), and `test/Project.toml` already points `MPSKit` back at the repo checkout.
From the repository root, you can therefore run the full suite with:

```
julia --project=test test/runtests.jl
```

The test suite is organized by topic under `test/` (`algorithms/`, `states/`, `operators/`, `misc/`, `gpu/`), with shared setup code in `test/setup/`.
GPU tests only run when a functional CUDA/cuTENSOR install is detected, so most contributors will only ever exercise the CPU tests.

Additionally, a number of CLI flags can be added to run the tests selectively, as these will be filtered by folder and filename
A `--fast` flag is available for a quicker, reduced run while iterating.

```
julia --project=test test/runtests.jl states
julia --project=test test/runtests.jl operators algorithms/groundstate
julia --project=test test/runtests.jl misc --fast
```

### Building the documentation

The docs use Documenter.jl with the DocumenterVitepress backend, so a full render needs Node.js in addition to Julia.
For routine verification of code examples (fast, no Node required), you can run the doctests directly:

```
julia --project=docs -e 'using Documenter, MPSKit; doctest(MPSKit)'
```

For a full local site build (slower, needs `npm`):

```
julia --project=docs docs/make.jl
```

### Code formatting

This repository is formatted with [Runic](https://github.com/fredrikekre/Runic.jl).
Formatting is checked automatically on pull requests, and there is a [pre-commit](https://pre-commit.com/) hook (`.pre-commit-config.yaml`) that runs Runic locally if you use pre-commit.
Please format any Julia files you touch before opening a PR, and refrain from making any formatting changes to code that is not relevant to your PR.

### Changelog entries

If your change is user-facing (new feature, behavior change, bug fix, deprecation, or removal), add an entry under the `[Unreleased]` section of `docs/src/changelog.md`, in the category that matches your change.

### Opening a pull request

Small, focused pull requests are easiest to review.
Please describe what the change does and why, link any related issues, and make sure the checklist in the PR template is filled in before requesting review.
Loading