Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start reexporting ITensorTDVP and ITensors.ITensorMPS #1

Merged
merged 12 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
39 changes: 29 additions & 10 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ on:
push:
branches:
- main
tags: '*'
tags: ['*']
pull_request:
workflow_dispatch:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
Expand All @@ -14,6 +15,10 @@ jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
actions: write
contents: read
strategy:
fail-fast: false
matrix:
Expand All @@ -27,7 +32,7 @@ jobs:
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
Expand All @@ -36,25 +41,39 @@ jobs:
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
- uses: codecov/codecov-action@v4
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
docs:
name: Documentation
runs-on: ubuntu-latest
permissions:
actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created
contents: write
statuses: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- uses: julia-actions/cache@v1
- name: Configure doc environment
shell: julia --project=docs --color=yes {0}
run: |
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
- run: |
julia --project=docs -e '
using Documenter: DocMeta, doctest
using ITensorMPS
DocMeta.setdocmeta!(ITensorMPS, :DocTestSetup, :(using ITensorMPS); recursive=true)
doctest(ITensorMPS)'
- name: Run doctests
shell: julia --project=docs --color=yes {0}
run: |
using Documenter: DocMeta, doctest
using ITensorMPS
DocMeta.setdocmeta!(ITensorMPS, :DocTestSetup, :(using ITensorMPS); recursive=true)
doctest(ITensorMPS)
2 changes: 1 addition & 1 deletion .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CompatHelper
on:
schedule:
- cron: '00 00 * * *'
- cron: 0 0 * * *
workflow_dispatch:
jobs:
CompatHelper:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ on:
types:
- created
workflow_dispatch:
inputs:
lookback:
default: "3"
permissions:
actions: read
checks: read
contents: write
deployments: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/register.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
jobs:
register:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: julia-actions/RegisterAction@latest
with:
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# ITensorMPS.jl

[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://itensor.github.io/ITensorMPS.jl/stable/)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://itensor.github.io/ITensorMPS.jl/dev/)
[![Build Status](https://github.com/ITensor/ITensorMPS.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/ITensor/ITensorMPS.jl/actions/workflows/CI.yml?query=branch%3Amain)
[![Coverage](https://codecov.io/gh/ITensor/ITensorMPS.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/ITensor/ITensorMPS.jl)
[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle)

MPS and MPO methods based on ITensor (ITensors.jl).

This package supercedes the MPS codes previously located in the ITensors.jl and ITensorTDVP.jl packages, including applications like DMRG, TDVP, applying MPO to MPS, applying gates, etc.
Expand Down
3 changes: 3 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
ITensorMPS = "10ea5e1e-0ede-47d2-81e8-27a421adbc4d"
23 changes: 23 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using ITensorMPS
using Documenter

DocMeta.setdocmeta!(ITensorMPS, :DocTestSetup, :(using ITensorMPS); recursive=true)

makedocs(;
modules=[ITensorMPS],
authors="ITensor developers",
sitename="ITensorMPS.jl",
format=Documenter.HTML(;
canonical="https://ITensor.github.io/ITensorMPS.jl",
edit_link="main",
assets=String[],
),
pages=[
"Home" => "index.md",
],
mtfishman marked this conversation as resolved.
Show resolved Hide resolved
)

deploydocs(;
repo="github.com/ITensor/ITensorMPS.jl",
devbranch="main",
)
mtfishman marked this conversation as resolved.
Show resolved Hide resolved
14 changes: 14 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```@meta
CurrentModule = ITensorMPS
```

# ITensorMPS

Documentation for [ITensorMPS](https://github.com/ITensor/ITensorMPS.jl).

```@index
```

```@autodocs
Modules = [ITensorMPS]
```
9 changes: 6 additions & 3 deletions src/ITensorMPS.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
module ITensorMPS

# Write your package code here.

using ITensorTDVP: TimeDependentSum, dmrg_x, linsolve, tdvp, to_vec
export TimeDependentSum, dmrg_x, linsolve, tdvp, to_vec
using ITensorTDVP: ITensorTDVP
const alternating_update_dmrg = ITensorTDVP.dmrg
using ITensors.ITensorMPS: dmrg
export dmrg
end
4 changes: 4 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[deps]
ITensorMPS = "0d1a4710-d33b-49a5-8f18-73bdf49b47e2"
ITensorTDVP = "25707e16-a4db-4a07-99d9-4d67b7af0342"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
28 changes: 24 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
using ITensorMPS
using Test

@eval module $(gensym())
using ITensorMPS: ITensorMPS
using ITensorTDVP: ITensorTDVP
using Test: @test, @testset
@testset "ITensorMPS.jl" begin
# Write your tests here.
@testset "exports" begin
@test issetequal(
names(ITensorMPS),
[
:ITensorMPS,
# ITensorMPS reexports
:dmrg,
# ITensorTDVP reexports
:TimeDependentSum,
:dmrg_x,
:linsolve,
:tdvp,
:to_vec,
],
)
end
@testset "aliases" begin
@test ITensorMPS.alternating_update_dmrg === ITensorTDVP.dmrg
end
end
end
Loading